acoustic-carpenter-78188
05/14/2023, 2:59 AMpy.typed
marker as per PEP 0561
Expected behavior
Usage of flytekit is checked against its types.
Additional context to reproduce
Given
from typing import Dict, List, NamedTuple
from flytekit import task
class OpenFlightsData(NamedTuple):
routes: List[Dict[str, str]]
airlines: Dict[str, str]
airports: Dict[str, Dict[str, str]]
@task()
def extract_reference_data() -> OpenFlightsData:
return OpenFlightsData(
routes=[{"MAO": "CIZ"}], airlines={"0B": "Blue Air"}, airports={"AAA": {"lat": "1", "lon": "2"}}
)
Then when running mypy 1.3.0:
❯ mypy aircraft/test.py
aircraft/test.py:3: error: Skipping analyzing "flytekit": module is installed, but missing library stubs or py.typed marker [import]
aircraft/test.py:3: note: See <https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports>
Found 1 error in 1 file (checked 1 source file)
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyte