summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorWolfgang Müller2024-11-14 15:47:52 +0100
committerWolfgang Müller2024-11-14 16:28:09 +0100
commit2eff6f0bd75c9959b7b899d169164343cd0377c9 (patch)
tree51bb0e3148e39cde126b088cd646d2212aa3f320 /tests
parent11d1509456c81bd0128afb0c4eedbb26bd8751c4 (diff)
downloadhircine-2eff6f0bd75c9959b7b899d169164343cd0377c9.tar.gz
backend/lint: Fix import formatting
Diffstat (limited to 'tests')
-rw-r--r--tests/api/test_archive.py7
-rw-r--r--tests/api/test_artist.py1
-rw-r--r--tests/api/test_character.py1
-rw-r--r--tests/api/test_circle.py1
-rw-r--r--tests/api/test_comic.py1
-rw-r--r--tests/api/test_comic_tag.py1
-rw-r--r--tests/api/test_db.py15
-rw-r--r--tests/api/test_filter.py1
-rw-r--r--tests/api/test_image.py1
-rw-r--r--tests/api/test_namespace.py1
-rw-r--r--tests/api/test_page.py1
-rw-r--r--tests/api/test_scraper_api.py5
-rw-r--r--tests/api/test_sort.py1
-rw-r--r--tests/api/test_tag.py1
-rw-r--r--tests/api/test_world.py1
-rw-r--r--tests/conftest.py5
-rw-r--r--tests/scanner/test_scanner.py3
-rw-r--r--tests/scrapers/test_types.py1
-rw-r--r--tests/thumbnailer/test_thumbnailer.py3
19 files changed, 35 insertions, 16 deletions
diff --git a/tests/api/test_archive.py b/tests/api/test_archive.py
index 0ef3425..6e6d0b7 100644
--- a/tests/api/test_archive.py
+++ b/tests/api/test_archive.py
@@ -2,13 +2,14 @@ import os
from datetime import datetime as dt
from pathlib import Path
+import pytest
+from conftest import DB, Response
+from sqlalchemy import select
+
import hircine.config
import hircine.db as database
import hircine.thumbnailer as thumb
-import pytest
-from conftest import DB, Response
from hircine.db.models import Archive, Comic, Image, Page
-from sqlalchemy import select
@pytest.fixture
diff --git a/tests/api/test_artist.py b/tests/api/test_artist.py
index 8cb2f1a..fa58012 100644
--- a/tests/api/test_artist.py
+++ b/tests/api/test_artist.py
@@ -3,6 +3,7 @@ from datetime import timezone
import pytest
from conftest import DB, Response
+
from hircine.db.models import Artist
diff --git a/tests/api/test_character.py b/tests/api/test_character.py
index 567d2a4..3737d49 100644
--- a/tests/api/test_character.py
+++ b/tests/api/test_character.py
@@ -3,6 +3,7 @@ from datetime import timezone
import pytest
from conftest import DB, Response
+
from hircine.db.models import Character
diff --git a/tests/api/test_circle.py b/tests/api/test_circle.py
index a03ba89..bea46d7 100644
--- a/tests/api/test_circle.py
+++ b/tests/api/test_circle.py
@@ -3,6 +3,7 @@ from datetime import timezone
import pytest
from conftest import DB, Response
+
from hircine.db.models import Circle
diff --git a/tests/api/test_comic.py b/tests/api/test_comic.py
index d3fa51e..a6c4c30 100644
--- a/tests/api/test_comic.py
+++ b/tests/api/test_comic.py
@@ -3,6 +3,7 @@ from datetime import datetime as dt
import pytest
from conftest import DB, Response
+
from hircine.db.models import (
Artist,
Circle,
diff --git a/tests/api/test_comic_tag.py b/tests/api/test_comic_tag.py
index f536b79..d0878e2 100644
--- a/tests/api/test_comic_tag.py
+++ b/tests/api/test_comic_tag.py
@@ -2,6 +2,7 @@ from functools import partial
import pytest
from conftest import DB, Response
+
from hircine.db.models import Namespace, Tag
diff --git a/tests/api/test_db.py b/tests/api/test_db.py
index f53b90f..1405c23 100644
--- a/tests/api/test_db.py
+++ b/tests/api/test_db.py
@@ -1,10 +1,16 @@
from datetime import datetime, timedelta, timezone
+import pytest
+from conftest import DB
+from sqlalchemy.exc import StatementError
+from sqlalchemy.orm import (
+ Mapped,
+ mapped_column,
+)
+
import hircine.db as database
import hircine.db.models as models
import hircine.db.ops as ops
-import pytest
-from conftest import DB
from hircine.db.models import (
Artist,
Base,
@@ -16,11 +22,6 @@ from hircine.db.models import (
Tag,
TagNamespaces,
)
-from sqlalchemy.exc import StatementError
-from sqlalchemy.orm import (
- Mapped,
- mapped_column,
-)
class Date(MixinID, Base):
diff --git a/tests/api/test_filter.py b/tests/api/test_filter.py
index 67a953f..1438785 100644
--- a/tests/api/test_filter.py
+++ b/tests/api/test_filter.py
@@ -1,5 +1,6 @@
import pytest
from conftest import DB, Response
+
from hircine.db.models import Namespace, Tag
diff --git a/tests/api/test_image.py b/tests/api/test_image.py
index c8c26b3..e0e9251 100644
--- a/tests/api/test_image.py
+++ b/tests/api/test_image.py
@@ -1,5 +1,6 @@
import pytest
from conftest import DB
+
from hircine.api.types import Image
diff --git a/tests/api/test_namespace.py b/tests/api/test_namespace.py
index 450075b..2ffc118 100644
--- a/tests/api/test_namespace.py
+++ b/tests/api/test_namespace.py
@@ -3,6 +3,7 @@ from datetime import timezone
import pytest
from conftest import DB, Response
+
from hircine.db.models import Namespace
diff --git a/tests/api/test_page.py b/tests/api/test_page.py
index debd69a..cb06e3e 100644
--- a/tests/api/test_page.py
+++ b/tests/api/test_page.py
@@ -2,6 +2,7 @@ from datetime import datetime, timezone
import pytest
from conftest import DB
+
from hircine.api.types import Page
from hircine.db.models import Archive
diff --git a/tests/api/test_scraper_api.py b/tests/api/test_scraper_api.py
index 1edd74f..b917e39 100644
--- a/tests/api/test_scraper_api.py
+++ b/tests/api/test_scraper_api.py
@@ -1,8 +1,9 @@
+import pytest
+from conftest import DB, Response
+
import hircine.enums as enums
import hircine.plugins
import hircine.scraper.types as scraped
-import pytest
-from conftest import DB, Response
from hircine.scraper import ScrapeError, Scraper, ScrapeWarning
diff --git a/tests/api/test_sort.py b/tests/api/test_sort.py
index b3c8562..9cafe82 100644
--- a/tests/api/test_sort.py
+++ b/tests/api/test_sort.py
@@ -1,5 +1,6 @@
import pytest
from conftest import DB, Response
+
from hircine.db.models import Namespace
diff --git a/tests/api/test_tag.py b/tests/api/test_tag.py
index c863a00..7970f3d 100644
--- a/tests/api/test_tag.py
+++ b/tests/api/test_tag.py
@@ -3,6 +3,7 @@ from datetime import timezone
import pytest
from conftest import DB, Response
+
from hircine.db.models import Namespace, Tag
diff --git a/tests/api/test_world.py b/tests/api/test_world.py
index a3926d1..3546c2c 100644
--- a/tests/api/test_world.py
+++ b/tests/api/test_world.py
@@ -3,6 +3,7 @@ from datetime import timezone
import pytest
from conftest import DB, Response
+
from hircine.db.models import World
diff --git a/tests/conftest.py b/tests/conftest.py
index a36be2d..d831827 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -4,14 +4,15 @@ from datetime import date, timedelta
from datetime import datetime as dt
from datetime import timezone as tz
+import pytest
+from sqlalchemy.ext.asyncio import AsyncSession
+
import hircine
import hircine.db as database
import hircine.db.models as models
import hircine.plugins
-import pytest
from hircine.app import schema
from hircine.enums import Category, Censorship, Direction, Language, Layout, Rating
-from sqlalchemy.ext.asyncio import AsyncSession
@pytest.fixture(scope="session")
diff --git a/tests/scanner/test_scanner.py b/tests/scanner/test_scanner.py
index 45a966f..a70c4d8 100644
--- a/tests/scanner/test_scanner.py
+++ b/tests/scanner/test_scanner.py
@@ -5,9 +5,10 @@ from datetime import datetime, timezone
from pathlib import Path
from zipfile import ZipFile
-import hircine.thumbnailer
import pytest
from conftest import DB
+
+import hircine.thumbnailer
from hircine.config import DirectoryStructure
from hircine.db.models import Archive, Image, Page
from hircine.scanner import Scanner, Status
diff --git a/tests/scrapers/test_types.py b/tests/scrapers/test_types.py
index ed937e7..ee6b802 100644
--- a/tests/scrapers/test_types.py
+++ b/tests/scrapers/test_types.py
@@ -1,6 +1,7 @@
from datetime import date
import pytest
+
from hircine.api.types import ScrapedComic
from hircine.scraper import ScrapeWarning
from hircine.scraper.types import (
diff --git a/tests/thumbnailer/test_thumbnailer.py b/tests/thumbnailer/test_thumbnailer.py
index 62bf127..3a3405a 100644
--- a/tests/thumbnailer/test_thumbnailer.py
+++ b/tests/thumbnailer/test_thumbnailer.py
@@ -2,9 +2,10 @@ import os
from pathlib import Path
import pytest
-from hircine.thumbnailer import Thumbnailer, ThumbnailParameters
from PIL import Image
+from hircine.thumbnailer import Thumbnailer, ThumbnailParameters
+
mock_params = ThumbnailParameters(bounds=(1440, 2880), options={})