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

make check fails on Linting with ruff : Python 3.12.4 #115

Closed
keiser1080 opened this issue Jul 8, 2024 · 4 comments · Fixed by #116
Closed

make check fails on Linting with ruff : Python 3.12.4 #115

keiser1080 opened this issue Jul 8, 2024 · 4 comments · Fixed by #116
Assignees
Labels
bug Something isn't working

Comments

@keiser1080
Copy link

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. create a pyenv using python 3.12.4
  2. clone the repo
  3. make install
  4. make

Expected behavior
Linting with ruff

  • OS: e.g. Debian GNU/Linux 12 (bookworm)
  • Language Version: pyenv 3.12.4
  • Virtual environment: Poetry 1.8.3

Additional context

14:53:59 ❯ make check   
🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry check --lock
All set!
🚀 Linting code: Running pre-commit
check for case conflicts.................................................Passed
check for merge conflicts................................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
ruff.....................................................................Passed
ruff-format..............................................................Passed
prettier.................................................................Passed
🚀 Linting with ruff
error: Failed to parse `/home/nobody/GitHub/cookiecutter-poetry2/cookiecutter-poetry/pyproject.toml`: TOML parse error at line 82, column 12
   |
82 | [tool.ruff.lint]
   |            ^^^^
unknown field `lint`, expected one of `allowed-confusables`, `builtins`, `cache-dir`, `dummy-variable-rgx`, `exclude`, `extend`, `extend-exclude`, `extend-ignore`, `extend-select`, `external`, `fix`, `fix-only`, `fixable`, `format`, `force-exclude`, `ignore`, `ignore-init-module-imports`, `line-length`, `required-version`, `respect-gitignore`, `select`, `show-source`, `src`, `namespace-packages`, `target-version`, `task-tags`, `typing-modules`, `unfixable`, `update-check`, `flake8-annotations`, `flake8-bandit`, `flake8-bugbear`, `flake8-builtins`, `flake8-errmsg`, `flake8-quotes`, `flake8-tidy-imports`, `flake8-implicit-str-concat`, `flake8-import-conventions`, `flake8-pytest-style`, `flake8-unused-arguments`, `isort`, `mccabe`, `pep8-naming`, `pycodestyle`, `pydocstyle`, `pylint`, `pyupgrade`, `per-file-ignores`

make: *** [Makefile:44: check] Error 1

@keiser1080 keiser1080 added the bug Something isn't working label Jul 8, 2024
@fpgmaas
Copy link
Owner

fpgmaas commented Jul 8, 2024

Thanks for raising this! I see the issue; we have two different versions of ruff running simultaneously; one in the pre-commit hook and one through the virtual environment based upon the pyproject.toml. One of them is a bit older, so it does not recognize the new configuration with [tool.ruff.lint] yet.

We should remove one of the methods of using ruff, and make sure the one we keep uses the latest release of ruff. I dont have time to fix it now, but hopefully tomorrow :)

@keiser1080
Copy link
Author

thanks!

lastest ruff v 0.5.1 seems to work if you add the keyword "check"

ruff = "^0.0.235"

ruff = "^0.5.1"
@poetry run ruff hooks tests cookiecutter_poetry --config pyproject.toml

@poetry run ruff check hooks tests cookiecutter_poetry --config pyproject.toml

@fpgmaas fpgmaas linked a pull request Jul 9, 2024 that will close this issue
4 tasks
@fpgmaas
Copy link
Owner

fpgmaas commented Jul 9, 2024

Thanks again, should be solved now!

@keiser1080
Copy link
Author

Yes it work thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants