Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
thundergolfer committed Aug 30, 2024
1 parent b5f25c6 commit 4388725
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion modal/_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def preload(self, obj, existing_object_id: Optional[str]):
await obj._preload(obj, self, existing_object_id)

async def load(self, obj: "_Object", existing_object_id: Optional[str] = None):
if not obj.is_rehydrating and obj._is_hydrated and obj._is_another_app:
if not obj._is_rehydrating and obj._is_hydrated and obj._is_another_app:
# No need to reload this, it won't typically change
if obj.local_uuid not in self._local_uuid_to_future:
# a bit dumb - but we still need to store a reference to the object here
Expand Down
5 changes: 0 additions & 5 deletions modal/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@ def is_hydrated(self) -> bool:
"""mdmd:hidden"""
return self._is_hydrated

@property
def is_rehydrating(self) -> bool:
"""mdmd:hidden"""
return self._is_rehydrating

@property
def deps(self) -> Callable[..., List["_Object"]]:
"""mdmd:hidden"""
Expand Down

0 comments on commit 4388725

Please sign in to comment.