Skip to content

Commit f6dc329

Browse files
committed
fixed type checking
1 parent f6dab5d commit f6dc329

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ellar/core/routing/route.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ def __init__(
6969
self._load_model()
7070

7171
def _load_model(self) -> None:
72-
extra_route_args: t.List["ExtraEndpointArg"] = (
72+
extra_route_args: t.Union[t.List["ExtraEndpointArg"], "ExtraEndpointArg"] = (
7373
reflect.get_metadata(EXTRA_ROUTE_ARGS_KEY, self.endpoint) or []
7474
)
75+
if not isinstance(extra_route_args, list):
76+
extra_route_args = [extra_route_args]
7577

7678
if self.endpoint_parameter_model is NOT_SET:
7779
self.endpoint_parameter_model = self.request_endpoint_args_model(

0 commit comments

Comments
 (0)