[Travis] add linting via pyflakes

See #889, See #770
This commit is contained in:
MinchinWeb 2020-04-11 11:01:51 -06:00
parent 9215dc5692
commit 20f74e0851
5 changed files with 15 additions and 2 deletions

View file

@ -11,7 +11,12 @@
* *
### Checklist ### Checklist
- [ ] The code change is tested and works locally. - [ ] 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. - [ ] There is no commented out code in this PR.
- [ ] Have you followed the guidelines in our Contributing document? - [ ] 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? - [ ] Have you checked to ensure there aren't other open [Pull Requests](../pulls) for the same update/change?

1
.gitignore vendored
View file

@ -42,6 +42,7 @@ obj
# virtaulenv # virtaulenv
env/ env/
env*/ env*/
venv*/
# PyCharm Project files # PyCharm Project files
.idea/ .idea/

View file

@ -62,11 +62,17 @@ jobs:
- python: nightly - python: nightly
include: include:
# Linting
- name: Lint, via Black - name: Lint, via Black
python: 3.8 python: 3.8
script: script:
- black --version - black --version
- black --check . --verbose --diff - black --check . --verbose --diff
- name: Lint, via PyFlakes
python: 3.8
script:
- pyflakes --version
- pyflakes .
# Python 3.6 Tests # Python 3.6 Tests
- name: Python 3.6 on Linux - name: Python 3.6 on Linux

2
poetry.lock generated
View file

@ -522,7 +522,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
testing = ["jaraco.itertools", "func-timeout"] testing = ["jaraco.itertools", "func-timeout"]
[metadata] [metadata]
content-hash = "17cf8d4cf5a772217160daf312f590901dea4a3f5545d003035f3fb713a70f07" content-hash = "f49f70401f1b2e1d9cc5f7766a96288b260fddb37a21b4789feaac0d34838abf"
python-versions = ">=3.6.0, <3.9.0" python-versions = ">=3.6.0, <3.9.0"
[metadata.files] [metadata.files]

View file

@ -35,6 +35,7 @@ behave = "^1.2"
mkdocs = "^1.0" mkdocs = "^1.0"
flake8 = "^3.7" flake8 = "^3.7"
black = {version = "^19.10b0",allow-prereleases = true} black = {version = "^19.10b0",allow-prereleases = true}
pyflakes = "^2.1.0"
[tool.poetry.scripts] [tool.poetry.scripts]
jrnl = 'jrnl.cli:run' jrnl = 'jrnl.cli:run'