diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 5f5a90ce1a2d..3f00094e0264 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -41,7 +41,7 @@ jobs: - run: uv sync --group=docs - uses: actions/configure-pages@v6 - run: uv run sphinx-build -c docs . docs/_build/html - - uses: actions/upload-pages-artifact@v4 + - uses: actions/upload-pages-artifact@v5 with: path: docs/_build/html diff --git a/sorts/pigeonhole_sort.py b/sorts/pigeonhole_sort.py index bfa9bb11b8a6..7fbc6188cfb4 100644 --- a/sorts/pigeonhole_sort.py +++ b/sorts/pigeonhole_sort.py @@ -10,7 +10,11 @@ def pigeonhole_sort(a): >>> pigeonhole_sort(a) # a destructive sort >>> a == b True + + >>> pigeonhole_sort([]) """ + if not a: + return # size of range of values in the list (ie, number of pigeonholes we need) min_val = min(a) # min() finds the minimum value @@ -38,7 +42,7 @@ def pigeonhole_sort(a): def main(): a = [8, 3, 2, 7, 4, 6, 8] pigeonhole_sort(a) - print("Sorted order is:", " ".join(a)) + print("Sorted order is:", *a) if __name__ == "__main__": diff --git a/sorts/unknown_sort.py b/sorts/unknown_sort.py index 9fa9d22fb5e0..3545da68ea80 100644 --- a/sorts/unknown_sort.py +++ b/sorts/unknown_sort.py @@ -6,7 +6,7 @@ """ -def merge_sort(collection): +def merge_sort(collection: list) -> list: """Pure implementation of the fastest merge sort algorithm in Python :param collection: some mutable ordered collection with heterogeneous