Skip to content

Commit 7046a85

Browse files
Suppress cached namespace warnings (#143)
* suppress cached namespace warnings * made more specific * name fix
1 parent 9d7c9ed commit 7046a85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nwbinspector/nwbinspector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
from pathlib import Path
88
from collections.abc import Iterable
99
from enum import Enum
10-
from typing import Optional, Union, List
10+
from typing import Optional, List
1111
from concurrent.futures import ThreadPoolExecutor, as_completed
1212
from types import FunctionType
13+
from warnings import filterwarnings
1314

1415
import click
1516
import pynwb
@@ -341,6 +342,7 @@ def inspect_nwb(
341342
checks=checks, config=config, ignore=ignore, select=select, importance_threshold=importance_threshold
342343
)
343344
nwbfile_path = str(nwbfile_path)
345+
filterwarnings(action="ignore", message="No cached namespaces found in .*")
344346
with pynwb.NWBHDF5IO(path=nwbfile_path, mode="r", load_namespaces=True, driver=driver) as io:
345347
if skip_validate:
346348
validation_errors = pynwb.validate(io=io)

0 commit comments

Comments
 (0)