Check if the include path starts with a likely typo of a valid prefix. Returns the correct prefix if a typo is detected, None otherwise.
(include_path: str)
| 307 | |
| 308 | |
| 309 | def get_typo_suggestion(include_path: str) -> str | None: |
| 310 | """Check if the include path starts with a likely typo of a valid prefix. |
| 311 | |
| 312 | Returns the correct prefix if a typo is detected, None otherwise. |
| 313 | """ |
| 314 | for typo, correct in TYPO_PREFIXES.items(): |
| 315 | if include_path.startswith(typo): |
| 316 | return correct |
| 317 | return None |
| 318 | |
| 319 | |
| 320 | class IncludePathsChecker(FileContentChecker): |
no test coverage detected