AllenNeuralDynamics / AllenNeuralDynamics/one-liner

Make `Client.version` and `Client.server_version` properties

Open
#38 1 comment 0 reactions 1 assignee Claimed by @Poofjunior View on GitHub
Dominant language
Python
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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()`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.