Extract the version string from the page content.
(page_content: str)
| 36 | |
| 37 | |
| 38 | def _extract_version(page_content: str) -> Optional[str]: |
| 39 | """Extract the version string from the page content.""" |
| 40 | if not page_content: |
| 41 | return None |
| 42 | |
| 43 | matches = _version_pattern.findall(page_content) |
| 44 | if not matches: |
| 45 | return None |
| 46 | |
| 47 | # Choose the highest lexical value to guard against mixed versions. |
| 48 | return max(matches) |
| 49 | |
| 50 | |
| 51 |
no outgoing calls
no test coverage detected