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

[pre-commit.ci] pre-commit autoupdate #3214

Merged
merged 2 commits into from Feb 5, 2024
Merged

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Feb 5, 2024

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.0](astral-sh/ruff-pre-commit@v0.1.14...v0.2.0)
@gaborbernat gaborbernat merged commit 3347933 into main Feb 5, 2024
23 of 25 checks passed
@gaborbernat gaborbernat deleted the pre-commit-ci-update-config branch February 5, 2024 20:13
@0cjs
Copy link
Contributor

0cjs commented Feb 6, 2024

Umm....this commit fails the -e fix checks:

ruff.....................................................................Failed
- hook id: ruff
- exit code: 1

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'isort' -> 'lint.isort'
  - 'per-file-ignores' -> 'lint.per-file-ignores'
src/tox/config/set_env.py:23:9: PLR1702 Too many nested blocks (6 > 5)
src/tox/session/cmd/run/common.py:313:5: PLR1702 Too many nested blocks (6 > 5)
src/tox/session/cmd/run/common.py:313:5: PLR1702 Too many nested blocks (6 > 5)
src/tox/session/env_select.py:250:9: PLR1702 Too many nested blocks (8 > 5)
Found 4 errors.

0cjs added a commit to 0cjs/tox that referenced this pull request Feb 6, 2024
…oken

The top-level linter setting names in pyproject.toml have changed, and
while this _could_ accept the old names until they're fixed, it choses not
to and fails the build.

Fixing that is easy, but results in yet more failures that were not
previously appearing in unchanged code.

- Revert "[pre-commit.ci] pre-commit autoupdate (tox-dev#3214)"
- This reverts commit 3347933.
@0cjs
Copy link
Contributor

0cjs commented Feb 6, 2024

The four complaints we get if we fix the ignorelint.ignore etc. issues above are:

src/tox/config/set_env.py:23:9: PLR1702 Too many nested blocks (6 > 5)
src/tox/session/cmd/run/common.py:313:5: PLR1702 Too many nested blocks (6 > 5)
src/tox/session/cmd/run/common.py:313:5: PLR1702 Too many nested blocks (6 > 5)
src/tox/session/env_select.py:250:9: PLR1702 Too many nested blocks (8 > 5)

I have to say that (unusually for me) I agree with the robot on all of these: they are rather hard to follow due to the nesting. The first one can be relatively trivially fixed to keep the robot quiet (and it becomes slightly easier to read), but the rest are code that seems deeply convoluted enough that there's no obvious fix (at least to me) that makes it better.

0cjs added a commit to 0cjs/tox that referenced this pull request Feb 6, 2024
tool.ruff.{select,isort,ignore,per-file-ignores} will soon be deprecated in
favour of putting these under tool.ruff.lint. (See reverted PR tox-dev#3214 for
the complaint that appears in a more recent version of ruff.) Change these
now to avoid complaints later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants