imbajin commented on code in PR #313:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/313#discussion_r2567002141
##########
vermeer-python-client/src/pyvermeer/client/client.py:
##########
@@ -30,12 +28,12 @@ class PyVermeerClient:
"""Vermeer API Client"""
def __init__(
- self,
- ip: str,
- port: int,
- token: str,
- timeout: Optional[tuple[float, float]] = None,
- log_level: str = "INFO",
+ self,
+ ip: str,
+ port: int,
+ token: str,
+ timeout: tuple[float, float] | None = None,
+ log_level: str = "INFO",
Review Comment:
⚠️ **类型注解现代化 (PEP 604 风格)**
这个修改使用了 Python 3.10+ 的类型注解语法(`tuple[...] | None` 代替
`Optional[tuple[...]]`)。这是 ruff 的 UP007 规则推荐的现代写法,符合项目 `target-version =
"py310"` 的设置。
同时也将 `Dict` 改为小写 `dict`(UP006 规则)。这些都是良好的实践。👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]