only "from"-imports

This commit is contained in:
Jörn-Michael Miehe 2022-09-07 00:29:32 +00:00
parent 47aee73574
commit 3170313734
4 changed files with 8 additions and 8 deletions

View file

@ -5,7 +5,7 @@ Package `ovdashboard_api`: Contains the API powering the
This file: Sets up logging. This file: Sets up logging.
""" """
import logging.config from logging.config import dictConfig
from pydantic import BaseModel from pydantic import BaseModel
@ -43,4 +43,4 @@ class LogConfig(BaseModel):
} }
logging.config.dictConfig(LogConfig().dict()) dictConfig(LogConfig().dict())

View file

@ -4,10 +4,10 @@ Definition of an asyncio compatible CalDAV calendar.
Caches events using `timed_alru_cache`. Caches events using `timed_alru_cache`.
""" """
import logging
from dataclasses import dataclass from dataclasses import dataclass
from datetime import datetime, timedelta from datetime import datetime, timedelta
from functools import total_ordering from functools import total_ordering
from logging import getLogger
from typing import Iterator from typing import Iterator
from caldav import Calendar from caldav import Calendar
@ -20,7 +20,7 @@ from .config import Config
from .dav_common import caldav_principal from .dav_common import caldav_principal
from .settings import SETTINGS from .settings import SETTINGS
_logger = logging.getLogger(__name__) _logger = getLogger(__name__)
def _string_strip(in_str: str) -> str: def _string_strip(in_str: str) -> str:

View file

@ -4,9 +4,9 @@ Definition of an asyncio compatible WebDAV file.
Caches files using `timed_alru_cache`. Caches files using `timed_alru_cache`.
""" """
import logging
from dataclasses import dataclass from dataclasses import dataclass
from io import BytesIO from io import BytesIO
from logging import getLogger
from typing import Any from typing import Any
from webdav3.client import Resource from webdav3.client import Resource
@ -15,7 +15,7 @@ from .async_helpers import get_ttl_hash, run_in_executor, timed_alru_cache
from .dav_common import webdav_resource from .dav_common import webdav_resource
from .settings import SETTINGS from .settings import SETTINGS
_logger = logging.getLogger(__name__) _logger = getLogger(__name__)
@timed_alru_cache(maxsize=SETTINGS.cache_size) @timed_alru_cache(maxsize=SETTINGS.cache_size)

View file

@ -6,8 +6,8 @@ Main script for `ovdashboard_api` module.
Creates the main `FastAPI` app. Creates the main `FastAPI` app.
""" """
import uvicorn
from fastapi import FastAPI from fastapi import FastAPI
from uvicorn import run as uvicorn_run
from .dav_common import webdav_check from .dav_common import webdav_check
from .routers import main_router from .routers import main_router
@ -38,7 +38,7 @@ def main() -> None:
""" """
if webdav_check(): if webdav_check():
uvicorn.run( uvicorn_run(
app="ovdashboard_api.main:app", app="ovdashboard_api.main:app",
host="0.0.0.0", host="0.0.0.0",
port=8000, port=8000,