Skip to content

Commit d503ef9

Browse files
committed
Enabled ruff SLOT ruleset
1 parent 2c56efa commit d503ef9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cmd2/argparse_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def generate_range_error(range_min: int, range_max: float) -> str:
275275
return err_str
276276

277277

278-
class CompletionItem(str):
278+
class CompletionItem(str): # noqa: SLOT000
279279
"""
280280
Completion item with descriptive text attached
281281

cmd2/parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Macro:
8484

8585

8686
@dataclass(frozen=True)
87-
class Statement(str): # type: ignore[override]
87+
class Statement(str): # type: ignore[override] # noqa: SLOT000
8888
"""String subclass with additional attributes to store the results of parsing.
8989
9090
The ``cmd`` module in the standard library passes commands around as a

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ select = [
200200
# "PLR", # Pylint Refactoring suggestions
201201
"PLW", # Pylint Warnings
202202
"PT", # flake8-pytest-style (warnings about unit test best practices)
203-
# "PTH", # flake8-use-pathlib (force use of pathlib instead of os.path)
203+
# "PTH", # flake8-use-pathlib (force use of pathlib instead of os.path)
204204
"PYI", # flake8-pyi (warnings related to type hint best practices)
205205
"Q", # flake8-quotes (force double quotes)
206206
# "RET", # flake8-return (various warnings related to implicit vs explicit return statements)
@@ -209,8 +209,8 @@ select = [
209209
# "S", # flake8-bandit (security oriented checks, but extremely pedantic - do not attempt to apply to unit test files)
210210
# "SIM", # flake8-simplify (rules to attempt to simplify code)
211211
# "SLF", # flake8-self (warn when protected members are accessed outside of a class or file)
212-
# "SLOT", # flake8-slots (warn about subclasses that should define __slots__)
213-
"T10", # flake8-debugger (check for pdb traces left in Python code)
212+
"SLOT", # flake8-slots (warn about subclasses that should define __slots__)
213+
"T10", # flake8-debugger (check for pdb traces left in Python code)
214214
# "T20", # flake8-print (warn about use of `print` or `pprint` - force use of loggers)
215215
"TC", # flake8-type-checking (type checking warnings)
216216
"TD", # flake8-todos (force all TODOs to include an author and issue link)

0 commit comments

Comments
 (0)