-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add typestubs and fix linting
- Loading branch information
1 parent
5dc950f
commit 8784b5c
Showing
358 changed files
with
36,973 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
import os | ||
import sys | ||
from typing import TYPE_CHECKING | ||
|
||
from airflow import settings | ||
from airflow.models.dag import DAG | ||
from airflow.models.dataset import Dataset | ||
from airflow.models.xcom_arg import XComArg | ||
|
||
__version__ = ... | ||
if os.environ.get("_AIRFLOW_PATCH_GEVENT"): ... | ||
if sys.platform == "win32": ... | ||
__all__ = ["__version__", "DAG", "Dataset", "XComArg"] | ||
__path__ = ... | ||
if not os.environ.get("_AIRFLOW__AS_LIBRARY", None): ... | ||
__lazy_imports: dict[str, tuple[str, str, bool]] = ... | ||
if TYPE_CHECKING: ... | ||
|
||
def __getattr__(name: str): # -> bool | Any | ModuleType: | ||
... | ||
|
||
if not settings.LAZY_LOAD_PROVIDERS: | ||
manager = ... | ||
if not settings.LAZY_LOAD_PLUGINS: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from typing import Any | ||
|
||
HEALTHY = ... | ||
UNHEALTHY = ... | ||
|
||
def get_airflow_health() -> dict[str, Any]: | ||
"""Get the health for Airflow metadatabase, scheduler and triggerer.""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from airflow.utils.session import provide_session | ||
from sqlalchemy.orm import Session | ||
|
||
"""Delete DAGs APIs.""" | ||
if TYPE_CHECKING: ... | ||
log = ... | ||
|
||
@provide_session | ||
def delete_dag( | ||
dag_id: str, keep_records_in_log: bool = ..., session: Session = ... | ||
) -> int: | ||
""" | ||
Delete a DAG by a dag_id. | ||
:param dag_id: the dag_id of the DAG to delete | ||
:param keep_records_in_log: whether keep records of the given dag_id | ||
in the Log table in the backend database (for reasons like auditing). | ||
The default value is True. | ||
:param session: session used | ||
:return count of deleted dags | ||
""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from datetime import datetime | ||
from typing import TYPE_CHECKING | ||
|
||
from airflow.models import DagModel, DagRun | ||
|
||
"""Experimental APIs.""" | ||
if TYPE_CHECKING: ... | ||
|
||
def check_and_get_dag(dag_id: str, task_id: str | None = ...) -> DagModel: | ||
"""Check DAG existence and in case it is specified that Task exists.""" | ||
... | ||
|
||
def check_and_get_dagrun(dag: DagModel, execution_date: datetime) -> DagRun: | ||
"""Get DagRun object and check that it exists.""" | ||
... |
24 changes: 24 additions & 0 deletions
24
typings/airflow/api/common/experimental/get_task_instance.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
This type stub file was generated by pyright. | ||
""" | ||
|
||
from datetime import datetime | ||
from typing import TYPE_CHECKING | ||
|
||
from airflow.exceptions import RemovedInAirflow3Warning | ||
from airflow.models import TaskInstance | ||
from deprecated import deprecated | ||
|
||
"""Task instance APIs.""" | ||
if TYPE_CHECKING: ... | ||
|
||
@deprecated( | ||
version="2.2.4", | ||
reason="Use DagRun.get_task_instance instead", | ||
category=RemovedInAirflow3Warning, | ||
) | ||
def get_task_instance( | ||
dag_id: str, task_id: str, execution_date: datetime | ||
) -> TaskInstance: | ||
"""Return the task instance identified by the given dag_id, task_id and execution_date.""" | ||
... |
Oops, something went wrong.