typing: minimal changes to make a no-op mypy run pass
a few notes on these mypy adaptations, probably the most complicated thus far for an almost no-op run:
-
some lines got overlong, most notably due to the Union[AbstractAttribute, ...] cases. They will get much nicer looking with Python 3.7, as we will then be able to anticipate the type annotation and get rid of "type: ". The line breaks will also be nicer
-
the default_min_bound attribute is really used in a type-inconsistent way, sometime it's a string, sometime a datetime, sometime an integer, etc. That calls for a better interface/abstraction, but I wanted to be minimal here, so I just typed it Any for now
Test Plan
tox -e mypy
Migrated from D2123 (view on Phabricator)