Skip to content

Commit a70bcd8

Browse files
committed
refactor: rename schema_fetcher param
1 parent 4d397a7 commit a70bcd8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

aws_lambda_powertools/utilities/feature_toggles/feature_flags.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99

1010

1111
class FeatureFlags:
12-
def __init__(self, schema_fetcher: StoreProvider):
12+
def __init__(self, store: StoreProvider):
1313
"""constructor
1414
1515
Parameters
1616
----------
17-
schema_fetcher: StoreProvider
17+
store: StoreProvider
1818
A schema JSON fetcher, can be AWS AppConfig, Hashicorp Consul etc.
1919
"""
2020
self._logger = logger
21-
self._schema_fetcher = schema_fetcher
21+
self._store = store
2222
self._schema_validator = schema.SchemaValidator(self._logger)
2323

2424
def _match_by_action(self, action: str, condition_value: Any, context_value: Any) -> bool:
@@ -98,7 +98,7 @@ def get_configuration(self) -> Dict[str, Any]:
9898
parsed JSON dictionary
9999
"""
100100
# parse result conf as JSON, keep in cache for self.max_age seconds
101-
config = self._schema_fetcher.get_json_configuration()
101+
config = self._store.get_json_configuration()
102102
# validate schema
103103
self._schema_validator.validate_json_schema(config)
104104
return config

tests/functional/feature_toggles/test_feature_toggles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def init_configuration_store(mocker, mock_schema: Dict, config: Config) -> Featu
2626
cache_seconds=600,
2727
config=config,
2828
)
29-
conf_store: FeatureFlags = FeatureFlags(schema_fetcher=app_conf_fetcher)
29+
conf_store: FeatureFlags = FeatureFlags(store=app_conf_fetcher)
3030
return conf_store
3131

3232

0 commit comments

Comments
 (0)