<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pr_num(self):
 """Return the PR number or None if not on a PR"""

        result = get_pr_num(repo=self.repo)
        if result is None:
            result = get_travis_pr_num()
        return result