implement explicit Optional type hints for =None parameters
Thanks https://github.com/hauntsaninja/no_implicit_optional
This commit is contained in:
parent
669c82a10b
commit
82a87e7ea9
15 changed files with 34 additions and 27 deletions
|
@ -61,7 +61,7 @@ def make_abs_path(path: str) -> str:
|
|||
return '/' + path.lstrip('/')
|
||||
|
||||
|
||||
def get_chroot_path(chroot_name, override_basepath: str = None) -> str:
|
||||
def get_chroot_path(chroot_name, override_basepath: Optional[str] = None) -> str:
|
||||
base_path = config.get_path('chroots') if not override_basepath else override_basepath
|
||||
return os.path.join(base_path, chroot_name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue