Skip to content

Commit

Permalink
Enum comparison using identity
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
felix-hilden and JelleZijlstra committed Jan 20, 2022
1 parent 782b2fd commit e8deed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/black/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __contains__(self, feature: Preview) -> bool:
The argument is not checked and features are not differentiated.
They only exist to make development easier by clarifying intent.
"""
if feature == Preview.string_processing:
if feature is Preview.string_processing:
return self.preview or self.experimental_string_processing
return self.preview

Expand Down

0 comments on commit e8deed4

Please sign in to comment.