-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre commit Hooks (black, flake8, mypy, etc) [CT-105] #4639
Changes from 19 commits
fb9cca1
e9ac78e
3f48ea4
45db18b
9fafac6
75201be
a7d99a9
4d44780
675d551
35a6447
d3865d7
3d65519
181dd12
e66aa6a
f11b323
bce4bb1
c29e7ee
7e1af5d
8d900e9
4f35cbf
cb09add
64eede8
b7a6d01
522b4f7
7c13388
a18c790
8477fdb
33727ed
2161a53
8af83a0
2df7667
e5cf9fa
e2f7f5a
e64cc0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[flake8] | ||
select = | ||
E | ||
W | ||
F | ||
ignore = | ||
W503 | ||
W504 | ||
E203 | ||
E741 | ||
max-line-length = 99 | ||
exclude = test |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -37,19 +37,10 @@ defaults: | |||||
|
||||||
jobs: | ||||||
code-quality: | ||||||
name: ${{ matrix.toxenv }} | ||||||
name: code-quality | ||||||
|
||||||
runs-on: ubuntu-latest | ||||||
|
||||||
strategy: | ||||||
fail-fast: false | ||||||
matrix: | ||||||
toxenv: [flake8, mypy] | ||||||
|
||||||
env: | ||||||
TOXENV: ${{ matrix.toxenv }} | ||||||
PYTEST_ADDOPTS: "-v --color=yes" | ||||||
|
||||||
steps: | ||||||
- name: Check out the repository | ||||||
uses: actions/checkout@v2 | ||||||
|
@@ -62,12 +53,12 @@ jobs: | |||||
- name: Install python dependencies | ||||||
run: | | ||||||
pip install --user --upgrade pip | ||||||
pip install tox | ||||||
pip install pre-commit | ||||||
pip --version | ||||||
tox --version | ||||||
pre-commit --version | ||||||
|
||||||
- name: Run tox | ||||||
run: tox | ||||||
- name: Run pre-commit hooks | ||||||
run: pre-commit | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be something like:
Suggested change
There are no staged files when this workflow runs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oooh good catch ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! and more on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
||||||
unit: | ||||||
name: unit test / python ${{ matrix.python-version }} | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# **what?** | ||
# Take the given commit, run unit tests specifically on that sha, build and | ||
# Take the given commit, run unit tests specifically on that sha, build and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this whole file is just whitespace changes |
||
# package it, and then release to GitHub and PyPi with that specific build | ||
|
||
# **why?** | ||
|
@@ -142,9 +142,8 @@ jobs: | |
run: | | ||
dbt --version | ||
|
||
|
||
github-release: | ||
name: GitHub Release | ||
name: GitHub Release | ||
|
||
needs: test-build | ||
|
||
|
@@ -155,7 +154,7 @@ jobs: | |
with: | ||
name: dist | ||
path: '.' | ||
|
||
# Need to set an output variable because env variables can't be taken as input | ||
# This is needed for the next step with releasing to GitHub | ||
- name: Find release type | ||
|
@@ -179,7 +178,7 @@ jobs: | |
dbt_core-${{github.event.inputs.version_number}}-py3-none-any.whl | ||
dbt-postgres-${{github.event.inputs.version_number}}.tar.gz | ||
dbt-core-${{github.event.inputs.version_number}}.tar.gz | ||
|
||
pypi-release: | ||
name: Pypi release | ||
|
||
|
@@ -188,12 +187,12 @@ jobs: | |
needs: github-release | ||
|
||
environment: PypiProd | ||
steps: | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: 'dist' | ||
|
||
- name: Publish distribution to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,9 +49,8 @@ coverage.xml | |
*,cover | ||
.hypothesis/ | ||
test.env | ||
*.pytest_cache/ | ||
|
||
# Mypy | ||
.mypy_cache/ | ||
Comment on lines
-53
to
-54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where did this go? do we need the new location in the gitignore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was a duplicate. See line 27 |
||
|
||
# Translations | ||
*.mo | ||
|
@@ -66,10 +65,10 @@ docs/_build/ | |
# PyBuilder | ||
target/ | ||
|
||
#Ipython Notebook | ||
# Ipython Notebook | ||
.ipynb_checkpoints | ||
|
||
#Emacs | ||
# Emacs | ||
*~ | ||
|
||
# Sublime Text | ||
|
@@ -78,6 +77,7 @@ target/ | |
# Vim | ||
*.sw* | ||
|
||
# Pyenv | ||
.python-version | ||
|
||
# Vim | ||
|
@@ -90,6 +90,7 @@ venv/ | |
# AWS credentials | ||
.aws/ | ||
|
||
# MacOS | ||
.DS_Store | ||
|
||
# vscode | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Configuration for pre-commit hooks (see https://pre-commit.com/). | ||
# Eventually the hooks described here will be run as tests before merging each PR. | ||
|
||
# TODO: remove global exclusion of tests when testing overhaul is complete | ||
exclude: ^test/ | ||
iknox-fa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
repos: | ||
iknox-fa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-yaml | ||
args: [--unsafe] | ||
- id: check-json | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-case-conflict | ||
- repo: https://github.com/psf/black | ||
rev: 21.12b0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
args: ['--line-length=99'] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.782 | ||
hooks: | ||
- id: mypy | ||
args: [--show-error-codes] | ||
files: ^core/dbt/ | ||
entry: mypy core/dbt/ | ||
pass_filenames: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well this is annoyingly specific. Since you had trouble getting here it might be worth a comment to save a future poor soul. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
# N.B.: By using `language: system` we run this hook in the local | ||
# environment instead of a pre-commit isolated one. This is needed | ||
# to ensure mypy correctly parses the project. It may cause trouble | ||
# in that it adds environmental variables out of our control to the | ||
# mix. Unfortunately, there's nothing we can do about per pre-commit's | ||
# author. | ||
# See https://github.com/pre-commit/pre-commit/issues/730 for details. | ||
language: system |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ Here's a good workflow: | |
- Outline your planned implementation. If you want help getting started, ask! | ||
- Follow the steps outlined below to develop locally. Once you have opened a PR, one of the `dbt-core` maintainers will work with you to review your code. | ||
- Add a test! Tests are crucial for both fixes and new features alike. We want to make sure that code works as intended, and that it avoids any bugs previously encountered. Currently, the best resource for understanding `dbt-core`'s [unit](test/unit) and [integration](test/integration) tests is the tests themselves. One of the maintainers can help by pointing out relevant examples. | ||
- Check your formatting and linting with [Flake8](https://flake8.pycqa.org/en/latest/#), [Black](https://github.com/psf/black), and the rest of the hooks we have in our [pre-commit](https://pre-commit.com/) [config](https://github.com/dbt-labs/dbt-core/blob/75201be9db1cb2c6c01fa7e71a314f5e5beb060a/.pre-commit-config.yaml). | ||
ChenyuLInx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
In some cases, the right resolution to an open issue might be tangential to the `dbt-core` codebase. The right path forward might be a documentation update or a change that can be made in user-space. In other cases, the issue might describe functionality that the `dbt-core` maintainers are unwilling or unable to incorporate into the `dbt-core` codebase. When it is determined that an open issue describes functionality that will not translate to a code change in the `dbt-core` repository, the issue will be tagged with the `wontfix` label (see below) and closed. | ||
|
||
|
@@ -106,6 +107,7 @@ A short list of tools used in `dbt-core` testing that will be helpful to your un | |
- [`pytest`](https://docs.pytest.org/en/latest/) to discover/run tests | ||
- [`make`](https://users.cs.duke.edu/~ola/courses/programming/Makefiles/Makefiles.html) - but don't worry too much, nobody _really_ understands how make works and our Makefile is super simple | ||
- [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting | ||
- [`black`](https://github.com/psf/black) for code formatting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need black included in some kind of dev-requirements file or will pre-hooks handle that installation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! Normally pre-commit does it for you but since we're using the Fixed! |
||
- [`mypy`](https://mypy.readthedocs.io/en/stable/) for static type checking | ||
- [Github Actions](https://github.com/features/actions) | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8,27 +8,44 @@ endif | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: dev | ||||||||||||||||||||||||||||||
dev: ## Installs dbt-* packages in develop mode along with development dependencies. | ||||||||||||||||||||||||||||||
pip install -r dev-requirements.txt -r editable-requirements.txt | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
pip install -r dev-requirements.txt -r editable-requirements.txt && \ | ||||||||||||||||||||||||||||||
pre-commit install | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: mypy | ||||||||||||||||||||||||||||||
mypy: .env ## Runs mypy for static type checking. | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -e mypy | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run mypy | grep -v "[INFO]" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: flake8 | ||||||||||||||||||||||||||||||
flake8: .env ## Runs flake8 to enforce style guide. | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -e flake8 | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run flake8 | grep -v "[INFO]" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: black | ||||||||||||||||||||||||||||||
black: .env ## Runs black to enforce style guide. | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run black | grep -v "[INFO]" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: lint | ||||||||||||||||||||||||||||||
lint: .env ## Runs all code checks in parallel. | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this still run them all in parallel? that was a tox thing but I still want them to be run in parallel. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. I thought it was a makefile thing, but I may be mistaken. I'll research and get back to ya. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this ends up being a bit of a big question. Here's the TL;DR--
|
||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -p -e flake8,mypy | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run flake8 | grep -v "[INFO]"; \ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run mypy | grep -v "[INFO]"; \ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run black | grep -v "[INFO]" \ | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this mean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will only run on git staged files. Is that what is intended here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I def want it to run on everything. I never stage before running There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It sounds like we have some different use cases for how we use A: Yes black is now included in the linter step and it will make changes. I get how that's not ideal so I can change it to just output the errors/warnings without making changes. B: I had imagined using it just for changes.. but it that's not the way we want it to go I'm happy to change it to run on everything. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe keep There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH, I never use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a fair bit going on in terms of ways we use this so here's a matrix to describe the current state.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Finding a way to run this on unstaged changes without running it on everything in the entire repo is proving a bit challenging so I'm going to put that in as a tech debt ticket. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed black from |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: unit | ||||||||||||||||||||||||||||||
unit: .env ## Runs unit tests with py38. | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -e py38 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: test | ||||||||||||||||||||||||||||||
test: .env ## Runs unit tests with py38 and code checks in parallel. | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -p -e py38,flake8,mypy | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -p -e py38; \ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run flake8 | grep -v "[INFO]"; \ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run mypy | grep -v "[INFO]"; \ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) pre-commit run black | grep -v "[INFO]" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: integration | ||||||||||||||||||||||||||||||
integration: .env integration-postgres ## Alias for integration-postgres. | ||||||||||||||||||||||||||||||
|
@@ -38,15 +55,18 @@ integration-fail-fast: .env integration-postgres-fail-fast ## Alias for integrat | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: integration-postgres | ||||||||||||||||||||||||||||||
integration-postgres: .env ## Runs postgres integration tests with py38. | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -e py38-postgres -- -nauto | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: integration-postgres-fail-fast | ||||||||||||||||||||||||||||||
integration-postgres-fail-fast: .env ## Runs postgres integration tests with py38 in "fail fast" mode. | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
$(DOCKER_CMD) tox -e py38-postgres -- -x -nauto | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: setup-db | ||||||||||||||||||||||||||||||
setup-db: ## Setup Postgres database with docker-compose for system testing. | ||||||||||||||||||||||||||||||
docker-compose up -d database | ||||||||||||||||||||||||||||||
@\ | ||||||||||||||||||||||||||||||
docker-compose up -d database && \ | ||||||||||||||||||||||||||||||
PGHOST=localhost PGUSER=root PGPASSWORD=password PGDATABASE=postgres bash test/setup_db.sh | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
# This rule creates a file named .env that is used by docker-compose for passing | ||||||||||||||||||||||||||||||
|
@@ -62,27 +82,29 @@ endif | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: clean | ||||||||||||||||||||||||||||||
clean: ## Resets development environment. | ||||||||||||||||||||||||||||||
rm -f .coverage | ||||||||||||||||||||||||||||||
rm -rf .eggs/ | ||||||||||||||||||||||||||||||
rm -f .env | ||||||||||||||||||||||||||||||
rm -rf .tox/ | ||||||||||||||||||||||||||||||
rm -rf build/ | ||||||||||||||||||||||||||||||
rm -rf dbt.egg-info/ | ||||||||||||||||||||||||||||||
rm -f dbt_project.yml | ||||||||||||||||||||||||||||||
rm -rf dist/ | ||||||||||||||||||||||||||||||
rm -f htmlcov/*.{css,html,js,json,png} | ||||||||||||||||||||||||||||||
rm -rf logs/ | ||||||||||||||||||||||||||||||
rm -rf target/ | ||||||||||||||||||||||||||||||
find . -type f -name '*.pyc' -delete | ||||||||||||||||||||||||||||||
find . -type d -name '__pycache__' -depth -delete | ||||||||||||||||||||||||||||||
@echo 'cleaning repo...' | ||||||||||||||||||||||||||||||
@rm -f .coverage | ||||||||||||||||||||||||||||||
@rm -rf .eggs/ | ||||||||||||||||||||||||||||||
@rm -f .env | ||||||||||||||||||||||||||||||
@rm -rf .tox/ | ||||||||||||||||||||||||||||||
@rm -rf build/ | ||||||||||||||||||||||||||||||
@rm -rf dbt.egg-info/ | ||||||||||||||||||||||||||||||
@rm -f dbt_project.yml | ||||||||||||||||||||||||||||||
@rm -rf dist/ | ||||||||||||||||||||||||||||||
@rm -f htmlcov/*.{css,html,js,json,png} | ||||||||||||||||||||||||||||||
@rm -rf logs/ | ||||||||||||||||||||||||||||||
@rm -rf target/ | ||||||||||||||||||||||||||||||
@find . -type f -name '*.pyc' -delete | ||||||||||||||||||||||||||||||
@find . -type d -name '__pycache__' -depth -delete | ||||||||||||||||||||||||||||||
@echo 'done.' | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
.PHONY: help | ||||||||||||||||||||||||||||||
help: ## Show this help message. | ||||||||||||||||||||||||||||||
@echo 'usage: make [target] [USE_DOCKER=true]' | ||||||||||||||||||||||||||||||
@echo | ||||||||||||||||||||||||||||||
@echo 'targets:' | ||||||||||||||||||||||||||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||||||||||||||||||||||||||||||
@grep -E '^[8+a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is an odd change I don't understand There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh boy lololol |
||||||||||||||||||||||||||||||
@echo | ||||||||||||||||||||||||||||||
@echo 'options:' | ||||||||||||||||||||||||||||||
@echo 'use USE_DOCKER=true to run target in a docker container' | ||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ freezegun==0.3.12 | |
ipdb | ||
mypy==0.782 | ||
pip-tools | ||
pre-commit | ||
pytest | ||
pytest-dotenv | ||
pytest-logbook | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,25 +2,6 @@ | |||||
skipsdist = True | ||||||
envlist = py37,py38,py39,flake8,mypy | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! Updated! |
||||||
|
||||||
[testenv:flake8] | ||||||
description = flake8 code checks | ||||||
basepython = python3.8 | ||||||
skip_install = true | ||||||
commands = flake8 --select=E,W,F --ignore=W504,E741 --max-line-length 99 \ | ||||||
core/dbt \ | ||||||
plugins/postgres/dbt | ||||||
deps = | ||||||
-rdev-requirements.txt | ||||||
|
||||||
[testenv:mypy] | ||||||
description = mypy static type checking | ||||||
basepython = python3.8 | ||||||
skip_install = true | ||||||
commands = mypy --show-error-codes core/dbt | ||||||
deps = | ||||||
-rdev-requirements.txt | ||||||
-reditable-requirements.txt | ||||||
|
||||||
[testenv:{unit,py37,py38,py39,py}] | ||||||
description = unit testing | ||||||
skip_install = true | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
503 and 203 are new compared to our last config. What's the reason for adding new ignores?
I also wouldn't hate if these were commented since it looks like we have a convenient place to put comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
203 and 503 are due to incompatibilities between flake8 and black. I'll throw in a few comments (although I can't speak for the other ignores)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping the others for consistency in this PR is good for me.