Skip to content

Commit

Permalink
docs(dev): python code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sujuka99 committed Oct 25, 2023
1 parent b9076e4 commit 5974578
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
12 changes: 0 additions & 12 deletions docs/docs/developer/formatting.md

This file was deleted.

27 changes: 27 additions & 0 deletions docs/docs/developer/style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Style

## Python

To ensure a consistent Python code style, we use [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting.

### Configuration

Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top-level `pyproject.toml`.

### Editor integration

Below are listed existing Ruff plugins/extensions for some of the most popular python IDEs. If you cannot find your Editor of choices or you want something more custom, [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) enables Ruff to be used in any editor that supports the LSP

- [VSCode](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
- [PyCharm](https://plugins.jetbrains.com/plugin/20574-ruff)

## Markdown

To ensure a consistent markdown style, we use [dprint](https://dprint.dev) to check and reformat.

```shell
dprint fmt
```

Use the [official documentation](https://dprint.dev/setup/) to set up dprint.
The configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json).

0 comments on commit 5974578

Please sign in to comment.