glass-dev / glass

Generator for Large Scale Structure
https://glass.readthedocs.io
MIT License
31 stars 7 forks source link

Convert to `typing.NamedTuple` #125

Open nstarman opened 1 year ago

nstarman commented 1 year ago

https://github.com/glass-dev/glass/blob/c9a816dbbee8bccf8f9da5430fbb59e104c62f6d/glass/shells.py#L80



class RadialWindow(NamedTuple):
    """Docstring."""

    attr1: float
    """Description."""

    attr2: float
    """Description."""
ntessore commented 1 year ago

Good catch. I was thinking whether a dataclass might not be better, but there probably are still a few cases of for za, wa, zeff in radial_windows scattered around.