Skip to content

Commit f03f49e

Browse files
committed
Changes to docs of Route.matches
1 parent 77ec7a6 commit f03f49e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

adafruit_httpserver/route.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ def matches(
8888
self, method: str, path: str
8989
) -> Union[Tuple[Literal[False], None], Tuple[Literal[True], Dict[str, str]]]:
9090
"""
91-
Checks if the route matches the other route.
91+
Checks if the route matches given ``method`` and ``path``.
9292
93-
If the route contains parameters, it will check if the ``other`` route contains values for
93+
If the route contains parameters, it will check if the ``path`` contains values for
9494
them.
9595
96-
Returns tuple of a boolean and a list of strings. The boolean indicates if the routes match,
97-
and the list contains the values of the url parameters from the ``other`` route.
96+
Returns tuple of a boolean that indicates if the routes matches and a dict containing
97+
values for url parameters.
98+
If the route does not match ``path`` or ``method`` if will return ``None`` instead of dict.
9899
99100
Examples::
100101

0 commit comments

Comments
 (0)