mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-01-03 22:44:25 +01:00
Adds flake8 and fixes style issues
This commit is contained in:
@@ -8,6 +8,15 @@ We use [black](https://github.com/psf/black) as our base code formatter with a l
|
||||
```bash
|
||||
black --line-length=120 {source_file_or_directory}
|
||||
```
|
||||
|
||||
In additon, we use [flake8](https://flake8.pycqa.org/en/latest/) to detect style issues with the code:
|
||||
|
||||
```bash
|
||||
flake8 --max-line-length=120 {source_file_or_directory}
|
||||
```
|
||||
|
||||
Not all outputs from flake8 are mandatory. For instance, splitting **bullet points in docstrings (E501)** will cause issues when generating the docuementation, so we will leave that longer than the line lenght limit . Another example are **whitespaces before colons in inline fors (E203)**. `black` places them in that way, so we'll leave them like that.
|
||||
|
||||
On top of that, there are a few rules to also have in mind.
|
||||
|
||||
### Code Spacing
|
||||
|
||||
Reference in New Issue
Block a user