summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r--lib/sqlalchemy/orm/attributes.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index d50eab03e..9d404e00d 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -328,7 +328,7 @@ def create_proxied_attribute(descriptor):
@util.memoized_property
def comparator(self):
- if util.callable(self._comparator):
+ if callable(self._comparator):
self._comparator = self._comparator()
if self._adapt_to_entity:
self._comparator = self._comparator.adapt_to_entity(
@@ -702,8 +702,10 @@ class AttributeImpl(object):
if not passive & CALLABLES_OK:
return PASSIVE_NO_RESULT
- if self.accepts_scalar_loader and \
- key in state.expired_attributes:
+ if (
+ self.accepts_scalar_loader
+ and key in state.expired_attributes
+ ):
value = state._load_expired(state, passive)
elif key in state.callables:
callable_ = state.callables[key]