-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatter undocumented deviation: remove parenthesis #7320
Comments
There are two differences here:
# Blacked code
def update_emission_strength():
(
get_rgbw_emission_node_tree(self)
.nodes["Emission"]
.inputs["Strength"]
.default_value # pyright: ignore
) = (self.emission_strength * 2)
(
get_rgbw_emission_node_tree(self)
.nodes["Emission"]
.inputs["Strength"]
.default_value # pyright: ignore
) = (self.emission_strength * 2)
def update_emission_strength():
(get_rgbw_emission_node_tree(self).nodes["Emission"].default_value) = self.emission_strength * 2
def update_emission_strength():
(get_rgbw_emission_node_tree(self).nodes["Emission"].default_valueeeeeeeeeeeeee) = (
self.emission_strength * 2
)
def update_emission_strength():
(get_rgbw_emission_node_tree(self).nodes["Emission"].default_valueeeeeeeeeeeeee) = (
self.emission_strength * 2
)
def update_emission_strength():
(
get_rgbw_emission_node_tree(self)
.nodes["Emission"]
.default_valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
) = (self.emission_strength * 2) |
The parentheses we're considering an intentional deviation. Can be closed once it's documented. The comment positioning deviation is expected because we ignore suppression comments when computing line length. (If you change it to some other comment, we use the same formatting as Black, apart from the extra parentheses on the RHS.) We're not planning to change this for the Beta, but we'll revisit based on feedback around suppression comment handling more generally. |
Black formatting
Ruff formatting
Ruff 0.0.289, line-length 100
The pragma deviation is documented, but not the removal of parenthesis.
I prefer the Ruff formatting.
The text was updated successfully, but these errors were encountered: