The remove_tag method works fine for "name only" tags, but if a value is associated, it does not do what I would expect. See the sample console session below, ir is an InfoRequest but this does not matter:
I would expect ir.remove_tag("othername") to either remove the tag entirely (with the value), or do nothing. Likewise, ir.remove_tag("morename:morevalue") should remove the key:value pair.
If multiple values exist for a given tag, say "key1:v1 key1:v2" I would expect:
remove_tag("key1:v2") to leave me with "key1:v1"
remove_tag("key1") to remove both tag, so nothing is left
I don't think empty strings should be allowed as tag names by the way, it looks like asking for trouble at some point :)
Let me know if you agree with the above, and I can send a PR.
The
remove_tag
method works fine for "name only" tags, but if a value is associated, it does not do what I would expect. See the sample console session below,ir
is anInfoRequest
but this does not matter:I would expect
ir.remove_tag("othername")
to either remove the tag entirely (with the value), or do nothing. Likewise,ir.remove_tag("morename:morevalue")
should remove the key:value pair.If multiple values exist for a given tag, say
"key1:v1 key1:v2"
I would expect:remove_tag("key1:v2")
to leave me with"key1:v1"
remove_tag("key1")
to remove both tag, so nothing is leftI don't think empty strings should be allowed as tag names by the way, it looks like asking for trouble at some point :)
Let me know if you agree with the above, and I can send a PR.