How to use the typing.Undefined function in typing

To help you get started, we’ve selected a few typing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python / mypy / stubs / 3.2 / unicodedata.py View on Github external
# Stubs for unicodedata (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Undefined

ucd_3_2_0 = Undefined(Any)
ucnhash_CAPI = Undefined(Any)
unidata_version = Undefined(str)

def bidirectional(unichr): pass
def category(unichr): pass
def combining(unichr): pass
def decimal(chr, default=Undefined): pass
def decomposition(unichr): pass
def digit(chr, default=Undefined): pass
def east_asian_width(unichr): pass
def lookup(name): pass
def mirrored(unichr): pass
def name(chr, default=Undefined): pass
def normalize(form, unistr): pass
def numeric(chr, default=Undefined): pass
github python / mypy / stubs / 3.2 / requests / auth.py View on Github external
# Stubs for requests.auth (Python 3)

from typing import Undefined, Any
from . import compat
from . import cookies
from . import utils
from . import status_codes

extract_cookies_to_jar = cookies.extract_cookies_to_jar
parse_dict_header = utils.parse_dict_header
to_native_string = utils.to_native_string
codes = status_codes.codes

CONTENT_TYPE_FORM_URLENCODED = Undefined(Any)
CONTENT_TYPE_MULTI_PART = Undefined(Any)

class AuthBase:
    def __call__(self, r): pass

class HTTPBasicAuth(AuthBase):
    username = Undefined(Any)
    password = Undefined(Any)
    def __init__(self, username, password): pass
    def __call__(self, r): pass

class HTTPProxyAuth(HTTPBasicAuth):
    def __call__(self, r): pass

class HTTPDigestAuth(AuthBase):
    username = Undefined(Any)
github python / mypy / stubs / 3.4 / pathlib.py View on Github external
open = Undefined(Any)
    listdir = Undefined(Any)
    chmod = Undefined(Any)
    lchmod = Undefined(Any)
    mkdir = Undefined(Any)
    unlink = Undefined(Any)
    rmdir = Undefined(Any)
    rename = Undefined(Any)
    replace = Undefined(Any)
    def symlink(a, b, target_is_directory): pass
    utime = Undefined(Any)
    def readlink(self, path): pass

class _Selector:
    child_parts = Undefined(Any)
    successor = Undefined(Any)
    def __init__(self, child_parts): pass
    def select_from(self, parent_path): pass

class _TerminatingSelector: pass

class _PreciseSelector(_Selector):
    name = Undefined(Any)
    def __init__(self, name, child_parts): pass

class _WildcardSelector(_Selector):
    pat = Undefined(Any)
    def __init__(self, pat, child_parts): pass

class _RecursiveWildcardSelector(_Selector):
    def __init__(self, pat, child_parts): pass
github python / typeshed / python3 / signal.py View on Github external
# This is an autogenerated file. It serves as a starting point
# for a more percise manual annotation of this module.
# Feel free to edit the source below, but remove this header when you do.

from typing import List, Tuple, Dict, Undefined, GenericType

ITIMER_PROF = Undefined(long)
ITIMER_REAL = Undefined(long)
ITIMER_VIRTUAL = Undefined(long)
ItimerError = Undefined(object)
NSIG = Undefined(long)
SIGABRT = Undefined(long)
SIGALRM = Undefined(long)
SIGBUS = Undefined(long)
SIGCHLD = Undefined(long)
SIGCLD = Undefined(long)
SIGCONT = Undefined(long)
SIGFPE = Undefined(long)
SIGHUP = Undefined(long)
SIGILL = Undefined(long)
SIGINT = Undefined(long)
SIGIO = Undefined(long)
SIGIOT = Undefined(long)
SIGKILL = Undefined(long)
SIGPIPE = Undefined(long)
SIGPOLL = Undefined(long)
SIGPROF = Undefined(long)
SIGPWR = Undefined(long)
SIGQUIT = Undefined(long)
SIGRTMAX = Undefined(long)
SIGRTMIN = Undefined(long)
SIGSEGV = Undefined(long)
github python / mypy / stubs / 3.2 / ssl.py View on Github external
OP_NO_COMPRESSION = Undefined(int)
OP_NO_SSLv2 = Undefined(int)
OP_NO_SSLv3 = Undefined(int)
OP_NO_TLSv1 = Undefined(int)
OP_NO_TLSv1_1 = Undefined(int)
OP_NO_TLSv1_2 = Undefined(int)
OP_SINGLE_DH_USE = Undefined(int)
OP_SINGLE_ECDH_USE = Undefined(int)

SSL_ERROR_EOF = Undefined(int)
SSL_ERROR_INVALID_ERROR_CODE = Undefined(int)
SSL_ERROR_SSL = Undefined(int)
SSL_ERROR_SYSCALL = Undefined(int)
SSL_ERROR_WANT_CONNECT = Undefined(int)
SSL_ERROR_WANT_READ = Undefined(int)
SSL_ERROR_WANT_WRITE = Undefined(int)
SSL_ERROR_WANT_X509_LOOKUP = Undefined(int)
SSL_ERROR_ZERO_RETURN = Undefined(int)

CERT_NONE = Undefined(int)
CERT_OPTIONAL = Undefined(int)
CERT_REQUIRED = Undefined(int)

