Skip to content

Commit 253a533

Browse files
committed
Minor simplifications.
1 parent 5d1348f commit 253a533

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

opimodel/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def parse_css_color_file(filepath):
2121
"""
2222
with open(filepath) as f:
2323
for line in (l.strip() for l in f.readlines()):
24-
if not line == '' and not line.startswith('#'):
24+
if line and not line.startswith('#'):
2525
key, value = [x.strip() for x in line.split('=')]
2626
r, g, b = [int(x.strip(',')) for x in value.split()]
2727
utils.add_attr_to_module(key, Color((r, g, b), key),

opimodel/fonts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def parse_css_font_file(filename):
5151
"""
5252
with open(filename) as f:
5353
for line in (l.strip() for l in f.readlines()):
54-
if not line == '' and not line.startswith('#'):
54+
if line and not line.startswith('#'):
5555
key, value = [x.strip() for x in line.split('=')]
5656
face, style, size = [x.strip(',') for x in value.split('-')]
5757
pixels = True

0 commit comments

Comments
 (0)