Open Stealthii opened 19 hours ago
Pyright is currently using a toml parser that targets toml 0.5.0. It looks like the toml standard has evolved since 0.5.0, so we may need to adopt a new parser library. This carries risk with it, as there are likely to be new bugs in other libraries.
This library claims to support toml 1.0.0, and it has a fair amount of usage — although not as much as the library that pyright is currently using.
I'll need to do some additional investigation and consider the pros and cons of switching to a new toml parser library.
In the meantime, you can use pyright's native configuration file format "pyrightconfig.json" if you want to use newer syntax in your pyproject.toml file.
Thanks @erictraut. I can confirm that pyright with the presence of a "pyrightconfig.json" file, no longer makes attempts to parse "pyproject.toml" and will function correctly.
Describe the bug Utilizing any list in TOML that contains a mix of strings, and dictionaries (such as Tox's modern TOML format specification, or dependency-groups includes) will result in pyright being unable to read the configuration file.
Code or Screenshots Consider the following, TOML 1.0.0 compliant,
dependency-groups
section of a pyproject.toml:VS Code extension or command-line
Lines 133-137, for reference: