Skip to content

Commit

Permalink
Merge pull request #1786 from monosans/comprehension
Browse files Browse the repository at this point in the history
Replace for loops with comprehensions
  • Loading branch information
timothycrosley authored Jul 20, 2021
2 parents 754b55a + 074e84b commit 3dc4d89
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/build_config_option_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ def human(name: str) -> str:


def config_options() -> Generator[ConfigOption, None, None]:
cli_actions = {}
for action in parser._actions:
cli_actions[action.dest] = action

cli_actions = {action.dest: action for action in parser._actions}
for name, default in config.items():
extra_kwargs = {}

Expand All @@ -168,7 +165,7 @@ def config_options() -> Generator[ConfigOption, None, None]:

default_display = default
if isinstance(default, (set, frozenset)) and len(default) > 0:
default_display = tuple(i for i in sorted(default))
default_display = tuple(sorted(default))

# todo: refactor place for example params
# needs to integrate with isort/settings/_Config
Expand Down

0 comments on commit 3dc4d89

Please sign in to comment.