diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-23 20:52:04 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-23 20:52:04 -0400 |
commit | ec1762e6204a84207332cf1b2a0f0df4b5bc8937 (patch) | |
tree | ad458a8335b5fce50bf09501612fa6b3cf5f5049 /lib/sqlalchemy/inspection.py | |
parent | 65bdf245c6cfd4381f8463714fbec1880a950fbb (diff) | |
download | sqlalchemy-ec1762e6204a84207332cf1b2a0f0df4b5bc8937.tar.gz |
- use "True" to indicate self-inspects, remove a lambda call
Diffstat (limited to 'lib/sqlalchemy/inspection.py')
-rw-r--r-- | lib/sqlalchemy/inspection.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/inspection.py b/lib/sqlalchemy/inspection.py index 34a47217b..f9c345dce 100644 --- a/lib/sqlalchemy/inspection.py +++ b/lib/sqlalchemy/inspection.py @@ -56,6 +56,8 @@ def inspect(subject, raiseerr=True): for cls in type_.__mro__: if cls in _registrars: reg = _registrars[cls] + if reg is True: + return subject ret = reg(subject) if ret is not None: break @@ -83,4 +85,4 @@ def _inspects(*types): return decorate def _self_inspects(*types): - _inspects(*types)(lambda subject:subject)
\ No newline at end of file + _inspects(*types)(True)
\ No newline at end of file |