Skip to content

Commit

Permalink
add flake8 to lint precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Jan 10, 2024
1 parent c635883 commit a758b02
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
14 changes: 14 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit a758b02

Please sign in to comment.