Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove power hugging formatting from preview #2928

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/black/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class Preview(Enum):
"""Individual preview style features."""

string_processing = auto()
hug_simple_powers = auto()


class Deprecated(UserWarning):
Expand Down Expand Up @@ -163,7 +162,9 @@ def __contains__(self, feature: Preview) -> bool:
"""
if feature is Preview.string_processing:
return self.preview or self.experimental_string_processing
return self.preview
# TODO: Remove type ignore comment once preview contains more features
# than just ESP
return self.preview # type: ignore
Comment on lines +165 to +167
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmm? what's up with mypy?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It thinks this code is unreachable because there's only one enum member.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah ^


def get_cache_key(self) -> str:
if self.target_versions:
Expand Down