Annotate `ClientState` for Cythonization (#4290)
Annotate `ClientState` for Cythonization (#4290)

* Use `cs` variable for `ClientState`

* Run `black`

* Assign `cs` first to avoid retrieval cost

* Assign `ClientState` instance to local variable

* Check `type`s exactly

* Check `other` is `ClientState` first

* Annotate `ClientState` for Cythonization

* Simplify `ClientState.__repr__`

Avoid building a `tuple` and simply inject the `client_key` directly
into the `str`.

* Annotate `ClientState` methods

* Type all `ClientState` variables

* Type `c` as `str` as well

* Add `_` before all `ClientState` attributes

* Add Python-level `property`s for attributes

* Revert "Add Python-level `property`s for attributes"

This reverts commit a0e0c1c35e6b57989a117cfdd5acaff832d16f09.

* Revert "Add `_` before all `ClientState` attributes"

This reverts commit 33f2b0098d3e2e5d6dd98485dd4916fe908ff9b7.

* Show `declare` approach

* Revert "Show `declare` approach"

This reverts commit 9000361f9b714e6564870d90e7d0afe1ca32d1b5.

* Add `_` before all `ClientState` attributes

* Add Python-level `property`s for attributes

* Add missing `versions` property
dask/distributed,dask/distributed,dask/distributed,dask/distributed