Skip to content

Commit f8b2c43

Browse files
dhruvmanilagithub-actions
and
github-actions
authored
Fix pre-commit error on master (#3992)
* Update pigeon_sort.py * updating DIRECTORY.md * Add type hints and return annotation Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 07a4ce9 commit f8b2c43

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: DIRECTORY.md

+1
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
* [Sum Of Subset](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/sum_of_subset.py)
251251

252252
## Electronics
253+
* [Electric Power](https://github.com/TheAlgorithms/Python/blob/master/electronics/electric_power.py)
253254
* [Ohms Law](https://github.com/TheAlgorithms/Python/blob/master/electronics/ohms_law.py)
254255

255256
## File Transfer

Diff for: sorts/pigeon_sort.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
For manual testing run:
1010
python pigeon_sort.py
1111
"""
12+
from typing import List
1213

1314

14-
def pigeon_sort(array):
15+
def pigeon_sort(array: List[int]) -> List[int]:
1516
"""
1617
Implementation of pigeon hole sort algorithm
1718
:param array: Collection of comparable items
@@ -52,6 +53,7 @@ def pigeon_sort(array):
5253

5354
if __name__ == "__main__":
5455
import doctest
56+
5557
doctest.testmod()
5658
user_input = input("Enter numbers separated by comma:\n")
5759
unsorted = [int(x) for x in user_input.split(",")]

0 commit comments

Comments
 (0)