Configures ruff as the one stop linter and resolves warnings it raised

This commit is contained in:
Trenton H
2023-03-28 09:39:30 -07:00
parent 5869467db3
commit ce41ac9158
110 changed files with 507 additions and 491 deletions

View File

@@ -159,7 +159,7 @@ def _consume_wait_unmodified(file: str) -> None:
new_size = stat_data.st_size
except FileNotFoundError:
logger.debug(
f"File {file} moved while waiting for it to remain " f"unmodified.",
f"File {file} moved while waiting for it to remain unmodified.",
)
return
if new_mtime == mtime and new_size == size:
@@ -293,10 +293,7 @@ class Command(BaseCommand):
while not finished:
try:
for event in inotify.read(timeout=timeout):
if recursive:
path = inotify.get_path(event.wd)
else:
path = directory
path = inotify.get_path(event.wd) if recursive else directory
filepath = os.path.join(path, event.name)
notified_files[filepath] = monotonic()