mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 23:42:33 +02:00
lint: enable mypy checking for missing imports
Achieve this by adding some ignore, and making data/ importable. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
This commit is contained in:
parent
22e652662b
commit
a46f71bb70
@ -10,7 +10,7 @@ Otherwise the exit status will be 1 and it will log which executables failed whi
|
|||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import lief
|
import lief #type:ignore
|
||||||
|
|
||||||
def check_ELF_RELRO(binary) -> bool:
|
def check_ELF_RELRO(binary) -> bool:
|
||||||
'''
|
'''
|
||||||
|
@ -13,7 +13,7 @@ Example usage:
|
|||||||
import sys
|
import sys
|
||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
|
|
||||||
import lief
|
import lief #type:ignore
|
||||||
|
|
||||||
# temporary constant, to be replaced with lief.ELF.ARCH.RISCV
|
# temporary constant, to be replaced with lief.ELF.ARCH.RISCV
|
||||||
# https://github.com/lief-project/LIEF/pull/562
|
# https://github.com/lief-project/LIEF/pull/562
|
||||||
|
@ -188,7 +188,7 @@ def print_logs_plain(log_events, colors):
|
|||||||
def print_logs_html(log_events):
|
def print_logs_html(log_events):
|
||||||
"""Renders the iterator of log events into html."""
|
"""Renders the iterator of log events into html."""
|
||||||
try:
|
try:
|
||||||
import jinja2
|
import jinja2 #type:ignore
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("jinja2 not found. Try `pip install jinja2`")
|
print("jinja2 not found. Try `pip install jinja2`")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
0
test/functional/data/__init__.py
Normal file
0
test/functional/data/__init__.py
Normal file
@ -40,7 +40,7 @@ except UnicodeDecodeError:
|
|||||||
CROSS = "x "
|
CROSS = "x "
|
||||||
CIRCLE = "o "
|
CIRCLE = "o "
|
||||||
|
|
||||||
if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393):
|
if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
import ctypes
|
import ctypes
|
||||||
kernel32 = ctypes.windll.kernel32 # type: ignore
|
kernel32 = ctypes.windll.kernel32 # type: ignore
|
||||||
|
@ -102,7 +102,7 @@ if ! PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; e
|
|||||||
EXIT_CODE=1
|
EXIT_CODE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! mypy --ignore-missing-imports --show-error-codes $(git ls-files "test/functional/*.py" "contrib/devtools/*.py"); then
|
if ! mypy --show-error-codes $(git ls-files "test/functional/*.py" "contrib/devtools/*.py"); then
|
||||||
EXIT_CODE=1
|
EXIT_CODE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user