Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit f6445b8

Browse files
committed
improvements
1 parent 0dd5593 commit f6445b8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Diff for: src/quantity_api/__init__.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
"""Quantity API."""
22

3-
from __future__ import annotations
4-
5-
from typing import Any, Protocol, runtime_checkable
3+
from typing import Any, Final, Protocol, Self, runtime_checkable
64

75
import optype as op
86

97
type Unit = Any # TODO: unit-api
108

11-
__version__ = "0.0.1.dev0"
12-
__all__ = ["Quantity"]
9+
__version__: Final = "0.0.1.dev0"
10+
__all__ = ["__version__", "Quantity"]
1311

1412
@runtime_checkable
1513
class Quantity[V, U: Unit](Protocol):
@@ -21,5 +19,5 @@ def unit(self) -> U: ...
2119
### Dunder Methods
2220

2321
def __eq__[B: op.CanBool](
24-
self, other: Quantity[op.CanEq[V, B], U], /
22+
self, other: Self[op.CanEq[V, B], U], /
2523
) -> B: ...

0 commit comments

Comments
 (0)