@@ -28,9 +28,9 @@ class Route:
28
28
A class representing a route that can be matched against a path.
29
29
30
30
Attributes:
31
- path (str) : The path to match against.
32
- element (Any) : The element to render if the path matches.
33
- routes (Sequence[Self]) : Child routes.
31
+ path: The path to match against.
32
+ element: The element to render if the path matches.
33
+ routes: Child routes.
34
34
35
35
Methods:
36
36
__hash__() -> int: Returns a hash value for the route based on its path, element, and child routes.
@@ -98,7 +98,7 @@ def resolve(self, path: str) -> MatchedRoute | None:
98
98
Return the path's associated element and path parameters or None.
99
99
100
100
Args:
101
- path (str) : The path to resolve.
101
+ path: The path to resolve.
102
102
103
103
Returns:
104
104
A tuple containing the associated element and a dictionary of path parameters, or None if the path cannot be resolved.
@@ -112,9 +112,9 @@ class MatchedRoute:
112
112
Represents a matched route.
113
113
114
114
Attributes:
115
- element (Any) : The element to render.
116
- params (dict[str, Any]) : The parameters extracted from the path.
117
- path (str) : The path that was matched.
115
+ element: The element to render.
116
+ params: The parameters extracted from the path.
117
+ path: The path that was matched.
118
118
"""
119
119
120
120
element : Any
@@ -127,8 +127,8 @@ class ConversionInfo(TypedDict):
127
127
A TypedDict that holds information about a conversion type.
128
128
129
129
Attributes:
130
- regex (str) : The regex to match the conversion type.
131
- func (ConversionFunc) : The function to convert the matched string to the expected type.
130
+ regex: The regex to match the conversion type.
131
+ func: The function to convert the matched string to the expected type.
132
132
"""
133
133
134
134
regex : str
0 commit comments