Unify the style of type annotations#64
Conversation
CLA Signature Passdpj135, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
d455307 to
b11febb
Compare
CLA Signature Passdpj135, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
b11febb to
2277dc9
Compare
CLA Signature Passdpj135, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
Signed-off-by: dpj135 <958208521@qq.com>
2277dc9 to
bfc15ed
Compare
CLA Signature Passdpj135, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
| ): | ||
| input_tensor: torch.Tensor, | ||
| output_tensor: torch.Tensor, | ||
| comm: hcclComm_t, |
There was a problem hiding this comment.
Can the hcclComm_t pass the syntax check?
There was a problem hiding this comment.
Yes, because hcclComm_t equal to ctypes.c_void_p.
| ) | ||
| self._client = KVClient(host=host, port=port) | ||
| self.local_tensors = [] | ||
| self.local_tensors: List["torch.Tensor"] = [] |
| ).remote() | ||
|
|
||
| backend_info: dict = ray.get( | ||
| backend_info: Dict[str, Any] = ray.get( |
There was a problem hiding this comment.
Whether local variables should be annotated or not, establish a unified standard.
There was a problem hiding this comment.
I think we need to annotate local vars while using some uncommon types
There was a problem hiding this comment.
and uncommon returned values
| meta_bytes = pickle.dumps(meta_tuple, protocol=pickle.HIGHEST_PROTOCOL) | ||
|
|
||
| bufs: list[bytestr] = [meta_bytes, raw_data] | ||
| bufs = [meta_bytes, raw_data] |
There was a problem hiding this comment.
Whether local variables should be annotated or not, establish a unified standard.
|
consider introducing tools like |
Signed-off-by: dpj135 <958208521@qq.com>
CLA Signature Passdpj135, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
| # don't want a baseline the size of the codebase) | ||
| --arg-type-hints-in-docstring=False, | ||
| --skip-checking-raises=True, | ||
| --check-return-types=False, |
There was a problem hiding this comment.
looks like return/arg type check are not enabled?
There was a problem hiding this comment.
I referred to RAY's set about pydoclint there. Should we enable it?
There was a problem hiding this comment.
get it. now only arg name is checked. types are not cheked. let's follow the ray setting :)
Description
pydoclintto .pre-commit-config.yaml