Commit Graph

25 Commits (c27686e1f8c89f2c5a493ee328e904930095e8bc)

Author SHA1 Message Date
Manuel Kaufmann fd0b406217 Take preference of tags over branches to get stable version 2017-11-29 10:33:16 -05:00
Manuel Kaufmann 5adbdd1fae Improve docstrings and style 2017-11-28 19:45:18 -05:00
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
Hank Gay 027f734cc3 Make version-parsing code use only ASCII chars, in accordance with PEP 440. 2017-06-09 12:36:25 -04:00
Hank Gay dd6b5572b0 Remove unnecessary 'cast' to unicode string. 2017-06-09 11:11:01 -04:00
Hank Gay 6e8027b2a0 Clean up some import order issues. 2017-06-08 15:43:58 -04:00
Hank Gay 633877b428 Apply Eric's Unicode version-parsing fix. 2017-05-30 18:44:44 -04:00
Hank Gay 64116bc541 Make a pass with futurize on stage 2.
Depend on futurize.
2017-05-30 18:10:44 -04:00
Hank Gay f201d150dd Make a pass w/ python-modernize. 2017-05-30 17:55:56 -04:00
Eric Holscher 201bec3cc3 Force unicode on verison string 2017-03-30 14:37:53 -07:00
Eric Holscher bc879e1bf6 Fix unicode handling in version identifiers 2017-03-27 17:44:58 -07:00
Berker Peksag 5db8d6c7cc Fix usage of :py:class: directive (#2314) 2016-07-15 09:23:01 -07:00
Eric Holscher 013c81825f Fix version sort order and add build_version block (#2253)
* Fix version sort order and add build_version block

* Properly sort version aware

* Include proper version sorting

* sort branches & whatnot below versions

* Fix docstring
2016-06-08 16:46:20 -07:00
Josh Soref 65720336cf spelling fixes (#2231)
* spelling: aggressive

* spelling: appropriate

* spelling: acquire

* spelling: authenticated

* spelling: button

* spelling: capitalization

* spelling: comment

* spelling: comparison

* spelling: confirmation

* spelling: constraints

* spelling: detected

* spelling: implementation

* spelling: implement

* spelling: information

* spelling: language

* spelling: its

* spelling: means

* spelling: nonexistent

* spelling: notification

* spelling: occurrence

* spelling: operations

* spelling: precedence

* spelling: permutations

* spelling: programmatically

* spelling: recipients

* spelling: representation

* spelling: required

* spelling: repository

* spelling: should

* spelling: sibling

* spelling: specific

* spelling: supplementary

* spelling: surprises

* spelling: subscription

* spelling: utilities

* spelling: version
2016-06-02 12:18:14 -07:00
Eric Holscher e79a665d3e Add some unicode handling tests 2016-03-10 20:10:07 -08:00
Anthony Johnson 3fcf523598 Lint project code
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.
2015-08-21 17:30:56 -07:00
Eric Holscher b286263ed3 Automated import refactoring 2015-07-28 16:50:58 -07:00
Gregor Müllegger ec75ccd32f Adding determine_stable_version to isolate the logic for finding the stable version in a list of versions. 2015-07-02 20:12:58 +02:00
Gregor Müllegger bbf7754e26 Do not consider pre-releases as stable versions. 2015-07-02 20:12:57 +02:00
Gregor Müllegger 6da84fa6dc Fixing version manager to return actual version numbers, including the post release bits. 2015-07-02 20:12:57 +02:00
Gregor Müllegger 0b93aea463 Move project.utils.highest_version to project.version_handling.highest_version 2015-06-29 12:39:17 +02:00
Gregor Müllegger 4a95aaa82d Using compare function for sort_version_aware template tag that does not depend on the version model. 2015-06-29 12:35:33 +02:00
Gregor Müllegger 706401b05a Adjust version parsing in version_windows to use exceptions for catching bad version strings. 2015-06-29 12:32:24 +02:00
Gregor Müllegger 04bddcea1d Make implementation of highest_version more functional to make it easier to read. 2015-06-29 12:31:32 +02:00
Gregor Müllegger 524ec9dd27 Renaming betterversion.better to be projects.version_handling 2015-06-29 11:20:01 +02:00