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 only pre-commit for style linters and fixers #1535

Merged
merged 2 commits into from
Nov 24, 2021

Conversation

adamchainz
Copy link
Contributor

The method of using the Makefile, running under tox, duplicated the work of pre-commit and pre-commit.ci. Additionally tox did not use the same pinned versions and arguments as in .pre-commit-config.yaml, so there is the potential for a version clash to cause the two paths to conflict, e.g. when a new version of Black is released.

Sticking to only pre-commit seems sensible, saves some CI time, and allows some files to be removed.

The method of using the `Makefile`, running under `tox`, duplicated the work of pre-commit and pre-commit.ci. Additionally tox did not use the same pinned versions and arguments as in `.pre-commit-config.yaml`, so there is the potential for a version clash to cause the two paths to conflict, e.g. when a new version of Black is released.

Sticking to only `pre-commit` seems sensible, saves some CI time, and allows some files to be removed.
@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #1535 (636b5c0) into main (fe0db68) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1535   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files          35       35           
  Lines        1883     1883           
  Branches      274      274           
=======================================
  Hits         1614     1614           
  Misses        190      190           
  Partials       79       79           
Impacted Files Coverage Δ
debug_toolbar/settings.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe0db68...636b5c0. Read the comment docs.

@matthiask
Copy link
Member

Thanks! I like this very much. I always forgot how to run the Makefile commands anyway...

@matthiask matthiask merged commit 5665d68 into django-commons:main Nov 24, 2021
@adamchainz adamchainz deleted the style_check branch November 24, 2021 16:27
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