From 74b093e2336915947ef599b48cae47d2c7adc06e Mon Sep 17 00:00:00 2001 From: gruebel Date: Thu, 25 Sep 2025 22:53:16 +0200 Subject: [PATCH] upgrade mypy and ruff Signed-off-by: gruebel --- .pre-commit-config.yaml | 4 ++-- .../openfeature-hooks-opentelemetry/pyproject.toml | 6 ++++-- .../openfeature-provider-env-var/pyproject.toml | 6 ++++-- .../openfeature-provider-flagd/pyproject.toml | 6 ++++-- .../openfeature-provider-flipt/pyproject.toml | 6 ++++-- .../openfeature-provider-ofrep/pyproject.toml | 6 ++++-- uv.lock | 14 +++++++------- 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index acb59469..a6252237 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ default_stages: [pre-commit] repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.7 + rev: v0.13.2 hooks: - id: ruff-check args: [--fix] - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-toml - id: check-yaml diff --git a/hooks/openfeature-hooks-opentelemetry/pyproject.toml b/hooks/openfeature-hooks-opentelemetry/pyproject.toml index 0ec0fd77..ded42d3c 100644 --- a/hooks/openfeature-hooks-opentelemetry/pyproject.toml +++ b/hooks/openfeature-hooks-opentelemetry/pyproject.toml @@ -27,7 +27,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib" [dependency-groups] dev = [ "coverage[toml]>=7.10.0,<8.0.0", - "mypy[faster-cache]>=1.17.0,<2.0.0", + "mypy>=1.18.0,<2.0.0", "pytest>=8.4.0,<9.0.0", ] @@ -43,7 +43,9 @@ files = "src" python_version = "3.9" # should be identical to the minimum supported version namespace_packages = true explicit_package_bases = true -local_partial_types = true +local_partial_types = true # will become the new default from version 2 +allow_redefinition_new = true # will become the new default from version 2 +fixed_format_cache = true # new caching mechanism pretty = true strict = true diff --git a/providers/openfeature-provider-env-var/pyproject.toml b/providers/openfeature-provider-env-var/pyproject.toml index 9632984b..0f38df6b 100644 --- a/providers/openfeature-provider-env-var/pyproject.toml +++ b/providers/openfeature-provider-env-var/pyproject.toml @@ -26,7 +26,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib" [dependency-groups] dev = [ "coverage[toml]>=7.10.0,<8.0.0", - "mypy[faster-cache]>=1.17.0,<2.0.0", + "mypy>=1.18.0,<2.0.0", "pytest>=8.4.0,<9.0.0", ] @@ -42,7 +42,9 @@ files = "src" python_version = "3.9" # should be identical to the minimum supported version namespace_packages = true explicit_package_bases = true -local_partial_types = true +local_partial_types = true # will become the new default from version 2 +allow_redefinition_new = true # will become the new default from version 2 +fixed_format_cache = true # new caching mechanism pretty = true strict = true diff --git a/providers/openfeature-provider-flagd/pyproject.toml b/providers/openfeature-provider-flagd/pyproject.toml index b0f6bbad..27120527 100644 --- a/providers/openfeature-provider-flagd/pyproject.toml +++ b/providers/openfeature-provider-flagd/pyproject.toml @@ -36,7 +36,7 @@ dev = [ "asserts>=0.13.0,<0.14.0", "coverage[toml]>=7.10.0,<8.0.0", "grpcio-health-checking>=1.74.0,<2.0.0", - "mypy[faster-cache]>=1.17.0,<2.0.0", + "mypy>=1.18.0,<2.0.0", "pytest>=8.4.0,<9.0.0", "pytest-bdd>=8.1.0,<9.0.0", "testcontainers>=4.12.0,<5.0.0", @@ -87,7 +87,9 @@ files = "src" python_version = "3.9" # should be identical to the minimum supported version namespace_packages = true explicit_package_bases = true -local_partial_types = true +local_partial_types = true # will become the new default from version 2 +allow_redefinition_new = true # will become the new default from version 2 +fixed_format_cache = true # new caching mechanism pretty = true strict = true diff --git a/providers/openfeature-provider-flipt/pyproject.toml b/providers/openfeature-provider-flipt/pyproject.toml index 39f0e17e..414f1f48 100644 --- a/providers/openfeature-provider-flipt/pyproject.toml +++ b/providers/openfeature-provider-flipt/pyproject.toml @@ -27,7 +27,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib" [dependency-groups] dev = [ "coverage[toml]>=7.10.0,<8.0.0", - "mypy[faster-cache]>=1.17.0,<2.0.0", + "mypy>=1.18.0,<2.0.0", "pytest>=8.4.0,<9.0.0", "requests-mock>=1.12.0,<2.0.0", "types-requests>=2.32.0,<3.0.0", @@ -50,7 +50,9 @@ files = "src" python_version = "3.9" # should be identical to the minimum supported version namespace_packages = true explicit_package_bases = true -local_partial_types = true +local_partial_types = true # will become the new default from version 2 +allow_redefinition_new = true # will become the new default from version 2 +fixed_format_cache = true # new caching mechanism pretty = true strict = true diff --git a/providers/openfeature-provider-ofrep/pyproject.toml b/providers/openfeature-provider-ofrep/pyproject.toml index c8662824..f06b1930 100644 --- a/providers/openfeature-provider-ofrep/pyproject.toml +++ b/providers/openfeature-provider-ofrep/pyproject.toml @@ -28,7 +28,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib" [dependency-groups] dev = [ "coverage[toml]>=7.10.0,<8.0.0", - "mypy[faster-cache]>=1.17.0,<2.0.0", + "mypy>=1.18.0,<2.0.0", "pytest>=8.4.0,<9.0.0", "requests-mock>=1.12.0,<2.0.0", "types-requests>=2.32.0,<3.0.0", @@ -56,7 +56,9 @@ files = "src" python_version = "3.9" # should be identical to the minimum supported version namespace_packages = true explicit_package_bases = true -local_partial_types = true +local_partial_types = true # will become the new default from version 2 +allow_redefinition_new = true # will become the new default from version 2 +fixed_format_cache = true # new caching mechanism pretty = true strict = true diff --git a/uv.lock b/uv.lock index fef7e1ed..b1c64652 100644 --- a/uv.lock +++ b/uv.lock @@ -809,7 +809,7 @@ dev = [ { name = "asserts" }, { name = "coverage", extra = ["toml"] }, { name = "grpcio-health-checking" }, - { name = "mypy", extra = ["faster-cache"] }, + { name = "mypy" }, { name = "pytest" }, { name = "pytest-bdd" }, { name = "testcontainers" }, @@ -834,7 +834,7 @@ dev = [ { name = "asserts", specifier = ">=0.13.0,<0.14.0" }, { name = "coverage", extras = ["toml"], specifier = ">=7.10.0,<8.0.0" }, { name = "grpcio-health-checking", specifier = ">=1.74.0,<2.0.0" }, - { name = "mypy", extras = ["faster-cache"], specifier = ">=1.17.0,<2.0.0" }, + { name = "mypy", specifier = ">=1.18.0,<2.0.0" }, { name = "pytest", specifier = ">=8.4.0,<9.0.0" }, { name = "pytest-bdd", specifier = ">=8.1.0,<9.0.0" }, { name = "testcontainers", specifier = ">=4.12.0,<5.0.0" }, @@ -854,7 +854,7 @@ dependencies = [ [package.dev-dependencies] dev = [ { name = "coverage", extra = ["toml"] }, - { name = "mypy", extra = ["faster-cache"] }, + { name = "mypy" }, { name = "pytest" }, { name = "requests-mock" }, { name = "types-requests" }, @@ -869,7 +869,7 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ { name = "coverage", extras = ["toml"], specifier = ">=7.10.0,<8.0.0" }, - { name = "mypy", extras = ["faster-cache"], specifier = ">=1.17.0,<2.0.0" }, + { name = "mypy", specifier = ">=1.18.0,<2.0.0" }, { name = "pytest", specifier = ">=8.4.0,<9.0.0" }, { name = "requests-mock", specifier = ">=1.12.0,<2.0.0" }, { name = "types-requests", specifier = ">=2.32.0,<3.0.0" }, @@ -877,7 +877,7 @@ dev = [ [[package]] name = "openfeature-provider-ofrep" -version = "0.1.1" +version = "0.2.0" source = { editable = "providers/openfeature-provider-ofrep" } dependencies = [ { name = "openfeature-sdk" }, @@ -887,7 +887,7 @@ dependencies = [ [package.dev-dependencies] dev = [ { name = "coverage", extra = ["toml"] }, - { name = "mypy", extra = ["faster-cache"] }, + { name = "mypy" }, { name = "pytest" }, { name = "requests-mock" }, { name = "types-requests" }, @@ -902,7 +902,7 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ { name = "coverage", extras = ["toml"], specifier = ">=7.10.0,<8.0.0" }, - { name = "mypy", extras = ["faster-cache"], specifier = ">=1.17.0,<2.0.0" }, + { name = "mypy", specifier = ">=1.18.0,<2.0.0" }, { name = "pytest", specifier = ">=8.4.0,<9.0.0" }, { name = "requests-mock", specifier = ">=1.12.0,<2.0.0" }, { name = "types-requests", specifier = ">=2.32.0,<3.0.0" },