Skip to content

Commit

Permalink
Merge pull request #7732 from KOLANICH/__repr___for_Configuration
Browse files Browse the repository at this point in the history
Added __repr__ for Configuration
  • Loading branch information
chrahunt authored Mar 4, 2020
2 parents bf0da0f + 958f4ec commit ba9218d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/7737.trivial
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ``__repr__`` for ``Configuration`` to make debugging a bit easier.
4 changes: 4 additions & 0 deletions src/pip/_internal/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,7 @@ def _mark_as_modified(self, fname, parser):
file_parser_tuple = (fname, parser)
if file_parser_tuple not in self._modified_parsers:
self._modified_parsers.append(file_parser_tuple)

def __repr__(self):
# type: () -> str
return "{}({!r})".format(self.__class__.__name__, self._dictionary)

0 comments on commit ba9218d

Please sign in to comment.