agri-gaia/seerep

Improve readability of Python code by following PEP 8

Closed this issue · 2 comments

We should improve the readability (and consistency) of your Python code by following PEP 8 and integrating it into the existing pre-commit checks. This mainly includes the examples in examples/python/....

We already use the PEP 8 compliant opinionated formatter Black:

- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black

We can adjust its behaviour here:

seerep/pyproject.toml

Lines 30 to 33 in aba5147

[tool.black]
line-length = 120
target-version = ['py38']
skip-string-normalization = true

I think I will update to https://github.com/astral-sh/ruff. It provides a linter, formatter and isort capabilities in one package. Additionally, it looks like the default choice for current projects.