MCPcopy Index your code
hub / github.com/codespell-project/codespell / fix_case

Function fix_case

codespell_lib/_text_util.py:20–27  ·  view source on GitHub ↗
(word: str, fixword: str)

Source from the content-addressed store, hash-verified

18
19
20def fix_case(word: str, fixword: str) -> str:
21 if word == word.capitalize():
22 return ", ".join(w.strip().capitalize() for w in fixword.split(","))
23 if word == word.upper():
24 return fixword.upper()
25 # they are both lower case
26 # or we don't have any idea
27 return fixword

Callers 3

ask_for_word_fixFunction · 0.85
parse_linesFunction · 0.85
parse_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…