Skip to content

Commit b44a9a1

Browse files
[pre-commit.ci] pre-commit suggestions (#680)
* [pre-commit.ci] pre-commit suggestions updates: - [github.com/codespell-project/codespell: v2.4.2 → v2.4.3](codespell-project/codespell@v2.4.2...v2.4.3) - [github.com/JoC0de/pre-commit-prettier: v3.8.1 → v3.9.6](JoC0de/pre-commit-prettier@v3.8.1...v3.9.6) - [github.com/PyCQA/docformatter: v1.7.7 → v1.7.8](PyCQA/docformatter@v1.7.7...v1.7.8) - [github.com/astral-sh/ruff-pre-commit: v0.15.9 → v0.16.1](astral-sh/ruff-pre-commit@v0.15.9...v0.16.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci: keep docformatter at v1.7.7 and revert its v1.7.8 rewrites docformatter v1.7.8 regresses in two ways against our existing config (wrap-summaries/wrap-descriptions = 120, blank = true): 1. It reflows triple-quoted strings that are not docstrings, word-wrapping the code samples inside `raise ValueError(...)` messages into unreadable prose and emitting a stray line-continuation backslash after the opening paren. 2. It inserts a trailing blank line after docstrings that ruff-format 0.16.1 immediately strips, so the two hooks never converge and every run reports "files were modified". It also split a summary in loggers.py into a 131-char description line, tripping ruff E501, which ruff cannot autofix. Pin the rev back to v1.7.7 and restore the four files v1.7.8 rewrote. The codespell, prettier and ruff bumps in this PR are kept. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bhimraj Yadav <bhimrajyadav977@gmail.com>
1 parent 388a103 commit b44a9a1

7 files changed

Lines changed: 3 additions & 10 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ repos:
2323
- id: detect-private-key
2424

2525
- repo: https://github.com/codespell-project/codespell
26-
rev: v2.4.2
26+
rev: v2.4.3
2727
hooks:
2828
- id: codespell
2929
additional_dependencies: [tomli]
3030
#args: ["--write-changes"]
3131

3232
- repo: https://github.com/JoC0de/pre-commit-prettier
33-
rev: v3.8.1
33+
rev: v3.9.6
3434
hooks:
3535
- id: prettier
3636
files: \.(json|yml|yaml|toml)
@@ -46,7 +46,7 @@ repos:
4646
args: ["--in-place"]
4747

4848
- repo: https://github.com/astral-sh/ruff-pre-commit
49-
rev: v0.15.9
49+
rev: v0.16.1
5050
hooks:
5151
- id: ruff
5252
args: ["--fix"]

src/litserve/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ def __init__(
148148
enable_async: bool = False,
149149
):
150150
"""Initialize LitAPI with configuration options."""
151-
152151
if max_batch_size <= 0:
153152
raise ValueError("max_batch_size must be greater than 0")
154153

@@ -381,7 +380,6 @@ def pre_setup(self, spec: Optional[LitSpec] = None):
381380

382381
def set_logger_queue(self, queue: Queue):
383382
"""Set the queue for logging events."""
384-
385383
self._logger_queue = queue
386384

387385
def log(self, key, value):

src/litserve/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,6 @@ def _get_request_queue(self, api_path: str):
10981098

10991099
def _register_api_endpoints(self, lit_api: LitAPI, request_type, response_type):
11001100
"""Register endpoint routes for the FastAPI app."""
1101-
11021101
self._callback_runner.trigger_event(EventTypes.ON_SERVER_START.value, litserver=self)
11031102

11041103
# Create handlers

src/litserve/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ def add_ssl_context_from_env(kwargs: dict[str, Any]) -> dict[str, Any]:
322322
returns an empty dictionary.
323323
324324
"""
325-
326325
if "ssl_keyfile" in kwargs and "ssl_certfile" in kwargs:
327326
return kwargs
328327

tests/parity_fastapi/benchmark.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def send_request(args):
5252

5353
def benchmark(num_requests=100, concurrency_level=100, port=8000):
5454
"""Benchmark the ML server."""
55-
5655
# Create a session with appropriate pool size
5756
session = create_session(pool_connections=min(concurrency_level, 100), pool_maxsize=min(concurrency_level, 100))
5857

tests/unit/test_middlewares.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def test_middleware_multiple_initialization():
9292

9393
def test_track_requests_middleware_isolation():
9494
"""Test that _prepare_app_run doesn't modify the original app's middleware list."""
95-
9695
lit_api = ls.test_examples.SimpleLitAPI()
9796
server = ls.LitServer(lit_api, track_requests=True)
9897

tests/unit/test_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ async def test_azip_propagates_stream_errors():
7777
@pytest.mark.skipif(sys.platform == "win32", reason="This test is for non-Windows platforms only.")
7878
def test_generate_random_zmq_address_non_windows(tmpdir):
7979
"""Test generate_random_zmq_address on non-Windows platforms."""
80-
8180
temp_dir = str(tmpdir)
8281
address1 = generate_random_zmq_address(temp_dir=temp_dir)
8382
address2 = generate_random_zmq_address(temp_dir=temp_dir)

0 commit comments

Comments
 (0)