PROTOCOL_SSLv23 = Undefined(int)
PROTOCOL_SSLv3 = Undefined(int)
PROTOCOL_TLSv1 = Undefined(int)
PROTOCOL_TLSv1_1 = Undefined(int)
PROTOCOL_TLSv1_2 = Undefined(int)

HAS_ECDH = Undefined(bool)
HAS_NPN = Undefined(bool)
HAS_SNI = Undefined(bool)
github python / mypy / stubs / 3.4 / pathlib.py View on Github external
    def splitroot(self, part, sep=Undefined): pass
    def casefold(self, s): pass
github python / mypy / stubs / 3.2 / http / cookiejar.py View on Github external
class CookiePolicy:
    def set_ok(self, cookie, request): pass
    def return_ok(self, cookie, request): pass
    def domain_return_ok(self, domain, request): pass
    def path_return_ok(self, path, request): pass

class DefaultCookiePolicy(CookiePolicy):
    DomainStrictNoDots = Undefined(Any)
    DomainStrictNonDomain = Undefined(Any)
    DomainRFC2965Match = Undefined(Any)
    DomainLiberal = Undefined(Any)
    DomainStrict = Undefined(Any)
    netscape = Undefined(Any)
    rfc2965 = Undefined(Any)
    rfc2109_as_netscape = Undefined(Any)
    hide_cookie2 = Undefined(Any)
    strict_domain = Undefined(Any)
    strict_rfc2965_unverifiable = Undefined(Any)
    strict_ns_unverifiable = Undefined(Any)
    strict_ns_domain = Undefined(Any)
    strict_ns_set_initial_dollar = Undefined(Any)
    strict_ns_set_path = Undefined(Any)
    def __init__(self, blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False,
                 rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False,
                 strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False,
                 strict_ns_domain=Undefined, strict_ns_set_initial_dollar=False,
                 strict_ns_set_path=False): pass
    def blocked_domains(self): pass
    def set_blocked_domains(self, blocked_domains): pass
    def is_blocked(self, domain): pass
    def allowed_domains(self): pass
    def set_allowed_domains(self, allowed_domains): pass
github python / mypy / stubs / 2.7 / sys.py View on Github external
maxsize = 0
maxunicode = 0
meta_path = Undefined(List[Any])
modules = Undefined(Dict[str, Any])
path = Undefined(List[str])
path_hooks = Undefined(List[Any]) # TODO precise type; function, path to finder
path_importer_cache = Undefined(Dict[str, Any]) # TODO precise type
platform = ''
prefix = ''
ps1 = ''
ps2 = ''
stdin = Undefined(BinaryIO)
stdout = Undefined(BinaryIO)
stderr = Undefined(BinaryIO)
__stdin__ = Undefined(BinaryIO)
__stdout__ = Undefined(BinaryIO)
__stderr__ = Undefined(BinaryIO)
subversion = Undefined(Tuple[str, str, str])
tracebacklimit = 0
version = ''
api_version = 0
warnoptions = Undefined(Any)
#  Each entry is a tuple of the form (action, message, category, module,
#    lineno)
#winver = ''  # Windows only
_xoptions = Undefined(Dict[Any, Any])

flags = Undefined(_flags)
class _flags:
    debug = 0
    division_warning = 0
    inspect = 0
github python / mypy / stubs / 3.2 / xml / etree / ElementTree.py View on Github external
def XML(text, parser=None): pass
def XMLID(text, parser=None): pass

fromstring = Undefined(Any)

def fromstringlist(sequence, parser=None): pass

class TreeBuilder:
    def __init__(self, element_factory=None): pass
    def close(self): pass
    def data(self, data): pass
    def start(self, tag, attrs): pass
    def end(self, tag): pass

class XMLParser:
    target = Undefined(Any)
    entity = Undefined(Any)
    version = Undefined(Any)
    def __init__(self, html=Undefined, target=Undefined, encoding=Undefined): pass
    def _parse_whole(self, *args, **kwargs): pass
    def _setevents(self, *args, **kwargs): pass
    def close(self, *args, **kwargs): pass
    def doctype(self, name, pubid, system): pass
    def feed(self, data): pass
github python / mypy / stubs / 3.2 / http / cookiejar.py View on Github external
def return_ok_secure(self, cookie, request): pass
    def return_ok_expires(self, cookie, request): pass
    def return_ok_port(self, cookie, request): pass
    def return_ok_domain(self, cookie, request): pass
    def domain_return_ok(self, domain, request): pass
    def path_return_ok(self, path, request): pass

class Absent: pass

class CookieJar:
    non_word_re = Undefined(Any)
    quote_re = Undefined(Any)
    strict_domain_re = Undefined(Any)
    domain_re = Undefined(Any)
    dots_re = Undefined(Any)
    magic_re = Undefined(Any)
    def __init__(self, policy=None): pass
    def set_policy(self, policy): pass
    def add_cookie_header(self, request): pass
    def make_cookies(self, response, request): pass
    def set_cookie_if_ok(self, cookie, request): pass
    def set_cookie(self, cookie): pass
    def extract_cookies(self, response, request): pass
    def clear(self, domain=None, path=None, name=None): pass
    def clear_session_cookies(self): pass
    def clear_expired_cookies(self): pass
    def __iter__(self): pass
    def __len__(self): pass

class LoadError(OSError): pass

class FileCookieJar(CookieJar):