Merge pull request #37 from getsnoopy/fix-formatting
Fix some formatting issues
This commit is contained in:
commit
4fb444cb7e
|
|
@ -432,10 +432,10 @@ class Plane:
|
||||||
landed_time -= timedelta(seconds=time_since_contact.total_seconds())
|
landed_time -= timedelta(seconds=time_since_contact.total_seconds())
|
||||||
hours, remainder = divmod(landed_time.total_seconds(), 3600)
|
hours, remainder = divmod(landed_time.total_seconds(), 3600)
|
||||||
minutes, seconds = divmod(remainder, 60)
|
minutes, seconds = divmod(remainder, 60)
|
||||||
min_syntax = "Mins" if minutes > 1 else "Min"
|
min_syntax = "min"
|
||||||
if hours > 0:
|
if hours > 0:
|
||||||
hour_syntax = "Hours" if hours > 1 else "Hour"
|
hour_syntax = "h"
|
||||||
landed_time_msg = (f"Apx. flt. time {int(hours)} {hour_syntax}" + (f" : {int(minutes)} {min_syntax}. " if minutes > 0 else "."))
|
landed_time_msg = (f"Apx. flt. time {int(hours)} {hour_syntax}" + (f" {int(minutes)} {min_syntax}. " if minutes > 0 else "."))
|
||||||
else:
|
else:
|
||||||
landed_time_msg = (f"Apx. flt. time {int(minutes)} {min_syntax}.")
|
landed_time_msg = (f"Apx. flt. time {int(minutes)} {min_syntax}.")
|
||||||
self.takeoff_time = None
|
self.takeoff_time = None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue