Skip to content

Commit

Permalink
locker: port base implementation from poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
abn committed Sep 26, 2020
1 parent 9bb1a37 commit 4e9c18b
Show file tree
Hide file tree
Showing 5 changed files with 829 additions and 2 deletions.
8 changes: 8 additions & 0 deletions poetry/core/lock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from poetry.core.lock.categories import LockCategory
from poetry.core.lock.locker import Locker


__all__ = [
LockCategory.__name__,
Locker.__name__,
]
11 changes: 11 additions & 0 deletions poetry/core/lock/categories.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from enum import Enum


class LockCategory(Enum):
MAIN = "main"
DEV = "dev"

def __eq__(self, other):
if not isinstance(other, Enum):
return self.value == other
super(LockCategory, self).__eq__(other)
Loading

0 comments on commit 4e9c18b

Please sign in to comment.