From ca1eb119415faa65bbdecc4454dc1353af06a533 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Wed, 22 Jan 2025 11:05:47 +0000 Subject: [PATCH] Allow overriding of sync shims in Service (#557) --- .pre-commit-config.yaml | 2 +- kr8s/objects.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 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