feat: indicate that we are a typed package#1421
feat: indicate that we are a typed package#1421nejch merged 1 commit intopython-gitlab:masterfrom JohnVillalovos:jlvillal/typed_gitlab
Conversation
By adding the file: py.typed it indicates that python-gitlab is a typed package and contains type-hints. https://www.python.org/dev/peps/pep-0561/
Codecov Report
@@ Coverage Diff @@
## master #1421 +/- ##
=======================================
Coverage 80.24% 80.24%
=======================================
Files 73 73
Lines 4064 4064
=======================================
Hits 3261 3261
Misses 803 803
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
nejch
left a comment
There was a problem hiding this comment.
question: does this mean we should probably do in .mypy.ini:
[mypy]
files = gitlab/**/*.pySo that we check this recursively with mypy as py.typed applies recursively, just in case.
Currently, this fails because of unit tests, but I've long thought we should unit and functional tests together, outside the source dir. (e.g. tools/functional -> tests/functional, gitlab/tests -> tests/unit)
I would like to wait on saying we mypy check everything. As I don't think we are ready. This PR in my mind is just saying we do have type-hints so someone can use them. Also Do we have type-hints for everything? No, but progress is being made and the type-hints we have are useful already and can be used by users of this library to help type-hint their code. |
|
Ok makes sense :) Thanks! |
By adding the file: py.typed
it indicates that python-gitlab is a typed package and contains
type-hints.
https://www.python.org/dev/peps/pep-0561/