diff --git a/prospector-more.yml b/prospector-more.yml new file mode 100644 index 00000000000..03bbcfe5550 --- /dev/null +++ b/prospector-more.yml @@ -0,0 +1,47 @@ +inherits: prospector + +strictness: medium + +ignore-paths: + - docs/ + - acl/ + - api/ + - betterversion/ + - bookmarks/ + - builds/ + - cdn/ + - comments/ + - core/ + - djangome/ + - doc_builder/ + - donate/ + - gold/ + - locale/ + - notifications/ + - oauth/ + - payments/ + - privacy/ + - profiles/ + - projects/ + - redirects/ + - restapi/ + - rtd/ + - rtd_tests/ + - search/ + - settings/ + - static/ + - tastyapi/ + - templates/ + - vcs_support/ + +pylint: + options: + docstring-min-length: 20 + dummy-variables-rgx: '_$|__$|dummy' + max-line-length: 100 + disable: + - logging-format-interpolation + - too-many-arguments + +pep257: + run: true diff --git a/prospector.yml b/prospector.yml index fa5412c873f..d7954f69b97 100644 --- a/prospector.yml +++ b/prospector.yml @@ -8,7 +8,7 @@ uses: - celery ignore-paths: - - docs + - docs/ ignore-patterns: - /migrations/ @@ -25,19 +25,15 @@ pylint: disable: - logging-format-interpolation -pyflakes: - disable: - - F999 - mccabe: run: false pep257: run: false disable: - - D105 - - D211 - - D104 + - D105 + - D211 + - D104 pyflakes: disable: diff --git a/readthedocs/constants.py b/readthedocs/constants.py index 263b1b2d873..03c2fa531b4 100644 --- a/readthedocs/constants.py +++ b/readthedocs/constants.py @@ -1,3 +1,5 @@ +"""Common constants""" + from readthedocs.builds.version_slug import VERSION_SLUG_REGEX from readthedocs.projects.constants import LANGUAGES_REGEX, PROJECT_SLUG_REGEX diff --git a/readthedocs/integrations/models.py b/readthedocs/integrations/models.py index 73159fd14fa..d0a0abcc4a4 100644 --- a/readthedocs/integrations/models.py +++ b/readthedocs/integrations/models.py @@ -75,6 +75,7 @@ def from_exchange(self, req, resp, related_object, payload=None): return obj def delete_limit(self, related_object, limit=10): + # pylint: disable=protected-access queryset = self.filter( content_type=ContentType.objects.get( app_label=related_object._meta.app_label, diff --git a/readthedocs/wsgi.py b/readthedocs/wsgi.py index 56fb75e8342..4e4b415c902 100644 --- a/readthedocs/wsgi.py +++ b/readthedocs/wsgi.py @@ -1,6 +1,8 @@ +"""WSGI application helper""" + import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.postgres") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "readthedocs.settings.dev") # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION diff --git a/tox.ini b/tox.ini index 4a58e992909..3206dd370ba 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,10 @@ commands = [testenv:lint] deps = -r{toxinidir}/requirements/lint.txt commands = + prospector \ + --profile-path={toxinidir} \ + --profile=prospector-more \ + --die-on-tool-error prospector \ --profile-path={toxinidir} \ --profile=prospector \