Skip to content

Commit 00ecfc5

Browse files
authored
Merge pull request #5020 from cookiecutter/luzfcb-disable-UP038-ruff-rule
Disable UP038 Ruff rule to avoid introducing slower code
2 parents 3f5f90e + ae52c62 commit 00ecfc5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: {{cookiecutter.project_slug}}/pyproject.toml

+10-1
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,20 @@ select = [
150150
ignore = [
151151
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
152152
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
153-
"SIM102" # sometimes it's better to nest
153+
"SIM102", # sometimes it's better to nest
154+
"UP038" # Checks for uses of isinstance/issubclass that take a tuple
155+
# of types for comparison.
156+
# Deactivated because it can make the code slow:
157+
# https://github.com/astral-sh/ruff/issues/7871
154158
]
155159
# Allow fix for all enabled rules (when `--fix`) is provided.
156160
fixable = ["ALL"]
157161
unfixable = []
162+
# The fixes in extend-unsafe-fixes will require
163+
# provide the `--unsafe-fixes` flag when fixing.
164+
extend-unsafe-fixes = [
165+
"UP038"
166+
]
158167
# Allow unused variables when underscore-prefixed.
159168
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
160169

0 commit comments

Comments
 (0)