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

Use ruff over black in the root #112

Merged

Conversation

mikeweltevrede
Copy link
Contributor

PR Checklist

  • A description of the changes is added to the description of this PR.
  • [N/A] If there is a related issue, make sure it is linked to this PR.
  • [N/A] If you've fixed a bug or added code that should be tested, add tests!
  • [N/A] Documentation in docs is updated

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 astral-sh/ruff#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:

  • subprocess-without-shell-equals-true (S603): Ignored. Following the documentation, this is prone to false positives. Even though the rule is called "subprocess-without-shell-equals-true", passing shell=True does not fix the hook.
  • start-process-with-a-shell (S605): Ignored. This is a problem if we receive user input but we derive a path here from the OS. As such, no security risk.

Copy link

codecov bot commented Jul 2, 2024

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 ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #112   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       1           
  Lines          5       5           
=====================================
  Misses         5       5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fpgmaas
Copy link
Owner

fpgmaas commented Jul 2, 2024

Awesome, thanks @mikeweltevrede!

@fpgmaas fpgmaas merged commit 5d33920 into fpgmaas:main Jul 2, 2024
8 checks passed
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.

2 participants