Skip to content

Commit

Permalink
Add support for ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed May 14, 2023
1 parent 1da2891 commit 6b43b43
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,34 @@ skip_gitignore = true
skip = "pytensor/version.py"
skip_glob = "**/*.pyx"

[tool.ruff]
select=["C","E","F","W"]
ignore=["E501","E741","C408","C901"]
exclude = [
"doc/",
"pytensor/_version.py",
"bin/pytensor_cache.py",
]

[tool.ruff.per-file-ignores]
# TODO: Get rid of these:
"**/__init__.py"=["F401","E402","F403"]
"pytensor/tensor/linalg.py"=["F401","F403"]
"pytensor/scalar/basic_scipy.py"=["E402","F403","F401"]
"pytensor/graph/toolbox.py"=["E402","F403","F401"]
"pytensor/link/jax/jax_dispatch.py"=["E402","F403","F401"]
"pytensor/link/jax/jax_linker.py"=["E402","F403","F401"]
"pytensor/sparse/sandbox/sp2.py"=["F401"]
"tests/tensor/test_math_scipy.py"=["E402"]
"tests/sparse/test_basic.py"=["E402"]
"tests/sparse/test_opt.py"=["E402"]
"tests/sparse/test_sp2.py"=["E402"]
"tests/sparse/test_utils.py"=["E402","F401"]
"tests/sparse/sandbox/test_sp.py"=["E402","F401"]
"tests/scalar/test_basic_sympy.py"=["E402"]
"pytensor/graph/rewriting/unify.py"=["F811"]


[tool.mypy]
ignore_missing_imports = true
no_implicit_optional = true
Expand Down

0 comments on commit 6b43b43

Please sign in to comment.