MCPcopy
hub / github.com/pallets/werkzeug / RulePart

Class RulePart

src/werkzeug/routing/rules.py:28–42  ·  view source on GitHub ↗

A part of a rule. Rules can be represented by parts as delimited by `/` with instances of this class representing those parts. The *content* is either the raw content if *static* or a regex string to match against. The *weight* can be used to order parts when matching.

Source from the content-addressed store, hash-verified

26
27@dataclass
28class RulePart:
29 """A part of a rule.
30
31 Rules can be represented by parts as delimited by `/` with
32 instances of this class representing those parts. The *content* is
33 either the raw content if *static* or a regex string to match
34 against. The *weight* can be used to order parts when matching.
35
36 """
37
38 content: str
39 final: bool
40 static: bool
41 suffixed: bool
42 weight: Weighting
43
44
45_part_re = re.compile(

Callers 2

_parse_ruleMethod · 0.85
compileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected