Skip to content

Commit

Permalink
localy disable no-member for now because of some python3.12/pylint ba…
Browse files Browse the repository at this point in the history
…d combo
  • Loading branch information
Anvil committed Nov 24, 2023
1 parent 048488a commit fc6a182
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kaioretry/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@ def __success(self, func: Function) -> None:
self.__log(
logging.INFO, "%s has succesfully completed", func.__name__)

# pylint: disable=inconsistent-return-statements
def __retry(self, func: Callable[FuncParam, FuncRetVal],
*args: FuncParam.args,
**kwargs: FuncParam.kwargs) -> FuncRetVal:
# pylint: disable=inconsistent-return-statements
# For some reason, pylint and python 3.12 seem to raise false
# positives no-members warnings on ParamSpec.
# pylint: disable=no-member
for _ in self.__context:
try:
result = func(*args, **kwargs)
Expand Down Expand Up @@ -206,6 +209,8 @@ async def __aioretry(
Callable[FuncParam, FuncRetVal],
*args: FuncParam.args,
**kwargs: FuncParam.kwargs) -> FuncRetVal:
# See above.
# pylint: disable=no-member
async for _ in self.__context:
try:
result = func(*args, **kwargs)
Expand Down

0 comments on commit fc6a182

Please sign in to comment.