Skip to content

Commit 2c56efa

Browse files
committed
Enable ruff Q ruleset for quote checking, though many rules are ignored to prevent conflict with ruff formatter
1 parent 884758d commit 2c56efa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd2/cmd2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3488,7 +3488,7 @@ def _alias_delete(self, args: argparse.Namespace) -> None:
34883488
@as_subcommand_to('alias', 'list', alias_list_parser, help=alias_list_help)
34893489
def _alias_list(self, args: argparse.Namespace) -> None:
34903490
"""List some or all aliases as 'alias create' commands"""
3491-
self.last_result = {} # Dict[alias_name, alias_value]
3491+
self.last_result = {} # dict[alias_name, alias_value]
34923492

34933493
tokens_to_quote = constants.REDIRECTION_TOKENS
34943494
tokens_to_quote.extend(self.statement_parser.terminators)
@@ -3723,7 +3723,7 @@ def _macro_delete(self, args: argparse.Namespace) -> None:
37233723
@as_subcommand_to('macro', 'list', macro_list_parser, help=macro_list_help)
37243724
def _macro_list(self, args: argparse.Namespace) -> None:
37253725
"""List some or all macros as 'macro create' commands"""
3726-
self.last_result = {} # Dict[macro_name, macro_value]
3726+
self.last_result = {} # dict[macro_name, macro_value]
37273727

37283728
tokens_to_quote = constants.REDIRECTION_TOKENS
37293729
tokens_to_quote.extend(self.statement_parser.terminators)
@@ -4215,7 +4215,7 @@ def do_set(self, args: argparse.Namespace) -> None:
42154215
self.poutput(table.generate_header())
42164216

42174217
# Build the table and populate self.last_result
4218-
self.last_result = {} # Dict[settable_name, settable_value]
4218+
self.last_result = {} # dict[settable_name, settable_value]
42194219

42204220
for param in sorted(to_show, key=self.default_sort_key):
42214221
settable = self.settables[param]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ select = [
202202
"PT", # flake8-pytest-style (warnings about unit test best practices)
203203
# "PTH", # flake8-use-pathlib (force use of pathlib instead of os.path)
204204
"PYI", # flake8-pyi (warnings related to type hint best practices)
205-
# "Q", # flake8-quotes (force double quotes)
205+
"Q", # flake8-quotes (force double quotes)
206206
# "RET", # flake8-return (various warnings related to implicit vs explicit return statements)
207207
"RSE", # flake8-raise (warn about unnecessary parentheses on raised exceptions)
208208
# "RUF", # Ruff-specific rules (miscellaneous grab bag of lint checks specific to Ruff)

0 commit comments

Comments
 (0)