Skip to content

Some types are not exported #60

@Pita

Description

@Pita

Hi Reducto team,

Thanks for the great work on the library!

We’ve run into a small issue when trying to use some internal types like NotGiven, Headers, Query, and Body. Right now, we have to import them from reducto._types, which causes Pyright to throw type errors. To work around it, we're currently using # type: ignore, but it would be much cleaner and safer if these could be exported directly from the main reducto module (similar to how other types are exposed).

Here’s a quick example of what we’re doing:

from reducto._types import (  # type: ignore
    NOT_GIVEN,
    Body,
    Headers,
    NotGiven,
    Query,
)

# Used in a wrapper function like this:
async def extract_with_reducto(
    ...
    options: BaseProcessingOptions | NotGiven = NOT_GIVEN,
    ...
    extra_headers: Headers | None = None,
    ...
) -> ExtractResponse:

Would it be possible to make these types publicly available via the main module? It would help with cleaner type-checking and avoid the need for type: ignore.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions