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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various typing errors on Windows #10674

Merged
merged 4 commits into from
Dec 4, 2021
Merged

Conversation

uranusjr
Copy link
Member

馃し

@uranusjr uranusjr added the skip news Does not need a NEWS file entry (eg: trivial changes) label Nov 22, 2021
from wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
Copy link
Member Author

Choose a reason for hiding this comment

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

This is what Werkzeug does to satisfy Mypy.

@uranusjr
Copy link
Member Author

Uh, now POSIX does not like ignore[attr-defined] because it thinks it is unneeded 馃檮

@uranusjr uranusjr force-pushed the mypy-fix-windows branch 2 times, most recently from 00d1040 to edf8631 Compare November 22, 2021 09:38
@uranusjr
Copy link
Member Author

Uh, this is all so terrible. I gave up on a couple of files and applied file-wide disables instead 馃槥

@@ -6,7 +6,7 @@
from typing import Any, Optional, cast
from unittest import mock

import freezegun # type: ignore
import freezegun # type: ignore # mypy: no-warn-unused-ignores
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this type: ignore? What fails if we remove it?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was needed for me at some point but I just tried and this is not needed anymore. Not sure what changed, but I鈥檓 only interested in getting my pre-commit to work TBH so let鈥檚 revert this.

@pradyunsg
Copy link
Member

Should we set up CI to run linters on Windows as well?

@uranusjr
Copy link
Member Author

Not really worth it IMO, it鈥檚 slow and only helps in edge cases that are relatively easy to spot.

@uranusjr
Copy link
Member Author

uranusjr commented Dec 3, 2021

Any further comments on this?

@pradyunsg
Copy link
Member

Nope. Feel free to merge. :)

@uranusjr uranusjr merged commit d130d31 into pypa:main Dec 4, 2021
@uranusjr uranusjr deleted the mypy-fix-windows branch December 4, 2021 06:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants