Repository navigation
Comparing changes
Open a pull request
base repository: niyueming/Python
base: master
head repository: TheAlgorithms/Python
compare: master
- 16 commits
- 23 files changed
- 14 contributors
Commits on Oct 12, 2026
-
Fix datetime import alias in Zeller’s congruence (TheAlgorithms#15547)
* fix(maths): use conventional datetime alias in Zeller's congruence * from datetime import date Replaced datetime module alias with direct import for clarity. --------- Co-authored-by: Christian Clauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c9953bb - Browse repository at this point
Copy the full SHA c9953bbView commit details -
refactor(heap): remove redundant TypeVar in Heap (TheAlgorithms#15504)
* refactor(heap): remove redundant TypeVar in Heap * refactor(heap): revert Comparable.__gt__ signature to self: T, other: T * Clean up imports in heap.py Removed unused TypeVar import from heap.py * Update __gt__ method signature in Comparable class --------- Co-authored-by: Christian Clauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 14082f5 - Browse repository at this point
Copy the full SHA 14082f5View commit details -
feat(scheduling): add weighted interval scheduling (TheAlgorithms#15539)
* feat(dynamic_programming): add weighted interval scheduling algorithm * test(dynamic_programming): add doctest to __post_init__ and add test function * Move weighted interval scheduling to scheduling directory --------- Co-authored-by: Christian Clauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f6b39e1 - Browse repository at this point
Copy the full SHA f6b39e1View commit details -
fix: instagram_crawler.py declares 3.13 but uses 3.14 except syntax (T…
…heAlgorithms#15551) * fix: parenthesize multi-catch that only parses on 3.14 PEP 758 syntax requires Python 3.14, but the script metadata declares requires-python >= 3.13. Reported by ty check run per TheAlgorithms#15187. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update required Python version in instagram_crawler.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a89103d - Browse repository at this point
Copy the full SHA a89103dView commit details -
fix: crypto_price_tracker.py declares 3.11 but uses 3.14 except syntax (
TheAlgorithms#15550) * fix: parenthesize multi-catch that only parses on 3.14 PEP 758 syntax requires Python 3.14, but the script metadata declares requires-python >= 3.11. Reported by ty check run per TheAlgorithms#15187. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: declare 3.14 in crypto_price_tracker PEP 723 metadata The unparenthesized multi-catch (PEP 758) only parses on 3.14+. Parenthesizing is not an option: ruff-format 0.16.10 with the repo's py315 target re-emits the parenthesized form, so pre-commit.ci reverts it on every push. Align the declared minimum instead. * fix: alias datetime import to dt in maths/zellers_congruence Clears ICN001, which fails on master and blocks every PR ruff check. * Refactor datetime import in zellers_congruence.py Replaced 'datetime as dt' with 'datetime' for clarity. * Update required Python version to 3.15 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 21f7907 - Browse repository at this point
Copy the full SHA 21f7907View commit details -
maths: add Keith number algorithm (TheAlgorithms#15536)
- Implement is_keith_number(number: int) -> bool with rolling sum optimization - Implement find_keith_numbers(limit: int) -> list[int] - Add Wikipedia and OEIS reference links - Comprehensive doctests covering normal, edge, and error cases
Configuration menu - View commit details
-
Copy full SHA for 6b70b83 - Browse repository at this point
Copy the full SHA 6b70b83View commit details -
fix: honor empty-list contract for generator input (TheAlgorithms#15552)
make_linked_list declared the input as Iterable[int] but tested emptiness with truthiness, so an empty generator silently produced an empty LinkedList instead of raising. Materialize the iterable first and cover generator input with doctests. Co-authored-by: Christian Clauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for deb9cfc - Browse repository at this point
Copy the full SHA deb9cfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0904b02 - Browse repository at this point
Copy the full SHA 0904b02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3935d28 - Browse repository at this point
Copy the full SHA 3935d28View commit details
Commits on Oct 13, 2026
-
Add scripts/find_and_fix_pep798.py to find and fix PEP 798 opportunit…
…ies (TheAlgorithms#15570) Co-authored-by: Copilot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f061ff - Browse repository at this point
Copy the full SHA 1f061ffView commit details
Commits on Oct 14, 2026
-
Python PEP 798 fix unpacking in comprehensions opportunities (TheAlgo…
…rithms#15572) * Add scripts/find_and_fix_pep798.py to find and fix PEP 798 opportunities Co-authored-by: Copilot <[email protected]> * Python PEP 798 compression fixes * updating DIRECTORY.md --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: cclauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e1a2a8b - Browse repository at this point
Copy the full SHA e1a2a8bView commit details
Commits on Oct 16, 2026
-
fix: resolve deprecated contextmanager return annotation and un-ignor…
…e rule (TheAlgorithms#15568) Annotating @contextmanager functions as -> Iterator is deprecated in Python 3.15 typeshed stubs; updated to -> Generator[None]. Un-ignores rules.deprecated in pyproject.toml. Contributes to TheAlgorithms#15187.
Configuration menu - View commit details
-
Copy full SHA for adccf0c - Browse repository at this point
Copy the full SHA adccf0cView commit details -
Filter PEP 798 scanner inputs (TheAlgorithms#15583)
* Initial plan * Filter PEP 798 scan paths Co-authored-by: cclauss <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: cclauss <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 25c712f - Browse repository at this point
Copy the full SHA 25c712fView commit details
Commits on Oct 20, 2026
-
fix(machine_learning): call features.any() in linear_discriminant_ana…
…lysis (TheAlgorithms#15606) In linear_discriminant_analysis, line 146 wrote if features.any: instead of calling if features.any():. Because the method object is always truthy, the else branch handling empty datasets was unreachable dead code, triggering ty warning[redundant-condition]. Call eatures.any() (matching line 107 in principal_component_analysis) and add a test case in test_linear_discriminant_analysis verifying that an empty dataset properly enters the else branch. Validation: - uvx ty check machine_learning/dimensionality_reduction.py -> All checks passed (0 diagnostics) - uvx --with scipy --with scikit-learn --with numpy pytest machine_learning/dimensionality_reduction.py --doctest-modules -> 9 passed - uvx ruff check / format -> clean
Configuration menu - View commit details
-
Copy full SHA for f7109c5 - Browse repository at this point
Copy the full SHA f7109c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e03a48 - Browse repository at this point
Copy the full SHA 6e03a48View commit details
Commits on Nov 2, 2026
-
[pre-commit.ci] pre-commit autoupdate (TheAlgorithms#15686)
updates: - [github.com/tox-dev/pyproject-fmt: v2.30.1 → v2.30.3](tox-dev/pyproject-fmt@v2.30.1...v2.30.3) - [github.com/astral-sh/ruff-pre-commit: v0.16.10 → v0.17.3](astral-sh/ruff-pre-commit@v0.16.10...v0.17.3) - [github.com/rvben/rumdl-pre-commit: v0.2.78 → v0.3.2](rvben/rumdl-pre-commit@v0.2.78...v0.3.2) - [github.com/astral-sh/uv-pre-commit: 0.12.23 → 0.13.6](astral-sh/uv-pre-commit@0.12.23...0.13.6) - [github.com/abravalheri/validate-pyproject: 0.26 → v0.27](abravalheri/validate-pyproject@0.26...v0.27) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 574d100 - Browse repository at this point
Copy the full SHA 574d100View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master