`startswith` accepts a tuple of possibilities, so you can shorten these last three lines to: `not repo.startswith(('http:', 'https:', 'file:'))`