-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.F: parenthesesToo many parentheses, not enough parentheses, and so on.Too many parentheses, not enough parentheses, and so on.F: stringsRelated to our handling of stringsRelated to our handling of stringsT: bugSomething isn't workingSomething isn't working
Description
% cat quash.py
class X:
def generate_shared_lib_init(self) -> None:
emitter.emit_lines(
"{",
(
'static PyModuleDef def = {{ PyModuleDef_HEAD_INIT, "{}", NULL, -1, NULL, NULL }};'.format(
shared_lib_name(self.group_name)
)
),
)
% black --preview --diff quash.py
--- quash.py 2022-12-09 03:02:23.973269 +0000
+++ quash.py 2022-12-09 03:03:57.327044 +0000
@@ -1,10 +1,7 @@
class X:
def generate_shared_lib_init(self) -> None:
emitter.emit_lines(
"{",
- (
- 'static PyModuleDef def = {{ PyModuleDef_HEAD_INIT, "{}", NULL, -1, NULL, NULL }};'.format(
- shared_lib_name(self.group_name)
- )
- ),
+ 'static PyModuleDef def = {{ PyModuleDef_HEAD_INIT, "{}", NULL, -1, NULL, NULL }};'
+ .format(shared_lib_name(self.group_name)),
)
would reformat quash.py
All done! ✨ 🍰 ✨
1 file would be reformatted.
I like the old code better so I wouldn't want stable style to start behaving like this (ref. #3407).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.F: parenthesesToo many parentheses, not enough parentheses, and so on.Too many parentheses, not enough parentheses, and so on.F: stringsRelated to our handling of stringsRelated to our handling of stringsT: bugSomething isn't workingSomething isn't working