Skip to content

Commit

Permalink
👽️ constants: fix new stubtest errors (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham authored Dec 16, 2024
2 parents d21c120 + 712542c commit 5cefe76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
4 changes: 0 additions & 4 deletions .mypyignore-todo
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ scipy\._lib\._util\.(Generator|Seed)Type
scipy\.cluster\.hierarchy\.ClusterNode\.__init__
scipy\.cluster\.vq\.kmeans2?

scipy\.constants\._codata\.exact_values
scipy\.constants\._codata\.(epsilon|mu)0
scipy\.constants\._codata\.parse_constants_(2002to2014|2018toXXXX)

scipy\.fft\._basic_backend\.complex_funcs

scipy\.fftpack\.(_pseudo_diffs\.)?diff
Expand Down
24 changes: 6 additions & 18 deletions scipy-stubs/constants/_codata.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -87,30 +87,18 @@ _Unit: TypeAlias = Literal[
_Constant: TypeAlias = tuple[float, _Unit, float]
_Constants: TypeAlias = Mapping[str, _Constant]

# private

c: Final = 299792458.0
k: Final = "electric constant"

# public

physical_constants: Final[_Constants]
physical_constants: Final[_Constants] = ...

class ConstantWarning(DeprecationWarning): ...

def find(sub: str | None = ..., disp: bool = ...) -> list[LiteralString] | None: ...
def value(key: str) -> float: ...
def unit(key: str) -> _Unit: ...
def precision(key: str) -> float: ...

# private

txt2002: Final[str] = ...
txt2006: Final[str] = ...
txt2010: Final[str] = ...
txt2014: Final[str] = ...
txt2018: Final[str] = ...

exact_values: Final[_Constants] = ...
c: Final = 299792458.0
mu0: Final = 1.25663706212e-06
epsilon0: Final = 8.8541878128e-12
k: Final = "electric constant"

def parse_constants_2002to2014(d: str) -> _Constants: ...
def parse_constants_2018toXXXX(d: str) -> _Constants: ...

0 comments on commit 5cefe76

Please sign in to comment.