[Travis] add isort formatter

see #770
This commit is contained in:
MinchinWeb 2020-04-11 12:20:56 -06:00
parent 65fe464c5d
commit ca86fe9bcb
4 changed files with 40 additions and 1 deletions

View file

@ -12,6 +12,8 @@
### Checklist
- [ ] The code change is tested and works locally.
- [ ] Tests pass. Your PR cannot be merged unless tests pass
- [ ] The code passes linting via
[isort](https://github.com/timothycrosley/isort) (import sorting) -- `isort`
- [ ] 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?

View file

@ -67,6 +67,11 @@ jobs:
script:
- black --version
- black --check . --verbose --diff
- name: Lint, via Isort
python: 3.8
script:
- isort --version
- isort --check-only --diff
# Python 3.6 Tests
- name: Python 3.6 on Linux

25
poetry.lock generated
View file

@ -168,6 +168,25 @@ zipp = ">=0.5"
docs = ["sphinx", "rst.linker"]
testing = ["packaging", "importlib-resources"]
[[package]]
category = "dev"
description = "A Python utility / library to sort Python imports."
name = "isort"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "4.3.21"
[package.dependencies]
[package.dependencies.toml]
optional = true
version = "*"
[package.extras]
pipfile = ["pipreqs", "requirementslib"]
pyproject = ["toml"]
requirements = ["pipreqs", "pip-api"]
xdg_home = ["appdirs (>=1.4.0)"]
[[package]]
category = "main"
description = "Low-level, pure Python DBus protocol wrapper."
@ -522,7 +541,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
testing = ["jaraco.itertools", "func-timeout"]
[metadata]
content-hash = "17cf8d4cf5a772217160daf312f590901dea4a3f5545d003035f3fb713a70f07"
content-hash = "02dfef7e538fa800bc9cc255eaa776ebe275afb0edb48b404458bf65b152a690"
python-versions = ">=3.6.0, <3.9.0"
[metadata.files]
@ -623,6 +642,10 @@ importlib-metadata = [
{file = "importlib_metadata-1.6.0-py2.py3-none-any.whl", hash = "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f"},
{file = "importlib_metadata-1.6.0.tar.gz", hash = "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e"},
]
isort = [
{file = "isort-4.3.21-py2.py3-none-any.whl", hash = "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"},
{file = "isort-4.3.21.tar.gz", hash = "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1"},
]
jeepney = [
{file = "jeepney-0.4.3-py3-none-any.whl", hash = "sha256:d6c6b49683446d2407d2fe3acb7a368a77ff063f9182fe427da15d622adc24cf"},
{file = "jeepney-0.4.3.tar.gz", hash = "sha256:3479b861cc2b6407de5188695fa1a8d57e5072d7059322469b62628869b8e36e"},

View file

@ -35,10 +35,19 @@ behave = "^1.2"
mkdocs = "^1.0"
flake8 = "^3.7"
black = {version = "^19.10b0",allow-prereleases = true}
isort = {version = "^4.3.21", extras = ["pyproject"]}
[tool.poetry.scripts]
jrnl = 'jrnl.cli:run'
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
known_first_party = "jrnl"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"