Skip to content

Commit

Permalink
chore: update mypy and ruff (#296)
Browse files Browse the repository at this point in the history
update mypy and ruff

Signed-off-by: gruebel <[email protected]>
  • Loading branch information
gruebel authored Mar 18, 2024
1 parent f5987ef commit 6e4eebc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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
27 changes: 9 additions & 18 deletions openfeature/provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]: ...
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e4eebc

Please sign in to comment.