🔀 Merge pull request #311

Pre Release 2.0.0a13.post1
This commit is contained in:
Ju4tCode
2021-04-01 12:42:58 -05:00
committed by GitHub
51 changed files with 9 additions and 6 deletions

View File

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -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"

View File

@ -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

View File

@ -65,6 +65,7 @@ class Plugin(object):
def _store_matcher(matcher: Type[Matcher]): def _store_matcher(matcher: Type[Matcher]):
if matcher.module:
plugin_name = matcher.module.split(".", maxsplit=1)[0] plugin_name = matcher.module.split(".", maxsplit=1)[0]
_plugin_matchers[plugin_name].add(matcher) _plugin_matchers[plugin_name].add(matcher)

View File

@ -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)

View File

@ -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"