Commit Graph

29 Commits (f64726c0104a3bd4e9b3c6e0e58f4e8294187e91)

Author SHA1 Message Date
Jigar 7239f4334c Cleaned up remaining code 2018-02-24 01:27:08 +05:30
Anthony accc01535c Finish linting on py3ish code (#2949)
* 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
2017-06-14 09:38:03 -07:00
Eric Holscher 6dd9e15c4a Update prospector-more.yml 2017-05-26 14:46:40 -07:00
Eric Holscher a6252bf070 Merge branch 'master' into lint-fix-donate 2017-05-26 14:46:21 -07:00
Eric Holscher 6c7ee46436 Merge pull request #2911 from rtfd/lint-core
Finish core app linting
2017-05-26 14:32:42 -07:00
CM Lubinski 47b62b2251 Fixup linting issues in the search module (#2884)
* 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.
2017-05-25 21:27:15 -07:00
Anthony 5aa7104396 Merge branch 'master' into lint-core 2017-05-25 16:43:47 -07:00
Daniel Pope c0a8bb728f Merge branch 'master' of github.com:rtfd/readthedocs.org into lint-fix-doc_builder 2017-05-23 16:43:32 -07:00
Daniel Pope 347a935514 Fix linter issues for doc_builder app 2017-05-23 16:41:45 -07:00
Daniel Pope 644d6705b4 Fix lint issues for redirects app (#2895) 2017-05-23 16:28:51 -07:00
Daniel Pope bb0dc13d8b Fix lint issues for readthedocs.projects app (#2893) 2017-05-23 16:26:11 -07:00
Daniel Pope bc52c37285 Fix lint issues for donate app 2017-05-23 14:40:18 -07:00
Daniel Pope df3d547ee2 Fix lint issues for privacy app (#2888)
* Fix lint issues for privacy app

* Rename file param to Syncers

* Roll back comment change
2017-05-23 10:59:10 -07:00
Daniel Pope a2cf44b43b Fix lint issues for notifications app (#2881) 2017-05-23 10:54:00 -07:00
smcoll beeb82cc96 linting for cdn module (#2878)
* linting for cdn module

* maybe better not change the function signature...
2017-05-23 10:47:03 -07:00
Daniel Pope 3974ed419c Add missing docstrings for profiles app (#2892) 2017-05-23 10:28:54 -07:00
CM Lubinski a26b0fbc08 Linting fixes for rtd_test module. (#2889) 2017-05-22 17:22:02 -07:00
smcoll b9f15d9172 linting for comments app (#2886) 2017-05-22 16:42:36 -07:00
Daniel Pope 7cc416a698 Remove unused import (#2883) 2017-05-22 16:39:45 -07:00
smcoll a9f9be2902 linting for the api module (#2870)
* linting for the api module

* restore positional arguments, even thought they're discarded, to accomodate potential current usages
2017-05-22 16:11:41 -07:00
shannon 943b17a9d8 first pass at linting core app 2017-05-22 16:01:27 -07:00
smcoll 73b8e76eeb linting for builds app (#2875) 2017-05-22 15:51:14 -07:00
CM Lubinski f1a8db6a05 Resolving linting issues in the settings module. (#2871) 2017-05-22 15:50:24 -07:00
Daniel Pope 0726e15de7 Add missing module docstrings for gold app (#2873) 2017-05-22 15:19:29 -07:00
smcoll 67978b6b73 lint bookmarks app (#2872) 2017-05-22 15:18:34 -07:00
Daniel Pope df52689e8e Fix lint errors for oauth app (#2869) 2017-05-22 15:01:12 -07:00
CM Lubinski 17048257ed Resolve linting issues in the vcs_support app. (#2868) 2017-05-22 14:59:35 -07:00
smcoll 31642afd95 remove several ignore paths, which either don't exist or aren't python modules (#2864) 2017-05-22 11:21:02 -07:00
Anthony Johnson 862d8a2c76
Add stricter linting to prospector as second pass 2017-03-21 11:39:00 -07:00