Skip to content

Commit 712ad38

Browse files
committed
fix lockfile_diff.py
1 parent 1240c4a commit 712ad38

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/python/pants/backend/python/util_rules/lockfile_diff.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88
import logging
99
from collections.abc import Mapping
1010
from dataclasses import dataclass
11-
from typing import TYPE_CHECKING, Any
11+
from typing import Any
1212

13-
from packaging.version import parse
14-
15-
if TYPE_CHECKING:
16-
# We seem to get a version of `packaging` that doesn't have `LegacyVersion` when running
17-
# pytest..
18-
from packaging.version import LegacyVersion, Version
13+
from packaging.version import Version, parse
1914

2015
from pants.backend.python.util_rules.pex_requirements import (
2116
LoadedLockfile,
@@ -34,7 +29,7 @@
3429

3530
@dataclass(frozen=True, order=True)
3631
class PythonRequirementVersion:
37-
_parsed: LegacyVersion | Version
32+
_parsed: Version
3833

3934
@classmethod
4035
def parse(cls, version: str) -> PythonRequirementVersion:

0 commit comments

Comments
 (0)