Resolve a few pylint warnings

This commit is contained in:
I-Al-Istannen 2020-12-30 14:45:46 +01:00
parent 2714ac6be6
commit c978e9edf4
4 changed files with 8 additions and 8 deletions

View File

@ -14,7 +14,7 @@ PRETTY = PrettyLogger(LOGGER)
try: try:
import keyring import keyring
except ImportError: except ImportError:
PRETTY.warning("Keyring module not found, KeyringAuthenticator won't work!") pass
class TfaAuthenticator: class TfaAuthenticator:

View File

@ -282,9 +282,12 @@ class IliasCrawler:
continue continue
rest_of_name = meeting_name.removeprefix(date_portion_str) rest_of_name = meeting_name.removeprefix(date_portion_str)
new_name = datetime.datetime.strftime(date_portion, "%Y-%m-%d, %H:%M") + rest_of_name new_name = datetime.datetime.strftime(date_portion, "%Y-%m-%d, %H:%M") \
+ rest_of_name
new_path = Path(folder_path, _sanitize_path_name(new_name)) new_path = Path(folder_path, _sanitize_path_name(new_name))
result += [IliasCrawlerEntry(new_path, abs_url, IliasElementType.REGULAR_FOLDER, None)] result += [
IliasCrawlerEntry(new_path, abs_url, IliasElementType.REGULAR_FOLDER, None)
]
elif element_type is not None: elif element_type is not None:
result += [IliasCrawlerEntry(element_path, abs_url, element_type, None)] result += [IliasCrawlerEntry(element_path, abs_url, element_type, None)]
else: else:

View File

@ -3,13 +3,10 @@ Contains a few logger utility functions and implementations.
""" """
import logging import logging
from pathlib import Path from typing import Optional
from typing import List, Optional
from rich import print as rich_print
from rich._log_render import LogRender from rich._log_render import LogRender
from rich.console import Console from rich.console import Console
from rich.panel import Panel
from rich.style import Style from rich.style import Style
from rich.text import Text from rich.text import Text
from rich.theme import Theme from rich.theme import Theme

View File

@ -116,7 +116,7 @@ class Organizer(Location):
if self._is_marked(dst): if self._is_marked(dst):
PRETTY.warning(f"File {str(dst_absolute)!r} was already written!") PRETTY.warning(f"File {str(dst_absolute)!r} was already written!")
conflict = ConflictType.MARKED_FILE_OVERWRITTEN conflict = ConflictType.MARKED_FILE_OVERWRITTEN
if self._resolve_conflict(f"Overwrite file?", dst_absolute, conflict, default=False): if self._resolve_conflict("Overwrite file?", dst_absolute, conflict, default=False):
PRETTY.ignored_file(dst_absolute, "file was written previously") PRETTY.ignored_file(dst_absolute, "file was written previously")
return None return None