We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d1d833 commit ca3d0bcCopy full SHA for ca3d0bc
1 file changed
testing/test_pluginmanager.py
@@ -3,8 +3,7 @@
3
"""
4
5
import importlib.metadata
6
-from typing import Any
7
-from typing import List
+from typing import Any, List, Dict
8
9
import pytest
10
@@ -138,7 +137,7 @@ def some_func(self):
138
137
def test_register_skips_pydantic_fields(he_pm: PluginManager) -> None:
139
class PydanticModelClass:
140
# stub to make object look like a pydantic model
141
- model_fields: dict = {"some_attr": {}}
+ model_fields: Dict[str, bool] = {"some_attr": True}
142
143
def __pydantic_core_schema__(self): ...
144
@@ -147,7 +146,7 @@ def some_attr(self): ...
147
146
148
test_plugin = PydanticModelClass()
149
he_pm.register(test_plugin)
150
- with pytest.raises(AttributeError) as excinfo:
+ with pytest.raises(AttributeError):
151
he_pm.hook.some_attr.get_hookimpls()
152
153
0 commit comments