Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: indicate that we are a typed package#1421

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intopython-gitlab:masterfromJohnVillalovos:jlvillal/typed_gitlab
Apr 28, 2021
Merged

feat: indicate that we are a typed package#1421

nejch merged 1 commit intopython-gitlab:masterfromJohnVillalovos:jlvillal/typed_gitlab
Apr 28, 2021

Conversation

@JohnVillalovos
Copy link
Member

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/

By adding the file: py.typedit indicates that python-gitlab is a typed package and containstype-hints.https://www.python.org/dev/peps/pep-0561/
@codecov-commenter
Copy link

Codecov Report

Merging#1421 (e4421ca) intomaster (a6b6cd4) willnot change coverage.
The diff coverage isn/a.

Impacted file tree graph

@@           Coverage Diff           @@##           master    #1421   +/-   ##=======================================  Coverage   80.24%   80.24%           =======================================  Files          73       73             Lines        4064     4064           =======================================  Hits         3261     3261             Misses        803      803
FlagCoverage Δ
unit80.24% <ø> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.


Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatea6b6cd4...e4421ca. Read thecomment docs.

Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

question: does this mean we should probably do in.mypy.ini:

[mypy]files = gitlab/**/*.py

So that we check this recursively with mypy aspy.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)

@JohnVillalovos
Copy link
MemberAuthor

JohnVillalovos commentedApr 28, 2021
edited
Loading

question: does this mean we should probably do in.mypy.ini:

[mypy]files = gitlab/**/*.py

So that we check this recursively with mypy aspy.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. Alsomypy will see that file and then not complain that there aren't type-hints. For example for a user of the library:

import gitlab      # With the PR mypy won't complain about no type-hints

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.

@nejch
Copy link
Member

Ok makes sense :) Thanks!

@nejchnejch merged commit98891eb intopython-gitlab:masterApr 28, 2021
@JohnVillalovosJohnVillalovos deleted the jlvillal/typed_gitlab branchApril 28, 2021 19:58
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nejchnejchnejch left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@JohnVillalovos@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp