MCPcopy
hub / github.com/MagicStack/asyncpg / __repr__

Method __repr__

asyncpg/transaction.py:229–246  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

227 await self.__rollback()
228
229 def __repr__(self):
230 attrs = []
231 attrs.append('state:{}'.format(self._state.name.lower()))
232
233 if self._isolation is not None:
234 attrs.append(self._isolation)
235 if self._readonly:
236 attrs.append('readonly')
237 if self._deferrable:
238 attrs.append('deferrable')
239
240 if self.__class__.__module__.startswith('asyncpg.'):
241 mod = 'asyncpg'
242 else:
243 mod = self.__class__.__module__
244
245 return '<{}.{} {} {:#x}>'.format(
246 mod, self.__class__.__name__, ' '.join(attrs), id(self))

Callers

nothing calls this directly

Calls 1

lowerMethod · 0.80

Tested by

no test coverage detected