forked from rc/aircox
Feat: packaging (#127)
- Add configuration files for packaging - Precommit now uses ruff Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: rc/aircox#127
This commit is contained in:
@ -51,9 +51,7 @@ class WrapperMixin:
|
||||
ns = None
|
||||
ns_attr = None
|
||||
|
||||
def __init__(
|
||||
self, target=None, ns=None, ns_attr=None, type_interface=None, **kwargs
|
||||
):
|
||||
def __init__(self, target=None, ns=None, ns_attr=None, type_interface=None, **kwargs):
|
||||
self.target = target
|
||||
if ns:
|
||||
self.inject(ns, ns_attr)
|
||||
@ -87,10 +85,7 @@ class WrapperMixin:
|
||||
if self.target is ns_target:
|
||||
return
|
||||
elif self.target is not None and self.ns:
|
||||
raise RuntimeError(
|
||||
"self target already injected. It must be "
|
||||
"`release` before `inject`."
|
||||
)
|
||||
raise RuntimeError("self target already injected. It must be " "`release` before `inject`.")
|
||||
|
||||
self.target = ns_target
|
||||
setattr(ns, ns_attr, self.interface)
|
||||
@ -145,9 +140,7 @@ class SpoofMixin:
|
||||
traces = self.traces[name]
|
||||
if not isinstance(traces, list):
|
||||
traces = (traces,)
|
||||
return tuple(
|
||||
self._get_trace(trace, args=args, kw=kw) for trace in traces
|
||||
)
|
||||
return tuple(self._get_trace(trace, args=args, kw=kw) for trace in traces)
|
||||
|
||||
def _get_trace(self, trace, args=False, kw=False):
|
||||
if (args and kw) or (not args and not kw):
|
||||
|
Reference in New Issue
Block a user