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:
parent
6754f04fcd
commit
bb6de05709
4 changed files with 240 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue