Skip to content

Strange reportPrivateImportUsage Error #9260

Answered by erictraut
martinezlc99 asked this question in Q&A
Discussion options

You must be logged in to vote

This package is a "py.typed" library, which means standard-compliant type checkers like pyright follow these rules when determining whether a symbol is public or private.

In this case, the get_model symbol is not publicly exported from the robot.api.parsing submodule. If the library authors had intended for it to be publicly exported from this submodule, they would have needed to use a redundant import form (from robot.parsing import get_model as get_model) or include "get_model" in an __all__ definition.

I'm not able to reproduce a change in behavior by removing parentheses around the imports in robot.api.__init__.py. I agree that the presence or absence of parens should not affect this …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@martinezlc99
Comment options

@martinezlc99
Comment options

@erictraut
Comment options

Answer selected by martinezlc99
@martinezlc99
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants