Skip to content

Commit 918d600

Browse files
authored
Fix linting issues for prospector 1.3.1 (#170)
Fix linting issues for prespector 1.3.1
1 parent f51a590 commit 918d600

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ repos:
6666
.*/tests/.*|
6767
.*/migrations/.*
6868
)$
69+
# Because of an issue with pylint's Django utils and PATH environment, we add PYTHONPATH.
70+
# This was used as a hack when running on Circle CI as well
71+
# Once we upgrade to prospector >=1.9, we can remove it again.
72+
entry: env PYTHONPATH=readthedocs prospector
6973
# We have to install the dependencies from an URL since we don't have access to this file easily from pre-commit
7074
additional_dependencies:
7175
- -r
7276
- https://raw.githubusercontent.com/readthedocs/readthedocs.org/main/requirements/pip.txt
73-
- flake8==3.8.4
7477

7578
- repo: https://github.com/akaihola/darker
7679
rev: 1.3.2

prospector.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
strictness: medium
1+
strictness: low
22

33
test-warnings: false
44
doc-warnings: true
55

66
uses:
7+
# We have issues with FKs as strings and failure with astroid
8+
# However, leaving out Django causes other linting issues
79
- django
810
- celery
911

@@ -26,11 +28,14 @@ pep8:
2628

2729
pylint:
2830
options:
31+
# Required for the Django plugin
32+
django-settings-module: readthedocs.settings.test
2933
docstring-min-length: 20
3034
dummy-variables-rgx: '_$|__$|dummy'
3135
max-line-length: 100
3236
disable:
3337
# We do this for circular imports
38+
- cyclic-import
3439
- import-outside-toplevel
3540
- inconsistent-return-statements
3641
# We need to adapt our isort config

0 commit comments

Comments
 (0)