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

Upgrade mypy to 0.940 #1466

Merged
merged 5 commits into from
Mar 12, 2022
Merged

Upgrade mypy to 0.940 #1466

merged 5 commits into from
Mar 12, 2022

Conversation

DanielNoord
Copy link
Collaborator

Steps

  • Write a good description on what the PR does.

Description

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Related Issue

Can't merge yet as the pre-commit mypy mirror hasn't been updated yet, see: https://github.com/pre-commit/mirrors-mypy

@DanielNoord DanielNoord added the dependency Related to dependencies of the project label Mar 11, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.12.0 milestone Mar 11, 2022
.pre-commit-config.yaml Outdated Show resolved Hide resolved
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Could you update existing type: ignore without error codes?
From what I've seen there are only a few in unittest_nodes and unittest_nodes_lineno.

tests/unittest_nodes.py Outdated Show resolved Hide resolved
@@ -1222,7 +1222,7 @@ def test_type_comments_with() -> None:
"""
with a as b: # type: int
pass
with a as b: # type: ignore
with a as b: # type: ignore[name-defined]
Copy link
Member

Choose a reason for hiding this comment

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

Didn't saw that those these here are inside code blocks πŸ˜…
Doesn't matter now I guess.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's interesting that mypy picks up on those. Do you know if code in code blocks is checked? If not, this option also probably shouldn't?

Copy link
Member

Choose a reason for hiding this comment

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

It's interesting that mypy picks up on those. Do you know if code in code blocks is checked? If not, this option also probably shouldn't?

Mypy didn't notice those. I just searched for type: ignore and looked which ones didn't have error codes πŸ˜„

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If I'm not mistaken they did. I think I saw an error message about not having the error specified for these.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm πŸ€” I just removed the comment and ran mypy. Didn't saw it.
Under the hood mypy uses ast parsing and this would be just one string node. So hard to imagine that it would mark it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably my memory messing up πŸ˜…

@DanielNoord DanielNoord reopened this Mar 12, 2022
@DanielNoord DanielNoord modified the milestones: 2.12.0, 2.11.0 Mar 12, 2022
@DanielNoord DanielNoord merged commit 7557b39 into pylint-dev:main Mar 12, 2022
@DanielNoord DanielNoord deleted the mypy branch March 12, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Related to dependencies of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants