fpgmaas / cookiecutter-poetry

A modern cookiecutter template for Python projects that use Poetry for dependency management
https://fpgmaas.github.io/cookiecutter-poetry/
MIT License
359 stars 55 forks source link

Use ruff over black in the root #112

Closed mikeweltevrede closed 2 months ago

mikeweltevrede commented 2 months ago

PR Checklist

Description of changes

Some issues we encountered in ruff were also encountered by @fpgmaas in this project, namely that with a nested project structure like this ruff picks up both pyproject.toml files and you get a "nested alternate groups are not allowed" error, see for instance https://github.com/astral-sh/ruff/issues/9381. This is solved by passing the --config flag so that ruff only looks at the pyproject.toml file in the root. I took the settings for ruff from {{cookiecutter.project_name}}/.pre-commit-config.yaml

/.pre-commit-config.yaml`.

For the two issues found by ruff, I made the following fixes:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (011f3cc) to head (e8ebf4f). Report is 1 commits behind head on main.

Files Patch % Lines
cookiecutter_poetry/cli.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #112 +/- ## ===================================== Coverage 0.00% 0.00% ===================================== Files 1 1 Lines 5 5 ===================================== Misses 5 5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fpgmaas commented 2 months ago

Awesome, thanks @mikeweltevrede!