Skip to content

Commit 621334e

Browse files
committed
style: improve or temprorarily ignore mypy warnings
1 parent 3488a6b commit 621334e

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

dags/airflow-log-cleanup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
schedule_interval=SCHEDULE_INTERVAL,
8686
start_date=START_DATE,
8787
tags=["teamclairvoyant", "airflow-maintenance-dags"],
88-
template_undefined=jinja2.Undefined,
88+
# TODO: the whole dag will be re-written at a later point. ignore the type for now
89+
template_undefined=jinja2.Undefined, # type: ignore[arg-type]
8990
)
9091
if hasattr(dag, "doc_md"):
9192
dag.doc_md = __doc__

dags/app/discord.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111

1212

13-
@tenacity.retry(**RETRY_ARGS)
13+
@tenacity.retry(**RETRY_ARGS) # type: ignore[call-overload]
1414
def send_webhook_message(webhook_url: str, username: str, msg: str) -> None:
1515
session.post(
1616
webhook_url,

dags/app/team_registration_bot/udf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from datetime import datetime
33

44
from google.cloud import bigquery
5+
from google.cloud.bigquery.table import RowIterator
56

67
YEAR = datetime.now().year
78

@@ -10,7 +11,7 @@
1011
CLIENT = bigquery.Client(project=os.getenv("BIGQUERY_PROJECT"))
1112

1213

13-
def _get_statistics_from_bigquery() -> dict:
14+
def _get_statistics_from_bigquery() -> RowIterator:
1415
query_job = CLIENT.query(
1516
f"""
1617
WITH UNIQUE_RECORDS AS (

dags/ods/kktix_ticket_orders/udfs/bigquery_loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
FROM
1414
`{TABLE}`
1515
""" # nosec
16-
AIRFLOW_HOME = os.getenv("AIRFLOW_HOME")
16+
AIRFLOW_HOME = os.getenv("AIRFLOW_HOME", "")
1717

1818

1919
def create_table_if_needed() -> None:
20-
client = bigquery.Client(project=os.getenv("BIGQUERY_PROJECT"))
20+
client = bigquery.Client(project=os.getenv("BIGQUERY_PROJECT", ""))
2121
sql_filepath = (
2222
Path(AIRFLOW_HOME) / "dags/ods/kktix_ticket_orders/sqls/create_table.sql"
2323
)

0 commit comments

Comments
 (0)