Skip to content

Commit 9930765

Browse files
committed
Enable ruff YTT ruleset and fix the one warning
1 parent 1dc5cc8 commit 9930765

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd2/argparse_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ def __init__(
12611261
behavior on this parser. If this is None or not present, then cmd2 will use
12621262
argparse_completer.DEFAULT_AP_COMPLETER when tab completing this parser's arguments
12631263
"""
1264-
if sys.version_info[1] >= 14:
1264+
if sys.version_info >= (3, 14):
12651265
# Python >= 3.14 so pass new arguments to parent argparse.ArgumentParser class
12661266
super(Cmd2ArgumentParser, self).__init__(
12671267
prog=prog,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ select = [
217217
"TID", # flake8-tidy-imports (extra import rules to check)
218218
# "TRY", # tryceratops (warnings related to exceptions and try/except)
219219
# "UP", # pyupgrade (A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language)
220-
"W", # pycodestyle warnings (warn about minor stylistic issues)
221-
# "YTT", # flake8-2020 (checks for misuse of sys.version or sys.version_info)
220+
"W", # pycodestyle warnings (warn about minor stylistic issues)
221+
"YTT", # flake8-2020 (checks for misuse of sys.version or sys.version_info)
222222
]
223223
ignore = [
224224
# `uv run ruff rule E501` for a description of that rule

0 commit comments

Comments
 (0)