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

Update "python_file_names" function to have "recursive" boolean argument #30

Open
fhightower opened this issue Jun 4, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request time est: 1 hour We estimate this issue will take 1 hour to complete

Comments

@fhightower
Copy link
Contributor

I don't have time right now to scope this out entirely, but I would like to create a python_files function that lets a user find python files in a given directory. The function should be very similar to the python_file_names function and should take a recursive kwarg as well as a return_file_paths kwarg which determines whether file names or file paths are returned.

In the future, I can update this issue to have the text below:


HELP WANTED 👋 : If you'd like to take this challenge on, please let me know! Even if you're new to Python and/or Github, this is a great place to start and I'd be happy to help walk you through this challenge as much as you need - don't hesitate to ask.

This particular issue will give you some exposure to updating a function's arguments, using type hints in Python, and the Pathlib library.


What?

We should update the python_file_names function to have a boolean recursive argument that lets the user specify whether or not he/she would like to search for Python files in the given directory recursively or not. The function signature is currently:

python_file_names(path: str, *, exclude_tests: bool = False) -> List[str]:

but should be updated to:

python_file_names(path: str, *, exclude_tests: bool = False, recursive: bool = False) -> List[str]:

Why?

How?

Additional thoughts

@fhightower fhightower added enhancement New feature or request time est: 1 hour We estimate this issue will take 1 hour to complete labels Jun 4, 2021
@fhightower fhightower self-assigned this Jun 4, 2021
@fhightower fhightower mentioned this issue Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request time est: 1 hour We estimate this issue will take 1 hour to complete
Projects
None yet
Development

No branches or pull requests

1 participant