@@ -104,7 +104,7 @@ def dict( # noqa: PLR0913 # pragma: no cover
104104 exclude_none : bool = False ,
105105 ) -> dict [str , Any ]:
106106 return self .model_dump (
107- include = include , # ty: ignore
107+ include = include , # ty: ignore[invalid-argument-type]
108108 exclude = set (exclude or ()) | self ._exclude_fields ,
109109 by_alias = by_alias ,
110110 exclude_unset = exclude_unset ,
@@ -672,7 +672,7 @@ def current_base_path_context(self, base_path: Path | None) -> Generator[None, N
672672 """Temporarily set the current base path within a context."""
673673 if base_path :
674674 base_path = (self ._base_path / base_path ).resolve ()
675- with context_variable (self .set_current_base_path , self .current_base_path , base_path ): # ty: ignore
675+ with context_variable (self .set_current_base_path , self .current_base_path , base_path ): # ty: ignore[invalid-argument-type]
676676 yield
677677
678678 @contextmanager
@@ -686,7 +686,7 @@ def base_url_context(self, base_url: str | None) -> Generator[None, None, None]:
686686 this method was previously a no-op.
687687 """
688688 if self ._base_url or (base_url and is_url (base_url )):
689- with context_variable (self .set_base_url , self .base_url , base_url ): # ty: ignore
689+ with context_variable (self .set_base_url , self .base_url , base_url ): # ty: ignore[invalid-argument-type]
690690 yield
691691 else :
692692 yield
@@ -703,7 +703,7 @@ def set_current_root(self, current_root: Sequence[str]) -> None:
703703 @contextmanager
704704 def current_root_context (self , current_root : Sequence [str ]) -> Generator [None , None , None ]:
705705 """Temporarily set the current root path within a context."""
706- with context_variable (self .set_current_root , self .current_root , current_root ): # ty: ignore
706+ with context_variable (self .set_current_root , self .current_root , current_root ): # ty: ignore[invalid-argument-type]
707707 yield
708708
709709 @property
@@ -1407,7 +1407,7 @@ def _get_inflect_engine() -> inflect.engine:
14071407@lru_cache (maxsize = 4096 )
14081408def get_singular_name (name : str , suffix : str = SINGULAR_NAME_SUFFIX ) -> str :
14091409 """Convert a plural name to singular form."""
1410- singular_name = _get_inflect_engine ().singular_noun (cast ("inflect.Word" , name )) # ty: ignore
1410+ singular_name = _get_inflect_engine ().singular_noun (cast ("inflect.Word" , name )) # ty: ignore[redundant-cast]
14111411 if singular_name is False :
14121412 singular_name = f"{ name } { suffix } "
14131413 return singular_name
0 commit comments