-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/type annotations #904
Conversation
I have a fairly strong recommendation to re-think the testing code. Rather than trying to extract code from within a function to run Mypy on, I'd go the much simpler route of having a |
This installs correctly for me and is working as expected now (within the limits of what has been implemented). |
Move test code blocks to individual py files
Codecov Report
@@ Coverage Diff @@
## master #904 +/- ##
==========================================
+ Coverage 72.2% 72.99% +0.79%
==========================================
Files 51 51
Lines 6367 6474 +107
Branches 1277 1302 +25
==========================================
+ Hits 4597 4726 +129
+ Misses 1379 1349 -30
- Partials 391 399 +8
Continue to review full report at Codecov.
|
Playing around with this, we probably do need to have basic We can use the @overload decorator if there are multiple different valid signatures (as is the case for Enum) |
Alias _Any as Any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this is merged, please could you add a README
text file at the top level of the traits-stubs
directory that explains briefly what the code in this directory is doing and how to use it? We'll ultimately need more documentation than that, but a README would be enough for now.
A couple of other comments:
|
The naming of the package is important, see PEP 0561 |
Yes, tests need to be run by CI and run successfully as part of this PR. |
Thanks. So to have a proper package structure for the tests, we may need to move the tests outside the |
N.B. For the Python 3.5 CI failures, it's probably enough to just replace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates! Merging.
PR adds
Mypy Type annotations for the exposed traits api (in progress)
A (minimal) testing framework for the type annotations
Tests for the annotated types