From a758b029735e56cd432f4688f628849de08163cb Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Wed, 10 Jan 2024 15:53:32 -0500 Subject: [PATCH] add flake8 to lint precommit --- .flake8 | 14 ++++++++++++++ .pre-commit-config.yaml | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..26e20a5d --- /dev/null +++ b/.flake8 @@ -0,0 +1,14 @@ +[flake8] +select = + E + W + F +ignore = + W503 # makes Flake8 work like black + W504 + E203 # makes Flake8 work like black + E741 + E501 # long line checking is done in black +exclude = test/ +per-file-ignores = + */__init__.py: F401 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cb0a997..3d55e0d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ # Configuration for pre-commit hooks (see https://pre-commit.com/). -exclude: ^(dbt/common/events/types_pb2.py) +exclude: ^(dbt_common/events/types_pb2.py) # Force all unspecified python hooks to run python 3.8 default_language_version: @@ -27,13 +27,13 @@ repos: args: - "--check" - "--diff" -# - repo: https://github.com/pycqa/flake8 -# rev: 4.0.1 -# hooks: -# - id: flake8 -# - id: flake8 -# alias: flake8-check -# stages: [manual] +- repo: https://github.com/pycqa/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + - id: flake8 + alias: flake8-check + stages: [manual] # - repo: https://github.com/pre-commit/mirrors-mypy # rev: v1.4.1 # hooks: @@ -50,11 +50,11 @@ repos: # # author. # # See https://github.com/pre-commit/pre-commit/issues/730 for details. # args: [--show-error-codes] -# files: ^dbt/common/ +# files: ^dbt_common/ # language: system # - id: mypy # alias: mypy-check # stages: [manual] # args: [--show-error-codes, --pretty] -# files: ^dbt/common +# files: ^dbt_common # language: system