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 <vincenzopalazzodev@gmail.com>
This commit is contained in:
Vincenzo Palazzo 2021-08-27 19:36:26 +02:00 committed by Rusty Russell
parent b40812494d
commit bc1eab8646
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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