Skip to content

Commit

Permalink
Use ruff instead of black, flake8, isort
Browse files Browse the repository at this point in the history
Also, reorder sections in pyproject.toml.

Signed-off-by: Nils Philippsen <[email protected]>
  • Loading branch information
nphilipp committed Nov 15, 2024
1 parent 883ed32 commit 26bcdf7
Show file tree
Hide file tree
Showing 18 changed files with 95 additions and 232 deletions.
10 changes: 5 additions & 5 deletions duffy/api_models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
from .common import APIResult, APIResultAction # noqa: F401
from .node import NodeCreateModel, NodeModel, NodeResult, NodeResultCollection # noqa: F401
from .pool import ( # noqa: F401
from .common import APIResult, APIResultAction
from .node import NodeCreateModel, NodeModel, NodeResult, NodeResultCollection
from .pool import (
PoolConciseModel,
PoolLevelsModel,
PoolModel,
PoolResult,
PoolResultCollection,
PoolVerboseModel,
)
from .session import ( # noqa: F401
from .session import (
SessionCreateModel,
SessionModel,
SessionNodeModel,
SessionResult,
SessionResultCollection,
SessionUpdateModel,
)
from .tenant import ( # noqa: F401
from .tenant import (
TenantCreateModel,
TenantCreateResult,
TenantCreateResultModel,
Expand Down
1 change: 1 addition & 0 deletions duffy/app/controllers/session.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This is the session controller."""

import datetime as dt
import logging
from typing import Optional
Expand Down
4 changes: 2 additions & 2 deletions duffy/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .formatter import DuffyFormatter # noqa: F401
from .main import DuffyClient # noqa: F401
from .formatter import DuffyFormatter
from .main import DuffyClient
2 changes: 1 addition & 1 deletion duffy/configuration/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .main import config, config_get, read_configuration # noqa: F401
from .main import config, config_get, read_configuration
6 changes: 3 additions & 3 deletions duffy/configuration/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ class RetriesModel(ConfigBaseModel):
delay_backoff_factor: Optional[
Union[Annotated[int, Field(ge=1)], Annotated[float, Field(ge=1)]]
] = Field(alias="delay-backoff-factor", default=None)
delay_add_fuzz: Optional[
Union[Annotated[int, Field(ge=0)], Annotated[float, Field(ge=0)]]
] = Field(alias="delay-add-fuzz", default=None)
delay_add_fuzz: Optional[Union[Annotated[int, Field(ge=0)], Annotated[float, Field(ge=0)]]] = (
Field(alias="delay-add-fuzz", default=None)
)


class DefaultsModel(ConfigBaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Revises: ce2e575cb800
Create Date: 2023-07-27 11:29:37.405520
"""

import sqlalchemy as sa
from alembic import op

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Revises: 36cf064c0481
Create Date: 2023-09-06 21:42:56.647045
"""

from alembic import op

# revision identifiers, used by Alembic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Revises:
Create Date: 2022-05-09 16:40:06.491392
"""

import sqlalchemy as sa
from alembic import op

Expand Down
6 changes: 3 additions & 3 deletions duffy/database/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .node import Node, SessionNode # noqa: F401
from .session import Session # noqa: F401
from .tenant import Tenant # noqa: F401
from .node import Node, SessionNode
from .session import Session
from .tenant import Tenant
4 changes: 2 additions & 2 deletions duffy/nodes/mechanisms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from . import ansible, main # noqa: F401
from .main import Mechanism, MechanismFailure # noqa: F401
from . import ansible, main
from .main import Mechanism, MechanismFailure
10 changes: 5 additions & 5 deletions duffy/tasks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .base import celery, init_tasks # noqa: F401
from .deprovision import deprovision_nodes, deprovision_pool_nodes # noqa: F401
from .expire import expire_sessions # noqa: F401
from .main import start_worker # noqa: F401
from .provision import fill_pools, fill_single_pool # noqa: F401
from .base import celery, init_tasks
from .deprovision import deprovision_nodes, deprovision_pool_nodes
from .expire import expire_sessions
from .main import start_worker
from .provision import fill_pools, fill_single_pool
189 changes: 29 additions & 160 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 26bcdf7

Please sign in to comment.