Skip to content

Commit

Permalink
pre-commit: update our dependencies (#179)
Browse files Browse the repository at this point in the history
* pre-commit: update our dependencies

I had to deal with `PYTHONPATH` again and also with `DJANGO_SETTINGS_MODULE`
this time. Mainly, I did this work because my PR at
readthedocs/readthedocs.org#10355 is failing and it
doesn't make sense.

This fixed my issue locally and I hope it fixes the issue on CircleCI as well.
Let's see.

* Update darker dependencies as well
  • Loading branch information
humitos authored Jun 13, 2023
1 parent acc68e5 commit 5e74b38
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fail_fast: false
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
# Disabled because yapf is better for our purpose
# - id: autopep8-wrapper
Expand Down Expand Up @@ -38,7 +38,7 @@ repos:
args: ['--fix=lf']

- repo: https://github.com/PyCQA/autoflake
rev: v1.7.7
rev: v2.1.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
Expand All @@ -51,30 +51,28 @@ repos:
# args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline']

- repo: https://github.com/akaihola/darker
rev: 1.3.2
rev: 1.7.1
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
- isort==5.12.0
- black==23.3.0
exclude: |
(?x)^(
readthedocs/rtd_tests/files/conf.py|
)$
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.10.0]

- repo: https://github.com/PyCQA/prospector
rev: 1.3.1
rev: 1.10.2
hooks:
- id: prospector
args:
Expand All @@ -92,7 +90,7 @@ repos:
# Because of an issue with pylint's Django utils and PATH environment, we add PYTHONPATH.
# This was used as a hack when running on Circle CI as well
# Once we upgrade to prospector >=1.9, we can remove it again.
entry: env PYTHONPATH=readthedocs prospector
entry: env PYTHONPATH=readthedocs:./ DJANGO_SETTINGS_MODULE=readthedocs.settings.test prospector
# We have to install the dependencies from an URL since we don't have access to this file easily from pre-commit
additional_dependencies:
- -r
Expand Down

0 comments on commit 5e74b38

Please sign in to comment.