feat(dev): Install and configure isort

This commit is contained in:
2025-09-03 11:51:09 +02:00
parent 88d79fc209
commit a63c5cd3c9
3 changed files with 25 additions and 1 deletions

View File

@@ -29,7 +29,14 @@ repos:
name: black
description: "Black: The uncompromising Python code formatter"
entry: poetry run black
args: [--diff, --check]
args: [--check, --diff]
language: system
require_serial: true
types_or: [python, pyi]
- id: isort
name: isort
entry: uv run isort
args: [--check, --diff]
language: system
require_serial: true
types_or: [python, pyi]

View File

@@ -10,6 +10,7 @@ dependencies = []
dev = [
"black>=25.1.0",
"commitizen>=4.8.3",
"isort>=6.0.1",
"pre-commit>=4.3.0",
]
@@ -23,3 +24,8 @@ version_scheme = "pep440"
version_provider = "poetry"
update_changelog_on_bump = true
major_version_zero = true
[tool.isort]
force_sort_within_sections = true
line_length = 120
profile = "black"

11
uv.lock generated
View File

@@ -162,6 +162,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/20/b0/36bd937216ec521246249be3bf9855081de4c5e06a0c9b4219dbeda50373/importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd", size = 27656, upload-time = "2025-04-27T15:29:00.214Z" },
]
[[package]]
name = "isort"
version = "6.0.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/b8/21/1e2a441f74a653a144224d7d21afe8f4169e6c7c20bb13aec3a2dc3815e0/isort-6.0.1.tar.gz", hash = "sha256:1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450", size = 821955, upload-time = "2025-02-26T21:13:16.955Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c1/11/114d0a5f4dabbdcedc1125dee0888514c3c3b16d3e9facad87ed96fad97c/isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615", size = 94186, upload-time = "2025-02-26T21:13:14.911Z" },
]
[[package]]
name = "jinja2"
version = "3.1.6"
@@ -313,6 +322,7 @@ source = { virtual = "." }
dev = [
{ name = "black" },
{ name = "commitizen" },
{ name = "isort" },
{ name = "pre-commit" },
]
@@ -322,6 +332,7 @@ dev = [
dev = [
{ name = "black", specifier = ">=25.1.0" },
{ name = "commitizen", specifier = ">=4.8.3" },
{ name = "isort", specifier = ">=6.0.1" },
{ name = "pre-commit", specifier = ">=4.3.0" },
]