-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with SIM101 (adjacent isinstance() calls) (#7798)
- Only trigger for immediately adjacent isinstance() calls with the same target - Preserve order of or conditions Two existing tests changed: - One was incorrectly reordering the or conditions, and is now correct. - Another was combining two non-adjacent isinstance() calls. It's safe enough in that example, but this isn't safe to do in general, and it feels low-value to come up with a heuristic for when it is safe, so it seems better to not combine the calls in that case. Fixes #7797
- Loading branch information
1 parent
5d49d26
commit 7b4fb4f
Showing
3 changed files
with
112 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters