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

ApiClient is not re-exported #9

Open
adamnovak opened this issue Sep 30, 2022 · 1 comment
Open

ApiClient is not re-exported #9

adamnovak opened this issue Sep 30, 2022 · 1 comment

Comments

@adamnovak
Copy link

from kubernetes.client.api_client import ApiClient

This needs to be from kubernetes.client.api_client import ApiClient as ApiClient, or you get:

src/toil/batchSystems/kubernetes.py:215:22: error: Module has no attribute "ApiClient"  [attr-defined]
            api_client = kubernetes.client.ApiClient()
         

This is when I import kubernetes and when I import kubernetes.client.

@simonfontana
Copy link

I have the same issue. I also found two more issues when running mypy on our code:

from kubernetes import config
config.list_kube_config_contexts()

Gives: error: Module has no attribute "list_kube_config_contexts"

from kubernetes import config
config.new_client_from_config(context=self.context["name"])

Gives: error: Module has no attribute "new_client_from_config"

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

2 participants