Skip to content

Commit

Permalink
[DOP-2330] - update version and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-lixakov committed Jan 9, 2024
1 parent 0f6f295 commit 72a5991
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog/next_release/71.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove ``cover`` method from base ``HWM`` class, it only remains in ``FileHWM`` class
2 changes: 1 addition & 1 deletion etl_entities/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.3
2.2.0
5 changes: 5 additions & 0 deletions etl_entities/hwm/file/file_hwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from __future__ import annotations

import os
from abc import abstractmethod
from typing import Generic, Optional, TypeVar

from pydantic import Field, validator
Expand Down Expand Up @@ -67,6 +68,10 @@ class FileHWM(
class Config: # noqa: WPS431
json_encoders = {AbsolutePath: os.fspath}

@abstractmethod
def covers(self, value: FileHWMValueType) -> bool:
"""Return ``True`` if input value is already covered by HWM"""

def __eq__(self, other):
"""Checks equality of two FileHWM instances
Expand Down
2 changes: 2 additions & 0 deletions etl_entities/hwm/key_value/key_value_int_hwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class KeyValueIntHWM(KeyValueHWM[int]):
)
"""

# employing frozendict without specifying `frozendict[Any, int]`
# due to the lack of support for generic dict annotations in Python 3.7.
value: frozendict = Field(default_factory=frozendict)

def serialize(self) -> dict:
Expand Down

0 comments on commit 72a5991

Please sign in to comment.