Skip to content

Commit

Permalink
Fix violation of Ruff type comparison rule (E721)
Browse files Browse the repository at this point in the history
https://docs.astral.sh/ruff/rules/type-comparison/

This wasn't caught previously due to bug in Ruff:
astral-sh/ruff#12300
  • Loading branch information
evansd committed Jul 15, 2024
1 parent b164056 commit dd1053b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/generative/ignored_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,5 @@ class IgnoredError(enum.Enum):
def get_ignored_error_type(e):
for ignored_error_type, errors in IGNORED_ERRORS.items():
for exception_type, exception_regex in errors:
if type(e) == exception_type and exception_regex.match(str(e)):
if type(e) is exception_type and exception_regex.match(str(e)):
return ignored_error_type

0 comments on commit dd1053b

Please sign in to comment.