This is an automated email from the ASF dual-hosted git repository.

jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 265484dcc4 Deduplicate type hints (#27508)
265484dcc4 is described below

commit 265484dcc444f3f6400b89c5bc873f46104c2900
Author: Bas Harenslak <[email protected]>
AuthorDate: Fri Nov 4 17:39:15 2022 +0100

    Deduplicate type hints (#27508)
---
 airflow/configuration.py        | 2 +-
 airflow/decorators/__init__.pyi | 2 +-
 airflow/models/dag.py           | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/airflow/configuration.py b/airflow/configuration.py
index ec3826fa64..cb2deeffd7 100644
--- a/airflow/configuration.py
+++ b/airflow/configuration.py
@@ -81,7 +81,7 @@ def expand_env_var(env_var: str) -> str:
     ...
 
 
-def expand_env_var(env_var: str | None) -> str | None | None:
+def expand_env_var(env_var: str | None) -> str | None:
     """
     Expands (potentially nested) env vars by repeatedly applying
     `expandvars` and `expanduser` until interpolation stops having
diff --git a/airflow/decorators/__init__.pyi b/airflow/decorators/__init__.pyi
index 9c5549147a..fad075ca4f 100644
--- a/airflow/decorators/__init__.pyi
+++ b/airflow/decorators/__init__.pyi
@@ -228,7 +228,7 @@ class TaskDecoratorCollection:
         shm_size: int | None = None,
         tty: bool = False,
         privileged: bool = False,
-        cap_add: str | None | None = None,
+        cap_add: str | None = None,
         extra_hosts: dict[str, str] | None = None,
         **kwargs,
     ) -> TaskDecorator:
diff --git a/airflow/models/dag.py b/airflow/models/dag.py
index e7219c801d..94564d2aeb 100644
--- a/airflow/models/dag.py
+++ b/airflow/models/dag.py
@@ -1261,12 +1261,12 @@ class DAG(LoggingMixin):
         return self.get_concurrency_reached()
 
     @provide_session
-    def get_is_active(self, session=NEW_SESSION) -> None | None:
+    def get_is_active(self, session=NEW_SESSION) -> None:
         """Returns a boolean indicating whether this DAG is active"""
         return session.query(DagModel.is_active).filter(DagModel.dag_id == 
self.dag_id).scalar()
 
     @provide_session
-    def get_is_paused(self, session=NEW_SESSION) -> None | None:
+    def get_is_paused(self, session=NEW_SESSION) -> None:
         """Returns a boolean indicating whether this DAG is paused"""
         return session.query(DagModel.is_paused).filter(DagModel.dag_id == 
self.dag_id).scalar()
 

Reply via email to