From 20f74e0851272f2d1c4bdcb062512293144b0d71 Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Sat, 11 Apr 2020 11:01:51 -0600 Subject: [PATCH] [Travis] add linting via pyflakes See #889, See #770 --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++++++- .gitignore | 1 + .travis.yml | 6 ++++++ poetry.lock | 2 +- pyproject.toml | 1 + 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 986f10ee..d9f2ec5b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,7 +11,12 @@ * ### Checklist - [ ] The code change is tested and works locally. -- [ ] Tests pass. Your PR cannot be merged unless tests pass +- [ ] Tests pass. Your PR cannot be merged unless tests pass. +- [ ] The code passes linting via + [black](https://black.readthedocs.io/en/stable/) (consistent code styling) -- + `black --check . --verbose --diff` +- [ ] The code passes linting via [pyflakes](https://launchpad.net/pyflakes) + (logically errors and unused imports) -- `pyflakes .` - [ ] There is no commented out code in this PR. - [ ] Have you followed the guidelines in our Contributing document? - [ ] Have you checked to ensure there aren't other open [Pull Requests](../pulls) for the same update/change? diff --git a/.gitignore b/.gitignore index 2382cabe..e63c6076 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ obj # virtaulenv env/ env*/ +venv*/ # PyCharm Project files .idea/ diff --git a/.travis.yml b/.travis.yml index 8c4ff73d..7d5f851b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,11 +62,17 @@ jobs: - python: nightly include: + # Linting - name: Lint, via Black python: 3.8 script: - black --version - black --check . --verbose --diff + - name: Lint, via PyFlakes + python: 3.8 + script: + - pyflakes --version + - pyflakes . # Python 3.6 Tests - name: Python 3.6 on Linux diff --git a/poetry.lock b/poetry.lock index 65356424..fa79f185 100644 --- a/poetry.lock +++ b/poetry.lock @@ -522,7 +522,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "17cf8d4cf5a772217160daf312f590901dea4a3f5545d003035f3fb713a70f07" +content-hash = "f49f70401f1b2e1d9cc5f7766a96288b260fddb37a21b4789feaac0d34838abf" python-versions = ">=3.6.0, <3.9.0" [metadata.files] diff --git a/pyproject.toml b/pyproject.toml index 20f2c306..f06757a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,7 @@ behave = "^1.2" mkdocs = "^1.0" flake8 = "^3.7" black = {version = "^19.10b0",allow-prereleases = true} +pyflakes = "^2.1.0" [tool.poetry.scripts] jrnl = 'jrnl.cli:run'