luigi.mypy
Plugin that provides support for luigi.Task
This Code reuses the code from mypy.plugins.dataclasses https://github.com/python/mypy/blob/0753e2a82dad35034e000609b6e8daa37238bfaa/mypy/plugins/dataclasses.py
Functions
|
Classes
|
|
|
|
|
Implement the behavior of gokart.Task. |
- class luigi.mypy.TaskPlugin(*args: Any, **kwargs: Any)[source]
- class luigi.mypy.TaskAttribute(name: str, has_default: bool, line: int, column: int, type: Type | None, info: TypeInfo, api: SemanticAnalyzerPluginInterface)[source]
- to_argument(current_info: mypy.nodes.TypeInfo, *, of: Literal['__init__']) mypy.nodes.Argument[source]
- classmethod deserialize(info: mypy.nodes.TypeInfo, data: mypy.nodes.JsonDict, api: mypy.plugin.SemanticAnalyzerPluginInterface) TaskAttribute[source]
- class luigi.mypy.TaskTransformer(cls: ClassDef, reason: Expression | Statement, api: SemanticAnalyzerPluginInterface, task_plugin: TaskPlugin)[source]
Implement the behavior of gokart.Task.
- collect_attributes() List[TaskAttribute] | None[source]
Collect all attributes declared in the task and its parents.
All assignments of the form
a: SomeType b: SomeOtherType = …
are collected.
Return None if some base class hasn’t been processed yet and thus we’ll need to ask for another pass.