

def _adjust_fn_spec(self, fn, named):
    if named:
        fn = self._wrap_fn_for_kw(fn)
    if self.legacy_signatures:
        try:
            argspec = util.get_callable_argspec(fn, no_self=True)
        except TypeError:
            pass
        else:
            fn = legacy._wrap_fn_for_legacy(self, fn, argspec)
    return fn

dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/event/attr.py _ClsLevelDispatch._adjust_fn_spec/original