Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enforce strict abstract-concrete #71

Merged
merged 1 commit into from
Jan 19, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/galax/dynamics/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from galax.potential._potential.base import AbstractPotentialBase


class AbstractPhaseSpacePositionBase(eqx.Module): # type: ignore[misc]
class AbstractPhaseSpacePositionBase(eqx.Module, strict=True): # type: ignore[call-arg, misc]
"""Abstract Base Class of Phase-Space Positions.

Todo:
Expand Down
2 changes: 1 addition & 1 deletion src/galax/dynamics/mockstream/_df/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Carry: TypeAlias = tuple[IntLike, Vec3, Vec3, Vec3, Vec3]


class AbstractStreamDF(eqx.Module): # type: ignore[misc]
class AbstractStreamDF(eqx.Module, strict=True): # type: ignore[call-arg, misc]
lead: bool = eqx.field(default=True, static=True)
trail: bool = eqx.field(default=True, static=True)

Expand Down
2 changes: 1 addition & 1 deletion src/galax/integrate/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __call__(self, t: FloatScalar, qp: Vec6, args: tuple[Any, ...]) -> Vec6:
...


class AbstractIntegrator(eqx.Module): # type: ignore[misc]
class AbstractIntegrator(eqx.Module, strict=True): # type: ignore[call-arg, misc]
"""Integrator Class.

The integrators are classes that are used to integrate the equations of
Expand Down
2 changes: 1 addition & 1 deletion src/galax/potential/_potential/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
default_integrator = DiffraxIntegrator()


class AbstractPotentialBase(eqx.Module, metaclass=ModuleMeta): # type: ignore[misc]
class AbstractPotentialBase(eqx.Module, metaclass=ModuleMeta, strict=True): # type: ignore[misc]
"""Potential Class."""

units: eqx.AbstractVar[UnitSystem]
Expand Down
2 changes: 1 addition & 1 deletion src/galax/potential/_potential/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .utils import converter_to_usys


class AbstractPotential(AbstractPotentialBase):
class AbstractPotential(AbstractPotentialBase, strict=True):
_: KW_ONLY
units: UnitSystem = eqx.field(converter=converter_to_usys, static=True)
_G: float = eqx.field(init=False, static=True, repr=False, converter=float)
Expand Down
2 changes: 1 addition & 1 deletion src/galax/potential/_potential/param/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from galax.utils.dataclasses import converter_float_array


class AbstractParameter(eqx.Module): # type: ignore[misc]
class AbstractParameter(eqx.Module, strict=True): # type: ignore[call-arg, misc]
"""Abstract Base Class for Parameters on a Potential.

Parameters are time-dependent quantities that are used to define a
Expand Down