Set up code formatting tools
- 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
compliant with Google's Python style guide
- add nox session "format" to run these tools
This commit is contained in:
parent
ceabb00bab
commit
fb407631d9
5 changed files with 335 additions and 2 deletions
18
README.md
18
README.md
|
|
@ -8,6 +8,9 @@ The goal of the `lalib` project is to create
|
|||
by reading and writing code.
|
||||
|
||||
|
||||
[](https://github.com/psf/black)
|
||||
|
||||
|
||||
## Contributing & Development
|
||||
|
||||
This project is open for any kind of contribution,
|
||||
|
|
@ -65,6 +68,21 @@ To execute all default tasks, simply invoke:
|
|||
`nox`
|
||||
|
||||
|
||||
#### Code Formatting
|
||||
|
||||
We follow [Google's Python style guide](https://google.github.io/styleguide/pyguide.html).
|
||||
|
||||
During development,
|
||||
`nox -s format` may be helpful.
|
||||
It can be speed up by re-using a previously created environment
|
||||
with the `-R` flag.
|
||||
|
||||
This task formats all source code files with
|
||||
[autoflake](https://pypi.org/project/autoflake/),
|
||||
[black](https://pypi.org/project/black/), and
|
||||
[isort](https://pypi.org/project/isort/).
|
||||
|
||||
|
||||
### Branching Strategy
|
||||
|
||||
The branches in this repository follow the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue