Skip to content

Commit 5535e3c

Browse files
committed
fix: lint issues
1 parent 977f261 commit 5535e3c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ app = Flask(__name__)
259259
api.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
265265
def set_request_transaction_context():
@@ -269,7 +269,7 @@ def set_request_transaction_context():
269269
api.set_transaction_context(evaluation_context)
270270

271271
def 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}"

openfeature/transaction_context/transaction_context_propagator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
from abc import ABC, abstractmethod
1+
import typing
2+
from abc import abstractmethod
23
from typing import TypeVar
34

45
from openfeature.evaluation_context import EvaluationContext
56

67
T = 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

0 commit comments

Comments
 (0)