From bc1eab86468f30d9c59c03658d6186012f31354a Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Fri, 27 Aug 2021 19:36:26 +0200 Subject: [PATCH] Skip following import and skip flask type to mypy code analysis. As suggested in this issue https://github.com/python/mypy/issues/7484#issuecomment-529363083 we skip following import becuase with the recent version of mypy the __init__.py file make confusione inside the analysis (in the python issue it is unclear the main motivation of this issue. At list unclear to me). Signed-off-by: Vincenzo Palazzo --- contrib/pyln-client/Makefile | 2 +- contrib/pyln-testing/Makefile | 2 +- contrib/pyln-testing/pyln/testing/btcproxy.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/pyln-client/Makefile b/contrib/pyln-client/Makefile index 6f90a8a28..f9250900e 100644 --- a/contrib/pyln-client/Makefile +++ b/contrib/pyln-client/Makefile @@ -25,7 +25,7 @@ check-pytest: pytest tests check-mypy: - MYPYPATH=$(PYTHONPATH) mypy --namespace-packages tests pyln + MYPYPATH=$(PYTHONPATH) mypy --namespace-packages --follow-imports=skip tests pyln $(SDIST_FILE): python3 setup.py sdist diff --git a/contrib/pyln-testing/Makefile b/contrib/pyln-testing/Makefile index 91521bdcf..23ea81c24 100644 --- a/contrib/pyln-testing/Makefile +++ b/contrib/pyln-testing/Makefile @@ -25,7 +25,7 @@ check-pytest: pytest tests check-mypy: - MYPYPATH=$(PYTHONPATH) mypy --namespace-packages tests pyln + MYPYPATH=$(PYTHONPATH) mypy --namespace-packages --follow-imports=skip tests pyln $(SDIST_FILE): python3 setup.py sdist diff --git a/contrib/pyln-testing/pyln/testing/btcproxy.py b/contrib/pyln-testing/pyln/testing/btcproxy.py index 5b7e3537a..8a258ed4a 100644 --- a/contrib/pyln-testing/pyln/testing/btcproxy.py +++ b/contrib/pyln-testing/pyln/testing/btcproxy.py @@ -1,13 +1,13 @@ """ A bitcoind proxy that allows instrumentation and canned responses """ -from flask import Flask, request +from flask import Flask, request # type: ignore from bitcoin.rpc import JSONRPCError # type: ignore from bitcoin.rpc import RawProxy as BitcoinProxy # type: ignore from cheroot.wsgi import Server # type: ignore from cheroot.wsgi import PathInfoDispatcher # type: ignore import decimal -import flask +import flask # type: ignore import json import logging import threading