Make virtual repr file names unique (#896)

* Make virtual repr file names unique

* Add newsfragments
This commit is contained in:
Hynek Schlawack 2021-12-29 14:02:59 +01:00 committed by GitHub
parent 03dd7136cf
commit 0575d51ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix ``coverage report`` for projects who use ``attrs`` and don't set a ``--source``.

View File

@ -0,0 +1 @@
Fix ``coverage report`` for projects who use ``attrs`` and don't set a ``--source``.

View File

@ -1888,7 +1888,7 @@ def _add_eq(cls, attrs=None):
if HAS_F_STRINGS:
def _make_repr(attrs, ns, cls):
unique_filename = "repr"
unique_filename = _generate_unique_filename(cls, "repr")
# Figure out which attributes to include, and which function to use to
# format them. The a.repr value can be either bool or a custom
# callable.