Skip to content

Commit

Permalink
use isort
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Aug 30, 2024
1 parent 8ec1d4f commit 5afa51c
Show file tree
Hide file tree
Showing 153 changed files with 13 additions and 151 deletions.
1 change: 0 additions & 1 deletion antarest/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/cache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/cache/business/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/configdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/filetransfer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/interfaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/maintenance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 1 addition & 0 deletions antarest/core/utils/fastapi_sqlalchemy/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
# This file is part of the Antares project.


class MissingSessionError(Exception):
"""Exception raised for when the user tries to access a database session before it is created."""

Expand Down
1 change: 1 addition & 0 deletions antarest/core/utils/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
# This file is part of the Antares project.


def to_pascal_case(value: str) -> str:
return "".join(word.capitalize() for word in value.split("_"))

Expand Down
1 change: 1 addition & 0 deletions antarest/core/utils/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
# This file is part of the Antares project.


class APITag:
users = "Users"
launcher = "Launch Studies"
Expand Down
1 change: 0 additions & 1 deletion antarest/eventbus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/eventbus/business/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

2 changes: 1 addition & 1 deletion antarest/eventbus/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from typing import List, Optional

from fastapi import Depends, FastAPI, HTTPException, Query
from fastapi_jwt_auth import AuthJWT # type: ignore
from pydantic import BaseModel
from starlette.websockets import WebSocket, WebSocketDisconnect

Expand All @@ -28,6 +27,7 @@
from antarest.core.model import PermissionInfo, StudyPermissionType
from antarest.core.permissions import check_permission
from antarest.login.auth import Auth
from fastapi_jwt_auth import AuthJWT # type: ignore

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion antarest/launcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/launcher/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/launcher/adapters/local_launcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/launcher/adapters/slurm_launcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/launcher/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/launcher/extensions/adequacy_patch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/login/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

2 changes: 1 addition & 1 deletion antarest/login/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
from typing import Any, Callable, Coroutine, Dict, Optional, Tuple, Union

from fastapi import Depends
from fastapi_jwt_auth import AuthJWT # type: ignore
from pydantic import BaseModel
from ratelimit.types import Scope # type: ignore
from starlette.requests import Request

from antarest.core.config import Config
from antarest.core.jwt import DEFAULT_ADMIN_USER, JWTUser
from fastapi_jwt_auth import AuthJWT # type: ignore

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion antarest/login/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from typing import Any, Optional

from fastapi import FastAPI
from fastapi_jwt_auth import AuthJWT # type: ignore
from fastapi_jwt_auth.exceptions import AuthJWTException # type: ignore
from starlette.requests import Request
from starlette.responses import JSONResponse
Expand All @@ -27,6 +26,7 @@
from antarest.login.repository import BotRepository, GroupRepository, RoleRepository, UserLdapRepository, UserRepository
from antarest.login.service import LoginService
from antarest.login.web import create_login_api
from fastapi_jwt_auth import AuthJWT # type: ignore


def build_login(
Expand Down
2 changes: 1 addition & 1 deletion antarest/login/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from typing import Any, List, Optional, Union

from fastapi import APIRouter, Depends, HTTPException
from fastapi_jwt_auth import AuthJWT # type: ignore
from markupsafe import escape
from pydantic import BaseModel

Expand All @@ -42,6 +41,7 @@
UserInfo,
)
from antarest.login.service import LoginService
from fastapi_jwt_auth import AuthJWT # type: ignore

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion antarest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from fastapi import FastAPI, HTTPException
from fastapi.encoders import jsonable_encoder
from fastapi.exceptions import RequestValidationError
from fastapi_jwt_auth import AuthJWT # type: ignore
from ratelimit import RateLimitMiddleware # type: ignore
from ratelimit.backends.redis import RedisBackend # type: ignore
from ratelimit.backends.simple import MemoryBackend # type: ignore
Expand Down Expand Up @@ -54,6 +53,7 @@
from antarest.study.storage.rawstudy.watcher import Watcher
from antarest.tools.admin_lib import clean_locks
from antarest.utils import SESSION_ARGS, Module, create_services, init_db_engine
from fastapi_jwt_auth import AuthJWT # type: ignore

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion antarest/matrixstore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

2 changes: 0 additions & 2 deletions antarest/study/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.


1 change: 0 additions & 1 deletion antarest/study/business/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/study/business/areas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/study/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/study/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/study/storage/rawstudy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

1 change: 0 additions & 1 deletion antarest/study/storage/rawstudy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
# This file is part of the Antares project.


class DenormalizationException(Exception):
def __init__(self, msg: str):
super(DenormalizationException, self).__init__(msg)
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

Loading

0 comments on commit 5afa51c

Please sign in to comment.