nonebot-plugin-dialectlist 2.0.0__tar.gz → 2.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot_plugin_dialectlist
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: Default template for PDM package
5
5
  Author-email: Chen_Xu233 <woyerpa@outlook.com>
6
6
  License: MIT
@@ -16,6 +16,8 @@ Requires-Dist: nonebot-plugin-cesaa>=0.4.0
16
16
  Requires-Dist: nonebot-plugin-userinfo>=0.2.4
17
17
  Provides-Extra: dev
18
18
  Requires-Dist: ruff>=0.4.9; extra == "dev"
19
+ Requires-Dist: setuptools>=70.0.0; extra == "dev"
20
+ Requires-Dist: twine>=5.1.0; extra == "dev"
19
21
 
20
22
  <div align="center">
21
23
  <a href="https://v2.nonebot.dev/store"><img src="https://s2.loli.net/2022/06/16/opBDE8Swad5rU3n.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
@@ -7,22 +7,17 @@ require("nonebot_plugin_alconna")
7
7
  require("nonebot_plugin_cesaa")
8
8
 
9
9
  import re
10
- import os
11
- import time
12
10
 
13
11
  import nonebot_plugin_saa as saa
14
12
 
15
- from typing import Tuple, Union, Optional, List
13
+ from typing import Union, Optional, List
16
14
  from datetime import datetime, timedelta
17
15
  from arclet.alconna import ArparmaBehavior
18
16
  from arclet.alconna.arparma import Arparma
19
17
 
20
- from nonebot import on_command, get_driver
21
18
  from nonebot.log import logger
22
- from nonebot.params import Command, CommandArg, Arg, Depends
19
+ from nonebot.params import Arg, Depends
23
20
  from nonebot.typing import T_State
24
- from nonebot.matcher import Matcher
25
- from nonebot import get_driver
26
21
  from nonebot.adapters import Bot, Event, Message
27
22
  from nonebot.params import Arg, Depends
28
23
  from nonebot.permission import SUPERUSER
@@ -39,18 +34,16 @@ from nonebot_plugin_alconna import (
39
34
  Query,
40
35
  image_fetch,
41
36
  on_alconna,
42
- store_true,
43
37
  )
44
38
 
45
39
  from nonebot_plugin_chatrecorder import get_message_records
46
- from nonebot_plugin_userinfo import EventUserInfo, UserInfo, get_user_info
40
+ from nonebot_plugin_userinfo import get_user_info
47
41
  from nonebot_plugin_session import Session, SessionIdType, extract_session
48
- from nonebot_plugin_cesaa import get_messages_plain_text
49
-
50
42
 
51
43
  # from . import migrations #抄词云的部分代码,还不知道这有什么用
52
44
  # from .function import *
53
45
  from .config import Config, plugin_config
46
+ from .usage import __usage__
54
47
  from .utils import (
55
48
  get_datetime_fromisoformat_with_timezone,
56
49
  get_datetime_now_with_timezone,
@@ -59,13 +52,10 @@ from .utils import (
59
52
  persist_id2user_id,
60
53
  )
61
54
 
62
- with open(os.path.dirname(__file__) + "/usage.md") as f:
63
- usage = f.read()
64
-
65
55
  __plugin_meta__ = PluginMetadata(
66
56
  name="B话排行榜",
67
57
  description="调查群U的B话数量,以一定的顺序排序后排序出来。",
68
- usage=usage,
58
+ usage=__usage__,
69
59
  homepage="https://github.com/ChenXu233/nonebot_plugin_dialectlist",
70
60
  type="application",
71
61
  supported_adapters=inherit_supported_adapters(
@@ -13,13 +13,6 @@ class ScopedConfig(BaseModel):
13
13
  excluded_people: List[str] = [] # 排除的人的QQ号
14
14
  visualization_type: Literal["饼图", "圆环图", "柱状图"] = "圆环图" # 可视化方案
15
15
 
16
- @field_validator("get_num")
17
- @classmethod
18
- def check_priority(cls, v: int) -> int:
19
- if v >= 1:
20
- return v
21
- raise ValueError("表中的人数必须大于一")
22
-
23
16
 
24
17
  class Config(BaseModel):
25
18
  dialectlist: ScopedConfig = ScopedConfig()
@@ -0,0 +1,9 @@
1
+ from inspect import cleandoc
2
+
3
+ __usage__ = cleandoc(
4
+ """
5
+ /今日B话榜 查看今天群里谁B话最多。
6
+ /昨日B话榜 顾名思义。
7
+ 以此类推,有本周,本月,上周,上月,年度排行榜。
8
+ """
9
+ )
@@ -7,7 +7,6 @@ from sqlalchemy.sql import ColumnElement
7
7
 
8
8
  from nonebot.log import logger
9
9
  from nonebot.params import Depends
10
- from nonebot.compat import model_dump
11
10
  from nonebot.matcher import Matcher
12
11
 
13
12
  # from nonebot.permission import SUPERUSER
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot_plugin_dialectlist
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: Default template for PDM package
5
5
  Author-email: Chen_Xu233 <woyerpa@outlook.com>
6
6
  License: MIT
@@ -16,6 +16,8 @@ Requires-Dist: nonebot-plugin-cesaa>=0.4.0
16
16
  Requires-Dist: nonebot-plugin-userinfo>=0.2.4
17
17
  Provides-Extra: dev
18
18
  Requires-Dist: ruff>=0.4.9; extra == "dev"
19
+ Requires-Dist: setuptools>=70.0.0; extra == "dev"
20
+ Requires-Dist: twine>=5.1.0; extra == "dev"
19
21
 
20
22
  <div align="center">
21
23
  <a href="https://v2.nonebot.dev/store"><img src="https://s2.loli.net/2022/06/16/opBDE8Swad5rU3n.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
@@ -1,7 +1,9 @@
1
1
  README.md
2
2
  pyproject.toml
3
+ setup.py
3
4
  nonebot_plugin_dialectlist/__init__.py
4
5
  nonebot_plugin_dialectlist/config.py
6
+ nonebot_plugin_dialectlist/usage.py
5
7
  nonebot_plugin_dialectlist/utils.py
6
8
  nonebot_plugin_dialectlist.egg-info/PKG-INFO
7
9
  nonebot_plugin_dialectlist.egg-info/SOURCES.txt
@@ -9,3 +9,5 @@ nonebot-plugin-userinfo>=0.2.4
9
9
 
10
10
  [dev]
11
11
  ruff>=0.4.9
12
+ setuptools>=70.0.0
13
+ twine>=5.1.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nonebot_plugin_dialectlist"
3
- version = "2.0.0"
3
+ version = "2.0.2"
4
4
  description = "Default template for PDM package"
5
5
  authors = [
6
6
  {name = "Chen_Xu233", email = "woyerpa@outlook.com"},
@@ -23,6 +23,8 @@ license = {text = "MIT"}
23
23
  [project.optional-dependencies]
24
24
  dev = [
25
25
  "ruff>=0.4.9",
26
+ "setuptools>=70.0.0",
27
+ "twine>=5.1.0",
26
28
  ]
27
29
 
28
30
  [tool.pdm]
@@ -0,0 +1,3 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup()