Skip to content

Commit 091acd9

Browse files
committed
Add extra empty lines to separate code blocks
* Also add todo and remove dead code Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 70d18ea commit 091acd9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/attributecode/model.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,6 @@ def create_fields(self):
707707
is simpler.
708708
"""
709709
self.fields = OrderedDict([
710-
# ('about_resource', ListField(required=True)),
711-
# ('about_resource', AboutResourceField(required=True)),
712710
('about_resource', AboutResourceField(required=True)),
713711
('name', SingleLineField(required=True)),
714712

@@ -1081,7 +1079,6 @@ def load_dict(self, fields_dict, base_dir, running_inventory=False,
10811079
self.errors = errors
10821080
return errors
10831081

1084-
10851082
def dumps(self, mapping_file=False, with_absent=False, with_empty=True):
10861083
"""
10871084
Return self as a formatted ABOUT string.
@@ -1127,7 +1124,9 @@ def dumps(self, mapping_file=False, with_absent=False, with_empty=True):
11271124
if lic_group[3]:
11281125
lic_dict['url'] = lic_group[3]
11291126
about_data.setdefault('licenses', []).append(lic_dict)
1127+
11301128
formatted_about_data = util.format_output(about_data, mapping_file)
1129+
11311130
return saneyaml.dump(formatted_about_data)
11321131

11331132
def dump(self, location, mapping_file=False, with_absent=False, with_empty=True):
@@ -1144,11 +1143,14 @@ def dump(self, location, mapping_file=False, with_absent=False, with_empty=True)
11441143

11451144
about_file_path = loc
11461145
if not about_file_path.endswith('.ABOUT'):
1146+
# FIXME: we should not infer some location.
11471147
if about_file_path.endswith('/'):
11481148
about_file_path = util.to_posix(os.path.join(parent, os.path.basename(parent)))
11491149
about_file_path += '.ABOUT'
1150+
11501151
if on_windows:
11511152
about_file_path = add_unc(about_file_path)
1153+
11521154
with codecs.open(about_file_path, mode='wb', encoding='utf-8') as dumped:
11531155
dumped.write(self.dumps(mapping_file, with_absent, with_empty))
11541156

0 commit comments

Comments
 (0)