Skip to content

Commit

Permalink
Update Pyright and MyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilGirdhar committed Aug 24, 2024
1 parent 6c9e9c6 commit 0aed709
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 110 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ repos:
- id: check-yaml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
rev: v0.6.2
hooks:
- id: ruff

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.376
rev: v1.1.377
hooks:
- id: pyright

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ warn_unused_configs = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = ['networkx', 'optax', 'array_api_compat']
module = ['networkx', 'optax', 'optax.contrib', 'array_api_compat']
ignore_missing_imports = true

[tool.ruff]
Expand Down
6 changes: 3 additions & 3 deletions tjax/_src/leaky_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ def leaky_covariance(x_time_series: ComplexArray,
def times(a: ComplexArray, b: ComplexArray, /) -> ComplexArray:
a_selected = a[..., *(s * (b.ndim - 1))]
b_selected = b[:, *(s * (a.ndim - 1))]
return a_selected * b_selected # type: ignore # pyright: ignore
return a_selected * b_selected
else:
if x_time_series.shape != y_time_series.shape:
raise ValueError

def times(a: ComplexArray, b: ComplexArray, /) -> ComplexArray:
return a * b # type: ignore # pyright: ignore
return a * b
x = leaky_integrate_time_series(x_time_series, decay)
y = leaky_integrate_time_series(y_time_series, decay)
xy = leaky_integrate_time_series(times(x_time_series, y_time_series), decay)
return xy - times(x, y) # type: ignore # pyright: ignore
return xy - times(x, y)
Loading

0 comments on commit 0aed709

Please sign in to comment.