"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "poetry/installation/operations/operation.py" between
poetry-1.1.15.tar.gz and poetry-1.2.0.tar.gz

About: Poetry is a tool for dependency management and packaging in Python.

operation.py  (poetry-1.1.15):operation.py  (poetry-1.2.0)
# -*- coding: utf-8 -*- from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING
from typing import TypeVar
class Operation(object): if TYPE_CHECKING:
def __init__( from poetry.core.packages.package import Package
self, reason=None, priority=0
): # type: (Union[str, None], int) -> None T = TypeVar("T", bound="Operation")
class Operation:
def __init__(self, reason: str | None = None, priority: int | float = 0) ->
None:
self._reason = reason self._reason = reason
self._skipped = False self._skipped = False
self._skip_reason = None self._skip_reason: str | None = None
self._priority = priority self._priority = priority
@property @property
def job_type(self): # type: () -> str def job_type(self) -> str:
raise NotImplementedError raise NotImplementedError
@property @property
def reason(self): # type: () -> str def reason(self) -> str | None:
return self._reason return self._reason
@property @property
def skipped(self): # type: () -> bool def skipped(self) -> bool:
return self._skipped return self._skipped
@property @property
def skip_reason(self): # type: () -> Union[str, None] def skip_reason(self) -> str | None:
return self._skip_reason return self._skip_reason
@property @property
def priority(self): # type: () -> int def priority(self) -> float | int:
return self._priority return self._priority
@property @property
def package(self): def package(self) -> Package:
raise NotImplementedError() raise NotImplementedError()
def format_version(self, package): # type: (...) -> str def format_version(self, package: Package) -> str:
return package.full_pretty_version version: str = package.full_pretty_version
return version
def skip(self, reason): # type: (str) -> Operation def skip(self: T, reason: str) -> T:
self._skipped = True self._skipped = True
self._skip_reason = reason self._skip_reason = reason
return self return self
def unskip(self): # type: () -> Operation def unskip(self: T) -> T:
self._skipped = False self._skipped = False
self._skip_reason = None self._skip_reason = None
return self return self
 End of changes. 13 change blocks. 
17 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)