Selectively employ one-liner conditionals for brevity.
This commit is contained in:
10
gitfiti.py
10
gitfiti.py
@ -336,10 +336,7 @@ def main():
|
|||||||
print('Enter the number of weeks to offset the image (from the left):')
|
print('Enter the number of weeks to offset the image (from the left):')
|
||||||
offset = request_user_input()
|
offset = request_user_input()
|
||||||
|
|
||||||
if not offset.strip():
|
offset = int(offset) if offset.strip() else 0
|
||||||
offset = 0
|
|
||||||
else:
|
|
||||||
offset = int(offset)
|
|
||||||
|
|
||||||
print((
|
print((
|
||||||
'By default gitfiti.py matches the darkest pixel to the highest\n'
|
'By default gitfiti.py matches the darkest pixel to the highest\n'
|
||||||
@ -353,10 +350,7 @@ def main():
|
|||||||
).format(max_commits(cal)))
|
).format(max_commits(cal)))
|
||||||
match = request_user_input()
|
match = request_user_input()
|
||||||
|
|
||||||
if match == 'gitfiti':
|
match = m if (match == 'gitfiti') else 1
|
||||||
match = m
|
|
||||||
else:
|
|
||||||
match = 1
|
|
||||||
|
|
||||||
print('enter file(s) to load images from (blank if not applicable)')
|
print('enter file(s) to load images from (blank if not applicable)')
|
||||||
img_names = request_user_input().split(' ')
|
img_names = request_user_input().split(' ')
|
||||||
|
Reference in New Issue
Block a user