From 03a1bc1b146b3012ea976e0429773d79484d352a Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 21 May 2025 13:45:03 +0200 Subject: [PATCH] build(deps): Add isort as a developer dependency --- .pre-commit-config.yaml | 8 ++++++++ poetry.lock | 18 +++++++++++++++++- pyproject.toml | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ee5b0a..48877d4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,3 +29,11 @@ repos: args: ["--check", "--diff"] require_serial: true types_or: [python, pyi] + - id: isort + name: isort + stages: ["pre-commit"] + language: system + entry: poetry run isort + args: ["--check", "--diff"] + require_serial: true + types_or: [python, pyi] diff --git a/poetry.lock b/poetry.lock index 86298ed..f80ae9e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -281,6 +281,22 @@ files = [ [package.extras] license = ["ukkonen"] +[[package]] +name = "isort" +version = "6.0.1" +description = "A Python utility / library to sort Python imports." +optional = false +python-versions = ">=3.9.0" +groups = ["dev"] +files = [ + {file = "isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615"}, + {file = "isort-6.0.1.tar.gz", hash = "sha256:1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450"}, +] + +[package.extras] +colors = ["colorama"] +plugins = ["setuptools"] + [[package]] name = "jinja2" version = "3.1.6" @@ -610,4 +626,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "~3.13" -content-hash = "8e80071830f7c9c6b899fa792cd91f71b14920db72934aaf8b34ae9c38cc014a" +content-hash = "1a45cc19d20ff20330d212f2a097cb52689c8460a05f648c9cba9d81d9dd4a14" diff --git a/pyproject.toml b/pyproject.toml index 1147426..a59df54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ dependencies = [ [tool.poetry.group.dev.dependencies] black = "^25.1.0" commitizen = "^4.8.0" +isort = "^6.0.1" pre-commit = "^4.2.0" [tool.black] @@ -32,6 +33,11 @@ version_provider = "poetry" update_changelog_on_bump = true major_version_zero = true +[tool.isort] +force_sort_within_sections = true +line_length = 120 +profile = "black" + [build-system] requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api"