@@ -179,7 +179,7 @@ def get_command( # type: ignore[overload-overlap]
179
179
stderr : t .Optional [t .IO [str ]] = None ,
180
180
no_color : bool = False ,
181
181
force_color : bool = False ,
182
- ** kwargs ,
182
+ ** kwargs : t . Any ,
183
183
) -> BaseCommand : ...
184
184
185
185
@@ -192,7 +192,7 @@ def get_command(
192
192
stderr : t .Optional [t .IO [str ]] = None ,
193
193
no_color : bool = False ,
194
194
force_color : bool = False ,
195
- ** kwargs ,
195
+ ** kwargs : t . Any ,
196
196
) -> C : ...
197
197
198
198
@@ -205,7 +205,7 @@ def get_command(
205
205
stderr : t .Optional [t .IO [str ]] = None ,
206
206
no_color : bool = False ,
207
207
force_color : bool = False ,
208
- ** kwargs ,
208
+ ** kwargs : t . Any ,
209
209
) -> MethodType : ...
210
210
211
211
@@ -216,7 +216,7 @@ def get_command(
216
216
stderr = None ,
217
217
no_color : bool = False ,
218
218
force_color : bool = False ,
219
- ** kwargs ,
219
+ ** kwargs : t . Any ,
220
220
):
221
221
"""
222
222
Get a Django_ command by its name and instantiate it with the provided options. This
@@ -335,13 +335,13 @@ def _get_common_params() -> t.Sequence[t.Union[click.Argument, click.Option]]:
335
335
}
336
336
337
337
338
- class _ParsedArgs (SimpleNamespace ): # pylint: disable=too-few-public-methods
338
+ class _ParsedArgs (SimpleNamespace ):
339
339
"""
340
340
Emulate the argparse.Namespace class so that we can pass the parsed arguments
341
341
into the BaseCommand infrastructure in the way it expects.
342
342
"""
343
343
344
- def __init__ (self , args : t .Sequence [t .Any ], ** kwargs ):
344
+ def __init__ (self , args : t .Sequence [t .Any ], ** kwargs : t . Any ):
345
345
super ().__init__ (** kwargs )
346
346
self .args = args
347
347
self .traceback = kwargs .get ("traceback" , TyperCommand ._traceback )
@@ -393,11 +393,11 @@ def supplied_params(self) -> t.Dict[str, t.Any]:
393
393
394
394
def __init__ (
395
395
self ,
396
- command : click .Command , # pylint: disable=redefined-outer-name
396
+ command : click .Command ,
397
397
parent : t .Optional ["Context" ] = None ,
398
398
django_command : t .Optional ["TyperCommand" ] = None ,
399
399
supplied_params : t .Optional [t .Dict [str , t .Any ]] = None ,
400
- ** kwargs ,
400
+ ** kwargs : t . Any ,
401
401
):
402
402
super ().__init__ (command , parent = parent , ** kwargs )
403
403
if supplied_params :
@@ -518,7 +518,7 @@ def __init__(
518
518
* args ,
519
519
callback : t .Optional [t .Callable [..., t .Any ]],
520
520
params : t .Optional [t .List [click .Parameter ]] = None ,
521
- ** kwargs ,
521
+ ** kwargs : t . Any ,
522
522
):
523
523
params = params or []
524
524
self ._callback = callback
@@ -655,7 +655,7 @@ def _cache_initializer(
655
655
name : t .Optional [str ] = Default (None ),
656
656
help : t .Optional [t .Union [str , Promise ]] = Default (None ),
657
657
cls : t .Type [DTGroup ] = DTGroup ,
658
- ** kwargs ,
658
+ ** kwargs : t . Any ,
659
659
):
660
660
def register (
661
661
cmd : "TyperCommand" ,
@@ -683,7 +683,7 @@ def _cache_command(
683
683
name : t .Optional [str ] = None ,
684
684
help : t .Optional [t .Union [str , Promise ]] = None ,
685
685
cls : t .Type [DTCommand ] = DTCommand ,
686
- ** kwargs ,
686
+ ** kwargs : t . Any ,
687
687
):
688
688
def register (
689
689
cmd : "TyperCommand" ,
@@ -737,7 +737,7 @@ class AppFactory(type):
737
737
the Typer-like functional interface is used.
738
738
"""
739
739
740
- def __call__ (self , * args , ** kwargs ) -> "Typer" :
740
+ def __call__ (self , * args , ** kwargs : t . Any ) -> "Typer" :
741
741
if called_from_module ():
742
742
frame = inspect .currentframe ()
743
743
cmd_module = inspect .getmodule (frame .f_back ) if frame else None
@@ -901,7 +901,7 @@ def __init__(
901
901
pretty_exceptions_short : bool = True ,
902
902
parent : t .Optional ["Typer" ] = None ,
903
903
django_command : t .Optional [t .Type ["TyperCommand" ]] = None ,
904
- ** kwargs ,
904
+ ** kwargs : t . Any ,
905
905
):
906
906
assert not args # should have been removed by metaclass
907
907
self .parent = parent
@@ -974,7 +974,7 @@ def callback( # type: ignore
974
974
deprecated : bool = Default (False ),
975
975
# Rich settings
976
976
rich_help_panel : t .Union [str , None ] = Default (None ),
977
- ** kwargs ,
977
+ ** kwargs : t . Any ,
978
978
) -> t .Callable [
979
979
[typer .models .CommandFunctionType ], typer .models .CommandFunctionType
980
980
]:
@@ -1032,7 +1032,7 @@ def command( # type: ignore
1032
1032
deprecated : bool = False ,
1033
1033
# Rich settings
1034
1034
rich_help_panel : t .Union [str , None ] = Default (None ),
1035
- ** kwargs ,
1035
+ ** kwargs : t . Any ,
1036
1036
) -> t .Callable [[t .Callable [P2 , R2 ]], t .Callable [P2 , R2 ]]:
1037
1037
"""
1038
1038
A function decorator that creates a new command and attaches it to this group.
@@ -1082,9 +1082,7 @@ def command1(self):
1082
1082
1083
1083
def make_command (func : t .Callable [P2 , R2 ]) -> t .Callable [P2 , R2 ]:
1084
1084
return _check_static (
1085
- super ( # pylint: disable=super-with-arguments
1086
- Typer , self
1087
- ).command (
1085
+ super (Typer , self ).command (
1088
1086
name = name ,
1089
1087
cls = type (
1090
1088
"_Command" , (cls ,), {"django_command" : self .django_command }
@@ -1128,7 +1126,7 @@ def add_typer( # type: ignore
1128
1126
deprecated : bool = Default (False ),
1129
1127
# Rich settings
1130
1128
rich_help_panel : t .Union [str , None ] = Default (None ),
1131
- ** kwargs ,
1129
+ ** kwargs : t . Any ,
1132
1130
) -> None :
1133
1131
typer_instance .parent = self
1134
1132
typer_instance .django_command = self .django_command
@@ -1166,7 +1164,7 @@ def group(
1166
1164
result_callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
1167
1165
# Command
1168
1166
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = Default (None ),
1169
- help : t .Optional [t .Union [str , Promise ]] = Default (None ), # pylint: disable=redefined-builtin
1167
+ help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1170
1168
epilog : t .Optional [str ] = Default (None ),
1171
1169
short_help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1172
1170
options_metavar : str = Default ("[OPTIONS]" ),
@@ -1175,7 +1173,7 @@ def group(
1175
1173
deprecated : bool = Default (False ),
1176
1174
# Rich settings
1177
1175
rich_help_panel : t .Union [str , None ] = Default (None ),
1178
- ** kwargs ,
1176
+ ** kwargs : t . Any ,
1179
1177
) -> t .Callable [[t .Callable [P2 , R2 ]], "Typer[P2, R2]" ]:
1180
1178
"""
1181
1179
Create a new subgroup and attach it to this group. This is like creating a new
@@ -1304,7 +1302,7 @@ def initialize(
1304
1302
result_callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
1305
1303
# Command
1306
1304
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = Default (None ),
1307
- help : t .Optional [t .Union [str , Promise ]] = Default (None ), # pylint: disable=redefined-builtin
1305
+ help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1308
1306
epilog : t .Optional [str ] = Default (None ),
1309
1307
short_help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1310
1308
options_metavar : str = Default ("[OPTIONS]" ),
@@ -1313,7 +1311,7 @@ def initialize(
1313
1311
deprecated : bool = Default (False ),
1314
1312
# Rich settings
1315
1313
rich_help_panel : t .Union [str , None ] = Default (None ),
1316
- ** kwargs ,
1314
+ ** kwargs : t . Any ,
1317
1315
) -> t .Callable [[t .Callable [P2 , R2 ]], t .Callable [P2 , R2 ]]:
1318
1316
"""
1319
1317
A function decorator that creates a Typer_
@@ -1438,12 +1436,12 @@ def make_initializer(func: t.Callable[P2, R2]) -> t.Callable[P2, R2]:
1438
1436
callback = initialize # allow callback as an alias
1439
1437
1440
1438
1441
- def command ( # pylint: disable=keyword-arg-before-vararg
1439
+ def command (
1442
1440
name : t .Optional [str ] = None ,
1443
1441
* ,
1444
1442
cls : t .Type [DTCommand ] = DTCommand ,
1445
1443
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = None ,
1446
- help : t .Optional [t .Union [str , Promise ]] = None , # pylint: disable=redefined-builtin
1444
+ help : t .Optional [t .Union [str , Promise ]] = None ,
1447
1445
epilog : t .Optional [str ] = None ,
1448
1446
short_help : t .Optional [t .Union [str , Promise ]] = None ,
1449
1447
options_metavar : str = "[OPTIONS]" ,
@@ -1453,7 +1451,7 @@ def command( # pylint: disable=keyword-arg-before-vararg
1453
1451
deprecated : bool = False ,
1454
1452
# Rich settings
1455
1453
rich_help_panel : t .Union [str , None ] = Default (None ),
1456
- ** kwargs ,
1454
+ ** kwargs : t . Any ,
1457
1455
) -> t .Callable [[t .Callable [P , R ]], t .Callable [P , R ]]:
1458
1456
"""
1459
1457
A function decorator that creates a new command and attaches it to the root
@@ -1545,7 +1543,7 @@ def group(
1545
1543
result_callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
1546
1544
# Command
1547
1545
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = Default (None ),
1548
- help : t .Optional [t .Union [str , Promise ]] = Default (None ), # pylint: disable=redefined-builtin
1546
+ help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1549
1547
epilog : t .Optional [str ] = Default (None ),
1550
1548
short_help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1551
1549
options_metavar : str = Default ("[OPTIONS]" ),
@@ -1554,7 +1552,7 @@ def group(
1554
1552
deprecated : bool = Default (False ),
1555
1553
# Rich settings
1556
1554
rich_help_panel : t .Union [str , None ] = Default (None ),
1557
- ** kwargs ,
1555
+ ** kwargs : t . Any ,
1558
1556
) -> t .Callable [[t .Callable [P , R ]], Typer [P , R ]]:
1559
1557
"""
1560
1558
A function decorator that creates a new subgroup and attaches it to the root
@@ -1869,7 +1867,7 @@ def __new__(
1869
1867
result_callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
1870
1868
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = Default (None ),
1871
1869
callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
1872
- help : t .Optional [t .Union [str , Promise ]] = Default (None ), # pylint: disable=redefined-builtin
1870
+ help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1873
1871
epilog : t .Optional [str ] = Default (None ),
1874
1872
short_help : t .Optional [t .Union [str , Promise ]] = Default (None ),
1875
1873
options_metavar : str = Default ("[OPTIONS]" ),
@@ -1883,7 +1881,7 @@ def __new__(
1883
1881
True
1884
1882
),
1885
1883
pretty_exceptions_short : t .Union [DefaultPlaceholder , bool ] = Default (True ),
1886
- ** kwargs ,
1884
+ ** kwargs : t . Any ,
1887
1885
):
1888
1886
"""
1889
1887
This method is called when a new class is created.
@@ -2489,7 +2487,7 @@ def initialize(
2489
2487
result_callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
2490
2488
# Command
2491
2489
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = Default (None ),
2492
- help : t .Optional [t .Union [str , Promise ]] = Default (None ), # pylint: disable=redefined-builtin
2490
+ help : t .Optional [t .Union [str , Promise ]] = Default (None ),
2493
2491
epilog : t .Optional [str ] = Default (None ),
2494
2492
short_help : t .Optional [t .Union [str , Promise ]] = Default (None ),
2495
2493
options_metavar : str = Default ("[OPTIONS]" ),
@@ -2498,7 +2496,7 @@ def initialize(
2498
2496
deprecated : bool = Default (False ),
2499
2497
# Rich settings
2500
2498
rich_help_panel : t .Union [str , None ] = Default (None ),
2501
- ** kwargs ,
2499
+ ** kwargs : t . Any ,
2502
2500
) -> t .Callable [[t .Callable [P , R ]], t .Callable [P , R ]]:
2503
2501
"""
2504
2502
Override the initializer for this command class after it has been defined.
@@ -2598,7 +2596,7 @@ def command(
2598
2596
* ,
2599
2597
cls : t .Type [DTCommand ] = DTCommand ,
2600
2598
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = None ,
2601
- help : t .Optional [t .Union [str , Promise ]] = None , # pylint: disable=redefined-builtin
2599
+ help : t .Optional [t .Union [str , Promise ]] = None ,
2602
2600
epilog : t .Optional [str ] = None ,
2603
2601
short_help : t .Optional [t .Union [str , Promise ]] = None ,
2604
2602
options_metavar : str = "[OPTIONS]" ,
@@ -2608,7 +2606,7 @@ def command(
2608
2606
deprecated : bool = False ,
2609
2607
# Rich settings
2610
2608
rich_help_panel : t .Union [str , None ] = Default (None ),
2611
- ** kwargs ,
2609
+ ** kwargs : t . Any ,
2612
2610
) -> t .Callable [[t .Callable [P , R ]], t .Callable [P , R ]]:
2613
2611
"""
2614
2612
Add a command to this command class after it has been defined. You can
@@ -2697,7 +2695,7 @@ def group(
2697
2695
result_callback : t .Optional [t .Callable [..., t .Any ]] = Default (None ),
2698
2696
# Command
2699
2697
context_settings : t .Optional [t .Dict [t .Any , t .Any ]] = Default (None ),
2700
- help : t .Optional [t .Union [str , Promise ]] = Default (None ), # pylint: disable=redefined-builtin
2698
+ help : t .Optional [t .Union [str , Promise ]] = Default (None ),
2701
2699
epilog : t .Optional [str ] = Default (None ),
2702
2700
short_help : t .Optional [t .Union [str , Promise ]] = Default (None ),
2703
2701
options_metavar : str = Default ("[OPTIONS]" ),
@@ -2706,7 +2704,7 @@ def group(
2706
2704
deprecated : bool = Default (False ),
2707
2705
# Rich settings
2708
2706
rich_help_panel : t .Union [str , None ] = Default (None ),
2709
- ** kwargs ,
2707
+ ** kwargs : t . Any ,
2710
2708
) -> t .Callable [[t .Callable [P , R ]], Typer [P , R ]]:
2711
2709
"""
2712
2710
Add a group to this command class after it has been defined. You can
@@ -2853,7 +2851,7 @@ def __init__(
2853
2851
stderr : t .Optional [t .TextIO ] = None ,
2854
2852
no_color : bool = no_color ,
2855
2853
force_color : bool = force_color ,
2856
- ** kwargs ,
2854
+ ** kwargs : t . Any ,
2857
2855
):
2858
2856
assert self .typer_app .info .name
2859
2857
_load_command_plugins (self .typer_app .info .name )
0 commit comments