Skip to content

Commit 6d2d390

Browse files
authored
Use an else clause on a for loop
1 parent e2f8ee2 commit 6d2d390

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

news/announce.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ def main(run_type, directory):
133133

134134
if __name__ == '__main__':
135135
arguments = docopt.docopt(__doc__)
136-
run_type = RunType.interim
137136
for possible_run_type in RunType:
138137
if arguments[f"--{possible_run_type.name}"]:
139138
run_type = possible_run_type
140139
break
140+
else:
141+
run_type = RunType.interim
141142
directory = arguments["<directory>"] or pathlib.Path(__file__).parent
142143
main(run_type, directory)

0 commit comments

Comments
 (0)