Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix recurse issue #391

Merged
merged 2 commits into from
Jan 20, 2021
Merged

fix recurse issue #391

merged 2 commits into from
Jan 20, 2021

Conversation

hamelsmu
Copy link
Member

@hamelsmu hamelsmu commented Jan 20, 2021

Fixes #388

cc: @jph00 @muellerzr

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@hamelsmu hamelsmu requested a review from jph00 January 20, 2021 01:49
if recursive: fls = L(os.walk(fname)).map(lambda x: _get_paths(x[0], x[2])).concat()
else: fls = fname.glob(f'*{extension}')
return L(fls).filter(lambda x: not x.name.startswith('_') and x.name.endswith(extension))
if fname.is_dir(): fname = f'{fname.absolute()}/**/*{extension}' if recursive else f'{fname.absolute()}/*{extension}'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW @jph00 I had to make this smart enough to handle directories because it picks up the directory from settings.ini

@jph00 jph00 merged commit 90691b2 into master Jan 20, 2021
@jph00 jph00 deleted the fix-recurse branch January 20, 2021 17:13
@hamelsmu hamelsmu added the bug Something isn't working label Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nbdev_test_nbs --fname broke in 1.1.7
2 participants