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.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index c6c1860ea..9009e4c4f 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -877,11 +877,12 @@ class InstanceState(object):
def unmodified(self):
"""a set of keys which have no uncommitted changes"""
- return util.Set([
- key for key in self.manager.keys() if
- key not in self.committed_state
- or (key in self.manager.mutable_attributes and not self.manager[key].impl.check_mutable_modified(self))
- ])
+ return util.Set(
+ key for key in self.manager.keys()
+ if (key not in self.committed_state or
+ (key in self.manager.mutable_attributes and
+ not self.manager[key].impl.check_mutable_modified(self))))
+
unmodified = property(unmodified)
def unloaded(self):
@@ -891,10 +892,10 @@ class InstanceState(object):
was never populated or modified.
"""
- return util.Set([
- key for key in self.manager.keys() if
- key not in self.committed_state and key not in self.dict
- ])
+ return util.Set(
+ key for key in self.manager.keys()
+ if key not in self.committed_state and key not in self.dict)
+
unloaded = property(unloaded)
def expire_attributes(self, attribute_names):