class RepoTagCompleter(object): def __call__(self, prefix, parsed_args, **kwargs): self.httpClient = HttpClient(hostname=parsed_args.hostname, port=parsed_args.port) response = self.httpClient.tagList(parsed_args.reponame) tag_str = response.read() return (tag for tag in tag_str.splitlines() if tag.startswith(prefix))