Fix flake8 complaints
E721 do not compare types, for exact checks use `is` / `is not`, for
instance checks use `isinstance()`
Conditions in the method `_list_branches` were switched because:
`issubclass(git.RemoteReference, git.Head)`
Signed-off-by: Ondrej Nosek <onosek@redhat.com>