Skip to content

Commit 4161041

Browse files
authored
feat: Update packages and test settings (#55)
* chore: Extend gitignore * chore: update packages * chore: package update * test: monkey patch for running the new mayjor version of pytest-asyncio * test: Change docker container registry * fix: explizit packages * fix: remove gitignore configuration * fix: pylint rollout of the code. * remove .python-version * fix: update dockerfile. * fix: update poetry.lock * fix: add pylint.extensions.empty_comment * fix: .gitiignore add default values * fix: empty row at the end of the file
1 parent c792c22 commit 4161041

File tree

13 files changed

+738
-760
lines changed

13 files changed

+738
-760
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
# Python folders
2-
__pycache__/
3-
41
# OS generated files and folders
52
.DS_Store
6-
npm-debug.log

.pylintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ load-plugins = pylint.extensions.bad_builtin,
1313
pylint.extensions.docstyle,
1414
pylint.extensions.dunder,
1515
pylint.extensions.empty_comment,
16-
pylint.extensions.emptystring,
1716
pylint.extensions.eq_without_hash,
1817
pylint.extensions.for_any_all,
1918
pylint.extensions.magic_value,

eventsourcingdb_client_python/client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
from .handlers.write_events import Precondition, write_events
1919

2020

21+
# pylint: disable=R6007
22+
# Reason: This class explicitly specifies the return type as None
23+
# for better readability. Even though it is not necessary,
24+
# it makes the return type clear without needing to read any
25+
# documentation or code.
2126
class Client(AbstractBaseClient):
2227
def __init__(
2328
self,
@@ -38,7 +43,7 @@ def __init__(
3843
async def initialize(self) -> None:
3944
await self.__http_client.initialize()
4045

41-
async def close(self):
46+
async def close(self) -> None:
4247
await self.__http_client.close()
4348

4449
@property

eventsourcingdb_client_python/event/event.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
Self = TypeVar("Self", bound="Event")
88

9-
9+
# pylint: disable=R0917
10+
# Reason: This class is expected to have many parameters
11+
# due to its business context. Splitting it into smaller
12+
# methods would increase cognitive load and make the
13+
# code less readable.
1014
class Event(EventContext):
1115
def __init__(
1216
self,

eventsourcingdb_client_python/event/source.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
from ..event.event_candidate import EventCandidate
44

55

6+
# pylint: disable=R0917
7+
# Reason: This class is expected to have many parameters
8+
# due to its business context. Splitting it into smaller
9+
# methods would increase cognitive load and make the
10+
# code less readable.
611
@dataclass
712
class Source:
813
source: str

eventsourcingdb_client_python/handlers/observe_events/observe_events.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
from .observe_events_options import ObserveEventsOptions
1919
from ...http_client.response import Response
2020

21-
21+
# pylint: disable=R6007
22+
# Reason: This method explicitly specifies the return type as None
23+
# for better readability. Even though it is not necessary,
24+
# it makes the return type clear without needing to read any
25+
# documentation or code.
2226
async def observe_events(
2327
client: AbstractBaseClient,
2428
subject: str,

eventsourcingdb_client_python/handlers/read_event_types/read_event_types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
from ...errors.validation_error import ValidationError
1313
from ...http_client.response import Response
1414

15-
15+
# pylint: disable=R6007
16+
# Reason: This method explicitly specifies the return type as None
17+
# for better readability. Even though it is not necessary,
18+
# it makes the return type clear without needing to read any
19+
# documentation or code.
1620
async def read_event_types(
1721
client: AbstractBaseClient,
1822
) -> AsyncGenerator[EventType, None]:

eventsourcingdb_client_python/handlers/read_events/read_events.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
from ..store_item import StoreItem
1818
from .read_events_options import ReadEventsOptions
1919

20-
20+
# pylint: disable=R6007
21+
# Reason: This method explicitly specifies the return type as None
22+
# for better readability. Even though it is not necessary,
23+
# it makes the return type clear without needing to read any
24+
# documentation or code.
2125
async def read_events(
2226
client: AbstractBaseClient,
2327
subject: str,

eventsourcingdb_client_python/handlers/read_subjects/read_subjects.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
from .is_subject import is_subject
1515
from ...event.validate_subject import validate_subject
1616

17-
17+
# pylint: disable=R6007
18+
# Reason: This method explicitly specifies the return type as None
19+
# for better readability. Even though it is not necessary,
20+
# it makes the return type clear without needing to read any
21+
# documentation or code.
1822
async def read_subjects(
1923
client: AbstractBaseClient,
2024
base_subject: str

poetry.lock

Lines changed: 684 additions & 742 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)