Merge pull request #7732 from KOLANICH/__repr___for_Configuration

Added __repr__ for Configuration
This commit is contained in:
Christopher Hunt 2020-03-03 20:20:26 -05:00 committed by GitHub
commit ba9218dde7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

1
news/7737.trivial Normal file
View File

@ -0,0 +1 @@
Added ``__repr__`` for ``Configuration`` to make debugging a bit easier.

View File

@ -420,3 +420,7 @@ class Configuration(object):
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)