Skip to content

Commit 294e953

Browse files
committed
Added isort to the code generation
1 parent 3337dab commit 294e953

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ openapi-schema-pydantic = "^1.2.3"
2525
Jinja2 = "^3.1.2"
2626
click = "^8.1.3"
2727
black = ">=21.10b0"
28+
isort = ">=5.10.1"
2829

2930
[tool.poetry.dev-dependencies]
3031
Pygments = ">=2.10.0"
@@ -36,7 +37,6 @@ flake8-bugbear = ">=21.9.2"
3637
flake8-docstrings = ">=1.6.0"
3738
flake8-rst-docstrings = ">=0.2.5"
3839
furo = ">=2021.11.12"
39-
isort = ">=5.10.1"
4040
mypy = ">=0.930"
4141
pep8-naming = ">=0.10.1"
4242
pre-commit = ">=2.16.0"

src/openapi_python_generator/generate_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import black
66
import click
77
import httpx
8+
import isort
89
import orjson
910
from httpx import ConnectError
1011
from httpx import ConnectTimeout
@@ -30,6 +31,7 @@ def write_code(path: Path, content) -> None:
3031
formatted_contend = black.format_file_contents(
3132
content, fast=False, mode=black.FileMode(line_length=120)
3233
)
34+
formatted_contend = isort.code(formatted_contend, line_length=120)
3335
f.write(formatted_contend)
3436

3537

0 commit comments

Comments
 (0)