1
0
forked from Mirrors/itch-dl

Fix/disable all linter warnings

This commit is contained in:
Ryszard Knop
2025-04-03 19:03:55 +02:00
parent 7a833a8a5b
commit 5f5f61bffb
6 changed files with 10 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ def get_int_after_marker_in_json(text: str, marker: str, key: str) -> int | None
return int(found_ints[0])
def should_skip_item_by_glob(kind: Literal['File'] | Literal['URL'], item: str, glob: str):
def should_skip_item_by_glob(kind: Literal["File"] | Literal["URL"], item: str, glob: str) -> bool:
if glob and not fnmatch(item, glob):
logging.info("%s '%s' does not match the glob filter '%s', skipping", kind, item, glob)
return True
@@ -45,7 +45,7 @@ def should_skip_item_by_glob(kind: Literal['File'] | Literal['URL'], item: str,
return False
def should_skip_item_by_regex(kind: Literal['File'] | Literal['URL'], item: str, regex: str):
def should_skip_item_by_regex(kind: Literal["File"] | Literal["URL"], item: str, regex: str) -> bool:
if regex and not re.fullmatch(regex, item):
logging.info("%s '%s' does not match the regex filter '%s', skipping", kind, item, regex)
return True