Skip to content

Conversation

@hauntsaninja
Copy link
Contributor

No description provided.

Copy link
Member

@ichard26 ichard26 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 comment "pre-commit.ci autofix" @hauntsaninja? Thanks :)

@hauntsaninja
Copy link
Contributor Author

Thanks for the review! re Protocol: I thought we needed a different fix, but then noticed I could get away with something much simpler

def test_make_metadata_file_custom_contents() -> None:
value = b"hello"
f = default_make_metadata(value=value)
f = default_make_metadata(value=value) # type: ignore[arg-type]
Copy link
Member

Choose a reason for hiding this comment

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

Do you know the reason of this one? Is that some regression in mypy?

Copy link
Contributor Author

@hauntsaninja hauntsaninja Oct 20, 2024

Choose a reason for hiding this comment

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

Prior to mypy 1.11, mypy did not understand functools.partial at all, so calls here were effectively going unchecked. mypy now struggles a little to solve the value constrained type var once it's been partially solved in the functools.partial call.

Looking at it a little closer, the type variable in make_wheel_metadata_file is actually unnecessary, so I'll remove it to make one of the two of these go away

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

LGTM. Could you remove the last 2 commits (1.12.1 + revert)?

@sbidoul sbidoul added this to the 24.3 milestone Oct 20, 2024
@hauntsaninja hauntsaninja changed the title Upgrade to mypy 1.12 Upgrade to mypy 1.12.1 Oct 20, 2024
@hauntsaninja
Copy link
Contributor Author

Thanks for the review! I squashed the commits. I also landed 1.12.1 (I'd reverted because pre-commit didn't support it yet, but it does now)

@sbidoul sbidoul merged commit 6958e28 into pypa:main Oct 21, 2024
30 checks passed
@sbidoul
Copy link
Member

sbidoul commented Oct 21, 2024

Thank you @hauntsaninja !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants