Skip to content

Commit

Permalink
use ternary assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
levongh committed Aug 3, 2023
1 parent c955c0d commit 8bdbae9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions deeplake/core/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,11 @@ def __getitem__(
else:
indra_item = item

if self.libdeeplake_dataset is None:
libdeeplake_dataset = self.libdeeplake_dataset[indra_item]
else:
libdeeplake_dataset = None
libdeeplake_dataset = (
None
if self.libdeeplake_dataset is None
else self.libdeeplake_dataset[indra_item]
)

ret = self.__class__(
storage=self.storage,
Expand Down

0 comments on commit 8bdbae9

Please sign in to comment.