Skip to content

Commit 6713a7e

Browse files
style: bump mypy to a version supported by py 3.11 and make linting changes where required
1 parent d1c4aa1 commit 6713a7e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ black = "22.6.0"
7474
astroid = "2.14.2"
7575
isort = "5.11.5"
7676
pylint = "2.16.4"
77-
mypy = "0.982"
77+
mypy = "0.991"
7878
boto3-stubs = {extras = ["essential"], version = "1.26.72"}
7979
botocore-stubs = "1.29.72"
8080
pandas-stubs = "1.2.0.62"

src/dve/core_engine/backends/implementations/spark/rules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
class SparkStepImplementations(BaseStepImplementations[DataFrame]):
5555
"""An implementation of transformation steps in Apache Spark."""
5656

57-
def __init__(self, spark_session: SparkSession = None, **kwargs):
57+
def __init__(self, spark_session: Optional[SparkSession] = None, **kwargs):
5858
self._spark_session = spark_session
5959
self._registered_functions: list[str] = []
6060
super().__init__(**kwargs)
6161

6262
@property
63-
def spark_session(self):
63+
def spark_session(self) -> SparkSession:
6464
"""The current spark session"""
6565
if not self._spark_session:
6666
self._spark_session = SparkSession.builder.getOrCreate()

src/dve/core_engine/backends/metadata/reporting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def template(
108108
self,
109109
local_variables: TemplateVariables,
110110
*,
111-
global_variables: TemplateVariables = None,
111+
global_variables: Optional[TemplateVariables] = None,
112112
) -> "BaseReportingConfig":
113113
"""Template a reporting config."""
114114
type_ = type(self)
@@ -348,7 +348,7 @@ def template(
348348
self,
349349
local_variables: TemplateVariables,
350350
*,
351-
global_variables: TemplateVariables = None,
351+
global_variables: Optional[TemplateVariables] = None,
352352
) -> "ReportingConfig":
353353
"""Template the untemplated reporting config."""
354354
if global_variables:

src/dve/core_engine/backends/metadata/rules.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def template(
136136
self: ASSelf,
137137
local_variables: TemplateVariables,
138138
*,
139-
global_variables: TemplateVariables = None,
139+
global_variables: Optional[TemplateVariables] = None,
140140
) -> ASSelf:
141141
"""Template the rule, given the global and local variables."""
142142
type_ = type(self)
@@ -236,7 +236,7 @@ def template(
236236
self: "DeferredFilter",
237237
local_variables: dict[Alias, Any],
238238
*,
239-
global_variables: dict[Alias, Any] = None,
239+
global_variables: Optional[dict[Alias, Any]] = None,
240240
) -> "DeferredFilter":
241241
"""Template the rule, given the global and local variables."""
242242
type_ = type(self)
@@ -657,7 +657,7 @@ def template(
657657
self: RSelf,
658658
local_variables: TemplateVariables,
659659
*,
660-
global_variables: TemplateVariables = None,
660+
global_variables: Optional[TemplateVariables] = None,
661661
) -> RSelf:
662662
"""Template the rule, returning the new templated rule. This is only really useful
663663
for 'upfront' templating, as all stages of the rule will be templated at once.

0 commit comments

Comments
 (0)