MCPcopy
hub / github.com/psf/black / _version_mismatch_message

Function _version_mismatch_message

src/black/__init__.py:215–224  ·  view source on GitHub ↗
(target_versions: set[TargetVersion])

Source from the content-addressed store, hash-verified

213
214
215def _version_mismatch_message(target_versions: set[TargetVersion]) -> str:
216 max_target = max(target_versions, key=lambda tv: tv.value)
217 runtime = f"{sys.version_info[0]}.{sys.version_info[1]}"
218 return (
219 f"Python {runtime} cannot parse code formatted for"
220 f" {max_target.pretty()}. To fix this: run Black with"
221 f" {max_target.pretty()}, set --target-version to"
222 f" py3{sys.version_info[1]}, or use --fast to skip the safety"
223 " check."
224 )
225
226
227def enable_unstable_feature_callback(

Callers 2

mainFunction · 0.85

Calls 1

prettyMethod · 0.80

Tested by

no test coverage detected