8000 MAINT: fix unhashable instance and potential exception identified by LGTM. by sistaseetaram · Pull Request #19818 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

sistaseetaram
Copy link
Contributor
@sistaseetaram sistaseetaram commented Sep 2, 2021

Apropos #19077.

writefo = open(outfilename, 'w')
writefo.write(source)
with open(outfilename, 'w') as writefo:
writefo.write(source)
writefo.close()
Copy link
Member

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

@@ -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)]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Member

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.

Copy link
Member

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

Copy link
Contributor Author

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.

@charris charris changed the title MAINT: fixed unhashable instance and potential exception as listed in LGTM#19077 MAINT: fix unhashable instance and potential exception identified by LGTM. Sep 2, 2021
@charris
Copy link
Member
charris commented Sep 3, 2021

LGTM. @BvB93 Any comments on the typing change?

Copy link
Member
@BvB93 BvB93 left a 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.

@charris charris merged commit 11420ae into numpy:main Sep 3, 2021
@charris
Copy link
Member
charris commented Sep 3, 2021

Thanks @sistaseetaram .

@sistaseetaram
Copy link
Contributor Author

Thank you so much.

@sistaseetaram sistaseetaram deleted the related-to-#19077 branch September 5, 2021 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0