Skip to content

Commit 8b94912

Browse files
Apply suggestions from code review
Co-authored-by: Nathaniel Starkman <[email protected]>
1 parent d9fc4f5 commit 8b94912

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

src/metrology_apis/__init__.py

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,25 @@ def __metrology_namespace__[Q: Quantity[VT, UT, DT], V, U: Unit[DT]](
3232
) -> MetrologyNamespace[Q, V, U, Self]:
3333
"""
3434
Returns an object that has all the metrology API functions on it.
35+
3536
Parameters
3637
----------
3738
api_version: str or None
38-
string representing the version of the metrology API specification to be returned. If it is `None`, it should return the namespace corresponding to latest version of the metrology API specification. If the given version is invalid or not implemented for the given module, an error should be raised. Default: `None`.
39+
string representing the version of the metrology API
40+
specification to be returned. If it is `None`, it should
41+
return the namespace corresponding to latest version of the
42+
metrology API specification. If the given version is invalid
43+
or not implemented for the given module, an error should be
44+
raised. Default: `None`.
45+
3946
Returns
4047
-------
4148
out: Any
42-
an object representing the metrology API namespace. It should have every top-level function defined in the specification as an attribute. It may contain other public names as well, but it is recommended to only include those names that are part of the specification.
49+
An object representing the metrology API namespace. It
50+
should have every top-level function defined in the
51+
specification as an attribute. It may contain other public
52+
names as well, but it is recommended to only include those
53+
names that are part of the specification.
4354
"""
4455

4556
def __mul__(self, other: Self, /) -> Self: ...
@@ -57,14 +68,25 @@ def __metrology_namespace__[Q: Quantity[VT, UT, DT], V](
5768
) -> MetrologyNamespace[Q, V, Self, D]:
5869
"""
5970
Returns an object that has all the metrology API functions on it.
71+
6072
Parameters
6173
----------
6274
api_version: str or None
63-
string representing the version of the metrology API specification to be returned. If it is `None`, it should return the namespace corresponding to latest version of the metrology API specification. If the given version is invalid or not implemented for the given module, an error should be raised. Default: `None`.
75+
string representing the version of the metrology API
76+
specification to be returned. If it is `None`, it should
77+
return the namespace corresponding to latest version of the
78+
metrology API specification. If the given version is invalid
79+
or not implemented for the given module, an error should be
80+
raised. Default: `None`.
81+
6482
Returns
6583
-------
6684
out: Any
67-
an object representing the metrology API namespace. It should have every top-level function defined in the specification as an attribute. It may contain other public names as well, but it is recommended to only include those names that are part of the specification.
85+
an object representing the metrology API namespace. It should
86+
have every top-level function defined in the specification as
87+
an attribute. It may contain other public names as well, but
88+
it is recommended to only include those names that are part
89+
of the specification.
6890
"""
6991

7092
@property
@@ -86,14 +108,25 @@ def __metrology_namespace__(
86108
) -> MetrologyNamespace[Self, V, U, D]:
87109
"""
88110
Returns an object that has all the metrology API functions on it.
111+
89112
Parameters
90113
----------
91114
api_version: str or None
92-
string representing the version of the metrology API specification to be returned. If it is `None`, it should return the namespace corresponding to latest version of the metrology API specification. If the given version is invalid or not implemented for the given module, an error should be raised. Default: `None`.
115+
string representing the version of the metrology API
116+
specification to be returned. If it is `None`, it should
117+
return the namespace corresponding to the latest version of
118+
the metrology API specification. If the given version is
119+
invalid or not implemented for the given module, an error
120+
should be raised. Default: `None`.
121+
93122
Returns
94123
-------
95124
out: Any
96-
an object representing the metrology API namespace. It should have every top-level function defined in the specification as an attribute. It may contain other public names as well, but it is recommended to only include those names that are part of the specification.
125+
an object representing the metrology API namespace. It should
126+
have every top-level function defined in the specification as
127+
an attribute. It may contain other public names as well, but it
128+
is recommended to only include those names that are part of the
129+
specification.
97130
"""
98131

99132
@property

0 commit comments

Comments
 (0)