Skip to content

Commit

Permalink
chore: combine and sort imports (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaakola-aiven authored Jan 31, 2024
1 parent 2f9d9cc commit 1f6e3be
Show file tree
Hide file tree
Showing 665 changed files with 671 additions and 1 deletion.
1 change: 1 addition & 0 deletions codegen/case.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import builtins

from itertools import count
from typing import Final

Expand Down
2 changes: 2 additions & 0 deletions codegen/fetch_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import hashlib
import shutil
import sys

from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from typing import Final

import requests

from pydantic import BaseModel
from pydantic import HttpUrl

Expand Down
1 change: 1 addition & 0 deletions codegen/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pathlib
import shutil
import textwrap

from collections import defaultdict
from collections.abc import Iterable
from collections.abc import Iterator
Expand Down
2 changes: 2 additions & 0 deletions codegen/generate_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import shutil

from collections import defaultdict
from collections.abc import Iterator
from importlib import import_module
Expand All @@ -9,6 +10,7 @@
from types import ModuleType

import kio.schema

from kio.static.constants import EntityType
from kio.static.protocol import Entity

Expand Down
2 changes: 2 additions & 0 deletions codegen/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pathlib
import re
import textwrap

from collections.abc import Callable
from collections.abc import Iterator
from collections.abc import Mapping
Expand All @@ -19,6 +20,7 @@
from typing import assert_never

import pydantic

from pydantic import root_validator
from pydantic import validator

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ extend-ignore = [
]

[tool.ruff.isort]
lines-between-types = 1
force-single-line = true
known-first-party = ["kio", "tests", "codegen"]

Expand All @@ -144,7 +145,6 @@ max-complexity = 10
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "parents"


[tool.importlinter]
root_packages = ["kio", "codegen", "tests"]

Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/alter_partition/v2/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/alter_partition/v2/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/alter_partition/v3/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/alter_partition/v3/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/alter_partition_reassignments/v0/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/broker_registration/v0/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/broker_registration/v1/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/consumer_group_heartbeat/v0/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import datetime
import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/consumer_group_heartbeat/v0/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v0/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v1/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v2/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v3/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v4/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v5/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v6/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v7/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/create_topics/v7/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/delete_topics/v6/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/delete_topics/v6/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/elect_leaders/v0/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/elect_leaders/v1/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/elect_leaders/v2/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/fetch/v13/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/fetch/v13/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/fetch/v14/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/fetch/v14/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/fetch/v15/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/fetch/v15/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v1/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v2/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v3/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v4/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v5/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v6/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v7/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v8/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/join_group/v9/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import datetime

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/leader_and_isr/v5/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
1 change: 1 addition & 0 deletions src/kio/schema/leader_and_isr/v5/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import uuid

from dataclasses import dataclass
from dataclasses import field
from typing import ClassVar
Expand Down
Loading

0 comments on commit 1f6e3be

Please sign in to comment.