Open
Description
What's the problem this feature will solve?
currently, there is no way to type check your hook functions:
from pytest import Item
def pytest_runtestloop(session: Item): # no type error, it should be Session
...
Describe the solution you'd like
expose a base class for plugins to extend, so they can be defined like so:
from typing_extensions import override
from pytest import Plugin
class SomePlugin(Plugin):
@override
def pytest_runtestloop(self, session: Item): # type error: signature does not match base method
...