Skip to content

Commit 97f921d

Browse files
committed
Enabled ruff A ruleset for finding symbols shadowing built-in functions
Enabled an excemption for decorators.py since the as_subcommand_to dectorator has a `help` argument shadowing the python built-in help function, but I didn't want to change the name due to an impact on existing code.
1 parent d82f215 commit 97f921d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ output-format = "full"
156156
# McCabe complexity (`C901`) by default.
157157
select = [
158158
# https://docs.astral.sh/ruff/rules
159-
# "A", # flake8-builtins (variables or arguments shadowing built-ins)
159+
"A", # flake8-builtins (variables or arguments shadowing built-ins)
160160
"AIR", # Airflow specific warnings
161161
# "ANN", # flake8-annotations (missing type annotations for arguments or return types)
162162
# "ARG", # flake8-unused-arguments (functions or methods with arguments that are never used)
@@ -258,6 +258,10 @@ per-file-ignores."cmd2/cmd2.py" = [
258258
"PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple`
259259
]
260260

261+
per-file-ignores."cmd2/decorators.py" = [
262+
"A002", # `as_subcommand_to` function argument `help` is shadowing a Python builtin
263+
]
264+
261265
per-file-ignores."docs/conf.py" = [
262266
"F401", # Unused import
263267
]

0 commit comments

Comments
 (0)