* Organize logging levels
Log only what we need as ERROR when it's something that we need/want
to take a look that something could be a bug/issue.
There are some ERROR that were replaced by WARNING since they are some
failures but that we don't need to take a look and the message shown
to the user should be enough for them.
* Fix lint issues
* Use the proper exc_info instead of custom formatting
* 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
* Start of linting for search app.
* Combine several vars into a namedtuple.
Flake8 warned about using too many local vars. Combine that input into a
namedtuple and access the attributes from it.
* Remove unused argument.
* Split parse_sections function into two.
This uses `extend` as the logic currently allows documentation_type to include
both sphinx and mkdocs. If that doesn't make sense, let's simplify.
* Split process_file into a few functions.
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.