Skip to content

Commit f2c7717

Browse files
Apply ruff/flake8-bugbear preview rule B901 (#1706)
Co-authored-by: Martin Durant <[email protected]>
1 parent 3c88769 commit f2c7717

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: fsspec/spec.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,9 @@ def walk(self, path, maxdepth=None, topdown=True, on_error="omit", **kwargs):
428428
except (FileNotFoundError, OSError) as e:
429429
if on_error == "raise":
430430
raise
431-
elif callable(on_error):
431+
if callable(on_error):
432432
on_error(e)
433-
if detail:
434-
return path, {}, {}
435-
return path, [], []
433+
return
436434

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

0 commit comments

Comments
 (0)