#!/usr/bin/env python
# coding=utf-8
SECONDS_IN_MINUTE = 60
MINUTES_IN_HOUR = 60
SECONDS_IN_HOUR = SECONDS_IN_MINUTE * MINUTES_IN_HOUR
HOURS_IN_DAY = 24
MINUTES_IN_DAY = MINUTES_IN_HOUR * HOURS_IN_DAY
SECONDS_IN_DAY = MINUTES_IN_DAY * SECONDS_IN_MINUTE
DAYS_IN_WEEK = 7
HOURS_IN_WEEK = HOURS_IN_DAY * DAYS_IN_WEEK
MINUTES_IN_WEEK = HOURS_IN_WEEK * MINUTES_IN_HOUR
SECONDS_IN_WEEK = MINUTES_IN_WEEK * SECONDS_IN_MINUTE
MONTHS_IN_YEAR = 12
DAYS_OF_COMMON_YEAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
DAYS_OF_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]


class Unit:
    """"Enumeration of supported time units."""
    SECOND  = 'second'
    MINUTE  = 'minute'
    HOUR    = 'hour'
    DAY     = 'day'
    WEEK    = 'week'
    MONTH   = 'month'
    YEAR    = 'year'


# Order of places in time representation
UNIT_ORDER = {
    Unit.SECOND: 1,
    Unit.MINUTE: 2,
    Unit.HOUR: 3,
    Unit.DAY: 4,
    Unit.WEEK: 5,
    Unit.MONTH: 6,
    Unit.YEAR: 7
}

@@ -48,16 +48,18 @@
 _MINUTE 
+  
 = 60%0AMIN
@@ -71,16 +71,20 @@
 IN_HOUR 
+    
 = 60%0ASEC
@@ -96,16 +96,20 @@
 IN_HOUR 
+    
 = SECOND
@@ -151,16 +151,23 @@
 _IN_DAY 
+       
 = 24%0AMIN
@@ -170,32 +170,37 @@
 %0AMINUTES_IN_DAY 
+     
 = MINUTES_IN_HOU
@@ -231,16 +231,21 @@
 _IN_DAY 
+     
 = MINUTE
@@ -286,16 +286,23 @@
 IN_WEEK 
+       
 = 7%0AHOUR
@@ -303,32 +303,38 @@
 7%0AHOURS_IN_WEEK 
+      
 = HOURS_IN_DAY *
@@ -363,16 +363,20 @@
 IN_WEEK 
+    
 = HOURS_
@@ -417,16 +417,20 @@
 IN_WEEK 
+    
 = MINUTE
@@ -474,16 +474,21 @@
 IN_YEAR 
+     
 = 12%0ADAY
@@ -569,24 +569,26 @@
 F_LEAP_YEAR 
+  
 = %5B31, 29, 3
@@ -950,16 +950,18 @@
 nit.HOUR
+  
 : 3,%0A   
@@ -969,16 +969,19 @@
 Unit.DAY
+   
 : 4,%0A   
@@ -990,16 +990,18 @@
 nit.WEEK
+  
 : 5,%0A   
@@ -1011,16 +1011,17 @@
 it.MONTH
+ 
 : 6,%0A   
@@ -1030,14 +1030,16 @@
 nit.YEAR
+  
 : 7%0A%7D%0A

Reformat constants in tempo.unit module