-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
MAINT: fix unhashable instance and potential exception identified by LGTM. #19818
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
Conversation
writefo = open(outfilename, 'w') | ||
writefo.write(source) | ||
with open(outfilename, 'w') as writefo: | ||
writefo.write(source) | ||
writefo.close() |
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.
You should remove this line too
numpy/array_api/_typing.py
Outdated
@@ -37,7 +37,7 @@ | |||
|
|||
Device = Any | |||
Dtype = Type[ | |||
Union[[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64]] | |||
Union[(int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64)] |
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.
Union[(int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64)] | |
Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64] |
is identical but more readable.
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.
There seems to be a bit of overlap here with #19798 though.
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.
That PR is wrong in multiple ways
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 suggestions... I will make these changes and commit again.
LGTM. @BvB93 Any comments on the typing change? |
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 as of the latest push.
Thanks @sistaseetaram . |
Thank you so much. |
Apropos #19077.