Skip to content

Commit

Permalink
fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SubaruArai committed Aug 17, 2023
1 parent 05b49e4 commit 9879894
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rosdep2/platforms/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def handle_options(options):

# make sure options is a list of list of strings
try:
valid = all([isinstance(x, _basestring) for option in options for x in option])
valid = all(isinstance(x, _basestring) for option in options for x in option)
except Exception as e:
raise InvalidData("Invalid list of options '%s', error: %s" % (options, e))
else:
Expand Down
2 changes: 1 addition & 1 deletion src/rosdep2/sources_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ def get_view_dependencies(self, view_name):
if view_name != SourcesListLoader.ALL_VIEW_KEY:
# if the view_name matches one of our sources, return
# empty list as none of our sources has deps.
if any([x for x in self.sources if view_name == x.url]):
if any(x for x in self.sources if view_name == x.url):
return []

# not one of our views, so it depends on everything we provide
Expand Down
4 changes: 2 additions & 2 deletions test/test_rosdep_sources_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def test_SourcesListLoader_create_default():
loader = SourcesListLoader.create_default(matcher, sources_cache_dir=tempdir)
assert loader.sources
sources0 = loader.sources
assert not any([s for s in loader.sources if not matcher.matches(s)])
assert not any(s for s in loader.sources if not matcher.matches(s))

loader = SourcesListLoader.create_default(matcher, sources_cache_dir=tempdir)
assert sources0 == loader.sources
Expand All @@ -445,7 +445,7 @@ def test_SourcesListLoader_create_default():
assert loader2.sources
# - should have filtered down to python-only
assert sources0 != loader2.sources
assert not any([s for s in loader2.sources if not matcher2.matches(s)])
assert not any(s for s in loader2.sources if not matcher2.matches(s))

# test API

Expand Down

0 comments on commit 9879894

Please sign in to comment.