File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
openfeature/transaction_context Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ app = Flask(__name__)
259259api.set_transaction_context_propagator(ContextVarsTransactionContextPropagator())
260260
261261# Middleware to set the transaction context
262- # You can call api.set_transaction_context anywhere you have information,
262+ # You can call api.set_transaction_context anywhere you have information,
263263# you want to have available in the code-paths below the current one.
264264@app.before_request
265265def set_request_transaction_context ():
@@ -269,7 +269,7 @@ def set_request_transaction_context():
269269 api.set_transaction_context(evaluation_context)
270270
271271def create_response () -> str :
272- # This method can be anywhere in our code.
272+ # This method can be anywhere in our code.
273273 # The feature flag evaluation will automatically contain the transaction context merged with other context
274274 new_response = api.get_client().get_string_value(" response-message" , " Hello User!" )
275275 return f " Message from server: { new_response} "
Original file line number Diff line number Diff line change 1- from abc import ABC , abstractmethod
1+ import typing
2+ from abc import abstractmethod
23from typing import TypeVar
34
45from openfeature .evaluation_context import EvaluationContext
56
67T = TypeVar ("T" , bound = "TransactionContextPropagator" )
78
89
9- class TransactionContextPropagator (ABC ):
10+ class TransactionContextPropagator (typing . Protocol ):
1011 @abstractmethod
1112 def get_transaction_context (self ) -> EvaluationContext :
1213 pass
You can’t perform that action at this time.
0 commit comments