Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: YunLiu <[email protected]>
  • Loading branch information
KumoLiu committed Aug 9, 2024
1 parent 0223751 commit f8689c8
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.Version")
pkging, has_ver = optional_import("packaging")
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.Version")
pkging, has_ver = optional_import("packaging")
if has_ver:
try:
return cast(bool, pkging.version.Version(lhs) >= pkging.version.Version(rhs))
Expand Down

0 comments on commit f8689c8

Please sign in to comment.