Type annotations for base spec#2041
Conversation
martindurant
left a comment
There was a problem hiding this comment.
Some thoughts.
My biggest gripe is the extended overrides, mostly because of detail=True|False.
|
@martindurant Thanks for review! I think I should've started with type stubs then later maybe add inline types. type stubs will be cleaner to add than inline types. I will push type stubs this weekend. |
|
@martindurant I have added completely separate type stub file. I am planning to add more for known implementations once you review this |
|
Much happier with the annotations separate :). Now the main code is not affected, nor even import times. Do you have any thoughts on how best to keep the code and types in sync in the future? |
|
mypy has https://mypy.readthedocs.io/en/stable/stubtest.html#automatic-stub-testing-stubtest |
|
Can you please draft a non-required CI run with that, and text instructions for how to go about updating types in the future as the API changes? |
|
@martindurant Sorry for delays. I added "Run Stub Tests" step for running stub test it will raise error if failed and instructions to readme. |
Fixes #625