parameters: (netloc, scheme='https')
return_statement: return f'{scheme}://{netloc}'
docstring: Build a full URL from a netloc.
docstring_summary: Build a full URL from a netloc.
docstring_tokens: Build a full URL from a netloc .
function: def build_url_from_netloc(netloc, scheme='https'):
      # type: (str, str) -> str
      """
      Build a full URL from a netloc.
      """
      if netloc.count(':') >= 2 and '@' not in netloc and '[' not in netloc:
          # It must be a bare IPv6 address, so wrap it with brackets.
          netloc = f'[{netloc}]'
      return f'{scheme}://{netloc}'
function_tokens: def build_url_from_netloc ( netloc , scheme = 'https' ) : # type: (str, str) -> str if netloc . count ( ':' ) >= 2 and '@' not in netloc and '[' not in netloc : # It must be a bare IPv6 address, so wrap it with brackets. netloc = f'[{netloc}]' return f'{scheme}://{netloc}'