Debian Codegraph @

src/pluggy/_warnings.py

raw
1 from typing import final
2
3
4 class PluggyWarning(UserWarning):
5 """Base class for all warnings emitted by pluggy."""
6
7 __module__ = "pluggy"
8
9
10 @final
11 class PluggyTeardownRaisedWarning(PluggyWarning):
12 """A plugin raised an exception during an :ref:`old-style hookwrapper
13 <old_style_hookwrappers>` teardown.
14
15 Such exceptions are not handled by pluggy, and may cause subsequent
16 teardowns to be executed at unexpected times, or be skipped entirely.
17
18 This is an issue in the plugin implementation.
19
20 If the exception is unintended, fix the underlying cause.
21
22 If the exception is intended, switch to :ref:`new-style hook wrappers
23 <hookwrappers>`, or use :func:`result.force_exception()
24 <pluggy.Result.force_exception>` to set the exception instead of raising.
25 """
26
27 __module__ = "pluggy"