Replies: 4 comments 1 reply
-
|
There are good reasons why pyright outputs absolute paths in its output. Even if this were a desirable change (which I think it is not), it would be relatively disruptive because of existing scripts that do diffs of pyright's output. If you prefer a different output format, you have the option of using the |
Beta Was this translation helpful? Give feedback.
-
|
As mentioned in #10312 I think it would be great to have a CLI option |
Beta Was this translation helpful? Give feedback.
-
|
For any other passers-by, I've taken to putting this script into my repositories as NOTE: this will do the wrong thing if your pwd has a comma or is short enough to be non-unique. |
Beta Was this translation helpful? Give feedback.
-
|
mypy seems to output relative paths |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I find that I've had to do this more than a few times to make pyright's output readable and/or suitable for a pastebin.
Would you consider a patch to make this the default behavior? I feel like I've even see a helper method somewhere to call
Path.relpathiff it shortens thePath, somewhere...Beta Was this translation helpful? Give feedback.
All reactions