fix typings by resolving exports#1731
Merged
RobinPicard merged 4 commits intodottxt-ai:mainfrom Aug 23, 2025
Merged
Conversation
Contributor
Author
the-vampiire
commented
Aug 20, 2025
RobinPicard
reviewed
Aug 22, 2025
Contributor
RobinPicard
left a comment
There was a problem hiding this comment.
Thanks a lot! There's just the issue in the workflow with building the documentation to fix before merging.
Contributor
Author
the-vampiire
commented
Aug 22, 2025
RobinPicard
reviewed
Aug 22, 2025
Contributor
|
Unrelated to this PR: is there somewhere we could discuss about the Langextract plugin @the-vampiire? I'm fine with LinkedIn, Telegram, Discord... up to you |
Contributor
Author
|
i think its ready now. @RobinPicard ya that would be great. i'm on the .txt discord. what is your username i will send you a dm |
RobinPicard
approved these changes
Aug 23, 2025
c6a2cb7 to
24ed9bc
Compare
Contributor
|
Awesome! My username is vrepo54 |
Contributor
Author
|
nice glad i don't have to install my fork anymore lol. i dmd you on discord |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




fix typing structure for better type checking and ide support
this pr improves the typing structure across the outlines library by adding explicit
__all__declarations to packages and converting root imports to proper re-exports.closes #1730
changes made
added
__all__lists to all packagesoutlines/backends/- exports backend classes, constants, and public functionsoutlines/models/- exports all model classes, factory functions, and type unionsoutlines/types/- exports dsl functions, regex types, and submodules (cleaned up third-party re-exports)outlines/types/locale/- exports locale submodulesoutlines/processors/- exports processor classesoutlines/processors/tensor_adapters/- exports tensor adapter classesfixed root
outlines/__init__.py__all__list entirely (including undefinedpromptreference)import x as xpattern:import outlines.grammars→from outlines import grammars as grammarsimport outlines.inputs→from outlines import inputs as inputsimport outlines.processors→from outlines import processors as processorsimport outlines.types→from outlines import types as typesfromimports and wildcard models import unchangedcleaned up inappropriate re-exports
outlines/types/__init__.py(pydantic, jsonschema, etc.)__all__declarations after imports following pep 8 conventionstesting results
passed
skipped/expected failures
llama_model_get_vocab(unrelated to typing changes)benefits
the typing structure now properly declares what each package exports, making it easier for type checkers and ides to understand the public api while keeping all existing functionality intact.