-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use 'version: PATH' for pyright-action #11743
Conversation
Uh, huh. I guess |
😐 |
We are using https://pypi.org/project/pyright/ which apparently installs pyright when it's invoked for the first time. If you don't want to parse that output in the action (that is, ignore all lines that don't look like
|
Yeah, running it twice was what I was thinking of doing, but it sure seems like a bit of a waste now that I'm seeing that the pyright PyPI package doesn't actually bundle pyright 😞 The parsing / pyright-action downloading will be faster than that... |
Honestly, I'm tempted to file a bug on the pyright PyPI package; this all should be piped to stderr. That or I did something wrong and am accidentally parsing stderr! |
It is outputting some garbage to stdout, and it's quite inconsistent about it:
|
Apparently it doesn't output any garbage to stdout if you pass
Now that I've looked at pyright-python's source code, I'll make a PR there :) |
This reverts commit 4cb769c.
I've updated the action to be a little more permissive when parsing versions, so it should be able to pull out the version even in mixed-output situations, and will retry the command if needed too. Of course, having |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Now that the feature exists, there's IMO no reason for us to parse the version like we did before.
Thanks @jakebailey! |
I've just updated
pyright-action
to be able to pullpyright
from$PATH
. This eliminates the need to parse out a pyright version, download, etc, of the environment already has it installed, which is the case for the workflows in this repo.https://github.com/jakebailey/pyright-action#using-pyright-from-path