File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change 5353 r"^:raises\s+(?P<name>[\w\d_]+)\s*:\s*(?P<description>.*)$" , re .MULTILINE
5454)
5555
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+
5671
5772def ref (model ):
5873 """Return a reference to model in definitions"""
@@ -72,22 +87,6 @@ def extract_path(path):
7287 return RE_URL .sub (r"{\1}" , path )
7388
7489
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-
9190def parse_rule (rule ):
9291 """
9392 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