osbuild: fix optional-types
Optional types were provided in places but were not always correct. Add mypy checking and fix those that fail(ed).
This commit is contained in:
parent
6e66c69608
commit
3fd864e5a9
29 changed files with 209 additions and 111 deletions
|
|
@ -1,10 +1,7 @@
|
|||
"""Path handling utility functions"""
|
||||
import os.path
|
||||
import os
|
||||
|
||||
from .types import PathLike
|
||||
|
||||
|
||||
def in_tree(path: PathLike, tree: PathLike, must_exist=False) -> bool:
|
||||
def in_tree(path: str, tree: str, must_exist: bool = False) -> bool:
|
||||
"""Return whether the canonical location of 'path' is under 'tree'.
|
||||
If 'must_exist' is True, the file must also exist for the check to succeed.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue