Skip to content

Commit

Permalink
Switch to using a set expression
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Oct 5, 2023
1 parent 55c83b4 commit 143067f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/textual/widgets/_option_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def _duplicate_id_check(self, candidate_items: list[OptionListContent]) -> None:
if isinstance(item, Option) and item.id is not None
]
# Get the set of new IDs that we're being given.
new_option_ids = set(option.id for option in new_options)
new_option_ids = {option.id for option in new_options}
# Now check for duplicates, both internally amongst the new items
# incoming, and also against all the current known IDs.
if len(new_options) != len(new_option_ids) or not new_option_ids.isdisjoint(
Expand Down

0 comments on commit 143067f

Please sign in to comment.