Skip to content

Commit

Permalink
Comment improvements.
Browse files Browse the repository at this point in the history
- Minor comment improvements.
  • Loading branch information
Matthew1471 committed Oct 18, 2017
1 parent e55e1bc commit c0fd07b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions python/zoe-console.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
else:
pluggedText = u'Unplugged'

# We allow the My Renault section to fail gracefully.
# We allow the MY Renault section to fail gracefully.
totalMileage = 0

# Go looking for the specific VIN we have requested.
Expand All @@ -68,13 +68,14 @@

# Check the Windows console can display UTF-8 characters.
if sys.platform != 'win32' or locale.getpreferredencoding() == 'cp65001':
# Generate the status.
# Generate the UTF-8 status (with emojis).
status = u'\n🔋 ' + str(battery) + '%'
status += u'\n🚗 ' + str('%.0f' % round(remaining_range)) + ' miles'
status += u'\n🔌 ' + pluggedText
status += u'\n⚡ ' + chargingText
if totalMileage > 0: status += u'\n🛣️ ' + str(totalMileage) + ' miles (since ' + lastMileageRefresh + ')'
else:
# Generate the ASCII standard text status.
status = u'\nBattery: ' + str(battery) + '%'
status += u'\nRange: ' + str('%.0f' % round(remaining_range)) + ' miles'
status += u'\nPlugged In: ' + pluggedText
Expand Down
6 changes: 4 additions & 2 deletions python/zoe-tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
else:
pluggedText = u'Unplugged'

# We allow the My Renault section to fail gracefully.
# We allow the MY Renault section to fail gracefully.
totalMileage = 0

# Go looking for the specific VIN we have requested.
Expand All @@ -83,8 +83,10 @@

# Check the Windows console can display UTF-8 characters.
if sys.platform != 'win32' or locale.getpreferredencoding() == 'cp65001':
# Display the UTF-8 status (with emojis).
print(status)
else:
# Generate an ASCII standard text status.
altstatus = u'\nBattery: ' + str(battery) + '%'
altstatus += u'\nRange: ' + str('%.0f' % round(remaining_range)) + ' miles'
altstatus += u'\nPlugged In: ' + pluggedText
Expand All @@ -95,7 +97,7 @@

# Check if a Twitter library is installed.
if tweepy is not None:
# Set Up Twitter
# Set up Twitter
twitter_access_token = credentials['twitter_access_token']
twitter_access_token_secret = credentials['twitter_access_token_secret']
twitter_consumer_key = credentials['twitter_consumer_key']
Expand Down

0 comments on commit c0fd07b

Please sign in to comment.