AllenNeuralDynamics / AllenNeuralDynamics/one-liner
Make `Client.version` and `Client.server_version` properties
- Lenguaje dominante
- Python
- Estrellas
- 3
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Current code in client.py
```python
def version(self):
"""Return client version."""
return local_version
def server_version(self):
"""Return the server version."""
return self.rpc_client.call("__router_server", "version")[1]
```
Should be
```python
@property
def version(self):
"""Return client version."""
return local_version
@property
def server_version(self):
"""Return the server version."""
return self.rpc_client.call("__router_server", "version")[1]
```
Or potentially `@cached_property`
This allows for the more idiomatic user experience of `client.version` rather than `client.version()`
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.