From 0f481a4803fd1a81efabfa9bee7e9d7656500160 Mon Sep 17 00:00:00 2001 From: Jason Lubken Date: Wed, 9 Nov 2022 09:20:19 -0500 Subject: [PATCH] No implicit Optional for mypy type checking --- src/dsdk/mssql.py | 2 +- src/dsdk/persistor.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dsdk/mssql.py b/src/dsdk/mssql.py index 4d267c8..8f45c3e 100644 --- a/src/dsdk/mssql.py +++ b/src/dsdk/mssql.py @@ -111,7 +111,7 @@ def yaml_types(cls) -> None: Persistor.as_yaml_type() super().yaml_types() - def __init__(self, *, mssql: Persistor = None, **kwargs): + def __init__(self, *, mssql: Persistor | None = None, **kwargs): """__init__.""" self.mssql = mssql super().__init__(**kwargs) diff --git a/src/dsdk/persistor.py b/src/dsdk/persistor.py index deb0629..a318a15 100644 --- a/src/dsdk/persistor.py +++ b/src/dsdk/persistor.py @@ -48,7 +48,7 @@ def query( cur, query: str, *, - keys: dict[str, Sequence[Any]] = None, + keys: dict[str, Sequence[Any]] | None = None, parameters: dict[str, Any] | None = None, ) -> None: """Query by key sequences and parameters. @@ -74,7 +74,7 @@ def df_from_query( query: str, *, cache: str | None = None, - keys: dict[str, Sequence[Any]] = None, + keys: dict[str, Sequence[Any]] | None = None, parameters: dict[str, Any] | None = None, ) -> DataFrame: """Return df from query by key sequences and parameters.