MCPcopy Index your code
hub / github.com/RustPython/RustPython / add_password

Method add_password

Lib/urllib/request.py:808–817  ·  view source on GitHub ↗
(self, realm, uri, user, passwd)

Source from the content-addressed store, hash-verified

806 self.passwd = {}
807
808 def add_password(self, realm, uri, user, passwd):
809 # uri could be a single URI or a sequence
810 if isinstance(uri, str):
811 uri = [uri]
812 if realm not in self.passwd:
813 self.passwd[realm] = {}
814 for default_port in True, False:
815 reduced_uri = tuple(
816 self.reduce_uri(u, default_port) for u in uri)
817 self.passwd[realm][reduced_uri] = (user, passwd)
818
819 def find_user_password(self, realm, authuri):
820 domains = self.passwd.get(realm, {})

Callers 1

add_passwordMethod · 0.45

Calls 2

reduce_uriMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected