Skip to content
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

fix: weight parameter type for networkx.algorithms.shortest_paths #12663

Merged
merged 28 commits into from
Sep 17, 2024

Conversation

Mr-Sunglasses
Copy link
Contributor

fix: #12628

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Considering the fairly complex Callable[[Any, Any, dict[str, Any]], float | None] expression, I'd prefer to see this defined as a type alias (e.g. _WeightFunction) and that used in arguments.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

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

@Mr-Sunglasses
Copy link
Contributor Author

Considering the fairly complex Callable[[Any, Any, dict[str, Any]], float | None] expression, I'd prefer to see this defined as a type alias (e.g. _WeightFunction) and that used in arguments.

Thanks @srittau , I've done all the requested changes.

@srittau srittau merged commit eb7df6d into python:main Sep 17, 2024
48 checks passed
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.

Wrongly typed weight parameter of networkx shortest_paths algorithms
2 participants