Skip to content

Fix pre-commit error on master #3992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DIRECTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
* [Sum Of Subset](https://github.com/TheAlgorithms/Python/blob/master/dynamic_programming/sum_of_subset.py)

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

## File Transfer
Expand Down
4 changes: 3 additions & 1 deletion sorts/pigeon_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
For manual testing run:
python pigeon_sort.py
"""
from typing import List


def pigeon_sort(array):
def pigeon_sort(array: List[int]) -> List[int]:
"""
Implementation of pigeon hole sort algorithm
:param array: Collection of comparable items
Expand Down Expand Up @@ -52,6 +53,7 @@ def pigeon_sort(array):

if __name__ == "__main__":
import doctest

doctest.testmod()
user_input = input("Enter numbers separated by comma:\n")
unsorted = [int(x) for x in user_input.split(",")]
Expand Down