Skip to content

Commit

Permalink
Apply ruff/flake8-bugbear preview rule B901 (#1706)
Browse files Browse the repository at this point in the history

Co-authored-by: Martin Durant <[email protected]>
  • Loading branch information
DimitriPapadopoulos and martindurant authored Oct 7, 2024
1 parent 3c88769 commit f2c7717
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fsspec/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,9 @@ def walk(self, path, maxdepth=None, topdown=True, on_error="omit", **kwargs):
except (FileNotFoundError, OSError) as e:
if on_error == "raise":
raise
elif callable(on_error):
if callable(on_error):
on_error(e)
if detail:
return path, {}, {}
return path, [], []
return

for info in listing:
# each info name must be at least [path]/part , but here
Expand Down

0 comments on commit f2c7717

Please sign in to comment.