8000 WIP: Type conversions (ToInteger, ToString, ToBoolean, ToFloat) by japsu · Pull Request #50 · con2/emrichen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

japsu
Copy link
Collaborator
@japsu japsu commented Jul 12, 2021

@akx Could you please comment on corner cases found in tests/test_typeconv.py and other corner cases you could think of?

Cc @lukeschlather

@japsu japsu requested a review from akx July 12, 2021 06:07
@japsu japsu marked this pull request as draft July 12, 2021 06:07
@@ -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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pyrekt

Copy link
Collaborator
@akx akx left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0