Skip to content

Commit 11b5464

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3d0aa9e commit 11b5464

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mypy/plugins/dataclasses.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,11 @@ def transform(self) -> bool:
400400

401401
def _add_dunder_replace(self, attributes: list[DataclassAttribute]) -> None:
402402
"""Add a `__replace__` method to the class, which is used to replace attributes in the `copy` module."""
403-
args = [attr.to_argument(self._cls.info, of="replace") for attr in attributes if attr.is_in_init]
403+
args = [
404+
attr.to_argument(self._cls.info, of="replace")
405+
for attr in attributes
406+
if attr.is_in_init
407+
]
404408
type_vars = [tv for tv in self._cls.type_vars]
405409
add_method_to_class(
406410
self._api,

0 commit comments

Comments
 (0)