[llvm] Configure pyright to the documented minimum python version (PR #162952)
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 27 11:10:32 PDT 2025
dsandersllvm wrote:
Sorry for the slow reply. I was going to suggest that we put a pyrightconfig.json in lldb/packages/Python but I didn't like the idea of adding lots of those files over the project and it turns out there's a better way.
pyright has an 'Execution environments' feature (https://microsoft.github.io/pyright/#/configuration?id=execution-environment-options) which allows you configure minimum python versions along with search paths and other configuration options differently in different parts of the project. I've used this to limit the setting to lldb/packages/Python
I've tried making a different minimum version apply to dap_server.py and that doesn't seem to be possible. pyright doesn't seem to like it when execution environments overlap (I consistently got the outer one) and it's not one of the settings that can be overridden with `# pyright: ...` comments. That might be ok though as (unless I missed it) I didn't see lldb-dap wanting a higher minimum than the rest of the lldb testing in that RFC thread.
https://github.com/llvm/llvm-project/pull/162952
More information about the llvm-commits
mailing list