-
Notifications
You must be signed in to change notification settings - Fork 204
Document how to use basic type annotations with PyGraph #1558
Copy link
Copy link
Open
Labels
documentationenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
What is the expected enhancement?
I find being able to statically type the generic Graph() from NetworkX to be a very useful feature for maintainability and self-documentation for other developers. Could we add some very simple docs so that if someone searching "typing" or similar in the user guide they are brought to a short example that documents how to type a PyGraph with its node and edge types? It took me a while of digging through issues to learn that typing the generic types was supported.
For example, it's not immediately clear to me without digging through the source code what the order of the generic parameters to PyGraph[Any, Any] are.
I think this would also make the feature more discoverable for new users.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers