Skip to content

Commit e6b3854

Browse files
committed
Fix lint errors
1 parent 79cac45 commit e6b3854

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,12 @@ jobs:
4646
pip install -r requirements-dev.txt
4747
4848
# Allow untyped calls for older Python versions
49-
- name: Run mypy
50-
run: mypy
49+
# Code in scripts/aws_glue.py requires PySpark<4
50+
- name: Run mypy (PySpark from requirements.txt)
51+
run: |
52+
mypy --exclude scripts/aws_glue.py
53+
54+
- name: Run mypy (PySpark<4)
55+
run: |
56+
pip install "pyspark<4"
57+
mypy

scripts/aws_glue.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from awsglue.context import GlueContext
55
from awsglue.transforms import * # noqa: F403
66
from awsglue.utils import getResolvedOptions
7+
8+
# this requires PySpark<4
79
from pyspark.context import SparkContext
810

911
# @params: [JOB_NAME]

scripts/pl_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _scan_ds(table_name: str) -> pl.LazyFrame:
9797
print(f"run q{i}")
9898
start_time = time.time()
9999
try:
100-
print(q.remote(ctx).distributed().show()) # type: ignore[attr-defined]
100+
print(q.remote(ctx).distributed().show())
101101
execution_time = time.time() - start_time
102102
print(f"q{i} executed in: {execution_time:.2f} seconds")
103103
timings.append(execution_time)

0 commit comments

Comments
 (0)