-
Notifications
You must be signed in to change notification settings - Fork 251
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
packages: unify python project check #377
packages: unify python project check #377
Conversation
c5350b2
to
70ad2cc
Compare
def is_installable_dir(path: str) -> bool: | ||
"""Return True if `path` is a directory containing a setup.py file.""" | ||
if not os.path.isdir(path): | ||
@functools.lru_cache(maxsize=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious how much of a hot path this is/if caching is a significant benefit here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking is this is called every time a dir dependency gets cloned, this happens a few times during resolution. And since this requires IO figured it can't hurt.
Co-authored-by: Bjorn Neergaard <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
Co-authored-by: Bjorn Neergaard <[email protected]>
Following up from #368 in relation to python-poetry/poetry#5692
Seems we were only checking for
setup.py
when determining if a relative path dependency was installable.