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 43fad82c94
commit d2c02b9102
110 changed files with 507 additions and 491 deletions

View File

@@ -18,7 +18,7 @@ if __name__ == "__main__":
REDIS_URL: Final[str] = os.getenv("PAPERLESS_REDIS", "redis://localhost:6379")
print(f"Waiting for Redis...", flush=True)
print("Waiting for Redis...", flush=True)
attempt = 0
with Redis.from_url(url=REDIS_URL) as client:
@@ -37,8 +37,8 @@ if __name__ == "__main__":
attempt += 1
if attempt >= MAX_RETRY_COUNT:
print(f"Failed to connect to redis using environment variable PAPERLESS_REDIS.")
print("Failed to connect to redis using environment variable PAPERLESS_REDIS.")
sys.exit(os.EX_UNAVAILABLE)
else:
print(f"Connected to Redis broker.")
print("Connected to Redis broker.")
sys.exit(os.EX_OK)