leforestier / yattag

Python library to generate HTML or XML in a readable, concise and pythonic way.
332 stars 31 forks source link

Add exports to _all__ #78

Closed KingAkeem closed 1 year ago

KingAkeem commented 1 year ago

Currently pyright is throwing this error in VSCode when attempting to import modules from yattag using from yattag import {module_name}. To remove this, __all__ can be used to explicitly define the intended exports.

https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportPrivateImportUsage

reportPrivateImportUsage [boolean or string, optional]: Generate or suppress diagnostics for use of a symbol from a "py.typed" module that is not meant to be exported from that module. The default value for this setting is "error".
leforestier commented 1 year ago

Thank you for your contribution. I uploaded your fix on pypi.

KingAkeem commented 1 year ago

Awesome, thanks for the review. @leforestier