Skip to content

Commit 84ad8c9

Browse files
committed
pylock: add is_direct property
1 parent 51ddd3a commit 84ad8c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pip/_internal/models/pylock.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,10 @@ def from_dict(cls, d: Dict[str, Any]) -> "Self":
532532
)
533533
return package
534534

535+
@property
536+
def is_direct(self) -> bool:
537+
return not (self.sdist or self.wheels)
538+
535539

536540
@dataclass(frozen=True)
537541
class Pylock:

0 commit comments

Comments
 (0)