@@ -44,7 +44,7 @@ def get_canonical_key(key: str) -> Optional[str]:
4444 else stripped_key if hasattr (controls , stripped_key ) \
4545 else None
4646
47- def is_neg_key (key : str ) -> bool :
47+ def is_neg_key (key : str ) -> bool :
4848 return bool (re .match (r'^(?:no|disable|exclude)_' , string .removeprefix (key , 'legacy_' )))
4949
5050def load (cli : sn ) -> None :
@@ -65,7 +65,7 @@ def load(cli: sn) -> None:
6565 f'{ cli .msgs .err_INVALID_KEY } { config_key !r} { cli .msgs .err_FOUND_IN } '
6666 f'\n { log .colors .gry } { cli .config_filepath } ' ,
6767 cmd = 'init' )
68- for config_key , config_val in config_data .items ():
68+ for config_key , config_val in config_data .items ():
6969 canonical_key = get_canonical_key (config_key )
7070 if canonical_key and config_key != canonical_key : # re-map config_key -> canonical_key
7171 log .warn_legacy_option (cli , config_key , source = 'config' )
@@ -84,7 +84,7 @@ def load(cli: sn) -> None:
8484 for ctrl_key , ctrl in vars (controls ).items (): # add args to argp
8585 kwargs = ctrl .__dict__ .copy ()
8686 args = kwargs .pop ('args' )
87- argparse_kwargs = { key :val for key ,val in kwargs .items () if key in valid_argparse_kwargs }
87+ argparse_kwargs = { key :val for key ,val in kwargs .items () if key in valid_argparse_kwargs }
8888 if ctrl_key .startswith ('legacy_' ): # copy canonical attrs first
8989 canonical_key = get_canonical_key (ctrl_key )
9090 if canonical_key : # adjust argparse_kwargs
0 commit comments