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

Regression, broken parsing of pyproject.toml #2920

Open
2 tasks done
akhmerov opened this issue Jan 15, 2025 · 2 comments
Open
2 tasks done

Regression, broken parsing of pyproject.toml #2920

akhmerov opened this issue Jan 15, 2025 · 2 comments
Assignees
Labels
💣 breaking Breaks something in the api or config 🐞 bug Something isn't working 🗒️ configuration Issue related to configuration of project or global behavior

Comments

@akhmerov
Copy link

akhmerov commented Jan 15, 2025

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

mkdir tmp && cd tmp
pixi self-update # Version 0.40.1
wget https://gitlab.kwant-project.org/qt/pymablock/-/raw/main/pyproject.toml
pixi install

Issue description

pyproject.toml file parsing seems broken in latest pixi.

The reproduction script above produces

Error: 
  × failed to parse project from tmp/pyproject.toml: duplicate key: `lint`

The same pyproject.toml used to be correctly parse by pixi ~0.39.0 😢

Expected behavior

Parsing works 😭 (no other tools complain about the file content)

@baszalmstra
Copy link
Contributor

This is caused by EmbarkStudios/toml-span#8 .

Ill see if I can fix it there!

@ruben-arts ruben-arts added 🐞 bug Something isn't working 💣 breaking Breaks something in the api or config 🗒️ configuration Issue related to configuration of project or global behavior labels Jan 16, 2025
@ruben-arts ruben-arts self-assigned this Jan 16, 2025
@baszalmstra
Copy link
Contributor

baszalmstra commented Jan 16, 2025

A workaround for the issue for now is to not use dotted syntax and table syntax at the same time:

[tool.ruff.lint]
extend-select = [
  "N",
  "D",
  "W",
  "I",
  "T10",
  "Q",
  "RSE",
  "RET",
  "TCH",
  "INT",
  "ARG",
  "R",
  "FLY",
  "RUF",
]
ignore = [
"N802",  # invalid-function-name
"N803",  # invalid-argument-name
"N806",  # non-lowercase-variable-in-function
]
fixable = ["ALL"]
unfixable = []

[tool.ruff.lint.extend-per-file-ignores]
"pymablock/block_diagonalization.py" = [
  "RET503",  # implicit-return
  "RET504",  # unnecessary-assign
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💣 breaking Breaks something in the api or config 🐞 bug Something isn't working 🗒️ configuration Issue related to configuration of project or global behavior
Projects
None yet
Development

No branches or pull requests

3 participants