Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: recipe_engine/depgraph.py

Issue 2846703003: [recipes.py] move run arg parsing to its module. (Closed)
Patch Set: fix nits Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | recipe_engine/run.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The LUCI Authors. All rights reserved. 1 # Copyright 2016 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 from __future__ import print_function 5 from __future__ import print_function
6 6
7 import argparse
8 import sys 7 import sys
9 8
10 from . import loader 9 from . import loader
11 10
11 from . import env
12
13 import argparse # this is vendored
14
12 15
13 _GRAPH_HEADER = """strict digraph { 16 _GRAPH_HEADER = """strict digraph {
14 concentrate = true; 17 concentrate = true;
15 ranksep = 2; 18 ranksep = 2;
16 nodesep = 0.25; 19 nodesep = 0.25;
17 """ 20 """
18 21
19 _GRAPH_FOOTER = """} 22 _GRAPH_FOOTER = """}
20 """ 23 """
21 24
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 print(' subgraph "cluster_%s" { label="%s"; %s; }' % ( 139 print(' subgraph "cluster_%s" { label="%s"; %s; }' % (
137 package, package, '; '.join(modules)), file=args.output) 140 package, package, '; '.join(modules)), file=args.output)
138 141
139 if args.recipe_filter and recipe_to_package: 142 if args.recipe_filter and recipe_to_package:
140 recipe_names = [ 143 recipe_names = [
141 '"recipe %s"' % name for name in recipe_to_package.keys()] 144 '"recipe %s"' % name for name in recipe_to_package.keys()]
142 print(' subgraph "cluster_recipes" { label="recipes"; %s; }' % ( 145 print(' subgraph "cluster_recipes" { label="recipes"; %s; }' % (
143 '; '.join(recipe_names)), file=args.output) 146 '; '.join(recipe_names)), file=args.output)
144 147
145 print(_GRAPH_FOOTER, file=args.output) 148 print(_GRAPH_FOOTER, file=args.output)
OLDNEW
« no previous file with comments | « no previous file | recipe_engine/run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698