Open jamesbraza opened 2 months ago
It turns out with Python 3.10+ that isinstance (docs) supports union syntax:
isinstance
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?
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?