Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/probeinterface/neuropixels_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def _load_np_probe_features():
global _np_probe_features
if _np_probe_features is None:
probe_features_filepath = Path(__file__).absolute().parent / Path("resources/neuropixels_probe_features.json")
_np_probe_features = json.load(open(probe_features_filepath, "r"))
with open(probe_features_filepath, "r") as f:
_np_probe_features = json.load(f)
return _np_probe_features


Expand Down
3 changes: 2 additions & 1 deletion src/probeinterface/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from probeinterface import __version__ as version

json_schema_file = Path(__file__).absolute().parent / "schema" / "probe.json.schema"
schema = json.load(open(json_schema_file, "r"))
with open(json_schema_file, "r") as f:
schema = json.load(f)


def validate_probe_dict(probe_dict):
Expand Down