From 1a2d598725380af6bcbef680dcf0dc002cda3e4b Mon Sep 17 00:00:00 2001 From: Harald Wartig Date: Sat, 6 Aug 2016 11:07:13 +0200 Subject: [PATCH 1/2] Exclude docs/conf.py from linting. Running `make lint` after initializing a fresh project complains about errors in `docs/conf.py`. Which is kinda awkward for the user as he didn't write any code yet and already has errors. As this file is autogenerated I think it is best to exclude it from linting rather than fixing the errors. --- {{ cookiecutter.repo_name }}/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/Makefile b/{{ cookiecutter.repo_name }}/Makefile index a5b769d..df94b11 100644 --- a/{{ cookiecutter.repo_name }}/Makefile +++ b/{{ cookiecutter.repo_name }}/Makefile @@ -20,7 +20,7 @@ clean: find . -name "*.pyc" -exec rm {} \; lint: - flake8 --exclude=lib/,bin/ . + flake8 --exclude=lib/,bin/,docs/conf.py . sync_data_to_s3: aws s3 sync data/ s3://$(BUCKET)/data/ From 91b9e1f3d0e32f2f1517c798572667e8f892f4ef Mon Sep 17 00:00:00 2001 From: Harald Wartig Date: Sat, 6 Aug 2016 11:09:57 +0200 Subject: [PATCH 2/2] Remove dead whitespace. For newly created projects `make lint` would otherwise complain about the dead whitespace in `src/data/make_dataset.py`. --- {{ cookiecutter.repo_name }}/src/data/make_dataset.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/{{ cookiecutter.repo_name }}/src/data/make_dataset.py b/{{ cookiecutter.repo_name }}/src/data/make_dataset.py index bc50a72..a17dc83 100644 --- a/{{ cookiecutter.repo_name }}/src/data/make_dataset.py +++ b/{{ cookiecutter.repo_name }}/src/data/make_dataset.py @@ -19,10 +19,9 @@ if __name__ == '__main__': # not used in this stub but often useful for finding various files project_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir) - + # find .env automagically by walking up directories until it's found, then # load up the .env entries as environment variables load_dotenv(find_dotenv()) main() -