-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for multi-line tables in pyproject.toml
#961
Comments
I'm not an expert in TOML and how tables work, but I ran into this problem in a project too. You can use the following syntax for this at the moment: [tool.ruff.per-file-ignores]
"tests/federation/printer/*" = ["E501"]
"tests/test_printer/test_basic.py" = ["E501"]
"tests/pyright/test_federation.py" = ["E501"]
"tests/test_printer/test_schema_directives.py" = ["E501"] It doesn't look to me like the PR your linked has been published under a new TOML version, so for now the spec doesn't allow these kinds of tables. |
ah! great suggestion!
didn't notice that! thanks for checking 😊 I'll close the issue for now then! |
It ain't pretty, but I like one section per tool. The following works, which is good enough for me.
|
I do have a few per-file ignores in my project[1]. Do you think it is possible to add support for multi-line tables?
This works:
This does not:
Error:
I get the same error in VS Code:
My understanding is that multi-line tables are supported by TOML: toml-lang/toml#904
but it's a relatively new feature :)
Anyway, I'm fine with having the ignores on one line, it's not a big deal, I opened the issue just in case it is easy to implement and for others that might stumble on the same problem :)
[1] https://github.com/strawberry-graphql/strawberry/pull/2367/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R196
The text was updated successfully, but these errors were encountered: