Skip to content

Commit

Permalink
fix: isort added as dependency (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosschroh authored Sep 3, 2020
1 parent 24fa2fd commit e56d234
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ mypy

# Testing
# ------------------------------------------------------------------------------
pytest==5.4.2
pytest
pytest_cases
pytest-cookies
10 changes: 10 additions & 0 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
[tool.black]
line-length = 120
target_version = ['py37']

[tool.isort]
combine_as_imports = true
from_first = false
include_trailing_comma = true
length_sort = false
multi_line_output = 3
order_by_type = true
line_length = 120
force_grid_wrap = 0
5 changes: 3 additions & 2 deletions {{cookiecutter.project_slug}}/requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
# ------------------------------------------------------------------------------
black
flake8
isort

# Testing
# ------------------------------------------------------------------------------
mypy
pytest==5.4.2
pytest
pytest_cases
pytest-cookies
pytest-asyncio==0.11.0
pytest-asyncio
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ if [ -d 'venv' ] ; then
export PREFIX="venv/bin/"
fi

${PREFIX}isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 120 --recursive --apply {{cookiecutter.project_slug}} tests
${PREFIX}isort {{cookiecutter.project_slug}} tests
${PREFIX}black {{cookiecutter.project_slug}} tests
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export PYTHONPATH={{cookiecutter.project_slug}}
export SIMPLE_SETTINGS=settings

${PREFIX}pytest ${1-"./tests"} ${2}
${PREFIX}black {{cookiecutter.project_slug}} tests/ --check
${PREFIX}black {{cookiecutter.project_slug}} tests/ --check --diff
${PREFIX}flake8 {{cookiecutter.project_slug}} tests/
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
"version": 1,
"disable_existing_loggers": False,
"formatters": {"default": {"format": "%(asctime)s %(levelname)s %(name)s %(message)s"}},
"handlers": {"console": {"level": "{{cookiecutter.log_level}}", "class": "logging.StreamHandler", "formatter": "default",}},
"handlers": {
"console": {
"level": "{{cookiecutter.log_level}}",
"class": "logging.StreamHandler",
"formatter": "default",
}
},
"loggers": {"page_views": {"handlers": ["console"], "level": "{{cookiecutter.log_level}}"}},
}
)
Expand Down

0 comments on commit e56d234

Please sign in to comment.