Commit 3a0c3428 authored by Frank Bessou's avatar Frank Bessou 🍁
Browse files

fix(lint): make flake8 accept some monkeypatches

parent a1557398e80d
......@@ -158,12 +158,12 @@ def st_check_backend(self, backend: Any, funcnode: "rql.nodes.Function") -> None
@monkeypatch(FunctionDescr) # type: ignore[no-redef]
def rql_return_type(self, funcnode: "rql.nodes.Function") -> Optional[str]: # noqa
def rql_return_type(self, funcnode: "rql.nodes.Function") -> Optional[str]:
return self.rtype
@monkeypatch(CAST) # type: ignore[no-redef]
def st_description( # noqa
@monkeypatch(CAST) # type: ignore[no-redef] # noqa: F811
def st_description( # noqa: F811
self,
funcnode: "rql.nodes.Function",
mainindex: Optional[int],
......@@ -172,8 +172,8 @@ def st_description( # noqa
return self.rql_return_type(funcnode)
@monkeypatch(CAST) # type: ignore[no-redef]
def rql_return_type(self, funcnode: "rql.nodes.Function") -> str: # noqa
@monkeypatch(CAST) # type: ignore[no-redef] # noqa: F811
def rql_return_type(self, funcnode: "rql.nodes.Function") -> str: # noqa: F811
# mypy: "BaseNode" has no attribute "value" [attr-defined]
# this is black magic to set rql_return_type to logilab.database classes
# this code assume that CAST only works with nodes that has a value
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment