Skip to content

MAINT: fix ruff configuration in pyproject.toml#758

Merged
dnicolodi merged 1 commit intomesonbuild:mainfrom
rgommers:fix-ruff-config
May 31, 2025
Merged

MAINT: fix ruff configuration in pyproject.toml#758
dnicolodi merged 1 commit intomesonbuild:mainfrom
rgommers:fix-ruff-config

Conversation

@rgommers
Copy link
Copy Markdown
Contributor

This change fixes something that may be invalid TOML, aligns better with the docs at https://docs.astral.sh/ruff/configuration, and avoids Pixi choking on parsing pyproject.toml with:

  79 │ lint.extend-ignore = [
     · ──┬─
     ·   ╰── first defined here
  80 │   'B019',
  81 │ ]
...
  98 │
  99 │ [tool.ruff.lint.flake8-quotes]
     ·            ──┬─
     ·              ╰── duplicate defined here

This change fixes something that may be invalid TOML, aligns better with the
docs at https://docs.astral.sh/ruff/configuration, and avoids Pixi choking on
parsing `pyproject.toml` with:

```
  79 │ lint.extend-ignore = [
     · ──┬─
     ·   ╰── first defined here
  80 │   'B019',
  81 │ ]
...
  98 │
  99 │ [tool.ruff.lint.flake8-quotes]
     ·            ──┬─
     ·              ╰── duplicate defined here
```
@rgommers rgommers added the maintenance Regular code improvements that are not new features nor end-user-visible bugs label May 31, 2025
@dnicolodi
Copy link
Copy Markdown
Member

I'm quite sure this is a bug in pixi, as the supposedly duplicated key is as duplicated as before in the new spelling, but I don't see any drawback with the workaround.

@dnicolodi
Copy link
Copy Markdown
Member

I'm quite sure this is a bug in pixi because already before the recent changes that added the tool.ruff.lint.flake8-quotes section we had a tool.ruff.lint.isort section and AFAIK it didn't cause any issue.

@rgommers
Copy link
Copy Markdown
Contributor Author

Yeah looks like it. I had a look upstream, but no open issue yet as far as I can tell - I'll file a new one. Either way this seems slightly cleaner, and is a useful workaround.

@dnicolodi dnicolodi merged commit 3d03c9c into mesonbuild:main May 31, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Regular code improvements that are not new features nor end-user-visible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants