MCPcopy Index your code
hub / github.com/saltstack/salt / _cp1252_encodable

Function _cp1252_encodable

tools/precommit/docstrings.py:1216–1222  ·  view source on GitHub ↗

Return ``True`` iff *ch* (a single character) is cp1252-encodable.

(ch: str)

Source from the content-addressed store, hash-verified

1214
1215
1216def _cp1252_encodable(ch: str) -> bool:
1217 """Return ``True`` iff *ch* (a single character) is cp1252-encodable."""
1218 try:
1219 ch.encode("cp1252")
1220 except UnicodeEncodeError:
1221 return False
1222 return True

Callers 1

check_cp1252_docstringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected