-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
help wantedHelp with this would be appreciatedHelp with this would be appreciated
Description
I noticed that the docstring for tunits.Time and other dimension subclasses inherit their docstrings from the base class:
In [1]: import tunits
In [2]: tunits.Time?
Init signature: tunits.Time(val, unit=None, validate: 'bool' = True)
Docstring:
Dimension abstraction.
This abstract class allows the creation of values that belong to a dimension
(e.g. t: Time, x: Length, ...etc). This allows us to use static types to check
code correctness (e.g. time_method(t: Time)).
To add a new dimension, create 3 classes:
- `class _NewDimension(Dimension):` which implements the abstract methods from
this class.
- `class NewDimension(_NewDimension, ValueWithDimension)` which represents scalar
values and doesn't need to implement any methods.
- `class AccelerationArray(_Acceleration, ArrayWithDimension)` which represents
an array of values sharing the same dimension and unit.
Init docstring: ValueWithDimension.__init__(self, val, unit=None, validate: bool = True)
File: ~/.virtualenvs/pyle/lib/python3.12/site-packages/tunits_core.cpython-312-x86_64-linux-gnu.so
Type: ABCMeta
Subclasses:
It would be nice to add more informative docstrings for specific dimension classes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedHelp with this would be appreciatedHelp with this would be appreciated