Add a code formatting tool chain

- (auto-)format code with:
  + autoflake => * remove unused imports and variables
                 * remove duplicate dict keys
                 * expand star imports
  + black => enforce an uncompromising code style
  + isort => enforce a consistent import style
             (complying with Google's Python Style Guide)
- implement the nox session "format" that runs all these tools
- add the following file:
  + setup.cfg => holds configurations for the develop tools
This commit is contained in:
Alexander Hess 2020-08-03 21:39:49 +02:00
commit bb6de05709
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
4 changed files with 240 additions and 2 deletions

View file

@ -2,6 +2,11 @@
build-backend = "poetry.masonry.api"
requires = ["poetry>=0.12"]
[tool.black]
line-length = 88
skip-string-normalization = true
target-version = ["py38"]
[tool.poetry]
name = "urban-meal-delivery"
version = "0.1.0.dev0"
@ -25,3 +30,8 @@ python = "^3.8"
[tool.poetry.dev-dependencies]
# Task Runners
nox = "^2020.5.24"
# Code Formatters
autoflake = "^1.3.1"
black = "^19.10b0"
isort = "^5.2.2"