bpo-36793: Remove unneeded __str__ definitions. (GH-13081)

Classes that define __str__ the same as __repr__ can
just inherit it from object.
This commit is contained in:
Serhiy Storchaka 2019-05-06 22:29:40 +03:00 committed by GitHub
parent 9646630895
commit 96aeaec647
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 25 additions and 33 deletions

View file

@ -1419,8 +1419,7 @@ class IncompleteRead(HTTPException):
e = ''
return '%s(%i bytes read%s)' % (self.__class__.__name__,
len(self.partial), e)
def __str__(self):
return repr(self)
__str__ = object.__str__
class ImproperConnectionState(HTTPException):
pass