Skip to content

Commit 12fa932

Browse files
committed
renamed InputClassType to ControllerClassType
1 parent b76b9d2 commit 12fa932

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ninja_extra/controllers/base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ class SomeController(ControllerBase):
245245
model_config: Optional[ModelConfig] = None
246246

247247

248-
InputClassType = TypeVar(
249-
"InputClassType",
248+
ControllerClassType = TypeVar(
249+
"ControllerClassType",
250250
bound=Union[Type[ControllerBase], Type],
251251
)
252252

@@ -347,7 +347,7 @@ def tags(self, value: Union[str, List[str], None]) -> None:
347347
tag = [value]
348348
self._tags = tag
349349

350-
def __call__(self, cls: InputClassType) -> InputClassType:
350+
def __call__(self, cls: ControllerClassType) -> ControllerClassType:
351351
from ninja_extra.throttling import throttle
352352

353353
self.auto_import = getattr(cls, "auto_import", self.auto_import)
@@ -527,12 +527,12 @@ def api_controller(
527527

528528

529529
def api_controller(
530-
prefix_or_class: Union[str, InputClassType] = "",
530+
prefix_or_class: Union[str, ControllerClassType] = "",
531531
auth: Any = NOT_SET,
532532
tags: Union[Optional[List[str]], str] = None,
533533
permissions: Optional["PermissionType"] = None,
534534
auto_import: bool = True,
535-
) -> Union[InputClassType, Callable[[InputClassType], InputClassType]]:
535+
) -> Union[ControllerClassType, Callable[[ControllerClassType], ControllerClassType]]:
536536
if isinstance(prefix_or_class, type):
537537
return APIController(
538538
prefix="",
@@ -542,7 +542,7 @@ def api_controller(
542542
auto_import=auto_import,
543543
)(prefix_or_class)
544544

545-
def _decorator(cls: InputClassType) -> InputClassType:
545+
def _decorator(cls: ControllerClassType) -> ControllerClassType:
546546
return APIController(
547547
prefix=str(prefix_or_class),
548548
auth=auth,

0 commit comments

Comments
 (0)