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

gh-59110: Extract function for _add_implicit_dirs. #121378

Closed
wants to merge 2 commits into from

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jul 4, 2024

@serhiy-storchaka
Copy link
Member

I do not see benefits, Actually, this looks like pessimization. The current code stops adding implicit parent dirs if it found already added dir. Your code continues to generate them. For example, if there are foo/bar/baz/a.py, foo/bar/baz/b.py and foo/bar/baz/c.py, it will calculate foo/bar/ and foo/ three times. You need to use dict.fromkeys() to de-duplicate them.

@jaraco jaraco closed this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants