Skip to content
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

Explicitly reexport all attributes meant as public #614

Open
sanmai-NL opened this issue Dec 17, 2024 · 0 comments
Open

Explicitly reexport all attributes meant as public #614

sanmai-NL opened this issue Dec 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sanmai-NL
Copy link
Contributor

Requested feature

Mypy configured strictly complains that some attributes, open for import by your users, aren't explicitly exported. This is a quality issue, since it muddies the boundary between public and non-public symbols/attributes.

src/app/data/unstructured/document/__init__.py:5: error: Module
"docling.datamodel.document" does not explicitly export attribute
"DoclingDocument"  [attr-defined]
    from docling.datamodel.document import DoclingDocument, SectionHeaderI...
    ^
src/app/data/unstructured/document/__init__.py:5: error: Module
"docling.datamodel.document" does not explicitly export attribute
"SectionHeaderItem"  [attr-defined]
    from docling.datamodel.document import DoclingDocument, SectionHeaderI...
    ^
src/app/data/unstructured/document/__init__.py:5: error: Module
"docling.datamodel.document" does not explicitly export attribute "TableItem" 
[attr-defined]
    from docling.datamodel.document import DoclingDocument, SectionHeaderI...
    ^
src/app/data/unstructured/document/__init__.py:5: error: Module
"docling.datamodel.document" does not explicitly export attribute "TextItem" 
[attr-defined]
    from docling.datamodel.document import DoclingDocument, SectionHeaderI...
    ^
src/app/data/unstructured/pipeline/documents/pipeline_documents.py:8: error:
Module "docling.datamodel.document" does not explicitly export attribute
"DoclingDocument"  [attr-defined]
    from docling.datamodel.document import ConversionResult, DoclingDocume...

Alternatives

Configuring Mypy to be more lax, reducing the benefits of this check. Since the solution is inexpensive and has no downsides, I prefer for it to be solved directly.

@sanmai-NL sanmai-NL added the enhancement New feature or request label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant