AllenNeuralDynamics / AllenNeuralDynamics/one-liner

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

Đang mở
#38 1 bình luận 0 reaction 1 người được giao Được @Poofjunior nhận Xem trên GitHub
Ngôn ngữ chính
Python
Star
3
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.