You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use the --verifytypes option on a submodule of a Python project. This works, except that the Public modules section contains a series of errors that indicates that pyright tried to resolve other submodules of the same project against the selected submodule.
Concretely, the project in question is prefect, where I wanted to validate their public SDK package prefect.main; the command line used is pyright --verifytypes prefect.main, and the resulting public modules section output is:
Public modules: 1
prefect.main
error: Could not resolve module "prefect.main.blocks"
error: Could not resolve module "prefect.main.cli"
error: Could not resolve module "prefect.main.cli.cloud"
error: Could not resolve module "prefect.main.client"
error: Could not resolve module "prefect.main.client.schemas"
error: Could not resolve module "prefect.main.client.types"
error: Could not resolve module "prefect.main.concurrency"
error: Could not resolve module "prefect.main.concurrency.v1"
error: Could not resolve module "prefect.main.deployments"
error: Could not resolve module "prefect.main.deployments.steps"
error: Could not resolve module "prefect.main.docker"
error: Could not resolve module "prefect.main.events"
error: Could not resolve module "prefect.main.events.cli"
error: Could not resolve module "prefect.main.events.schemas"
error: Could not resolve module "prefect.main.infrastructure"
error: Could not resolve module "prefect.main.infrastructure.provisioners"
error: Could not resolve module "prefect.main.input"
error: Could not resolve module "prefect.main.locking"
error: Could not resolve module "prefect.main.logging"
error: Could not resolve module "prefect.main.records"
error: Could not resolve module "prefect.main.runner"
error: Could not resolve module "prefect.main.runtime"
error: Could not resolve module "prefect.main.server"
error: Could not resolve module "prefect.main.server.api"
error: Could not resolve module "prefect.main.server.api.ui"
error: Could not resolve module "prefect.main.server.database"
error: Could not resolve module "prefect.main.server.events"
error: Could not resolve module "prefect.main.server.events.models"
error: Could not resolve module "prefect.main.server.events.schemas"
error: Could not resolve module "prefect.main.server.events.services"
error: Could not resolve module "prefect.main.server.events.storage"
error: Could not resolve module "prefect.main.server.models"
error: Could not resolve module "prefect.main.server.orchestration"
error: Could not resolve module "prefect.main.server.schemas"
error: Could not resolve module "prefect.main.server.services"
error: Could not resolve module "prefect.main.server.utilities"
error: Could not resolve module "prefect.main.server.utilities.messaging"
error: Could not resolve module "prefect.main.server.utilities.schemas"
error: Could not resolve module "prefect.main.settings"
error: Could not resolve module "prefect.main.settings.models"
error: Could not resolve module "prefect.main.settings.models.server"
error: Could not resolve module "prefect.main.telemetry"
error: Could not resolve module "prefect.main.testing"
error: Could not resolve module "prefect.main.testing.standard_test_suites"
error: Could not resolve module "prefect.main.types"
error: Could not resolve module "prefect.main.utilities"
error: Could not resolve module "prefect.main.utilities.schema_tools"
error: Could not resolve module "prefect.main.workers"
The rest of the report is still extremely useful and as far as I am aware, correct.
The --verifytypes command is intended to be run on an installed library. It appears that you've attempted to run the command on the repo for the library rather than in its installed form.
I tried installing prefect using pip install prefect. Then I ran pyright --verifytypes prefect, and it seemed to work fine for me. I don't see any of the above errors.
I'm going to close the issue because I think that pyright is working correctly. If I misunderstood the issue or missed something, let me know.
I tried installing prefect using pip install prefect. Then I ran pyright --verifytypes prefect, and it seemed to work fine for me. I don't see any of the above errors.
[...]
If I misunderstood the issue or missed something, let me know.
That's not the right reproducer.
I didn't run the command in the repository, I used pip install and ran pyright on the installed prefect.main package, so a specific package inside the prefect library. In short, run pyright --verifytypes prefect.main.
I tried to use the
--verifytypes
option on a submodule of a Python project. This works, except that the Public modules section contains a series of errors that indicates that pyright tried to resolve other submodules of the same project against the selected submodule.Concretely, the project in question is
prefect
, where I wanted to validate their public SDK packageprefect.main
; the command line used ispyright --verifytypes prefect.main
, and the resulting public modules section output is:The rest of the report is still extremely useful and as far as I am aware, correct.
Reproduce with:
Context
The text was updated successfully, but these errors were encountered: