From fc63a81b55d4e0f856a467ece1c4219c0a48d402 Mon Sep 17 00:00:00 2001 From: Gram Date: Thu, 7 May 2020 11:24:53 +0200 Subject: [PATCH] fix typing --- deal/linter/_func.py | 2 +- deal/linter/_template.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deal/linter/_func.py b/deal/linter/_func.py index c7f84234..c6337a44 100644 --- a/deal/linter/_func.py +++ b/deal/linter/_func.py @@ -64,7 +64,7 @@ def from_astroid(cls, tree: astroid.Module) -> List['Func']: # make signature code = 'def f({}):0'.format(expr.args.as_string()) - func_args = ast.parse(code).body[0].args + func_args = ast.parse(code).body[0].args # type: ignore # collect contracts contracts = [] diff --git a/deal/linter/_template.py b/deal/linter/_template.py index ec334d4c..13cdc3f7 100644 --- a/deal/linter/_template.py +++ b/deal/linter/_template.py @@ -9,12 +9,12 @@ contract = ... func = ... -base = Base(validator=contract) +base = Base(validator=contract) # type: ignore if func is not Ellipsis: base.function = func try: - base.validate(*args, **kwargs) # noqa: F821 + base.validate(*args, **kwargs) # type: ignore # noqa: F821 except ContractError as exc: result = False if exc.args: