core.warnings: handle stacklevel properly
add more warnings about deprecated config arguments
This commit is contained in:
parent
109edd9da3
commit
abbaa47aaf
4 changed files with 18 additions and 12 deletions
|
@ -43,8 +43,11 @@ class github(user_config):
|
|||
|
||||
from ..core.cfg import make_config, Attrs
|
||||
def migration(attrs: Attrs) -> Attrs:
|
||||
if 'export_dir' in attrs: # legacy name
|
||||
attrs['export_path'] = attrs['export_dir']
|
||||
export_dir = 'export_dir'
|
||||
if export_dir in attrs: # legacy name
|
||||
attrs['export_path'] = attrs[export_dir]
|
||||
from ..core.warnings import high
|
||||
high(f'"{export_dir}" is deprecated! Please use "export_path" instead."')
|
||||
return attrs
|
||||
config = make_config(github, migration=migration)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue