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

Mypy types for autocomplete.py, args.py, config.py and curtsies.py#929

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
thomasballinger merged 10 commits intomainfrommypy-types
Oct 10, 2021

Conversation

@thomasballinger
Copy link
Member

@thomasballingerthomasballinger commentedOct 7, 2021
edited
Loading

mypy now checks the whole package... but only these 4 files have these pragmas which require functions to have type annotations:

# mypy: disallow_untyped_calls=True# mypy: disallow_untyped_defs=True

The way to run this locally is

python3.9 -m mypy

but you need to install some things first:

python3.9 -m pip install types-backports types-requests types-setuptools types-toml types-pygments numpy watchdog twisted

You may also need to upgrade curtsies if you haven't installed it fresh because I made the types a little more lenient.

python3.9 -m pip install --upgrade curtsies

Running mypy in CI on this one file.
@codecov-commenter
Copy link

codecov-commenter commentedOct 7, 2021
edited
Loading

Codecov Report

Merging#929 (3514a7d) intomain (d9305d7) willincrease coverage by0.02%.
The diff coverage is87.35%.

Impacted file tree graph

@@            Coverage Diff             @@##             main     #929      +/-   ##==========================================+ Coverage   68.02%   68.05%   +0.02%==========================================  Files          61       61                Lines        9199     9229      +30     ==========================================+ Hits         6258     6281      +23- Misses       2941     2948       +7
Impacted FilesCoverage Δ
bpython/config.py87.75% <ø> (ø)
bpython/test/test_crashers.py91.95% <0.00%> (ø)
bpython/urwid.py0.00% <ø> (ø)
bpython/test/test_inspection.py91.19% <50.00%> (ø)
bpython/cli.py15.13% <75.00%> (ø)
bpython/curtsiesfrontend/repl.py65.13% <75.00%> (+0.06%)⬆️
bpython/curtsies.py53.20% <81.81%> (+1.48%)⬆️
bpython/repl.py72.62% <87.50%> (+0.05%)⬆️
bpython/autocomplete.py85.92% <93.54%> (-0.47%)⬇️
bpython/__init__.py60.00% <100.00%> (ø)
... and12 more

Continue to review full report at Codecov.

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

@thomasballingerthomasballinger changed the titleMypy types for autocomplete.pyMypy types for autocomplete.py, args.py, config.py and curtsies.pyOct 9, 2021
Copy link
Contributor

@sebastinassebastinas left a comment

Choose a reason for hiding this comment

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

Thanks! I just have some small comments which could be addressed before merging the branch.Optional[X] for return types is probably more of a style preference instead.

thomasballinger reacted with heart emoji
@thomasballingerthomasballinger merged commit4d744ca intomainOct 10, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@sebastinassebastinassebastinas approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@thomasballinger@codecov-commenter@sebastinas

[8]ページ先頭

©2009-2025 Movatter.jp