Skip to content

Commit 73266e3

Browse files
committed
pre-commit-autoupdate-2026-02-25
1 parent 5b0a9f1 commit 73266e3

File tree

10 files changed

+23
-25
lines changed

10 files changed

+23
-25
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.12.3
4+
rev: v0.15.2
55
hooks:
66
# Run the linter.
77
- id: ruff-check
88
args: [ --fix ]
99
# Run the formatter.
1010
- id: ruff-format
1111
- repo: https://github.com/tox-dev/pyproject-fmt
12-
rev: "v2.5.0"
12+
rev: v2.16.2
1313
hooks:
14-
- id: pyproject-fmt
14+
- id: pyproject-fmt

examples/django/pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ classifiers = [
1010
"Programming Language :: Python :: 3.11",
1111
"Programming Language :: Python :: 3.12",
1212
"Programming Language :: Python :: 3.13",
13+
"Programming Language :: Python :: 3.14",
1314
]
1415
dependencies = [
1516
"daphne>=4.2",
1617
"datastar-py>=0.4.4",
1718
"django>=5.2.1",
1819
]
1920

20-
[tool.uv.sources]
21-
datastar-py = { path = "../../" }
21+
[tool.uv]
22+
sources.datastar-py = { path = "../../" }

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[build-system]
22
build-backend = "hatchling.build"
3-
43
requires = [ "hatchling" ]
54

65
[project]
@@ -39,9 +38,9 @@ classifiers = [
3938
"Programming Language :: Python :: 3.11",
4039
"Programming Language :: Python :: 3.12",
4140
"Programming Language :: Python :: 3.13",
41+
"Programming Language :: Python :: 3.14",
4242
]
43-
44-
dependencies = [ ]
43+
dependencies = []
4544
urls.Documentation = "https://github.com/starfederation/datastar-python/blob/develop/README.md"
4645
urls.GitHub = "https://github.com/starfederation/datastar-python"
4746

src/datastar_py/django.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3-
from collections.abc import Awaitable, Mapping
3+
from collections.abc import Awaitable, Callable, Mapping
44
from functools import wraps
5-
from typing import Any, Callable, ParamSpec
5+
from typing import Any, ParamSpec
66

77
from django.http import HttpRequest
88
from django.http import StreamingHttpResponse as _StreamingHttpResponse

src/datastar_py/fastapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Annotated, Any, Union
1+
from typing import Annotated, Any
22

33
from fastapi import Depends
44

@@ -15,4 +15,4 @@
1515
]
1616

1717

18-
ReadSignals = Annotated[Union[dict[str, Any], None], Depends(read_signals)]
18+
ReadSignals = Annotated[dict[str, Any] | None, Depends(read_signals)]

src/datastar_py/litestar.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from __future__ import annotations
22

3-
from collections.abc import Awaitable, Mapping
3+
from collections.abc import Awaitable, Callable, Mapping
44
from functools import wraps
55
from typing import (
66
TYPE_CHECKING,
77
Any,
8-
Callable,
98
ParamSpec,
109
)
1110

src/datastar_py/quart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import annotations
22

3-
from collections.abc import Awaitable, Mapping
3+
from collections.abc import Awaitable, Callable, Mapping
44
from functools import wraps
55
from inspect import isasyncgen, isasyncgenfunction, isgenerator
6-
from typing import Any, Callable, ParamSpec
6+
from typing import Any, ParamSpec
77

88
from quart import Response, copy_current_request_context, request, stream_with_context
99

src/datastar_py/sanic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from __future__ import annotations
22

3-
from collections.abc import Awaitable, Collection, Mapping
3+
from collections.abc import Awaitable, Callable, Collection, Mapping
44
from contextlib import aclosing, closing
55
from functools import wraps
66
from inspect import isasyncgen, isgenerator
7-
from typing import Any, Callable, ParamSpec, Union
7+
from typing import Any, ParamSpec
88

99
from sanic import HTTPResponse, Request
1010

@@ -92,7 +92,7 @@ async def wrapper(*args: P.args, **kwargs: P.kwargs) -> DatastarResponse | None:
9292
return None
9393
return DatastarResponse(r)
9494

95-
wrapper.__annotations__["return"] = Union[DatastarResponse, None]
95+
wrapper.__annotations__["return"] = DatastarResponse | None
9696
return wrapper
9797

9898

src/datastar_py/sse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44
from collections.abc import AsyncIterable, Iterable, Mapping
55
from itertools import chain
6-
from typing import Literal, Protocol, TypeAlias, Union, overload, runtime_checkable
6+
from typing import Literal, Protocol, TypeAlias, overload, runtime_checkable
77

88
import datastar_py.consts as consts
99
from datastar_py.attributes import _escape
@@ -32,9 +32,9 @@ class DatastarEvent(str):
3232

3333

3434
# 0..N datastar events
35-
DatastarEvents: TypeAlias = Union[
36-
DatastarEvent, Iterable[DatastarEvent], AsyncIterable[DatastarEvent], None
37-
]
35+
DatastarEvents: TypeAlias = (
36+
DatastarEvent | Iterable[DatastarEvent] | AsyncIterable[DatastarEvent] | None
37+
)
3838

3939

4040
class ServerSentEventGenerator:

src/datastar_py/starlette.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from __future__ import annotations
22

3-
from collections.abc import Awaitable, Mapping
3+
from collections.abc import Awaitable, Callable, Mapping
44
from functools import wraps
55
from typing import (
66
TYPE_CHECKING,
77
Any,
8-
Callable,
98
ParamSpec,
109
)
1110

0 commit comments

Comments
 (0)