Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Mar 2, 2022
1 parent 37f95f5 commit 7a82ab0
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 3 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml

This file was deleted.

77 changes: 77 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
exclude: '^$|settings|scripts'
fail_fast: false
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
# Disabled because yapf is better for our purpose
# - id: autopep8-wrapper
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-vcs-permalinks
- id: debug-statements
- id: fix-byte-order-marker
- id: end-of-file-fixer
exclude: 'static'
- id: fix-encoding-pragma
args: ['--remove']
- id: check-merge-conflict
- id: check-symlinks
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix=lf']

- repo: https://github.com/humitos/mirrors-autoflake.git
rev: v1.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']

# TODO: re-enable it and use `--range` to select the modified lines
# - repo: https://github.com/myint/docformatter.git
# rev: v1.4
# hooks:
# - id: docformatter
# args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline']

# TODO: re-enable when we can make it behave in the same way than in CircleCI
# - repo: https://github.com/PyCQA/prospector
# rev: 1.3.1
# hooks:
# - id: prospector
# args: ['--profile=/home/humitos/rtfd/code/readthedocs.org/prospector.yml']
# additional_dependencies: [
# # TODO: use an environment variable to decide this PATH here?
# '-r/home/humitos/rtfd/code/readthedocs.org/requirements/lint.txt',
# ]
# # NOTE: copied from prospector YAML configuration because pre-commit does
# # not load them from there and runs prospector over these files
# exclude: |
# (?x)^(
# docs/.*|
# readthedocs/settings/.*|
# common/.*|
# readthedocs/rtd_tests/.*|
# readthedocs/.*tests.*/.*|
# .*/migrations/.*|
# .*conftest.py
# )$

- repo: https://github.com/akaihola/darker
rev: 1.3.2
hooks:
- id: darker
# TODO: find a way to pass `--check` only when running via `tox -e
# pre-commit`
args: ['--isort']
additional_dependencies:
- isort==5.10.1
# darker is not compatible with v22.1.0
# https://github.com/akaihola/darker/issues/264
- black==21.12b0
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Version 7.1.0
Version 7.0.0
-------------

This is our 7th major version! This is because we are upgrading to **Django 3.2 LTS**.
This is our 7th major version! This is because we are upgrading to **Django 3.2 LTS**.

:Date: January 17, 2022

Expand Down Expand Up @@ -343,7 +343,7 @@ Version 6.0.0

This release includes the upgrade of some base dependencies:

- Python version from 3.6 to 3.8
- Python version from 3.6 to 3.8
- Ubuntu version from 18.04 LTS to 20.04 LTS

Starting from this release, all the Read the Docs code will be tested and QAed on these versions.
Expand Down

0 comments on commit 7a82ab0

Please sign in to comment.