File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -70,28 +70,32 @@ class ConversionInfo(TypedDict):
7070
7171
7272CONVERSION_TYPES : dict [str , ConversionInfo ] = {
73- "str" : {
74- "regex" : r"[^/]+" ,
75- "func" : str ,
76- },
7773 "int" : {
7874 "regex" : r"\d+" ,
7975 "func" : int ,
8076 },
81- "float " : {
82- "regex" : r"\d+(\.\d+)? " ,
83- "func" : float ,
77+ "str " : {
78+ "regex" : r"[^/]+ " ,
79+ "func" : str ,
8480 },
8581 "uuid" : {
8682 "regex" : r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" ,
8783 "func" : uuid .UUID ,
8884 },
85+ "slug" : {
86+ "regex" : r"[-a-zA-Z0-9_]+" ,
87+ "func" : str ,
88+ },
8989 "path" : {
9090 "regex" : r".+" ,
9191 "func" : str ,
9292 },
93+ "float" : {
94+ "regex" : r"\d+(\.\d+)?" ,
95+ "func" : float ,
96+ },
9397}
94- """The supported conversion types"""
98+ """The conversion types supported by the default Resolver. You can add more types if needed. """
9599
96100
97101browser_router = create_router (SimpleResolver )
You can’t perform that action at this time.
0 commit comments