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

Implied arg split not working as expected #69

Closed
jaraco opened this issue Jan 22, 2023 · 1 comment
Closed

Implied arg split not working as expected #69

jaraco opened this issue Jan 22, 2023 · 1 comment

Comments

@jaraco
Copy link
Owner

jaraco commented Jan 22, 2023

I've noticed that the pip-run script.py mode isn't working as intended. It fails when it tries to install the requirement script.py, but since script.py is an existent file in the current directory, I'd expect it to infer the usage and treat it as pip-run script.py.

@jaraco
Copy link
Owner Author

jaraco commented Jan 23, 2023

The use of split_before didn't have the intended effect... because it doesn't actually perform a split if the first element matches the predicate, making the results indistinguishable on the first element:

 pip-run main $ pip-run more-itertools -- -q
>>> from more_itertools import split_before
>>> list(split_before([1, 0], pred=bool))
[[1, 0]]
>>> list(split_before([0, 0], pred=bool))
[[0, 0]]
>>> list(split_before([0], pred=bool))
[[0]]
>>> list(split_before([1], pred=bool))
[[1]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant