* Resolve first round of linting errors in restapi.
This is a first step and only adds docstrings, etc. It doesn't refactor any
code.
Conflicts:
prospector-more.yml
readthedocs/restapi/views/model_views.py
* Reduce unused params.
In several cases, we can use the provided `request` rather than access `self`
(which could make these functions easier to test in isolation). In others, the
unused args could be folded into an unnamed kwarg param.
* Don't replace section variable.
This worked as intended, but only because the overridden section variable
would later evaluate to True. Using a different variable name makes this a bit
less error-prone.
* Minor docstring update
* Fix indent on docstring
* Punt on refactoring
* Fix call args
* Try unpinning testing reqs
* Bump up prospector higher level strictness
* Linting issues: arguments-differ, len-as-condition, redefined variables
* Remove unnecessary elses
This addresses no-else-return, which removes a `return` in an `else` after an
`if` that already has a `return`. This makes the default return more obvious in
most cases.
* Fix new linting issues with import order
Also, update travis and tox config for multiple versions of python
* Another fix on travis envs
* Add eslint using the airbnb config.
In an effort to make the JS consistent, this adds an ESLint gulp task. ESLint
is *very* configurable, and has no defaults. Instead, this reaches for
airbnb's legacy config (which covers ES5), which is one of the most popular
configurations. As a last step, it turns off all of the rules which currently
fail. We can turn them on piecemeal, or override the airbnb style to use a
different format.
Rules to prioritize (as they likely indicate bugs):
* "array-callback-return": "off",
* "eqeqeq": "off",
* "guard-for-in": "off",
* "no-inner-declarations": "off",
* "no-loop-func": "off",
* "no-mixed-operators": "off",
* "no-undef": "off",
* "no-use-before-define": "off",
* "one-var": "off",
* Lint frontend in Travis.
This adds an ESLint step to the CI service so we prevent unlinted code from
making its way in.
* Create an ESLint tox env.
By adding a tox env for eslint, we allow users to run it locally as part of
tox runs.
Thanks for the suggestion @ericholscher!
* Fix tox call to gulp lint task
* We don't need all dependecies to run 'tox -e lint'
* We don't really use pytest-django but it wouldn't hurt
setting --reuse-db
* coveralls doesn't seem to be working at the moment so
I removed it
* Delete unused runtests.sh. 'tox -e py27' already does
the same job.
* Cache all dependencies in Travis CI