Open adamnovak opened 2 years ago
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_configcontexts"
from kubernetes import config
config.new_client_from_config(context=self.context["name"])
Gives: _error: Module has no attribute "new_client_fromconfig"
https://github.com/MaterializeInc/kubernetes-stubs/blob/15ad1215405dfb7d4021b17e93a1cb37c99fc1fe/kubernetes-stubs/client/__init__.pyi#L99
This needs to be
from kubernetes.client.api_client import ApiClient as ApiClient
, or you get:This is when I
import kubernetes
and when Iimport kubernetes.client
.