Open imbuedhope opened 3 years ago
As it stands the following happens
>>> import os, pygit2 >>> r = pygit2.Repository(os.getcwd()) >>> 'origin' in r.remotes False
Whereas looping over the names results in a match
>>> import os, pygit2 >>> r = pygit2.Repository(os.getcwd()) >>> 'origin' in [remote.name for remote in r.remotes] True
This behavior seems unpythonic since remote.RemoteCollection implements __getitem__() and in doesn't match with a valid key in the collection.
remote.RemoteCollection
__getitem__()
in
If this change makes sense I can to try fix it when I have time, lmk!
As it stands the following happens
Whereas looping over the names results in a match
This behavior seems unpythonic since
remote.RemoteCollection
implements__getitem__()
andin
doesn't match with a valid key in the collection.If this change makes sense I can to try fix it when I have time, lmk!