Skip to content

Commit

Permalink
fix: address remaining mypy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-20 committed Sep 4, 2024
1 parent 4771231 commit eb1943d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions requirements_dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Flake8-pyproject
black
mypy
types-requests
types-urllib3
types-psycopg2
types-python-dateutil
lxml-stubs
2 changes: 2 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ types-python-dateutil==2.9.0.20240316
# via -r requirements_dev.in
types-requests==2.32.0.20240712
# via -r requirements_dev.in
types-urllib3==1.26.25.14
# via -r requirements_dev.in
typing-extensions==4.12.2
# via mypy
urllib3==2.2.2
Expand Down
2 changes: 1 addition & 1 deletion src/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def initialise_prom_metrics(operation: str):
container_conf_name = operation[:-4].upper()

initialise_prom_metrics_and_start_server(
config[container_conf_name]["PROM_METRIC_DEFS"], config[container_conf_name]["PROM_PORT"]
config[container_conf_name]["PROM_METRIC_DEFS"], config[container_conf_name]["PROM_PORT"] # type: ignore
)


Expand Down
2 changes: 1 addition & 1 deletion src/library/flatten.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from library.prometheus import set_prom_metric

logger = getLogger("flatten")
config_explode_elements = json.loads(config["SOLRIZE"]["EXPLODE_ELEMENTS"])
config_explode_elements = json.loads(config["SOLRIZE"]["EXPLODE_ELEMENTS"]) # type: ignore


class Flattener:
Expand Down
2 changes: 1 addition & 1 deletion src/library/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from constants.config import config

loggers = {}
loggers: dict[str, logging.Logger | None] = {}


def getLogger(name="unknown"):
Expand Down
2 changes: 1 addition & 1 deletion src/library/refresher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from azure.storage.blob import BlobServiceClient
from psycopg2 import Error as DbError
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from urllib3.util.retry import Retry

import library.db as db
from constants.config import config
Expand Down
2 changes: 1 addition & 1 deletion src/library/solrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

logger = getLogger("solrize")
solr_cores = {}
explode_elements = json.loads(config["SOLRIZE"]["EXPLODE_ELEMENTS"])
explode_elements = json.loads(config["SOLRIZE"]["EXPLODE_ELEMENTS"]) # type: ignore


def parse_status_code(error_str):
Expand Down

0 comments on commit eb1943d

Please sign in to comment.