diff --git a/ninja/operation.py b/ninja/operation.py index a63fb8ee..455a1668 100644 --- a/ninja/operation.py +++ b/ninja/operation.py @@ -60,7 +60,7 @@ def __init__( self.path: str = path self.methods: List[str] = methods self.view_func: Callable = view_func - self.api: "NinjaAPI" = cast("NinjaAPI", None) + self.api: NinjaAPI = cast("NinjaAPI", None) if url_name is not None: self.url_name = url_name diff --git a/ninja/router.py b/ninja/router.py index 13e26d41..f471e80b 100644 --- a/ninja/router.py +++ b/ninja/router.py @@ -36,7 +36,7 @@ def __init__( throttle: Union[BaseThrottle, List[BaseThrottle], NOT_SET_TYPE] = NOT_SET, tags: Optional[List[str]] = None, ) -> None: - self.api: Optional["NinjaAPI"] = None + self.api: Optional[NinjaAPI] = None self.auth = auth self.throttle = throttle self.tags = tags