Skip to content

Commit 95b990d

Browse files
author
Michael Brewer
committed
fix(docs): correct feature flag examples
1 parent 0cff8f7 commit 95b990d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/utilities/feature_flags.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ By default, we cache configuration retrieved from the Store for 5 seconds for pe
453453

454454
You can override `max_age` parameter when instantiating the store.
455455

456+
=== "app.py"
457+
456458
```python hl_lines="7"
457459
from aws_lambda_powertools.utilities.feature_flags import FeatureFlags, AppConfigStore
458460

@@ -677,11 +679,13 @@ Parameter | Default | Description
677679
**logger** | `logging.Logger` | Logger to use for debug. You can optionally supply an instance of Powertools Logger.
678680

679681

680-
```python hl_lines="19-25" title="AppConfigStore sample"
682+
```python hl_lines="21-27" title="AppConfigStore sample"
681683
from botocore.config import Config
682684

683685
import jmespath
684686

687+
from aws_lambda_powertools.utilities.feature_flags import AppConfigStore
688+
685689
boto_config = Config(read_timeout=10, retries={"total_max_attempts": 2})
686690

687691
# Custom JMESPath functions
@@ -715,9 +719,7 @@ You can unit test your feature flags locally and independently without setting u
715719
???+ warning
716720
This excerpt relies on `pytest` and `pytest-mock` dependencies.
717721

718-
```python hl_lines="9-11" title="Unit testing feature flags"
719-
from typing import Dict, List, Optional
720-
722+
```python hl_lines="7-9" title="Unit testing feature flags"
721723
from aws_lambda_powertools.utilities.feature_flags import FeatureFlags, AppConfigStore, RuleAction
722724

723725

0 commit comments

Comments
 (0)