Skip to content

Commit 0b2cdde

Browse files
committed
fix(ci): resolve institutional mypy fractures in qrt/qsv and restore test override
1 parent ceaf3f3 commit 0b2cdde

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ strict = true
4646
python_version = "3.12"
4747
warn_return_any = true
4848
warn_unused_configs = true
49+
50+
[[tool.mypy.overrides]]
51+
module = "tests.*"
52+
ignore_errors = true

src/nrc/math/qrt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88
import math
9-
from typing import Union
9+
from typing import Union, cast
1010

1111
import numpy as np
1212

@@ -46,7 +46,7 @@ def qrt_damping(
4646
term1 = np.sin(freq_sin * x)
4747
term2 = np.exp(-(x**2) / PHI_FLOAT)
4848
term3 = np.cos(freq_cos * x)
49-
return (term1 * term2) + term3
49+
return cast(Union[float, np.ndarray, "torch.Tensor"], (term1 * term2) + term3)
5050

5151
# PyTorch Path (Supports Grad Tensors)
5252
if torch is not None:

src/nrc/math/quantum_shadow_veil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, spiral_density: int = 4096):
2323
self.keys: List[int] = []
2424
self.spiral_density = spiral_density
2525

26-
def expand_fibonacci_keys(self, seed: int, count: int):
26+
def expand_fibonacci_keys(self, seed: int, count: int) -> None:
2727
"""Generates hierarchical key shards following the Fibonacci/Binet sequence."""
2828
a, b = seed, seed * 2
2929
for _ in range(count):

0 commit comments

Comments
 (0)