Skip to content

Conversation

@justinvanwinkle
Copy link

add config params

@peterjc
Copy link
Owner

peterjc commented Feb 14, 2025

Did you mean to read these from the black configuration?

string_normalization=not black_config.get("skip_string_normalization", False),
magic_trailing_comma=not black_config.get("skip_magic_trailing_comma", False),
enable_unstable_feature=config.get("enable_unstable_feature", []),
unstable=config.get("unstable", False),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/psf/black/blob/25.1.0/src/black/mode.py#L226 which defines the class and https://github.com/psf/black/blob/main/src/black/__init__.py#L626 which initializes it - that's what we try to copy.

This does have unstable as a boolean, but uses enabled_features=set(enable_unstable_feature) (a different argument name to what you are trying).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants