-
Notifications
You must be signed in to change notification settings - Fork 10
WIP: Type conversions (ToInteger, ToString, ToBoolean, ToFloat) #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -67,4 +68,4 @@ class IsNone(_BaseIsType): | |||
""" | |||
|
|||
def check(self, value: Optional[Union[VoidType, str]]) -> bool: | |||
return (value is None or value is Void) | |||
return value is None or value is Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black
value_types = (object,) | ||
requisite_type: Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyrekt
init_file = f.read() | ||
match = re.search("__version__ = ['\"]([^'\"]+)['\"]", init_file) | ||
assert match, "Failed to parse version from emrichen/__init__.py" | ||
version = match.group(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyrekt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The "Too Pythonic" true seems a non-issue for now.
@akx Could you please comment on corner cases found in
tests/test_typeconv.py
and other corner cases you could think of?Cc @lukeschlather