From 0cbf30cad46433487ae9452ae03f217a7947acd5 Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Tue, 15 Mar 2022 16:31:42 +0530 Subject: [PATCH] Remove power hugging formatting from preview It is falsely placed in preview features and always formats the power operators, it was added in #2789 but there is no check for formatting added along with it. --- src/black/mode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/black/mode.py b/src/black/mode.py index 455ed36e27e..35a072c23e0 100644 --- a/src/black/mode.py +++ b/src/black/mode.py @@ -127,7 +127,6 @@ class Preview(Enum): """Individual preview style features.""" string_processing = auto() - hug_simple_powers = auto() class Deprecated(UserWarning): @@ -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 def get_cache_key(self) -> str: if self.target_versions: