Sets ``self.name`` if given a **PEP-508** style URL
777768
def get_url(self):
        # type: () -> STRING_TYPE
        """"""

        line = self.line
        try:
            parsed = URI.parse(line)
            line = parsed.to_string(escape_password=False, direct=False, strip_ref=True)
        except ValueError:
            pass
        else:
            self._parsed_url = parsed
            return line
        if self.vcs is not None and self.line.startswith("{0}+".format(self.vcs)):
            _, _, _parseable = self.line.partition("+")
            parsed = urllib_parse.urlparse(add_ssh_scheme_to_git_uri(_parseable))
            line, _ = split_ref_from_uri(line)
        else:
            parsed = urllib_parse.urlparse(add_ssh_scheme_to_git_uri(line))
        if "@" in self.line and parsed.scheme == "":
            name, _, url = self.line.partition("@")
            if self._name is None:
                url = url.strip()
                self._name = name.strip()
                if is_valid_url(url):
                    self.is_direct_url = True
            line = url.strip()
            parsed = urllib_parse.urlparse(line)
            url_path = parsed.path
            if "@" in url_path:
                url_path, _, _ = url_path.rpartition("@")
            parsed = parsed._replace(path=url_path)
        self._parsed_url = parsed
        return line
1333875
def _set_name(self, name):
        """"""
        self._service_name = name
        self.__send_to_frontend({"band": "set_name", "name": self._service_name})
859635
def name(self):
        """"""
        if self._path:
            # follow h5py convention: add leading slash
            name = self._path
            if name[0] != '/':
                name = '/' + name
            return name
        return '/'
175659
def with_name(self, name):
        """"""
        if not self.name:
            raise ValueError("%r has an empty name" % (self,))
        return self._from_parsed_parts(self._drv, self._root,
                                       self._parts[:-1] + [name])
1290251
def Name(self):
        
        name = ""
        if self.Version:
            name = self.Version.UserAgent
        return name
826609
def with_name(self, name):
        
        # N.B. DOES cleanup query/fragment
        if not isinstance(name, str):
            raise TypeError("Invalid name type")
        if "/" in name:
            raise ValueError("Slash in name is not allowed")
        name = self._PATH_QUOTER(name)
        if name in (".", ".."):
            raise ValueError(". and .. values are forbidden")
        parts = list(self.raw_parts)
        if self.is_absolute():
            if len(parts) == 1:
                parts.append(name)
            else:
                parts[-1] = name
            parts[0] = ""  # replace leading '/'
        else:
            parts[-1] = name
            if parts[0] == "/":
                parts[0] = ""  # replace leading '/'
        return URL(
            self._val._replace(path="/".join(parts), query="", fragment=""),
            encoded=True,
        )
1279915
def set(self, name, value=True):
        ""
        setattr(self, name.lower(), value)
104917
def validate_name(self, name: str):
        
        parts = self.NAME_SPLIT_RE.split(name)
        for part in parts:
            if not part.isidentifier() or keyword.iskeyword(part):
                raise ValueError('Incorrect route name {!r}, '
                                 'the name should be a sequence of '
                                 'python identifiers separated '
                                 'by dash, dot or column'.format(name))
        if name in self._named_resources:
            raise ValueError('Duplicate {!r}, '
                             'already handled by {!r}'
                             .format(name, self._named_resources[name]))
42043
def extend_name(suffix):
    

    def dec(cls):
        name = '{}{}'.format(cls.__name__, suffix)
        setattr(cls, '__name__', name)
        return cls

    return dec
970736
def __attr_name(self, name):
		
		if name not in self.cookie_attr_value_compliance.keys():
			suggested_name = name.replace('_', '-').lower()
			if suggested_name not in self.cookie_attr_value_compliance.keys():
				raise ValueError('Invalid attribute name is specified')
			name = suggested_name
		return name
578006
def _style_name(self, el):
        """"""
        if el.attributes is None:
            return None
        style_field = ('urn:oasis:names:tc:opendocument:xmlns:text:1.0',
                       'style-name')
        name = el.attributes.get(style_field, None)
        if not name:
            return None
        return self._get_style_name(name)
1085427
def _object_name_html(self):
        
        if self.presently.exists:
            url = self.url()
            return "<a href=\"%s\">%s</a>" % (url,
                                              unicode(self.get_object()),)
        else:
            return "(deleted)"
1272818
def name(self, name=None):
        ''''''
        if name:
            self._name = name
            return self
        return self._name
1042326
def name(self, value):
        
        self._name = value
        self.slug = re.sub('[^0-9a-zA-Z_-]+', '_', str(value).lower())
        self.root = os.path.abspath(os.path.join(_cfg.get('Paths', 'HttpRoot'), self.domain.name, self.slug))
410630
def setObjectName( self, objectName ):
        
        super(XLineEdit, self).setObjectName(objectName)
        self.adjustStyleSheet()
479785
def set_name(self, new_name):
        

        yield from self._hypervisor.send('ethsw rename "{name}" "{new_name}"'.format(name=self._name, new_name=new_name))
        log.info('Ethernet switch "{name}" [{id}]: renamed to "{new_name}"'.format(name=self._name,
                                                                                   id=self._id,
                                                                                   new_name=new_name))
        self._name = new_name
1149004
def _resolve_resource_name(self, name):
        """"""
        if name[:4] == 'http':  # already a url
            return name
        name = name.rstrip('/').lstrip('/')
        return '%s%s/%s' % (self.scheme, self.host, name)