Improving code style
This commit is contained in:
parent
a69636ace2
commit
d29c980805
1 changed files with 5 additions and 5 deletions
|
@ -68,7 +68,7 @@ def get_env_variable(variable, fallback):
|
||||||
>>> os.environ['TEST'] = '13'
|
>>> os.environ['TEST'] = '13'
|
||||||
>>> get_env_variable("TEST", "14")
|
>>> get_env_variable("TEST", "14")
|
||||||
'13'
|
'13'
|
||||||
|
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return os.environ[variable]
|
return os.environ[variable]
|
||||||
|
@ -80,10 +80,10 @@ def get_env_variable(variable, fallback):
|
||||||
def get_highest_score():
|
def get_highest_score():
|
||||||
"""
|
"""
|
||||||
Will retrieve the result that has the highest score from the database.
|
Will retrieve the result that has the highest score from the database.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The score of the highest rated result else it raises an exception.
|
The score of the highest rated result else it raises an exception.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
LookupError if the database is empty.
|
LookupError if the database is empty.
|
||||||
"""
|
"""
|
||||||
|
@ -102,10 +102,10 @@ def get_highest_score():
|
||||||
def get_progress_bar_score(current):
|
def get_progress_bar_score(current):
|
||||||
"""
|
"""
|
||||||
Will compute the procent of the highest score compared to the current score.
|
Will compute the procent of the highest score compared to the current score.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
current - The result with the current score.
|
current - The result with the current score.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The computed score, if it's greater than %100 then returns 100.
|
The computed score, if it's greater than %100 then returns 100.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue