Skip to content

Commit

Permalink
Merge pull request #4149 from stsewd/fix-prospector-deps
Browse files Browse the repository at this point in the history
Fix prospector dependencies
  • Loading branch information
ericholscher committed May 29, 2018
2 parents 911bd90 + bb165b8 commit c6ce437
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions readthedocs/cdn/purge.py
Expand Up @@ -21,6 +21,7 @@ def chunks(in_list, chunk_size):
for i in range(0, len(in_list), chunk_size):
yield in_list[i:i + chunk_size]


if CDN_USERNAME and CDN_KEY and CDN_SECRET and CDN_SERVICE == 'maxcdn':
from maxcdn import MaxCDN
api = MaxCDN(CDN_USERNAME, CDN_KEY, CDN_SECRET)
Expand Down
Expand Up @@ -44,7 +44,7 @@ def handle(self, *args, **options):
log.info("Reindexing %s", version)
try:
commit = version.project.vcs_repo(version.slug).commit
except: # pylint: disable=bare-except
except: # noqa
# An exception can be thrown here in production, but it's not
# documented what the exception here is
commit = None
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/middleware.py
Expand Up @@ -114,7 +114,7 @@ def process_request(self, request):
log.debug(LOG_TEMPLATE.format(
msg='CNAME detected: %s' % request.slug,
**log_kwargs))
except:
except: # noqa
# Some crazy person is CNAMEing to us. 404.
log.exception(LOG_TEMPLATE.format(msg='CNAME 404', **log_kwargs))
raise Http404(_('Invalid hostname'))
Expand Down
1 change: 1 addition & 0 deletions readthedocs/core/validators.py
Expand Up @@ -46,6 +46,7 @@ def __call__(self, value):
raise exc
super(DomainNameValidator, self).__call__(idnavalue)


validate_domain_name = DomainNameValidator()


Expand Down
2 changes: 1 addition & 1 deletion readthedocs/doc_builder/environments.py
Expand Up @@ -672,7 +672,7 @@ def __enter__(self):

try:
self.create_container()
except: # pylint: disable=broad-except
except: # noqa
self.__exit__(*sys.exc_info())
raise
return self
Expand Down
1 change: 1 addition & 0 deletions readthedocs/gold/admin.py
Expand Up @@ -11,4 +11,5 @@ class GoldAdmin(admin.ModelAdmin):
list_display = ('user', 'level', 'modified_date', 'subscribed')
list_filter = ('level',)


admin.site.register(GoldUser, GoldAdmin)
1 change: 1 addition & 0 deletions readthedocs/redirects/admin.py
Expand Up @@ -10,4 +10,5 @@ class RedirectAdmin(admin.ModelAdmin):
list_display = ['project', 'redirect_type', 'from_url', 'to_url']
raw_id_fields = ('project',)


admin.site.register(Redirect, RedirectAdmin)
3 changes: 1 addition & 2 deletions readthedocs/search/parse_json.py
Expand Up @@ -35,8 +35,7 @@ def process_all_json_files(version, build_dir=True):
if result:
page_list.append(result)
# we're unsure which exceptions can be raised
# pylint: disable=bare-except
except:
except: # noqa
pass
return page_list

Expand Down
3 changes: 1 addition & 2 deletions readthedocs/search/utils.py
Expand Up @@ -290,8 +290,7 @@ def parse_mkdocs_sections(content):
'content': h2_content,
}
# we're unsure which exceptions can be raised
# pylint: disable=bare-except
except:
except: # noqa
log.exception('Failed indexing')


Expand Down
15 changes: 7 additions & 8 deletions requirements/lint.txt
@@ -1,9 +1,8 @@
-r pip.txt
maxcdn
# astroid 1.6.2 breaks pylint-django
# https://github.com/PyCQA/pylint-django/issues/117
astroid==1.6.1
pylint
prospector
pylint-django
pyflakes
maxcdn==0.0.7
astroid==1.6.4
pylint==1.9.1
pylint-django==0.11.1
pylint-celery==0.3
prospector==0.12.10
pyflakes==2.0.0

0 comments on commit c6ce437

Please sign in to comment.