Skip to content

Commit 2a21b9d

Browse files
committed
fix: lint issues
Signed-off-by: Lukas Reining <[email protected]>
1 parent 56c5a2f commit 2a21b9d

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
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}"
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
from abc import ABC, abstractmethod
1+
import typing
22
from typing import TypeVar
33

44
from openfeature.evaluation_context import EvaluationContext
55

66
T = TypeVar("T", bound="TransactionContextPropagator")
77

88

9-
class TransactionContextPropagator(ABC):
10-
@abstractmethod
11-
def get_transaction_context(self) -> EvaluationContext:
12-
pass
9+
class TransactionContextPropagator(typing.Protocol):
10+
def get_transaction_context(self) -> EvaluationContext: ...
1311

14-
@abstractmethod
15-
def set_transaction_context(self, transaction_context: EvaluationContext) -> None:
16-
pass
12+
def set_transaction_context(
13+
self, transaction_context: EvaluationContext
14+
) -> None: ...

0 commit comments

Comments
 (0)