summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook.git@proton.me>2023-05-08 11:22:48 -0500
committerJordan Cook <jordan.cook.git@proton.me>2023-05-08 11:32:25 -0500
commit83f7bc77e4daeab70e19e29a1ed1ba4bcabff9e1 (patch)
tree2c265c55225c0ab897da5ad82ad96a0036f2bab4
parent3f43383c71df06ceea90299308474c384c7824d5 (diff)
downloadrequests-cache-83f7bc77e4daeab70e19e29a1ed1ba4bcabff9e1.tar.gz
Replace flake8 with ruff
-rw-r--r--.pre-commit-config.yaml7
-rw-r--r--pyproject.toml7
-rw-r--r--setup.cfg16
3 files changed, 10 insertions, 20 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bded4e8..998da61 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,11 +16,10 @@ repos:
rev: 5.12.0
hooks:
- id: isort
- - repo: https://github.com/pycqa/flake8
- rev: 6.0.0
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
+ rev: v0.0.265
hooks:
- - id: flake8
- additional_dependencies: [flake8-comprehensions]
+ - id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
hooks:
diff --git a/pyproject.toml b/pyproject.toml
index a0e89c5..87cc72b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -156,3 +156,10 @@ known_first_party = ['tests']
[tool.mypy]
ignore_missing_imports = true
+
+
+[tool.ruff]
+format = 'grouped'
+line-length = 120
+select = ['C4','C90', 'E', 'F']
+ignore = ['B023']
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 843f922..0000000
--- a/setup.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-[flake8]
-max_line_length = 120
-select = E,F,W,C4,C90
-exclude = __pycache__,.tox,.venv,build,dist
-# Defer these rules to black:
-ignore =
- # whitespace before ':'
- E203
- # missing whitespace around operator
- E225
- # line too long
- E501
- # line break before binary operator
- W503
- # line break after binary operator
- W504