DEDENT_CLOSING_BRACKETS doesn't always dedent
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
I've `DEDENT_CLOSING_BRACKETS = true`, and it most of the times, but not sometimes.
Here's a change that yapf applies:
```diff
@@ -942,13 +934,12 @@ class Order(BaseOrder):
paths[link_name] = target
for image in p.product.images.all():
- link_name = (
- '{product}/P-{order}/originals/{filename}'
- ).format(
- product=p.product_name,
- order=self.pk,
- filename=image.photo.original_filename,
- )
+ link_name = ('{product}/P-{order}/originals/{filename}'
+ ).format(
+ product=p.product_name,
+ order=self.pk,
+ filename=image.photo.original_filename,
+ )
target = image.photo.image
paths[link_name] = target
```
I think that becuase `).format` doesn't fit in this line, it moves it into the next (although the arguments and the closing bracket by themselves do fit), but doesn't respect dedenting.
Contributor guide
Assessment
This issue has not been assessed yet.