Skip to content
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

Ruff formatter per file ignores problem #12459

Closed
nonoash opened this issue Jul 22, 2024 · 2 comments
Closed

Ruff formatter per file ignores problem #12459

nonoash opened this issue Jul 22, 2024 · 2 comments
Labels
configuration Related to settings and configuration

Comments

@nonoash
Copy link

nonoash commented Jul 22, 2024

Hi,

i'd like to setup different line lengths based on file extensions, for example default 120 and .ipynb 88
I know there is already a way for the linter with:
[tool.ruff.lint.per-file-ignores]

but thats for linting, is there something similar for the formatter or a way to fit my case? because i can't find infos on it or make it work with something like:

[tool.ruff]
line-length = 120

[tool.ruff.format.per-file-ignores]
"**/*.ipynb" = { line-length = 88 }

or

[tool.ruff]
line-length = 120

[tool.ruff.format.specific-files]
"**/*.ipynb" = { line-length = 88 }

I'm using Ruff v0.5.3 with native server,
Thanks.

@charliermarsh
Copy link
Member

Unfortunately we don't support this today, but it's tracked in #7696.

@charliermarsh
Copy link
Member

Merging into that issue.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
@charliermarsh charliermarsh added the configuration Related to settings and configuration label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration
Projects
None yet
Development

No branches or pull requests

2 participants