Skip to content

Commit ff6e76a

Browse files
committed
fix: address linter and type checker issues
- Fix trailing comma in Buffer import - Remove redundant type annotation to fix mypy error - Add groups = dev to typecheck tox environment - Remove trailing whitespace
1 parent 9db319f commit ff6e76a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lmstudio/history.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# Native in 3.13+
3030
TypeIs,
3131
# Native in Python 3.12+
32-
Buffer
32+
Buffer,
3333
)
3434

3535
from msgspec import to_builtins
@@ -555,10 +555,10 @@ def _get_file_details(src: LocalFileInput) -> Tuple[str, Buffer]:
555555
except TypeError:
556556
# Not a buffer protocol object, fall through to other checks
557557
pass
558-
558+
559559
if hasattr(src, "read"):
560560
try:
561-
data: Buffer = src.read()
561+
data = src.read()
562562
except OSError as exc:
563563
# Note: OSError details remain available via raised_exc.__context__
564564
err_msg = f"Error while reading {src!r} ({exc!r})"

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ commands =
5252
ruff check {posargs} src/ tests/ examples/plugins
5353

5454
[testenv:typecheck]
55+
groups = dev
5556
allowlist_externals = mypy
5657
commands =
5758
mypy --strict {posargs} src/ tests/

0 commit comments

Comments
 (0)