|
Hi. I've read the docs about Library interface but I can't understand why isn't Consider first installing a third-party library like pip install pydantic==2.9.1Then asking # pyright: strict
import pydantic._migration
print(pydantic._migration.MOVED_IN_V2)Because I'm importing and using 0 errors, 0 warnings, 0 informations Is that intentional design? I understand that for unit tests within the library, it's preferable for library authors to be able to import a private module (and test some internal functions). But shouldn't this be forbidden for a library user? |
Replies: 2 comments
|
Pyright doesn't check for this currently, but I agree it would be a good feature enhancement. Converting the discussion into an issue to track this. |
|
There are some tools like flake8-self which try and do this, but none I can spot with the community momentum comparable to an established and popular type checker like this. |
Pyright doesn't check for this currently, but I agree it would be a good feature enhancement. Converting the discussion into an issue to track this.