From e40c7b4bf1794c94993715c99e2a97b9d8f5e590 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Fri, 14 Oct 2022 20:04:44 +0530 Subject: [PATCH] refactor: move flake8 config (#7167) * refactor: move flake8 config * Update .pre-commit-config.yaml Co-authored-by: Christian Clauss --- .flake8 | 5 +++++ .pre-commit-config.yaml | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.flake8 b/.flake8 index 9a5863c9c..0d9ef18d1 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,8 @@ [flake8] +max-line-length = 88 +max-complexity = 25 extend-ignore = A003 # Class attribute is shadowing a python builtin + # Formatting style for `black` + E203 # Whitespace before ':' + W503 # Line break occurred before a binary operator diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d2558b90a..d3ea9722f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,11 +35,7 @@ repos: - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 hooks: - - id: flake8 - args: - - --ignore=E203,W503 - - --max-complexity=25 - - --max-line-length=88 + - id: flake8 # See .flake8 for args additional_dependencies: - flake8-bugbear - flake8-builtins @@ -51,7 +47,7 @@ repos: - id: mypy args: - --ignore-missing-imports - - --install-types # See mirrors-mypy README.md + - --install-types # See mirrors-mypy README.md - --non-interactive additional_dependencies: [types-requests]