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

kubernetes.config.load_kube_config is not visible #11

Open
adamnovak opened this issue Sep 30, 2022 · 2 comments
Open

kubernetes.config.load_kube_config is not visible #11

adamnovak opened this issue Sep 30, 2022 · 2 comments

Comments

@adamnovak
Copy link

Kubernetes exposes a kubernetes.config.load_kube_config when you import kubernetes.config. But the stubs don't seem to make it available:

src/toil/batchSystems/kubernetes.py:298:17: error: Module has no attribute "load_kube_config"; maybe "load_kube_config_from_dict" or "load_incluster_config"?  [attr-defined]
                    kubernetes.config.load_kube_config()
                    ^

I'm not sure what the stubs are doing differently for those other names that makes mypy see them.

@adamnovak
Copy link
Author

Later in the same error log I get:

src/toil/batchSystems/kubernetes.py:304:21: error: Module has no attribute "load_incluster_config"; maybe "load_kube_config"?  [attr-defined]
                        kubernetes.config.load_incluster_config()
                        ^

@adamnovak
Copy link
Author

The underlying problem might be the same as sqlalchemy/sqlalchemy2-stubs#187: the stubs are relying on implicit reexport, which MyPy doesn't allow stubs to do.

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

No branches or pull requests

1 participant