From 964397102f2ec11587998dfe49eb739b3cc38414 Mon Sep 17 00:00:00 2001 From: Alexey Snigir Date: Fri, 19 Sep 2025 15:50:32 +0200 Subject: [PATCH] add manual linting --- {{cookiecutter.project_shortname}}/README.md | 14 ++++++++++++++ {{cookiecutter.project_shortname}}/pyptoject.toml | 10 ++++++++++ .../requirements.txt | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 {{cookiecutter.project_shortname}}/pyptoject.toml diff --git a/{{cookiecutter.project_shortname}}/README.md b/{{cookiecutter.project_shortname}}/README.md index 588fc98..c120aa7 100644 --- a/{{cookiecutter.project_shortname}}/README.md +++ b/{{cookiecutter.project_shortname}}/README.md @@ -36,7 +36,21 @@ pip install {{cookiecutter.project_shortname}} ```shell npm run build ``` +5. Code Formatting (optional): + This project uses: + + - [Black](https://black.readthedocs.io/) for code formatting + - [isort](https://pycqa.github.io/isort/) for import sorting + - [Ruff](https://docs.astral.sh/ruff/) for linting + + Run: + + ```bash + black . + isort . + ruff check . --fix + ```` ### Create a production build and publish: diff --git a/{{cookiecutter.project_shortname}}/pyptoject.toml b/{{cookiecutter.project_shortname}}/pyptoject.toml new file mode 100644 index 0000000..f1a8ca9 --- /dev/null +++ b/{{cookiecutter.project_shortname}}/pyptoject.toml @@ -0,0 +1,10 @@ +[tool.black] +line-length = 88 +target-version = ['py311'] + +[tool.isort] +profile = "black" + +[tool.ruff] +line-length = 88 +select = ["E", "F", "W"] diff --git a/{{cookiecutter.project_shortname}}/requirements.txt b/{{cookiecutter.project_shortname}}/requirements.txt index 5c89633..94e5b22 100644 --- a/{{cookiecutter.project_shortname}}/requirements.txt +++ b/{{cookiecutter.project_shortname}}/requirements.txt @@ -1,3 +1,6 @@ dash[dev]>=3.0.0 wheel build +black +isort +ruff