You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to how pydantic's config works, we could have an optional GuardConfig class that could be used to configure the behavior of the guard. This will allow us to get rid of the **depends parameter in the use_guard decorator and make it a guard class-level configuration instead. Or maybe we could have both (per-route and per-guard config). To do so, we would have to make Guard an ABC instead of a Protocol and add a config attribute to it.
Similar to how pydantic's config works, we could have an optional
GuardConfig
class that could be used to configure the behavior of the guard. This will allow us to get rid of the**depends
parameter in theuse_guard
decorator and make it a guard class-level configuration instead. Or maybe we could have both (per-route and per-guard config). To do so, we would have to make Guard anABC
instead of aProtocol
and add aconfig
attribute to it.Automatically Extracted from:
pest/pest/decorators/guard.py
Lines 28 to 34 in c216743
The text was updated successfully, but these errors were encountered: