parameters: (cls, location)
return_statement: return url.strip()
docstring: Return URL of the first remote encountered.
  
          Raises RemoteNotFoundError if the repository does not have a remote
          url configured.
docstring_summary: Return URL of the first remote encountered.
docstring_tokens: Return URL of the first remote encountered .
function: def get_remote_url(cls, location):
          # type: (str) -> str
          """
          Return URL of the first remote encountered.
  
          Raises RemoteNotFoundError if the repository does not have a remote
          url configured.
          """
          # We need to pass 1 for extra_ok_returncodes since the command
          # exits with return code 1 if there are no matching lines.
          stdout = cls.run_command(
              ['config', '--get-regexp', r'remote\..*\.url'],
              extra_ok_returncodes=(1, ),
              show_stdout=False,
              stdout_only=True,
              cwd=location,
          )
          remotes = stdout.splitlines()
          try:
              found_remote = remotes[0]
          except IndexError:
              raise RemoteNotFoundError
  
          for remote in remotes:
              if remote.startswith('remote.origin.url '):
                  found_remote = remote
                  break
          url = found_remote.split(' ')[1]
          return url.strip()
function_tokens: def get_remote_url ( cls , location ) : # type: (str) -> str # We need to pass 1 for extra_ok_returncodes since the command # exits with return code 1 if there are no matching lines. stdout = cls . run_command ( [ 'config' , '--get-regexp' , r'remote\..*\.url' ] , extra_ok_returncodes = ( 1 , ) , show_stdout = False , stdout_only = True , cwd = location , ) remotes = stdout . splitlines ( ) try : found_remote = remotes [ 0 ] except IndexError : raise RemoteNotFoundError for remote in remotes : if remote . startswith ( 'remote.origin.url ' ) : found_remote = remote break url = found_remote . split ( ' ' ) [ 1 ] return url . strip ( )