1- # ruff: noqa: F841, SLF001
1+ # ruff: noqa: SLF001
22from __future__ import annotations
33
44import abc
@@ -530,7 +530,7 @@ def schema(self) -> Schema:
530530 else :
531531 nested = typing .cast ("Schema" , self .nested )
532532 # defer the import of `marshmallow.schema` to avoid circular imports
533- from marshmallow .schema import Schema
533+ from marshmallow .schema import Schema # noqa: PLC0415
534534
535535 if isinstance (nested , dict ):
536536 nested = Schema .from_dict (nested )
@@ -558,7 +558,7 @@ def schema(self) -> Schema:
558558 f"`Schema`, not { nested .__class__ } ."
559559 )
560560 else :
561- schema_class = class_registry .get_class (nested , all = False )
561+ schema_class = class_registry .get_class (nested , all = False ) # type: ignore[unreachable]
562562 self ._schema = schema_class (
563563 many = self .many ,
564564 only = self .only ,
@@ -591,7 +591,9 @@ def _test_collection(self, value: typing.Any) -> None:
591591 raise self .make_error ("type" , input = value , type = value .__class__ .__name__ )
592592
593593 def _load (
594- self , value : typing .Any , partial : bool | types .StrSequenceOrSet | None = None
594+ self ,
595+ value : typing .Any ,
596+ partial : bool | types .StrSequenceOrSet | None = None , # noqa: FBT001
595597 ):
596598 try :
597599 valid_data = self .schema .load (value , unknown = self .unknown , partial = partial )
@@ -606,7 +608,7 @@ def _deserialize(
606608 value : typing .Any ,
607609 attr : str | None ,
608610 data : typing .Mapping [str , typing .Any ] | None ,
609- partial : bool | types .StrSequenceOrSet | None = None ,
611+ partial : bool | types .StrSequenceOrSet | None = None , # noqa: FBT001
610612 ** kwargs ,
611613 ):
612614 """Same as :meth:`Field._deserialize` with additional ``partial`` argument.
0 commit comments