From e3b01ecd1267d39d49b99db9676a653ff197db62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 06:00:40 +0200 Subject: [PATCH 1/9] Bump actions/checkout from 6 to 7 (#14820) Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/devcontainer_ci.yml | 2 +- .github/workflows/directory_writer.yml | 2 +- .github/workflows/project_euler.yml | 4 ++-- .github/workflows/ruff.yml | 2 +- .github/workflows/sphinx.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bb8e1d69217..62b62d0f6481 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - run: sudo apt-get update && sudo apt-get install -y libhdf5-dev - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 with: enable-cache: true diff --git a/.github/workflows/devcontainer_ci.yml b/.github/workflows/devcontainer_ci.yml index d1b81593866f..e8cd040c1323 100644 --- a/.github/workflows/devcontainer_ci.yml +++ b/.github/workflows/devcontainer_ci.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: devcontainers/ci@v0.3 with: push: never diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index deffbe9e364f..598cdfa5a371 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -6,7 +6,7 @@ jobs: directory_writer: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 - uses: actions/setup-python@v6 diff --git a/.github/workflows/project_euler.yml b/.github/workflows/project_euler.yml index 591b2163cc1a..ff61367974f3 100644 --- a/.github/workflows/project_euler.yml +++ b/.github/workflows/project_euler.yml @@ -21,7 +21,7 @@ jobs: libxml2-dev libxslt-dev libhdf5-dev libopenblas-dev - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v6 with: @@ -39,7 +39,7 @@ jobs: libxml2-dev libxslt-dev libhdf5-dev libopenblas-dev - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v6 with: diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 13df19c8d743..d665d0fb9266 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -11,6 +11,6 @@ jobs: ruff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - run: uvx ruff check --output-format=github . diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 3f00094e0264..7a8fc9460446 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -32,7 +32,7 @@ jobs: libxml2-dev libxslt-dev libhdf5-dev libopenblas-dev - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v6 with: From c0db072a1323339e0d9148479f8818a1b9768d88 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 21:04:35 +0200 Subject: [PATCH 2/9] [pre-commit.ci] pre-commit autoupdate (#14906) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.15 → v0.15.20](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.15...v0.15.20) - [github.com/tox-dev/pyproject-fmt: v2.23.0 → v2.25.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.23.0...v2.25.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b865f88350ea..cc52ede8cc08 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: auto-walrus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.15 + rev: v0.15.20 hooks: - id: ruff-check - id: ruff-format @@ -32,7 +32,7 @@ repos: - tomli - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.23.0 + rev: v2.25.1 hooks: - id: pyproject-fmt diff --git a/pyproject.toml b/pyproject.toml index 0b0c3f5cfda4..1a55feda3cbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,5 +265,5 @@ myst_fence_as_directive = [ ] templates_path = [ "_templates" ] source_suffix.".rst" = "restructuredtext" -# ".txt" = "markdown" source_suffix.".md" = "markdown" +# ".txt" = "markdown" From 25bcced0f37df781b0e5aaa575e2a4fad41a2816 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:13:38 -0400 Subject: [PATCH 3/9] Bump actions/setup-python from 6 to 7 (#14965) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/directory_writer.yml | 2 +- .github/workflows/project_euler.yml | 4 ++-- .github/workflows/sphinx.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62b62d0f6481..594369c6dc7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: with: enable-cache: true cache-dependency-glob: uv.lock - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: 3.14 allow-prereleases: true diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index 598cdfa5a371..8b34f97995a7 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: 3.14 allow-prereleases: true diff --git a/.github/workflows/project_euler.yml b/.github/workflows/project_euler.yml index ff61367974f3..73afb2e71cab 100644 --- a/.github/workflows/project_euler.yml +++ b/.github/workflows/project_euler.yml @@ -23,7 +23,7 @@ jobs: libopenblas-dev - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: 3.14 allow-prereleases: true @@ -41,7 +41,7 @@ jobs: libopenblas-dev - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: 3.14 allow-prereleases: true diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 7a8fc9460446..45a74099ff00 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -34,7 +34,7 @@ jobs: libopenblas-dev - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: 3.14 allow-prereleases: true From 948d4cb01e2d8533447e3c0947c757173ec2a87f Mon Sep 17 00:00:00 2001 From: Ali Satwat Khan Date: Fri, 31 Jul 2026 05:29:25 +0500 Subject: [PATCH 4/9] Improve docstrings in sorts/bubble_sort.py (#14924) * docs: expand bubble sort docstrings with algorithm explanation Add a concise description of how bubble sort works (repeated adjacent comparisons/swaps until a pass makes no swaps) and note time/space complexity for both the iterative and recursive implementations. No behavior changes; all existing doctests pass. * Fix Ruff 0.16 lint failures * S310 --------- Co-authored-by: Christian Clauss --- .../inorder_tree_traversal_2022.py | 2 +- sorts/bubble_sort.py | 27 +++++++++++++++++-- .../download_images_from_google_query.py | 7 +++-- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/data_structures/binary_tree/inorder_tree_traversal_2022.py b/data_structures/binary_tree/inorder_tree_traversal_2022.py index 1357527d2953..a4846a5c29a5 100644 --- a/data_structures/binary_tree/inorder_tree_traversal_2022.py +++ b/data_structures/binary_tree/inorder_tree_traversal_2022.py @@ -43,7 +43,7 @@ def insert(node: BinaryTreeNode | None, new_value: int) -> BinaryTreeNode | None return node -def inorder(node: None | BinaryTreeNode) -> list[int]: # if node is None,return +def inorder(node: BinaryTreeNode | None) -> list[int]: # if node is None,return """ >>> inorder(make_tree()) [6, 10, 14, 15, 20, 25, 60] diff --git a/sorts/bubble_sort.py b/sorts/bubble_sort.py index 4d658a4a12e4..c66d5d59dd93 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -2,7 +2,18 @@ def bubble_sort_iterative(collection: list[Any]) -> list[Any]: - """Pure implementation of bubble sort algorithm in Python + """Pure implementation of the bubble sort algorithm in Python (iterative). + + Bubble sort works by repeatedly stepping through the collection, + comparing each pair of adjacent elements and swapping them if they + are in the wrong order. This process repeats, with each full pass + "bubbling" the next-largest unsorted element into its correct + position at the end of the collection, until a full pass completes + with no swaps, at which point the collection is sorted. + + Time complexity: O(n) best case (already sorted, thanks to the + early-exit optimization), O(n^2) average and worst case. + Space complexity: O(1) auxiliary (sorts in place). :param collection: some mutable ordered collection with heterogeneous comparable items inside @@ -61,7 +72,19 @@ def bubble_sort_iterative(collection: list[Any]) -> list[Any]: def bubble_sort_recursive(collection: list[Any]) -> list[Any]: - """It is similar iterative bubble sort but recursive. + """Pure implementation of the bubble sort algorithm in Python (recursive). + + Functionally identical to the iterative version: each call makes a + single pass through the collection, comparing adjacent elements and + swapping any pair that is out of order. If any swap occurred during + the pass, the function calls itself again on the (partially sorted) + collection; once a pass completes with no swaps, the collection is + sorted and the recursion stops. + + Time complexity: O(n) best case (already sorted), O(n^2) average and + worst case. + Space complexity: O(1) auxiliary for the sort itself (sorts in place), + though the recursion adds O(n) call-stack frames in the worst case. :param collection: mutable ordered sequence of elements :return: the same list in ascending order diff --git a/web_programming/download_images_from_google_query.py b/web_programming/download_images_from_google_query.py index 659cf6a398a3..940cc3a5f024 100644 --- a/web_programming/download_images_from_google_query.py +++ b/web_programming/download_images_from_google_query.py @@ -88,8 +88,11 @@ def download_images_from_google_query(query: str = "dhaka", max_images: int = 5) opener.addheaders = [ ( "User-Agent", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - " (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19582", + ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" + " (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36" + " Edge/18.19582" + ), ) ] urllib.request.install_opener(opener) From 758d487394677c2c7e4c468776e066eafe3883a7 Mon Sep 17 00:00:00 2001 From: hojen2 Date: Fri, 31 Jul 2026 08:37:49 -0700 Subject: [PATCH 5/9] Upgrade ruff in pre-commit (#14982) * Fix invalid Python 2 syntax in except clause * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update ruff-pre-commit version to v0.16.1 * Fix indentation in test_cancer_data function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc52ede8cc08..8721f6e5b99a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: auto-walrus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.16.1 hooks: - id: ruff-check - id: ruff-format From eea1bacfe0294b82c229432c82a09d3396e8a50c Mon Sep 17 00:00:00 2001 From: Ali Satwat Khan Date: Fri, 31 Jul 2026 21:07:20 +0500 Subject: [PATCH 6/9] fix: raise ValueError in encode() for non-lowercase input (#14936) * fix: raise ValueError in encode() for non-lowercase input encode() previously accepted uppercase letters, digits, and other non-lowercase characters silently, producing incorrect/out-of-range values (e.g. negative numbers for uppercase letters) instead of failing. Add input validation using str.islower() and str.isalpha() to raise a ValueError when the input isn't purely lowercase a-z. Added a doctest covering the new error case. * resolved doctest * Fix Ruff 0.16 lint failures * Enhance encode function error handling examples Update error handling in encode function to include examples for mixed case and invalid characters. * Fix indentation in test_cancer_data function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Christian Clauss Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- ciphers/a1z26.py | 14 ++++++++++++++ .../sequential_minimum_optimization.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ciphers/a1z26.py b/ciphers/a1z26.py index a1377ea6d397..d99efe186519 100644 --- a/ciphers/a1z26.py +++ b/ciphers/a1z26.py @@ -13,7 +13,21 @@ def encode(plain: str) -> list[int]: """ >>> encode("myname") [13, 25, 14, 1, 13, 5] + >>> encode("abCd") + Traceback (most recent call last): + ... + ValueError: plain must contain only lowercase letters (a-z) + >>> encode("n0w") + Traceback (most recent call last): + ... + ValueError: plain must contain only lowercase letters (a-z) + >>> encode("later!") + Traceback (most recent call last): + ... + ValueError: plain must contain only lowercase letters (a-z) """ + if not plain.islower() or not plain.isalpha(): + raise ValueError("plain must contain only lowercase letters (a-z)") return [ord(elem) - 96 for elem in plain] diff --git a/machine_learning/sequential_minimum_optimization.py b/machine_learning/sequential_minimum_optimization.py index 625fc28fe60c..e96f06d6f080 100644 --- a/machine_learning/sequential_minimum_optimization.py +++ b/machine_learning/sequential_minimum_optimization.py @@ -451,7 +451,7 @@ def test_cancer_data(): print("Hello!\nStart test SVM using the SMO algorithm!") # 0: download dataset and load into pandas' dataframe if not os.path.exists(r"cancer_data.csv"): - request = urllib.request.Request( # noqa: S310 + request = urllib.request.Request( CANCER_DATASET_URL, headers={"User-Agent": "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)"}, ) From f5988cc09713315817df6a7e327e258013a94440 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 20:44:36 +0200 Subject: [PATCH 7/9] [pre-commit.ci] pre-commit autoupdate (#14993) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.4.2 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.2...v2.4.3) - [github.com/tox-dev/pyproject-fmt: v2.25.1 → v2.26.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.25.1...v2.26.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8721f6e5b99a..0a5f50751ce3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,14 +25,14 @@ repos: - id: ruff-format - repo: https://github.com/codespell-project/codespell - rev: v2.4.2 + rev: v2.4.3 hooks: - id: codespell additional_dependencies: - tomli - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.25.1 + rev: v2.26.0 hooks: - id: pyproject-fmt From acd4b34b0e2196338f4cdb187f34cbb6a38cc3cc Mon Sep 17 00:00:00 2001 From: Kanika Katare Date: Tue, 25 Aug 2026 19:38:42 +0530 Subject: [PATCH 8/9] fix: sub-interval midpoint formula in ternary search (#15070) * fix: sub-interval midpoint formula in ternary search * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- searches/ternary_search.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/searches/ternary_search.py b/searches/ternary_search.py index 73e4b1ddc68b..b51c839e1dbf 100644 --- a/searches/ternary_search.py +++ b/searches/ternary_search.py @@ -82,6 +82,11 @@ def ite_ternary_search(array: list[int], target: int) -> int: -1 >>> ite_ternary_search([.1, .4 , -.1], .1) 0 + >>> test_list_large = list(range(100)) + >>> ite_ternary_search(test_list_large, 65) + 65 + >>> ite_ternary_search(test_list_large, 105) + -1 """ left = 0 @@ -90,8 +95,8 @@ def ite_ternary_search(array: list[int], target: int) -> int: if right - left < precision: return lin_search(left, right, array, target) - one_third = (left + right) // 3 + 1 - two_third = 2 * (left + right) // 3 + 1 + one_third = left + (right - left) // 3 + two_third = right - (right - left) // 3 if array[one_third] == target: return one_third @@ -99,13 +104,13 @@ def ite_ternary_search(array: list[int], target: int) -> int: return two_third elif target < array[one_third]: - right = one_third - 1 + right = one_third elif array[two_third] < target: left = two_third + 1 else: left = one_third + 1 - right = two_third - 1 + right = two_third return -1 @@ -133,12 +138,19 @@ def rec_ternary_search(left: int, right: int, array: list[int], target: int) -> -1 >>> rec_ternary_search(0, 3, [.1, .4 , -.1], .1) 0 + >>> test_list_large = list(range(100)) + >>> rec_ternary_search(0, len(test_list_large), test_list_large, 65) + 65 + >>> rec_ternary_search(20, 80, test_list_large, 65) + 65 + >>> rec_ternary_search(20, 80, test_list_large, 15) + -1 """ if left < right: if right - left < precision: return lin_search(left, right, array, target) - one_third = (left + right) // 3 + 1 - two_third = 2 * (left + right) // 3 + 1 + one_third = left + (right - left) // 3 + two_third = right - (right - left) // 3 if array[one_third] == target: return one_third @@ -146,11 +158,11 @@ def rec_ternary_search(left: int, right: int, array: list[int], target: int) -> return two_third elif target < array[one_third]: - return rec_ternary_search(left, one_third - 1, array, target) + return rec_ternary_search(left, one_third, array, target) elif array[two_third] < target: return rec_ternary_search(two_third + 1, right, array, target) else: - return rec_ternary_search(one_third + 1, two_third - 1, array, target) + return rec_ternary_search(one_third + 1, two_third, array, target) else: return -1 @@ -165,7 +177,7 @@ def rec_ternary_search(left: int, right: int, array: list[int], target: int) -> assert collection == sorted(collection), f"List must be ordered.\n{collection}." target = int(input("Enter the number to be found in the list:\n").strip()) result1 = ite_ternary_search(collection, target) - result2 = rec_ternary_search(0, len(collection) - 1, collection, target) + result2 = rec_ternary_search(0, len(collection), collection, target) if result2 != -1: print(f"Iterative search: {target} found at positions: {result1}") print(f"Recursive search: {target} found at positions: {result2}") From 25a312ded5b3bc7f3887df3d9d359fbdbf7e25a4 Mon Sep 17 00:00:00 2001 From: Satyam Kumar Date: Tue, 25 Aug 2026 19:39:01 +0530 Subject: [PATCH 9/9] Fix docstring copy-paste error in maths/sumset.py (#15052) The docstring incorrectly referenced Sylvester's sequence (a copy-paste error from maths/sylvester_sequence.py) and used param names that did not match the actual function signature. Fixes #15013 Co-authored-by: kumarsatyam9378-art --- maths/sumset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maths/sumset.py b/maths/sumset.py index fa18f9e24b4c..6bfb8bfd25eb 100644 --- a/maths/sumset.py +++ b/maths/sumset.py @@ -10,9 +10,9 @@ def sumset(set_a: set, set_b: set) -> set: """ - :param first set: a set of numbers - :param second set: a set of numbers - :return: the nth number in Sylvester's sequence + :param set_a: a set of numbers + :param set_b: a set of numbers + :return: the sumset of set_a and set_b (all pairwise sums a + b) >>> sumset({1, 2, 3}, {4, 5, 6}) {5, 6, 7, 8, 9}