Skip to content

Implementing walk #2

Closed
Closed

Description

@thatch

An additional function that would be really helpful to have here would be a generator function that calls os.walk on a path, apply includes/excludes, and yields the resulting paths.

Something like

tuber.walk(root: Path, includes: Iterable[str]=("*.py",), excludes: Iterable[str]=(".git", "*.ext.py"))

For this issue

  1. Implement walk using an API similar to the above
  2. Bonus points for defaulting excludes to the same as black uses
  3. Make sure there's a test
  4. Submit a PR!

Quick development instructions

  1. git clone clone https://github.com/python-packaging/tuber
  2. cd tuber
  3. make venv
  4. source .venv/bin/activate
  5. make test (runs unittest)

Make sure the code is formatted (make format) and types are good (make lint) before submitting a PR to save iteration time waiting on CI.

Activity

  1. spencerkee commented on Oct 6, 2020

    @spencerkee
    Contributor

    Hi @thatch, could you assign the issue to me? I can get started shortly.

  2. thatch commented on Oct 19, 2020

    @thatch
    MemberAuthor

    Spencer, let me know if you're stuck on part of this and I can try to find more docs or snippets that would help

  3. spencerkee commented on Oct 26, 2020

    @spencerkee
    Contributor

    Hi @thatch, took me a bit of time to get setup on a new computer. #3 for your review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions