Skip to content

Commit 37c2809

Browse files
committed
locker: port base implementation from poetry
1 parent 5566f7d commit 37c2809

File tree

5 files changed

+829
-2
lines changed

5 files changed

+829
-2
lines changed

poetry/core/lock/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from poetry.core.lock.categories import LockCategory
2+
from poetry.core.lock.locker import Locker
3+
4+
5+
__all__ = [
6+
LockCategory.__name__,
7+
Locker.__name__,
8+
]

poetry/core/lock/categories.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from enum import Enum
2+
3+
4+
class LockCategory(Enum):
5+
MAIN = "main"
6+
DEV = "dev"
7+
8+
def __eq__(self, other):
9+
if not isinstance(other, Enum):
10+
return self.value == other
11+
super(LockCategory, self).__eq__(other)

0 commit comments

Comments
 (0)