Skip to content

Commit e6da590

Browse files
authored
Install testing.txt requirements (#184)
* Install `testing.txt` requirements It has some extra dependencies that are required to run `prospector`. * Use `django-upgrade` pre-commit hook (#185) * Use `django-upgrade` pre-commit hook This will allow us to always use newer features intead of old ones. * Prospector: remove `PYTHONPATH` hack (#186) Prospector: remove PYTHONPATH hack
1 parent dfc1784 commit e6da590

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pre-commit-config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ repos:
5050
# - id: docformatter
5151
# args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline']
5252

53+
- repo: https://github.com/adamchainz/django-upgrade
54+
rev: "1.14.0"
55+
hooks:
56+
- id: django-upgrade
57+
args: [--target-version, "4.2"]
58+
5359
- repo: https://github.com/akaihola/darker
5460
rev: 1.7.1
5561
hooks:
@@ -87,12 +93,7 @@ repos:
8793
.*/tests/.*|
8894
.*/migrations/.*
8995
)$
90-
# Because of an issue with pylint's Django utils and PATH environment, we add PYTHONPATH.
91-
# This was used as a hack when running on Circle CI as well
92-
# Once we upgrade to prospector >=1.9, we can remove it again.
93-
entry: env PYTHONPATH=readthedocs:../readthedocs.org:./ DJANGO_SETTINGS_MODULE=readthedocs.settings.test prospector
94-
# We have to install the dependencies from an URL since we don't have access to this file easily from pre-commit
9596
additional_dependencies:
9697
- -r
97-
- https://raw.githubusercontent.com/readthedocs/readthedocs.org/main/requirements/pip.txt
98+
- https://raw.githubusercontent.com/readthedocs/readthedocs.org/main/requirements/testing.txt
9899

0 commit comments

Comments
 (0)