Skip to content

Little clarify hvac #13886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion stubs/hvac/hvac/aws_utils.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import requests

class SigV4Auth:
access_key: str
secret_key: str
session_token: str | None
region: str
def __init__(self, access_key: str, secret_key: str, session_token: str | None = None, region: str = "us-east-1") -> None: ...
def add_auth(self, request) -> None: ...
def add_auth(self, request: requests.PreparedRequest) -> None: ...

def generate_sigv4_auth_request(header_value: str | None = None): ...
7 changes: 3 additions & 4 deletions stubs/hvac/hvac/exceptions.pyi
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
from collections.abc import Iterable
from typing import Any
from typing_extensions import Self

class VaultError(Exception):
errors: Iterable[Any] | str | None
errors: Iterable[str] | str | None
method: str | None
url: str | None
text: str | None
json: object
def __init__(
self,
message: str | None = None,
errors: Iterable[Any] | str | None = None,
errors: Iterable[str] | str | None = None,
method: str | None = None,
url: str | None = None,
text: str | None = None,
Expand All @@ -22,7 +21,7 @@ class VaultError(Exception):
cls,
status_code: int,
message: str | None = ...,
errors: Iterable[Any] | str | None = ...,
errors: Iterable[str] | str | None = ...,
method: str | None = ...,
url: str | None = ...,
text: str | None = ...,
Expand Down
6 changes: 4 additions & 2 deletions stubs/hvac/hvac/utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def raise_for_error(
url: str,
status_code: int,
message: str | None = None,
errors: Iterable[Any] | str | None = None,
errors: Iterable[str] | str | None = None,
text: str | None = None,
json: object | None = None,
) -> NoReturn: ...
Expand All @@ -42,4 +42,6 @@ def comma_delimited_to_list(list_param: Iterable[_T]) -> Iterable[_T]: ...
# the docstring states that this function returns a bool, but the code does not return anything
def validate_pem_format(param_name: str, param_argument: str) -> None: ...
def remove_nones(params: Mapping[_K, _V | None]) -> Mapping[_K, _V]: ...
def format_url(format_str: str, *args: Any, **kwargs: Any) -> str: ...
def format_url(
format_str: str, *args: object, **kwargs: object
) -> str: ... # values are passed to builtins.str, which takes an object type