8000 Replace `Incomplete | None = None` in third party stubs by srittau · Pull Request #14063 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
srittau merged 13 commits intopython:mainfrom
srittau:incomplete-none-default
May 15, 2025
Merged

Replace Incomplete | None = None in third party stubs#14063
srittau merged 13 commits intopython:mainfrom
srittau:incomplete-none-default

Conversation

@srittau
Copy link
Collaborator
@srittau srittau commented May 14, 2025

Partly addresses #14029

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

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.

@github-actions

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

8000

@github-actions

This comment has been minimized.

srittau and others added 2 commits May 15, 2025 20:31
@github-actions
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

0