Skip to content
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

comparing isinstance(...) to True is an anti-pattern #3601

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

strmfos
Copy link
Contributor

@strmfos strmfos commented Feb 3, 2025

Because isinstance(...) already returns a boolean, comparing it to True with is is unnecessary and considered an anti-pattern.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@strmfos
Copy link
Contributor Author

strmfos commented Feb 3, 2025

image

have a nice day !

@pacrob
Copy link
Contributor

pacrob commented Feb 3, 2025

Thanks @comfsrt !

Copy link
Contributor

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

lgtm!

@reedsa reedsa merged commit fe791ed into ethereum:main Feb 3, 2025
85 checks passed
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.

None yet

3 participants