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

Function supports_feature

src/black/mode.py:242–246  ·  view source on GitHub ↗
(target_versions: set[TargetVersion], feature: Feature)

Source from the content-addressed store, hash-verified

240
241
242def supports_feature(target_versions: set[TargetVersion], feature: Feature) -> bool:
243 if not target_versions:
244 raise ValueError("At least one target Python version must be specified.")
245
246 return all(feature in VERSION_TO_FEATURES[version] for version in target_versions)
247
248
249class Preview(Enum):

Callers 3

_format_str_onceFunction · 0.90
get_grammarsFunction · 0.90
get_grammarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected