Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prospector dependencies #4149

Merged
merged 4 commits into from
May 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readthedocs/cdn/purge.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the astroid bug was fixed on a new release :)

pylint
prospector
pylint-django
pyflakes
maxcdn==0.0.7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thi dependency is also on deploy.txt, and if it's deleted all tests pass, not sure if we really need this here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, we aren't supporting maxcdn anymore, but we might have tests for it. This is related to #2091

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