Replaced if-else statements with ternary expression (#8658)

* Replace if-else with ternary expression

* assign out variable in readouterr() with ternary expression

* assign err variable in readouterr() with ternary expression

* Assign precision with ternary expression

* ternary expression for collected/collecting

* Assign thread_name with ternary expression

* Update AUTHORS

Co-authored-by: Zachary Kneupper <zacharykneupper@Zacharys-MBP.lan>
This commit is contained in:
Zack Kneupper
2021-05-11 05:52:55 -04:00
committed by GitHub
parent 7cec85a37d
commit 045ad5ac2d
6 changed files with 7 additions and 24 deletions

View File

@@ -100,10 +100,7 @@ def pre_release(version, *, skip_check_links):
def changelog(version, write_out=False):
if write_out:
addopts = []
else:
addopts = ["--draft"]
addopts = [] if write_out else ["--draft"]
check_call(["towncrier", "--yes", "--version", version] + addopts)