Resolve one extracted bump token against a configured bump map. The first regular-expression key that matches wins, preserving the current user-visible behavior of ``bump_map`` ordering.
(
cls, matched_text: str, increments_map: Mapping[str, object]
)
| 89 | |
| 90 | @classmethod |
| 91 | def from_match( |
| 92 | cls, matched_text: str, increments_map: Mapping[str, object] |
| 93 | ) -> VersionIncrement: |
| 94 | """Resolve one extracted bump token against a configured bump map. |
| 95 | |
| 96 | The first regular-expression key that matches wins, preserving the |
| 97 | current user-visible behavior of ``bump_map`` ordering. |
| 98 | """ |
| 99 | for match_pattern, increment in increments_map.items(): |
| 100 | if re.match(match_pattern, matched_text): |
| 101 | return cls._from_bump_map_value(increment) |
| 102 | return cls.NONE |
| 103 | |
| 104 | @classmethod |
| 105 | def from_message( |
no test coverage detected