-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
networkx: add all missing __all__
#13956
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
Conversation
@@ -23,3 +24,5 @@ from networkx.utils.misc import ( | |||
from networkx.utils.random_sequence import * | |||
from networkx.utils.rcm import * | |||
from networkx.utils.union_find import * | |||
|
|||
config: NetworkXConfig # Set by networkx/__init__.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only "special thing" I had to do throughout this PR.
networkx/__init__.py
contains the lines:
config = utils.backends._set_configs_from_environment()
utils.config = utils.configs.config = config
This comment has been minimized.
This comment has been minimized.
@@ -1,7 +1,15 @@ | |||
from binascii import Incomplete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
binascii? I think this recurs a few times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh, bad Pylance autoimport I didn't notice. Thanks for catching it !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, feel free to merge once you fix the binascii thing
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Whilst merging stubs from https://github.com/microsoft/python-type-stubs/tree/main/stubs/networkx , I noticed a lot of missing functions. Let's start with
__all__
.I set
ignore_missing_stub = false
and went through all errors mentionning__all__
.Not that I didn't put any effort into new annotations further than what Pylance was able to provide for return types.
The point is to keep this a fairly simple and easy review. Which will reduce the complexity of upcoming PRs.