-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: Minor improvements to code style #8
base: master
Are you sure you want to change the base?
Conversation
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.
Thank you for your contribution. Reviewed.
@@ -56,7 +64,7 @@ def seconds(self) -> float: | |||
def datetime(self) -> datetime: | |||
return datetime.utcfromtimestamp(self.seconds) | |||
|
|||
def datetime_tz(self, tz: Optional[tzinfo] = None) -> datetime: | |||
def datetime_tz(self, tz: Optional[tzinfo] = None) -> 'datetime': |
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.
Why?
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.
Raises type errors in newer Python versions.
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.
Hmmm... specifically?
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.
Checked on 3.11 and 3.12. No errors there. Did I miss something?
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.
It was raising unknown type errors when using pyright for 3.12.2
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.
Can't reproduce it. Could you share the full example, please?
Updated for <3.10 support. |
Hiya, I made some improvements to the typing along with updating the module to follow PEP best practices such as using
__all__
in the__init__
file & not shadowing variable types onSnowflakeGenerator.__init__
. Additionally, I've updated both classes to use__slots__
which improves overal performance.