Skip to content

fix: crypto_price_tracker.py declares 3.11 but uses 3.14 except syntax - #15550

Open
peda-cos wants to merge 6 commits into
TheAlgorithms:masterfrom
peda-cos:fix/crypto-price-except-syntax
Open

peda-cos wants to merge 6 commits into
TheAlgorithms:masterfrom
peda-cos:fix/crypto-price-except-syntax

Conversation

@peda-cos

@peda-cos peda-cos commented Oct 11, 2026 •

Copy link
Copy Markdown

Describe your change

  • Fix a bug or typo in an existing algorithm?

Checklist

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms. (plus a 2-line lint fix in maths/zellers_congruence.py blocking CI)
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.

Description

The PEP 723 metadata declared >=3.11 while the code only parses on 3.14+ (PEP 758 multi-catch); parenthesizing is reverted by ruff-format 0.16.10 (py315 target), so the declared minimum is aligned to 3.14 instead. Also aliases import datetime to dt in maths/zellers_congruence.py to clear ICN001, which fails on master and blocks every PR ruff check.

How I tested

ruff check . and ruff format --check pass on both files; doctests of maths/zellers_congruence.py pass.

PEP 758 syntax requires Python 3.14, but the script metadata declares
requires-python >= 3.11. Reported by ty check run per TheAlgorithms#15187.
@peda-cos
peda-cos requested a review from cclauss as a code owner October 11, 2026 04:58
@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Oct 11, 2026
@algorithms-keeper algorithms-keeper Bot added the tests are failing Do not merge until tests pass label Oct 11, 2026
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.
Clears ICN001, which fails on master and blocks every PR ruff check.
@algorithms-keeper algorithms-keeper Bot removed the tests are failing Do not merge until tests pass label Oct 11, 2026
@algorithms-keeper algorithms-keeper Bot added tests are failing Do not merge until tests pass and removed awaiting reviews This PR is ready to be reviewed labels Oct 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files tests are failing Do not merge until tests pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants