File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ select = [
1616 # eradicate commented code
1717 " ERA" ,
1818 # ruff lint
19- # "RUF",
19+ " RUF" ,
2020]
2121ignore = [
2222 # `format` will wrap lines.
Original file line number Diff line number Diff line change 11import logging
22import re
33import time
4+ import typing
45import uuid
56
67from django .utils .deprecation import MiddlewareMixin
@@ -14,7 +15,7 @@ class DockerflowMiddleware(MiddlewareMixin):
1415 https://github.com/mozilla-services/Dockerflow/blob/main/docs/mozlog.md
1516 """
1617
17- viewpatterns = [
18+ viewpatterns : typing . ClassVar = [
1819 (re .compile (r"/__version__/?$" ), views .version ),
1920 (re .compile (r"/__heartbeat__/?$" ), views .heartbeat ),
2021 (re .compile (r"/__lbheartbeat__/?$" ), views .lbheartbeat ),
Original file line number Diff line number Diff line change 88import socket
99import sys
1010import traceback
11+ import typing
1112
1213
1314class SafeJSONEncoder (json .JSONEncoder ):
@@ -32,7 +33,7 @@ class JsonLogFormatter(logging.Formatter):
3233 LOGGING_FORMAT_VERSION = "2.0"
3334
3435 # Map from Python logging to Syslog severity levels
35- SYSLOG_LEVEL_MAP = {
36+ SYSLOG_LEVEL_MAP : typing . ClassVar = {
3637 50 : 2 , # CRITICAL
3738 40 : 3 , # ERROR
3839 30 : 4 , # WARNING
@@ -43,7 +44,7 @@ class JsonLogFormatter(logging.Formatter):
4344 # Syslog level to use when/if python level isn't found in map
4445 DEFAULT_SYSLOG_LEVEL = 7
4546
46- EXCLUDED_LOGRECORD_ATTRS = set (
47+ EXCLUDED_LOGRECORD_ATTRS : typing . ClassVar = set (
4748 (
4849 "args" ,
4950 "asctime" ,
Original file line number Diff line number Diff line change 44from logging .config import fileConfig
55
66from alembic import context # no:qa
7- from flask import current_app # noqa
7+ from flask import current_app
88from sqlalchemy import engine_from_config , pool
99
1010# this is the Alembic Config object, which provides
You can’t perform that action at this time.
0 commit comments