Skip to content

Commit 4cb2a18

Browse files
respond to review comments
1 parent 2a1e555 commit 4cb2a18

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/python/pants/bin/engine_initializer.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ def setup_legacy_graph(pants_ignore_patterns,
154154
if not build_file_aliases:
155155
build_file_aliases = EngineInitializer.get_default_build_file_aliases()
156156

157+
if not rules:
158+
rules = []
159+
157160
symbol_table = LegacySymbolTable(build_file_aliases)
158161

159162
project_tree = FileSystemProjectTree(build_root, pants_ignore_patterns)
@@ -174,8 +177,6 @@ def setup_legacy_graph(pants_ignore_patterns,
174177

175178
# Create a Scheduler containing graph and filesystem tasks, with no installed goals. The
176179
# LegacyBuildGraph will explicitly request the products it needs.
177-
if not rules:
178-
rules = []
179180
tasks = (
180181
create_legacy_graph_tasks(symbol_table) +
181182
create_fs_rules() +

src/python/pants/build_graph/build_configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def register_rules(self, rules):
139139
"""
140140

141141
if not isinstance(rules, Iterable):
142-
raise TypeError('The rules must be an iterable, given {}'.format(rules))
142+
raise TypeError('The rules must be an iterable, given {!r}'.format(rules))
143143
self._rules.extend(rules)
144144

145145
def rules(self):

0 commit comments

Comments
 (0)