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

Add pyright type-checking#1172

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
seifertm merged 5 commits intopytest-dev:mainfromtjkuson:pyright
Aug 8, 2025
Merged

Conversation

@tjkuson
Copy link
Contributor

@tjkusontjkuson commentedJul 24, 2025
edited
Loading

Hello, I was working with this plugin and encountered this issue.

I added pyright as a tox test matching the mypy hook.

This reveals one error involvingfunction.parent possibly beingNone. I resolved this by adding an assertion, as that appears to be most consistent with the rest of the codebase.

Closes#731

@tjkuson
Copy link
ContributorAuthor

tjkuson commentedJul 24, 2025
edited
Loading

I'll close this for now, there's an issue with pyright and pre-commit CI:RobertCraigie/pyright-python#345

@seifertm
Copy link
Contributor

seifertm commentedJul 28, 2025
edited
Loading

Rather than running pyright in pre-commit, we can consider running it in a dedicated tox environment. This would give us the benefit of having a pyright check for the code base, while 90% of typing issues should still be caught by the mypy pre-commit hook.

@tjkuson Do you think this approach would side-step the issue?

@tjkusontjkuson reopened thisJul 30, 2025
@tjkusontjkuson changed the titleAdd pyright hookAdd pyright type-checkingJul 30, 2025
@codecov-commenter
Copy link

codecov-commenter commentedJul 30, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.88%. Comparing base (07cb01f) to head (5ad6dab).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #1172      +/-   ##==========================================+ Coverage   88.16%   88.88%   +0.72%==========================================  Files           2        2                Lines         397      405       +8       Branches       44       44              ==========================================+ Hits          350      360      +10  Misses         35       35+ Partials       12       10       -2

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tjkuson
Copy link
ContributorAuthor

@seifertm I've moved the pyright check from pre-commit to tox and re-opened the PR.

@tjkusontjkuson marked this pull request as ready for reviewJuly 30, 2025 00:56
Copy link
Contributor

@seifertmseifertm left a comment

Choose a reason for hiding this comment

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

Thanks! This will help catch issues that are flagged by pyright, but not by mypy (even though we don't run pyright in a pre-commit hook).

tjkuson reacted with heart emoji
@seifertmseifertm added this pull request to themerge queueAug 8, 2025
Merged via the queue intopytest-dev:main with commit6950774Aug 8, 2025
21 of 22 checks passed
@tjkusontjkuson deleted the pyright branchAugust 8, 2025 14:13
@seifertmseifertm added this to thev1.2 milestoneSep 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@seifertmseifertmseifertm approved these changes

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@TincheTincheAwaiting requested review from TincheTinche is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

v1.2

Development

Successfully merging this pull request may close these issues.

Decorator type signatures not recognized by pyright

3 participants

@tjkuson@seifertm@codecov-commenter

[8]ページ先頭

©2009-2025 Movatter.jp