Skip to content

Make uv run --all-extras pyright --verifytypes click pass#3072

Merged
Rowlando13 merged 3 commits intopallets:stablefrom
adamtheturtle:verifytypes
Oct 30, 2025
Merged

Make uv run --all-extras pyright --verifytypes click pass#3072
Rowlando13 merged 3 commits intopallets:stablefrom
adamtheturtle:verifytypes

Conversation

@adamtheturtle
Copy link
Copy Markdown
Contributor

I am not familiar with the CI setup of this project, so if there is a wish to have this in CI, I'd like to be instructed, or leave that to someone else please.

fixes #3067

I am not familiar with the CI setup of this project, so if there is a wish to have this in CI, I'd like to be instructed, or leave that to someone else please.
@davidism
Copy link
Copy Markdown
Member

Please rebase and retarget to stable.

@davidism
Copy link
Copy Markdown
Member

click/pyproject.toml

Lines 171 to 176 in 81a482f

[tool.tox.env.typing]
description = "run static type checkers"
dependency_groups = ["typing"]
commands = [
["mypy"],
]

This is the tox job that runs type checks. Add the verifytypes call as another item in the list.

@adamtheturtle adamtheturtle changed the base branch from main to stable September 19, 2025 15:28
@adamtheturtle
Copy link
Copy Markdown
Contributor Author

Thank you @davidism , I have made the changes you requested

pyproject.toml Outdated
dependency_groups = ["typing"]
commands = [
["mypy"],
["pyright", "--verifytypes", "click"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need --ignoreexternal here as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why? Given that this is passing as-is

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consistency with the other projects. Click doesn't have any dependencies (except stdlib modules), but if it did for some reason (like Flask) verifytypes tends to fail unhelpfully.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I have made this change.

I personally like to avoid --ignoreexternal so that I know the interfaces I ship are type safe, even if that means choosing to avoid some dependencies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For example, Flask-SQLAlchemy-Lite fails without ignoreexternal, even though SQLAlchemy goes to amazing lengths to work with typing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the context. The latest commit addresses this so I'm hoping that it can be merged.

@adamtheturtle
Copy link
Copy Markdown
Contributor Author

@davidism I have addressed all the inline comments and I am hoping for this to be merged.

@Rowlando13 Rowlando13 merged commit e27b307 into pallets:stable Oct 30, 2025
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pyright --verifytypes reports incomplete coverage

3 participants