MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_typo_suggestion

Function get_typo_suggestion

ci/lint_cpp/include_paths_checker.py:309–317  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

307
308
309def 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
320class IncludePathsChecker(FileContentChecker):

Callers 2

check_file_contentMethod · 0.85
apply_fixesFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected