@@ -216,7 +216,7 @@ select = [
216
216
"TD", # flake8-todos (force all TODOs to include an author and issue link)
217
217
"TID", # flake8-tidy-imports (extra import rules to check)
218
218
# "TRY", # tryceratops (warnings related to exceptions and try/except)
219
- # "UP", # pyupgrade (A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language)
219
+ "UP", # pyupgrade (A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language)
220
220
"W", # pycodestyle warnings (warn about minor stylistic issues)
221
221
"YTT", # flake8-2020 (checks for misuse of sys.version or sys.version_info)
222
222
]
@@ -237,6 +237,8 @@ ignore = [
237
237
"TC006", # Add quotes to type expression in typing.cast() (not needed except for forward references)
238
238
"UP007", # Use X | Y for type annotations (requires Python 3.10+)
239
239
"UP017", # Use datetime.UTC alias (requires Python 3.11+)
240
+ "UP036", # Version block is outdated for minimum Python version (requires ruff target_version set to minimum supported)
241
+ "UP038", # Use X | Y in {} call instead of (X, Y) - deprecated due to poor performance (requires Python 3.10+)
240
242
"W191", # Conflicts with ruff format
241
243
]
242
244
@@ -254,6 +256,10 @@ per-file-ignores."cmd2/__init__.py" = [
254
256
"F401", # Unused import
255
257
]
256
258
259
+ per-file-ignores."cmd2/argparse_custom.py" = [
260
+ "UP031", # Use format specifiers instead of percent format (auto fix is unsafe)
261
+ ]
262
+
257
263
per-file-ignores."examples/*.py" = [
258
264
"INP001", # Module is part of an implicit namespace
259
265
"PLW2901", # loop variable overwritten inside loop
0 commit comments