From 3b038f2b391cecd55e38c22fe07c5cd67bd6eae4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:43:46 +0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#97) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black-pre-commit-mirror: 23.12.1 → 24.3.0](https://github.com/psf/black-pre-commit-mirror/compare/23.12.1...24.3.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- nazurin/database/__init__.py | 1 + nazurin/models/__init__.py | 1 + nazurin/sites/__init__.py | 1 + nazurin/sites/artstation/__init__.py | 1 + nazurin/sites/bilibili/__init__.py | 1 + nazurin/sites/bluesky/__init__.py | 1 + nazurin/sites/danbooru/__init__.py | 1 + nazurin/sites/deviant_art/__init__.py | 1 + nazurin/sites/gelbooru/__init__.py | 1 + nazurin/sites/kemono/__init__.py | 1 + nazurin/sites/lofter/__init__.py | 1 + nazurin/sites/moebooru/__init__.py | 1 + nazurin/sites/pixiv/__init__.py | 1 + nazurin/sites/twitter/__init__.py | 1 + nazurin/sites/twitter/api/web.py | 8 +++++--- nazurin/sites/wallhaven/__init__.py | 1 + nazurin/sites/weibo/__init__.py | 1 + nazurin/sites/zerochan/__init__.py | 1 + nazurin/storage/__init__.py | 1 + 20 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31a2bf14..c021459e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.3.0 hooks: - id: black ci: diff --git a/nazurin/database/__init__.py b/nazurin/database/__init__.py index 725026e2..822ddc07 100644 --- a/nazurin/database/__init__.py +++ b/nazurin/database/__init__.py @@ -1,4 +1,5 @@ """Nazurin database drivers and database manager.""" + from __future__ import annotations import importlib diff --git a/nazurin/models/__init__.py b/nazurin/models/__init__.py index f5948586..df052685 100644 --- a/nazurin/models/__init__.py +++ b/nazurin/models/__init__.py @@ -1,4 +1,5 @@ """Nazurin models.""" + from .caption import Caption from .file import File from .illust import Illust diff --git a/nazurin/sites/__init__.py b/nazurin/sites/__init__.py index f7c35ed0..f56f21b3 100644 --- a/nazurin/sites/__init__.py +++ b/nazurin/sites/__init__.py @@ -1,4 +1,5 @@ """Nazurin site plugins & plugin manager.""" + from glob import glob from importlib import import_module from os import path diff --git a/nazurin/sites/artstation/__init__.py b/nazurin/sites/artstation/__init__.py index bcbd331d..16714fe0 100644 --- a/nazurin/sites/artstation/__init__.py +++ b/nazurin/sites/artstation/__init__.py @@ -1,4 +1,5 @@ """Artstation site plugin.""" + from .api import Artstation from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/bilibili/__init__.py b/nazurin/sites/bilibili/__init__.py index 2e9f1f5f..109cca91 100644 --- a/nazurin/sites/bilibili/__init__.py +++ b/nazurin/sites/bilibili/__init__.py @@ -1,4 +1,5 @@ """Bilibili dynamic site plugin.""" + from .api import Bilibili from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/bluesky/__init__.py b/nazurin/sites/bluesky/__init__.py index 6cf0b3c7..11648010 100644 --- a/nazurin/sites/bluesky/__init__.py +++ b/nazurin/sites/bluesky/__init__.py @@ -1,4 +1,5 @@ """Bluesky site plugin.""" + from .api import Bluesky from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/danbooru/__init__.py b/nazurin/sites/danbooru/__init__.py index 176442ee..c553e506 100644 --- a/nazurin/sites/danbooru/__init__.py +++ b/nazurin/sites/danbooru/__init__.py @@ -1,4 +1,5 @@ """Danbooru site plugin.""" + from .api import Danbooru from .commands import * from .config import PRIORITY diff --git a/nazurin/sites/deviant_art/__init__.py b/nazurin/sites/deviant_art/__init__.py index 2a3ac4f4..9a7e297e 100644 --- a/nazurin/sites/deviant_art/__init__.py +++ b/nazurin/sites/deviant_art/__init__.py @@ -1,4 +1,5 @@ """DeviantArt site plugin.""" + from .api import DeviantArt from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/gelbooru/__init__.py b/nazurin/sites/gelbooru/__init__.py index b6b4fcd1..706c533f 100644 --- a/nazurin/sites/gelbooru/__init__.py +++ b/nazurin/sites/gelbooru/__init__.py @@ -1,4 +1,5 @@ """Gelbooru site plugin.""" + from .api import Gelbooru from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/kemono/__init__.py b/nazurin/sites/kemono/__init__.py index fad2ba19..7c6fb30d 100644 --- a/nazurin/sites/kemono/__init__.py +++ b/nazurin/sites/kemono/__init__.py @@ -1,4 +1,5 @@ """Kemono.party site plugin.""" + from .api import Kemono from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/lofter/__init__.py b/nazurin/sites/lofter/__init__.py index 12f495c9..0757e898 100644 --- a/nazurin/sites/lofter/__init__.py +++ b/nazurin/sites/lofter/__init__.py @@ -1,4 +1,5 @@ """Lofter site plugin.""" + from .api import Lofter from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/moebooru/__init__.py b/nazurin/sites/moebooru/__init__.py index 5d3bcf91..98d0cd41 100644 --- a/nazurin/sites/moebooru/__init__.py +++ b/nazurin/sites/moebooru/__init__.py @@ -1,4 +1,5 @@ """Moebooru site plugin.""" + from .api import Moebooru from .commands import * from .config import PRIORITY diff --git a/nazurin/sites/pixiv/__init__.py b/nazurin/sites/pixiv/__init__.py index 1f4cbccb..6897459d 100644 --- a/nazurin/sites/pixiv/__init__.py +++ b/nazurin/sites/pixiv/__init__.py @@ -1,4 +1,5 @@ """Pixiv site plugin.""" + from .api import Pixiv from .commands import * from .config import PRIORITY diff --git a/nazurin/sites/twitter/__init__.py b/nazurin/sites/twitter/__init__.py index 555f6738..c3d58a4f 100644 --- a/nazurin/sites/twitter/__init__.py +++ b/nazurin/sites/twitter/__init__.py @@ -1,4 +1,5 @@ """Twitter site plugin.""" + from .api import Twitter from .commands import * from .config import PRIORITY diff --git a/nazurin/sites/twitter/api/web.py b/nazurin/sites/twitter/api/web.py index 85df8079..8cf7255c 100644 --- a/nazurin/sites/twitter/api/web.py +++ b/nazurin/sites/twitter/api/web.py @@ -145,9 +145,11 @@ async def tweet_detail(self, tweet_id: str): ) self.headers.update( { - Headers.AUTHORIZATION: AuthorizationToken.LOGGED_IN - if AUTH_TOKEN - else AuthorizationToken.GUEST + Headers.AUTHORIZATION: ( + AuthorizationToken.LOGGED_IN + if AUTH_TOKEN + else AuthorizationToken.GUEST + ) } ) variables = WebAPI.variables diff --git a/nazurin/sites/wallhaven/__init__.py b/nazurin/sites/wallhaven/__init__.py index 6cc41255..323cdb99 100644 --- a/nazurin/sites/wallhaven/__init__.py +++ b/nazurin/sites/wallhaven/__init__.py @@ -1,4 +1,5 @@ """Wallhaven site plugin.""" + from .api import Wallhaven from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/weibo/__init__.py b/nazurin/sites/weibo/__init__.py index 265906ca..d0162c64 100644 --- a/nazurin/sites/weibo/__init__.py +++ b/nazurin/sites/weibo/__init__.py @@ -1,4 +1,5 @@ """Sina Weibo site plugin.""" + from .api import Weibo from .config import PRIORITY from .interface import handle, patterns diff --git a/nazurin/sites/zerochan/__init__.py b/nazurin/sites/zerochan/__init__.py index 58ac55a7..4e4d7520 100644 --- a/nazurin/sites/zerochan/__init__.py +++ b/nazurin/sites/zerochan/__init__.py @@ -1,4 +1,5 @@ """Zerochan site plugin.""" + from .api import Zerochan from .commands import * from .config import PRIORITY diff --git a/nazurin/storage/__init__.py b/nazurin/storage/__init__.py index 51802d8a..cbec2d6b 100644 --- a/nazurin/storage/__init__.py +++ b/nazurin/storage/__init__.py @@ -1,4 +1,5 @@ """Nazurin storage drivers and storage manager.""" + import asyncio import importlib