From 9051d9e2d808bc9636ce1ac83c73a52033cfd388 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Wed, 22 Jan 2025 10:58:13 +0000 Subject: [PATCH 1/2] Allow overriding of sync shims --- kr8s/objects.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kr8s/objects.py b/kr8s/objects.py index 9f1bc08..7781171 100644 --- a/kr8s/objects.py +++ b/kr8s/objects.py @@ -281,12 +281,12 @@ class ServiceAccount(APIObjectSyncMixin, _ServiceAccount): class Service(APIObjectSyncMixin, _Service): - def proxy_http_request( + def proxy_http_request( # type: ignore self, method: str, path: str, port: int | None = None, **kwargs: Any ) -> httpx.Response: return run_sync(self.async_proxy_http_request)(method, path, port=port, **kwargs) # type: ignore - def proxy_http_get( + def proxy_http_get( # type: ignore self, path: str, port: int | None = None, **kwargs ) -> httpx.Response: return run_sync(self.async_proxy_http_request)("GET", path, port, **kwargs) # type: ignore @@ -294,12 +294,12 @@ def proxy_http_get( def proxy_http_post(self, path: str, port: int | None = None, **kwargs) -> None: # type: ignore return run_sync(self.async_proxy_http_request)("POST", path, port, **kwargs) # type: ignore - def proxy_http_put( + def proxy_http_put( # type: ignore self, path: str, port: int | None = None, **kwargs ) -> httpx.Response: return run_sync(self.async_proxy_http_request)("PUT", path, port, **kwargs) # type: ignore - def proxy_http_delete( + def proxy_http_delete( # type: ignore self, path: str, port: int | None = None, **kwargs ) -> httpx.Response: return run_sync(self.async_proxy_http_request)("DELETE", path, port, **kwargs) # type: ignore From 30481f5b2c32831179b020217ac0103086fea210 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Wed, 22 Jan 2025 11:00:07 +0000 Subject: [PATCH 2/2] Expand type checking in pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f27e048..a4a2420 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: rev: 'v1.14.1' hooks: - id: mypy - exclude: "examples|venv|ci|docs|conftest.py" + exclude: "examples|venv|ci|docs" additional_dependencies: [types-pyyaml>=6.0] - repo: https://github.com/asottile/pyupgrade rev: v3.19.1