Skip to content

Commit

Permalink
Allow overriding of sync shims
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson committed Jan 22, 2025
1 parent 947edfd commit 9051d9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kr8s/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,25 +281,25 @@ 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

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
Expand Down

0 comments on commit 9051d9e

Please sign in to comment.