Skip to content

Conversation

@adamtheturtle
Copy link
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
Member

Please rebase and retarget to stable.

@davidism
Copy link
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
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
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
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
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
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
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
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
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pyright --verifytypes reports incomplete coverage

3 participants