From 22f02dd650361e091f09f1ae94c5c96a9419c2d4 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Mon, 7 Aug 2023 15:30:35 -0700 Subject: [PATCH] pylint to ruff (#32) --- .pre-commit-config.yaml | 19 +++---------------- pyproject.toml | 6 ++++++ requirements.txt | 2 +- 3 files changed, 10 insertions(+), 17 deletions(-) create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 63c6ae8..721161f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,20 +13,7 @@ repos: hooks: - id: mypy additional_dependencies: ['git+https://github.com/numpy/numpy-stubs'] -- repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.282 hooks: - - id: flake8 - args: - - --select=F,E112,E113,E304,E501,E502,E701,E702,E703,E71,E72,E731,W191,W6 - - --max-line-length=160 - - --statistics -- repo: local - hooks: - - id: pylint - name: pylint - entry: pylint - language: system - types: [python] - args: - - --disable=C,R,W0613,W0511,W0212,W0201,W0311,W0106,W0603,W0621,W0703,E1136 + - id: ruff \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d08c406 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml +[tool.ruff] +select = ["E", "F", "W"] +ignore = ["W292", "E741"] +line-length = 160 +target-version="py311" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ec22f85..453554b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +ruff sympy numpy scipy @@ -5,5 +6,4 @@ tqdm cffi scons pre-commit -pylint Cython