Skip to content

Commit c589c35

Browse files
committed
Fix some lint errors (yes, the code needs testing)
1 parent cb5cf02 commit c589c35

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/formats/format.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ class CSSToExcelConverter(object):
17861786

17871787
def __init__(self, inherited=None):
17881788
if inherited is not None:
1789-
inherited = self.compute_css(inherited, INITIAL_STYLE)
1789+
inherited = self.compute_css(inherited, sefl.INITIAL_STYLE)
17901790

17911791
self.inherited = inherited
17921792

@@ -1959,7 +1959,7 @@ def color_to_excel(self, val):
19591959
except KeyError:
19601960
warnings.warn('Unhandled colour format: %r' % val, CSSParseWarning)
19611961

1962-
unit_conversions = {
1962+
UNIT_CONVERSIONS = {
19631963
'rem': ('pt', 12),
19641964
'ex': ('em', .5),
19651965
# 'ch':
@@ -1971,8 +1971,8 @@ def color_to_excel(self, val):
19711971
'q': ('mm', .25),
19721972
}
19731973

1974-
font_size_conversions = unit_conversions.copy()
1975-
font_size_conversions.update({
1974+
FONT_SIZE_CONVERSIONS = unit_conversions.copy()
1975+
FONT_SIZE_CONVERSIONS.update({
19761976
'%': ('em', 1),
19771977
'xx-small': ('rem', .5),
19781978
'x-small': ('rem', .625),
@@ -2000,7 +2000,7 @@ def font_size_to_pt(self, val, em_pt=None):
20002000
unit = 'pt'
20012001
continue
20022002

2003-
unit, mul = font_size_conversions[unit]
2003+
unit, mul = self.FONT_SIZE_CONVERSIONS[unit]
20042004
val *= mul
20052005
return val
20062006

@@ -2050,7 +2050,7 @@ def atomize(self, declarations):
20502050
1: [0, 0, 0, 0],
20512051
2: [0, 1, 0, 1],
20522052
3: [0, 1, 2, 1],
2053-
3: [0, 1, 2, 3],
2053+
4: [0, 1, 2, 3],
20542054
}
20552055
DIRECTIONS = ('top', 'right', 'bottom', 'left')
20562056

0 commit comments

Comments
 (0)