mirror of
https://github.com/davegallant/rfd.git
synced 2025-08-07 00:58:14 +00:00
Python37 (#12)
* add dist: xenial * try travis fix with matrix include. * remove unnecessary elif
This commit is contained in:
11
.travis.yml
11
.travis.yml
@@ -1,16 +1,21 @@
|
|||||||
sudo: false
|
|
||||||
language: python
|
language: python
|
||||||
|
sudo: false
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
- "3.6"
|
- "3.6"
|
||||||
# - "3.7"
|
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- python: 3.7
|
||||||
|
dist: xenial
|
||||||
|
sudo: true
|
||||||
before_install:
|
before_install:
|
||||||
- "pip install -U pip"
|
- "pip install -U pip"
|
||||||
- "python setup.py install"
|
- "python setup.py install"
|
||||||
install:
|
install:
|
||||||
- pip install tox-travis
|
- pip install tox-travis
|
||||||
- pip install pytest==3.6.0
|
- pip install pytest
|
||||||
- pip install pylint
|
- pip install pylint
|
||||||
script:
|
script:
|
||||||
- tox
|
- tox
|
||||||
|
@@ -54,7 +54,7 @@ def calculate_score(post):
|
|||||||
def get_safe_per_page(limit):
|
def get_safe_per_page(limit):
|
||||||
if limit < 5:
|
if limit < 5:
|
||||||
return 5
|
return 5
|
||||||
elif limit > 40:
|
if limit > 40:
|
||||||
return 40
|
return 40
|
||||||
return limit
|
return limit
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ def get_terminal_width():
|
|||||||
def get_vote_color(score):
|
def get_vote_color(score):
|
||||||
if score > 0:
|
if score > 0:
|
||||||
return Fore.GREEN + " [+" + str(score) + "] "
|
return Fore.GREEN + " [+" + str(score) + "] "
|
||||||
elif score < 0:
|
if score < 0:
|
||||||
return Fore.RED + " [" + str(score) + "] "
|
return Fore.RED + " [" + str(score) + "] "
|
||||||
return Fore.BLUE + " [" + str(score) + "] "
|
return Fore.BLUE + " [" + str(score) + "] "
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user