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

depth parameter #26

Open
seddonym opened this issue Dec 5, 2018 · 0 comments
Open

depth parameter #26

seddonym opened this issue Dec 5, 2018 · 0 comments

Comments

@seddonym
Copy link
Owner

seddonym commented Dec 5, 2018

It would be useful to be able to specify the module depth of certain results.

For example:

find_upstream_modules('mypackage.foo') == {
    'mypackage.bar.one',
    'mypackage.baz.two.green',
    'mypackage.baz.two.blue',
}

# Possibly this should error as it's not very useful?
find_upstream_modules('mypackage.foo', depth=1) == {
    'mypackage',
}

find_upstream_modules('mypackage.foo', depth=2) == {
    'mypackage.bar',
    'mypackage.baz',
}

find_upstream_modules('mypackage.foo', depth=3) == {
    'mypackage.bar.one',
    'mypackage.baz.two.green',
    'mypackage.baz.two.blue',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant