Skip to content

Commit 7f85ae2

Browse files
committed
fix: Hook methods should have default non-abstract implementations
1 parent d41cea2 commit 7f85ae2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

openfeature/hook/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import typing
4-
from abc import abstractmethod
54
from dataclasses import dataclass
65
from enum import Enum
76

@@ -27,7 +26,6 @@ class HookContext:
2726

2827

2928
class 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

Comments
 (0)