Skip to content

Commit

Permalink
Merge branch 'develop' into Digichem-Project-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed May 11, 2024
2 parents 2261180 + 96d0621 commit 7c932d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion portalocker/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def acquire(
timeout: typing.Optional[float] = None,
check_interval: typing.Optional[float] = None,
fail_when_locked: typing.Optional[bool] = None,
):
) -> 'RedisLock':
timeout = utils.coalesce(timeout, self.timeout, 0.0)
check_interval = utils.coalesce(
check_interval,
Expand Down
9 changes: 5 additions & 4 deletions portalocker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def acquire(
timeout: typing.Optional[float] = None,
check_interval: typing.Optional[float] = None,
fail_when_locked: typing.Optional[bool] = None,
):
return NotImplemented
) -> typing.Union['LockBase', typing.IO[typing.AnyStr]]:
...

def _timeout_generator(
self,
Expand All @@ -157,7 +157,8 @@ def _timeout_generator(

@abc.abstractmethod
def release(self):
return NotImplemented
...


def __enter__(self):
return self.acquire()
Expand Down Expand Up @@ -475,7 +476,7 @@ def get_filename(self, number) -> pathlib.Path:
number=number,
)

def acquire(
def acquire( # type: ignore[reportGeneralTypeIssues]
self,
timeout: typing.Optional[float] = None,
check_interval: typing.Optional[float] = None,
Expand Down
1 change: 0 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ target-version = 'py38'
src = ['portalocker']
exclude = ['docs']

format = 'grouped'
ignore = [
'A001', # Variable {name} is shadowing a Python builtin
'A002', # Argument {name} is shadowing a Python builtin
Expand Down

0 comments on commit 7c932d4

Please sign in to comment.