Skip to content

Commit

Permalink
use dict comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
wdpypere committed Nov 6, 2023
1 parent f48e97b commit b713d9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vsc/utils/generaloption.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ def get_env_options(self):
epilogprefixtxt += "eg. --some-opt is same as setting %(prefix)s_SOME_OPT in the environment."
self.epilog.append(epilogprefixtxt % {'prefix': self.envvar_prefix})

candidates = dict([(k, v) for k, v in os.environ.items() if k.startswith("%s_" % self.envvar_prefix)])
candidates = {k: v for k, v in os.environ.items() if k.startswith(f"{self.envvar_prefix}_")}

for opt in self._get_all_options():
if opt._long_opts is None:
Expand Down

0 comments on commit b713d9e

Please sign in to comment.