-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Labels
F: parenthesesToo many parentheses, not enough parentheses, and so on.Too many parentheses, not enough parentheses, and so on.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
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._registeredThe 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
F: parenthesesToo many parentheses, not enough parentheses, and so on.Too many parentheses, not enough parentheses, and so on.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?