Page MenuHomePhabricator

run mypy on examples
ClosedPublic

Authored by alangenfeld on Dec 19 2019, 11:20 PM.

Details

Summary

Adds a builkite step that runs mypy (ignoring missing imports) on the examples directory. Includes some comments to get the mypy check passing.

Test Plan

the buildkite step passes

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alangenfeld created this revision.

black

alangenfeld added inline comments.Dec 19 2019, 11:25 PM
examples/dagster_examples/intro_tutorial/composite_solids.py
23

what happens without comment:
{P29}

# type: _DataFrame
{P30}

#type: list
{P31}

examples/dagster_examples/intro_tutorial/modes.py
51
Harbormaster failed remote builds in B6520: Diff 8058!
max accepted this revision.Dec 20 2019, 6:39 PM

This makes me want to add mypy annotations to the public API. I know it's cumbersome.

This revision is now accepted and ready to land.Dec 20 2019, 6:39 PM

This makes me want to add mypy annotations to the public API. I know it's cumbersome.

Using .pyi files is a path that I think is actually reasonable. You can see it in action on projects like pytorch

This revision was automatically updated to reflect the committed changes.