Conversation
Could you better explain? |
Never mind took a look again at the PR and everything looks good. I think having the explicit types definitely helped me better understand the code. |
| settings: dict[str, Any] | None = DEFAULT_SETTINGS, | ||
| create_index: bool = True, | ||
| http_auth: Any = ( | ||
| http_auth: tuple[Secret, Secret] | tuple[str, str] | list[str] | str | AWSAuth | None = ( |
There was a problem hiding this comment.
I guess that's fine to streamline, to be 100% accurrate better would be to also allow a callable/prototype with this signature (same as AWSAuth's call)
def __call__(
self,
method: str,
url: str,
body: Any = None,
headers: dict[str, str] | None = None,
) -> dict[str, str]:
There was a problem hiding this comment.
Makes sense, but we only support the explicitly handled http_auth types via _resolve_http_auth().
Adding a generic callable would be misleading unless we also pass it through at runtime (which we don't do in the current implementation), so I'd keep the type strict for now
tstadel
left a comment
There was a problem hiding this comment.
Left one small nit, to allow more custom auth (not relevant for platform).
Related Issues
Proposed Changes:
__init__but in_ensure_initializedHow did you test it?
CI, new unit tests
Notes for the reviewer
To be on the safe side, I'd release a major version.
However, I saw this comment: https://github.com/deepset-ai/haystack-private/issues/268#issuecomment-4055392995
WDYT?
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.