Skip to content

Commit 1e0a47f

Browse files
committed
lint
1 parent b3f1fc8 commit 1e0a47f

File tree

2 files changed

+30
-22
lines changed

2 files changed

+30
-22
lines changed

Diff for: pixi.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/metrology_apis/__init__.py

+29-21
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
"""Metrology APIs."""
22

3-
from typing import Any, Final, Generic, Protocol, Self, TypeVar, override, runtime_checkable
3+
from typing import (
4+
Final,
5+
Protocol,
6+
Self,
7+
TypeVar,
8+
override,
9+
runtime_checkable,
10+
)
411

512
import optype as op
613

714
__version__: Final = "0.0.1.dev0"
815
__all__ = ["__version__", "Dimension", "Quantity", "Unit"]
916

1017

11-
VT = TypeVar('VT')
12-
DT = TypeVar('DT', bound='Dimension')
13-
UT = TypeVar('UT', bound='Unit[DT]')
18+
VT = TypeVar("VT")
19+
DT = TypeVar("DT", bound="Dimension")
20+
UT = TypeVar("UT", bound="Unit[DT]")
1421

15-
@runtime_checkable
16-
class MetrologyNamespace[Q: Quantity[VT, UT, DT], V, U: Unit[DT], D: Dimension](Protocol):
1722

23+
@runtime_checkable
24+
class MetrologyNamespace[Q: Quantity[VT, UT, DT], V, U: Unit[DT], D: Dimension](
25+
Protocol
26+
):
1827
@staticmethod
1928
def asdimension(obj: str | D) -> D: ...
2029

@@ -31,12 +40,12 @@ def __metrology_namespace__[Q: Quantity[VT, UT, DT], V, U: Unit[DT]](
3140
self, /, *, api_version: str | None = None
3241
) -> MetrologyNamespace[Q, V, U, Self]:
3342
"""
34-
Returns an object that has all the metrology API functions on it.
43+
Return an object that has all the metrology API functions on it.
3544
3645
Parameters
3746
----------
38-
api_version: str or None
39-
string representing the version of the metrology API
47+
api_version : str or None
48+
String representing the version of the metrology API
4049
specification to be returned. If it is `None`, it should
4150
return the namespace corresponding to latest version of the
4251
metrology API specification. If the given version is invalid
@@ -45,7 +54,7 @@ def __metrology_namespace__[Q: Quantity[VT, UT, DT], V, U: Unit[DT]](
4554
4655
Returns
4756
-------
48-
out: Any
57+
Any
4958
An object representing the metrology API namespace. It
5059
should have every top-level function defined in the
5160
specification as an attribute. It may contain other public
@@ -67,12 +76,12 @@ def __metrology_namespace__[Q: Quantity[VT, UT, DT], V](
6776
self, /, *, api_version: str | None = None
6877
) -> MetrologyNamespace[Q, V, Self, D]:
6978
"""
70-
Returns an object that has all the metrology API functions on it.
79+
Return an object that has all the metrology API functions on it.
7180
7281
Parameters
7382
----------
74-
api_version: str or None
75-
string representing the version of the metrology API
83+
api_version : str or None
84+
String representing the version of the metrology API
7685
specification to be returned. If it is `None`, it should
7786
return the namespace corresponding to latest version of the
7887
metrology API specification. If the given version is invalid
@@ -81,8 +90,8 @@ def __metrology_namespace__[Q: Quantity[VT, UT, DT], V](
8190
8291
Returns
8392
-------
84-
out: Any
85-
an object representing the metrology API namespace. It should
93+
Any
94+
An object representing the metrology API namespace. It should
8695
have every top-level function defined in the specification as
8796
an attribute. It may contain other public names as well, but
8897
it is recommended to only include those names that are part
@@ -100,19 +109,18 @@ def __rmul__(self, other: Self, /) -> Self: ...
100109
def __rtruediv__(self, other: Self, /) -> Self: ...
101110

102111

103-
104112
@runtime_checkable
105113
class Quantity[V, U: Unit[DT], D: Dimension](Protocol):
106114
def __metrology_namespace__(
107115
self, /, *, api_version: str | None = None
108116
) -> MetrologyNamespace[Self, V, U, D]:
109117
"""
110-
Returns an object that has all the metrology API functions on it.
118+
Return an object that has all the metrology API functions on it.
111119
112120
Parameters
113121
----------
114-
api_version: str or None
115-
string representing the version of the metrology API
122+
api_version : str or None
123+
String representing the version of the metrology API
116124
specification to be returned. If it is `None`, it should
117125
return the namespace corresponding to the latest version of
118126
the metrology API specification. If the given version is
@@ -121,8 +129,8 @@ def __metrology_namespace__(
121129
122130
Returns
123131
-------
124-
out: Any
125-
an object representing the metrology API namespace. It should
132+
Any
133+
An object representing the metrology API namespace. It should
126134
have every top-level function defined in the specification as
127135
an attribute. It may contain other public names as well, but it
128136
is recommended to only include those names that are part of the

0 commit comments

Comments
 (0)