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
|
@ -30,7 +30,7 @@ class DeviceChroot(BuildChroot):
|
|||
|
||||
clss.create_rootfs(self, reset, pacman_conf_target, active_previously)
|
||||
|
||||
def mount_rootfs(self, source_path: str, fs_type: str = None, options: list[str] = [], allow_overlay: bool = False):
|
||||
def mount_rootfs(self, source_path: str, fs_type: Optional[str] = None, options: list[str] = [], allow_overlay: bool = False):
|
||||
if self.active:
|
||||
raise Exception(f'{self.name}: Chroot is marked as active, not mounting a rootfs over it.')
|
||||
if not os.path.exists(source_path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue