@@ -140,7 +140,7 @@ def cmp(x, y) -> int:
140
140
141
141
Compare the two objects x and y and return an integer according to the outcome.
142
142
143
- The return value is negative if x < y, zero if x == y and strictly positive if x > y.
143
+ The return value is negative if `` x < y`` , zero if `` x == y`` and strictly positive if `` x > y`` .
144
144
"""
145
145
146
146
return int ((x > y ) - (x < y ))
@@ -199,7 +199,7 @@ def printt(obj: Any, *args, **kwargs) -> None:
199
199
print (type (obj ), * args , ** kwargs )
200
200
201
201
202
- def stderr_writer (* args , ** kwargs ):
202
+ def stderr_writer (* args , ** kwargs ) -> None :
203
203
"""
204
204
Write to stderr, flushing stdout beforehand and stderr afterwards.
205
205
"""
@@ -239,7 +239,7 @@ def str2tuple(input_string: str, sep: str = ',') -> Tuple[int, ...]:
239
239
240
240
The input string must represent a comma-separated series of integers.
241
241
242
- TODO: Allow custom types, not just ``int`` (making ``int`` the default)
242
+ .. TODO: : Allow custom types, not just ``int`` (making ``int`` the default)
243
243
244
244
:param input_string: The string to be converted into a tuple
245
245
:type input_string: str
@@ -277,9 +277,10 @@ def strtobool(val: Union[str, bool]) -> bool:
277
277
278
278
def enquote_value (value : Any ) -> Union [str , bool , float ]:
279
279
"""
280
- Adds quotes to the given value, suitable for use in a templating system such as Jinja2.
280
+ Adds quotes (``'``) to the given value, suitable for use in a templating system such as Jinja2.
281
281
282
- floats, integers, booleans, None, and the strings "True", "False" and "None" are returned as-is.
282
+ :class:`Floats <float>`, :class:`integers <int>`, :class:`booleans <bool>`, :py:obj:`None`,
283
+ and the strings ``'True'``, ``'False'`` and ``'None'`` are returned as-is.
283
284
284
285
:param value: The value to enquote
285
286
"""
0 commit comments