smol-ai / developer

the first library to let you embed a developer agent in your own app!
https://twitter.com/SmolModels
MIT License
11.81k stars 1.03k forks source link

Refactor walk_directory function for improved readability and consistency #46

Closed David-Ademola closed 1 year ago

David-Ademola commented 1 year ago

This pull request refactors the walk_directory function for improved readability and consistency.

Changes Made:

Reason for Changes:

The original code had inconsistent variable names and lacked clarity in certain areas. This refactor aims to enhance code readability, adhere to Python naming conventions, and maintain a consistent coding style throughout the function.

Testing Done:

I tested the modified walk_directory function on various directories containing both image and code files. I verified that code files were correctly read and stored in the code_contents dictionary. Additionally, I ensured that the exception handling worked as expected when encountering file read errors.