FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

networkx: Add symbols from python-type-stubs by Avasam · Pull Request #14084 · python/typeshed · GitHub

Repository navigation

networkx: Add symbols from python-type-stubs - #14084

Merged
srittau merged 6 commits into
python:mainfrom
Avasam:networkx--Add-new-symbols-from-python-type-stubs
May 22, 2025
Merged

srittau merged 6 commits into
python:mainfrom
Avasam:networkx--Add-new-symbols-from-python-type-stubs

Conversation

Avasam commented May 16, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

Extracted from #14038
Adds symbols found in https://github.com/microsoft/python-type-stubs/tree/main/stubs/networkx but not in our stubs.
Except for def *_impl(...) and chaini = itertools.chain.from_iterable

This will help differentiate between additions and modifications in the git diff.

This comment has been minimized.

srittau commented May 16, 2025

Copy link
Copy Markdown
Collaborator

stubs/networkx/networkx/algorithms/community/lukes.pyi (3.12): ParseError: Default value for D_EDGE_VALUE: Final can only be '...' or a legal Literal parameter, got LITERAL(1.0)

I'm sorry, pytype, I don't think you are correct here. Maybe just add networkx to pytype's exclude list?

Avasam commented May 16, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

It's somewhat correct.
D_EDGE_VALUE: Final = 1.0 means the type is Literal[1.0]. And using a float in Literal is out of spec afaik. Even pyright/pylance doesn't do it.


Copy link
Copy Markdown
Contributor

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

srittau merged commit 855999e into python:main May 22, 2025
Avasam deleted the networkx--Add-new-symbols-from-python-type-stubs branch May 22, 2025 13:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL