Skip to content

Replace Incomplete | None = None in third party stubs #14063

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

Merged
merged 13 commits into from
May 15, 2025

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented May 14, 2025

Partly addresses #14029

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@srittau
Copy link
Collaborator Author

srittau commented May 14, 2025

This has a remarkably low primer fallout. Publisher.get_settings() has now (correctly) become untyped, which is fine in my opinion. It wasn't really typed previously, either.

@srittau srittau marked this pull request as ready for review May 14, 2025 15:05
Daverball

This comment was marked as outdated.

@srittau
Copy link
Collaborator Author

srittau commented May 15, 2025

So gevent is back to being complete.

Could you send a separate PR? (It doesn't need to but can include the Incomplete | None = None changes here.) I'll merge it first and then update this PR.

This comment has been minimized.

@srittau
Copy link
Collaborator Author

srittau commented May 15, 2025

#14073 for the (unrelated) reportlab stubtest failure.

Copy link
Collaborator

@Avasam Avasam left a comment

Choose a reason for hiding this comment

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

Quick question/suggestion concerning pyrightconfig.stricter.json. Non-blocker and otherwise LGTM.

And I see it's already suggested in Flake8-PYI: PyCQA/flake8-pyi#509

This comment has been minimized.

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/io.py: note: In function "create_publisher":
+ sphinx/io.py:189:5: error: Call to untyped function "get_settings" in typed context  [no-untyped-call]
+ sphinx/builders/html/__init__.py: note: In member "__init__" of class "StandaloneHTMLBuilder":
+ sphinx/builders/html/__init__.py:165:9: error: Call to untyped function "get_settings" in typed context  [no-untyped-call]

@srittau
Copy link
Collaborator Author

srittau commented May 15, 2025

CI failure seems unrelated.

@srittau srittau merged commit 1267684 into python:main May 15, 2025
46 of 49 checks passed
@srittau srittau deleted the incomplete-none-default branch May 15, 2025 19:37
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
vnmabus added a commit to vnmabus/typeshed that referenced this pull request May 20, 2025
After python#14063, calls to `psutil.process_iter` and `psutil.Process.as_dict` are being reported by Pyright, as the `ad_value` parameter is untyped.

However, given that (from the documentation) this is just a placeholder value to use when an error is raised while fetching some attribute, I think that typing it as `object` is appropriate.
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.

3 participants