Skip to content

Replace incomplete module markers #14030

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 3 commits into from
May 13, 2025
Merged

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented May 12, 2025

Closes: #13765

@srittau
Copy link
Collaborator Author

srittau commented May 12, 2025

For reference, #9548 removed the mentions of incomplete modules from CONTRIBUTING. Since the advent of stubgen, I don't expect many new instances to show up.

Copy link
Contributor

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

@srittau srittau marked this pull request as ready for review May 12, 2025 18:16
@srittau srittau requested a review from Avasam May 12, 2025 18:16
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.

I like the # incomplete module comment instead of just # incomplete

It's also nice to see only a few changes in pyrightconfig.stricter.json.

@srittau srittau merged commit e08e349 into python:main May 13, 2025
67 checks passed
@srittau srittau deleted the incomplete-modules branch May 13, 2025 06:53
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
tsibley added a commit to nextstrain/cli that referenced this pull request May 23, 2025
An included typeshed stub update¹ for docutils (and many other modules)
meant that docutils.readers.standalone.Reader became an unknown type and
was duly reported as such.  We don't care.

An apparent regression² results in unnecessary "# type: …" comments in
the typeshed itself's internal code being reported as our problem.  It
is not.  Ignore them.

¹ <python/typeshed#13765>
  <python/typeshed#14030>

² <microsoft/pyright#10487>
tsibley added a commit to nextstrain/cli that referenced this pull request May 23, 2025
An included typeshed stub update¹ for docutils (and many other modules)
meant that docutils.readers.standalone.Reader became an unknown type and
was duly reported as such.  We don't care.

An apparent regression² results in unnecessary "# type: …" comments in
the typeshed itself's internal code being reported as our problem.  It
is not.  Ignore them.

Note that in this case of ignoring out-of-project source, matching an
absolute path seems to be required for the Pyright "ignore" pattern to
actually work.  (I found no relative or partial paths that work.)  Also
note that whatever globbing Pyright is doing will not match a leading
"**" to an absolute path.  Give up and anchor the pattern to an absolute
root separately for POSIX and Windows.  Yay.

¹ <python/typeshed#13765>
  <python/typeshed#14030>

² <microsoft/pyright#10487>
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.

Returning Unknown instead of Any for incomplete __getattr__
2 participants