Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type annotations to test-data/unit/plugins #16028

Merged
merged 2 commits into from
Sep 4, 2023
Merged

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 3, 2023

Closes #16027

@sobolevn
Copy link
Member Author

sobolevn commented Sep 3, 2023

It passed :)

 type: commands[2]> python -m mypy --config-file mypy_self_check.ini test-data/unit/plugins
Success: no issues found in 30 source files

I will later add this commit to https://github.com/python/mypy/blob/master/.git-blame-ignore-revs if needed.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@@ -7,7 +9,7 @@


class ClassMethodPlugin(Plugin):
def get_base_class_hook(self, fullname: str) -> Optional[Callable[[ClassDefContext], None]]:
def get_base_class_hook(self, fullname: str) -> Callable[[ClassDefContext], None] | None:
Copy link
Contributor

@ikonst ikonst Sep 3, 2023

Choose a reason for hiding this comment

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

Speaking of this change - I've just enabled ruff's "pyupgrade" (#16023) which should keep enforcing this, maybe change pyproject.toml to include the plugins in ruff?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will in later PRs, because right now - I don't know how to force ruff to include a subdirectory. Docs do not say much, so I will have to dig into the source code :)

Copy link
Contributor

@ikonst ikonst left a comment

Choose a reason for hiding this comment

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

consider enabling ruff for the plugins

@sobolevn sobolevn merged commit 8738886 into master Sep 4, 2023
18 checks passed
@sobolevn sobolevn deleted the better-test-plugins branch September 4, 2023 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins in test-data/unit/plugins contain mutliple typing problems
2 participants