Skip to content

Commit d3eb8ae

Browse files
author
Matt Sokoloff
committed
yapf
1 parent 8c505f2 commit d3eb8ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

labelbox/orm/model.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,14 @@ def raise_for_nested_cache(first: str, middle: str, last: List[str]):
257257
f"`{first}` caches `{middle}` which caches `{last}`")
258258

259259
@staticmethod
260-
def cached_entities(entity_name : str):
260+
def cached_entities(entity_name: str):
261261
"""
262262
Return all cached entites for a given Entity name
263263
"""
264264
cached_entities = EntityMeta.relationship_mappings.get(entity_name, [])
265-
return {entity.name : entity for entity in cached_entities if entity.cache}
265+
return {
266+
entity.name: entity for entity in cached_entities if entity.cache
267+
}
266268

267269
def validate_cached_relationships(cls):
268270
"""
@@ -289,7 +291,7 @@ def validate_cached_relationships(cls):
289291
cls.raise_for_nested_cache(utils.snake_case(cls.__name__),
290292
rel.name, list(nested.keys()))
291293

292-
# If the current Entity (cls) has any cached relationships (cached_rels)
294+
# If the current Entity (cls) has any cached relationships (cached_rels)
293295
# then no other defined Entity (entities in EntityMeta.relationship_mappings) can cache this Entity.
294296
if cached_rels:
295297
# For all currently defined Entities

0 commit comments

Comments
 (0)