Skip to content

Commit e0a455d

Browse files
various species object improvements
1 parent 1e099bc commit e0a455d

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/rydstate/species/species_object.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@
44
import logging
55
from abc import ABC
66
from functools import cache, cached_property
7-
from typing import TYPE_CHECKING, ClassVar, overload
7+
from typing import TYPE_CHECKING, ClassVar, TypeVar, overload
88

99
from rydstate.units import rydberg_constant, ureg
1010

1111
if TYPE_CHECKING:
12-
from typing_extensions import Self
12+
from collections.abc import Callable
13+
14+
from typing_extensions import ParamSpec, Self
1315

1416
from rydstate.radial.model import PotentialType
1517
from rydstate.units import PintFloat
1618

19+
P = ParamSpec("P")
20+
R = TypeVar("R")
21+
22+
def cache(func: Callable[P, R]) -> Callable[P, R]: ... # type: ignore [misc]
23+
24+
1725
logger = logging.getLogger(__name__)
1826

1927

src/rydstate/species/sqdt/species_object_sqdt.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ def _setup_nist_energy_levels(self, file: Path) -> None: # noqa: C901, PLR0912
7171
7272
Args:
7373
file: Path to the NIST energy levels file.
74-
n_max: Maximum principal quantum number for which to load the NIST energy levels.
75-
For large quantum numbers, the NIST data is not accurate enough
76-
(it does not even show fine structure splitting),
77-
so we limit the maximum principal quantum number to 15 by default.
7874
7975
"""
8076
if not file.exists():

0 commit comments

Comments
 (0)