Skip to content

Commit 9760ead

Browse files
committed
Formatted codes
1 parent 47bd974 commit 9760ead

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

expand.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,24 @@
2424
e.g.)expand.py math segtree
2525
2626
Options:
27-
-a --all import all modules
27+
-a --all import all modules
2828
-h --help print help
2929
'''
3030
output_header = '//https://github.com/rust-lang-ja/ac-library-rs\n'
3131
opt_list = ['help', 'all']
3232
output_list_all = ('lazysegtree', 'segtree', 'convolution', 'twosat', 'scc',
33-
'fenwicktree', 'math', 'modint', 'maxflow', 'dsu', 'mincostflow', 'string', 'internal_bit', 'internal_math', 'internal_type_traits', 'internal_scc', 'internal_queue')
34-
dependency_list = {'lazysegtree': ('internal_bit',), 'segtree': ('internal_bit',), 'convolution': ('internal_bit', 'modint',), 'math': ('internal_math',), 'modint': (
35-
'internal_math', 'internal_type_traits'), 'fenwicktree': ('internal_type_traits',), 'twosat': ('internal_scc',), 'scc': ('internal_scc',), 'maxflow': ('internal_queue', 'internal_type_traits',), 'mincostflow': ('internal_type_traits',)}
33+
'fenwicktree', 'math', 'modint', 'maxflow', 'dsu',
34+
'mincostflow', 'string', 'internal_bit', 'internal_math',
35+
'internal_type_traits', 'internal_scc', 'internal_queue')
36+
dependency_list = {'lazysegtree': ('internal_bit',),
37+
'segtree': ('internal_bit',),
38+
'convolution': ('internal_bit', 'modint',),
39+
'math': ('internal_math',),
40+
'modint': ('internal_math', 'internal_type_traits'),
41+
'fenwicktree': ('internal_type_traits',),
42+
'twosat': ('internal_scc',), 'scc': ('internal_scc',),
43+
'maxflow': ('internal_queue', 'internal_type_traits',),
44+
'mincostflow': ('internal_type_traits',)}
3645
src_path = 'src/'
3746

3847

@@ -72,7 +81,7 @@ def output_file(filename):
7281

7382
while len(args) != 0:
7483
pop = args.pop()
75-
if not pop in output_list_all:
84+
if pop not in output_list_all:
7685
print('invalid args:{}'.format(pop))
7786
print(usage)
7887
sys.exit(2)
@@ -90,7 +99,8 @@ def output_file(filename):
9099
output_data.extend(buf)
91100

92101
for i in output_list:
93-
# Modules that begin with 'internal' are for internal use, so they are not declared.
102+
# Modules that begin with 'internal' are for internal use, so they are not
103+
# declared.
94104
if not i.startswith('internal'):
95105
output_data.append('use {}::*;'.format(i))
96106

0 commit comments

Comments
 (0)