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):
70
70
71
71
72
72
CONVERSION_TYPES : dict [str , ConversionInfo ] = {
73
- "str" : {
74
- "regex" : r"[^/]+" ,
75
- "func" : str ,
76
- },
77
73
"int" : {
78
74
"regex" : r"\d+" ,
79
75
"func" : int ,
80
76
},
81
- "float " : {
82
- "regex" : r"\d+(\.\d+)? " ,
83
- "func" : float ,
77
+ "str " : {
78
+ "regex" : r"[^/]+ " ,
79
+ "func" : str ,
84
80
},
85
81
"uuid" : {
86
82
"regex" : r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" ,
87
83
"func" : uuid .UUID ,
88
84
},
85
+ "slug" : {
86
+ "regex" : r"[-a-zA-Z0-9_]+" ,
87
+ "func" : str ,
88
+ },
89
89
"path" : {
90
90
"regex" : r".+" ,
91
91
"func" : str ,
92
92
},
93
+ "float" : {
94
+ "regex" : r"\d+(\.\d+)?" ,
95
+ "func" : float ,
96
+ },
93
97
}
94
- """The supported conversion types"""
98
+ """The conversion types supported by the default Resolver. You can add more types if needed. """
95
99
96
100
97
101
browser_router = create_router (SimpleResolver )
You can’t perform that action at this time.
0 commit comments