Skip to content

Commit

Permalink
Revert "minor fix"
Browse files Browse the repository at this point in the history
This reverts commit f8689c8.
  • Loading branch information
KumoLiu committed Aug 9, 2024
1 parent f8689c8 commit e3c3490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monai/utils/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def version_leq(lhs: str, rhs: str) -> bool:
"""

lhs, rhs = str(lhs), str(rhs)
pkging, has_ver = optional_import("packaging")
pkging, has_ver = optional_import("packaging.Version")
if has_ver:
try:
return cast(bool, pkging.version.Version(lhs) <= pkging.version.Version(rhs))
Expand All @@ -591,7 +591,7 @@ def version_geq(lhs: str, rhs: str) -> bool:
"""
lhs, rhs = str(lhs), str(rhs)
pkging, has_ver = optional_import("packaging")
pkging, has_ver = optional_import("packaging.Version")
if has_ver:
try:
return cast(bool, pkging.version.Version(lhs) >= pkging.version.Version(rhs))
Expand Down

0 comments on commit e3c3490

Please sign in to comment.