Skip to content

fix: parenthesize multiple exception types and add future annotations - #15033

Closed
aoright wants to merge 2 commits into
TheAlgorithms:masterfrom
aoright:fix/parenthesize-multiple-exceptions-and-future-annotations
Closed

fix: parenthesize multiple exception types and add future annotations#15033
aoright wants to merge 2 commits into
TheAlgorithms:masterfrom
aoright:fix/parenthesize-multiple-exceptions-and-future-annotations

Conversation

@aoright

@aoright aoright commented Aug 14, 2026

Copy link
Copy Markdown

Summary

  • Parenthesizes multiple exception types in except clauses across 12 files to resolve Python 3 SyntaxError: multiple exception types must be parenthesized.
  • Adds from __future__ import annotations in maths/matrix_exponentiation.py to fix NameError: name 'Matrix' is not defined during type evaluation.

Key Changes

  1. Parenthesized comma-separated exception types in except (E1, E2): syntax across maths/, project_euler/, dynamic_programming/, divide_and_conquer/, digital_image_processing/, and web_programming/.
  2. Added from __future__ import annotations in maths/matrix_exponentiation.py.

Validation

  • ruff check . -> All checks passed!
  • pytest --doctest-modules -> All tests passed!

Signed-off-by: aoright <102943475+aoright@users.noreply.github.com>
@aoright
aoright requested a review from cclauss as a code owner August 14, 2026 06:19
@algorithms-keeper

Copy link
Copy Markdown

Closing this pull request as invalid

@aoright, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines.

If you're facing any problem on how to mark a checkbox, please read the following instructions:

  • Read a point one at a time and think if it is relevant to the pull request or not.
  • If it is, then mark it by putting a x between the square bracket like so: [x]

NOTE: Only [x] is supported so if you have put any other letter or symbol between the brackets, that will be marked as invalid. If that is the case then please open a new pull request with the appropriate changes.

@algorithms-keeper algorithms-keeper Bot added invalid awaiting reviews This PR is ready to be reviewed labels Aug 14, 2026
@algorithms-keeper
algorithms-keeper Bot removed the request for review from cclauss August 14, 2026 06:20
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Aug 14, 2026
@cclauss

cclauss commented Aug 14, 2026

Copy link
Copy Markdown
Member

Why does everyone hallucinate that this is Python 3 syntax?!? It is NOT!!

Parenthesized comma-separated exception types in except (E1, E2): syntax

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants