diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a79aaea..7e7e8a3a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ default_stages: [commit] repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.1 + rev: v0.3.3 hooks: - id: ruff args: [--fix] @@ -16,7 +16,7 @@ repos: - id: check-merge-conflict - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy files: openfeature diff --git a/openfeature/provider/__init__.py b/openfeature/provider/__init__.py index edb94ae1..30ed103f 100644 --- a/openfeature/provider/__init__.py +++ b/openfeature/provider/__init__.py @@ -17,54 +17,45 @@ class ProviderStatus(Enum): class FeatureProvider(typing.Protocol): # pragma: no cover - def initialize(self, evaluation_context: EvaluationContext) -> None: - ... + def initialize(self, evaluation_context: EvaluationContext) -> None: ... - def shutdown(self) -> None: - ... + def shutdown(self) -> None: ... - def get_metadata(self) -> Metadata: - ... + def get_metadata(self) -> Metadata: ... - def get_provider_hooks(self) -> typing.List[Hook]: - ... + def get_provider_hooks(self) -> typing.List[Hook]: ... def resolve_boolean_details( self, flag_key: str, default_value: bool, evaluation_context: typing.Optional[EvaluationContext] = None, - ) -> FlagResolutionDetails[bool]: - ... + ) -> FlagResolutionDetails[bool]: ... def resolve_string_details( self, flag_key: str, default_value: str, evaluation_context: typing.Optional[EvaluationContext] = None, - ) -> FlagResolutionDetails[str]: - ... + ) -> FlagResolutionDetails[str]: ... def resolve_integer_details( self, flag_key: str, default_value: int, evaluation_context: typing.Optional[EvaluationContext] = None, - ) -> FlagResolutionDetails[int]: - ... + ) -> FlagResolutionDetails[int]: ... def resolve_float_details( self, flag_key: str, default_value: float, evaluation_context: typing.Optional[EvaluationContext] = None, - ) -> FlagResolutionDetails[float]: - ... + ) -> FlagResolutionDetails[float]: ... def resolve_object_details( self, flag_key: str, default_value: typing.Union[dict, list], evaluation_context: typing.Optional[EvaluationContext] = None, - ) -> FlagResolutionDetails[typing.Union[dict, list]]: - ... + ) -> FlagResolutionDetails[typing.Union[dict, list]]: ... diff --git a/pyproject.toml b/pyproject.toml index b07d7535..da96ea8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ Homepage = "https://github.com/open-feature/python-sdk" files = "openfeature" namespace_packages = true explicit_package_bases = true +local_partial_types = true # will become the new default from version 2 pretty = true strict = true disallow_any_generics = false