Skip to content

Commit

Permalink
Update snakemake_executor_plugin_slurm/utils.py
Browse files Browse the repository at this point in the history
not convinced, that this is better, but replacing [] for None as the default arg in `get_dirs`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
cmeesters and coderabbitai[bot] authored Jan 7, 2025
1 parent 9764842 commit 59cf40e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snakemake_executor_plugin_slurm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def delete_empty_dirs(path: Path) -> list:
"""

# get a list of all directorys in path and subpaths
def get_dirs(path: Path, result=[]):
def get_dirs(path: Path, result=None):
if result is None:
result = []
for p in path.iterdir():
if p.is_dir():
result.append(p)
Expand Down

0 comments on commit 59cf40e

Please sign in to comment.