Closed shimwell closed 4 months ago
Hi Jonathan, I did a quick test of the new logic and I'm not sure it is doing what is expected as the last level is supposed to be a list of files contained by the last folder:
It seemed also a bit slow (probably not faster than what we have right now). I believe that if we want to refactor this specific part of the code we should use os.walk
, it should also be much faster:
Good spot. Looks like we don't need this PR anymore. Thanks for checking
Description
I spotted a few more nested levels of code and had a go at refactoring it so that the code was a bit more readable. It makes use of
all
and dictionary comprehension which might make it more complex so perhaps it is not actually any nicer as we trade compactness of code for complexity here. Feel free to reject these PRs I'm just seeing what can be done.Fixes # (issue)
No open issues, just refactoring
Type of change
more concise code
Please select what type of change this is.
Other changes
Testing
Sorry I've not added tests, happy to do so
Checklist: