Conversation
bdf6430 to
ff1582d
Compare
193272c to
b76ff96
Compare
…th MessageType(msgtype) after reading from socket
2b40f30 to
a7dfc9c
Compare
a7dfc9c to
7173944
Compare
There was a problem hiding this comment.
Pull request overview
Adds the ty type checker to the project and adjusts code/types to satisfy stricter type-checking, while also tightening dependency management and CI coverage across Python versions.
Changes:
- Add
tyconfiguration (pyproject.toml) and runty checkin CI; expand CI matrix to include Python 3.13. - Refactor HTML formatting customization to be method-based (
html_escape/html_markup) and update tests accordingly. - Misc typing/compatibility cleanups (enum typing in server read path, datetime timezone-aware conversions, adaptor overload signatures).
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
aiokdb/__init__.py |
Type annotation adjustments for stricter type-checking. |
aiokdb/adapter.py |
Refines overload signatures/parameter naming for indexing & mutation. |
aiokdb/format.py |
Makes datetime formatting timezone-aware; refactors HTML escaping/markup customization. |
aiokdb/server.py |
Tightens message type typing and modernizes asyncio.IncompleteReadError usage. |
test/test_format.py |
Updates formatter subclass test to use new HTML escaping/markup hooks. |
requirements.txt |
Pins tooling/test dependencies and adds ty. |
requirements.minimal.txt |
Introduces a minimal (unpinned) requirements set including ty/ruff. |
pyproject.toml |
Adds ty environment configuration. |
.github/workflows/check.yml |
Adds Python 3.13 and runs ty check in CI with a .venv setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return f"cv({repr(self.aS())})" | ||
|
|
||
| def kC(self) -> array.array: # type: ignore[type-arg] | ||
| def kC(self) -> array.array: |
There was a problem hiding this comment.
KCharArray.kC now returns array.array without a type parameter. In strict mypy this will fail as an unparameterized generic; it should likely be array.array[str] to match the _c: array.array[str] field.
| def kC(self) -> array.array: | |
| def kC(self) -> "array.array[str]": |
| def __init__( | ||
| self, | ||
| table_class: Optional[str] = None, | ||
| indent: int = 2, | ||
| width: int = 200, | ||
| height: int = 10, | ||
| markup: Callable[[str], str] = identity, | ||
| escape: Callable[[str], str] = escape, | ||
| ): | ||
| super().__init__(width, height) | ||
| self.tc = f' class="{table_class}"' if table_class else "" | ||
| self.indent = indent |
There was a problem hiding this comment.
HtmlFormatter.__init__ no longer accepts the previously supported markup / escape callables, which is a breaking API change for any callers that injected custom escaping/markup. If this was intentional, consider keeping these as optional (deprecated) parameters that set the behavior of html_markup/html_escape, or document the new subclassing-based customization path.
| - run: ty check | ||
| - run: mypy --strict . | ||
| - run: pytest . |
There was a problem hiding this comment.
CI now runs ty check, but there’s no corresponding update to the repo’s local developer workflow (e.g., check.sh / README’s test instructions). Consider adding ty check to the documented/local check script so contributors can reproduce CI failures locally without guessing.
621e8f0 to
78396cb
Compare
78396cb to
ea98681
Compare
No description provided.