Skip to content

Commit

Permalink
import unnecessary after exception
Browse files Browse the repository at this point in the history
Co-authored-by: guarin <[email protected]>
  • Loading branch information
liopeer and guarin authored Nov 11, 2024
1 parent 22d8058 commit c963024
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lightly/utils/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ def torchvision_transforms_v2_available() -> bool:
True if transforms.v2 are available, False otherwise
"""
try:
from torchvision.transforms import v2 as torchvision_transforms
from torchvision.transforms import v2
except ImportError:

Check warning on line 56 in lightly/utils/dependency.py

View check run for this annotation

Codecov / codecov/patch

lightly/utils/dependency.py#L56

Added line #L56 was not covered by tests
from torchvision import transforms as torchvision_transforms

return False

Check warning on line 58 in lightly/utils/dependency.py

View check run for this annotation

Codecov / codecov/patch

lightly/utils/dependency.py#L58

Added line #L58 was not covered by tests
return True

0 comments on commit c963024

Please sign in to comment.