Skip to content

Commit 862d8a2

Browse files
committed
Add stricter linting to prospector as second pass
1 parent ba644dd commit 862d8a2

File tree

6 files changed

+61
-9
lines changed

6 files changed

+61
-9
lines changed

prospector-more.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
inherits: prospector
2+
3+
strictness: medium
4+
5+
ignore-paths:
6+
- docs/
7+
- acl/
8+
- api/
9+
- betterversion/
10+
- bookmarks/
11+
- builds/
12+
- cdn/
13+
- comments/
14+
- core/
15+
- djangome/
16+
- doc_builder/
17+
- donate/
18+
- gold/
19+
- locale/
20+
- notifications/
21+
- oauth/
22+
- payments/
23+
- privacy/
24+
- profiles/
25+
- projects/
26+
- redirects/
27+
- restapi/
28+
- rtd/
29+
- rtd_tests/
30+
- search/
31+
- settings/
32+
- static/
33+
- tastyapi/
34+
- templates/
35+
- vcs_support/
36+
37+
pylint:
38+
options:
39+
docstring-min-length: 20
40+
dummy-variables-rgx: '_$|__$|dummy'
41+
max-line-length: 100
42+
disable:
43+
- logging-format-interpolation
44+
- too-many-arguments
45+
46+
pep257:
47+
run: true

prospector.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ uses:
88
- celery
99

1010
ignore-paths:
11-
- docs
11+
- docs/
1212

1313
ignore-patterns:
1414
- /migrations/
@@ -25,19 +25,15 @@ pylint:
2525
disable:
2626
- logging-format-interpolation
2727

28-
pyflakes:
29-
disable:
30-
- F999
31-
3228
mccabe:
3329
run: false
3430

3531
pep257:
3632
run: false
3733
disable:
38-
- D105
39-
- D211
40-
- D104
34+
- D105
35+
- D211
36+
- D104
4137

4238
pyflakes:
4339
disable:

readthedocs/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Common constants"""
2+
13
from readthedocs.builds.version_slug import VERSION_SLUG_REGEX
24
from readthedocs.projects.constants import LANGUAGES_REGEX, PROJECT_SLUG_REGEX
35

readthedocs/integrations/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def from_exchange(self, req, resp, related_object, payload=None):
7575
return obj
7676

7777
def delete_limit(self, related_object, limit=10):
78+
# pylint: disable=protected-access
7879
queryset = self.filter(
7980
content_type=ContentType.objects.get(
8081
app_label=related_object._meta.app_label,

readthedocs/wsgi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
"""WSGI application helper"""
2+
13
import os
24

3-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.postgres")
5+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "readthedocs.settings.dev")
46

57
# This application object is used by any WSGI server configured to use this
68
# file. This includes Django's development server, if the WSGI_APPLICATION

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ commands =
2121
[testenv:lint]
2222
deps = -r{toxinidir}/requirements/lint.txt
2323
commands =
24+
prospector \
25+
--profile-path={toxinidir} \
26+
--profile=prospector-more \
27+
--die-on-tool-error
2428
prospector \
2529
--profile-path={toxinidir} \
2630
--profile=prospector \

0 commit comments

Comments
 (0)