File tree 1 file changed +15
-16
lines changed
1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change 53
53
r"^:raises\s+(?P<name>[\w\d_]+)\s*:\s*(?P<description>.*)$" , re .MULTILINE
54
54
)
55
55
56
+ RE_PARSE_RULE = re .compile (
57
+ r"""
58
+ (?P<static>[^<]*) # static rule data
59
+ <
60
+ (?:
61
+ (?P<converter>[a-zA-Z_][a-zA-Z0-9_]*) # converter name
62
+ (?:\((?P<args>.*?)\))? # converter arguments
63
+ \: # variable delimiter
64
+ )?
65
+ (?P<variable>[a-zA-Z_][a-zA-Z0-9_]*) # variable name
66
+ >
67
+ """ ,
68
+ re .VERBOSE ,
69
+ )
70
+
56
71
57
72
def ref (model ):
58
73
"""Return a reference to model in definitions"""
@@ -72,22 +87,6 @@ def extract_path(path):
72
87
return RE_URL .sub (r"{\1}" , path )
73
88
74
89
75
- RE_PARSE_RULE = re .compile (
76
- r"""
77
- (?P<static>[^<]*) # static rule data
78
- <
79
- (?:
80
- (?P<converter>[a-zA-Z_][a-zA-Z0-9_]*) # converter name
81
- (?:\((?P<args>.*?)\))? # converter arguments
82
- \: # variable delimiter
83
- )?
84
- (?P<variable>[a-zA-Z_][a-zA-Z0-9_]*) # variable name
85
- >
86
- """ ,
87
- re .VERBOSE ,
88
- )
89
-
90
-
91
90
def parse_rule (rule ):
92
91
"""
93
92
This originally lived in werkzeug.routing.parse_rule until it was removed in werkzeug 2.2.0. Copying it here to
You can’t perform that action at this time.
0 commit comments