We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d0aa9e commit 11b5464Copy full SHA for 11b5464
mypy/plugins/dataclasses.py
@@ -400,7 +400,11 @@ def transform(self) -> bool:
400
401
def _add_dunder_replace(self, attributes: list[DataclassAttribute]) -> None:
402
"""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]
+ args = [
404
+ attr.to_argument(self._cls.info, of="replace")
405
+ for attr in attributes
406
+ if attr.is_in_init
407
+ ]
408
type_vars = [tv for tv in self._cls.type_vars]
409
add_method_to_class(
410
self._api,
0 commit comments