We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
isinstance
tuple
|
It turns out with Python 3.10+ that isinstance (docs) supports union syntax:
isinstance(5, (int, str)) isinstance(5, int | str) # New in Python 3.10
Actually I think union syntax is pretty slick, and easier to read. I think it would be a cool refurb rule to suggest this refactor.
refurb
What do you think?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Overview
It turns out with Python 3.10+ that
isinstance
(docs) supports union syntax:Proposal
Actually I think union syntax is pretty slick, and easier to read. I think it would be a cool
refurb
rule to suggest this refactor.What do you think?
The text was updated successfully, but these errors were encountered: