AllenNeuralDynamics / AllenNeuralDynamics/one-liner

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

オープン
#38 コメント 1 件 リアクション 0 件 担当者 1 名 @Poofjunior が担当を希望しています GitHub で見る
主要言語
Python
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。