@@ -216,7 +216,7 @@ select = [
216216 " TD" , # flake8-todos (force all TODOs to include an author and issue link)
217217 " TID" , # flake8-tidy-imports (extra import rules to check)
218218 # "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)
220220 " W" , # pycodestyle warnings (warn about minor stylistic issues)
221221 " YTT" , # flake8-2020 (checks for misuse of sys.version or sys.version_info)
222222]
@@ -237,6 +237,8 @@ ignore = [
237237 " TC006" , # Add quotes to type expression in typing.cast() (not needed except for forward references)
238238 " UP007" , # Use X | Y for type annotations (requires Python 3.10+)
239239 " 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+)
240242 " W191" , # Conflicts with ruff format
241243]
242244
@@ -254,6 +256,10 @@ per-file-ignores."cmd2/__init__.py" = [
254256 " F401" , # Unused import
255257]
256258
259+ per-file-ignores."cmd2/argparse_custom.py" = [
260+ " UP031" , # Use format specifiers instead of percent format (auto fix is unsafe)
261+ ]
262+
257263per-file-ignores."examples/*.py" = [
258264 " INP001" , # Module is part of an implicit namespace
259265 " PLW2901" , # loop variable overwritten inside loop
0 commit comments