Skip to content

Commit 497694c

Browse files
authored
Remove duplicate type hints (#534)
* Remove duplicate type hints Formerly, we had type hints in the docstrings, but after introducing the actual type hints, they are not needed anymore. This PR removes those duplicate type hints in the docstrings from the public APIs. * remove some leftover duplicate type hints
1 parent eaece2e commit 497694c

40 files changed

+1068
-1311
lines changed

hazelcast/aggregator.py

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ def count(attribute_path: str = None) -> Aggregator[int]:
183183
Accepts ``None`` input values and ``None`` extracted values.
184184
185185
Args:
186-
attribute_path (str): Extracts values from this path, if given.
186+
attribute_path: Extracts values from this path, if given.
187187
188188
Returns:
189-
Aggregator[int]: An aggregator that counts the input values.
189+
An aggregator that counts the input values.
190190
"""
191191
return _CountAggregator(attribute_path)
192192

@@ -197,11 +197,10 @@ def distinct(attribute_path: str = None) -> Aggregator[typing.Set[AggregatorResu
197197
Accepts ``None`` input values and ``None`` extracted values.
198198
199199
Args:
200-
attribute_path (str): Extracts values from this path, if given.
200+
attribute_path: Extracts values from this path, if given.
201201
202202
Returns:
203-
Aggregator[set]: An aggregator that calculates the distinct set of
204-
input values.
203+
An aggregator that calculates the distinct set of input values.
205204
"""
206205
return _DistinctValuesAggregator(attribute_path)
207206

@@ -218,11 +217,10 @@ def double_avg(attribute_path: str = None) -> Aggregator[float]:
218217
unless they are out of range for ``double`` type in Java.
219218
220219
Args:
221-
attribute_path (str): Extracts values from this path, if given.
220+
attribute_path: Extracts values from this path, if given.
222221
223222
Returns:
224-
Aggregator[float]: An aggregator that calculates the average of
225-
the input values.
223+
An aggregator that calculates the average of the input values.
226224
"""
227225
return _DoubleAverageAggregator(attribute_path)
228226

@@ -239,11 +237,10 @@ def double_sum(attribute_path: str = None) -> Aggregator[float]:
239237
unless they are out of range for ``double`` type in Java.
240238
241239
Args:
242-
attribute_path (str): Extracts values from this path, if given.
240+
attribute_path: Extracts values from this path, if given.
243241
244242
Returns:
245-
Aggregator[float]: An aggregator that calculates the sum of the input
246-
values.
243+
An aggregator that calculates the sum of the input values.
247244
"""
248245
return _DoubleSumAggregator(attribute_path)
249246

@@ -258,11 +255,10 @@ def fixed_point_sum(attribute_path: str = None) -> Aggregator[int]:
258255
client unless they are out of range for ``long`` type in Java.
259256
260257
Args:
261-
attribute_path (str): Extracts values from this path, if given.
258+
attribute_path: Extracts values from this path, if given.
262259
263260
Returns:
264-
Aggregator[int]: An aggregator that calculates the sum of the
265-
input values.
261+
An aggregator that calculates the sum of the input values.
266262
"""
267263
return _FixedPointSumAggregator(attribute_path)
268264

@@ -277,11 +273,10 @@ def floating_point_sum(attribute_path: str = None) -> Aggregator[float]:
277273
client unless they are out of range for ``double`` type in Java.
278274
279275
Args:
280-
attribute_path (str): Extracts values from this path, if given.
276+
attribute_path: Extracts values from this path, if given.
281277
282278
Returns:
283-
Aggregator[float]: An aggregator that calculates the sum of the
284-
input values.
279+
An aggregator that calculates the sum of the input values.
285280
"""
286281
return _FloatingPointSumAggregator(attribute_path)
287282

@@ -298,11 +293,10 @@ def int_avg(attribute_path: str = None) -> Aggregator[int]:
298293
are out of range for ``int`` type in Java.
299294
300295
Args:
301-
attribute_path (str): Extracts values from this path, if given.
296+
attribute_path: Extracts values from this path, if given.
302297
303298
Returns:
304-
Aggregator[int]: An aggregator that calculates the average of the
305-
input values.
299+
An aggregator that calculates the average of the input values.
306300
"""
307301
return _IntegerAverageAggregator(attribute_path)
308302

@@ -319,11 +313,10 @@ def int_sum(attribute_path: str = None) -> Aggregator[int]:
319313
are out of range for ``int`` type in Java.
320314
321315
Args:
322-
attribute_path (str): Extracts values from this path, if given.
316+
attribute_path: Extracts values from this path, if given.
323317
324318
Returns:
325-
Aggregator[int]: An aggregator that calculates the sum of the
326-
input values.
319+
An aggregator that calculates the sum of the input values.
327320
"""
328321
return _IntegerSumAggregator(attribute_path)
329322

@@ -340,11 +333,10 @@ def long_avg(attribute_path: str = None) -> Aggregator[int]:
340333
are out of range for ``long`` type in Java.
341334
342335
Args:
343-
attribute_path (str): Extracts values from this path, if given.
336+
attribute_path: Extracts values from this path, if given.
344337
345338
Returns:
346-
Aggregator[int]: An aggregator that calculates the average of the
347-
input values.
339+
An aggregator that calculates the average of the input values.
348340
"""
349341
return _LongAverageAggregator(attribute_path)
350342

@@ -361,11 +353,10 @@ def long_sum(attribute_path: str = None) -> Aggregator[int]:
361353
are out of range for ``long`` type in Java.
362354
363355
Args:
364-
attribute_path (str): Extracts values from this path, if given.
356+
attribute_path: Extracts values from this path, if given.
365357
366358
Returns:
367-
Aggregator[int]: An aggregator that calculates the sum of the
368-
input values.
359+
An aggregator that calculates the sum of the input values.
369360
"""
370361
return _LongSumAggregator(attribute_path)
371362

@@ -382,11 +373,10 @@ def max_(attribute_path: str = None) -> Aggregator[AggregatorResultType]:
382373
equivalents of types like ``int``, ``str``, and ``float``.
383374
384375
Args:
385-
attribute_path (str): Extracts values from this path, if given.
376+
attribute_path: Extracts values from this path, if given.
386377
387378
Returns:
388-
Aggregator[any]: An aggregator that calculates the max of the input
389-
values.
379+
An aggregator that calculates the max of the input values.
390380
"""
391381
return _MaxAggregator(attribute_path)
392382

@@ -403,11 +393,10 @@ def min_(attribute_path: str = None) -> Aggregator[AggregatorResultType]:
403393
equivalents of types like ``int``, ``str``, and ``float``.
404394
405395
Args:
406-
attribute_path (str): Extracts values from this path, if given.
396+
attribute_path: Extracts values from this path, if given.
407397
408398
Returns:
409-
Aggregator[any]: An aggregator that calculates the min of the
410-
input values.
399+
An aggregator that calculates the min of the input values.
411400
"""
412401
return _MinAggregator(attribute_path)
413402

@@ -422,11 +411,10 @@ def number_avg(attribute_path: str = None) -> Aggregator[float]:
422411
client unless they are out of range for ``double`` type in Java.
423412
424413
Args:
425-
attribute_path (str): Extracts values from this path, if given.
414+
attribute_path: Extracts values from this path, if given.
426415
427416
Returns:
428-
Aggregator[float]: An aggregator that calculates the average of
429-
the input values.
417+
An aggregator that calculates the average of the input values.
430418
"""
431419
return _NumberAverageAggregator(attribute_path)
432420

@@ -446,11 +434,11 @@ def max_by(attribute_path: str) -> Aggregator[MapEntry[KeyType, ValueType]]:
446434
equivalents of types like ``int``, ``str``, and ``float``.
447435
448436
Args:
449-
attribute_path (str): Path to extract values from.
437+
attribute_path: Path to extract values from.
450438
451439
Returns:
452-
Aggregator[MapEntry]: An aggregator that calculates the input value
453-
containing the maximum value extracted from the path.
440+
An aggregator that calculates the input value containing the maximum
441+
value extracted from the path.
454442
"""
455443
return _MaxByAggregator(attribute_path)
456444

@@ -470,10 +458,10 @@ def min_by(attribute_path: str) -> Aggregator[MapEntry[KeyType, ValueType]]:
470458
equivalents of types like ``int``, ``str``, and ``float``.
471459
472460
Args:
473-
attribute_path (str): Path to extract values from.
461+
attribute_path: Path to extract values from.
474462
475463
Returns:
476-
Aggregator[MapEntry]: An aggregator that calculates the input value
477-
containing the minimum value extracted from the path.
464+
An aggregator that calculates the input value containing the minimum
465+
value extracted from the path.
478466
"""
479467
return _MinByAggregator(attribute_path)

0 commit comments

Comments
 (0)