update config

This commit is contained in:
felinae98 2022-02-12 10:40:27 +08:00
parent 649c1cf8f2
commit 7dbbaea6c8
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610
18 changed files with 36 additions and 24 deletions

View File

@ -9,7 +9,6 @@ repos:
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: 22.1.0

View File

@ -55,3 +55,16 @@ markers = [
"compare: compare fetching result with rsshub",
"render: render img by chrome"
]
[tool.black]
line-length = 88
target-version = ["py39", "py310"]
include = '\.pyi?$'
extend-exclude = '''
'''
[tool.isort]
profile = "black"
line_length = 88
skip_gitignore = true
force_sort_within_sections = true

View File

@ -1,9 +1,8 @@
import os
from dataclasses import dataclass
import os
from pathlib import Path
from typing import Union
import socketio
from fastapi.staticfiles import StaticFiles
from nonebot import get_driver, on_command
from nonebot.adapters.cqhttp.bot import Bot
@ -12,6 +11,7 @@ from nonebot.drivers.fastapi import Driver
from nonebot.log import logger
from nonebot.rule import to_me
from nonebot.typing import T_State
import socketio
from ..plugin_config import plugin_config
from .api import (

View File

@ -1,5 +1,5 @@
import os
from collections import defaultdict
import os
from os import path
from typing import DefaultDict, Literal, Mapping, TypedDict

View File

@ -204,7 +204,7 @@ def do_del_sub(del_sub: Type[Matcher]):
config.del_subscribe(
state.get("_user_id") or event.group_id,
"group",
**state["sub_table"][index]
**state["sub_table"][index],
)
except Exception as e:
await del_sub.reject("删除错误")

View File

@ -1,8 +1,8 @@
import json
from typing import Any
import httpx
from bs4 import BeautifulSoup as bs
import httpx
from ..post import Post
from ..types import Category, RawPost, Target

View File

@ -1,7 +1,7 @@
import time
from abc import ABC, abstractmethod
from collections import defaultdict
from dataclasses import dataclass
import time
from typing import Any, Collection, Literal, Optional
import httpx

View File

@ -1,9 +1,9 @@
import calendar
from typing import Any, Optional
from bs4 import BeautifulSoup as bs
import feedparser
import httpx
from bs4 import BeautifulSoup as bs
from ..post import Post
from ..types import RawPost, Target

View File

@ -1,11 +1,11 @@
from datetime import datetime
import hashlib
import json
import re
from datetime import datetime
from typing import Any, Optional
import httpx
from bs4 import BeautifulSoup as bs
import httpx
from ..post import Post
from ..types import *

View File

@ -1,10 +1,10 @@
from datetime import datetime
import json
import re
from datetime import datetime
from typing import Any, Optional
import httpx
from bs4 import BeautifulSoup as bs
import httpx
from nonebot import logger
from ..post import Post

View File

@ -4,10 +4,10 @@ from functools import reduce
from io import BytesIO
from typing import Optional, Union
from PIL import Image
import httpx
from nonebot import logger
from nonebot.adapters.cqhttp.message import Message, MessageSegment
from PIL import Image
from .plugin_config import plugin_config
from .utils import parse_text

View File

@ -1,8 +1,8 @@
import asyncio
import logging
import nonebot
from apscheduler.schedulers.asyncio import AsyncIOScheduler
import nonebot
from nonebot import get_driver, logger
from nonebot.log import LoguruHandler

View File

@ -1,17 +1,17 @@
import asyncio
import base64
from html import escape
import os
from pathlib import Path
import platform
import re
import subprocess
import sys
from html import escape
from pathlib import Path
from time import asctime
from typing import Awaitable, Callable, Optional, Union
import nonebot
from bs4 import BeautifulSoup as bs
import nonebot
from nonebot.adapters.cqhttp.message import MessageSegment
from nonebot.log import default_format, logger
from playwright._impl._driver import compute_driver_executable

View File

@ -1,8 +1,8 @@
import typing
from httpx import Response
import pytest
import respx
from httpx import Response
if typing.TYPE_CHECKING:
import sys

View File

@ -1,7 +1,7 @@
import typing
import pytest
from httpx import Response
import pytest
if typing.TYPE_CHECKING:
import sys

View File

@ -1,9 +1,9 @@
import time
import typing
from httpx import Response
import pytest
import respx
from httpx import Response
from .utils import get_json

View File

@ -1,9 +1,9 @@
import time
import typing
from httpx import Response
import pytest
import respx
from httpx import Response
from .utils import get_json

View File

@ -1,11 +1,11 @@
import typing
from datetime import datetime
import typing
import feedparser
import pytest
import respx
from httpx import Response
import pytest
from pytz import timezone
import respx
if typing.TYPE_CHECKING:
import sys