Skip to content
Merged
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
11 changes: 8 additions & 3 deletions micromagneticdata/drive.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import abc
import copy
import importlib.metadata
import json
import numbers
import pathlib
import sys

if sys.version_info < (3, 10):
import importlib_metadata as metadata
else:
from importlib import metadata

import discretisedfield as df
import ipywidgets
Expand Down Expand Up @@ -115,7 +120,7 @@ def __new__(cls, name, number, dirname=".", x=None, use_cache=False, **kwargs):
" automatically because no 'info.json' was found."
)

drive_entry_points = importlib.metadata.entry_points(
drive_entry_points = metadata.entry_points(
group="micromagneticdata.plugins.CalculatorDrive"
)

Expand Down Expand Up @@ -211,7 +216,7 @@ def table(self):
if self.use_cache and self._table is not None:
return self._table

read_table = importlib.metadata.entry_points(
read_table = metadata.entry_points(
group="micromagneticdata.plugins.read_table"
)[self._adapter].load()
table = read_table(self._table_path, x=self.x)
Expand Down
Loading