You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- if (not original_method or not inspect.isclass(self.mocked_obj) and- inspect.ismethod(original_method)):+ if (+ not original_method+ or not inspect.isclass(self.mocked_obj)+ and inspect.ismethod(original_method)+ ):
Black only keeps extra parentheses when there is more than one operator involved. For single operators, additional parentheses are just visual noise.
What Black is not seeing is a form of symmetry that you do perceive. The simple rule to only keep optional parentheses on more than one operator (of the same priority) works predictably for all cases. Trying to introduce "symmetry" would be bound to fail here and there and would slow things significantly down.
Thanks for your thoughtful report but I'm afraid we can't do much about this unless there is some breakthrough in how to inform Black of symmetry in expressions without killing performance.
Operating system: Windows 10
Python version: 3.6
Black version: 18.6b4
Thanks for the great tool. I had the following today:
IN
OUT
That seems an odd decision. I would rather like to see black doing this
so that the logical operators get visually promoted.
The text was updated successfully, but these errors were encountered: