Skip to content

Commit

Permalink
Split any(filter()) into two statements to aid type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
boehmseb committed Sep 27, 2023
1 parent d684ba1 commit 1978199
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions varats-core/varats/base/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,11 @@ def set_config_option(self, option_name: str, value: tp.Any) -> None:
self.add_config_option(ConfigurationOptionImpl(option_name, value))

def get_config_value(self, option_name: str) -> tp.Optional[tp.Any]:
return any(
filter(
lambda option: option.name == option_name,
self.__patch_feature_tags
)
filtered_options = filter(
lambda option: (option.name == option_name),
self.__patch_feature_tags
)
return any(filtered_options)

def options(self) -> tp.List[ConfigurationOption]:
return list(self.__patch_feature_tags)
Expand Down

0 comments on commit 1978199

Please sign in to comment.