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

stubs/ directory: replace Any | None = ... with Incomplete | None = ... #9558

Merged
merged 3 commits into from
Jan 18, 2023

Conversation

AlexWaygood
Copy link
Member

See #9550 for context.

The first commit was produced just by doing this in the Python REPL:

>>> from pathlib import Path
>>> for path in Path("stubs").rglob("*.pyi"):
...     source = path.read_text()
...     if ": Any | None = ..." in source:
...         source = "\n".join(["from _typeshed import Incomplete"] + source.splitlines())
...         source = source.replace(": Any | None = ...", ": Incomplete | None = ...")
...         _ = path.write_text(source)
...
>>> exit()

The second commit applies pycln, then isort, then black.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Seems fine.

@AlexWaygood AlexWaygood merged commit 4fea314 into python:main Jan 18, 2023
@AlexWaygood AlexWaygood deleted the replace-any branch January 18, 2023 08:48
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.

2 participants