Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion airflow/decorators/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, TypeVar, Union, overload

from mypy_extensions import KwArg

from airflow.decorators.base import TaskDecorator
from airflow.decorators.python import python_task
from airflow.decorators.python_virtualenv import virtualenv_task
Expand Down Expand Up @@ -226,4 +228,5 @@ class TaskDecoratorCollection:
"""
# [END decorator_signature]

task: TaskDecoratorCollection
DecoratedTaskType = Callable[[Function], TaskDecoratorCollection]
task: Union[DecoratedTaskType, Callable[[..., KwArg()], DecoratedTaskType]]
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from airflow.providers.influxdb.hooks.influxdb import InfluxDBHook


@task(task_id="influxdb_task")
@task(task_id="influxdb_task") # type: ignore
def test_influxdb_hook():
bucket_name = 'test-influx'
influxdb_hook = InfluxDBHook()
Expand Down