From 396fa7b923099640d6843f338950ed41300793ec Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Mon, 7 Aug 2023 16:32:20 -0700 Subject: [PATCH] CI: pylint to ruff (#14) --- .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 b9ab510..a00aedb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,20 +12,7 @@ repos: - id: mypy additional_dependencies: ['git+https://github.com/numpy/numpy-stubs', 'types-requests', 'types-atomicwrites', 'types-pycurl'] -- repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 +- 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 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 1a57441..0325804 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cffi scons -pylint +ruff pre-commit pycryptodome==3.9.8