@@ -1786,7 +1786,7 @@ class CSSToExcelConverter(object):
1786
1786
1787
1787
def __init__ (self , inherited = None ):
1788
1788
if inherited is not None :
1789
- inherited = self .compute_css (inherited , INITIAL_STYLE )
1789
+ inherited = self .compute_css (inherited , sefl . INITIAL_STYLE )
1790
1790
1791
1791
self .inherited = inherited
1792
1792
@@ -1959,7 +1959,7 @@ def color_to_excel(self, val):
1959
1959
except KeyError :
1960
1960
warnings .warn ('Unhandled colour format: %r' % val , CSSParseWarning )
1961
1961
1962
- unit_conversions = {
1962
+ UNIT_CONVERSIONS = {
1963
1963
'rem' : ('pt' , 12 ),
1964
1964
'ex' : ('em' , .5 ),
1965
1965
# 'ch':
@@ -1971,8 +1971,8 @@ def color_to_excel(self, val):
1971
1971
'q' : ('mm' , .25 ),
1972
1972
}
1973
1973
1974
- font_size_conversions = unit_conversions .copy ()
1975
- font_size_conversions .update ({
1974
+ FONT_SIZE_CONVERSIONS = unit_conversions .copy ()
1975
+ FONT_SIZE_CONVERSIONS .update ({
1976
1976
'%' : ('em' , 1 ),
1977
1977
'xx-small' : ('rem' , .5 ),
1978
1978
'x-small' : ('rem' , .625 ),
@@ -2000,7 +2000,7 @@ def font_size_to_pt(self, val, em_pt=None):
2000
2000
unit = 'pt'
2001
2001
continue
2002
2002
2003
- unit , mul = font_size_conversions [unit ]
2003
+ unit , mul = self . FONT_SIZE_CONVERSIONS [unit ]
2004
2004
val *= mul
2005
2005
return val
2006
2006
@@ -2050,7 +2050,7 @@ def atomize(self, declarations):
2050
2050
1 : [0 , 0 , 0 , 0 ],
2051
2051
2 : [0 , 1 , 0 , 1 ],
2052
2052
3 : [0 , 1 , 2 , 1 ],
2053
- 3 : [0 , 1 , 2 , 3 ],
2053
+ 4 : [0 , 1 , 2 , 3 ],
2054
2054
}
2055
2055
DIRECTIONS = ('top' , 'right' , 'bottom' , 'left' )
2056
2056
0 commit comments