Skip to content

Remove networkx stubs in favor of typeshed #369

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 6 commits into from
Jul 22, 2025

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented May 15, 2025

networkx stubs have been added to typeshed in python/typeshed#10544 almost two years ago.

Many improvements since then.

In python/typeshed#14038 I'm currently merging what's left of these stubs that isn't present in typeshed to ensure no false-positive regressions to Pylance users. (and to not loose any work done here)

I already added all missing symbols in python/typeshed#14084
In python/typeshed#14256 I added all return type stubs

@Avasam Avasam marked this pull request as draft May 15, 2025 03:41
@Avasam Avasam force-pushed the remove-networkx branch from eea3c3e to 3a1c8d6 Compare May 15, 2025 03:46
@nbnds
Copy link

nbnds commented Jun 7, 2025

I believe this will resolve my issue here with deprecated signatures
typeshed has already updated to 3.5: https://github.com/python/typeshed/tree/main/stubs/networkx

grafik

But Pylance shows me an error with its built in stubs in 2025.5.1
grafik
Where the correct (new) signature is
grafik

@Avasam
Copy link
Contributor Author

Avasam commented Jun 20, 2025

I think once python/typeshed#14256 is merged, I'll feel comfortable enough removing networkx from microsoft/python-type-stubs.

There would still be lots of param types missing from typeshed (done in python/typeshed#14038), but these here stubs are full of incorrect or overly restrictive annotations anyway,

@debonte
Copy link
Contributor

debonte commented Jul 11, 2025

@Avasam, FYI, your recent typeshed changes are in Pylance prerelease 2025.6.102. We're planning to ship a stable release with these changes next week.

@Avasam Avasam marked this pull request as ready for review July 11, 2025 18:37
@debonte
Copy link
Contributor

debonte commented Jul 22, 2025

@Avasam, is there anything else you want to do or wait for before I merge this?

@Avasam
Copy link
Contributor Author

Avasam commented Jul 22, 2025

Nope. Feel free to go ahead!

@debonte debonte merged commit 692c37c into microsoft:main Jul 22, 2025
8 checks passed
@debonte
Copy link
Contributor

debonte commented Jul 22, 2025

Thanks for your work on this @Avasam!

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