Skip to content

Commit 0575d51

Browse files
authored
Make virtual repr file names unique (#896)
* Make virtual repr file names unique * Add newsfragments
1 parent 03dd713 commit 0575d51

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

changelog.d/895.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``coverage report`` for projects who use ``attrs`` and don't set a ``--source``.

changelog.d/896.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``coverage report`` for projects who use ``attrs`` and don't set a ``--source``.

src/attr/_make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,7 @@ def _add_eq(cls, attrs=None):
18881888
if HAS_F_STRINGS:
18891889

18901890
def _make_repr(attrs, ns, cls):
1891-
unique_filename = "repr"
1891+
unique_filename = _generate_unique_filename(cls, "repr")
18921892
# Figure out which attributes to include, and which function to use to
18931893
# format them. The a.repr value can be either bool or a custom
18941894
# callable.

0 commit comments

Comments
 (0)