Skip to content

Enable running pyright with older versions #37

@ItsDrike

Description

@ItsDrike

When there's a new version of pyright available, running pyright checker will produce a warning and end with non-zero exit code:

image

While this warning is helpful in letting users know that there's a newer version and they should update, this makes it very hard to use pyright-python in an automated way, since it'd require explicitly setting PYRIGHT_PYTHON_FORCE_VERSION environment variable to the version of pyright we want to use (i.e. the version of the pyright-python package we have installed) which we'd need to be obtaining manually.

I think that while this warning is helpful and it should stay there, it really shouldn't block pyrighr completely and cause non-zero exit code. This is simply necessary because even though repositories should be updating their dependencies, not all repos can be expected to simply update the minute a new version comes out, realistically it will take a while for the repo to update, and during that time, all CI tests would be failing everywhere, since pyright-python doesn't even allow running old pyright versions, unless specified explicitly, even though it is versioned to represent which pyright version should it install and run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions