kubernetes-client / python

Official Python client library for kubernetes
http://kubernetes.io/
Apache License 2.0
6.7k stars 3.26k forks source link

Add type hints to project #2033

Open kasium opened 1 year ago

kasium commented 1 year ago

It would be great of the python client to add inline type hints, so that e.g. mypy can detect issues

muzakkirsaifi123 commented 1 year ago

Hi @kasium Could you please explain about it more.

kasium commented 1 year ago

The idea would be to add type hints as described in PEP 484, decide on a type checker (like mypy, pyright, ...) and this to the CI and publish kubernetes as a typed package (by adding a magic py.typed file to the project).

With that, IDEs as was tools like mypy can help the user to pick the right types for functions, etc.

roycaihw commented 1 year ago

maybe this is a dup of https://github.com/kubernetes-client/python/issues/1984

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

msw-kialo commented 10 months ago

/remove-lifecycle stale

k8s-triage-robot commented 7 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 6 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

msw-kialo commented 6 months ago

/remove-lifecycle rotten

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

msw-kialo commented 2 months ago

/remove-lifecycle rotten

JaeAeich commented 1 month ago

/remove-lifecycle stale