Skip to content

Commit 515c5ef

Browse files
committed
Tidy
1 parent bf8edd1 commit 515c5ef

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

components/style/properties/build.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import json
66
import os.path
7-
import re
87
import sys
98

109
BASE = os.path.dirname(__file__)
@@ -49,11 +48,11 @@ def render(filename, **context):
4948
strict_undefined=True,
5049
filename=filename)
5150
# Uncomment to debug generated Python code:
52-
#write("/tmp", "mako_%s.py" % os.path.basename(filename), template.code)
51+
# write("/tmp", "mako_%s.py" % os.path.basename(filename), template.code)
5352
return template.render(**context).encode("utf8")
5453
except:
5554
# Uncomment to see a traceback in generated Python code:
56-
#raise
55+
# raise
5756
abort(exceptions.text_error_template().render().encode("utf8"))
5857

5958

components/style/properties/data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ def new_style_struct(self, *args, **kwargs):
124124
self.style_structs.append(style_struct)
125125
self.current_style_struct = style_struct
126126

127-
128127
def active_style_structs(self):
129128
return [s for s in self.style_structs if s.additional_methods or s.longhands]
130129

131-
132130
def switch_to_style_struct(self, name):
133131
for style_struct in self.style_structs:
134132
if style_struct.trait_name == name:
@@ -138,7 +136,7 @@ def switch_to_style_struct(self, name):
138136

139137
def declare_longhand(self, name, products="gecko servo", **kwargs):
140138
products = products.split()
141-
if not self.product in products:
139+
if self.product not in products:
142140
return
143141

144142
longand = Longhand(self.current_style_struct, name, **kwargs)

components/style/properties/properties.mako.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ pub mod longhands {
114114
//
115115
// FIXME: is it still?
116116
*cacheable = false;
117-
let inherited_struct = inherited_style.get_${data.current_style_struct.trait_name_lower}();
117+
let inherited_struct =
118+
inherited_style.get_${data.current_style_struct.trait_name_lower}();
118119
context.mutate_style().mutate_${data.current_style_struct.trait_name_lower}()
119120
.copy_${property.ident}_from(inherited_struct);
120121
}

0 commit comments

Comments
 (0)