File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 46
46
pip install -r requirements-dev.txt
47
47
48
48
# 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
Original file line number Diff line number Diff line change 4
4
from awsglue .context import GlueContext
5
5
from awsglue .transforms import * # noqa: F403
6
6
from awsglue .utils import getResolvedOptions
7
+
8
+ # this requires PySpark<4
7
9
from pyspark .context import SparkContext
8
10
9
11
# @params: [JOB_NAME]
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def _scan_ds(table_name: str) -> pl.LazyFrame:
97
97
print (f"run q{ i } " )
98
98
start_time = time .time ()
99
99
try :
100
- print (q .remote (ctx ).distributed ().show ()) # type: ignore[attr-defined]
100
+ print (q .remote (ctx ).distributed ().show ())
101
101
execution_time = time .time () - start_time
102
102
print (f"q{ i } executed in: { execution_time :.2f} seconds" )
103
103
timings .append (execution_time )
You can’t perform that action at this time.
0 commit comments