Skip to content

Organize pre-commit setup#757

Merged
rochacbruno merged 3 commits intodynaconf:masterfrom
johnnv1:organize/pre-commit
Jun 6, 2022
Merged

Organize pre-commit setup#757
rochacbruno merged 3 commits intodynaconf:masterfrom
johnnv1:organize/pre-commit

Conversation

@johnnv1
Copy link
Copy Markdown
Contributor

@johnnv1 johnnv1 commented Jun 3, 2022

Hi, i take a look at pre-commit config and think some things can be updated to be more clean/organized

The changes:

  • at 3eb1d53
    • all hooks have been using the same exclude pattern, just move to the global config
    • all hooks have been using the same language_version, just move to the global config
    • reorder the hooks
    • move the args of flake8 to setup.cfg
    • At make file, remove the setup-pre-commit because the pre-commit will install by default in the first run.
    • At make file, also remove the find command in the run command to just use --all-files and keeps the ignore files for the pre-commit (maybe can be used just pre-commit run here)
  • at 4a2c5ab
    • fix the file with the hook
  • at 08e5539
    • just update the hooks version with pre-commit autoupdate

Maybe for other PR the pyupgrade hook can be added to pre-commit to upgrade syntax for newer versions. That can also be used with from __future__ import annotations at reorder-python-imports to update the type annotations.

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.1.0
hooks:
  - id: reorder-python-imports
    args: [--py37-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
  - id: pyupgrade
    args: [--py37-plus]

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 3, 2022

Codecov Report

Merging #757 (08e5539) into master (82d083d) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #757   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         1748      1748           
=========================================
  Hits          1748      1748           

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 82d083d...08e5539. Read the comment docs.

@rochacbruno rochacbruno merged commit 6f0aa9d into dynaconf:master Jun 6, 2022
rochacbruno added a commit that referenced this pull request Jun 6, 2022
Shortlog of commits since last release:

    Bruno Rocha (4):
          Release version 3.1.8
          Bye py 3.7
          Multiple fixes for 3.19 (#756)
          update docs site (#758)

    João Gustavo A. Amorim (1):
          Organize pre-commit setup (#757)

    dependabot[bot] (1):
          Bump django from 2.2.27 to 2.2.28 in /example/django_pytest_pure (#743)
@johnnv1 johnnv1 mentioned this pull request Jun 8, 2022
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