diff --git a/openfeature/api.py b/openfeature/api.py index 92a7443e..8ce1945b 100644 --- a/openfeature/api.py +++ b/openfeature/api.py @@ -31,12 +31,12 @@ def set_provider(provider: FeatureProvider) -> None: provider.initialize(_evaluation_context) -def get_provider() -> typing.Optional[FeatureProvider]: +def get_provider() -> FeatureProvider: global _provider return _provider -def get_provider_metadata() -> typing.Optional[Metadata]: +def get_provider_metadata() -> Metadata: global _provider return _provider.get_metadata() diff --git a/openfeature/client.py b/openfeature/client.py index c76402fb..092290f8 100644 --- a/openfeature/client.py +++ b/openfeature/client.py @@ -25,7 +25,6 @@ error_hooks, ) from openfeature.provider import FeatureProvider -from openfeature.provider.no_op_provider import NoOpProvider logger = logging.getLogger("openfeature") @@ -374,10 +373,6 @@ def _create_provider_evaluation( evaluation_context, ) - if not self.provider: - logger.info("No provider configured, using no-op provider.") - self.provider = NoOpProvider() - get_details_callables: typing.Mapping[FlagType, GetDetailCallable] = { FlagType.BOOLEAN: self.provider.resolve_boolean_details, FlagType.INTEGER: self.provider.resolve_integer_details,