]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- use "True" to indicate self-inspects, remove a lambda call
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Jul 2012 00:52:04 +0000 (20:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Jul 2012 00:52:04 +0000 (20:52 -0400)
lib/sqlalchemy/inspection.py

index 34a47217b2269bb9cbf85591f726067ca2adb4d2..f9c345dce5e6e05413ec9ab501f54e30271b79a5 100644 (file)
@@ -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