├── .github
└── workflows
│ ├── publish.yml
│ └── test.yml
├── .gitignore
├── .pre-commit-config.yaml
├── LICENSE
├── README.rst
├── pyproject.toml
├── setup.py
├── tests
├── site-packages
│ ├── nostubs
│ │ └── __init__.pyi
│ ├── thirdparty-stubs
│ │ └── __init__.pyi
│ ├── thirdparty
│ │ └── __init__.pyi
│ └── usedotpy
│ │ ├── __init__.py
│ │ └── stub.pyi
├── test.py
└── typeshed
│ ├── @python2
│ ├── lib.pyi
│ ├── py2only.pyi
│ └── subdir.pyi
│ ├── VERSIONS
│ ├── about.pyi
│ ├── conditions.pyi
│ ├── dunder_all.pyi
│ ├── ifmypy.pyi
│ ├── importabout.pyi
│ ├── imported.pyi
│ ├── lib.pyi
│ ├── new37.pyi
│ ├── other.pyi
│ ├── overloads.pyi
│ ├── simple.pyi
│ ├── starimport.pyi
│ ├── starimportall.pyi
│ ├── subdir
│ ├── __init__.pyi
│ ├── overloads.pyi
│ ├── sibling.pyi
│ └── subsubdir
│ │ ├── __init__.pyi
│ │ └── sibling.pyi
│ ├── top_level_assert.pyi
│ ├── tryexcept.pyi
│ └── tupleall.pyi
├── typeshed_client
├── __init__.py
├── finder.py
├── parser.py
├── py.typed
├── resolver.py
└── typeshed
│ ├── VERSIONS
│ ├── __future__.pyi
│ ├── __main__.pyi
│ ├── _ast.pyi
│ ├── _bisect.pyi
│ ├── _bootlocale.pyi
│ ├── _codecs.pyi
│ ├── _collections_abc.pyi
│ ├── _compat_pickle.pyi
│ ├── _compression.pyi
│ ├── _csv.pyi
│ ├── _ctypes.pyi
│ ├── _curses.pyi
│ ├── _decimal.pyi
│ ├── _dummy_thread.pyi
│ ├── _dummy_threading.pyi
│ ├── _heapq.pyi
│ ├── _imp.pyi
│ ├── _interpchannels.pyi
│ ├── _interpqueues.pyi
│ ├── _interpreters.pyi
│ ├── _json.pyi
│ ├── _locale.pyi
│ ├── _lsprof.pyi
│ ├── _markupbase.pyi
│ ├── _msi.pyi
│ ├── _operator.pyi
│ ├── _osx_support.pyi
│ ├── _posixsubprocess.pyi
│ ├── _py_abc.pyi
│ ├── _pydecimal.pyi
│ ├── _random.pyi
│ ├── _sitebuiltins.pyi
│ ├── _socket.pyi
│ ├── _stat.pyi
│ ├── _thread.pyi
│ ├── _threading_local.pyi
│ ├── _tkinter.pyi
│ ├── _tracemalloc.pyi
│ ├── _typeshed
│ ├── README.md
│ ├── __init__.pyi
│ ├── dbapi.pyi
│ ├── importlib.pyi
│ ├── wsgi.pyi
│ └── xml.pyi
│ ├── _warnings.pyi
│ ├── _weakref.pyi
│ ├── _weakrefset.pyi
│ ├── _winapi.pyi
│ ├── abc.pyi
│ ├── aifc.pyi
│ ├── antigravity.pyi
│ ├── argparse.pyi
│ ├── array.pyi
│ ├── ast.pyi
│ ├── asynchat.pyi
│ ├── asyncio
│ ├── __init__.pyi
│ ├── base_events.pyi
│ ├── base_futures.pyi
│ ├── base_subprocess.pyi
│ ├── base_tasks.pyi
│ ├── constants.pyi
│ ├── coroutines.pyi
│ ├── events.pyi
│ ├── exceptions.pyi
│ ├── format_helpers.pyi
│ ├── futures.pyi
│ ├── locks.pyi
│ ├── log.pyi
│ ├── mixins.pyi
│ ├── proactor_events.pyi
│ ├── protocols.pyi
│ ├── queues.pyi
│ ├── runners.pyi
│ ├── selector_events.pyi
│ ├── sslproto.pyi
│ ├── staggered.pyi
│ ├── streams.pyi
│ ├── subprocess.pyi
│ ├── taskgroups.pyi
│ ├── tasks.pyi
│ ├── threads.pyi
│ ├── timeouts.pyi
│ ├── transports.pyi
│ ├── trsock.pyi
│ ├── unix_events.pyi
│ ├── windows_events.pyi
│ └── windows_utils.pyi
│ ├── asyncore.pyi
│ ├── atexit.pyi
│ ├── audioop.pyi
│ ├── base64.pyi
│ ├── bdb.pyi
│ ├── binascii.pyi
│ ├── binhex.pyi
│ ├── bisect.pyi
│ ├── builtins.pyi
│ ├── bz2.pyi
│ ├── cProfile.pyi
│ ├── calendar.pyi
│ ├── cgi.pyi
│ ├── cgitb.pyi
│ ├── chunk.pyi
│ ├── cmath.pyi
│ ├── cmd.pyi
│ ├── code.pyi
│ ├── codecs.pyi
│ ├── codeop.pyi
│ ├── collections
│ ├── __init__.pyi
│ └── abc.pyi
│ ├── colorsys.pyi
│ ├── compileall.pyi
│ ├── concurrent
│ ├── __init__.pyi
│ └── futures
│ │ ├── __init__.pyi
│ │ ├── _base.pyi
│ │ ├── process.pyi
│ │ └── thread.pyi
│ ├── configparser.pyi
│ ├── contextlib.pyi
│ ├── contextvars.pyi
│ ├── copy.pyi
│ ├── copyreg.pyi
│ ├── crypt.pyi
│ ├── csv.pyi
│ ├── ctypes
│ ├── __init__.pyi
│ ├── _endian.pyi
│ ├── util.pyi
│ └── wintypes.pyi
│ ├── curses
│ ├── __init__.pyi
│ ├── ascii.pyi
│ ├── has_key.pyi
│ ├── panel.pyi
│ └── textpad.pyi
│ ├── dataclasses.pyi
│ ├── datetime.pyi
│ ├── dbm
│ ├── __init__.pyi
│ ├── dumb.pyi
│ ├── gnu.pyi
│ ├── ndbm.pyi
│ └── sqlite3.pyi
│ ├── decimal.pyi
│ ├── difflib.pyi
│ ├── dis.pyi
│ ├── distutils
│ ├── __init__.pyi
│ ├── archive_util.pyi
│ ├── bcppcompiler.pyi
│ ├── ccompiler.pyi
│ ├── cmd.pyi
│ ├── command
│ │ ├── __init__.pyi
│ │ ├── bdist.pyi
│ │ ├── bdist_dumb.pyi
│ │ ├── bdist_msi.pyi
│ │ ├── bdist_packager.pyi
│ │ ├── bdist_rpm.pyi
│ │ ├── bdist_wininst.pyi
│ │ ├── build.pyi
│ │ ├── build_clib.pyi
│ │ ├── build_ext.pyi
│ │ ├── build_py.pyi
│ │ ├── build_scripts.pyi
│ │ ├── check.pyi
│ │ ├── clean.pyi
│ │ ├── config.pyi
│ │ ├── install.pyi
│ │ ├── install_data.pyi
│ │ ├── install_egg_info.pyi
│ │ ├── install_headers.pyi
│ │ ├── install_lib.pyi
│ │ ├── install_scripts.pyi
│ │ ├── register.pyi
│ │ ├── sdist.pyi
│ │ └── upload.pyi
│ ├── config.pyi
│ ├── core.pyi
│ ├── cygwinccompiler.pyi
│ ├── debug.pyi
│ ├── dep_util.pyi
│ ├── dir_util.pyi
│ ├── dist.pyi
│ ├── errors.pyi
│ ├── extension.pyi
│ ├── fancy_getopt.pyi
│ ├── file_util.pyi
│ ├── filelist.pyi
│ ├── log.pyi
│ ├── msvccompiler.pyi
│ ├── spawn.pyi
│ ├── sysconfig.pyi
│ ├── text_file.pyi
│ ├── unixccompiler.pyi
│ ├── util.pyi
│ └── version.pyi
│ ├── doctest.pyi
│ ├── dummy_threading.pyi
│ ├── email
│ ├── __init__.pyi
│ ├── _header_value_parser.pyi
│ ├── _policybase.pyi
│ ├── base64mime.pyi
│ ├── charset.pyi
│ ├── contentmanager.pyi
│ ├── encoders.pyi
│ ├── errors.pyi
│ ├── feedparser.pyi
│ ├── generator.pyi
│ ├── header.pyi
│ ├── headerregistry.pyi
│ ├── iterators.pyi
│ ├── message.pyi
│ ├── mime
│ │ ├── __init__.pyi
│ │ ├── application.pyi
│ │ ├── audio.pyi
│ │ ├── base.pyi
│ │ ├── image.pyi
│ │ ├── message.pyi
│ │ ├── multipart.pyi
│ │ ├── nonmultipart.pyi
│ │ └── text.pyi
│ ├── parser.pyi
│ ├── policy.pyi
│ ├── quoprimime.pyi
│ └── utils.pyi
│ ├── encodings
│ ├── __init__.pyi
│ ├── utf_8.pyi
│ └── utf_8_sig.pyi
│ ├── ensurepip
│ └── __init__.pyi
│ ├── enum.pyi
│ ├── errno.pyi
│ ├── faulthandler.pyi
│ ├── fcntl.pyi
│ ├── filecmp.pyi
│ ├── fileinput.pyi
│ ├── fnmatch.pyi
│ ├── formatter.pyi
│ ├── fractions.pyi
│ ├── ftplib.pyi
│ ├── functools.pyi
│ ├── gc.pyi
│ ├── genericpath.pyi
│ ├── getopt.pyi
│ ├── getpass.pyi
│ ├── gettext.pyi
│ ├── glob.pyi
│ ├── graphlib.pyi
│ ├── grp.pyi
│ ├── gzip.pyi
│ ├── hashlib.pyi
│ ├── heapq.pyi
│ ├── hmac.pyi
│ ├── html
│ ├── __init__.pyi
│ ├── entities.pyi
│ └── parser.pyi
│ ├── http
│ ├── __init__.pyi
│ ├── client.pyi
│ ├── cookiejar.pyi
│ ├── cookies.pyi
│ └── server.pyi
│ ├── imaplib.pyi
│ ├── imghdr.pyi
│ ├── imp.pyi
│ ├── importlib
│ ├── __init__.pyi
│ ├── _abc.pyi
│ ├── abc.pyi
│ ├── machinery.pyi
│ ├── metadata
│ │ ├── __init__.pyi
│ │ ├── _meta.pyi
│ │ └── diagnose.pyi
│ ├── readers.pyi
│ ├── resources
│ │ ├── __init__.pyi
│ │ ├── abc.pyi
│ │ ├── readers.pyi
│ │ └── simple.pyi
│ ├── simple.pyi
│ └── util.pyi
│ ├── inspect.pyi
│ ├── io.pyi
│ ├── ipaddress.pyi
│ ├── itertools.pyi
│ ├── json
│ ├── __init__.pyi
│ ├── decoder.pyi
│ ├── encoder.pyi
│ └── tool.pyi
│ ├── keyword.pyi
│ ├── lib2to3
│ ├── __init__.pyi
│ ├── btm_matcher.pyi
│ ├── fixer_base.pyi
│ ├── fixes
│ │ ├── __init__.pyi
│ │ ├── fix_apply.pyi
│ │ ├── fix_asserts.pyi
│ │ ├── fix_basestring.pyi
│ │ ├── fix_buffer.pyi
│ │ ├── fix_dict.pyi
│ │ ├── fix_except.pyi
│ │ ├── fix_exec.pyi
│ │ ├── fix_execfile.pyi
│ │ ├── fix_exitfunc.pyi
│ │ ├── fix_filter.pyi
│ │ ├── fix_funcattrs.pyi
│ │ ├── fix_future.pyi
│ │ ├── fix_getcwdu.pyi
│ │ ├── fix_has_key.pyi
│ │ ├── fix_idioms.pyi
│ │ ├── fix_import.pyi
│ │ ├── fix_imports.pyi
│ │ ├── fix_imports2.pyi
│ │ ├── fix_input.pyi
│ │ ├── fix_intern.pyi
│ │ ├── fix_isinstance.pyi
│ │ ├── fix_itertools.pyi
│ │ ├── fix_itertools_imports.pyi
│ │ ├── fix_long.pyi
│ │ ├── fix_map.pyi
│ │ ├── fix_metaclass.pyi
│ │ ├── fix_methodattrs.pyi
│ │ ├── fix_ne.pyi
│ │ ├── fix_next.pyi
│ │ ├── fix_nonzero.pyi
│ │ ├── fix_numliterals.pyi
│ │ ├── fix_operator.pyi
│ │ ├── fix_paren.pyi
│ │ ├── fix_print.pyi
│ │ ├── fix_raise.pyi
│ │ ├── fix_raw_input.pyi
│ │ ├── fix_reduce.pyi
│ │ ├── fix_reload.pyi
│ │ ├── fix_renames.pyi
│ │ ├── fix_repr.pyi
│ │ ├── fix_set_literal.pyi
│ │ ├── fix_standarderror.pyi
│ │ ├── fix_sys_exc.pyi
│ │ ├── fix_throw.pyi
│ │ ├── fix_tuple_params.pyi
│ │ ├── fix_types.pyi
│ │ ├── fix_unicode.pyi
│ │ ├── fix_urllib.pyi
│ │ ├── fix_ws_comma.pyi
│ │ ├── fix_xrange.pyi
│ │ ├── fix_xreadlines.pyi
│ │ └── fix_zip.pyi
│ ├── main.pyi
│ ├── pgen2
│ │ ├── __init__.pyi
│ │ ├── driver.pyi
│ │ ├── grammar.pyi
│ │ ├── literals.pyi
│ │ ├── parse.pyi
│ │ ├── pgen.pyi
│ │ ├── token.pyi
│ │ └── tokenize.pyi
│ ├── pygram.pyi
│ ├── pytree.pyi
│ └── refactor.pyi
│ ├── linecache.pyi
│ ├── locale.pyi
│ ├── logging
│ ├── __init__.pyi
│ ├── config.pyi
│ └── handlers.pyi
│ ├── lzma.pyi
│ ├── mailbox.pyi
│ ├── mailcap.pyi
│ ├── marshal.pyi
│ ├── math.pyi
│ ├── mimetypes.pyi
│ ├── mmap.pyi
│ ├── modulefinder.pyi
│ ├── msilib
│ ├── __init__.pyi
│ ├── schema.pyi
│ ├── sequence.pyi
│ └── text.pyi
│ ├── msvcrt.pyi
│ ├── multiprocessing
│ ├── __init__.pyi
│ ├── connection.pyi
│ ├── context.pyi
│ ├── dummy
│ │ ├── __init__.pyi
│ │ └── connection.pyi
│ ├── forkserver.pyi
│ ├── heap.pyi
│ ├── managers.pyi
│ ├── pool.pyi
│ ├── popen_fork.pyi
│ ├── popen_forkserver.pyi
│ ├── popen_spawn_posix.pyi
│ ├── popen_spawn_win32.pyi
│ ├── process.pyi
│ ├── queues.pyi
│ ├── reduction.pyi
│ ├── resource_sharer.pyi
│ ├── resource_tracker.pyi
│ ├── shared_memory.pyi
│ ├── sharedctypes.pyi
│ ├── spawn.pyi
│ ├── synchronize.pyi
│ └── util.pyi
│ ├── netrc.pyi
│ ├── nis.pyi
│ ├── nntplib.pyi
│ ├── nt.pyi
│ ├── ntpath.pyi
│ ├── nturl2path.pyi
│ ├── numbers.pyi
│ ├── opcode.pyi
│ ├── operator.pyi
│ ├── optparse.pyi
│ ├── os
│ ├── __init__.pyi
│ └── path.pyi
│ ├── ossaudiodev.pyi
│ ├── parser.pyi
│ ├── pathlib.pyi
│ ├── pdb.pyi
│ ├── pickle.pyi
│ ├── pickletools.pyi
│ ├── pipes.pyi
│ ├── pkgutil.pyi
│ ├── platform.pyi
│ ├── plistlib.pyi
│ ├── poplib.pyi
│ ├── posix.pyi
│ ├── posixpath.pyi
│ ├── pprint.pyi
│ ├── profile.pyi
│ ├── pstats.pyi
│ ├── pty.pyi
│ ├── pwd.pyi
│ ├── py_compile.pyi
│ ├── pyclbr.pyi
│ ├── pydoc.pyi
│ ├── pydoc_data
│ ├── __init__.pyi
│ └── topics.pyi
│ ├── pyexpat
│ ├── __init__.pyi
│ ├── errors.pyi
│ └── model.pyi
│ ├── queue.pyi
│ ├── quopri.pyi
│ ├── random.pyi
│ ├── re.pyi
│ ├── readline.pyi
│ ├── reprlib.pyi
│ ├── resource.pyi
│ ├── rlcompleter.pyi
│ ├── runpy.pyi
│ ├── sched.pyi
│ ├── secrets.pyi
│ ├── select.pyi
│ ├── selectors.pyi
│ ├── shelve.pyi
│ ├── shlex.pyi
│ ├── shutil.pyi
│ ├── signal.pyi
│ ├── site.pyi
│ ├── smtpd.pyi
│ ├── smtplib.pyi
│ ├── sndhdr.pyi
│ ├── socket.pyi
│ ├── socketserver.pyi
│ ├── spwd.pyi
│ ├── sqlite3
│ ├── __init__.pyi
│ └── dbapi2.pyi
│ ├── sre_compile.pyi
│ ├── sre_constants.pyi
│ ├── sre_parse.pyi
│ ├── ssl.pyi
│ ├── stat.pyi
│ ├── statistics.pyi
│ ├── string.pyi
│ ├── stringprep.pyi
│ ├── struct.pyi
│ ├── subprocess.pyi
│ ├── sunau.pyi
│ ├── symbol.pyi
│ ├── symtable.pyi
│ ├── sys
│ ├── __init__.pyi
│ └── _monitoring.pyi
│ ├── sysconfig.pyi
│ ├── syslog.pyi
│ ├── tabnanny.pyi
│ ├── tarfile.pyi
│ ├── telnetlib.pyi
│ ├── tempfile.pyi
│ ├── termios.pyi
│ ├── textwrap.pyi
│ ├── this.pyi
│ ├── threading.pyi
│ ├── time.pyi
│ ├── timeit.pyi
│ ├── tkinter
│ ├── __init__.pyi
│ ├── colorchooser.pyi
│ ├── commondialog.pyi
│ ├── constants.pyi
│ ├── dialog.pyi
│ ├── dnd.pyi
│ ├── filedialog.pyi
│ ├── font.pyi
│ ├── messagebox.pyi
│ ├── scrolledtext.pyi
│ ├── simpledialog.pyi
│ ├── tix.pyi
│ └── ttk.pyi
│ ├── token.pyi
│ ├── tokenize.pyi
│ ├── tomllib.pyi
│ ├── trace.pyi
│ ├── traceback.pyi
│ ├── tracemalloc.pyi
│ ├── tty.pyi
│ ├── turtle.pyi
│ ├── types.pyi
│ ├── typing.pyi
│ ├── typing_extensions.pyi
│ ├── unicodedata.pyi
│ ├── unittest
│ ├── __init__.pyi
│ ├── _log.pyi
│ ├── async_case.pyi
│ ├── case.pyi
│ ├── loader.pyi
│ ├── main.pyi
│ ├── mock.pyi
│ ├── result.pyi
│ ├── runner.pyi
│ ├── signals.pyi
│ ├── suite.pyi
│ └── util.pyi
│ ├── urllib
│ ├── __init__.pyi
│ ├── error.pyi
│ ├── parse.pyi
│ ├── request.pyi
│ ├── response.pyi
│ └── robotparser.pyi
│ ├── uu.pyi
│ ├── uuid.pyi
│ ├── venv
│ └── __init__.pyi
│ ├── warnings.pyi
│ ├── wave.pyi
│ ├── weakref.pyi
│ ├── webbrowser.pyi
│ ├── winreg.pyi
│ ├── winsound.pyi
│ ├── wsgiref
│ ├── __init__.pyi
│ ├── handlers.pyi
│ ├── headers.pyi
│ ├── simple_server.pyi
│ ├── types.pyi
│ ├── util.pyi
│ └── validate.pyi
│ ├── xdrlib.pyi
│ ├── xml
│ ├── __init__.pyi
│ ├── dom
│ │ ├── NodeFilter.pyi
│ │ ├── __init__.pyi
│ │ ├── domreg.pyi
│ │ ├── expatbuilder.pyi
│ │ ├── minicompat.pyi
│ │ ├── minidom.pyi
│ │ ├── pulldom.pyi
│ │ └── xmlbuilder.pyi
│ ├── etree
│ │ ├── ElementInclude.pyi
│ │ ├── ElementPath.pyi
│ │ ├── ElementTree.pyi
│ │ ├── __init__.pyi
│ │ └── cElementTree.pyi
│ ├── parsers
│ │ ├── __init__.pyi
│ │ └── expat
│ │ │ ├── __init__.pyi
│ │ │ ├── errors.pyi
│ │ │ └── model.pyi
│ └── sax
│ │ ├── __init__.pyi
│ │ ├── _exceptions.pyi
│ │ ├── handler.pyi
│ │ ├── saxutils.pyi
│ │ └── xmlreader.pyi
│ ├── xmlrpc
│ ├── __init__.pyi
│ ├── client.pyi
│ └── server.pyi
│ ├── xxlimited.pyi
│ ├── zipapp.pyi
│ ├── zipfile
│ ├── __init__.pyi
│ └── _path.pyi
│ ├── zipimport.pyi
│ ├── zlib.pyi
│ └── zoneinfo
│ └── __init__.pyi
└── update_bundled.py
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | # Based on
2 | # https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3 |
4 | name: Publish Python distributions to PyPI and TestPyPI
5 |
6 | on: push
7 |
8 | jobs:
9 | build-n-publish:
10 | name: Build and publish Python distributions to PyPI and TestPyPI
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v3
14 | - name: Set up Python 3.13
15 | uses: actions/setup-python@v4
16 | with:
17 | python-version: "3.13"
18 | - name: Install pypa/build
19 | run: >-
20 | python -m
21 | pip install
22 | build
23 | --user
24 | - name: Build a binary wheel and a source tarball
25 | run: >-
26 | python -m
27 | build
28 | --sdist
29 | --wheel
30 | --outdir dist/
31 | .
32 | - name: Publish distribution to PyPI
33 | if: startsWith(github.ref, 'refs/tags')
34 | uses: pypa/gh-action-pypi-publish@master
35 | with:
36 | password: ${{ secrets.PYPI_API_TOKEN }}
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__/
2 | .tox/
3 | .mypy_cache/
4 | dist/
5 | build/
6 | typeshed_client.egg-info/
7 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | repos:
2 | - repo: https://github.com/astral-sh/ruff-pre-commit
3 | rev: v0.11.10
4 | hooks:
5 | - id: ruff
6 | args: [--fix]
7 |
8 | - repo: https://github.com/psf/black
9 | rev: 25.1.0
10 | hooks:
11 | - id: black
12 | language_version: python3.12
13 |
14 | - repo: https://github.com/pre-commit/mirrors-prettier
15 | rev: v4.0.0-alpha.8
16 | hooks:
17 | - id: prettier
18 |
19 | - repo: https://github.com/pre-commit/pre-commit-hooks
20 | rev: v4.6.0
21 | hooks:
22 | - id: end-of-file-fixer
23 | - id: trailing-whitespace
24 |
25 | ci:
26 | autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
27 | autofix_prs: true
28 | autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
29 | autoupdate_schedule: quarterly
30 | submodules: false
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2017 Jelle Zijlstra
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tests/site-packages/nostubs/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/site-packages/nostubs/__init__.pyi
--------------------------------------------------------------------------------
/tests/site-packages/thirdparty-stubs/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/site-packages/thirdparty-stubs/__init__.pyi
--------------------------------------------------------------------------------
/tests/site-packages/thirdparty/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/site-packages/thirdparty/__init__.pyi
--------------------------------------------------------------------------------
/tests/site-packages/usedotpy/__init__.py:
--------------------------------------------------------------------------------
1 | from .stub import obj as obj
2 |
--------------------------------------------------------------------------------
/tests/site-packages/usedotpy/stub.pyi:
--------------------------------------------------------------------------------
1 | obj: float
2 |
--------------------------------------------------------------------------------
/tests/typeshed/@python2/lib.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/typeshed/@python2/lib.pyi
--------------------------------------------------------------------------------
/tests/typeshed/@python2/py2only.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/typeshed/@python2/py2only.pyi
--------------------------------------------------------------------------------
/tests/typeshed/@python2/subdir.pyi:
--------------------------------------------------------------------------------
1 | x: int
2 |
--------------------------------------------------------------------------------
/tests/typeshed/VERSIONS:
--------------------------------------------------------------------------------
1 | # comment on a line by itself
2 |
3 | top_level_assert: 2.7 # inline comment: 3.6
4 | lib: 2.7
5 | conditions: 2.7
6 | new37: 3.7
7 | py2only: 2.7
8 | simple: 3.5
9 | other: 3.5
10 | overloads: 3.5
11 | ifmypy: 3.5-
12 | subdir: 2.7
13 | starimport: 3.5
14 | imported: 3.5
15 | dunder_all: 3.5-
16 | about: 3.5-
17 | importabout: 3.5-
18 | tupleall: 3.5-
19 | starimportall: 3.5-
20 | tryexcept: 3.5-
21 |
--------------------------------------------------------------------------------
/tests/typeshed/about.pyi:
--------------------------------------------------------------------------------
1 | __about__ = "a bout"
2 | x: int
3 |
--------------------------------------------------------------------------------
/tests/typeshed/conditions.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.platform == "win32":
4 | windows: int
5 | elif sys.platform == "darwin":
6 | apples: int
7 | else:
8 | penguins: int
9 |
10 | if sys.version_info >= (3, 6):
11 | async_generator: int
12 | elif sys.version_info >= (3, 5):
13 | typing: int
14 | elif sys.version_info >= (3, 4):
15 | asyncio: int
16 | elif sys.version_info >= (3, 3):
17 | yield_from: int
18 | else:
19 | ages_long_past: int
20 |
21 | if sys.version_info < (3, 0):
22 | old_stuff: int
23 | else:
24 | new_stuff: int
25 |
26 | if sys.version_info[0] == 2:
27 | more_old_stuff: int
28 |
--------------------------------------------------------------------------------
/tests/typeshed/dunder_all.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | __all__ = ["a", "b"]
4 |
5 | if sys.version_info >= (3, 10):
6 | __all__ += ["c"]
7 | else:
8 | __all__ += ["d"]
9 |
10 | a: int
11 | b: int
12 | c: int
13 | d: int
14 | e: int
15 |
16 | if sys.version_info >= (3, 10):
17 | __all__.append("f")
18 | else:
19 | __all__.append("g")
20 |
21 | f: int
22 | g: int
23 |
24 | if sys.version_info >= (3, 10):
25 | __all__.extend(["h"])
26 | else:
27 | __all__.extend(["i"])
28 |
29 | h: int
30 | i: int
31 |
--------------------------------------------------------------------------------
/tests/typeshed/ifmypy.pyi:
--------------------------------------------------------------------------------
1 | MYPY = False
2 |
3 | if MYPY:
4 | we_are_mypy: bool
5 | else:
6 | we_are_not_mypy: bool
7 |
--------------------------------------------------------------------------------
/tests/typeshed/importabout.pyi:
--------------------------------------------------------------------------------
1 | from about import *
2 |
--------------------------------------------------------------------------------
/tests/typeshed/imported.pyi:
--------------------------------------------------------------------------------
1 | public: int
2 | _private: int
3 |
--------------------------------------------------------------------------------
/tests/typeshed/lib.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/typeshed/lib.pyi
--------------------------------------------------------------------------------
/tests/typeshed/new37.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/tests/typeshed/new37.pyi
--------------------------------------------------------------------------------
/tests/typeshed/other.pyi:
--------------------------------------------------------------------------------
1 | unexported: int
2 | exported: int
3 | renamed: int
4 | made_private: int
5 |
--------------------------------------------------------------------------------
/tests/typeshed/overloads.pyi:
--------------------------------------------------------------------------------
1 | from typing import overload
2 |
3 | @overload
4 | def overloaded(x: int) -> None: ...
5 | @overload
6 | def overloaded(x: str) -> str: ...
7 |
8 | class OverloadClass:
9 | @overload
10 | def overloaded(x: int) -> None: ...
11 | @overload
12 | def overloaded(x: str) -> str: ...
13 |
--------------------------------------------------------------------------------
/tests/typeshed/simple.pyi:
--------------------------------------------------------------------------------
1 | import other
2 | from other import (
3 | unexported,
4 | exported as exported,
5 | renamed as new_name,
6 | made_private as _made_private,
7 | )
8 |
9 | _private: int
10 |
11 | var: int
12 | old_var = ... # type: int
13 | multiple = assignment = exported
14 |
15 | def func() -> None: ...
16 | async def async_func() -> None: ...
17 |
18 | class Cls:
19 | attr: int
20 | def method(self) -> None: ...
21 |
--------------------------------------------------------------------------------
/tests/typeshed/starimport.pyi:
--------------------------------------------------------------------------------
1 | from imported import *
2 |
--------------------------------------------------------------------------------
/tests/typeshed/starimportall.pyi:
--------------------------------------------------------------------------------
1 | from dunder_all import *
2 | from tupleall import *
3 |
--------------------------------------------------------------------------------
/tests/typeshed/subdir/__init__.pyi:
--------------------------------------------------------------------------------
1 | from .overloads import f as f
2 | from . import overloads as overloads
3 |
--------------------------------------------------------------------------------
/tests/typeshed/subdir/overloads.pyi:
--------------------------------------------------------------------------------
1 | def f() -> int: ...
2 |
--------------------------------------------------------------------------------
/tests/typeshed/subdir/sibling.pyi:
--------------------------------------------------------------------------------
1 | from .overloads import f as f
2 | from . import overloads as overloads
3 |
--------------------------------------------------------------------------------
/tests/typeshed/subdir/subsubdir/__init__.pyi:
--------------------------------------------------------------------------------
1 | from ..overloads import f as f
2 | from .. import overloads as overloads
3 |
--------------------------------------------------------------------------------
/tests/typeshed/subdir/subsubdir/sibling.pyi:
--------------------------------------------------------------------------------
1 | from ..overloads import f as f
2 | from .. import overloads as overloads
3 |
--------------------------------------------------------------------------------
/tests/typeshed/top_level_assert.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | assert sys.platform == "linux"
4 |
5 | x: int
6 |
--------------------------------------------------------------------------------
/tests/typeshed/tryexcept.pyi:
--------------------------------------------------------------------------------
1 | try:
2 | import numpy as np
3 |
4 | def f(x: np.int64) -> np.int64: ...
5 |
6 | except ImportError:
7 | pass
8 | finally:
9 | x: int
10 |
--------------------------------------------------------------------------------
/tests/typeshed/tupleall.pyi:
--------------------------------------------------------------------------------
1 | __all__ = ("n",)
2 | n: int
3 | o: int
4 |
--------------------------------------------------------------------------------
/typeshed_client/__init__.py:
--------------------------------------------------------------------------------
1 | """Package for retrieving data from typeshed."""
2 |
3 | # Exported names
4 | from .finder import (
5 | ModulePath,
6 | SearchContext,
7 | get_all_stub_files,
8 | get_search_context,
9 | get_stub_ast,
10 | get_stub_file,
11 | )
12 | from .parser import (
13 | ImportedName,
14 | NameDict,
15 | NameInfo,
16 | OverloadedName,
17 | get_stub_names,
18 | parse_ast,
19 | )
20 | from .resolver import ImportedInfo, Resolver
21 |
22 | __version__ = "2.7.0"
23 |
24 |
25 | __all__ = [
26 | "ImportedInfo",
27 | "ImportedName",
28 | "ModulePath",
29 | "NameDict",
30 | "NameInfo",
31 | "OverloadedName",
32 | "Resolver",
33 | "SearchContext",
34 | "__version__",
35 | "get_all_stub_files",
36 | "get_search_context",
37 | "get_stub_ast",
38 | "get_stub_file",
39 | "get_stub_names",
40 | "parse_ast",
41 | ]
42 |
--------------------------------------------------------------------------------
/typeshed_client/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/py.typed
--------------------------------------------------------------------------------
/typeshed_client/typeshed/__future__.pyi:
--------------------------------------------------------------------------------
1 | from typing_extensions import TypeAlias
2 |
3 | _VersionInfo: TypeAlias = tuple[int, int, int, str, int]
4 |
5 | class _Feature:
6 | def __init__(self, optionalRelease: _VersionInfo, mandatoryRelease: _VersionInfo | None, compiler_flag: int) -> None: ...
7 | def getOptionalRelease(self) -> _VersionInfo: ...
8 | def getMandatoryRelease(self) -> _VersionInfo | None: ...
9 | compiler_flag: int
10 |
11 | absolute_import: _Feature
12 | division: _Feature
13 | generators: _Feature
14 | nested_scopes: _Feature
15 | print_function: _Feature
16 | unicode_literals: _Feature
17 | with_statement: _Feature
18 | barry_as_FLUFL: _Feature
19 | generator_stop: _Feature
20 | annotations: _Feature
21 |
22 | all_feature_names: list[str] # undocumented
23 |
24 | __all__ = [
25 | "all_feature_names",
26 | "absolute_import",
27 | "division",
28 | "generators",
29 | "nested_scopes",
30 | "print_function",
31 | "unicode_literals",
32 | "with_statement",
33 | "barry_as_FLUFL",
34 | "generator_stop",
35 | "annotations",
36 | ]
37 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/__main__.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | def __getattr__(name: str) -> Any: ...
4 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_bootlocale.pyi:
--------------------------------------------------------------------------------
1 | def getpreferredencoding(do_setlocale: bool = True) -> str: ...
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_compat_pickle.pyi:
--------------------------------------------------------------------------------
1 | IMPORT_MAPPING: dict[str, str]
2 | NAME_MAPPING: dict[tuple[str, str], tuple[str, str]]
3 | PYTHON2_EXCEPTIONS: tuple[str, ...]
4 | MULTIPROCESSING_EXCEPTIONS: tuple[str, ...]
5 | REVERSE_IMPORT_MAPPING: dict[str, str]
6 | REVERSE_NAME_MAPPING: dict[tuple[str, str], tuple[str, str]]
7 | PYTHON3_OSERROR_EXCEPTIONS: tuple[str, ...]
8 | PYTHON3_IMPORTERROR_EXCEPTIONS: tuple[str, ...]
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_compression.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import WriteableBuffer
2 | from collections.abc import Callable
3 | from io import DEFAULT_BUFFER_SIZE, BufferedIOBase, RawIOBase
4 | from typing import Any, Protocol
5 |
6 | BUFFER_SIZE = DEFAULT_BUFFER_SIZE
7 |
8 | class _Reader(Protocol):
9 | def read(self, n: int, /) -> bytes: ...
10 | def seekable(self) -> bool: ...
11 | def seek(self, n: int, /) -> Any: ...
12 |
13 | class BaseStream(BufferedIOBase): ...
14 |
15 | class DecompressReader(RawIOBase):
16 | def __init__(
17 | self,
18 | fp: _Reader,
19 | decomp_factory: Callable[..., object],
20 | trailing_error: type[Exception] | tuple[type[Exception], ...] = (),
21 | **decomp_args: Any,
22 | ) -> None: ...
23 | def readinto(self, b: WriteableBuffer) -> int: ...
24 | def read(self, size: int = -1) -> bytes: ...
25 | def seek(self, offset: int, whence: int = 0) -> int: ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_dummy_thread.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from types import TracebackType
3 | from typing import Any, NoReturn, overload
4 | from typing_extensions import TypeVarTuple, Unpack
5 |
6 | __all__ = ["error", "start_new_thread", "exit", "get_ident", "allocate_lock", "interrupt_main", "LockType", "RLock"]
7 |
8 | _Ts = TypeVarTuple("_Ts")
9 |
10 | TIMEOUT_MAX: int
11 | error = RuntimeError
12 |
13 | @overload
14 | def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]]) -> None: ...
15 | @overload
16 | def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any]) -> None: ...
17 | def exit() -> NoReturn: ...
18 | def get_ident() -> int: ...
19 | def allocate_lock() -> LockType: ...
20 | def stack_size(size: int | None = None) -> int: ...
21 |
22 | class LockType:
23 | locked_status: bool
24 | def acquire(self, waitflag: bool | None = None, timeout: int = -1) -> bool: ...
25 | def __enter__(self, waitflag: bool | None = None, timeout: int = -1) -> bool: ...
26 | def __exit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ...
27 | def release(self) -> bool: ...
28 | def locked(self) -> bool: ...
29 |
30 | class RLock(LockType):
31 | def release(self) -> None: ... # type: ignore[override]
32 |
33 | def interrupt_main() -> None: ...
34 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_heapq.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any, Final, TypeVar
2 |
3 | _T = TypeVar("_T")
4 |
5 | __about__: Final[str]
6 |
7 | def heapify(heap: list[Any], /) -> None: ...
8 | def heappop(heap: list[_T], /) -> _T: ...
9 | def heappush(heap: list[_T], item: _T, /) -> None: ...
10 | def heappushpop(heap: list[_T], item: _T, /) -> _T: ...
11 | def heapreplace(heap: list[_T], item: _T, /) -> _T: ...
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_imp.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | import types
3 | from _typeshed import ReadableBuffer
4 | from importlib.machinery import ModuleSpec
5 | from typing import Any
6 |
7 | check_hash_based_pycs: str
8 |
9 | def source_hash(key: int, source: ReadableBuffer) -> bytes: ...
10 | def create_builtin(spec: ModuleSpec, /) -> types.ModuleType: ...
11 | def create_dynamic(spec: ModuleSpec, file: Any = None, /) -> types.ModuleType: ...
12 | def acquire_lock() -> None: ...
13 | def exec_builtin(mod: types.ModuleType, /) -> int: ...
14 | def exec_dynamic(mod: types.ModuleType, /) -> int: ...
15 | def extension_suffixes() -> list[str]: ...
16 | def init_frozen(name: str, /) -> types.ModuleType: ...
17 | def is_builtin(name: str, /) -> int: ...
18 | def is_frozen(name: str, /) -> bool: ...
19 | def is_frozen_package(name: str, /) -> bool: ...
20 | def lock_held() -> bool: ...
21 | def release_lock() -> None: ...
22 |
23 | if sys.version_info >= (3, 11):
24 | def find_frozen(name: str, /, *, withdata: bool = False) -> tuple[memoryview | None, bool, str | None] | None: ...
25 | def get_frozen_object(name: str, data: ReadableBuffer | None = None, /) -> types.CodeType: ...
26 |
27 | else:
28 | def get_frozen_object(name: str, /) -> types.CodeType: ...
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_interpqueues.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any, SupportsIndex
2 |
3 | class QueueError(RuntimeError): ...
4 | class QueueNotFoundError(QueueError): ...
5 |
6 | def bind(qid: SupportsIndex) -> None: ...
7 | def create(maxsize: SupportsIndex, fmt: SupportsIndex) -> int: ...
8 | def destroy(qid: SupportsIndex) -> None: ...
9 | def get(qid: SupportsIndex) -> tuple[Any, int]: ...
10 | def get_count(qid: SupportsIndex) -> int: ...
11 | def get_maxsize(qid: SupportsIndex) -> int: ...
12 | def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ...
13 | def is_full(qid: SupportsIndex) -> bool: ...
14 | def list_all() -> list[tuple[int, int]]: ...
15 | def put(qid: SupportsIndex, obj: Any, fmt: SupportsIndex) -> None: ...
16 | def release(qid: SupportsIndex) -> None: ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_lsprof.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import structseq
3 | from collections.abc import Callable
4 | from types import CodeType
5 | from typing import Any, Final, final
6 |
7 | class Profiler:
8 | def __init__(
9 | self, timer: Callable[[], float] | None = None, timeunit: float = 0.0, subcalls: bool = True, builtins: bool = True
10 | ) -> None: ...
11 | def getstats(self) -> list[profiler_entry]: ...
12 | def enable(self, subcalls: bool = True, builtins: bool = True) -> None: ...
13 | def disable(self) -> None: ...
14 | def clear(self) -> None: ...
15 |
16 | @final
17 | class profiler_entry(structseq[Any], tuple[CodeType | str, int, int, float, float, list[profiler_subentry]]):
18 | if sys.version_info >= (3, 10):
19 | __match_args__: Final = ("code", "callcount", "reccallcount", "totaltime", "inlinetime", "calls")
20 | code: CodeType | str
21 | callcount: int
22 | reccallcount: int
23 | totaltime: float
24 | inlinetime: float
25 | calls: list[profiler_subentry]
26 |
27 | @final
28 | class profiler_subentry(structseq[Any], tuple[CodeType | str, int, int, float, float]):
29 | if sys.version_info >= (3, 10):
30 | __match_args__: Final = ("code", "callcount", "reccallcount", "totaltime", "inlinetime")
31 | code: CodeType | str
32 | callcount: int
33 | reccallcount: int
34 | totaltime: float
35 | inlinetime: float
36 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_markupbase.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing import Any
3 |
4 | class ParserBase:
5 | def reset(self) -> None: ...
6 | def getpos(self) -> tuple[int, int]: ...
7 | def unknown_decl(self, data: str) -> None: ...
8 | def parse_comment(self, i: int, report: int = 1) -> int: ... # undocumented
9 | def parse_declaration(self, i: int) -> int: ... # undocumented
10 | def parse_marked_section(self, i: int, report: int = 1) -> int: ... # undocumented
11 | def updatepos(self, i: int, j: int) -> int: ... # undocumented
12 | if sys.version_info < (3, 10):
13 | # Removed from ParserBase: https://bugs.python.org/issue31844
14 | def error(self, message: str) -> Any: ... # undocumented
15 | lineno: int # undocumented
16 | offset: int # undocumented
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_posixsubprocess.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import StrOrBytesPath
3 | from collections.abc import Callable, Sequence
4 | from typing import SupportsIndex
5 |
6 | if sys.platform != "win32":
7 | def cloexec_pipe() -> tuple[int, int]: ...
8 | def fork_exec(
9 | args: Sequence[StrOrBytesPath] | None,
10 | executable_list: Sequence[bytes],
11 | close_fds: bool,
12 | pass_fds: tuple[int, ...],
13 | cwd: str,
14 | env: Sequence[bytes] | None,
15 | p2cread: int,
16 | p2cwrite: int,
17 | c2pread: int,
18 | c2pwrite: int,
19 | errread: int,
20 | errwrite: int,
21 | errpipe_read: int,
22 | errpipe_write: int,
23 | restore_signals: int,
24 | call_setsid: int,
25 | pgid_to_set: int,
26 | gid: SupportsIndex | None,
27 | extra_groups: list[int] | None,
28 | uid: SupportsIndex | None,
29 | child_umask: int,
30 | preexec_fn: Callable[[], None],
31 | allow_vfork: bool,
32 | /,
33 | ) -> int: ...
34 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_py_abc.pyi:
--------------------------------------------------------------------------------
1 | import _typeshed
2 | from typing import Any, NewType, TypeVar
3 |
4 | _T = TypeVar("_T")
5 |
6 | _CacheToken = NewType("_CacheToken", int)
7 |
8 | def get_cache_token() -> _CacheToken: ...
9 |
10 | class ABCMeta(type):
11 | def __new__(
12 | mcls: type[_typeshed.Self], name: str, bases: tuple[type[Any], ...], namespace: dict[str, Any], /
13 | ) -> _typeshed.Self: ...
14 | def register(cls, subclass: type[_T]) -> type[_T]: ...
15 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_pydecimal.pyi:
--------------------------------------------------------------------------------
1 | # This is a slight lie, the implementations aren't exactly identical
2 | # However, in all likelihood, the differences are inconsequential
3 | from _decimal import *
4 |
5 | __all__ = [
6 | "Decimal",
7 | "Context",
8 | "DecimalTuple",
9 | "DefaultContext",
10 | "BasicContext",
11 | "ExtendedContext",
12 | "DecimalException",
13 | "Clamped",
14 | "InvalidOperation",
15 | "DivisionByZero",
16 | "Inexact",
17 | "Rounded",
18 | "Subnormal",
19 | "Overflow",
20 | "Underflow",
21 | "FloatOperation",
22 | "DivisionImpossible",
23 | "InvalidContext",
24 | "ConversionSyntax",
25 | "DivisionUndefined",
26 | "ROUND_DOWN",
27 | "ROUND_HALF_UP",
28 | "ROUND_HALF_EVEN",
29 | "ROUND_CEILING",
30 | "ROUND_FLOOR",
31 | "ROUND_UP",
32 | "ROUND_HALF_DOWN",
33 | "ROUND_05UP",
34 | "setcontext",
35 | "getcontext",
36 | "localcontext",
37 | "MAX_PREC",
38 | "MAX_EMAX",
39 | "MIN_EMIN",
40 | "MIN_ETINY",
41 | "HAVE_THREADS",
42 | "HAVE_CONTEXTVAR",
43 | ]
44 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_random.pyi:
--------------------------------------------------------------------------------
1 | from typing_extensions import TypeAlias
2 |
3 | # Actually Tuple[(int,) * 625]
4 | _State: TypeAlias = tuple[int, ...]
5 |
6 | class Random:
7 | def __init__(self, seed: object = ...) -> None: ...
8 | def seed(self, n: object = None, /) -> None: ...
9 | def getstate(self) -> _State: ...
10 | def setstate(self, state: _State, /) -> None: ...
11 | def random(self) -> float: ...
12 | def getrandbits(self, k: int, /) -> int: ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_sitebuiltins.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable
2 | from typing import ClassVar, Literal, NoReturn
3 |
4 | class Quitter:
5 | name: str
6 | eof: str
7 | def __init__(self, name: str, eof: str) -> None: ...
8 | def __call__(self, code: int | None = None) -> NoReturn: ...
9 |
10 | class _Printer:
11 | MAXLINES: ClassVar[Literal[23]]
12 | def __init__(self, name: str, data: str, files: Iterable[str] = (), dirs: Iterable[str] = ()) -> None: ...
13 | def __call__(self) -> None: ...
14 |
15 | class _Helper:
16 | def __call__(self, request: object) -> None: ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_threading_local.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 | from typing_extensions import TypeAlias
3 | from weakref import ReferenceType
4 |
5 | __all__ = ["local"]
6 | _LocalDict: TypeAlias = dict[Any, Any]
7 |
8 | class _localimpl:
9 | key: str
10 | dicts: dict[int, tuple[ReferenceType[Any], _LocalDict]]
11 | def get_dict(self) -> _LocalDict: ...
12 | def create_dict(self) -> _LocalDict: ...
13 |
14 | class local:
15 | def __getattribute__(self, name: str) -> Any: ...
16 | def __setattr__(self, name: str, value: Any) -> None: ...
17 | def __delattr__(self, name: str) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_tracemalloc.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Sequence
3 | from tracemalloc import _FrameTuple, _TraceTuple
4 |
5 | def _get_object_traceback(obj: object, /) -> Sequence[_FrameTuple] | None: ...
6 | def _get_traces() -> Sequence[_TraceTuple]: ...
7 | def clear_traces() -> None: ...
8 | def get_traceback_limit() -> int: ...
9 | def get_traced_memory() -> tuple[int, int]: ...
10 | def get_tracemalloc_memory() -> int: ...
11 | def is_tracing() -> bool: ...
12 |
13 | if sys.version_info >= (3, 9):
14 | def reset_peak() -> None: ...
15 |
16 | def start(nframe: int = 1, /) -> None: ...
17 | def stop() -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_typeshed/README.md:
--------------------------------------------------------------------------------
1 | # Utility types for typeshed
2 |
3 | This package and its submodules contains various common types used by
4 | typeshed. It can also be used by packages outside typeshed, but beware
5 | the API stability guarantees below.
6 |
7 | ## Usage
8 |
9 | The `_typeshed` package and its types do not exist at runtime, but can be
10 | used freely in stubs (`.pyi`) files. To import the types from this package in
11 | implementation (`.py`) files, use the following construct:
12 |
13 | ```python
14 | from typing import TYPE_CHECKING
15 |
16 | if TYPE_CHECKING:
17 | from _typeshed import ...
18 | ```
19 |
20 | Types can then be used in annotations by either quoting them or
21 | using:
22 |
23 | ```python
24 | from __future__ import annotations
25 | ```
26 |
27 | ## API Stability
28 |
29 | You can use this package and its submodules outside of typeshed, but we
30 | guarantee only limited API stability. Items marked as "stable" will not be
31 | removed or changed in an incompatible way for at least one year.
32 | Before making such a change, the "stable" moniker will be removed
33 | and we will mark the type in question as deprecated. No guarantees
34 | are made about unmarked types.
35 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_typeshed/importlib.pyi:
--------------------------------------------------------------------------------
1 | # Implicit protocols used in importlib.
2 | # We intentionally omit deprecated and optional methods.
3 |
4 | from collections.abc import Sequence
5 | from importlib.machinery import ModuleSpec
6 | from types import ModuleType
7 | from typing import Protocol
8 |
9 | __all__ = ["LoaderProtocol", "MetaPathFinderProtocol", "PathEntryFinderProtocol"]
10 |
11 | class LoaderProtocol(Protocol):
12 | def load_module(self, fullname: str, /) -> ModuleType: ...
13 |
14 | class MetaPathFinderProtocol(Protocol):
15 | def find_spec(self, fullname: str, path: Sequence[str] | None, target: ModuleType | None = ..., /) -> ModuleSpec | None: ...
16 |
17 | class PathEntryFinderProtocol(Protocol):
18 | def find_spec(self, fullname: str, target: ModuleType | None = ..., /) -> ModuleSpec | None: ...
19 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/_typeshed/xml.pyi:
--------------------------------------------------------------------------------
1 | # See the README.md file in this directory for more information.
2 |
3 | from typing import Any, Protocol
4 |
5 | # As defined https://docs.python.org/3/library/xml.dom.html#domimplementation-objects
6 | class DOMImplementation(Protocol):
7 | def hasFeature(self, feature: str, version: str | None, /) -> bool: ...
8 | def createDocument(self, namespaceUri: str, qualifiedName: str, doctype: Any | None, /) -> Any: ...
9 | def createDocumentType(self, qualifiedName: str, publicId: str, systemId: str, /) -> Any: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/antigravity.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import ReadableBuffer
2 |
3 | def geohash(latitude: float, longitude: float, datedow: ReadableBuffer) -> None: ...
4 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asynchat.pyi:
--------------------------------------------------------------------------------
1 | import asyncore
2 | from abc import abstractmethod
3 |
4 | class simple_producer:
5 | def __init__(self, data: bytes, buffer_size: int = 512) -> None: ...
6 | def more(self) -> bytes: ...
7 |
8 | class async_chat(asyncore.dispatcher):
9 | ac_in_buffer_size: int
10 | ac_out_buffer_size: int
11 | @abstractmethod
12 | def collect_incoming_data(self, data: bytes) -> None: ...
13 | @abstractmethod
14 | def found_terminator(self) -> None: ...
15 | def set_terminator(self, term: bytes | int | None) -> None: ...
16 | def get_terminator(self) -> bytes | int | None: ...
17 | def push(self, data: bytes) -> None: ...
18 | def push_with_producer(self, producer: simple_producer) -> None: ...
19 | def close_when_done(self) -> None: ...
20 | def initiate_send(self) -> None: ...
21 | def discard_buffers(self) -> None: ...
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/__init__.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Awaitable, Coroutine, Generator
3 | from typing import Any, TypeVar
4 | from typing_extensions import TypeAlias
5 |
6 | # As at runtime, this depends on all submodules defining __all__ accurately.
7 | from .base_events import *
8 | from .coroutines import *
9 | from .events import *
10 | from .exceptions import *
11 | from .futures import *
12 | from .locks import *
13 | from .protocols import *
14 | from .queues import *
15 | from .runners import *
16 | from .streams import *
17 | from .subprocess import *
18 | from .tasks import *
19 | from .transports import *
20 |
21 | if sys.version_info >= (3, 9):
22 | from .threads import *
23 |
24 | if sys.version_info >= (3, 11):
25 | from .taskgroups import *
26 | from .timeouts import *
27 |
28 | if sys.platform == "win32":
29 | from .windows_events import *
30 | else:
31 | from .unix_events import *
32 |
33 | _T_co = TypeVar("_T_co", covariant=True)
34 |
35 | # Aliases imported by multiple submodules in typeshed
36 | if sys.version_info >= (3, 12):
37 | _AwaitableLike: TypeAlias = Awaitable[_T_co] # noqa: Y047
38 | _CoroutineLike: TypeAlias = Coroutine[Any, Any, _T_co] # noqa: Y047
39 | else:
40 | _AwaitableLike: TypeAlias = Generator[Any, None, _T_co] | Awaitable[_T_co]
41 | _CoroutineLike: TypeAlias = Generator[Any, None, _T_co] | Coroutine[Any, Any, _T_co]
42 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/base_futures.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Sequence
2 | from contextvars import Context
3 | from typing import Any, Final
4 |
5 | from . import futures
6 |
7 | __all__ = ()
8 |
9 | # asyncio defines 'isfuture()' in base_futures.py and re-imports it in futures.py
10 | # but it leads to circular import error in pytype tool.
11 | # That's why the import order is reversed.
12 | from .futures import isfuture as isfuture
13 |
14 | _PENDING: Final = "PENDING" # undocumented
15 | _CANCELLED: Final = "CANCELLED" # undocumented
16 | _FINISHED: Final = "FINISHED" # undocumented
17 |
18 | def _format_callbacks(cb: Sequence[tuple[Callable[[futures.Future[Any]], None], Context]]) -> str: ... # undocumented
19 | def _future_repr_info(future: futures.Future[Any]) -> list[str]: ... # undocumented
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/base_tasks.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath
2 | from types import FrameType
3 | from typing import Any
4 |
5 | from . import tasks
6 |
7 | def _task_repr_info(task: tasks.Task[Any]) -> list[str]: ... # undocumented
8 | def _task_get_stack(task: tasks.Task[Any], limit: int | None) -> list[FrameType]: ... # undocumented
9 | def _task_print_stack(task: tasks.Task[Any], limit: int | None, file: StrOrBytesPath) -> None: ... # undocumented
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/constants.pyi:
--------------------------------------------------------------------------------
1 | import enum
2 | import sys
3 | from typing import Final
4 |
5 | LOG_THRESHOLD_FOR_CONNLOST_WRITES: Final = 5
6 | ACCEPT_RETRY_DELAY: Final = 1
7 | DEBUG_STACK_DEPTH: Final = 10
8 | SSL_HANDSHAKE_TIMEOUT: float
9 | SENDFILE_FALLBACK_READBUFFER_SIZE: Final = 262144
10 | if sys.version_info >= (3, 11):
11 | SSL_SHUTDOWN_TIMEOUT: float
12 | FLOW_CONTROL_HIGH_WATER_SSL_READ: Final = 256
13 | FLOW_CONTROL_HIGH_WATER_SSL_WRITE: Final = 512
14 | if sys.version_info >= (3, 12):
15 | THREAD_JOIN_TIMEOUT: Final = 300
16 |
17 | class _SendfileMode(enum.Enum):
18 | UNSUPPORTED = 1
19 | TRY_NATIVE = 2
20 | FALLBACK = 3
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/coroutines.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Awaitable, Callable, Coroutine
3 | from typing import Any, TypeVar, overload
4 | from typing_extensions import ParamSpec, TypeGuard, TypeIs
5 |
6 | if sys.version_info >= (3, 11):
7 | __all__ = ("iscoroutinefunction", "iscoroutine")
8 | else:
9 | __all__ = ("coroutine", "iscoroutinefunction", "iscoroutine")
10 |
11 | _T = TypeVar("_T")
12 | _FunctionT = TypeVar("_FunctionT", bound=Callable[..., Any])
13 | _P = ParamSpec("_P")
14 |
15 | if sys.version_info < (3, 11):
16 | def coroutine(func: _FunctionT) -> _FunctionT: ...
17 |
18 | @overload
19 | def iscoroutinefunction(func: Callable[..., Coroutine[Any, Any, Any]]) -> bool: ...
20 | @overload
21 | def iscoroutinefunction(func: Callable[_P, Awaitable[_T]]) -> TypeGuard[Callable[_P, Coroutine[Any, Any, _T]]]: ...
22 | @overload
23 | def iscoroutinefunction(func: Callable[_P, object]) -> TypeGuard[Callable[_P, Coroutine[Any, Any, Any]]]: ...
24 | @overload
25 | def iscoroutinefunction(func: object) -> TypeGuard[Callable[..., Coroutine[Any, Any, Any]]]: ...
26 | def iscoroutine(obj: object) -> TypeIs[Coroutine[Any, Any, Any]]: ...
27 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/exceptions.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.version_info >= (3, 11):
4 | __all__ = (
5 | "BrokenBarrierError",
6 | "CancelledError",
7 | "InvalidStateError",
8 | "TimeoutError",
9 | "IncompleteReadError",
10 | "LimitOverrunError",
11 | "SendfileNotAvailableError",
12 | )
13 | else:
14 | __all__ = (
15 | "CancelledError",
16 | "InvalidStateError",
17 | "TimeoutError",
18 | "IncompleteReadError",
19 | "LimitOverrunError",
20 | "SendfileNotAvailableError",
21 | )
22 |
23 | class CancelledError(BaseException): ...
24 |
25 | if sys.version_info >= (3, 11):
26 | from builtins import TimeoutError as TimeoutError
27 | else:
28 | class TimeoutError(Exception): ...
29 |
30 | class InvalidStateError(Exception): ...
31 | class SendfileNotAvailableError(RuntimeError): ...
32 |
33 | class IncompleteReadError(EOFError):
34 | expected: int | None
35 | partial: bytes
36 | def __init__(self, partial: bytes, expected: int | None) -> None: ...
37 |
38 | class LimitOverrunError(Exception):
39 | consumed: int
40 | def __init__(self, message: str, consumed: int) -> None: ...
41 |
42 | if sys.version_info >= (3, 11):
43 | class BrokenBarrierError(RuntimeError): ...
44 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/format_helpers.pyi:
--------------------------------------------------------------------------------
1 | import functools
2 | import sys
3 | import traceback
4 | from collections.abc import Iterable
5 | from types import FrameType, FunctionType
6 | from typing import Any, overload
7 | from typing_extensions import TypeAlias
8 |
9 | class _HasWrapper:
10 | __wrapper__: _HasWrapper | FunctionType
11 |
12 | _FuncType: TypeAlias = FunctionType | _HasWrapper | functools.partial[Any] | functools.partialmethod[Any]
13 |
14 | @overload
15 | def _get_function_source(func: _FuncType) -> tuple[str, int]: ...
16 | @overload
17 | def _get_function_source(func: object) -> tuple[str, int] | None: ...
18 |
19 | if sys.version_info >= (3, 13):
20 | def _format_callback_source(func: object, args: Iterable[Any], *, debug: bool = False) -> str: ...
21 | def _format_args_and_kwargs(args: Iterable[Any], kwargs: dict[str, Any], *, debug: bool = False) -> str: ...
22 | def _format_callback(
23 | func: object, args: Iterable[Any], kwargs: dict[str, Any], *, debug: bool = False, suffix: str = ""
24 | ) -> str: ...
25 |
26 | else:
27 | def _format_callback_source(func: object, args: Iterable[Any]) -> str: ...
28 | def _format_args_and_kwargs(args: Iterable[Any], kwargs: dict[str, Any]) -> str: ...
29 | def _format_callback(func: object, args: Iterable[Any], kwargs: dict[str, Any], suffix: str = "") -> str: ...
30 |
31 | def extract_stack(f: FrameType | None = None, limit: int | None = None) -> traceback.StackSummary: ...
32 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/log.pyi:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | logger: logging.Logger
4 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/mixins.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | import threading
3 | from typing_extensions import Never
4 |
5 | _global_lock: threading.Lock
6 |
7 | class _LoopBoundMixin:
8 | if sys.version_info < (3, 11):
9 | def __init__(self, *, loop: Never = ...) -> None: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/runners.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import Unused
3 | from collections.abc import Callable, Coroutine
4 | from contextvars import Context
5 | from typing import Any, TypeVar, final
6 | from typing_extensions import Self
7 |
8 | from .events import AbstractEventLoop
9 |
10 | if sys.version_info >= (3, 11):
11 | __all__ = ("Runner", "run")
12 | else:
13 | __all__ = ("run",)
14 | _T = TypeVar("_T")
15 |
16 | if sys.version_info >= (3, 11):
17 | @final
18 | class Runner:
19 | def __init__(self, *, debug: bool | None = None, loop_factory: Callable[[], AbstractEventLoop] | None = None) -> None: ...
20 | def __enter__(self) -> Self: ...
21 | def __exit__(self, exc_type: Unused, exc_val: Unused, exc_tb: Unused) -> None: ...
22 | def close(self) -> None: ...
23 | def get_loop(self) -> AbstractEventLoop: ...
24 | def run(self, coro: Coroutine[Any, Any, _T], *, context: Context | None = None) -> _T: ...
25 |
26 | if sys.version_info >= (3, 12):
27 | def run(
28 | main: Coroutine[Any, Any, _T], *, debug: bool | None = ..., loop_factory: Callable[[], AbstractEventLoop] | None = ...
29 | ) -> _T: ...
30 |
31 | else:
32 | def run(main: Coroutine[Any, Any, _T], *, debug: bool | None = None) -> _T: ...
33 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/selector_events.pyi:
--------------------------------------------------------------------------------
1 | import selectors
2 |
3 | from . import base_events
4 |
5 | __all__ = ("BaseSelectorEventLoop",)
6 |
7 | class BaseSelectorEventLoop(base_events.BaseEventLoop):
8 | def __init__(self, selector: selectors.BaseSelector | None = None) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/staggered.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Awaitable, Callable, Iterable
2 | from typing import Any
3 |
4 | from . import events
5 |
6 | __all__ = ("staggered_race",)
7 |
8 | async def staggered_race(
9 | coro_fns: Iterable[Callable[[], Awaitable[Any]]], delay: float | None, *, loop: events.AbstractEventLoop | None = None
10 | ) -> tuple[Any, int | None, list[Exception | None]]: ...
11 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/taskgroups.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from contextvars import Context
3 | from types import TracebackType
4 | from typing import Any, TypeVar
5 | from typing_extensions import Self
6 |
7 | from . import _CoroutineLike
8 | from .events import AbstractEventLoop
9 | from .tasks import Task
10 |
11 | if sys.version_info >= (3, 12):
12 | __all__ = ("TaskGroup",)
13 | else:
14 | __all__ = ["TaskGroup"]
15 |
16 | _T = TypeVar("_T")
17 |
18 | class TaskGroup:
19 | _loop: AbstractEventLoop | None
20 | _tasks: set[Task[Any]]
21 |
22 | async def __aenter__(self) -> Self: ...
23 | async def __aexit__(self, et: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ...
24 | def create_task(self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None) -> Task[_T]: ...
25 | def _on_task_done(self, task: Task[object]) -> None: ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/threads.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from typing import TypeVar
3 | from typing_extensions import ParamSpec
4 |
5 | __all__ = ("to_thread",)
6 | _P = ParamSpec("_P")
7 | _R = TypeVar("_R")
8 |
9 | async def to_thread(func: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/asyncio/timeouts.pyi:
--------------------------------------------------------------------------------
1 | from types import TracebackType
2 | from typing import final
3 | from typing_extensions import Self
4 |
5 | __all__ = ("Timeout", "timeout", "timeout_at")
6 |
7 | @final
8 | class Timeout:
9 | def __init__(self, when: float | None) -> None: ...
10 | def when(self) -> float | None: ...
11 | def reschedule(self, when: float | None) -> None: ...
12 | def expired(self) -> bool: ...
13 | async def __aenter__(self) -> Self: ...
14 | async def __aexit__(
15 | self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
16 | ) -> None: ...
17 |
18 | def timeout(delay: float | None) -> Timeout: ...
19 | def timeout_at(when: float | None) -> Timeout: ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/atexit.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from typing import TypeVar
3 | from typing_extensions import ParamSpec
4 |
5 | _T = TypeVar("_T")
6 | _P = ParamSpec("_P")
7 |
8 | def _clear() -> None: ...
9 | def _ncallbacks() -> int: ...
10 | def _run_exitfuncs() -> None: ...
11 | def register(func: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Callable[_P, _T]: ...
12 | def unregister(func: Callable[..., object], /) -> None: ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/bisect.pyi:
--------------------------------------------------------------------------------
1 | from _bisect import *
2 |
3 | bisect = bisect_right
4 | insort = insort_right
5 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/cProfile.pyi:
--------------------------------------------------------------------------------
1 | import _lsprof
2 | from _typeshed import StrOrBytesPath, Unused
3 | from collections.abc import Callable
4 | from types import CodeType
5 | from typing import Any, TypeVar
6 | from typing_extensions import ParamSpec, Self, TypeAlias
7 |
8 | __all__ = ["run", "runctx", "Profile"]
9 |
10 | def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ...
11 | def runctx(
12 | statement: str, globals: dict[str, Any], locals: dict[str, Any], filename: str | None = None, sort: str | int = -1
13 | ) -> None: ...
14 |
15 | _T = TypeVar("_T")
16 | _P = ParamSpec("_P")
17 | _Label: TypeAlias = tuple[str, int, str]
18 |
19 | class Profile(_lsprof.Profiler):
20 | stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]] # undocumented
21 | def print_stats(self, sort: str | int = -1) -> None: ...
22 | def dump_stats(self, file: StrOrBytesPath) -> None: ...
23 | def create_stats(self) -> None: ...
24 | def snapshot_stats(self) -> None: ...
25 | def run(self, cmd: str) -> Self: ...
26 | def runctx(self, cmd: str, globals: dict[str, Any], locals: dict[str, Any]) -> Self: ...
27 | def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ...
28 | def __enter__(self) -> Self: ...
29 | def __exit__(self, *exc_info: Unused) -> None: ...
30 |
31 | def label(code: str | CodeType) -> _Label: ... # undocumented
32 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/chunk.pyi:
--------------------------------------------------------------------------------
1 | from typing import IO
2 |
3 | class Chunk:
4 | closed: bool
5 | align: bool
6 | file: IO[bytes]
7 | chunkname: bytes
8 | chunksize: int
9 | size_read: int
10 | offset: int
11 | seekable: bool
12 | def __init__(self, file: IO[bytes], align: bool = True, bigendian: bool = True, inclheader: bool = False) -> None: ...
13 | def getname(self) -> bytes: ...
14 | def getsize(self) -> int: ...
15 | def close(self) -> None: ...
16 | def isatty(self) -> bool: ...
17 | def seek(self, pos: int, whence: int = 0) -> None: ...
18 | def tell(self) -> int: ...
19 | def read(self, size: int = -1) -> bytes: ...
20 | def skip(self) -> None: ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/cmath.pyi:
--------------------------------------------------------------------------------
1 | from typing import SupportsComplex, SupportsFloat, SupportsIndex
2 | from typing_extensions import TypeAlias
3 |
4 | e: float
5 | pi: float
6 | inf: float
7 | infj: complex
8 | nan: float
9 | nanj: complex
10 | tau: float
11 |
12 | _C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex
13 |
14 | def acos(z: _C, /) -> complex: ...
15 | def acosh(z: _C, /) -> complex: ...
16 | def asin(z: _C, /) -> complex: ...
17 | def asinh(z: _C, /) -> complex: ...
18 | def atan(z: _C, /) -> complex: ...
19 | def atanh(z: _C, /) -> complex: ...
20 | def cos(z: _C, /) -> complex: ...
21 | def cosh(z: _C, /) -> complex: ...
22 | def exp(z: _C, /) -> complex: ...
23 | def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = 1e-09, abs_tol: SupportsFloat = 0.0) -> bool: ...
24 | def isinf(z: _C, /) -> bool: ...
25 | def isnan(z: _C, /) -> bool: ...
26 | def log(x: _C, base: _C = ..., /) -> complex: ...
27 | def log10(z: _C, /) -> complex: ...
28 | def phase(z: _C, /) -> float: ...
29 | def polar(z: _C, /) -> tuple[float, float]: ...
30 | def rect(r: float, phi: float, /) -> complex: ...
31 | def sin(z: _C, /) -> complex: ...
32 | def sinh(z: _C, /) -> complex: ...
33 | def sqrt(z: _C, /) -> complex: ...
34 | def tan(z: _C, /) -> complex: ...
35 | def tanh(z: _C, /) -> complex: ...
36 | def isfinite(z: _C, /) -> bool: ...
37 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/codeop.pyi:
--------------------------------------------------------------------------------
1 | from types import CodeType
2 |
3 | __all__ = ["compile_command", "Compile", "CommandCompiler"]
4 |
5 | def compile_command(source: str, filename: str = "", symbol: str = "single") -> CodeType | None: ...
6 |
7 | class Compile:
8 | flags: int
9 | def __call__(self, source: str, filename: str, symbol: str) -> CodeType: ...
10 |
11 | class CommandCompiler:
12 | compiler: Compile
13 | def __call__(self, source: str, filename: str = "", symbol: str = "single") -> CodeType | None: ...
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/collections/abc.pyi:
--------------------------------------------------------------------------------
1 | from _collections_abc import *
2 | from _collections_abc import __all__ as __all__
3 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/colorsys.pyi:
--------------------------------------------------------------------------------
1 | __all__ = ["rgb_to_yiq", "yiq_to_rgb", "rgb_to_hls", "hls_to_rgb", "rgb_to_hsv", "hsv_to_rgb"]
2 |
3 | def rgb_to_yiq(r: float, g: float, b: float) -> tuple[float, float, float]: ...
4 | def yiq_to_rgb(y: float, i: float, q: float) -> tuple[float, float, float]: ...
5 | def rgb_to_hls(r: float, g: float, b: float) -> tuple[float, float, float]: ...
6 | def hls_to_rgb(h: float, l: float, s: float) -> tuple[float, float, float]: ...
7 | def rgb_to_hsv(r: float, g: float, b: float) -> tuple[float, float, float]: ...
8 | def hsv_to_rgb(h: float, s: float, v: float) -> tuple[float, float, float]: ...
9 |
10 | # TODO undocumented
11 | ONE_SIXTH: float
12 | ONE_THIRD: float
13 | TWO_THIRD: float
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/concurrent/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/concurrent/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/copy.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any, TypeVar
2 |
3 | __all__ = ["Error", "copy", "deepcopy"]
4 |
5 | _T = TypeVar("_T")
6 |
7 | # None in CPython but non-None in Jython
8 | PyStringMap: Any
9 |
10 | # Note: memo and _nil are internal kwargs.
11 | def deepcopy(x: _T, memo: dict[int, Any] | None = None, _nil: Any = []) -> _T: ...
12 | def copy(x: _T) -> _T: ...
13 |
14 | class Error(Exception): ...
15 |
16 | error = Error
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/copyreg.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Hashable
2 | from typing import Any, SupportsInt, TypeVar
3 | from typing_extensions import TypeAlias
4 |
5 | _T = TypeVar("_T")
6 | _Reduce: TypeAlias = tuple[Callable[..., _T], tuple[Any, ...]] | tuple[Callable[..., _T], tuple[Any, ...], Any | None]
7 |
8 | __all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extension_cache"]
9 |
10 | def pickle(
11 | ob_type: type[_T],
12 | pickle_function: Callable[[_T], str | _Reduce[_T]],
13 | constructor_ob: Callable[[_Reduce[_T]], _T] | None = None,
14 | ) -> None: ...
15 | def constructor(object: Callable[[_Reduce[_T]], _T]) -> None: ...
16 | def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ...
17 | def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ...
18 | def clear_extension_cache() -> None: ...
19 |
20 | _DispatchTableType: TypeAlias = dict[type, Callable[[Any], str | _Reduce[Any]]] # imported by multiprocessing.reduction
21 | dispatch_table: _DispatchTableType # undocumented
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/crypt.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.platform != "win32":
4 | class _Method: ...
5 | METHOD_CRYPT: _Method
6 | METHOD_MD5: _Method
7 | METHOD_SHA256: _Method
8 | METHOD_SHA512: _Method
9 | METHOD_BLOWFISH: _Method
10 | methods: list[_Method]
11 | def mksalt(method: _Method | None = None, *, rounds: int | None = None) -> str: ...
12 | def crypt(word: str, salt: str | _Method | None = None) -> str: ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/ctypes/_endian.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _ctypes import RTLD_GLOBAL as RTLD_GLOBAL, RTLD_LOCAL as RTLD_LOCAL, Structure, Union
3 | from ctypes import DEFAULT_MODE as DEFAULT_MODE, cdll as cdll, pydll as pydll, pythonapi as pythonapi
4 |
5 | if sys.version_info >= (3, 12):
6 | from _ctypes import SIZEOF_TIME_T as SIZEOF_TIME_T
7 |
8 | if sys.platform == "win32":
9 | from ctypes import oledll as oledll, windll as windll
10 |
11 | # At runtime, the native endianness is an alias for Structure,
12 | # while the other is a subclass with a metaclass added in.
13 | class BigEndianStructure(Structure): ...
14 | class LittleEndianStructure(Structure): ...
15 |
16 | # Same thing for these: one is an alias of Union at runtime
17 | if sys.version_info >= (3, 11):
18 | class BigEndianUnion(Union): ...
19 | class LittleEndianUnion(Union): ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/ctypes/util.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | def find_library(name: str) -> str | None: ...
4 |
5 | if sys.platform == "win32":
6 | def find_msvcrt() -> str | None: ...
7 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/curses/__init__.pyi:
--------------------------------------------------------------------------------
1 | from _curses import *
2 | from _curses import _CursesWindow as _CursesWindow
3 | from collections.abc import Callable
4 | from typing import TypeVar
5 | from typing_extensions import Concatenate, ParamSpec
6 |
7 | # NOTE: The _curses module is ordinarily only available on Unix, but the
8 | # windows-curses package makes it available on Windows as well with the same
9 | # contents.
10 |
11 | _T = TypeVar("_T")
12 | _P = ParamSpec("_P")
13 |
14 | # available after calling `curses.initscr()`
15 | LINES: int
16 | COLS: int
17 |
18 | # available after calling `curses.start_color()`
19 | COLORS: int
20 | COLOR_PAIRS: int
21 |
22 | def wrapper(func: Callable[Concatenate[_CursesWindow, _P], _T], /, *arg: _P.args, **kwds: _P.kwargs) -> _T: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/curses/ascii.pyi:
--------------------------------------------------------------------------------
1 | from typing import TypeVar
2 |
3 | _CharT = TypeVar("_CharT", str, int)
4 |
5 | NUL: int
6 | SOH: int
7 | STX: int
8 | ETX: int
9 | EOT: int
10 | ENQ: int
11 | ACK: int
12 | BEL: int
13 | BS: int
14 | TAB: int
15 | HT: int
16 | LF: int
17 | NL: int
18 | VT: int
19 | FF: int
20 | CR: int
21 | SO: int
22 | SI: int
23 | DLE: int
24 | DC1: int
25 | DC2: int
26 | DC3: int
27 | DC4: int
28 | NAK: int
29 | SYN: int
30 | ETB: int
31 | CAN: int
32 | EM: int
33 | SUB: int
34 | ESC: int
35 | FS: int
36 | GS: int
37 | RS: int
38 | US: int
39 | SP: int
40 | DEL: int
41 |
42 | controlnames: list[int]
43 |
44 | def isalnum(c: str | int) -> bool: ...
45 | def isalpha(c: str | int) -> bool: ...
46 | def isascii(c: str | int) -> bool: ...
47 | def isblank(c: str | int) -> bool: ...
48 | def iscntrl(c: str | int) -> bool: ...
49 | def isdigit(c: str | int) -> bool: ...
50 | def isgraph(c: str | int) -> bool: ...
51 | def islower(c: str | int) -> bool: ...
52 | def isprint(c: str | int) -> bool: ...
53 | def ispunct(c: str | int) -> bool: ...
54 | def isspace(c: str | int) -> bool: ...
55 | def isupper(c: str | int) -> bool: ...
56 | def isxdigit(c: str | int) -> bool: ...
57 | def isctrl(c: str | int) -> bool: ...
58 | def ismeta(c: str | int) -> bool: ...
59 | def ascii(c: _CharT) -> _CharT: ...
60 | def ctrl(c: _CharT) -> _CharT: ...
61 | def alt(c: _CharT) -> _CharT: ...
62 | def unctrl(c: str | int) -> str: ...
63 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/curses/has_key.pyi:
--------------------------------------------------------------------------------
1 | def has_key(ch: int | str) -> bool: ...
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/curses/panel.pyi:
--------------------------------------------------------------------------------
1 | from _curses import _CursesWindow
2 |
3 | version: str
4 |
5 | class _Curses_Panel: # type is (note the space in the class name)
6 | def above(self) -> _Curses_Panel: ...
7 | def below(self) -> _Curses_Panel: ...
8 | def bottom(self) -> None: ...
9 | def hidden(self) -> bool: ...
10 | def hide(self) -> None: ...
11 | def move(self, y: int, x: int) -> None: ...
12 | def replace(self, win: _CursesWindow) -> None: ...
13 | def set_userptr(self, obj: object) -> None: ...
14 | def show(self) -> None: ...
15 | def top(self) -> None: ...
16 | def userptr(self) -> object: ...
17 | def window(self) -> _CursesWindow: ...
18 |
19 | def bottom_panel() -> _Curses_Panel: ...
20 | def new_panel(win: _CursesWindow, /) -> _Curses_Panel: ...
21 | def top_panel() -> _Curses_Panel: ...
22 | def update_panels() -> _Curses_Panel: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/curses/textpad.pyi:
--------------------------------------------------------------------------------
1 | from _curses import _CursesWindow
2 | from collections.abc import Callable
3 |
4 | def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> None: ...
5 |
6 | class Textbox:
7 | stripspaces: bool
8 | def __init__(self, win: _CursesWindow, insert_mode: bool = False) -> None: ...
9 | def edit(self, validate: Callable[[int], int] | None = None) -> str: ...
10 | def do_command(self, ch: str | int) -> None: ...
11 | def gather(self) -> str: ...
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/dbm/sqlite3.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import ReadableBuffer, StrOrBytesPath, Unused
2 | from collections.abc import Generator, MutableMapping
3 | from typing import Final, Literal
4 | from typing_extensions import LiteralString, Self, TypeAlias
5 |
6 | BUILD_TABLE: Final[LiteralString]
7 | GET_SIZE: Final[LiteralString]
8 | LOOKUP_KEY: Final[LiteralString]
9 | STORE_KV: Final[LiteralString]
10 | DELETE_KEY: Final[LiteralString]
11 | ITER_KEYS: Final[LiteralString]
12 |
13 | _SqliteData: TypeAlias = str | ReadableBuffer | int | float
14 |
15 | class error(OSError): ...
16 |
17 | class _Database(MutableMapping[bytes, bytes]):
18 | def __init__(self, path: StrOrBytesPath, /, *, flag: Literal["r", "w", "c", "n"], mode: int) -> None: ...
19 | def __len__(self) -> int: ...
20 | def __getitem__(self, key: _SqliteData) -> bytes: ...
21 | def __setitem__(self, key: _SqliteData, value: _SqliteData) -> None: ...
22 | def __delitem__(self, key: _SqliteData) -> None: ...
23 | def __iter__(self) -> Generator[bytes]: ...
24 | def close(self) -> None: ...
25 | def keys(self) -> list[bytes]: ... # type: ignore[override]
26 | def __enter__(self) -> Self: ...
27 | def __exit__(self, *args: Unused) -> None: ...
28 |
29 | def open(filename: StrOrBytesPath, /, flag: Literal["r", "w,", "c", "n"] = "r", mode: int = 0o666) -> _Database: ...
30 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/decimal.pyi:
--------------------------------------------------------------------------------
1 | from _decimal import *
2 | from _decimal import __libmpdec_version__ as __libmpdec_version__, __version__ as __version__
3 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/__init__.pyi:
--------------------------------------------------------------------------------
1 | # Attempts to improve these stubs are probably not the best use of time:
2 | # - distutils is deleted in Python 3.12 and newer
3 | # - Most users already do not use stdlib distutils, due to setuptools monkeypatching
4 | # - We have very little quality assurance on these stubs, since due to the two above issues
5 | # we allowlist all distutils errors in stubtest.
6 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/archive_util.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath, StrPath
2 | from typing import Literal, overload
3 |
4 | @overload
5 | def make_archive(
6 | base_name: str,
7 | format: str,
8 | root_dir: StrOrBytesPath | None = None,
9 | base_dir: str | None = None,
10 | verbose: bool | Literal[0, 1] = 0,
11 | dry_run: bool | Literal[0, 1] = 0,
12 | owner: str | None = None,
13 | group: str | None = None,
14 | ) -> str: ...
15 | @overload
16 | def make_archive(
17 | base_name: StrPath,
18 | format: str,
19 | root_dir: StrOrBytesPath,
20 | base_dir: str | None = None,
21 | verbose: bool | Literal[0, 1] = 0,
22 | dry_run: bool | Literal[0, 1] = 0,
23 | owner: str | None = None,
24 | group: str | None = None,
25 | ) -> str: ...
26 | def make_tarball(
27 | base_name: str,
28 | base_dir: StrPath,
29 | compress: str | None = "gzip",
30 | verbose: bool | Literal[0, 1] = 0,
31 | dry_run: bool | Literal[0, 1] = 0,
32 | owner: str | None = None,
33 | group: str | None = None,
34 | ) -> str: ...
35 | def make_zipfile(base_name: str, base_dir: str, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0) -> str: ...
36 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/bcppcompiler.pyi:
--------------------------------------------------------------------------------
1 | from distutils.ccompiler import CCompiler
2 |
3 | class BCPPCompiler(CCompiler): ...
4 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/distutils/command/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/bdist.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | def show_formats() -> None: ...
6 |
7 | class bdist(Command):
8 | description: str
9 | user_options: Any
10 | boolean_options: Any
11 | help_options: Any
12 | no_format_option: Any
13 | default_format: Any
14 | format_commands: Any
15 | format_command: Any
16 | bdist_base: Any
17 | plat_name: Any
18 | formats: Any
19 | dist_dir: Any
20 | skip_build: int
21 | group: Any
22 | owner: Any
23 | def initialize_options(self) -> None: ...
24 | def finalize_options(self) -> None: ...
25 | def run(self) -> None: ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/bdist_dumb.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | class bdist_dumb(Command):
6 | description: str
7 | user_options: Any
8 | boolean_options: Any
9 | default_format: Any
10 | bdist_dir: Any
11 | plat_name: Any
12 | format: Any
13 | keep_temp: int
14 | dist_dir: Any
15 | skip_build: Any
16 | relative: int
17 | owner: Any
18 | group: Any
19 | def initialize_options(self) -> None: ...
20 | def finalize_options(self) -> None: ...
21 | def run(self) -> None: ...
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/bdist_packager.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/distutils/command/bdist_packager.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/bdist_rpm.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | class bdist_rpm(Command):
6 | description: str
7 | user_options: Any
8 | boolean_options: Any
9 | negative_opt: Any
10 | bdist_base: Any
11 | rpm_base: Any
12 | dist_dir: Any
13 | python: Any
14 | fix_python: Any
15 | spec_only: Any
16 | binary_only: Any
17 | source_only: Any
18 | use_bzip2: Any
19 | distribution_name: Any
20 | group: Any
21 | release: Any
22 | serial: Any
23 | vendor: Any
24 | packager: Any
25 | doc_files: Any
26 | changelog: Any
27 | icon: Any
28 | prep_script: Any
29 | build_script: Any
30 | install_script: Any
31 | clean_script: Any
32 | verify_script: Any
33 | pre_install: Any
34 | post_install: Any
35 | pre_uninstall: Any
36 | post_uninstall: Any
37 | prep: Any
38 | provides: Any
39 | requires: Any
40 | conflicts: Any
41 | build_requires: Any
42 | obsoletes: Any
43 | keep_temp: int
44 | use_rpm_opt_flags: int
45 | rpm3_mode: int
46 | no_autoreq: int
47 | force_arch: Any
48 | quiet: int
49 | def initialize_options(self) -> None: ...
50 | def finalize_options(self) -> None: ...
51 | def finalize_package_data(self) -> None: ...
52 | def run(self) -> None: ...
53 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/bdist_wininst.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath
2 | from distutils.cmd import Command
3 | from typing import Any, ClassVar
4 |
5 | class bdist_wininst(Command):
6 | description: ClassVar[str]
7 | user_options: ClassVar[list[tuple[Any, ...]]]
8 | boolean_options: ClassVar[list[str]]
9 |
10 | def initialize_options(self) -> None: ...
11 | def finalize_options(self) -> None: ...
12 | def run(self) -> None: ...
13 | def get_inidata(self) -> str: ...
14 | def create_exe(self, arcname: StrOrBytesPath, fullname: str, bitmap: StrOrBytesPath | None = None) -> None: ...
15 | def get_installer_filename(self, fullname: str) -> str: ...
16 | def get_exe_bytes(self) -> bytes: ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/build.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from typing import Any, ClassVar
3 |
4 | from ..cmd import Command
5 |
6 | def show_compilers() -> None: ...
7 |
8 | class build(Command):
9 | description: str
10 | user_options: Any
11 | boolean_options: Any
12 | help_options: Any
13 | build_base: str
14 | build_purelib: Any
15 | build_platlib: Any
16 | build_lib: Any
17 | build_temp: Any
18 | build_scripts: Any
19 | compiler: Any
20 | plat_name: Any
21 | debug: Any
22 | force: int
23 | executable: Any
24 | parallel: Any
25 | def initialize_options(self) -> None: ...
26 | def finalize_options(self) -> None: ...
27 | def run(self) -> None: ...
28 | def has_pure_modules(self): ...
29 | def has_c_libraries(self): ...
30 | def has_ext_modules(self): ...
31 | def has_scripts(self): ...
32 | # Any to work around variance issues
33 | sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
34 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/build_clib.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | def show_compilers() -> None: ...
6 |
7 | class build_clib(Command):
8 | description: str
9 | user_options: Any
10 | boolean_options: Any
11 | help_options: Any
12 | build_clib: Any
13 | build_temp: Any
14 | libraries: Any
15 | include_dirs: Any
16 | define: Any
17 | undef: Any
18 | debug: Any
19 | force: int
20 | compiler: Any
21 | def initialize_options(self) -> None: ...
22 | def finalize_options(self) -> None: ...
23 | def run(self) -> None: ...
24 | def check_library_list(self, libraries) -> None: ...
25 | def get_library_names(self): ...
26 | def get_source_files(self): ...
27 | def build_libraries(self, libraries) -> None: ...
28 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/build_scripts.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 | from ..util import Mixin2to3 as Mixin2to3
5 |
6 | first_line_re: Any
7 |
8 | class build_scripts(Command):
9 | description: str
10 | user_options: Any
11 | boolean_options: Any
12 | build_dir: Any
13 | scripts: Any
14 | force: Any
15 | executable: Any
16 | outfiles: Any
17 | def initialize_options(self) -> None: ...
18 | def finalize_options(self) -> None: ...
19 | def get_source_files(self): ...
20 | def run(self) -> None: ...
21 | def copy_scripts(self): ...
22 |
23 | class build_scripts_2to3(build_scripts, Mixin2to3):
24 | def copy_scripts(self): ...
25 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/check.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any, Literal
2 | from typing_extensions import TypeAlias
3 |
4 | from ..cmd import Command
5 |
6 | _Reporter: TypeAlias = Any # really docutils.utils.Reporter
7 |
8 | # Only defined if docutils is installed.
9 | # Depends on a third-party stub. Since distutils is deprecated anyway,
10 | # it's easier to just suppress the "any subclassing" error.
11 | class SilentReporter(_Reporter):
12 | messages: Any
13 | def __init__(
14 | self,
15 | source,
16 | report_level,
17 | halt_level,
18 | stream: Any | None = ...,
19 | debug: bool | Literal[0, 1] = 0,
20 | encoding: str = ...,
21 | error_handler: str = ...,
22 | ) -> None: ...
23 | def system_message(self, level, message, *children, **kwargs): ...
24 |
25 | HAS_DOCUTILS: bool
26 |
27 | class check(Command):
28 | description: str
29 | user_options: Any
30 | boolean_options: Any
31 | restructuredtext: int
32 | metadata: int
33 | strict: int
34 | def initialize_options(self) -> None: ...
35 | def finalize_options(self) -> None: ...
36 | def warn(self, msg): ...
37 | def run(self) -> None: ...
38 | def check_metadata(self) -> None: ...
39 | def check_restructuredtext(self) -> None: ...
40 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/clean.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | class clean(Command):
6 | description: str
7 | user_options: Any
8 | boolean_options: Any
9 | build_base: Any
10 | build_lib: Any
11 | build_temp: Any
12 | build_scripts: Any
13 | bdist_base: Any
14 | all: Any
15 | def initialize_options(self) -> None: ...
16 | def finalize_options(self) -> None: ...
17 | def run(self) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/install_data.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | class install_data(Command):
6 | description: str
7 | user_options: Any
8 | boolean_options: Any
9 | install_dir: Any
10 | outfiles: Any
11 | root: Any
12 | force: int
13 | data_files: Any
14 | warn_dir: int
15 | def initialize_options(self) -> None: ...
16 | def finalize_options(self) -> None: ...
17 | def run(self) -> None: ...
18 | def get_inputs(self): ...
19 | def get_outputs(self): ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/install_egg_info.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any, ClassVar
2 |
3 | from ..cmd import Command
4 |
5 | class install_egg_info(Command):
6 | description: ClassVar[str]
7 | user_options: ClassVar[list[tuple[str, str | None, str]]]
8 | install_dir: Any
9 | def initialize_options(self) -> None: ...
10 | target: Any
11 | outputs: Any
12 | def finalize_options(self) -> None: ...
13 | def run(self) -> None: ...
14 | def get_outputs(self) -> list[str]: ...
15 |
16 | def safe_name(name): ...
17 | def safe_version(version): ...
18 | def to_filename(name): ...
19 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/install_headers.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | class install_headers(Command):
6 | description: str
7 | user_options: Any
8 | boolean_options: Any
9 | install_dir: Any
10 | force: int
11 | outfiles: Any
12 | def initialize_options(self) -> None: ...
13 | def finalize_options(self) -> None: ...
14 | def run(self) -> None: ...
15 | def get_inputs(self): ...
16 | def get_outputs(self): ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/install_lib.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | PYTHON_SOURCE_EXTENSION: str
6 |
7 | class install_lib(Command):
8 | description: str
9 | user_options: Any
10 | boolean_options: Any
11 | negative_opt: Any
12 | install_dir: Any
13 | build_dir: Any
14 | force: int
15 | compile: Any
16 | optimize: Any
17 | skip_build: Any
18 | def initialize_options(self) -> None: ...
19 | def finalize_options(self) -> None: ...
20 | def run(self) -> None: ...
21 | def build(self) -> None: ...
22 | def install(self): ...
23 | def byte_compile(self, files) -> None: ...
24 | def get_outputs(self): ...
25 | def get_inputs(self): ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/install_scripts.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | from ..cmd import Command
4 |
5 | class install_scripts(Command):
6 | description: str
7 | user_options: Any
8 | boolean_options: Any
9 | install_dir: Any
10 | force: int
11 | build_dir: Any
12 | skip_build: Any
13 | def initialize_options(self) -> None: ...
14 | def finalize_options(self) -> None: ...
15 | outfiles: Any
16 | def run(self) -> None: ...
17 | def get_inputs(self): ...
18 | def get_outputs(self): ...
19 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/register.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from typing import Any, ClassVar
3 |
4 | from ..config import PyPIRCCommand
5 |
6 | class register(PyPIRCCommand):
7 | description: str
8 | # Any to work around variance issues
9 | sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
10 | list_classifiers: int
11 | strict: int
12 | def initialize_options(self) -> None: ...
13 | def finalize_options(self) -> None: ...
14 | def run(self) -> None: ...
15 | def check_metadata(self) -> None: ...
16 | def classifiers(self) -> None: ...
17 | def verify_metadata(self) -> None: ...
18 | def send_metadata(self) -> None: ...
19 | def build_post_data(self, action): ...
20 | def post_to_server(self, data, auth: Any | None = None): ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/command/upload.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any, ClassVar
2 |
3 | from ..config import PyPIRCCommand
4 |
5 | class upload(PyPIRCCommand):
6 | description: ClassVar[str]
7 | username: str
8 | password: str
9 | show_response: int
10 | sign: bool
11 | identity: Any
12 | def initialize_options(self) -> None: ...
13 | repository: Any
14 | realm: Any
15 | def finalize_options(self) -> None: ...
16 | def run(self) -> None: ...
17 | def upload_file(self, command: str, pyversion: str, filename: str) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/config.pyi:
--------------------------------------------------------------------------------
1 | from abc import abstractmethod
2 | from distutils.cmd import Command
3 | from typing import ClassVar
4 |
5 | DEFAULT_PYPIRC: str
6 |
7 | class PyPIRCCommand(Command):
8 | DEFAULT_REPOSITORY: ClassVar[str]
9 | DEFAULT_REALM: ClassVar[str]
10 | repository: None
11 | realm: None
12 | user_options: ClassVar[list[tuple[str, str | None, str]]]
13 | boolean_options: ClassVar[list[str]]
14 | def initialize_options(self) -> None: ...
15 | def finalize_options(self) -> None: ...
16 | @abstractmethod
17 | def run(self) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/cygwinccompiler.pyi:
--------------------------------------------------------------------------------
1 | from distutils.unixccompiler import UnixCCompiler
2 | from distutils.version import LooseVersion
3 | from re import Pattern
4 | from typing import Literal
5 |
6 | def get_msvcr() -> list[str] | None: ...
7 |
8 | class CygwinCCompiler(UnixCCompiler): ...
9 | class Mingw32CCompiler(CygwinCCompiler): ...
10 |
11 | CONFIG_H_OK: str
12 | CONFIG_H_NOTOK: str
13 | CONFIG_H_UNCERTAIN: str
14 |
15 | def check_config_h() -> tuple[Literal["ok", "not ok", "uncertain"], str]: ...
16 |
17 | RE_VERSION: Pattern[bytes]
18 |
19 | def get_versions() -> tuple[LooseVersion | None, ...]: ...
20 | def is_cygwingcc() -> bool: ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/debug.pyi:
--------------------------------------------------------------------------------
1 | DEBUG: bool | None
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/dep_util.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath, SupportsLenAndGetItem
2 | from collections.abc import Iterable
3 | from typing import Literal, TypeVar
4 |
5 | _SourcesT = TypeVar("_SourcesT", bound=StrOrBytesPath)
6 | _TargetsT = TypeVar("_TargetsT", bound=StrOrBytesPath)
7 |
8 | def newer(source: StrOrBytesPath, target: StrOrBytesPath) -> bool | Literal[1]: ...
9 | def newer_pairwise(
10 | sources: SupportsLenAndGetItem[_SourcesT], targets: SupportsLenAndGetItem[_TargetsT]
11 | ) -> tuple[list[_SourcesT], list[_TargetsT]]: ...
12 | def newer_group(
13 | sources: Iterable[StrOrBytesPath], target: StrOrBytesPath, missing: Literal["error", "ignore", "newer"] = "error"
14 | ) -> Literal[0, 1]: ...
15 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/dir_util.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath, StrPath
2 | from collections.abc import Iterable
3 | from typing import Literal
4 |
5 | def mkpath(name: str, mode: int = 0o777, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0) -> list[str]: ...
6 | def create_tree(
7 | base_dir: StrPath,
8 | files: Iterable[StrPath],
9 | mode: int = 0o777,
10 | verbose: bool | Literal[0, 1] = 1,
11 | dry_run: bool | Literal[0, 1] = 0,
12 | ) -> None: ...
13 | def copy_tree(
14 | src: StrPath,
15 | dst: str,
16 | preserve_mode: bool | Literal[0, 1] = 1,
17 | preserve_times: bool | Literal[0, 1] = 1,
18 | preserve_symlinks: bool | Literal[0, 1] = 0,
19 | update: bool | Literal[0, 1] = 0,
20 | verbose: bool | Literal[0, 1] = 1,
21 | dry_run: bool | Literal[0, 1] = 0,
22 | ) -> list[str]: ...
23 | def remove_tree(directory: StrOrBytesPath, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0) -> None: ...
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/errors.pyi:
--------------------------------------------------------------------------------
1 | class DistutilsError(Exception): ...
2 | class DistutilsModuleError(DistutilsError): ...
3 | class DistutilsClassError(DistutilsError): ...
4 | class DistutilsGetoptError(DistutilsError): ...
5 | class DistutilsArgError(DistutilsError): ...
6 | class DistutilsFileError(DistutilsError): ...
7 | class DistutilsOptionError(DistutilsError): ...
8 | class DistutilsSetupError(DistutilsError): ...
9 | class DistutilsPlatformError(DistutilsError): ...
10 | class DistutilsExecError(DistutilsError): ...
11 | class DistutilsInternalError(DistutilsError): ...
12 | class DistutilsTemplateError(DistutilsError): ...
13 | class DistutilsByteCompileError(DistutilsError): ...
14 | class CCompilerError(Exception): ...
15 | class PreprocessError(CCompilerError): ...
16 | class CompileError(CCompilerError): ...
17 | class LibError(CCompilerError): ...
18 | class LinkError(CCompilerError): ...
19 | class UnknownFileError(CCompilerError): ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/extension.pyi:
--------------------------------------------------------------------------------
1 | class Extension:
2 | name: str
3 | sources: list[str]
4 | include_dirs: list[str]
5 | define_macros: list[tuple[str, str | None]]
6 | undef_macros: list[str]
7 | library_dirs: list[str]
8 | libraries: list[str]
9 | runtime_library_dirs: list[str]
10 | extra_objects: list[str]
11 | extra_compile_args: list[str]
12 | extra_link_args: list[str]
13 | export_symbols: list[str]
14 | swig_opts: list[str]
15 | depends: list[str]
16 | language: str | None
17 | optional: bool | None
18 | def __init__(
19 | self,
20 | name: str,
21 | sources: list[str],
22 | include_dirs: list[str] | None = None,
23 | define_macros: list[tuple[str, str | None]] | None = None,
24 | undef_macros: list[str] | None = None,
25 | library_dirs: list[str] | None = None,
26 | libraries: list[str] | None = None,
27 | runtime_library_dirs: list[str] | None = None,
28 | extra_objects: list[str] | None = None,
29 | extra_compile_args: list[str] | None = None,
30 | extra_link_args: list[str] | None = None,
31 | export_symbols: list[str] | None = None,
32 | swig_opts: list[str] | None = None,
33 | depends: list[str] | None = None,
34 | language: str | None = None,
35 | optional: bool | None = None,
36 | ) -> None: ...
37 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/fancy_getopt.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable, Mapping
2 | from re import Pattern
3 | from typing import Any, overload
4 | from typing_extensions import TypeAlias
5 |
6 | _Option: TypeAlias = tuple[str, str | None, str]
7 | _GR: TypeAlias = tuple[list[str], OptionDummy]
8 |
9 | longopt_pat: str
10 | longopt_re: Pattern[str]
11 | neg_alias_re: Pattern[str]
12 | longopt_xlate: dict[int, int]
13 |
14 | class FancyGetopt:
15 | def __init__(self, option_table: list[_Option] | None = None) -> None: ...
16 | # TODO kinda wrong, `getopt(object=object())` is invalid
17 | @overload
18 | def getopt(self, args: list[str] | None = None) -> _GR: ...
19 | @overload
20 | def getopt(self, args: list[str] | None, object: Any) -> list[str]: ...
21 | def get_option_order(self) -> list[tuple[str, str]]: ...
22 | def generate_help(self, header: str | None = None) -> list[str]: ...
23 |
24 | def fancy_getopt(
25 | options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
26 | ) -> list[str] | _GR: ...
27 |
28 | WS_TRANS: dict[int, str]
29 |
30 | def wrap_text(text: str, width: int) -> list[str]: ...
31 | def translate_longopt(opt: str) -> str: ...
32 |
33 | class OptionDummy:
34 | def __init__(self, options: Iterable[str] = []) -> None: ...
35 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/log.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | DEBUG: int
4 | INFO: int
5 | WARN: int
6 | ERROR: int
7 | FATAL: int
8 |
9 | class Log:
10 | def __init__(self, threshold: int = 3) -> None: ...
11 | def log(self, level: int, msg: str, *args: Any) -> None: ...
12 | def debug(self, msg: str, *args: Any) -> None: ...
13 | def info(self, msg: str, *args: Any) -> None: ...
14 | def warn(self, msg: str, *args: Any) -> None: ...
15 | def error(self, msg: str, *args: Any) -> None: ...
16 | def fatal(self, msg: str, *args: Any) -> None: ...
17 |
18 | def log(level: int, msg: str, *args: Any) -> None: ...
19 | def debug(msg: str, *args: Any) -> None: ...
20 | def info(msg: str, *args: Any) -> None: ...
21 | def warn(msg: str, *args: Any) -> None: ...
22 | def error(msg: str, *args: Any) -> None: ...
23 | def fatal(msg: str, *args: Any) -> None: ...
24 | def set_threshold(level: int) -> int: ...
25 | def set_verbosity(v: int) -> None: ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/msvccompiler.pyi:
--------------------------------------------------------------------------------
1 | from distutils.ccompiler import CCompiler
2 |
3 | class MSVCCompiler(CCompiler): ...
4 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/spawn.pyi:
--------------------------------------------------------------------------------
1 | from typing import Literal
2 |
3 | def spawn(
4 | cmd: list[str], search_path: bool | Literal[0, 1] = 1, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0
5 | ) -> None: ...
6 | def find_executable(executable: str, path: str | None = None) -> str | None: ...
7 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/sysconfig.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Mapping
3 | from distutils.ccompiler import CCompiler
4 | from typing import Literal, overload
5 | from typing_extensions import deprecated
6 |
7 | PREFIX: str
8 | EXEC_PREFIX: str
9 | BASE_PREFIX: str
10 | BASE_EXEC_PREFIX: str
11 | project_base: str
12 | python_build: bool
13 |
14 | def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ...
15 | @overload
16 | @deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in Python 3.11")
17 | def get_config_var(name: Literal["SO"]) -> int | str | None: ...
18 | @overload
19 | def get_config_var(name: str) -> int | str | None: ...
20 | @overload
21 | def get_config_vars() -> dict[str, str | int]: ...
22 | @overload
23 | def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ...
24 | def get_config_h_filename() -> str: ...
25 | def get_makefile_filename() -> str: ...
26 | def get_python_inc(plat_specific: bool | Literal[0, 1] = 0, prefix: str | None = None) -> str: ...
27 | def get_python_lib(
28 | plat_specific: bool | Literal[0, 1] = 0, standard_lib: bool | Literal[0, 1] = 0, prefix: str | None = None
29 | ) -> str: ...
30 | def customize_compiler(compiler: CCompiler) -> None: ...
31 |
32 | if sys.version_info < (3, 10):
33 | def get_python_version() -> str: ...
34 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/text_file.pyi:
--------------------------------------------------------------------------------
1 | from typing import IO, Literal
2 |
3 | class TextFile:
4 | def __init__(
5 | self,
6 | filename: str | None = None,
7 | file: IO[str] | None = None,
8 | *,
9 | strip_comments: bool | Literal[0, 1] = ...,
10 | lstrip_ws: bool | Literal[0, 1] = ...,
11 | rstrip_ws: bool | Literal[0, 1] = ...,
12 | skip_blanks: bool | Literal[0, 1] = ...,
13 | join_lines: bool | Literal[0, 1] = ...,
14 | collapse_join: bool | Literal[0, 1] = ...,
15 | ) -> None: ...
16 | def open(self, filename: str) -> None: ...
17 | def close(self) -> None: ...
18 | def warn(self, msg: str, line: list[int] | tuple[int, int] | int | None = None) -> None: ...
19 | def readline(self) -> str | None: ...
20 | def readlines(self) -> list[str]: ...
21 | def unreadline(self, line: str) -> str: ...
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/distutils/unixccompiler.pyi:
--------------------------------------------------------------------------------
1 | from distutils.ccompiler import CCompiler
2 |
3 | class UnixCCompiler(CCompiler): ...
4 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/dummy_threading.pyi:
--------------------------------------------------------------------------------
1 | from _dummy_threading import *
2 | from _dummy_threading import __all__ as __all__
3 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/__init__.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from email.message import Message
3 | from email.policy import Policy
4 | from typing import IO
5 | from typing_extensions import TypeAlias
6 |
7 | # Definitions imported by multiple submodules in typeshed
8 | _ParamType: TypeAlias = str | tuple[str | None, str | None, str] # noqa: Y047
9 | _ParamsType: TypeAlias = str | None | tuple[str, str | None, str] # noqa: Y047
10 |
11 | def message_from_string(s: str, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
12 | def message_from_bytes(s: bytes | bytearray, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
13 | def message_from_file(fp: IO[str], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
14 | def message_from_binary_file(fp: IO[bytes], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
15 |
16 | # Names in __all__ with no definition:
17 | # base64mime
18 | # charset
19 | # encoders
20 | # errors
21 | # feedparser
22 | # generator
23 | # header
24 | # iterators
25 | # message
26 | # mime
27 | # parser
28 | # quoprimime
29 | # utils
30 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/base64mime.pyi:
--------------------------------------------------------------------------------
1 | __all__ = ["body_decode", "body_encode", "decode", "decodestring", "header_encode", "header_length"]
2 |
3 | from _typeshed import ReadableBuffer
4 |
5 | def header_length(bytearray: str | bytes | bytearray) -> int: ...
6 | def header_encode(header_bytes: str | ReadableBuffer, charset: str = "iso-8859-1") -> str: ...
7 |
8 | # First argument should be a buffer that supports slicing and len().
9 | def body_encode(s: bytes | bytearray, maxlinelen: int = 76, eol: str = "\n") -> str: ...
10 | def decode(string: str | ReadableBuffer) -> bytes: ...
11 |
12 | body_decode = decode
13 | decodestring = decode
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/charset.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Iterator
2 | from email.message import Message
3 | from typing import overload
4 |
5 | __all__ = ["Charset", "add_alias", "add_charset", "add_codec"]
6 |
7 | QP: int # undocumented
8 | BASE64: int # undocumented
9 | SHORTEST: int # undocumented
10 |
11 | class Charset:
12 | input_charset: str
13 | header_encoding: int
14 | body_encoding: int
15 | output_charset: str | None
16 | input_codec: str | None
17 | output_codec: str | None
18 | def __init__(self, input_charset: str = "us-ascii") -> None: ...
19 | def get_body_encoding(self) -> str | Callable[[Message], None]: ...
20 | def get_output_charset(self) -> str | None: ...
21 | def header_encode(self, string: str) -> str: ...
22 | def header_encode_lines(self, string: str, maxlengths: Iterator[int]) -> list[str | None]: ...
23 | @overload
24 | def body_encode(self, string: None) -> None: ...
25 | @overload
26 | def body_encode(self, string: str | bytes) -> str: ...
27 | def __eq__(self, other: object) -> bool: ...
28 | def __ne__(self, value: object, /) -> bool: ...
29 |
30 | def add_charset(
31 | charset: str, header_enc: int | None = None, body_enc: int | None = None, output_charset: str | None = None
32 | ) -> None: ...
33 | def add_alias(alias: str, canonical: str) -> None: ...
34 | def add_codec(charset: str, codecname: str) -> None: ...
35 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/contentmanager.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from email.message import Message
3 | from typing import Any
4 |
5 | class ContentManager:
6 | def get_content(self, msg: Message, *args: Any, **kw: Any) -> Any: ...
7 | def set_content(self, msg: Message, obj: Any, *args: Any, **kw: Any) -> Any: ...
8 | def add_get_handler(self, key: str, handler: Callable[..., Any]) -> None: ...
9 | def add_set_handler(self, typekey: type, handler: Callable[..., Any]) -> None: ...
10 |
11 | raw_data_manager: ContentManager
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/encoders.pyi:
--------------------------------------------------------------------------------
1 | from email.message import Message
2 |
3 | __all__ = ["encode_7or8bit", "encode_base64", "encode_noop", "encode_quopri"]
4 |
5 | def encode_base64(msg: Message) -> None: ...
6 | def encode_quopri(msg: Message) -> None: ...
7 | def encode_7or8bit(msg: Message) -> None: ...
8 | def encode_noop(msg: Message) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/feedparser.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from email.message import Message
3 | from email.policy import Policy
4 | from typing import Generic, TypeVar, overload
5 |
6 | __all__ = ["FeedParser", "BytesFeedParser"]
7 |
8 | _MessageT = TypeVar("_MessageT", bound=Message)
9 |
10 | class FeedParser(Generic[_MessageT]):
11 | @overload
12 | def __init__(self: FeedParser[Message], _factory: None = None, *, policy: Policy = ...) -> None: ...
13 | @overload
14 | def __init__(self, _factory: Callable[[], _MessageT], *, policy: Policy = ...) -> None: ...
15 | def feed(self, data: str) -> None: ...
16 | def close(self) -> _MessageT: ...
17 |
18 | class BytesFeedParser(FeedParser[_MessageT]):
19 | @overload
20 | def __init__(self: BytesFeedParser[Message], _factory: None = None, *, policy: Policy = ...) -> None: ...
21 | @overload
22 | def __init__(self, _factory: Callable[[], _MessageT], *, policy: Policy = ...) -> None: ...
23 | def feed(self, data: bytes | bytearray) -> None: ... # type: ignore[override]
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/generator.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import SupportsWrite
2 | from email.message import Message
3 | from email.policy import Policy
4 | from typing_extensions import Self
5 |
6 | __all__ = ["Generator", "DecodedGenerator", "BytesGenerator"]
7 |
8 | class Generator:
9 | def clone(self, fp: SupportsWrite[str]) -> Self: ...
10 | def write(self, s: str) -> None: ...
11 | def __init__(
12 | self,
13 | outfp: SupportsWrite[str],
14 | mangle_from_: bool | None = None,
15 | maxheaderlen: int | None = None,
16 | *,
17 | policy: Policy | None = None,
18 | ) -> None: ...
19 | def flatten(self, msg: Message, unixfrom: bool = False, linesep: str | None = None) -> None: ...
20 |
21 | class BytesGenerator(Generator):
22 | def __init__(
23 | self,
24 | outfp: SupportsWrite[bytes],
25 | mangle_from_: bool | None = None,
26 | maxheaderlen: int | None = None,
27 | *,
28 | policy: Policy | None = None,
29 | ) -> None: ...
30 |
31 | class DecodedGenerator(Generator):
32 | def __init__(
33 | self,
34 | outfp: SupportsWrite[str],
35 | mangle_from_: bool | None = None,
36 | maxheaderlen: int | None = None,
37 | fmt: str | None = None,
38 | *,
39 | policy: Policy | None = None,
40 | ) -> None: ...
41 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/header.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable
2 | from email.charset import Charset
3 | from typing import Any
4 |
5 | __all__ = ["Header", "decode_header", "make_header"]
6 |
7 | class Header:
8 | def __init__(
9 | self,
10 | s: bytes | bytearray | str | None = None,
11 | charset: Charset | str | None = None,
12 | maxlinelen: int | None = None,
13 | header_name: str | None = None,
14 | continuation_ws: str = " ",
15 | errors: str = "strict",
16 | ) -> None: ...
17 | def append(self, s: bytes | bytearray | str, charset: Charset | str | None = None, errors: str = "strict") -> None: ...
18 | def encode(self, splitchars: str = ";, \t", maxlinelen: int | None = None, linesep: str = "\n") -> str: ...
19 | def __eq__(self, other: object) -> bool: ...
20 | def __ne__(self, value: object, /) -> bool: ...
21 |
22 | # decode_header() either returns list[tuple[str, None]] if the header
23 | # contains no encoded parts, or list[tuple[bytes, str | None]] if the header
24 | # contains at least one encoded part.
25 | def decode_header(header: Header | str) -> list[tuple[Any, Any | None]]: ...
26 | def make_header(
27 | decoded_seq: Iterable[tuple[bytes | bytearray | str, str | None]],
28 | maxlinelen: int | None = None,
29 | header_name: str | None = None,
30 | continuation_ws: str = " ",
31 | ) -> Header: ...
32 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/iterators.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import SupportsWrite
2 | from collections.abc import Iterator
3 | from email.message import Message
4 |
5 | __all__ = ["body_line_iterator", "typed_subpart_iterator", "walk"]
6 |
7 | def body_line_iterator(msg: Message, decode: bool = False) -> Iterator[str]: ...
8 | def typed_subpart_iterator(msg: Message, maintype: str = "text", subtype: str | None = None) -> Iterator[str]: ...
9 | def walk(self: Message) -> Iterator[Message]: ...
10 |
11 | # We include the seemingly private function because it is documented in the stdlib documentation.
12 | def _structure(msg: Message, fp: SupportsWrite[str] | None = None, level: int = 0, include_default: bool = False) -> None: ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/email/mime/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/application.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from email import _ParamsType
3 | from email.mime.nonmultipart import MIMENonMultipart
4 | from email.policy import Policy
5 |
6 | __all__ = ["MIMEApplication"]
7 |
8 | class MIMEApplication(MIMENonMultipart):
9 | def __init__(
10 | self,
11 | _data: str | bytes | bytearray,
12 | _subtype: str = "octet-stream",
13 | _encoder: Callable[[MIMEApplication], object] = ...,
14 | *,
15 | policy: Policy | None = None,
16 | **_params: _ParamsType,
17 | ) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/audio.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from email import _ParamsType
3 | from email.mime.nonmultipart import MIMENonMultipart
4 | from email.policy import Policy
5 |
6 | __all__ = ["MIMEAudio"]
7 |
8 | class MIMEAudio(MIMENonMultipart):
9 | def __init__(
10 | self,
11 | _audiodata: str | bytes | bytearray,
12 | _subtype: str | None = None,
13 | _encoder: Callable[[MIMEAudio], object] = ...,
14 | *,
15 | policy: Policy | None = None,
16 | **_params: _ParamsType,
17 | ) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/base.pyi:
--------------------------------------------------------------------------------
1 | import email.message
2 | from email import _ParamsType
3 | from email.policy import Policy
4 |
5 | __all__ = ["MIMEBase"]
6 |
7 | class MIMEBase(email.message.Message):
8 | def __init__(self, _maintype: str, _subtype: str, *, policy: Policy | None = None, **_params: _ParamsType) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/image.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from email import _ParamsType
3 | from email.mime.nonmultipart import MIMENonMultipart
4 | from email.policy import Policy
5 |
6 | __all__ = ["MIMEImage"]
7 |
8 | class MIMEImage(MIMENonMultipart):
9 | def __init__(
10 | self,
11 | _imagedata: str | bytes | bytearray,
12 | _subtype: str | None = None,
13 | _encoder: Callable[[MIMEImage], object] = ...,
14 | *,
15 | policy: Policy | None = None,
16 | **_params: _ParamsType,
17 | ) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/message.pyi:
--------------------------------------------------------------------------------
1 | from email.message import Message
2 | from email.mime.nonmultipart import MIMENonMultipart
3 | from email.policy import Policy
4 |
5 | __all__ = ["MIMEMessage"]
6 |
7 | class MIMEMessage(MIMENonMultipart):
8 | def __init__(self, _msg: Message, _subtype: str = "rfc822", *, policy: Policy | None = None) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/multipart.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Sequence
2 | from email import _ParamsType
3 | from email.message import Message
4 | from email.mime.base import MIMEBase
5 | from email.policy import Policy
6 |
7 | __all__ = ["MIMEMultipart"]
8 |
9 | class MIMEMultipart(MIMEBase):
10 | def __init__(
11 | self,
12 | _subtype: str = "mixed",
13 | boundary: str | None = None,
14 | _subparts: Sequence[Message] | None = None,
15 | *,
16 | policy: Policy | None = None,
17 | **_params: _ParamsType,
18 | ) -> None: ...
19 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/nonmultipart.pyi:
--------------------------------------------------------------------------------
1 | from email.mime.base import MIMEBase
2 |
3 | __all__ = ["MIMENonMultipart"]
4 |
5 | class MIMENonMultipart(MIMEBase): ...
6 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/mime/text.pyi:
--------------------------------------------------------------------------------
1 | from email.mime.nonmultipart import MIMENonMultipart
2 | from email.policy import Policy
3 |
4 | __all__ = ["MIMEText"]
5 |
6 | class MIMEText(MIMENonMultipart):
7 | def __init__(
8 | self, _text: str, _subtype: str = "plain", _charset: str | None = None, *, policy: Policy | None = None
9 | ) -> None: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/email/quoprimime.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable
2 |
3 | __all__ = [
4 | "body_decode",
5 | "body_encode",
6 | "body_length",
7 | "decode",
8 | "decodestring",
9 | "header_decode",
10 | "header_encode",
11 | "header_length",
12 | "quote",
13 | "unquote",
14 | ]
15 |
16 | def header_check(octet: int) -> bool: ...
17 | def body_check(octet: int) -> bool: ...
18 | def header_length(bytearray: Iterable[int]) -> int: ...
19 | def body_length(bytearray: Iterable[int]) -> int: ...
20 | def unquote(s: str | bytes | bytearray) -> str: ...
21 | def quote(c: str | bytes | bytearray) -> str: ...
22 | def header_encode(header_bytes: bytes | bytearray, charset: str = "iso-8859-1") -> str: ...
23 | def body_encode(body: str, maxlinelen: int = 76, eol: str = "\n") -> str: ...
24 | def decode(encoded: str, eol: str = "\n") -> str: ...
25 | def header_decode(s: str) -> str: ...
26 |
27 | body_decode = decode
28 | decodestring = decode
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/encodings/__init__.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete
2 | from codecs import CodecInfo
3 |
4 | class CodecRegistryError(LookupError, SystemError): ...
5 |
6 | def normalize_encoding(encoding: str | bytes) -> str: ...
7 | def search_function(encoding: str) -> CodecInfo | None: ...
8 |
9 | # Needed for submodules
10 | def __getattr__(name: str) -> Incomplete: ...
11 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/encodings/utf_8.pyi:
--------------------------------------------------------------------------------
1 | import codecs
2 | from _typeshed import ReadableBuffer
3 |
4 | class IncrementalEncoder(codecs.IncrementalEncoder):
5 | def encode(self, input: str, final: bool = False) -> bytes: ...
6 |
7 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
8 | @staticmethod
9 | def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ...
10 |
11 | class StreamWriter(codecs.StreamWriter):
12 | @staticmethod
13 | def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ...
14 |
15 | class StreamReader(codecs.StreamReader):
16 | @staticmethod
17 | def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ...
18 |
19 | def getregentry() -> codecs.CodecInfo: ...
20 | def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ...
21 | def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ...
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/encodings/utf_8_sig.pyi:
--------------------------------------------------------------------------------
1 | import codecs
2 | from _typeshed import ReadableBuffer
3 |
4 | class IncrementalEncoder(codecs.IncrementalEncoder):
5 | def __init__(self, errors: str = "strict") -> None: ...
6 | def encode(self, input: str, final: bool = False) -> bytes: ...
7 | def getstate(self) -> int: ...
8 | def setstate(self, state: int) -> None: ... # type: ignore[override]
9 |
10 | class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
11 | def __init__(self, errors: str = "strict") -> None: ...
12 | def _buffer_decode(self, input: ReadableBuffer, errors: str | None, final: bool) -> tuple[str, int]: ...
13 |
14 | class StreamWriter(codecs.StreamWriter):
15 | def encode(self, input: str, errors: str | None = "strict") -> tuple[bytes, int]: ...
16 |
17 | class StreamReader(codecs.StreamReader):
18 | def decode(self, input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ...
19 |
20 | def getregentry() -> codecs.CodecInfo: ...
21 | def encode(input: str, errors: str | None = "strict") -> tuple[bytes, int]: ...
22 | def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/ensurepip/__init__.pyi:
--------------------------------------------------------------------------------
1 | __all__ = ["version", "bootstrap"]
2 |
3 | def version() -> str: ...
4 | def bootstrap(
5 | *,
6 | root: str | None = None,
7 | upgrade: bool = False,
8 | user: bool = False,
9 | altinstall: bool = False,
10 | default_pip: bool = False,
11 | verbosity: int = 0,
12 | ) -> None: ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/faulthandler.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import FileDescriptorLike
3 |
4 | def cancel_dump_traceback_later() -> None: ...
5 | def disable() -> None: ...
6 | def dump_traceback(file: FileDescriptorLike = ..., all_threads: bool = ...) -> None: ...
7 | def dump_traceback_later(timeout: float, repeat: bool = ..., file: FileDescriptorLike = ..., exit: bool = ...) -> None: ...
8 | def enable(file: FileDescriptorLike = ..., all_threads: bool = ...) -> None: ...
9 | def is_enabled() -> bool: ...
10 |
11 | if sys.platform != "win32":
12 | def register(signum: int, file: FileDescriptorLike = ..., all_threads: bool = ..., chain: bool = ...) -> None: ...
13 | def unregister(signum: int, /) -> None: ...
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/fnmatch.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable
2 | from typing import AnyStr
3 |
4 | __all__ = ["filter", "fnmatch", "fnmatchcase", "translate"]
5 |
6 | def fnmatch(name: AnyStr, pat: AnyStr) -> bool: ...
7 | def fnmatchcase(name: AnyStr, pat: AnyStr) -> bool: ...
8 | def filter(names: Iterable[AnyStr], pat: AnyStr) -> list[AnyStr]: ...
9 | def translate(pat: str) -> str: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/gc.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Callable
3 | from typing import Any, Final, Literal
4 | from typing_extensions import TypeAlias
5 |
6 | DEBUG_COLLECTABLE: Final = 2
7 | DEBUG_LEAK: Final = 38
8 | DEBUG_SAVEALL: Final = 32
9 | DEBUG_STATS: Final = 1
10 | DEBUG_UNCOLLECTABLE: Final = 4
11 |
12 | _CallbackType: TypeAlias = Callable[[Literal["start", "stop"], dict[str, int]], object]
13 |
14 | callbacks: list[_CallbackType]
15 | garbage: list[Any]
16 |
17 | def collect(generation: int = 2) -> int: ...
18 | def disable() -> None: ...
19 | def enable() -> None: ...
20 | def get_count() -> tuple[int, int, int]: ...
21 | def get_debug() -> int: ...
22 | def get_objects(generation: int | None = None) -> list[Any]: ...
23 | def freeze() -> None: ...
24 | def unfreeze() -> None: ...
25 | def get_freeze_count() -> int: ...
26 | def get_referents(*objs: Any) -> list[Any]: ...
27 | def get_referrers(*objs: Any) -> list[Any]: ...
28 | def get_stats() -> list[dict[str, Any]]: ...
29 | def get_threshold() -> tuple[int, int, int]: ...
30 | def is_tracked(obj: Any, /) -> bool: ...
31 |
32 | if sys.version_info >= (3, 9):
33 | def is_finalized(obj: Any, /) -> bool: ...
34 |
35 | def isenabled() -> bool: ...
36 | def set_debug(flags: int, /) -> None: ...
37 | def set_threshold(threshold0: int, threshold1: int = ..., threshold2: int = ..., /) -> None: ...
38 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/getopt.pyi:
--------------------------------------------------------------------------------
1 | __all__ = ["GetoptError", "error", "getopt", "gnu_getopt"]
2 |
3 | def getopt(args: list[str], shortopts: str, longopts: list[str] = []) -> tuple[list[tuple[str, str]], list[str]]: ...
4 | def gnu_getopt(args: list[str], shortopts: str, longopts: list[str] = []) -> tuple[list[tuple[str, str]], list[str]]: ...
5 |
6 | class GetoptError(Exception):
7 | msg: str
8 | opt: str
9 | def __init__(self, msg: str, opt: str = "") -> None: ...
10 |
11 | error = GetoptError
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/getpass.pyi:
--------------------------------------------------------------------------------
1 | from typing import TextIO
2 |
3 | __all__ = ["getpass", "getuser", "GetPassWarning"]
4 |
5 | def getpass(prompt: str = "Password: ", stream: TextIO | None = None) -> str: ...
6 | def getuser() -> str: ...
7 |
8 | class GetPassWarning(UserWarning): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/graphlib.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import SupportsItems
3 | from collections.abc import Iterable
4 | from typing import Any, Generic, TypeVar, overload
5 |
6 | __all__ = ["TopologicalSorter", "CycleError"]
7 |
8 | _T = TypeVar("_T")
9 |
10 | if sys.version_info >= (3, 11):
11 | from types import GenericAlias
12 |
13 | class TopologicalSorter(Generic[_T]):
14 | @overload
15 | def __init__(self, graph: None = None) -> None: ...
16 | @overload
17 | def __init__(self, graph: SupportsItems[_T, Iterable[_T]]) -> None: ...
18 | def add(self, node: _T, *predecessors: _T) -> None: ...
19 | def prepare(self) -> None: ...
20 | def is_active(self) -> bool: ...
21 | def __bool__(self) -> bool: ...
22 | def done(self, *nodes: _T) -> None: ...
23 | def get_ready(self) -> tuple[_T, ...]: ...
24 | def static_order(self) -> Iterable[_T]: ...
25 | if sys.version_info >= (3, 11):
26 | def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
27 |
28 | class CycleError(ValueError): ...
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/grp.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import structseq
3 | from typing import Any, Final, final
4 |
5 | if sys.platform != "win32":
6 | @final
7 | class struct_group(structseq[Any], tuple[str, str | None, int, list[str]]):
8 | if sys.version_info >= (3, 10):
9 | __match_args__: Final = ("gr_name", "gr_passwd", "gr_gid", "gr_mem")
10 |
11 | @property
12 | def gr_name(self) -> str: ...
13 | @property
14 | def gr_passwd(self) -> str | None: ...
15 | @property
16 | def gr_gid(self) -> int: ...
17 | @property
18 | def gr_mem(self) -> list[str]: ...
19 |
20 | def getgrall() -> list[struct_group]: ...
21 | def getgrgid(id: int) -> struct_group: ...
22 | def getgrnam(name: str) -> struct_group: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/heapq.pyi:
--------------------------------------------------------------------------------
1 | from _heapq import *
2 | from _typeshed import SupportsRichComparison
3 | from collections.abc import Callable, Iterable
4 | from typing import Any, Final, TypeVar
5 |
6 | __all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]
7 |
8 | _S = TypeVar("_S")
9 |
10 | __about__: Final[str]
11 |
12 | def merge(
13 | *iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None, reverse: bool = False
14 | ) -> Iterable[_S]: ...
15 | def nlargest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
16 | def nsmallest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
17 | def _heapify_max(heap: list[Any], /) -> None: ... # undocumented
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/html/__init__.pyi:
--------------------------------------------------------------------------------
1 | from typing import AnyStr
2 |
3 | __all__ = ["escape", "unescape"]
4 |
5 | def escape(s: AnyStr, quote: bool = True) -> AnyStr: ...
6 | def unescape(s: AnyStr) -> AnyStr: ...
7 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/html/entities.pyi:
--------------------------------------------------------------------------------
1 | __all__ = ["html5", "name2codepoint", "codepoint2name", "entitydefs"]
2 |
3 | name2codepoint: dict[str, int]
4 | html5: dict[str, str]
5 | codepoint2name: dict[int, str]
6 | entitydefs: dict[str, str]
7 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/imghdr.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from collections.abc import Callable
3 | from typing import Any, BinaryIO, Protocol, overload
4 |
5 | __all__ = ["what"]
6 |
7 | class _ReadableBinary(Protocol):
8 | def tell(self) -> int: ...
9 | def read(self, size: int, /) -> bytes: ...
10 | def seek(self, offset: int, /) -> Any: ...
11 |
12 | @overload
13 | def what(file: StrPath | _ReadableBinary, h: None = None) -> str | None: ...
14 | @overload
15 | def what(file: Any, h: bytes) -> str | None: ...
16 |
17 | tests: list[Callable[[bytes, BinaryIO | None], str | None]]
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/importlib/__init__.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Mapping, Sequence
3 | from importlib.abc import Loader
4 | from types import ModuleType
5 |
6 | __all__ = ["__import__", "import_module", "invalidate_caches", "reload"]
7 |
8 | # Signature of `builtins.__import__` should be kept identical to `importlib.__import__`
9 | def __import__(
10 | name: str,
11 | globals: Mapping[str, object] | None = None,
12 | locals: Mapping[str, object] | None = None,
13 | fromlist: Sequence[str] = (),
14 | level: int = 0,
15 | ) -> ModuleType: ...
16 |
17 | # `importlib.import_module` return type should be kept the same as `builtins.__import__`
18 | def import_module(name: str, package: str | None = None) -> ModuleType: ...
19 |
20 | if sys.version_info < (3, 12):
21 | def find_loader(name: str, path: str | None = None) -> Loader | None: ...
22 |
23 | def invalidate_caches() -> None: ...
24 | def reload(module: ModuleType) -> ModuleType: ...
25 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/importlib/_abc.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | import types
3 | from abc import ABCMeta
4 | from importlib.machinery import ModuleSpec
5 |
6 | if sys.version_info >= (3, 10):
7 | class Loader(metaclass=ABCMeta):
8 | def load_module(self, fullname: str) -> types.ModuleType: ...
9 | if sys.version_info < (3, 12):
10 | def module_repr(self, module: types.ModuleType) -> str: ...
11 |
12 | def create_module(self, spec: ModuleSpec) -> types.ModuleType | None: ...
13 | # Not defined on the actual class for backwards-compatibility reasons,
14 | # but expected in new code.
15 | def exec_module(self, module: types.ModuleType) -> None: ...
16 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/importlib/metadata/diagnose.pyi:
--------------------------------------------------------------------------------
1 | def inspect(path: str) -> None: ...
2 | def run() -> None: ...
3 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/importlib/resources/abc.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.version_info >= (3, 11):
4 | # These are all actually defined in this file on 3.11+,
5 | # and re-exported from importlib.abc,
6 | # but it's much less code duplication for typeshed if we pretend that they're still defined
7 | # in importlib.abc on 3.11+, and re-exported from this file
8 | from importlib.abc import (
9 | ResourceReader as ResourceReader,
10 | Traversable as Traversable,
11 | TraversableResources as TraversableResources,
12 | )
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/importlib/resources/readers.pyi:
--------------------------------------------------------------------------------
1 | # On py311+, things are actually defined here
2 | # and re-exported from importlib.readers,
3 | # but doing it this way leads to less code duplication for us
4 |
5 | import sys
6 | from collections.abc import Iterable, Iterator
7 | from typing import TypeVar
8 |
9 | if sys.version_info >= (3, 11):
10 | from importlib.readers import *
11 |
12 | _T = TypeVar("_T")
13 |
14 | def remove_duplicates(items: Iterable[_T]) -> Iterator[_T]: ...
15 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/importlib/simple.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.version_info >= (3, 11):
4 | from .resources.simple import (
5 | ResourceContainer as ResourceContainer,
6 | ResourceHandle as ResourceHandle,
7 | SimpleReader as SimpleReader,
8 | TraversableReader as TraversableReader,
9 | )
10 |
11 | __all__ = ["SimpleReader", "ResourceHandle", "ResourceContainer", "TraversableReader"]
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/json/decoder.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from typing import Any
3 |
4 | __all__ = ["JSONDecoder", "JSONDecodeError"]
5 |
6 | class JSONDecodeError(ValueError):
7 | msg: str
8 | doc: str
9 | pos: int
10 | lineno: int
11 | colno: int
12 | def __init__(self, msg: str, doc: str, pos: int) -> None: ...
13 |
14 | class JSONDecoder:
15 | object_hook: Callable[[dict[str, Any]], Any]
16 | parse_float: Callable[[str], Any]
17 | parse_int: Callable[[str], Any]
18 | parse_constant: Callable[[str], Any]
19 | strict: bool
20 | object_pairs_hook: Callable[[list[tuple[str, Any]]], Any]
21 | def __init__(
22 | self,
23 | *,
24 | object_hook: Callable[[dict[str, Any]], Any] | None = None,
25 | parse_float: Callable[[str], Any] | None = None,
26 | parse_int: Callable[[str], Any] | None = None,
27 | parse_constant: Callable[[str], Any] | None = None,
28 | strict: bool = True,
29 | object_pairs_hook: Callable[[list[tuple[str, Any]]], Any] | None = None,
30 | ) -> None: ...
31 | def decode(self, s: str, _w: Callable[..., Any] = ...) -> Any: ... # _w is undocumented
32 | def raw_decode(self, s: str, idx: int = 0) -> tuple[Any, int]: ...
33 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/json/encoder.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Iterator
2 | from re import Pattern
3 | from typing import Any
4 |
5 | ESCAPE: Pattern[str]
6 | ESCAPE_ASCII: Pattern[str]
7 | HAS_UTF8: Pattern[bytes]
8 | ESCAPE_DCT: dict[str, str]
9 | INFINITY: float
10 |
11 | def py_encode_basestring(s: str) -> str: ... # undocumented
12 | def py_encode_basestring_ascii(s: str) -> str: ... # undocumented
13 | def encode_basestring(s: str, /) -> str: ... # undocumented
14 | def encode_basestring_ascii(s: str, /) -> str: ... # undocumented
15 |
16 | class JSONEncoder:
17 | item_separator: str
18 | key_separator: str
19 |
20 | skipkeys: bool
21 | ensure_ascii: bool
22 | check_circular: bool
23 | allow_nan: bool
24 | sort_keys: bool
25 | indent: int | str
26 | def __init__(
27 | self,
28 | *,
29 | skipkeys: bool = False,
30 | ensure_ascii: bool = True,
31 | check_circular: bool = True,
32 | allow_nan: bool = True,
33 | sort_keys: bool = False,
34 | indent: int | str | None = None,
35 | separators: tuple[str, str] | None = None,
36 | default: Callable[..., Any] | None = None,
37 | ) -> None: ...
38 | def default(self, o: Any) -> Any: ...
39 | def encode(self, o: Any) -> str: ...
40 | def iterencode(self, o: Any, _one_shot: bool = False) -> Iterator[str]: ...
41 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/json/tool.pyi:
--------------------------------------------------------------------------------
1 | def main() -> None: ...
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/keyword.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Sequence
3 | from typing import Final
4 |
5 | if sys.version_info >= (3, 9):
6 | __all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
7 | else:
8 | __all__ = ["iskeyword", "kwlist"]
9 |
10 | def iskeyword(s: str, /) -> bool: ...
11 |
12 | # a list at runtime, but you're not meant to mutate it;
13 | # type it as a sequence
14 | kwlist: Final[Sequence[str]]
15 |
16 | if sys.version_info >= (3, 9):
17 | def issoftkeyword(s: str, /) -> bool: ...
18 |
19 | # a list at runtime, but you're not meant to mutate it;
20 | # type it as a sequence
21 | softkwlist: Final[Sequence[str]]
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/lib2to3/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/btm_matcher.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete, SupportsGetItem
2 | from collections import defaultdict
3 | from collections.abc import Iterable
4 |
5 | from .fixer_base import BaseFix
6 | from .pytree import Leaf, Node
7 |
8 | class BMNode:
9 | count: Incomplete
10 | transition_table: Incomplete
11 | fixers: Incomplete
12 | id: Incomplete
13 | content: str
14 | def __init__(self) -> None: ...
15 |
16 | class BottomMatcher:
17 | match: Incomplete
18 | root: Incomplete
19 | nodes: Incomplete
20 | fixers: Incomplete
21 | logger: Incomplete
22 | def __init__(self) -> None: ...
23 | def add_fixer(self, fixer: BaseFix) -> None: ...
24 | def add(self, pattern: SupportsGetItem[int | slice, Incomplete] | None, start: BMNode) -> list[BMNode]: ...
25 | def run(self, leaves: Iterable[Leaf]) -> defaultdict[BaseFix, list[Node | Leaf]]: ...
26 | def print_ac(self) -> None: ...
27 |
28 | def type_repr(type_num: int) -> str | int: ...
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/lib2to3/fixes/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_apply.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixApply(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_asserts.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from ..fixer_base import BaseFix
4 |
5 | NAMES: dict[str, str]
6 |
7 | class FixAsserts(BaseFix):
8 | BM_compatible: ClassVar[Literal[False]]
9 | PATTERN: ClassVar[str]
10 | def transform(self, node, results) -> None: ...
11 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_basestring.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixBasestring(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[Literal["'basestring'"]]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_buffer.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixBuffer(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_dict.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 |
6 | iter_exempt: set[str]
7 |
8 | class FixDict(fixer_base.BaseFix):
9 | BM_compatible: ClassVar[Literal[True]]
10 | PATTERN: ClassVar[str]
11 | def transform(self, node, results): ...
12 | P1: ClassVar[str]
13 | p1: ClassVar[Incomplete]
14 | P2: ClassVar[str]
15 | p2: ClassVar[Incomplete]
16 | def in_special_context(self, node, isiter): ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_except.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Generator, Iterable
2 | from typing import ClassVar, Literal, TypeVar
3 |
4 | from .. import fixer_base
5 | from ..pytree import Base
6 |
7 | _N = TypeVar("_N", bound=Base)
8 |
9 | def find_excepts(nodes: Iterable[_N]) -> Generator[tuple[_N, _N], None, None]: ...
10 |
11 | class FixExcept(fixer_base.BaseFix):
12 | BM_compatible: ClassVar[Literal[True]]
13 | PATTERN: ClassVar[str]
14 | def transform(self, node, results): ...
15 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_exec.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixExec(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_execfile.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixExecfile(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_exitfunc.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete, StrPath
2 | from lib2to3 import fixer_base
3 | from typing import ClassVar, Literal
4 |
5 | from ..pytree import Node
6 |
7 | class FixExitfunc(fixer_base.BaseFix):
8 | BM_compatible: ClassVar[Literal[True]]
9 | PATTERN: ClassVar[str]
10 | def __init__(self, *args) -> None: ...
11 | sys_import: Incomplete | None
12 | def start_tree(self, tree: Node, filename: StrPath) -> None: ...
13 | def transform(self, node, results) -> None: ...
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_filter.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixFilter(fixer_base.ConditionalFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | skip_on: ClassVar[Literal["future_builtins.filter"]]
9 | def transform(self, node, results): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_funcattrs.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixFuncattrs(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_future.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixFuture(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_getcwdu.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixGetcwdu(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_has_key.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixHasKey(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_idioms.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | CMP: str
6 | TYPE: str
7 |
8 | class FixIdioms(fixer_base.BaseFix):
9 | BM_compatible: ClassVar[Literal[False]]
10 | PATTERN: ClassVar[str]
11 | def match(self, node): ...
12 | def transform(self, node, results): ...
13 | def transform_isinstance(self, node, results): ...
14 | def transform_while(self, node, results) -> None: ...
15 | def transform_sort(self, node, results) -> None: ...
16 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_import.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from collections.abc import Generator
3 | from typing import ClassVar, Literal
4 |
5 | from .. import fixer_base
6 | from ..pytree import Node
7 |
8 | def traverse_imports(names) -> Generator[str, None, None]: ...
9 |
10 | class FixImport(fixer_base.BaseFix):
11 | BM_compatible: ClassVar[Literal[True]]
12 | PATTERN: ClassVar[str]
13 | skip: bool
14 | def start_tree(self, tree: Node, name: StrPath) -> None: ...
15 | def transform(self, node, results): ...
16 | def probably_a_local_import(self, imp_name): ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_imports.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from collections.abc import Generator
3 | from typing import ClassVar, Literal
4 |
5 | from .. import fixer_base
6 | from ..pytree import Node
7 |
8 | MAPPING: dict[str, str]
9 |
10 | def alternates(members): ...
11 | def build_pattern(mapping=...) -> Generator[str, None, None]: ...
12 |
13 | class FixImports(fixer_base.BaseFix):
14 | BM_compatible: ClassVar[Literal[True]]
15 | mapping = MAPPING
16 | def build_pattern(self): ...
17 | def compile_pattern(self) -> None: ...
18 | def match(self, node): ...
19 | replace: dict[str, str]
20 | def start_tree(self, tree: Node, filename: StrPath) -> None: ...
21 | def transform(self, node, results) -> None: ...
22 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_imports2.pyi:
--------------------------------------------------------------------------------
1 | from . import fix_imports
2 |
3 | MAPPING: dict[str, str]
4 |
5 | class FixImports2(fix_imports.FixImports):
6 | mapping = MAPPING
7 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_input.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 |
6 | context: Incomplete
7 |
8 | class FixInput(fixer_base.BaseFix):
9 | BM_compatible: ClassVar[Literal[True]]
10 | PATTERN: ClassVar[str]
11 | def transform(self, node, results): ...
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_intern.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixIntern(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | order: ClassVar[Literal["pre"]]
8 | PATTERN: ClassVar[str]
9 | def transform(self, node, results): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_isinstance.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixIsinstance(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_itertools.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixItertools(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | it_funcs: str
8 | PATTERN: ClassVar[str]
9 | def transform(self, node, results) -> None: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_itertools_imports.pyi:
--------------------------------------------------------------------------------
1 | from lib2to3 import fixer_base
2 | from typing import ClassVar, Literal
3 |
4 | class FixItertoolsImports(fixer_base.BaseFix):
5 | BM_compatible: ClassVar[Literal[True]]
6 | PATTERN: ClassVar[str]
7 | def transform(self, node, results): ...
8 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_long.pyi:
--------------------------------------------------------------------------------
1 | from lib2to3 import fixer_base
2 | from typing import ClassVar, Literal
3 |
4 | class FixLong(fixer_base.BaseFix):
5 | BM_compatible: ClassVar[Literal[True]]
6 | PATTERN: ClassVar[Literal["'long'"]]
7 | def transform(self, node, results) -> None: ...
8 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_map.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixMap(fixer_base.ConditionalFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | skip_on: ClassVar[Literal["future_builtins.map"]]
9 | def transform(self, node, results): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_metaclass.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Generator
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 | from ..pytree import Base
6 |
7 | def has_metaclass(parent): ...
8 | def fixup_parse_tree(cls_node) -> None: ...
9 | def fixup_simple_stmt(parent, i, stmt_node) -> None: ...
10 | def remove_trailing_newline(node) -> None: ...
11 | def find_metas(cls_node) -> Generator[tuple[Base, int, Base], None, None]: ...
12 | def fixup_indent(suite) -> None: ...
13 |
14 | class FixMetaclass(fixer_base.BaseFix):
15 | BM_compatible: ClassVar[Literal[True]]
16 | PATTERN: ClassVar[str]
17 | def transform(self, node, results) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_methodattrs.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | MAP: dict[str, str]
6 |
7 | class FixMethodattrs(fixer_base.BaseFix):
8 | BM_compatible: ClassVar[Literal[True]]
9 | PATTERN: ClassVar[str]
10 | def transform(self, node, results) -> None: ...
11 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_ne.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixNe(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[False]]
7 | def match(self, node): ...
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_next.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 | from ..pytree import Node
6 |
7 | bind_warning: str
8 |
9 | class FixNext(fixer_base.BaseFix):
10 | BM_compatible: ClassVar[Literal[True]]
11 | PATTERN: ClassVar[str]
12 | order: ClassVar[Literal["pre"]]
13 | shadowed_next: bool
14 | def start_tree(self, tree: Node, filename: StrPath) -> None: ...
15 | def transform(self, node, results) -> None: ...
16 |
17 | def is_assign_target(node): ...
18 | def find_assign(node): ...
19 | def is_subtree(root, node): ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_nonzero.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixNonzero(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_numliterals.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixNumliterals(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[False]]
7 | def match(self, node): ...
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_operator.pyi:
--------------------------------------------------------------------------------
1 | from lib2to3 import fixer_base
2 | from typing import ClassVar, Literal
3 |
4 | def invocation(s): ...
5 |
6 | class FixOperator(fixer_base.BaseFix):
7 | BM_compatible: ClassVar[Literal[True]]
8 | order: ClassVar[Literal["pre"]]
9 | methods: str
10 | obj: str
11 | PATTERN: ClassVar[str]
12 | def transform(self, node, results): ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_paren.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixParen(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_print.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 |
6 | parend_expr: Incomplete
7 |
8 | class FixPrint(fixer_base.BaseFix):
9 | BM_compatible: ClassVar[Literal[True]]
10 | PATTERN: ClassVar[str]
11 | def transform(self, node, results): ...
12 | def add_kwarg(self, l_nodes, s_kwd, n_expr) -> None: ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_raise.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixRaise(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_raw_input.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixRawInput(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_reduce.pyi:
--------------------------------------------------------------------------------
1 | from lib2to3 import fixer_base
2 | from typing import ClassVar, Literal
3 |
4 | class FixReduce(fixer_base.BaseFix):
5 | BM_compatible: ClassVar[Literal[True]]
6 | order: ClassVar[Literal["pre"]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_reload.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixReload(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | order: ClassVar[Literal["pre"]]
8 | PATTERN: ClassVar[str]
9 | def transform(self, node, results): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_renames.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Generator
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 |
6 | MAPPING: dict[str, dict[str, str]]
7 | LOOKUP: dict[tuple[str, str], str]
8 |
9 | def alternates(members): ...
10 | def build_pattern() -> Generator[str, None, None]: ...
11 |
12 | class FixRenames(fixer_base.BaseFix):
13 | BM_compatible: ClassVar[Literal[True]]
14 | order: ClassVar[Literal["pre"]]
15 | PATTERN: ClassVar[str]
16 | def match(self, node): ...
17 | def transform(self, node, results) -> None: ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_repr.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixRepr(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_set_literal.pyi:
--------------------------------------------------------------------------------
1 | from lib2to3 import fixer_base
2 | from typing import ClassVar, Literal
3 |
4 | class FixSetLiteral(fixer_base.BaseFix):
5 | BM_compatible: ClassVar[Literal[True]]
6 | PATTERN: ClassVar[str]
7 | def transform(self, node, results): ...
8 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_standarderror.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixStandarderror(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_sys_exc.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixSysExc(fixer_base.BaseFix):
6 | exc_info: ClassVar[list[str]]
7 | BM_compatible: ClassVar[Literal[True]]
8 | PATTERN: ClassVar[str]
9 | def transform(self, node, results): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_throw.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixThrow(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_tuple_params.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 |
6 | def is_docstring(stmt): ...
7 |
8 | class FixTupleParams(fixer_base.BaseFix):
9 | BM_compatible: ClassVar[Literal[True]]
10 | PATTERN: ClassVar[str]
11 | def transform(self, node, results): ...
12 | def transform_lambda(self, node, results) -> None: ...
13 |
14 | def simplify_args(node): ...
15 | def find_params(node): ...
16 | def map_to_index(param_list, prefix=..., d: Incomplete | None = ...): ...
17 | def tuple_name(param_list): ...
18 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_types.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixTypes(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results): ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_unicode.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 | from ..pytree import Node
6 |
7 | class FixUnicode(fixer_base.BaseFix):
8 | BM_compatible: ClassVar[Literal[True]]
9 | PATTERN: ClassVar[Literal["STRING | 'unicode' | 'unichr'"]] # type: ignore[name-defined] # Name "STRING" is not defined
10 | unicode_literals: bool
11 | def start_tree(self, tree: Node, filename: StrPath) -> None: ...
12 | def transform(self, node, results): ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_urllib.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Generator
2 | from typing import Literal
3 |
4 | from .fix_imports import FixImports
5 |
6 | MAPPING: dict[str, list[tuple[Literal["urllib.request", "urllib.parse", "urllib.error"], list[str]]]]
7 |
8 | def build_pattern() -> Generator[str, None, None]: ...
9 |
10 | class FixUrllib(FixImports):
11 | def build_pattern(self): ...
12 | def transform_import(self, node, results) -> None: ...
13 | def transform_member(self, node, results): ...
14 | def transform_dot(self, node, results) -> None: ...
15 | def transform(self, node, results) -> None: ...
16 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_ws_comma.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 | from ..pytree import Leaf
5 |
6 | class FixWsComma(fixer_base.BaseFix):
7 | BM_compatible: ClassVar[Literal[False]]
8 | PATTERN: ClassVar[str]
9 | COMMA: Leaf
10 | COLON: Leaf
11 | SEPS: tuple[Leaf, Leaf]
12 | def transform(self, node, results): ...
13 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_xrange.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete, StrPath
2 | from typing import ClassVar, Literal
3 |
4 | from .. import fixer_base
5 | from ..pytree import Node
6 |
7 | class FixXrange(fixer_base.BaseFix):
8 | BM_compatible: ClassVar[Literal[True]]
9 | PATTERN: ClassVar[str]
10 | transformed_xranges: set[Incomplete] | None
11 | def start_tree(self, tree: Node, filename: StrPath) -> None: ...
12 | def finish_tree(self, tree: Node, filename: StrPath) -> None: ...
13 | def transform(self, node, results): ...
14 | def transform_xrange(self, node, results) -> None: ...
15 | def transform_range(self, node, results): ...
16 | P1: ClassVar[str]
17 | p1: ClassVar[Incomplete]
18 | P2: ClassVar[str]
19 | p2: ClassVar[Incomplete]
20 | def in_special_context(self, node): ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_xreadlines.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixXreadlines(fixer_base.BaseFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | def transform(self, node, results) -> None: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/fixes/fix_zip.pyi:
--------------------------------------------------------------------------------
1 | from typing import ClassVar, Literal
2 |
3 | from .. import fixer_base
4 |
5 | class FixZip(fixer_base.ConditionalFix):
6 | BM_compatible: ClassVar[Literal[True]]
7 | PATTERN: ClassVar[str]
8 | skip_on: ClassVar[Literal["future_builtins.zip"]]
9 | def transform(self, node, results): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/pgen2/__init__.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from typing import Any
3 | from typing_extensions import TypeAlias
4 |
5 | from ..pytree import _RawNode
6 | from .grammar import Grammar
7 |
8 | # This is imported in several lib2to3/pgen2 submodules
9 | _Convert: TypeAlias = Callable[[Grammar, _RawNode], Any] # noqa: Y047
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/pgen2/driver.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from collections.abc import Iterable
3 | from logging import Logger
4 | from typing import IO
5 |
6 | from ..pytree import _NL
7 | from . import _Convert
8 | from .grammar import Grammar
9 |
10 | __all__ = ["Driver", "load_grammar"]
11 |
12 | class Driver:
13 | grammar: Grammar
14 | logger: Logger
15 | convert: _Convert
16 | def __init__(self, grammar: Grammar, convert: _Convert | None = None, logger: Logger | None = None) -> None: ...
17 | def parse_tokens(
18 | self, tokens: Iterable[tuple[int, str, tuple[int, int], tuple[int, int], str]], debug: bool = False
19 | ) -> _NL: ...
20 | def parse_stream_raw(self, stream: IO[str], debug: bool = False) -> _NL: ...
21 | def parse_stream(self, stream: IO[str], debug: bool = False) -> _NL: ...
22 | def parse_file(self, filename: StrPath, encoding: str | None = None, debug: bool = False) -> _NL: ...
23 | def parse_string(self, text: str, debug: bool = False) -> _NL: ...
24 |
25 | def load_grammar(
26 | gt: str = "Grammar.txt", gp: str | None = None, save: bool = True, force: bool = False, logger: Logger | None = None
27 | ) -> Grammar: ...
28 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/pgen2/grammar.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrPath
2 | from typing_extensions import Self, TypeAlias
3 |
4 | _Label: TypeAlias = tuple[int, str | None]
5 | _DFA: TypeAlias = list[list[tuple[int, int]]]
6 | _DFAS: TypeAlias = tuple[_DFA, dict[int, int]]
7 |
8 | class Grammar:
9 | symbol2number: dict[str, int]
10 | number2symbol: dict[int, str]
11 | states: list[_DFA]
12 | dfas: dict[int, _DFAS]
13 | labels: list[_Label]
14 | keywords: dict[str, int]
15 | tokens: dict[int, int]
16 | symbol2label: dict[str, int]
17 | start: int
18 | def dump(self, filename: StrPath) -> None: ...
19 | def load(self, filename: StrPath) -> None: ...
20 | def copy(self) -> Self: ...
21 | def report(self) -> None: ...
22 |
23 | opmap_raw: str
24 | opmap: dict[str, str]
25 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/pgen2/literals.pyi:
--------------------------------------------------------------------------------
1 | from re import Match
2 |
3 | simple_escapes: dict[str, str]
4 |
5 | def escape(m: Match[str]) -> str: ...
6 | def evalString(s: str) -> str: ...
7 | def test() -> None: ...
8 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/pgen2/parse.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Incomplete
2 | from collections.abc import Sequence
3 | from typing_extensions import TypeAlias
4 |
5 | from ..pytree import _NL, _RawNode
6 | from . import _Convert
7 | from .grammar import _DFAS, Grammar
8 |
9 | _Context: TypeAlias = Sequence[Incomplete]
10 |
11 | class ParseError(Exception):
12 | msg: str
13 | type: int
14 | value: str | None
15 | context: _Context
16 | def __init__(self, msg: str, type: int, value: str | None, context: _Context) -> None: ...
17 |
18 | class Parser:
19 | grammar: Grammar
20 | convert: _Convert
21 | stack: list[tuple[_DFAS, int, _RawNode]]
22 | rootnode: _NL | None
23 | used_names: set[str]
24 | def __init__(self, grammar: Grammar, convert: _Convert | None = None) -> None: ...
25 | def setup(self, start: int | None = None) -> None: ...
26 | def addtoken(self, type: int, value: str | None, context: _Context) -> bool: ...
27 | def classify(self, type: int, value: str | None, context: _Context) -> int: ...
28 | def shift(self, type: int, value: str | None, newstate: int, context: _Context) -> None: ...
29 | def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ...
30 | def pop(self) -> None: ...
31 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/lib2to3/pgen2/token.pyi:
--------------------------------------------------------------------------------
1 | ENDMARKER: int
2 | NAME: int
3 | NUMBER: int
4 | STRING: int
5 | NEWLINE: int
6 | INDENT: int
7 | DEDENT: int
8 | LPAR: int
9 | RPAR: int
10 | LSQB: int
11 | RSQB: int
12 | COLON: int
13 | COMMA: int
14 | SEMI: int
15 | PLUS: int
16 | MINUS: int
17 | STAR: int
18 | SLASH: int
19 | VBAR: int
20 | AMPER: int
21 | LESS: int
22 | GREATER: int
23 | EQUAL: int
24 | DOT: int
25 | PERCENT: int
26 | BACKQUOTE: int
27 | LBRACE: int
28 | RBRACE: int
29 | EQEQUAL: int
30 | NOTEQUAL: int
31 | LESSEQUAL: int
32 | GREATEREQUAL: int
33 | TILDE: int
34 | CIRCUMFLEX: int
35 | LEFTSHIFT: int
36 | RIGHTSHIFT: int
37 | DOUBLESTAR: int
38 | PLUSEQUAL: int
39 | MINEQUAL: int
40 | STAREQUAL: int
41 | SLASHEQUAL: int
42 | PERCENTEQUAL: int
43 | AMPEREQUAL: int
44 | VBAREQUAL: int
45 | CIRCUMFLEXEQUAL: int
46 | LEFTSHIFTEQUAL: int
47 | RIGHTSHIFTEQUAL: int
48 | DOUBLESTAREQUAL: int
49 | DOUBLESLASH: int
50 | DOUBLESLASHEQUAL: int
51 | OP: int
52 | COMMENT: int
53 | NL: int
54 | RARROW: int
55 | AT: int
56 | ATEQUAL: int
57 | AWAIT: int
58 | ASYNC: int
59 | ERRORTOKEN: int
60 | COLONEQUAL: int
61 | N_TOKENS: int
62 | NT_OFFSET: int
63 | tok_name: dict[int, str]
64 |
65 | def ISTERMINAL(x: int) -> bool: ...
66 | def ISNONTERMINAL(x: int) -> bool: ...
67 | def ISEOF(x: int) -> bool: ...
68 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/linecache.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Callable
3 | from typing import Any
4 | from typing_extensions import TypeAlias
5 |
6 | if sys.version_info >= (3, 9):
7 | __all__ = ["getline", "clearcache", "checkcache", "lazycache"]
8 | else:
9 | __all__ = ["getline", "clearcache", "checkcache"]
10 |
11 | _ModuleGlobals: TypeAlias = dict[str, Any]
12 | _ModuleMetadata: TypeAlias = tuple[int, float | None, list[str], str]
13 |
14 | _SourceLoader: TypeAlias = tuple[Callable[[], str | None]]
15 |
16 | cache: dict[str, _SourceLoader | _ModuleMetadata] # undocumented
17 |
18 | def getline(filename: str, lineno: int, module_globals: _ModuleGlobals | None = None) -> str: ...
19 | def clearcache() -> None: ...
20 | def getlines(filename: str, module_globals: _ModuleGlobals | None = None) -> list[str]: ...
21 | def checkcache(filename: str | None = None) -> None: ...
22 | def updatecache(filename: str, module_globals: _ModuleGlobals | None = None) -> list[str]: ...
23 | def lazycache(filename: str, module_globals: _ModuleGlobals) -> bool: ...
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/mailcap.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Mapping, Sequence
2 | from typing_extensions import TypeAlias
3 |
4 | _Cap: TypeAlias = dict[str, str | int]
5 |
6 | __all__ = ["getcaps", "findmatch"]
7 |
8 | def findmatch(
9 | caps: Mapping[str, list[_Cap]], MIMEtype: str, key: str = "view", filename: str = "/dev/null", plist: Sequence[str] = []
10 | ) -> tuple[str | None, _Cap | None]: ...
11 | def getcaps() -> dict[str, list[_Cap]]: ...
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/msilib/sequence.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing_extensions import TypeAlias
3 |
4 | if sys.platform == "win32":
5 | _SequenceType: TypeAlias = list[tuple[str, str | None, int]]
6 |
7 | AdminExecuteSequence: _SequenceType
8 | AdminUISequence: _SequenceType
9 | AdvtExecuteSequence: _SequenceType
10 | InstallExecuteSequence: _SequenceType
11 | InstallUISequence: _SequenceType
12 |
13 | tables: list[str]
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/msilib/text.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.platform == "win32":
4 | ActionText: list[tuple[str, str, str | None]]
5 | UIText: list[tuple[str, str | None]]
6 | dirname: str
7 | tables: list[str]
8 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/msvcrt.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing import Final
3 |
4 | # This module is only available on Windows
5 | if sys.platform == "win32":
6 | CRT_ASSEMBLY_VERSION: Final[str]
7 | LK_UNLCK: Final = 0
8 | LK_LOCK: Final = 1
9 | LK_NBLCK: Final = 2
10 | LK_RLCK: Final = 3
11 | LK_NBRLCK: Final = 4
12 | SEM_FAILCRITICALERRORS: int
13 | SEM_NOALIGNMENTFAULTEXCEPT: int
14 | SEM_NOGPFAULTERRORBOX: int
15 | SEM_NOOPENFILEERRORBOX: int
16 | def locking(fd: int, mode: int, nbytes: int, /) -> None: ...
17 | def setmode(fd: int, mode: int, /) -> int: ...
18 | def open_osfhandle(handle: int, flags: int, /) -> int: ...
19 | def get_osfhandle(fd: int, /) -> int: ...
20 | def kbhit() -> bool: ...
21 | def getch() -> bytes: ...
22 | def getwch() -> str: ...
23 | def getche() -> bytes: ...
24 | def getwche() -> str: ...
25 | def putch(char: bytes | bytearray, /) -> None: ...
26 | def putwch(unicode_char: str, /) -> None: ...
27 | def ungetch(char: bytes | bytearray, /) -> None: ...
28 | def ungetwch(unicode_char: str, /) -> None: ...
29 | def heapmin() -> None: ...
30 | def SetErrorMode(mode: int, /) -> int: ...
31 | if sys.version_info >= (3, 10):
32 | def GetErrorMode() -> int: ... # undocumented
33 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/forkserver.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import FileDescriptorLike, Unused
2 | from collections.abc import Sequence
3 | from struct import Struct
4 | from typing import Any
5 |
6 | __all__ = ["ensure_running", "get_inherited_fds", "connect_to_new_process", "set_forkserver_preload"]
7 |
8 | MAXFDS_TO_SEND: int
9 | SIGNED_STRUCT: Struct
10 |
11 | class ForkServer:
12 | def set_forkserver_preload(self, modules_names: list[str]) -> None: ...
13 | def get_inherited_fds(self) -> list[int] | None: ...
14 | def connect_to_new_process(self, fds: Sequence[int]) -> tuple[int, int]: ...
15 | def ensure_running(self) -> None: ...
16 |
17 | def main(
18 | listener_fd: int | None,
19 | alive_r: FileDescriptorLike,
20 | preload: Sequence[str],
21 | main_path: str | None = None,
22 | sys_path: Unused = None,
23 | ) -> None: ...
24 | def read_signed(fd: int) -> Any: ...
25 | def write_signed(fd: int, n: int) -> None: ...
26 |
27 | _forkserver: ForkServer
28 | ensure_running = _forkserver.ensure_running
29 | get_inherited_fds = _forkserver.get_inherited_fds
30 | connect_to_new_process = _forkserver.connect_to_new_process
31 | set_forkserver_preload = _forkserver.set_forkserver_preload
32 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/heap.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import Incomplete
3 | from collections.abc import Callable
4 | from mmap import mmap
5 | from typing import Protocol
6 | from typing_extensions import TypeAlias
7 |
8 | __all__ = ["BufferWrapper"]
9 |
10 | class Arena:
11 | size: int
12 | buffer: mmap
13 | if sys.platform == "win32":
14 | name: str
15 | def __init__(self, size: int) -> None: ...
16 | else:
17 | fd: int
18 | def __init__(self, size: int, fd: int = -1) -> None: ...
19 |
20 | _Block: TypeAlias = tuple[Arena, int, int]
21 |
22 | if sys.platform != "win32":
23 | class _SupportsDetach(Protocol):
24 | def detach(self) -> int: ...
25 |
26 | def reduce_arena(a: Arena) -> tuple[Callable[[int, _SupportsDetach], Arena], tuple[int, Incomplete]]: ...
27 | def rebuild_arena(size: int, dupfd: _SupportsDetach) -> Arena: ...
28 |
29 | class Heap:
30 | def __init__(self, size: int = ...) -> None: ...
31 | def free(self, block: _Block) -> None: ...
32 | def malloc(self, size: int) -> _Block: ...
33 |
34 | class BufferWrapper:
35 | def __init__(self, size: int) -> None: ...
36 | def create_memoryview(self) -> memoryview: ...
37 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/popen_fork.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing import ClassVar
3 |
4 | from .process import BaseProcess
5 | from .util import Finalize
6 |
7 | if sys.platform != "win32":
8 | __all__ = ["Popen"]
9 |
10 | class Popen:
11 | finalizer: Finalize | None
12 | method: ClassVar[str]
13 | pid: int
14 | returncode: int | None
15 | sentinel: int # doesn't exist if os.fork in _launch returns 0
16 |
17 | def __init__(self, process_obj: BaseProcess) -> None: ...
18 | def duplicate_for_child(self, fd: int) -> int: ...
19 | def poll(self, flag: int = 1) -> int | None: ...
20 | def wait(self, timeout: float | None = None) -> int | None: ...
21 | def terminate(self) -> None: ...
22 | def kill(self) -> None: ...
23 | def close(self) -> None: ...
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/popen_forkserver.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing import ClassVar
3 |
4 | from . import popen_fork
5 | from .util import Finalize
6 |
7 | if sys.platform != "win32":
8 | __all__ = ["Popen"]
9 |
10 | class _DupFd:
11 | def __init__(self, ind: int) -> None: ...
12 | def detach(self) -> int: ...
13 |
14 | class Popen(popen_fork.Popen):
15 | DupFd: ClassVar[type[_DupFd]]
16 | finalizer: Finalize
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/popen_spawn_posix.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing import ClassVar
3 |
4 | from . import popen_fork
5 | from .util import Finalize
6 |
7 | if sys.platform != "win32":
8 | __all__ = ["Popen"]
9 |
10 | class _DupFd:
11 | fd: int
12 |
13 | def __init__(self, fd: int) -> None: ...
14 | def detach(self) -> int: ...
15 |
16 | class Popen(popen_fork.Popen):
17 | DupFd: ClassVar[type[_DupFd]]
18 | finalizer: Finalize
19 | pid: int # may not exist if _launch raises in second try / except
20 | sentinel: int # may not exist if _launch raises in second try / except
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/popen_spawn_win32.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from multiprocessing.process import BaseProcess
3 | from typing import ClassVar
4 |
5 | from .util import Finalize
6 |
7 | if sys.platform == "win32":
8 | __all__ = ["Popen"]
9 |
10 | TERMINATE: int
11 | WINEXE: bool
12 | WINSERVICE: bool
13 | WINENV: bool
14 |
15 | class Popen:
16 | finalizer: Finalize
17 | method: ClassVar[str]
18 | pid: int
19 | returncode: int | None
20 | sentinel: int
21 |
22 | def __init__(self, process_obj: BaseProcess) -> None: ...
23 | def duplicate_for_child(self, handle: int) -> int: ...
24 | def wait(self, timeout: float | None = None) -> int | None: ...
25 | def poll(self) -> int | None: ...
26 | def terminate(self) -> None: ...
27 |
28 | kill = terminate
29 |
30 | def close(self) -> None: ...
31 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/process.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Iterable, Mapping
2 | from typing import Any
3 |
4 | __all__ = ["BaseProcess", "current_process", "active_children", "parent_process"]
5 |
6 | class BaseProcess:
7 | name: str
8 | daemon: bool
9 | authkey: bytes
10 | _identity: tuple[int, ...] # undocumented
11 | def __init__(
12 | self,
13 | group: None = None,
14 | target: Callable[..., object] | None = None,
15 | name: str | None = None,
16 | args: Iterable[Any] = (),
17 | kwargs: Mapping[str, Any] = {},
18 | *,
19 | daemon: bool | None = None,
20 | ) -> None: ...
21 | def run(self) -> None: ...
22 | def start(self) -> None: ...
23 | def terminate(self) -> None: ...
24 | def kill(self) -> None: ...
25 | def close(self) -> None: ...
26 | def join(self, timeout: float | None = None) -> None: ...
27 | def is_alive(self) -> bool: ...
28 | @property
29 | def exitcode(self) -> int | None: ...
30 | @property
31 | def ident(self) -> int | None: ...
32 | @property
33 | def pid(self) -> int | None: ...
34 | @property
35 | def sentinel(self) -> int: ...
36 |
37 | def current_process() -> BaseProcess: ...
38 | def active_children() -> list[BaseProcess]: ...
39 | def parent_process() -> BaseProcess | None: ...
40 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/resource_sharer.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from socket import socket
3 |
4 | __all__ = ["stop"]
5 |
6 | if sys.platform == "win32":
7 | __all__ += ["DupSocket"]
8 |
9 | class DupSocket:
10 | def __init__(self, sock: socket) -> None: ...
11 | def detach(self) -> socket: ...
12 |
13 | else:
14 | __all__ += ["DupFd"]
15 |
16 | class DupFd:
17 | def __init__(self, fd: int) -> None: ...
18 | def detach(self) -> int: ...
19 |
20 | def stop(timeout: float | None = None) -> None: ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/resource_tracker.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import FileDescriptorOrPath
2 | from collections.abc import Sized
3 |
4 | __all__ = ["ensure_running", "register", "unregister"]
5 |
6 | class ResourceTracker:
7 | def getfd(self) -> int | None: ...
8 | def ensure_running(self) -> None: ...
9 | def register(self, name: Sized, rtype: str) -> None: ...
10 | def unregister(self, name: Sized, rtype: str) -> None: ...
11 |
12 | _resource_tracker: ResourceTracker
13 | ensure_running = _resource_tracker.ensure_running
14 | register = _resource_tracker.register
15 | unregister = _resource_tracker.unregister
16 | getfd = _resource_tracker.getfd
17 |
18 | def main(fd: FileDescriptorOrPath) -> None: ...
19 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/multiprocessing/spawn.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Mapping, Sequence
2 | from types import ModuleType
3 | from typing import Any
4 |
5 | __all__ = [
6 | "_main",
7 | "freeze_support",
8 | "set_executable",
9 | "get_executable",
10 | "get_preparation_data",
11 | "get_command_line",
12 | "import_main_path",
13 | ]
14 |
15 | WINEXE: bool
16 | WINSERVICE: bool
17 |
18 | def set_executable(exe: str) -> None: ...
19 | def get_executable() -> str: ...
20 | def is_forking(argv: Sequence[str]) -> bool: ...
21 | def freeze_support() -> None: ...
22 | def get_command_line(**kwds: Any) -> list[str]: ...
23 | def spawn_main(pipe_handle: int, parent_pid: int | None = None, tracker_fd: int | None = None) -> None: ...
24 |
25 | # undocumented
26 | def _main(fd: int) -> Any: ...
27 | def get_preparation_data(name: str) -> dict[str, Any]: ...
28 |
29 | old_main_modules: list[ModuleType]
30 |
31 | def prepare(data: Mapping[str, Any]) -> None: ...
32 | def import_main_path(main_path: str) -> None: ...
33 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/netrc.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import StrOrBytesPath
3 | from typing_extensions import TypeAlias
4 |
5 | __all__ = ["netrc", "NetrcParseError"]
6 |
7 | class NetrcParseError(Exception):
8 | filename: str | None
9 | lineno: int | None
10 | msg: str
11 | def __init__(self, msg: str, filename: StrOrBytesPath | None = None, lineno: int | None = None) -> None: ...
12 |
13 | # (login, account, password) tuple
14 | if sys.version_info >= (3, 11):
15 | _NetrcTuple: TypeAlias = tuple[str, str, str]
16 | else:
17 | _NetrcTuple: TypeAlias = tuple[str, str | None, str | None]
18 |
19 | class netrc:
20 | hosts: dict[str, _NetrcTuple]
21 | macros: dict[str, list[str]]
22 | def __init__(self, file: StrOrBytesPath | None = None) -> None: ...
23 | def authenticators(self, host: str) -> _NetrcTuple | None: ...
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/nis.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.platform != "win32":
4 | def cat(map: str, domain: str = ...) -> dict[str, str]: ...
5 | def get_default_domain() -> str: ...
6 | def maps(domain: str = ...) -> list[str]: ...
7 | def match(key: str, map: str, domain: str = ...) -> str: ...
8 |
9 | class error(Exception): ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/nturl2path.pyi:
--------------------------------------------------------------------------------
1 | def url2pathname(url: str) -> str: ...
2 | def pathname2url(p: str) -> str: ...
3 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/os/path.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | if sys.platform == "win32":
4 | from ntpath import *
5 | from ntpath import __all__ as __all__
6 | else:
7 | from posixpath import *
8 | from posixpath import __all__ as __all__
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/parser.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath
2 | from collections.abc import Sequence
3 | from types import CodeType
4 | from typing import Any, final
5 |
6 | def expr(source: str) -> STType: ...
7 | def suite(source: str) -> STType: ...
8 | def sequence2st(sequence: Sequence[Any]) -> STType: ...
9 | def tuple2st(sequence: Sequence[Any]) -> STType: ...
10 | def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> list[Any]: ...
11 | def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> tuple[Any, ...]: ...
12 | def compilest(st: STType, filename: StrOrBytesPath = ...) -> CodeType: ...
13 | def isexpr(st: STType) -> bool: ...
14 | def issuite(st: STType) -> bool: ...
15 |
16 | class ParserError(Exception): ...
17 |
18 | @final
19 | class STType:
20 | def compile(self, filename: StrOrBytesPath = ...) -> CodeType: ...
21 | def isexpr(self) -> bool: ...
22 | def issuite(self) -> bool: ...
23 | def tolist(self, line_info: bool = ..., col_info: bool = ...) -> list[Any]: ...
24 | def totuple(self, line_info: bool = ..., col_info: bool = ...) -> tuple[Any, ...]: ...
25 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/pipes.pyi:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | __all__ = ["Template"]
4 |
5 | class Template:
6 | def reset(self) -> None: ...
7 | def clone(self) -> Template: ...
8 | def debug(self, flag: bool) -> None: ...
9 | def append(self, cmd: str, kind: str) -> None: ...
10 | def prepend(self, cmd: str, kind: str) -> None: ...
11 | def open(self, file: str, rw: str) -> os._wrap_close: ...
12 | def copy(self, infile: str, outfile: str) -> int: ...
13 |
14 | # Not documented, but widely used.
15 | # Documented as shlex.quote since 3.3.
16 | def quote(s: str) -> str: ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/pty.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from collections.abc import Callable, Iterable
3 | from typing import Final
4 | from typing_extensions import TypeAlias
5 |
6 | if sys.platform != "win32":
7 | __all__ = ["openpty", "fork", "spawn"]
8 | _Reader: TypeAlias = Callable[[int], bytes]
9 |
10 | STDIN_FILENO: Final = 0
11 | STDOUT_FILENO: Final = 1
12 | STDERR_FILENO: Final = 2
13 |
14 | CHILD: Final = 0
15 | def openpty() -> tuple[int, int]: ...
16 | def master_open() -> tuple[int, str]: ... # deprecated, use openpty()
17 | def slave_open(tty_name: str) -> int: ... # deprecated, use openpty()
18 | def fork() -> tuple[int, int]: ...
19 | def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/pwd.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import structseq
3 | from typing import Any, Final, final
4 |
5 | if sys.platform != "win32":
6 | @final
7 | class struct_passwd(structseq[Any], tuple[str, str, int, int, str, str, str]):
8 | if sys.version_info >= (3, 10):
9 | __match_args__: Final = ("pw_name", "pw_passwd", "pw_uid", "pw_gid", "pw_gecos", "pw_dir", "pw_shell")
10 |
11 | @property
12 | def pw_name(self) -> str: ...
13 | @property
14 | def pw_passwd(self) -> str: ...
15 | @property
16 | def pw_uid(self) -> int: ...
17 | @property
18 | def pw_gid(self) -> int: ...
19 | @property
20 | def pw_gecos(self) -> str: ...
21 | @property
22 | def pw_dir(self) -> str: ...
23 | @property
24 | def pw_shell(self) -> str: ...
25 |
26 | def getpwall() -> list[struct_passwd]: ...
27 | def getpwuid(uid: int, /) -> struct_passwd: ...
28 | def getpwnam(name: str, /) -> struct_passwd: ...
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/py_compile.pyi:
--------------------------------------------------------------------------------
1 | import enum
2 | import sys
3 | from typing import AnyStr
4 |
5 | __all__ = ["compile", "main", "PyCompileError", "PycInvalidationMode"]
6 |
7 | class PyCompileError(Exception):
8 | exc_type_name: str
9 | exc_value: BaseException
10 | file: str
11 | msg: str
12 | def __init__(self, exc_type: type[BaseException], exc_value: BaseException, file: str, msg: str = "") -> None: ...
13 |
14 | class PycInvalidationMode(enum.Enum):
15 | TIMESTAMP = 1
16 | CHECKED_HASH = 2
17 | UNCHECKED_HASH = 3
18 |
19 | def _get_default_invalidation_mode() -> PycInvalidationMode: ...
20 | def compile(
21 | file: AnyStr,
22 | cfile: AnyStr | None = None,
23 | dfile: AnyStr | None = None,
24 | doraise: bool = False,
25 | optimize: int = -1,
26 | invalidation_mode: PycInvalidationMode | None = None,
27 | quiet: int = 0,
28 | ) -> AnyStr | None: ...
29 |
30 | if sys.version_info >= (3, 10):
31 | def main() -> None: ...
32 |
33 | else:
34 | def main(args: list[str] | None = None) -> int: ...
35 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/pydoc_data/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/pydoc_data/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/pydoc_data/topics.pyi:
--------------------------------------------------------------------------------
1 | topics: dict[str, str]
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/pyexpat/model.pyi:
--------------------------------------------------------------------------------
1 | XML_CTYPE_ANY: int
2 | XML_CTYPE_CHOICE: int
3 | XML_CTYPE_EMPTY: int
4 | XML_CTYPE_MIXED: int
5 | XML_CTYPE_NAME: int
6 | XML_CTYPE_SEQ: int
7 |
8 | XML_CQUANT_NONE: int
9 | XML_CQUANT_OPT: int
10 | XML_CQUANT_PLUS: int
11 | XML_CQUANT_REP: int
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/quopri.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import ReadableBuffer, SupportsNoArgReadline, SupportsRead, SupportsWrite
2 | from typing import Protocol
3 |
4 | __all__ = ["encode", "decode", "encodestring", "decodestring"]
5 |
6 | class _Input(SupportsRead[bytes], SupportsNoArgReadline[bytes], Protocol): ...
7 |
8 | def encode(input: _Input, output: SupportsWrite[bytes], quotetabs: int, header: bool = False) -> None: ...
9 | def encodestring(s: ReadableBuffer, quotetabs: bool = False, header: bool = False) -> bytes: ...
10 | def decode(input: _Input, output: SupportsWrite[bytes], header: bool = False) -> None: ...
11 | def decodestring(s: str | ReadableBuffer, header: bool = False) -> bytes: ...
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/rlcompleter.pyi:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | __all__ = ["Completer"]
4 |
5 | class Completer:
6 | def __init__(self, namespace: dict[str, Any] | None = None) -> None: ...
7 | def complete(self, text: str, state: int) -> str | None: ...
8 | def attr_matches(self, text: str) -> list[str]: ...
9 | def global_matches(self, text: str) -> list[str]: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/runpy.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import Unused
2 | from types import ModuleType
3 | from typing import Any
4 | from typing_extensions import Self
5 |
6 | __all__ = ["run_module", "run_path"]
7 |
8 | class _TempModule:
9 | mod_name: str
10 | module: ModuleType
11 | def __init__(self, mod_name: str) -> None: ...
12 | def __enter__(self) -> Self: ...
13 | def __exit__(self, *args: Unused) -> None: ...
14 |
15 | class _ModifiedArgv0:
16 | value: Any
17 | def __init__(self, value: Any) -> None: ...
18 | def __enter__(self) -> None: ...
19 | def __exit__(self, *args: Unused) -> None: ...
20 |
21 | def run_module(
22 | mod_name: str, init_globals: dict[str, Any] | None = None, run_name: str | None = None, alter_sys: bool = False
23 | ) -> dict[str, Any]: ...
24 | def run_path(path_name: str, init_globals: dict[str, Any] | None = None, run_name: str | None = None) -> dict[str, Any]: ...
25 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/secrets.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import SupportsLenAndGetItem
2 | from hmac import compare_digest as compare_digest
3 | from random import SystemRandom as SystemRandom
4 | from typing import TypeVar
5 |
6 | __all__ = ["choice", "randbelow", "randbits", "SystemRandom", "token_bytes", "token_hex", "token_urlsafe", "compare_digest"]
7 |
8 | _T = TypeVar("_T")
9 |
10 | def randbelow(exclusive_upper_bound: int) -> int: ...
11 | def randbits(k: int) -> int: ...
12 | def choice(seq: SupportsLenAndGetItem[_T]) -> _T: ...
13 | def token_bytes(nbytes: int | None = None) -> bytes: ...
14 | def token_hex(nbytes: int | None = None) -> str: ...
15 | def token_urlsafe(nbytes: int | None = None) -> str: ...
16 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/sndhdr.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath
2 | from typing import NamedTuple
3 |
4 | __all__ = ["what", "whathdr"]
5 |
6 | class SndHeaders(NamedTuple):
7 | filetype: str
8 | framerate: int
9 | nchannels: int
10 | nframes: int
11 | sampwidth: int | str
12 |
13 | def what(filename: StrOrBytesPath) -> SndHeaders | None: ...
14 | def whathdr(filename: StrOrBytesPath) -> SndHeaders | None: ...
15 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/sqlite3/__init__.pyi:
--------------------------------------------------------------------------------
1 | from sqlite3.dbapi2 import *
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/sre_compile.pyi:
--------------------------------------------------------------------------------
1 | from re import Pattern
2 | from sre_constants import *
3 | from sre_constants import _NamedIntConstant
4 | from sre_parse import SubPattern
5 | from typing import Any
6 |
7 | MAXCODE: int
8 |
9 | def dis(code: list[_NamedIntConstant]) -> None: ...
10 | def isstring(obj: Any) -> bool: ...
11 | def compile(p: str | bytes | SubPattern, flags: int = 0) -> Pattern[Any]: ...
12 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/stat.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _stat import *
3 | from typing import Final
4 |
5 | if sys.version_info >= (3, 13):
6 | # https://github.com/python/cpython/issues/114081#issuecomment-2119017790
7 | SF_RESTRICTED: Final = 0x00080000
8 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/stringprep.pyi:
--------------------------------------------------------------------------------
1 | b1_set: set[int]
2 | b3_exceptions: dict[int, str]
3 | c22_specials: set[int]
4 | c6_set: set[int]
5 | c7_set: set[int]
6 | c8_set: set[int]
7 | c9_set: set[int]
8 |
9 | def in_table_a1(code: str) -> bool: ...
10 | def in_table_b1(code: str) -> bool: ...
11 | def map_table_b3(code: str) -> str: ...
12 | def map_table_b2(a: str) -> str: ...
13 | def in_table_c11(code: str) -> bool: ...
14 | def in_table_c12(code: str) -> bool: ...
15 | def in_table_c11_c12(code: str) -> bool: ...
16 | def in_table_c21(code: str) -> bool: ...
17 | def in_table_c22(code: str) -> bool: ...
18 | def in_table_c21_c22(code: str) -> bool: ...
19 | def in_table_c3(code: str) -> bool: ...
20 | def in_table_c4(code: str) -> bool: ...
21 | def in_table_c5(code: str) -> bool: ...
22 | def in_table_c6(code: str) -> bool: ...
23 | def in_table_c7(code: str) -> bool: ...
24 | def in_table_c8(code: str) -> bool: ...
25 | def in_table_c9(code: str) -> bool: ...
26 | def in_table_d1(code: str) -> bool: ...
27 | def in_table_d2(code: str) -> bool: ...
28 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/struct.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import ReadableBuffer, WriteableBuffer
2 | from collections.abc import Iterator
3 | from typing import Any
4 |
5 | __all__ = ["calcsize", "pack", "pack_into", "unpack", "unpack_from", "iter_unpack", "Struct", "error"]
6 |
7 | class error(Exception): ...
8 |
9 | def pack(fmt: str | bytes, /, *v: Any) -> bytes: ...
10 | def pack_into(fmt: str | bytes, buffer: WriteableBuffer, offset: int, /, *v: Any) -> None: ...
11 | def unpack(format: str | bytes, buffer: ReadableBuffer, /) -> tuple[Any, ...]: ...
12 | def unpack_from(format: str | bytes, /, buffer: ReadableBuffer, offset: int = 0) -> tuple[Any, ...]: ...
13 | def iter_unpack(format: str | bytes, buffer: ReadableBuffer, /) -> Iterator[tuple[Any, ...]]: ...
14 | def calcsize(format: str | bytes, /) -> int: ...
15 |
16 | class Struct:
17 | @property
18 | def format(self) -> str: ...
19 | @property
20 | def size(self) -> int: ...
21 | def __init__(self, format: str | bytes) -> None: ...
22 | def pack(self, *v: Any) -> bytes: ...
23 | def pack_into(self, buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
24 | def unpack(self, buffer: ReadableBuffer, /) -> tuple[Any, ...]: ...
25 | def unpack_from(self, buffer: ReadableBuffer, offset: int = 0) -> tuple[Any, ...]: ...
26 | def iter_unpack(self, buffer: ReadableBuffer, /) -> Iterator[tuple[Any, ...]]: ...
27 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tabnanny.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import StrOrBytesPath
2 | from collections.abc import Iterable
3 |
4 | __all__ = ["check", "NannyNag", "process_tokens"]
5 |
6 | verbose: int
7 | filename_only: int
8 |
9 | class NannyNag(Exception):
10 | def __init__(self, lineno: int, msg: str, line: str) -> None: ...
11 | def get_lineno(self) -> int: ...
12 | def get_msg(self) -> str: ...
13 | def get_line(self) -> str: ...
14 |
15 | def check(file: StrOrBytesPath) -> None: ...
16 | def process_tokens(tokens: Iterable[tuple[int, str, tuple[int, int], tuple[int, int], str]]) -> None: ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/this.pyi:
--------------------------------------------------------------------------------
1 | s: str
2 | d: dict[str, str]
3 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/timeit.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Sequence
2 | from typing import IO, Any
3 | from typing_extensions import TypeAlias
4 |
5 | __all__ = ["Timer", "timeit", "repeat", "default_timer"]
6 |
7 | _Timer: TypeAlias = Callable[[], float]
8 | _Stmt: TypeAlias = str | Callable[[], object]
9 |
10 | default_timer: _Timer
11 |
12 | class Timer:
13 | def __init__(
14 | self, stmt: _Stmt = "pass", setup: _Stmt = "pass", timer: _Timer = ..., globals: dict[str, Any] | None = None
15 | ) -> None: ...
16 | def print_exc(self, file: IO[str] | None = None) -> None: ...
17 | def timeit(self, number: int = 1000000) -> float: ...
18 | def repeat(self, repeat: int = 5, number: int = 1000000) -> list[float]: ...
19 | def autorange(self, callback: Callable[[int, float], object] | None = None) -> tuple[int, float]: ...
20 |
21 | def timeit(
22 | stmt: _Stmt = "pass", setup: _Stmt = "pass", timer: _Timer = ..., number: int = 1000000, globals: dict[str, Any] | None = None
23 | ) -> float: ...
24 | def repeat(
25 | stmt: _Stmt = "pass",
26 | setup: _Stmt = "pass",
27 | timer: _Timer = ...,
28 | repeat: int = 5,
29 | number: int = 1000000,
30 | globals: dict[str, Any] | None = None,
31 | ) -> list[float]: ...
32 | def main(args: Sequence[str] | None = None, *, _wrap_timer: Callable[[_Timer], _Timer] | None = None) -> None: ...
33 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tkinter/colorchooser.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from tkinter import Misc
3 | from tkinter.commondialog import Dialog
4 | from typing import ClassVar
5 |
6 | if sys.version_info >= (3, 9):
7 | __all__ = ["Chooser", "askcolor"]
8 |
9 | class Chooser(Dialog):
10 | command: ClassVar[str]
11 |
12 | if sys.version_info >= (3, 9):
13 | def askcolor(
14 | color: str | bytes | None = None, *, initialcolor: str = ..., parent: Misc = ..., title: str = ...
15 | ) -> tuple[None, None] | tuple[tuple[int, int, int], str]: ...
16 |
17 | else:
18 | def askcolor(
19 | color: str | bytes | None = None, *, initialcolor: str = ..., parent: Misc = ..., title: str = ...
20 | ) -> tuple[None, None] | tuple[tuple[float, float, float], str]: ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tkinter/commondialog.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import Incomplete
3 | from collections.abc import Mapping
4 | from typing import ClassVar
5 |
6 | if sys.version_info >= (3, 9):
7 | __all__ = ["Dialog"]
8 |
9 | class Dialog:
10 | command: ClassVar[str | None]
11 | master: Incomplete | None
12 | options: Mapping[str, Incomplete]
13 | def __init__(self, master: Incomplete | None = None, **options) -> None: ...
14 | def show(self, **options): ...
15 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tkinter/dialog.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import Incomplete
3 | from collections.abc import Mapping
4 | from tkinter import Widget
5 | from typing import Any
6 |
7 | if sys.version_info >= (3, 9):
8 | __all__ = ["Dialog"]
9 |
10 | DIALOG_ICON: str
11 |
12 | class Dialog(Widget):
13 | widgetName: str
14 | num: int
15 | def __init__(self, master: Incomplete | None = None, cnf: Mapping[str, Any] = {}, **kw) -> None: ...
16 | def destroy(self) -> None: ...
17 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tkinter/dnd.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from tkinter import Event, Misc, Tk, Widget
3 | from typing import ClassVar, Protocol
4 |
5 | if sys.version_info >= (3, 9):
6 | __all__ = ["dnd_start", "DndHandler"]
7 |
8 | class _DndSource(Protocol):
9 | def dnd_end(self, target: Widget | None, event: Event[Misc] | None, /) -> None: ...
10 |
11 | class DndHandler:
12 | root: ClassVar[Tk | None]
13 | def __init__(self, source: _DndSource, event: Event[Misc]) -> None: ...
14 | def cancel(self, event: Event[Misc] | None = None) -> None: ...
15 | def finish(self, event: Event[Misc] | None, commit: int = 0) -> None: ...
16 | def on_motion(self, event: Event[Misc]) -> None: ...
17 | def on_release(self, event: Event[Misc]) -> None: ...
18 | def __del__(self) -> None: ...
19 |
20 | def dnd_start(source: _DndSource, event: Event[Misc]) -> DndHandler | None: ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tkinter/scrolledtext.pyi:
--------------------------------------------------------------------------------
1 | from tkinter import Frame, Misc, Scrollbar, Text
2 |
3 | __all__ = ["ScrolledText"]
4 |
5 | # The methods from Pack, Place, and Grid are dynamically added over the parent's impls
6 | class ScrolledText(Text):
7 | frame: Frame
8 | vbar: Scrollbar
9 | def __init__(self, master: Misc | None = None, **kwargs) -> None: ...
10 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tomllib.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import SupportsRead
2 | from collections.abc import Callable
3 | from typing import Any
4 |
5 | __all__ = ("loads", "load", "TOMLDecodeError")
6 |
7 | class TOMLDecodeError(ValueError): ...
8 |
9 | def load(fp: SupportsRead[bytes], /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...
10 | def loads(s: str, /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...
11 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/tty.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | import termios
3 | from typing import IO
4 | from typing_extensions import TypeAlias
5 |
6 | if sys.platform != "win32":
7 | __all__ = ["setraw", "setcbreak"]
8 | if sys.version_info >= (3, 12):
9 | __all__ += ["cfmakeraw", "cfmakecbreak"]
10 |
11 | _ModeSetterReturn: TypeAlias = termios._AttrReturn
12 | else:
13 | _ModeSetterReturn: TypeAlias = None
14 |
15 | _FD: TypeAlias = int | IO[str]
16 |
17 | # XXX: Undocumented integer constants
18 | IFLAG: int
19 | OFLAG: int
20 | CFLAG: int
21 | LFLAG: int
22 | ISPEED: int
23 | OSPEED: int
24 | CC: int
25 | def setraw(fd: _FD, when: int = 2) -> _ModeSetterReturn: ...
26 | def setcbreak(fd: _FD, when: int = 2) -> _ModeSetterReturn: ...
27 |
28 | if sys.version_info >= (3, 12):
29 | def cfmakeraw(mode: termios._Attr) -> None: ...
30 | def cfmakecbreak(mode: termios._Attr) -> None: ...
31 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/unittest/_log.pyi:
--------------------------------------------------------------------------------
1 | import logging
2 | import sys
3 | from types import TracebackType
4 | from typing import ClassVar, Generic, NamedTuple, TypeVar
5 | from unittest.case import TestCase, _BaseTestCaseContext
6 |
7 | _L = TypeVar("_L", None, _LoggingWatcher)
8 |
9 | class _LoggingWatcher(NamedTuple):
10 | records: list[logging.LogRecord]
11 | output: list[str]
12 |
13 | class _AssertLogsContext(_BaseTestCaseContext, Generic[_L]):
14 | LOGGING_FORMAT: ClassVar[str]
15 | logger_name: str
16 | level: int
17 | msg: None
18 | if sys.version_info >= (3, 10):
19 | def __init__(self, test_case: TestCase, logger_name: str, level: int, no_logs: bool) -> None: ...
20 | no_logs: bool
21 | else:
22 | def __init__(self, test_case: TestCase, logger_name: str, level: int) -> None: ...
23 |
24 | def __enter__(self) -> _L: ...
25 | def __exit__(
26 | self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None
27 | ) -> bool | None: ...
28 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/unittest/async_case.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from asyncio.events import AbstractEventLoop
3 | from collections.abc import Awaitable, Callable
4 | from typing import TypeVar
5 | from typing_extensions import ParamSpec
6 |
7 | from .case import TestCase
8 |
9 | if sys.version_info >= (3, 11):
10 | from contextlib import AbstractAsyncContextManager
11 |
12 | _T = TypeVar("_T")
13 | _P = ParamSpec("_P")
14 |
15 | class IsolatedAsyncioTestCase(TestCase):
16 | if sys.version_info >= (3, 13):
17 | loop_factory: Callable[[], AbstractEventLoop] | None = None
18 |
19 | async def asyncSetUp(self) -> None: ...
20 | async def asyncTearDown(self) -> None: ...
21 | def addAsyncCleanup(self, func: Callable[_P, Awaitable[object]], /, *args: _P.args, **kwargs: _P.kwargs) -> None: ...
22 | if sys.version_info >= (3, 11):
23 | async def enterAsyncContext(self, cm: AbstractAsyncContextManager[_T]) -> _T: ...
24 | if sys.version_info >= (3, 9):
25 | def __del__(self) -> None: ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/unittest/signals.pyi:
--------------------------------------------------------------------------------
1 | import unittest.result
2 | from collections.abc import Callable
3 | from typing import TypeVar, overload
4 | from typing_extensions import ParamSpec
5 |
6 | _P = ParamSpec("_P")
7 | _T = TypeVar("_T")
8 |
9 | def installHandler() -> None: ...
10 | def registerResult(result: unittest.result.TestResult) -> None: ...
11 | def removeResult(result: unittest.result.TestResult) -> bool: ...
12 | @overload
13 | def removeHandler(method: None = None) -> None: ...
14 | @overload
15 | def removeHandler(method: Callable[_P, _T]) -> Callable[_P, _T]: ...
16 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/unittest/suite.pyi:
--------------------------------------------------------------------------------
1 | import unittest.case
2 | import unittest.result
3 | from collections.abc import Iterable, Iterator
4 | from typing_extensions import TypeAlias
5 |
6 | _TestType: TypeAlias = unittest.case.TestCase | TestSuite
7 |
8 | class BaseTestSuite(Iterable[_TestType]):
9 | _tests: list[unittest.case.TestCase]
10 | _removed_tests: int
11 | def __init__(self, tests: Iterable[_TestType] = ()) -> None: ...
12 | def __call__(self, result: unittest.result.TestResult) -> unittest.result.TestResult: ...
13 | def addTest(self, test: _TestType) -> None: ...
14 | def addTests(self, tests: Iterable[_TestType]) -> None: ...
15 | def run(self, result: unittest.result.TestResult) -> unittest.result.TestResult: ...
16 | def debug(self) -> None: ...
17 | def countTestCases(self) -> int: ...
18 | def __iter__(self) -> Iterator[_TestType]: ...
19 | def __eq__(self, other: object) -> bool: ...
20 |
21 | class TestSuite(BaseTestSuite):
22 | def run(self, result: unittest.result.TestResult, debug: bool = False) -> unittest.result.TestResult: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/unittest/util.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import MutableSequence, Sequence
2 | from typing import Any, TypeVar
3 | from typing_extensions import TypeAlias
4 |
5 | _T = TypeVar("_T")
6 | _Mismatch: TypeAlias = tuple[_T, _T, int]
7 |
8 | _MAX_LENGTH: int
9 | _PLACEHOLDER_LEN: int
10 | _MIN_BEGIN_LEN: int
11 | _MIN_END_LEN: int
12 | _MIN_COMMON_LEN: int
13 | _MIN_DIFF_LEN: int
14 |
15 | def _shorten(s: str, prefixlen: int, suffixlen: int) -> str: ...
16 | def _common_shorten_repr(*args: str) -> tuple[str, ...]: ...
17 | def safe_repr(obj: object, short: bool = False) -> str: ...
18 | def strclass(cls: type) -> str: ...
19 | def sorted_list_difference(expected: Sequence[_T], actual: Sequence[_T]) -> tuple[list[_T], list[_T]]: ...
20 | def unorderable_list_difference(expected: MutableSequence[_T], actual: MutableSequence[_T]) -> tuple[list[_T], list[_T]]: ...
21 | def three_way_cmp(x: Any, y: Any) -> int: ...
22 | def _count_diff_all_purpose(actual: Sequence[_T], expected: Sequence[_T]) -> list[_Mismatch[_T]]: ...
23 | def _count_diff_hashable(actual: Sequence[_T], expected: Sequence[_T]) -> list[_Mismatch[_T]]: ...
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/urllib/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/urllib/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/urllib/error.pyi:
--------------------------------------------------------------------------------
1 | from email.message import Message
2 | from typing import IO
3 | from urllib.response import addinfourl
4 |
5 | __all__ = ["URLError", "HTTPError", "ContentTooShortError"]
6 |
7 | class URLError(OSError):
8 | reason: str | BaseException
9 | def __init__(self, reason: str | BaseException, filename: str | None = None) -> None: ...
10 |
11 | class HTTPError(URLError, addinfourl):
12 | @property
13 | def headers(self) -> Message: ...
14 | @headers.setter
15 | def headers(self, headers: Message) -> None: ...
16 | @property
17 | def reason(self) -> str: ... # type: ignore[override]
18 | code: int
19 | def __init__(self, url: str, code: int, msg: str, hdrs: Message, fp: IO[bytes] | None) -> None: ...
20 |
21 | class ContentTooShortError(URLError):
22 | content: tuple[str, Message]
23 | def __init__(self, message: str, content: tuple[str, Message]) -> None: ...
24 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/urllib/robotparser.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable
2 | from typing import NamedTuple
3 |
4 | __all__ = ["RobotFileParser"]
5 |
6 | class RequestRate(NamedTuple):
7 | requests: int
8 | seconds: int
9 |
10 | class RobotFileParser:
11 | def __init__(self, url: str = "") -> None: ...
12 | def set_url(self, url: str) -> None: ...
13 | def read(self) -> None: ...
14 | def parse(self, lines: Iterable[str]) -> None: ...
15 | def can_fetch(self, useragent: str, url: str) -> bool: ...
16 | def mtime(self) -> int: ...
17 | def modified(self) -> None: ...
18 | def crawl_delay(self, useragent: str) -> str | None: ...
19 | def request_rate(self, useragent: str) -> RequestRate | None: ...
20 | def site_maps(self) -> list[str] | None: ...
21 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/uu.pyi:
--------------------------------------------------------------------------------
1 | from typing import BinaryIO
2 | from typing_extensions import TypeAlias
3 |
4 | __all__ = ["Error", "encode", "decode"]
5 |
6 | _File: TypeAlias = str | BinaryIO
7 |
8 | class Error(Exception): ...
9 |
10 | def encode(
11 | in_file: _File, out_file: _File, name: str | None = None, mode: int | None = None, *, backtick: bool = False
12 | ) -> None: ...
13 | def decode(in_file: _File, out_file: _File | None = None, mode: int | None = None, quiet: bool = False) -> None: ...
14 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/winsound.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import ReadableBuffer
3 | from typing import Final, Literal, overload
4 |
5 | if sys.platform == "win32":
6 | SND_APPLICATION: Final = 128
7 | SND_FILENAME: Final = 131072
8 | SND_ALIAS: Final = 65536
9 | SND_LOOP: Final = 8
10 | SND_MEMORY: Final = 4
11 | SND_PURGE: Final = 64
12 | SND_ASYNC: Final = 1
13 | SND_NODEFAULT: Final = 2
14 | SND_NOSTOP: Final = 16
15 | SND_NOWAIT: Final = 8192
16 |
17 | MB_ICONASTERISK: Final = 64
18 | MB_ICONEXCLAMATION: Final = 48
19 | MB_ICONHAND: Final = 16
20 | MB_ICONQUESTION: Final = 32
21 | MB_OK: Final = 0
22 | def Beep(frequency: int, duration: int) -> None: ...
23 | # Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible
24 | @overload
25 | def PlaySound(sound: ReadableBuffer | None, flags: Literal[4]) -> None: ...
26 | @overload
27 | def PlaySound(sound: str | ReadableBuffer | None, flags: int) -> None: ...
28 | def MessageBeep(type: int = 0) -> None: ...
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/wsgiref/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/wsgiref/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/wsgiref/headers.pyi:
--------------------------------------------------------------------------------
1 | from re import Pattern
2 | from typing import overload
3 | from typing_extensions import TypeAlias
4 |
5 | _HeaderList: TypeAlias = list[tuple[str, str]]
6 |
7 | tspecials: Pattern[str] # undocumented
8 |
9 | class Headers:
10 | def __init__(self, headers: _HeaderList | None = None) -> None: ...
11 | def __len__(self) -> int: ...
12 | def __setitem__(self, name: str, val: str) -> None: ...
13 | def __delitem__(self, name: str) -> None: ...
14 | def __getitem__(self, name: str) -> str | None: ...
15 | def __contains__(self, name: str) -> bool: ...
16 | def get_all(self, name: str) -> list[str]: ...
17 | @overload
18 | def get(self, name: str, default: str) -> str: ...
19 | @overload
20 | def get(self, name: str, default: str | None = None) -> str | None: ...
21 | def keys(self) -> list[str]: ...
22 | def values(self) -> list[str]: ...
23 | def items(self) -> _HeaderList: ...
24 | def __bytes__(self) -> bytes: ...
25 | def setdefault(self, name: str, value: str) -> str: ...
26 | def add_header(self, _name: str, _value: str | None, **_params: str | None) -> None: ...
27 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/wsgiref/types.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable, Iterable, Iterator
2 | from sys import _OptExcInfo
3 | from typing import Any, Protocol
4 | from typing_extensions import TypeAlias
5 |
6 | __all__ = ["StartResponse", "WSGIEnvironment", "WSGIApplication", "InputStream", "ErrorStream", "FileWrapper"]
7 |
8 | class StartResponse(Protocol):
9 | def __call__(
10 | self, status: str, headers: list[tuple[str, str]], exc_info: _OptExcInfo | None = ..., /
11 | ) -> Callable[[bytes], object]: ...
12 |
13 | WSGIEnvironment: TypeAlias = dict[str, Any]
14 | WSGIApplication: TypeAlias = Callable[[WSGIEnvironment, StartResponse], Iterable[bytes]]
15 |
16 | class InputStream(Protocol):
17 | def read(self, size: int = ..., /) -> bytes: ...
18 | def readline(self, size: int = ..., /) -> bytes: ...
19 | def readlines(self, hint: int = ..., /) -> list[bytes]: ...
20 | def __iter__(self) -> Iterator[bytes]: ...
21 |
22 | class ErrorStream(Protocol):
23 | def flush(self) -> object: ...
24 | def write(self, s: str, /) -> object: ...
25 | def writelines(self, seq: list[str], /) -> object: ...
26 |
27 | class _Readable(Protocol):
28 | def read(self, size: int = ..., /) -> bytes: ...
29 | # Optional: def close(self) -> object: ...
30 |
31 | class FileWrapper(Protocol):
32 | def __call__(self, file: _Readable, block_size: int = ..., /) -> Iterable[bytes]: ...
33 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/wsgiref/util.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed.wsgi import WSGIEnvironment
3 | from collections.abc import Callable
4 | from typing import IO, Any
5 |
6 | __all__ = ["FileWrapper", "guess_scheme", "application_uri", "request_uri", "shift_path_info", "setup_testing_defaults"]
7 | if sys.version_info >= (3, 13):
8 | __all__ += ["is_hop_by_hop"]
9 |
10 | class FileWrapper:
11 | filelike: IO[bytes]
12 | blksize: int
13 | close: Callable[[], None] # only exists if filelike.close exists
14 | def __init__(self, filelike: IO[bytes], blksize: int = 8192) -> None: ...
15 | if sys.version_info < (3, 11):
16 | def __getitem__(self, key: Any) -> bytes: ...
17 |
18 | def __iter__(self) -> FileWrapper: ...
19 | def __next__(self) -> bytes: ...
20 |
21 | def guess_scheme(environ: WSGIEnvironment) -> str: ...
22 | def application_uri(environ: WSGIEnvironment) -> str: ...
23 | def request_uri(environ: WSGIEnvironment, include_query: bool = True) -> str: ...
24 | def shift_path_info(environ: WSGIEnvironment) -> str | None: ...
25 | def setup_testing_defaults(environ: WSGIEnvironment) -> None: ...
26 | def is_hop_by_hop(header_name: str) -> bool: ...
27 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/__init__.pyi:
--------------------------------------------------------------------------------
1 | from xml import parsers as parsers
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/dom/NodeFilter.pyi:
--------------------------------------------------------------------------------
1 | class NodeFilter:
2 | FILTER_ACCEPT: int
3 | FILTER_REJECT: int
4 | FILTER_SKIP: int
5 |
6 | SHOW_ALL: int
7 | SHOW_ELEMENT: int
8 | SHOW_ATTRIBUTE: int
9 | SHOW_TEXT: int
10 | SHOW_CDATA_SECTION: int
11 | SHOW_ENTITY_REFERENCE: int
12 | SHOW_ENTITY: int
13 | SHOW_PROCESSING_INSTRUCTION: int
14 | SHOW_COMMENT: int
15 | SHOW_DOCUMENT: int
16 | SHOW_DOCUMENT_TYPE: int
17 | SHOW_DOCUMENT_FRAGMENT: int
18 | SHOW_NOTATION: int
19 | def acceptNode(self, node) -> int: ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/dom/domreg.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed.xml import DOMImplementation
2 | from collections.abc import Callable, Iterable
3 |
4 | well_known_implementations: dict[str, str]
5 | registered: dict[str, Callable[[], DOMImplementation]]
6 |
7 | def registerDOMImplementation(name: str, factory: Callable[[], DOMImplementation]) -> None: ...
8 | def getDOMImplementation(name: str | None = None, features: str | Iterable[tuple[str, str | None]] = ()) -> DOMImplementation: ...
9 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/dom/minicompat.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Iterable
2 | from typing import Any, Literal, TypeVar
3 |
4 | __all__ = ["NodeList", "EmptyNodeList", "StringTypes", "defproperty"]
5 |
6 | _T = TypeVar("_T")
7 |
8 | StringTypes: tuple[type[str]]
9 |
10 | class NodeList(list[_T]):
11 | @property
12 | def length(self) -> int: ...
13 | def item(self, index: int) -> _T | None: ...
14 |
15 | class EmptyNodeList(tuple[()]):
16 | @property
17 | def length(self) -> Literal[0]: ...
18 | def item(self, index: int) -> None: ...
19 | def __add__(self, other: Iterable[_T]) -> NodeList[_T]: ... # type: ignore[override]
20 | def __radd__(self, other: Iterable[_T]) -> NodeList[_T]: ...
21 |
22 | def defproperty(klass: type[Any], name: str, doc: str) -> None: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/etree/ElementInclude.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from _typeshed import FileDescriptorOrPath
3 | from collections.abc import Callable
4 | from xml.etree.ElementTree import Element
5 |
6 | XINCLUDE: str
7 | XINCLUDE_INCLUDE: str
8 | XINCLUDE_FALLBACK: str
9 |
10 | if sys.version_info >= (3, 9):
11 | DEFAULT_MAX_INCLUSION_DEPTH: int
12 |
13 | class FatalIncludeError(SyntaxError): ...
14 |
15 | def default_loader(href: FileDescriptorOrPath, parse: str, encoding: str | None = None) -> str | Element: ...
16 |
17 | # TODO: loader is of type default_loader ie it takes a callable that has the
18 | # same signature as default_loader. But default_loader has a keyword argument
19 | # Which can't be represented using Callable...
20 | if sys.version_info >= (3, 9):
21 | def include(
22 | elem: Element, loader: Callable[..., str | Element] | None = None, base_url: str | None = None, max_depth: int | None = 6
23 | ) -> None: ...
24 |
25 | class LimitedRecursiveIncludeError(FatalIncludeError): ...
26 |
27 | else:
28 | def include(elem: Element, loader: Callable[..., str | Element] | None = None) -> None: ...
29 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/etree/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/xml/etree/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/etree/cElementTree.pyi:
--------------------------------------------------------------------------------
1 | from xml.etree.ElementTree import *
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/parsers/__init__.pyi:
--------------------------------------------------------------------------------
1 | from xml.parsers import expat as expat
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/parsers/expat/__init__.pyi:
--------------------------------------------------------------------------------
1 | from pyexpat import *
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/parsers/expat/errors.pyi:
--------------------------------------------------------------------------------
1 | from pyexpat.errors import *
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/parsers/expat/model.pyi:
--------------------------------------------------------------------------------
1 | from pyexpat.model import *
2 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/sax/__init__.pyi:
--------------------------------------------------------------------------------
1 | from _typeshed import ReadableBuffer, StrPath, SupportsRead, _T_co
2 | from collections.abc import Iterable
3 | from typing import Protocol
4 | from typing_extensions import TypeAlias
5 | from xml.sax._exceptions import (
6 | SAXException as SAXException,
7 | SAXNotRecognizedException as SAXNotRecognizedException,
8 | SAXNotSupportedException as SAXNotSupportedException,
9 | SAXParseException as SAXParseException,
10 | SAXReaderNotAvailable as SAXReaderNotAvailable,
11 | )
12 | from xml.sax.handler import ContentHandler as ContentHandler, ErrorHandler as ErrorHandler
13 | from xml.sax.xmlreader import XMLReader
14 |
15 | class _SupportsReadClose(SupportsRead[_T_co], Protocol[_T_co]):
16 | def close(self) -> None: ...
17 |
18 | _Source: TypeAlias = StrPath | _SupportsReadClose[bytes] | _SupportsReadClose[str]
19 |
20 | default_parser_list: list[str]
21 |
22 | def make_parser(parser_list: Iterable[str] = ()) -> XMLReader: ...
23 | def parse(source: _Source, handler: ContentHandler, errorHandler: ErrorHandler = ...) -> None: ...
24 | def parseString(string: ReadableBuffer | str, handler: ContentHandler, errorHandler: ErrorHandler | None = ...) -> None: ...
25 | def _create_parser(parser_name: str) -> XMLReader: ...
26 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xml/sax/_exceptions.pyi:
--------------------------------------------------------------------------------
1 | from typing import NoReturn
2 | from xml.sax.xmlreader import Locator
3 |
4 | class SAXException(Exception):
5 | def __init__(self, msg: str, exception: Exception | None = None) -> None: ...
6 | def getMessage(self) -> str: ...
7 | def getException(self) -> Exception: ...
8 | def __getitem__(self, ix: object) -> NoReturn: ...
9 |
10 | class SAXParseException(SAXException):
11 | def __init__(self, msg: str, exception: Exception | None, locator: Locator) -> None: ...
12 | def getColumnNumber(self) -> int: ...
13 | def getLineNumber(self) -> int: ...
14 | def getPublicId(self): ...
15 | def getSystemId(self): ...
16 |
17 | class SAXNotRecognizedException(SAXException): ...
18 | class SAXNotSupportedException(SAXException): ...
19 | class SAXReaderNotAvailable(SAXNotSupportedException): ...
20 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xmlrpc/__init__.pyi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JelleZijlstra/typeshed_client/d79bfaf1370464df0a8c34293b48d4cd4154d7ea/typeshed_client/typeshed/xmlrpc/__init__.pyi
--------------------------------------------------------------------------------
/typeshed_client/typeshed/xxlimited.pyi:
--------------------------------------------------------------------------------
1 | import sys
2 | from typing import Any, final
3 |
4 | class Str(str): ...
5 |
6 | @final
7 | class Xxo:
8 | def demo(self) -> None: ...
9 | if sys.version_info >= (3, 11) and sys.platform != "win32":
10 | x_exports: int
11 |
12 | def foo(i: int, j: int, /) -> Any: ...
13 | def new() -> Xxo: ...
14 |
15 | if sys.version_info >= (3, 10):
16 | class Error(Exception): ...
17 |
18 | else:
19 | class error(Exception): ...
20 | class Null: ...
21 |
22 | def roj(b: Any, /) -> None: ...
23 |
--------------------------------------------------------------------------------
/typeshed_client/typeshed/zipapp.pyi:
--------------------------------------------------------------------------------
1 | from collections.abc import Callable
2 | from pathlib import Path
3 | from typing import BinaryIO
4 | from typing_extensions import TypeAlias
5 |
6 | __all__ = ["ZipAppError", "create_archive", "get_interpreter"]
7 |
8 | _Path: TypeAlias = str | Path | BinaryIO
9 |
10 | class ZipAppError(ValueError): ...
11 |
12 | def create_archive(
13 | source: _Path,
14 | target: _Path | None = None,
15 | interpreter: str | None = None,
16 | main: str | None = None,
17 | filter: Callable[[Path], bool] | None = None,
18 | compressed: bool = False,
19 | ) -> None: ...
20 | def get_interpreter(archive: _Path) -> str: ...
21 |
--------------------------------------------------------------------------------
/update_bundled.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | import shutil
4 | import subprocess
5 | import tempfile
6 | from pathlib import Path
7 |
8 |
9 | def update_bundled() -> None:
10 | ts_client = Path("typeshed_client")
11 | assert (
12 | ts_client.is_dir()
13 | ), "this script must be run at the root of the typeshed_client repository"
14 | bundled_ts_dir = ts_client / "typeshed"
15 | if bundled_ts_dir.exists():
16 | shutil.rmtree(bundled_ts_dir)
17 | with tempfile.TemporaryDirectory() as temp_dir_str:
18 | temp_dir = Path(temp_dir_str)
19 | subprocess.check_call(
20 | ["git", "clone", "https://github.com/python/typeshed.git", "--depth", "1"],
21 | cwd=temp_dir,
22 | )
23 | shutil.copytree(temp_dir / "typeshed" / "stdlib", bundled_ts_dir)
24 | shutil.rmtree(bundled_ts_dir / "@tests")
25 | subprocess.check_call(["git", "add", str(bundled_ts_dir)])
26 |
27 |
28 | if __name__ == "__main__":
29 | update_bundled()
30 |
--------------------------------------------------------------------------------