Commit 7339771
committed
fix(maths): defer Matrix type annotations so import does not NameError
Importing maths.matrix_exponentiation raised 'NameError: name Matrix is
not defined' because __mul__ and modular_exponentiation annotate with
Matrix before the class name is bound (annotations evaluate eagerly at
class-body execution time).
Add 'from __future__ import annotations' to defer annotation evaluation,
matching the pattern used elsewhere in the repo.
Verified on current master: import succeeds (NameError gone) and all 10
doctests pass.
Signed-off-by: sudo-ai-git <sudo-ai-git@users.noreply.github.com>1 parent 89343fd commit 7339771
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
0 commit comments