Some changes black wants to make to my code:
-on_windows = (os.name == "nt")
+on_windows = os.name == "nt"
- currently_registered = (fd in self._registered)
+ currently_registered = fd in self._registered
The parentheses were originally there to aid readability, by emphasizing that RHS of the = is an unusual-but-valid self-contained expression and not, like, a chained assignment or comprehension or something. Perhaps black should preserve, or even add, parentheses in cases like this? I guess the in case is more debateable, but the = == case is really really easy to misread.
Some changes black wants to make to my code:
The parentheses were originally there to aid readability, by emphasizing that RHS of the
=is an unusual-but-valid self-contained expression and not, like, a chained assignment or comprehension or something. Perhaps black should preserve, or even add, parentheses in cases like this? I guess theincase is more debateable, but the= ==case is really really easy to misread.