MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / guarded

Function guarded

asyncpg/connresource.py:14–22  ·  view source on GitHub ↗

A decorator to add a sanity check to ConnectionResource methods.

(meth)

Source from the content-addressed store, hash-verified

12
13
14def guarded(meth):
15 """A decorator to add a sanity check to ConnectionResource methods."""
16
17 @functools.wraps(meth)
18 def _check(self, *args, **kwargs):
19 self._check_conn_validity(meth.__name__)
20 return meth(self, *args, **kwargs)
21
22 return _check
23
24
25class ConnectionResource:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…