11from __future__ import annotations
22
33import typing
4- from abc import abstractmethod
54from dataclasses import dataclass
65from enum import Enum
76
@@ -27,7 +26,6 @@ class HookContext:
2726
2827
2928class Hook :
30- @abstractmethod
3129 def before (self , hook_context : HookContext , hints : dict ) -> EvaluationContext :
3230 """
3331 Runs before flag is resolved.
@@ -40,7 +38,6 @@ def before(self, hook_context: HookContext, hints: dict) -> EvaluationContext:
4038 """
4139 pass
4240
43- @abstractmethod
4441 def after (
4542 self , hook_context : HookContext , details : FlagEvaluationDetails , hints : dict
4643 ):
@@ -54,7 +51,6 @@ def after(
5451 """
5552 pass
5653
57- @abstractmethod
5854 def error (self , hook_context : HookContext , exception : Exception , hints : dict ):
5955 """
6056 Run when evaluation encounters an error. Errors thrown will be swallowed.
@@ -65,7 +61,6 @@ def error(self, hook_context: HookContext, exception: Exception, hints: dict):
6561 """
6662 pass
6763
68- @abstractmethod
6964 def finally_after (self , hook_context : HookContext , hints : dict ):
7065 """
7166 Run after flag evaluation, including any error processing.
@@ -76,7 +71,6 @@ def finally_after(self, hook_context: HookContext, hints: dict):
7671 """
7772 pass
7873
79- @abstractmethod
8074 def supports_flag_value_type (self , flag_type : FlagType ) -> bool :
8175 """
8276 Check to see if the hook supports the particular flag type.
0 commit comments