Skip to content

Commit c5df529

Browse files
cofinprovinzkraut
authored andcommitted
fix: additional ignores
1 parent b42aeb9 commit c5df529

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

docs/_static/favicon.png

2.41 KB
Loading

docs/_static/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

litestar/_openapi/schema_generation/constrained_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def create_string_constrained_field_schema(
8080
schema.max_length = kwarg_definition.max_length
8181
if kwarg_definition.pattern:
8282
schema.pattern = (
83-
kwarg_definition.pattern.pattern
83+
kwarg_definition.pattern.pattern # type: ignore[attr-defined,unused-ignore]
8484
if isinstance(kwarg_definition.pattern, Pattern) # type: ignore[unreachable]
8585
else kwarg_definition.pattern
8686
)

litestar/datastructures/headers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, headers: Optional[Union[Mapping[str, str], "RawHeaders", Mult
6868

6969
super().__init__(CIMultiDict(headers_))
7070
else:
71-
super().__init__(headers) # type: ignore[arg-type] # pyright: ignore[reportArgumentType]
71+
super().__init__(headers) # type: ignore[arg-type,unused-ignore] # pyright: ignore[reportArgumentType]
7272
self._header_list: Optional[RawHeadersList] = None
7373

7474
@classmethod

litestar/utils/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AsyncCallable:
4141
def __init__(self, fn: Callable[P, T]) -> None: # pyright: ignore
4242
self.func = fn
4343

44-
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Awaitable[T]: # type: ignore[valid-type] # pyright: ignore
44+
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Awaitable[T]: # type: ignore[valid-type,unused-ignore] # pyright: ignore
4545
return sync_to_thread(self.func, *args, **kwargs) # type: ignore[arg-type]
4646

4747

tests/unit/test_plugins/test_pydantic/test_plugin_serialization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def test_decode_json_raises_serialization_exception(model: ModelV1 | ModelV2, de
244244
def test_decode_json_typed(model: ModelV1 | ModelV2, prefer_alias: bool, model_type: type[ModelV1 | ModelV2]) -> None:
245245
dumped_model = _model_dump_json(model, by_alias=prefer_alias)
246246
decoded_model = decode_json(value=dumped_model, target_type=model_type, type_decoders=PydanticInitPlugin.decoders())
247-
assert _model_dump_json(decoded_model, by_alias=prefer_alias) == dumped_model
247+
assert _model_dump_json(decoded_model, by_alias=prefer_alias) == dumped_model # type: ignore[arg-type,unused-ignore]
248248

249249

250250
@pytest.mark.parametrize("prefer_alias", [False, True])
@@ -253,7 +253,7 @@ def test_decode_msgpack_typed(
253253
) -> None:
254254
model_json = _model_dump_json(model, by_alias=prefer_alias)
255255
assert (
256-
decode_msgpack(
256+
decode_msgpack( # type: ignore[attr-defined,unused-ignore]
257257
encode_msgpack(model, serializer=get_serializer(PydanticInitPlugin.encoders(prefer_alias=prefer_alias))),
258258
model_type,
259259
type_decoders=PydanticInitPlugin.decoders(),

tests/unit/test_template/test_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def index() -> Template:
9191
res = client.get("/")
9292
assert res.status_code == 200
9393
assert res.headers["content-type"].startswith(
94-
media_type if isinstance(media_type, str) else media_type.value,
94+
media_type if isinstance(media_type, str) else media_type.value, # type: ignore[union-attr,unused-ignore]
9595
)
9696

9797

0 commit comments

Comments
 (0)