Option for pyright --watch to print when it starts the run of an analysis? #9612
Closed
shivaal-mako
started this conversation in
Ideas
Replies: 2 comments
-
Have you tried the "--verbose" option? With this mode enabled, pyright will a message when a file system watcher event is received and processed. Verbose mode also includes other details, but you can ignore those. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks! I had looked at it before but it seems not closely enough, I guess I just needed to try harder. Thanks again for your help and this awesome library :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for building and maintaining pyright - it is an amazing library that has helped us a lot so far.
We run
pyright
as a precommit check which has gotten a little slow (10-15s) as our codebase has grown.I wanted to speed up this precommit check, and I've read the thread here: #4809 and understand that the best way to have cached runs of pyright is to have it running all the time in --watch mode. I've built a simple wrapper around
pyright --watch
where it runs in the background and outputs the latest results to a file (using the "Watching for file changes..." message to understand that the subsequent output will be from a new run).One issue we're running into is that if files are edited shortly before the precommit is run (sometimes from prior steps in the precommit itself), we have no way of invalidating the current saved output of pyright (in the file) and knowing that a run is currently in progress and we should wait for it.
My ask is: can there be an option (or perhaps just enabled in --watch mode) that prints something at the start of each run / when the watcher has detected file changes? This would make our pyright server implementation complete and be super appreciated. Thanks again
Beta Was this translation helpful? Give feedback.
All reactions