def in_travis_pr():
 try:
  int(os.getenv(TRAVIS_PR_ENV, ''))
  return True
 except ValueError:
  return False

def in_travis_pr ( ) : try : int ( os . getenv ( TRAVIS_PR_ENV , '' ) ) return True except ValueError : return False
detect if we are running in a pull request on travis .