Closed arunpersaud closed 1 month ago
You're right! The Self
type hint is supported by Python 3.11+, so we can remove support for Python 3.10 or remove the type hints. Since PyMCNP was developed in Python 3.11, I'd suggest keeping the type hints, but either solution should work. Any preferences?
Since this is a package to support MCNP, I think we should support as many python versions as possible. Since we use numpy for many things, I normally go with what numpy supports, which I think at the moment is >=3.10 (https://numpy.org/neps/nep-0029-deprecation_policy.html). For other projects I then set up pyupgrade for that version, but perhaps we should switch to ruff for this one?
That sounds good! I've updated the source code to remove Self
type hints and added that we support Python versions >= 3.10 to the documentation.
In
https://github.com/mauricioAyllon/PyMCNP/tree/master/src/pymcnp/files/inp#L9
we import Self from typing, but I think this is a 3.11 feature. In pyproject.toml we say we support >=3.10 though.