From 32e3c175521de94be7ef2361407d5d1173c37f18 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Thu, 21 Oct 2021 00:08:37 +0800 Subject: [PATCH] :rotating_light: remove linter warning --- nonebot/plugin/manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nonebot/plugin/manager.py b/nonebot/plugin/manager.py index b91d932f..d7485c72 100644 --- a/nonebot/plugin/manager.py +++ b/nonebot/plugin/manager.py @@ -8,8 +8,8 @@ from types import ModuleType from collections import Counter from contextvars import ContextVar from importlib.abc import MetaPathFinder -from typing import Set, List, Iterable, Optional from importlib.machinery import PathFinder, SourceFileLoader +from typing import Set, List, Union, Iterable, Optional, Sequence from .export import Export, _export @@ -200,7 +200,10 @@ class PluginManager: class PluginFinder(MetaPathFinder): - def find_spec(self, fullname: str, path, target): + def find_spec(self, + fullname: str, + path: Optional[Sequence[Union[bytes, str]]], + target: Optional[ModuleType] = None): if _manager_stack: index = -1 origin_spec = PathFinder.find_spec(fullname, path, target)