提交 58fc7106 authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Cleanup ruff per file ignores

上级 3502c366
...@@ -149,27 +149,21 @@ lines-after-imports = 2 ...@@ -149,27 +149,21 @@ lines-after-imports = 2
# TODO: Get rid of these: # TODO: Get rid of these:
"**/__init__.py" = ["F401", "E402", "F403"] "**/__init__.py" = ["F401", "E402", "F403"]
"pytensor/tensor/linalg.py" = ["F403"] "pytensor/tensor/linalg.py" = ["F403"]
# Modules that use print-statements, skip "T201"
"pytensor/link/c/cmodule.py" = ["PTH", "T201"] "pytensor/link/c/cmodule.py" = ["PTH", "T201"]
"pytensor/misc/elemwise_time_test.py" = ["T201"] "pytensor/misc/elemwise_time_test.py" = ["T201"]
"pytensor/misc/elemwise_openmp_speedup.py" = ["T201"] "pytensor/misc/elemwise_openmp_speedup.py" = ["T201"]
"pytensor/misc/check_duplicate_key.py" = ["T201"] "pytensor/misc/check_duplicate_key.py" = ["T201"]
"pytensor/misc/check_blas.py" = ["T201"] "pytensor/misc/check_blas.py" = ["T201"]
"pytensor/bin/pytensor_cache.py" = ["T201"] "pytensor/bin/pytensor_cache.py" = ["T201"]
# For the tests we skip `E402` because `pytest.importorskip` is used:
"tests/link/jax/test_scalar.py" = ["E402"]
"tests/link/jax/test_tensor_basic.py" = ["E402"]
"tests/link/numba/test_basic.py" = ["E402"]
"tests/link/numba/test_cython_support.py" = ["E402"]
"tests/link/numba/test_performance.py" = ["E402"]
"tests/link/numba/test_sparse.py" = ["E402"]
"tests/link/numba/test_tensor_basic.py" = ["E402"]
"tests/tensor/test_math_scipy.py" = ["E402"]
"tests/sparse/test_basic.py" = ["E402"]
"tests/sparse/test_sp2.py" = ["E402"]
"tests/sparse/test_utils.py" = ["E402"]
"tests/sparse/sandbox/test_sp.py" = ["E402", "F401"]
"tests/compile/test_monitormode.py" = ["T201"] "tests/compile/test_monitormode.py" = ["T201"]
"scripts/run_mypy.py" = ["T201"] "scripts/run_mypy.py" = ["T201"]
# Test modules of optional backends that use `pytest.importorskip`, skip "E402"
"tests/link/jax/**/test_*.py" = ["E402"]
"tests/link/numba/**/test_*.py" = ["E402"]
"tests/link/pytorch/**/test_*.py" = ["E402"]
"tests/link/mlx/**/test_*.py" = ["E402"]
[tool.mypy] [tool.mypy]
......
...@@ -23,7 +23,7 @@ from tests.tensor.random.test_basic import ( ...@@ -23,7 +23,7 @@ from tests.tensor.random.test_basic import (
jax = pytest.importorskip("jax") jax = pytest.importorskip("jax")
from pytensor.link.jax.dispatch.random import numpyro_available # noqa: E402 from pytensor.link.jax.dispatch.random import numpyro_available
def compile_random_function(*args, mode=jax_mode, **kwargs): def compile_random_function(*args, mode=jax_mode, **kwargs):
......
import numpy as np import numpy as np
import pytest
sp = pytest.importorskip("scipy", minversion="0.7.0")
from pytensor.sparse.utils import hash_from_sparse from pytensor.sparse.utils import hash_from_sparse
from tests.sparse.test_basic import as_sparse_format from tests.sparse.test_basic import as_sparse_format
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论