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

Improve diagnostics when auditwheel repair fails #807

Merged
merged 4 commits into from
Aug 28, 2021

Conversation

jbarlow83
Copy link
Contributor

Fixes #793

Copy link
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me except for one minor nit.

Comment on lines 314 to 318
def matches_prepared_command(error_cmd: List[str], command_template: str) -> bool:
if len(error_cmd) < 3 or error_cmd[0:2] != ["sh", "-c"]:
return False
command_prefix = command_template.split("{", maxsplit=1)[0].strip()
return error_cmd[2].startswith(command_prefix)
Copy link
Contributor

@henryiii henryiii Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be inside another function? Is it capturing anything? If not, it really needs to be moved out. Functions-in-functions should always capture scope (and functions should not capture scope - using partials is easier to follow). It can start with an underscore to indicate its "private".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I wrote it as a closure, mypy didn't understand it unfortunately :/.

Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jbarlow83 !

I just added a test for this and improved the existing test to add the counterfactual.

@joerick joerick added the automerge Tells https://github.com/apps/mergery to squash-merge the PR when the button is green. label Aug 28, 2021
@joerick joerick merged commit 144733d into pypa:main Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells https://github.com/apps/mergery to squash-merge the PR when the button is green.
Projects
None yet
3 participants