mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
fix __repr__ methods
This commit is contained in:
parent
96ec4b1004
commit
a0e0c908aa
@ -219,7 +219,7 @@ class AsyncAlias:
|
||||
return ", ".join([str(id(conn)) for conn in self.connections])
|
||||
|
||||
def __repr__(self):
|
||||
return f"<{self.__class__.__name__}: {self}>"
|
||||
return f"<{self.__class__.__name__}: {len(self.connections)} connections>"
|
||||
|
||||
def add_connection(self, connection):
|
||||
setattr(self._connections, "_stack", self.connections + [connection])
|
||||
@ -251,7 +251,7 @@ class AsyncConnectionHandler:
|
||||
return async_alias
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<{self.__class__.__name__}: {self}>"
|
||||
return f"<{self.__class__.__name__}: {self.count} connections>"
|
||||
|
||||
@property
|
||||
def count(self):
|
||||
|
Loading…
Reference in New Issue
Block a user