PyBites-Open-Source / eatlocal

This package helps users solve PyBites code challenges on their local machine.
MIT License
20 stars 9 forks source link

Update eatlocal.eatlocal.read_bite() to use glob() and rglob() #14

Closed rhelmstedter closed 2 years ago

rhelmstedter commented 2 years ago

Instead of iterating over path.iterdir() use Path.glob() and Path.rglob().

Currently this code exists for parsing the bite.html file and rendering the instructions. Parsing the file path for the code is complicated by the fact that in each bite directory there are exactly two (at least in all bites explored so far) .py files. One file for the bite, the other for the tests.

rhelmstedter commented 2 years ago

Used a list comp to filter out the test file. Fixed this issue with 9a79ba5