@@ -1111,7 +1111,7 @@ def remove_settable(self, name: str) -> None:
11111111 def build_settables (self ) -> None :
11121112 """Create the dictionary of user-settable parameters."""
11131113
1114- def get_allow_style_choices (cli_self : Cmd ) -> list [str ]:
1114+ def get_allow_style_choices (_cli_self : Cmd ) -> list [str ]:
11151115 """Used to tab complete allow_style values."""
11161116 return [val .name .lower () for val in ansi .AllowStyle ]
11171117
@@ -1419,9 +1419,9 @@ def tokens_for_completion(self, line: str, begidx: int, endidx: int) -> tuple[li
14191419 def basic_complete (
14201420 self ,
14211421 text : str ,
1422- line : str ,
1423- begidx : int ,
1424- endidx : int ,
1422+ line : str , # noqa: ARG002
1423+ begidx : int , # noqa: ARG002
1424+ endidx : int , # noqa: ARG002
14251425 match_against : Iterable [str ],
14261426 ) -> list [str ]:
14271427 """Basic tab completion function that matches against a list of strings without considering line contents
@@ -1602,7 +1602,13 @@ def index_based_complete(
16021602 return matches
16031603
16041604 def path_complete (
1605- self , text : str , line : str , begidx : int , endidx : int , * , path_filter : Optional [Callable [[str ], bool ]] = None
1605+ self ,
1606+ text : str ,
1607+ line : str ,
1608+ begidx : int , # noqa: ARG002
1609+ endidx : int ,
1610+ * ,
1611+ path_filter : Optional [Callable [[str ], bool ]] = None ,
16061612 ) -> list [str ]:
16071613 """Performs completion of local file system paths.
16081614
@@ -2346,7 +2352,7 @@ def get_help_topics(self) -> list[str]:
23462352 # Filter out hidden and disabled commands
23472353 return [topic for topic in all_topics if topic not in self .hidden_commands and topic not in self .disabled_commands ]
23482354
2349- def sigint_handler (self , signum : int , _ : Optional [FrameType ]) -> None :
2355+ def sigint_handler (self , signum : int , _ : Optional [FrameType ]) -> None : # noqa: ARG002
23502356 """Signal handler for SIGINTs which typically come from Ctrl-C events.
23512357
23522358 If you need custom SIGINT behavior, then override this method.
@@ -2402,7 +2408,7 @@ def precmd(self, statement: Union[Statement, str]) -> Statement:
24022408 """
24032409 return Statement (statement ) if not isinstance (statement , Statement ) else statement
24042410
2405- def postcmd (self , stop : bool , statement : Union [Statement , str ]) -> bool :
2411+ def postcmd (self , stop : bool , statement : Union [Statement , str ]) -> bool : # noqa: ARG002
24062412 """Hook method executed just after a command is executed by
24072413 [cmd2.Cmd.onecmd][].
24082414
@@ -3087,7 +3093,7 @@ def configure_readline() -> None:
30873093 # Disable completion
30883094 if completion_mode == utils .CompletionMode .NONE :
30893095
3090- def complete_none (text : str , state : int ) -> Optional [str ]: # pragma: no cover
3096+ def complete_none (text : str , state : int ) -> Optional [str ]: # pragma: no cover # noqa: ARG001
30913097 return None
30923098
30933099 complete_func = complete_none
@@ -3773,7 +3779,7 @@ def do_help(self, args: argparse.Namespace) -> None:
37733779 self .perror (err_msg , apply_style = False )
37743780 self .last_result = False
37753781
3776- def print_topics (self , header : str , cmds : Optional [list [str ]], cmdlen : int , maxcol : int ) -> None :
3782+ def print_topics (self , header : str , cmds : Optional [list [str ]], cmdlen : int , maxcol : int ) -> None : # noqa: ARG002
37773783 """Print groups of commands and topics in columns and an optional header
37783784 Override of cmd's print_topics() to handle headers with newlines, ANSI style sequences, and wide characters.
37793785
@@ -5379,7 +5385,7 @@ def disable_command(self, command: str, message_to_print: str) -> None:
53795385 setattr (self , help_func_name , new_func )
53805386
53815387 # Set the completer to a function that returns a blank list
5382- setattr (self , completer_func_name , lambda * args , ** kwargs : [])
5388+ setattr (self , completer_func_name , lambda * _args , ** _kwargs : [])
53835389
53845390 def disable_category (self , category : str , message_to_print : str ) -> None :
53855391 """Disable an entire category of commands.
0 commit comments