* 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
* Fix version sort order and add build_version block
* Properly sort version aware
* Include proper version sorting
* sort branches & whatnot below versions
* Fix docstring
This lints project code to medium strictness and conforms to pep257. This uses
some additional options to reduce false errors, which I'll add in a separate PR.
This should pass our normal linting without a problem, except the minor change
to unused variable name regex.
This adds `__` to the default list of `_` and `dummy*` for unused arguments. I
prefer the default of `_`, but that overlaps with the translation helper `_()`.
I'd be happy to rethink a scheme here.