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.
| 26 | |
| 27 | @dataclass |
| 28 | class 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( |
no outgoing calls
no test coverage detected