def get_pull_requests(self):
g = self.github<EOL>query = {'<STR_LIT:state>': '<STR_LIT:all>'}<EOL>if self.args.github_token:<EOL><INDENT>query['<STR_LIT>'] = g['<STR_LIT>']<EOL><DEDENT>def f(pull):<EOL><INDENT>if self.args.ignore_closed:<EOL><INDENT>return (pull['<STR_LIT:state>'] == '<STR_LIT>' or<EOL>(pull['<STR_LIT:state>'] == '<STR_LIT>' and pull['<STR_LIT>']))<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>pulls = filter(f,<EOL>self.get(g['<STR_LIT:url>'] + "<STR_LIT>" + g['<STR_LIT>'] + "<STR_LIT>",<EOL>query, self.args.cache))<EOL>return dict([(str(pull['<STR_LIT>']), pull) for pull in pulls])<EOL>
https://developer.github.com/v3/pulls/#list-pull-requests