Skip to content

Commit 3a20d59

Browse files
authored
chore: 📦 Update dependencies in poetry.lock and pyproject.toml (#1642)
* refactor: ♻️ Update type hints in test_converter.py to use `numpy.typing` * chore: 📦 Update dependencies in poetry.lock and pyproject.toml
1 parent 1d67899 commit 3a20d59

File tree

3 files changed

+15
-73
lines changed

3 files changed

+15
-73
lines changed

poetry.lock

+8-62
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ types-toml = "^0.10.8"
109109
types-PyYAML = "^6.0.11"
110110
types-tabulate = ">=0.8.11,<0.10.0"
111111
types-mock = ">=4.0.15,<6.0.0"
112-
nptyping = { extras = ["complete"], version = "^2.4.1" }
113112
dash = { extras = ["testing"], version = "^2.7.1" }
114113
bandit = "^1.7.5"
115114
# prospector = { extras = [

spectrafit/plugins/test/test_converter.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
import yaml
1919

2020
from matplotlib import pyplot
21-
from nptyping import Float
22-
from nptyping import NDArray
23-
from nptyping import Shape
21+
from numpy.typing import NDArray
2422
from spectrafit.api.pptx_model import PPTXBasicTitleAPI
2523
from spectrafit.plugins.data_converter import DataConverter
2624
from spectrafit.plugins.file_converter import FileConverter
@@ -403,7 +401,7 @@ def test_cmd_data_converter_nor_to_csv(
403401

404402

405403
@pytest.fixture(scope="function", autouse=True, name="tmp_file_dict")
406-
def tmp_file_dict() -> Dict[str, Dict[str, NDArray[Shape["200"], Float]]]:
404+
def tmp_file_dict() -> Dict[str, Dict[str, NDArray[Any]]]:
407405
"""Create temporary file with pickle data."""
408406
return {
409407
"level_1": {
@@ -444,7 +442,7 @@ def tmp_file_nested_dict() -> Dict[str, Dict[str, Any]]:
444442

445443
@pytest.fixture(scope="function", autouse=True, name="tmp_pkl_gz_file")
446444
def tmp_pkl_gz_file(
447-
tmp_path: Path, tmp_file_dict: Dict[str, Dict[str, NDArray[Shape["200"], Float]]]
445+
tmp_path: Path, tmp_file_dict: Dict[str, Dict[str, NDArray[np.float64]]]
448446
) -> Path:
449447
"""Create temporary file with pickle data.
450448
@@ -462,7 +460,7 @@ def tmp_pkl_gz_file(
462460

463461
@pytest.fixture(scope="function", autouse=True, name="tmp_file_pkl")
464462
def tmp_file_pkl(
465-
tmp_path: Path, tmp_file_dict: Dict[str, Dict[str, NDArray[Shape["200"], Float]]]
463+
tmp_path: Path, tmp_file_dict: Dict[str, Dict[str, NDArray[np.float64]]]
466464
) -> Path:
467465
"""Create temporary file with pickle data.
468466
@@ -480,7 +478,7 @@ def tmp_file_pkl(
480478

481479
@pytest.fixture(scope="function", autouse=True, name="tmp_file_pkl_gz")
482480
def tmp_file_pkl_gz(
483-
tmp_path: Path, tmp_file_dict: Dict[str, Dict[str, NDArray[Shape["200"], Float]]]
481+
tmp_path: Path, tmp_file_dict: Dict[str, Dict[str, NDArray[np.float64]]]
484482
) -> Path:
485483
"""Create temporary file with pickle data.
486484
@@ -524,7 +522,7 @@ class TestPklConverter:
524522
def test_export_data(
525523
self,
526524
tmp_path: Path,
527-
tmp_file_dict: Dict[str, Dict[str, NDArray[Shape["200"], Float]]],
525+
tmp_file_dict: Dict[str, Dict[str, NDArray[np.float64]]],
528526
export_format: str,
529527
) -> None:
530528
"""Test export data.
@@ -564,8 +562,7 @@ def test_export_data(
564562
assert isinstance(data.get("data"), np.ndarray)
565563

566564
def test_numpy2list(
567-
self,
568-
tmp_file_dict: Dict[str, Dict[str, NDArray[Shape["200"], Float]]],
565+
self, tmp_file_dict: Dict[str, Dict[str, NDArray[np.float64]]]
569566
) -> None:
570567
"""Test numpy2list.
571568

0 commit comments

Comments
 (0)