Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
@ -1,5 +1,5 @@
|
|||||||
[
|
[
|
||||||
"2.0.0a13",
|
"2.0.0a13.post1",
|
||||||
"2.0.0a10",
|
"2.0.0a10",
|
||||||
"2.0.0a8.post2",
|
"2.0.0a8.post2",
|
||||||
"2.0.0a7"
|
"2.0.0a7"
|
||||||
|
@ -9,9 +9,10 @@ import abc
|
|||||||
import asyncio
|
import asyncio
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from functools import reduce, partial
|
from functools import reduce, partial
|
||||||
|
from typing_extensions import Protocol
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from typing import (Any, Set, Dict, Union, TypeVar, Mapping, Optional, Iterable,
|
from typing import (Any, Set, Dict, Union, TypeVar, Mapping, Optional, Iterable,
|
||||||
Protocol, Awaitable, TYPE_CHECKING)
|
Awaitable, TYPE_CHECKING)
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
@ -65,8 +65,9 @@ class Plugin(object):
|
|||||||
|
|
||||||
|
|
||||||
def _store_matcher(matcher: Type[Matcher]):
|
def _store_matcher(matcher: Type[Matcher]):
|
||||||
plugin_name = matcher.module.split(".", maxsplit=1)[0]
|
if matcher.module:
|
||||||
_plugin_matchers[plugin_name].add(matcher)
|
plugin_name = matcher.module.split(".", maxsplit=1)[0]
|
||||||
|
_plugin_matchers[plugin_name].add(matcher)
|
||||||
|
|
||||||
|
|
||||||
def on(type: str = "",
|
def on(type: str = "",
|
||||||
|
@ -179,7 +179,8 @@ class PluginFinder(MetaPathFinder):
|
|||||||
newname = manager._rewrite_module_name(fullname)
|
newname = manager._rewrite_module_name(fullname)
|
||||||
if newname:
|
if newname:
|
||||||
spec = PathFinder.find_spec(
|
spec = PathFinder.find_spec(
|
||||||
newname, [*manager.search_path, *(path or [])], target)
|
newname, [*manager.search_path, *(path or sys.path)],
|
||||||
|
target)
|
||||||
if spec:
|
if spec:
|
||||||
spec.loader = PluginLoader(manager, newname,
|
spec.loader = PluginLoader(manager, newname,
|
||||||
spec.origin)
|
spec.origin)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "nonebot2"
|
name = "nonebot2"
|
||||||
version = "2.0.0-alpha.13"
|
version = "2.0.0a13.post1"
|
||||||
description = "An asynchronous python bot framework."
|
description = "An asynchronous python bot framework."
|
||||||
authors = ["yanyongyu <yyy@nonebot.dev>"]
|
authors = ["yanyongyu <yyy@nonebot.dev>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|