Skip to content

Commit 4aeebc7

Browse files
committed
test: fix unresolved-import errors
1 parent 10f5e69 commit 4aeebc7

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

test/functional/interface_ipc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CoinbaseTxData:
4141

4242
# Test may be skipped and not have capnp installed
4343
try:
44-
import capnp # type: ignore[import] # noqa: F401
44+
import capnp # noqa: F401 # ty: ignore[unresolved-import]
4545
except ImportError:
4646
pass
4747

test/functional/interface_usdt_coinselection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Test will be skipped if we don't have bcc installed
1111
try:
12-
from bcc import BPF, USDT # type: ignore[import]
12+
from bcc import BPF, USDT # ty: ignore[unresolved-import]
1313
except ImportError:
1414
pass
1515
from test_framework.test_framework import BitcoinTestFramework

test/functional/interface_usdt_mempool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Test will be skipped if we don't have bcc installed
1414
try:
15-
from bcc import BPF, USDT # type: ignore[import]
15+
from bcc import BPF, USDT # ty: ignore[unresolved-import]
1616
except ImportError:
1717
pass
1818

test/functional/interface_usdt_net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from io import BytesIO
1212
# Test will be skipped if we don't have bcc installed
1313
try:
14-
from bcc import BPF, USDT # type: ignore[import]
14+
from bcc import BPF, USDT # ty: ignore[unresolved-import]
1515
except ImportError:
1616
pass
1717
from test_framework.messages import CBlockHeader, MAX_HEADERS_RESULTS, msg_headers, msg_version

test/functional/interface_usdt_utxocache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import ctypes
1111
# Test will be skipped if we don't have bcc installed
1212
try:
13-
from bcc import BPF, USDT # type: ignore[import]
13+
from bcc import BPF, USDT # ty: ignore[unresolved-import]
1414
except ImportError:
1515
pass
1616
from test_framework.messages import COIN

test/functional/interface_usdt_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Test will be skipped if we don't have bcc installed
1414
try:
15-
from bcc import BPF, USDT # type: ignore[import]
15+
from bcc import BPF, USDT # ty: ignore[unresolved-import]
1616
except ImportError:
1717
pass
1818

test/functional/test_framework/test_framework.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,14 +886,14 @@ def skip_if_no_py_sqlite3(self):
886886
def skip_if_no_py_capnp(self):
887887
"""Attempt to import the capnp package and skip the test if the import fails."""
888888
try:
889-
import capnp # type: ignore[import] # noqa: F401
889+
import capnp # noqa: F401 # ty: ignore[unresolved-import]
890890
except ImportError:
891891
raise SkipTest("capnp module not available.")
892892

893893
def skip_if_no_python_bcc(self):
894894
"""Attempt to import the bcc package and skip the tests if the import fails."""
895895
try:
896-
import bcc # type: ignore[import] # noqa: F401
896+
import bcc # noqa: F401 # ty: ignore[unresolved-import]
897897
except ImportError:
898898
raise SkipTest("bcc python module not available")
899899

@@ -1036,7 +1036,7 @@ def has_blockfile(self, node, filenum: str):
10361036

10371037
def inspect_sqlite_db(self, path, fn, *args, **kwargs):
10381038
try:
1039-
import sqlite3 # type: ignore[import]
1039+
import sqlite3
10401040
conn = sqlite3.connect(path)
10411041
with conn:
10421042
result = fn(conn, *args, **kwargs)

0 commit comments

Comments
 (0)