# Coding style ## Python code All python code shall follow [PEP 8](https://peps.python.org/pep-0008/). Currently, not yet all python code follows this strictly but this is about to change. Further, [Ruff](https://docs.astral.sh/ruff/) with the default linting and formatting rules is used to do linting and to check formatting in the CI/CD pipelines. Thus, it is highly recommended to adhere to these rules for future code as this a requirement for the acceptance of a MR. ## Shell code All shell code is required to run with bash. Coding style shall adhere close to present code. ## Using Ruff with pre-commit This is a quick start guide to set up [Ruff](https://docs.astral.sh/ruff/) with [pre-commit](https://pre-commit.com/) to do automatic linting and formatting on each git commit. You should install Ruff and pre-commit. Then you need to install the pre-commit configuration of the auto-icon project in your local repository. In your repository, execute: ``` pip install ruff pre-commit pre-commit install ``` :::{tip} There is a [Ruff extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) for Visual Studio Code. ::: :::{seealso} Install [Ruff](https://docs.astral.sh/ruff/installation/) and [pre-commit](https://pre-commit.com/#install) :::