Closed LeeReid1 closed 8 months ago
Thanks for flagging this. I think it's wanting to remove instances of '-' from the myargs list, but in a very weird way that won't actually do anything.
If myargs contains '-', it will cause an error because it shortens myargs within a loop while iterating over the original index length.
If myargs does not contain '-', it won't do anything.
@stnava @ntustison am I missing a use case where stripping '-' from the args list might be needed? Is there a reason to fix this rather than just remove it entirely?
Not that I'm aware of. I have no idea why this snippet is there.
While trying to debug something of my own, I found your apply transforms code contains the following
It seems to be trimming hyphens from the start of each argument..?
Something like this might be simpler:
Though I note the first will remove only one hyphen and mine will remove all. Not sure what was intended.
Apologies that I have no time to test or do a pull request. Hope that helps though