Skip to content
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
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.1.0] - YYYY-MM-DD
## [2.1.1] - 2026-06-16

### Fixed

- Permissive-mode warning for kinded/unkinded arithmetic now uses the
correct verb: "Dividing" for `__truediv__`, "Multiplying" for
`__mul__`. Previously both paths emitted "Multiplying".

## [2.1.0] - 2026-06-16

### Changed

Expand Down Expand Up @@ -2555,6 +2563,7 @@ Deprecated surfaces are scheduled for removal in v2.0.
- Initial commit

<!-- Links -->
[2.1.1]: https://github.com/withtwoemms/ucon/compare/2.1.0...2.1.1
[2.1.0]: https://github.com/withtwoemms/ucon/compare/2.0.1...2.1.0
[2.0.1]: https://github.com/withtwoemms/ucon/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/withtwoemms/ucon/compare/1.12.0...2.0.0
Expand Down
6 changes: 3 additions & 3 deletions ucon/core/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ def as_ratio(self):

# --- Kind dispatch helpers ---

def _resolve_mul_kind(self, other: 'Number') -> 'Kind | None':
def _resolve_mul_kind(self, other: 'Number', *, op: str = "Multiplying") -> 'Kind | None':
"""Resolve the result kind for multiplication or division.

Consults the active ``FormulaRegistry`` when both operands
Expand All @@ -2104,7 +2104,7 @@ def _resolve_mul_kind(self, other: 'Number') -> 'Kind | None':
import warnings
present = self.kind or other.kind
warnings.warn(
f"Multiplying kinded ({present.name!r}) and unkinded "
f"{op} kinded ({present.name!r}) and unkinded "
f"Numbers; kind=None assumed",
stacklevel=3,
)
Expand Down Expand Up @@ -2302,7 +2302,7 @@ def compute_uncertainty(result_quantity):
new_quantity = self.quantity / other.quantity
return Number(quantity=new_quantity, unit=unit_quot,
uncertainty=compute_uncertainty(new_quantity),
kind=self._resolve_mul_kind(other))
kind=self._resolve_mul_kind(other, op="Dividing"))

def __eq__(self, other: _Quantifiable) -> bool:
if not isinstance(other, (Number, Ratio)):
Expand Down
Loading