From 96eab8054a5448111bc4d748bb34df5a497cdb0b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Oct 2022 15:18:24 -0500 Subject: [PATCH] Remove flake8 file (#447) --- .flake8 | 17 ----------------- .pre-commit-config.yaml | 7 ++++--- pyproject.toml | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 20 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index e3ccbd79..00000000 --- a/.flake8 +++ /dev/null @@ -1,17 +0,0 @@ -[flake8] -ignore = E501, W503, E402 -builtins = c, get_config -exclude = - .cache, - .github, - docs, - setup.py -enable-extensions = G -extend-ignore = - G001, G002, G004, G200, G201, G202, - # black adds spaces around ':' - E203, -per-file-ignores = - # B011: Do not call assert False since python -O removes these calls - # F841 local variable 'foo' is assigned to but never used - jupyter_releaser/tests/*: B011, F841 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2efb22b7..332e19ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,10 +39,11 @@ repos: - id: pyupgrade args: [--py37-plus] - - repo: https://github.com/pycqa/flake8 - rev: 5.0.4 + - repo: https://github.com/john-hen/Flake8-pyproject + rev: 1.0.1 hooks: - - id: flake8 + - id: Flake8-pyproject + alias: flake8 additional_dependencies: ["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"] stages: [manual] diff --git a/pyproject.toml b/pyproject.toml index 9681c9ba..a8c897df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,3 +133,24 @@ module = [ "pypandoc", ] ignore_missing_imports = true + +[tool.flake8] +ignore = "E501, W503, E402" +builtins = "c, get_config" +exclude = [ + ".cache", + ".github", + "docs", + "setup.py", +] +enable-extensions = "G" +extend-ignore = [ + "G001", "G002", "G004", "G200", "G201", "G202", + # black adds spaces around ':' + "E203", +] +per-file-ignores = [ + # B011: Do not call assert False since python -O removes these calls + # F841 local variable 'foo' is assigned to but never used + "jupyter_releaser/tests/*: B011", "F841", +]