jedi-0.15.2/0000775000175000017500000000000013577125145012406 5ustar davedave00000000000000jedi-0.15.2/PKG-INFO0000664000175000017500000004501313577125145013506 0ustar davedave00000000000000Metadata-Version: 2.1 Name: jedi Version: 0.15.2 Summary: An autocompletion tool for Python that can be used for text editors. Home-page: https://github.com/davidhalter/jedi Author: David Halter Author-email: davidhalter88@gmail.com Maintainer: David Halter Maintainer-email: davidhalter88@gmail.com License: MIT Description: ################################################################### Jedi - an awesome autocompletion/static analysis library for Python ################################################################### .. image:: https://img.shields.io/pypi/v/jedi.svg?style=flat :target: https://pypi.python.org/pypi/jedi :alt: PyPI version .. image:: https://img.shields.io/pypi/pyversions/jedi.svg :target: https://pypi.python.org/pypi/jedi :alt: Supported Python versions .. image:: https://travis-ci.org/davidhalter/jedi.svg?branch=master :target: https://travis-ci.org/davidhalter/jedi :alt: Linux Tests .. image:: https://ci.appveyor.com/api/projects/status/mgva3bbawyma1new/branch/master?svg=true :target: https://ci.appveyor.com/project/davidhalter/jedi/branch/master :alt: Windows Tests .. image:: https://coveralls.io/repos/davidhalter/jedi/badge.svg?branch=master :target: https://coveralls.io/r/davidhalter/jedi :alt: Coverage status *If you have specific questions, please add an issue or ask on* `Stack Overflow `_ *with the label* ``python-jedi``. Jedi is a static analysis tool for Python that can be used in IDEs/editors. Jedi has a focus on autocompletion and goto functionality. Jedi is fast and is very well tested. It understands Python and stubs on a deep level. Jedi has support for different goto functions. It's possible to search for usages and list names in a Python file to get information about them. Jedi uses a very simple API to connect with IDE's. There's a reference implementation as a `VIM-Plugin `_, which uses Jedi's autocompletion. We encourage you to use Jedi in your IDEs. Autocompletion in your REPL is also possible, IPython uses it natively and for the CPython REPL you have to install it. Jedi can currently be used with the following editors/projects: - Vim (jedi-vim_, YouCompleteMe_, deoplete-jedi_, completor.vim_) - Emacs (Jedi.el_, company-mode_, elpy_, anaconda-mode_, ycmd_) - Sublime Text (SublimeJEDI_ [ST2 + ST3], anaconda_ [only ST3]) - TextMate_ (Not sure if it's actually working) - Kate_ version 4.13+ supports it natively, you have to enable it, though. [`proof `_] - Atom_ (autocomplete-python-jedi_) - `GNOME Builder`_ (with support for GObject Introspection) - `Visual Studio Code`_ (via `Python Extension `_) - Gedit (gedi_) - wdb_ - Web Debugger - `Eric IDE`_ (Available as a plugin) - `IPython 6.0.0+ `_ and many more! Here are some pictures taken from jedi-vim_: .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_complete.png Completion for almost anything (Ctrl+Space). .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_function.png Display of function/class bodies, docstrings. .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_pydoc.png Pydoc support (Shift+k). There is also support for goto and renaming. Get the latest version from `github `_ (master branch should always be kind of stable/working). Docs are available at `https://jedi.readthedocs.org/en/latest/ `_. Pull requests with documentation enhancements and/or fixes are awesome and most welcome. Jedi uses `semantic versioning `_. If you want to stay up-to-date (News / RFCs), please subscribe to this `github thread `_.: Installation ============ pip install jedi Note: This just installs the Jedi library, not the editor plugins. For information about how to make it work with your editor, refer to the corresponding documentation. You don't want to use ``pip``? Please refer to the `manual `_. Feature Support and Caveats =========================== Jedi really understands your Python code. For a comprehensive list what Jedi understands, see: `Features `_. A list of caveats can be found on the same page. You can run Jedi on CPython 2.7 or 3.4+ but it should also understand/parse code older than those versions. Additionally you should be able to use `Virtualenvs `_ very well. Tips on how to use Jedi efficiently can be found `here `_. API --- You can find the documentation for the `API here `_. Autocompletion / Goto / Pydoc ----------------------------- Please check the API for a good explanation. There are the following commands: - ``jedi.Script.goto_assignments`` - ``jedi.Script.completions`` - ``jedi.Script.usages`` The returned objects are very powerful and really all you might need. Autocompletion in your REPL (IPython, etc.) ------------------------------------------- Starting with IPython `6.0.0` Jedi is a dependency of IPython. Autocompletion in IPython is therefore possible without additional configuration. It's possible to have Jedi autocompletion in REPL modes - `example video `_. This means that in Python you can enable tab completion in a `REPL `_. Static Analysis ------------------------ To do all forms of static analysis, please try to use ``jedi.names``. It will return a list of names that you can use to infer types and so on. Refactoring ----------- Jedi's parser would support refactoring, but there's no API to use it right now. If you're interested in helping out here, let me know. With the latest parser changes, it should be very easy to actually make it work. Development =========== There's a pretty good and extensive `development documentation `_. Testing ======= The test suite depends on ``tox`` and ``pytest``:: pip install tox pytest To run the tests for all supported Python versions:: tox If you want to test only a specific Python version (e.g. Python 2.7), it's as easy as :: tox -e py27 Tests are also run automatically on `Travis CI `_. For more detailed information visit the `testing documentation `_. Acknowledgements ================ - Takafumi Arakaki (@tkf) for creating a solid test environment and a lot of other things. - Danilo Bargen (@dbrgn) for general housekeeping and being a good friend :). - Guido van Rossum (@gvanrossum) for creating the parser generator pgen2 (originally used in lib2to3). .. _jedi-vim: https://github.com/davidhalter/jedi-vim .. _youcompleteme: https://github.com/ycm-core/YouCompleteMe .. _deoplete-jedi: https://github.com/zchee/deoplete-jedi .. _completor.vim: https://github.com/maralla/completor.vim .. _Jedi.el: https://github.com/tkf/emacs-jedi .. _company-mode: https://github.com/syohex/emacs-company-jedi .. _elpy: https://github.com/jorgenschaefer/elpy .. _anaconda-mode: https://github.com/proofit404/anaconda-mode .. _ycmd: https://github.com/abingham/emacs-ycmd .. _sublimejedi: https://github.com/srusskih/SublimeJEDI .. _anaconda: https://github.com/DamnWidget/anaconda .. _wdb: https://github.com/Kozea/wdb .. _TextMate: https://github.com/lawrenceakka/python-jedi.tmbundle .. _Kate: https://kate-editor.org .. _Atom: https://atom.io/ .. _autocomplete-python-jedi: https://atom.io/packages/autocomplete-python-jedi .. _GNOME Builder: https://wiki.gnome.org/Apps/Builder .. _Visual Studio Code: https://code.visualstudio.com/ .. _gedi: https://github.com/isamert/gedi .. _Eric IDE: https://eric-ide.python-projects.org .. :changelog: Changelog --------- 0.15.2 (2019-12-20) +++++++++++++++++++ - Call signatures are now detected a lot better - Add fuzzy completions with ``Script(...).completions(fuzzy=True)`` - Files bigger than one MB (about 20kLOC) get cropped to avoid getting stuck completely. - Many small Bugfixes - A big refactoring around contexts/values 0.15.1 (2019-08-13) +++++++++++++++++++ - Small bugfix and removal of a print statement 0.15.0 (2019-08-11) +++++++++++++++++++ - Added file path completions, there's a **new** ``Completion.type`` now: ``path``. Example: ``'/ho`` -> ``'/home/`` - ``*args``/``**kwargs`` resolving. If possible Jedi replaces the parameters with the actual alternatives. - Better support for enums/dataclasses - When using Interpreter, properties are now executed, since a lot of people have complained about this. Discussion in #1299, #1347. New APIs: - ``Definition.get_signatures() -> List[Signature]``. Signatures are similar to ``CallSignature``. ``Definition.params`` is therefore deprecated. - ``Signature.to_string()`` to format call signatures. - ``Signature.params -> List[ParamDefinition]``, ParamDefinition has the following additional attributes ``infer_default()``, ``infer_annotation()``, ``to_string()``, and ``kind``. - ``Definition.execute() -> List[Definition]``, makes it possible to infer return values of functions. 0.14.1 (2019-07-13) +++++++++++++++++++ - CallSignature.index should now be working a lot better - A couple of smaller bugfixes 0.14.0 (2019-06-20) +++++++++++++++++++ - Added ``goto_*(prefer_stubs=True)`` as well as ``goto_*(prefer_stubs=True)`` - Stubs are used now for type inference - Typeshed is used for better type inference - Reworked Definition.full_name, should have more correct return values 0.13.3 (2019-02-24) +++++++++++++++++++ - Fixed an issue with embedded Python, see https://github.com/davidhalter/jedi-vim/issues/870 0.13.2 (2018-12-15) +++++++++++++++++++ - Fixed a bug that led to Jedi spawning a lot of subprocesses. 0.13.1 (2018-10-02) +++++++++++++++++++ - Bugfixes, because tensorflow completions were still slow. 0.13.0 (2018-10-02) +++++++++++++++++++ - A small release. Some bug fixes. - Remove Python 3.3 support. Python 3.3 support has been dropped by the Python foundation. - Default environments are now using the same Python version as the Python process. In 0.12.x, we used to load the latest Python version on the system. - Added ``include_builtins`` as a parameter to usages. - ``goto_assignments`` has a new ``follow_builtin_imports`` parameter that changes the previous behavior slightly. 0.12.1 (2018-06-30) +++++++++++++++++++ - This release forces you to upgrade parso. If you don't, nothing will work anymore. Otherwise changes should be limited to bug fixes. Unfortunately Jedi still uses a few internals of parso that make it hard to keep compatibility over multiple releases. Parso >=0.3.0 is going to be needed. 0.12.0 (2018-04-15) +++++++++++++++++++ - Virtualenv/Environment support - F-String Completion/Goto Support - Cannot crash with segfaults anymore - Cleaned up import logic - Understand async/await and autocomplete it (including async generators) - Better namespace completions - Passing tests for Windows (including CI for Windows) - Remove Python 2.6 support 0.11.1 (2017-12-14) +++++++++++++++++++ - Parso update - the caching layer was broken - Better usages - a lot of internal code was ripped out and improved. 0.11.0 (2017-09-20) +++++++++++++++++++ - Split Jedi's parser into a separate project called ``parso``. - Avoiding side effects in REPL completion. - Numpy docstring support should be much better. - Moved the `settings.*recursion*` away, they are no longer usable. 0.10.2 (2017-04-05) +++++++++++++++++++ - Python Packaging sucks. Some files were not included in 0.10.1. 0.10.1 (2017-04-05) +++++++++++++++++++ - Fixed a few very annoying bugs. - Prepared the parser to be factored out of Jedi. 0.10.0 (2017-02-03) +++++++++++++++++++ - Actual semantic completions for the complete Python syntax. - Basic type inference for ``yield from`` PEP 380. - PEP 484 support (most of the important features of it). Thanks Claude! (@reinhrst) - Added ``get_line_code`` to ``Definition`` and ``Completion`` objects. - Completely rewritten the type inference engine. - A new and better parser for (fast) parsing diffs of Python code. 0.9.0 (2015-04-10) ++++++++++++++++++ - The import logic has been rewritten to look more like Python's. There is now an ``InferState.modules`` import cache, which resembles ``sys.modules``. - Integrated the parser of 2to3. This will make refactoring possible. It will also be possible to check for error messages (like compiling an AST would give) in the future. - With the new parser, the type inference also completely changed. It's now simpler and more readable. - Completely rewritten REPL completion. - Added ``jedi.names``, a command to do static analysis. Thanks to that sourcegraph guys for sponsoring this! - Alpha version of the linter. 0.8.1 (2014-07-23) +++++++++++++++++++ - Bugfix release, the last release forgot to include files that improve autocompletion for builtin libraries. Fixed. 0.8.0 (2014-05-05) +++++++++++++++++++ - Memory Consumption for compiled modules (e.g. builtins, sys) has been reduced drastically. Loading times are down as well (it takes basically as long as an import). - REPL completion is starting to become usable. - Various small API changes. Generally this release focuses on stability and refactoring of internal APIs. - Introducing operator precedence, which makes calculating correct Array indices and ``__getattr__`` strings possible. 0.7.0 (2013-08-09) ++++++++++++++++++ - Switched from LGPL to MIT license. - Added an Interpreter class to the API to make autocompletion in REPL possible. - Added autocompletion support for namespace packages. - Add sith.py, a new random testing method. 0.6.0 (2013-05-14) ++++++++++++++++++ - Much faster parser with builtin part caching. - A test suite, thanks @tkf. 0.5 versions (2012) +++++++++++++++++++ - Initial development. Keywords: python completion refactoring vim Platform: any Classifier: Development Status :: 4 - Beta Classifier: Environment :: Plugins Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE) Classifier: Topic :: Utilities Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Provides-Extra: testing jedi-0.15.2/requirements.txt0000664000175000017500000000001513577124112015657 0ustar davedave00000000000000parso>=0.5.2 jedi-0.15.2/AUTHORS.txt0000664000175000017500000000405413577124112014270 0ustar davedave00000000000000Main Authors ============ David Halter (@davidhalter) Takafumi Arakaki (@tkf) Code Contributors ================= Danilo Bargen (@dbrgn) Laurens Van Houtven (@lvh) <_@lvh.cc> Aldo Stracquadanio (@Astrac) Jean-Louis Fuchs (@ganwell) tek (@tek) Yasha Borevich (@jjay) Aaron Griffin andviro (@andviro) Mike Gilbert (@floppym) Aaron Meurer (@asmeurer) Lubos Trilety Akinori Hattori (@hattya) srusskih (@srusskih) Steven Silvester (@blink1073) Colin Duquesnoy (@ColinDuquesnoy) Jorgen Schaefer (@jorgenschaefer) Fredrik Bergroth (@fbergroth) Mathias Fußenegger (@mfussenegger) Syohei Yoshida (@syohex) ppalucky (@ppalucky) immerrr (@immerrr) immerrr@gmail.com Albertas Agejevas (@alga) Savor d'Isavano (@KenetJervet) Phillip Berndt (@phillipberndt) Ian Lee (@IanLee1521) Farkhad Khatamov (@hatamov) Kevin Kelley (@kelleyk) Sid Shanker (@squidarth) Reinoud Elhorst (@reinhrst) Guido van Rossum (@gvanrossum) Dmytro Sadovnychyi (@sadovnychyi) Cristi Burcă (@scribu) bstaint (@bstaint) Mathias Rav (@Mortal) Daniel Fiterman (@dfit99) Simon Ruggier (@sruggier) Élie Gouzien (@ElieGouzien) Robin Roth (@robinro) Malte Plath (@langsamer) Anton Zub (@zabulazza) Maksim Novikov (@m-novikov) Tobias Rzepka (@TobiasRzepka) micbou (@micbou) Dima Gerasimov (@karlicoss) Max Woerner Chase (@mwchase) Johannes Maria Frank (@jmfrank63) Shane Steinert-Threlkeld (@shanest) Tim Gates (@timgates42) Note: (@user) means a github user name. jedi-0.15.2/pytest.ini0000664000175000017500000000076713577124112014442 0ustar davedave00000000000000[pytest] addopts = --doctest-modules # Ignore broken files in blackbox test directories norecursedirs = .* docs completion refactor absolute_import namespace_package scripts extensions speed static_analysis not_in_sys_path sample_venvs init_extension_module simple_import jedi/third_party # Activate `clean_jedi_cache` fixture for all tests. This should be # fine as long as we are using `clean_jedi_cache` as a session scoped # fixture. usefixtures = clean_jedi_cache testpaths = jedi test jedi-0.15.2/docs/0000775000175000017500000000000013577125145013336 5ustar davedave00000000000000jedi-0.15.2/docs/Makefile0000664000175000017500000001266413577124112015000 0ustar davedave00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Jedi.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Jedi.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Jedi" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Jedi" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." jedi-0.15.2/docs/_templates/0000775000175000017500000000000013577125145015473 5ustar davedave00000000000000jedi-0.15.2/docs/_templates/ghbuttons.html0000664000175000017500000000034713577124112020373 0ustar davedave00000000000000

Github



jedi-0.15.2/docs/_templates/sidebarlogo.html0000664000175000017500000000021013577124112020635 0ustar davedave00000000000000 jedi-0.15.2/docs/docs/0000775000175000017500000000000013577125145014266 5ustar davedave00000000000000jedi-0.15.2/docs/docs/development.rst0000664000175000017500000001312213577124112017332 0ustar davedave00000000000000.. include:: ../global.rst Jedi Development ================ .. currentmodule:: jedi .. note:: This documentation is for Jedi developers who want to improve Jedi itself, but have no idea how Jedi works. If you want to use Jedi for your IDE, look at the `plugin api `_. It is also important to note that it's a pretty old version and some things might not apply anymore. Introduction ------------ This page tries to address the fundamental demand for documentation of the |jedi| internals. Understanding a dynamic language is a complex task. Especially because type inference in Python can be a very recursive task. Therefore |jedi| couldn't get rid of complexity. I know that **simple is better than complex**, but unfortunately it sometimes requires complex solutions to understand complex systems. Since most of the Jedi internals have been written by me (David Halter), this introduction will be written mostly by me, because no one else understands to the same level how Jedi works. Actually this is also the reason for exactly this part of the documentation. To make multiple people able to edit the Jedi core. In five chapters I'm trying to describe the internals of |jedi|: - :ref:`The Jedi Core ` - :ref:`Core Extensions ` - :ref:`Imports & Modules ` - :ref:`Caching & Recursions ` - :ref:`Helper modules ` .. note:: Testing is not documented here, you'll find that `right here `_. .. _core: The Jedi Core ------------- The core of Jedi consists of three parts: - :ref:`Parser ` - :ref:`Python type inference ` - :ref:`API ` Most people are probably interested in :ref:`type inference `, because that's where all the magic happens. I need to introduce the :ref:`parser ` first, because :mod:`jedi.inference` uses it extensively. .. _parser: Parser ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jedi used to have it's internal parser, however this is now a separate project and is called `parso `_. The parser creates a syntax tree that |jedi| analyses and tries to understand. The grammar that this parsers uses is very similar to the official Python `grammar files `_. .. _inference: Type inference of python code (inference/__init__.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.inference Inference Values (inference/base_value.py) ++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. automodule:: jedi.inference.base_value .. inheritance-diagram:: jedi.inference.value.instance.TreeInstance jedi.inference.value.klass.Classvalue jedi.inference.value.function.FunctionValue jedi.inference.value.function.FunctionExecutionContext :parts: 1 .. _name_resolution: Name resolution (inference/finder.py) ++++++++++++++++++++++++++++++++++++ .. automodule:: jedi.inference.finder .. _dev-api: API (api/__init__.py and api/classes.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The API has been designed to be as easy to use as possible. The API documentation can be found `here `_. The API itself contains little code that needs to be mentioned here. Generally I'm trying to be conservative with the API. I'd rather not add new API features if they are not necessary, because it's much harder to deprecate stuff than to add it later. .. _core-extensions: Core Extensions --------------- Core Extensions is a summary of the following topics: - :ref:`Iterables & Dynamic Arrays ` - :ref:`Dynamic Parameters ` - :ref:`Docstrings ` - :ref:`Refactoring ` These topics are very important to understand what Jedi additionally does, but they could be removed from Jedi and Jedi would still work. But slower and without some features. .. _iterables: Iterables & Dynamic Arrays (inference/value/iterable.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To understand Python on a deeper level, |jedi| needs to understand some of the dynamic features of Python like lists that are filled after creation: .. automodule:: jedi.inference.value.iterable .. _dynamic: Parameter completion (inference/dynamic.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.inference.dynamic .. _docstrings: Docstrings (inference/docstrings.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.inference.docstrings .. _refactoring: Refactoring (inference/refactoring.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.refactoring .. _imports-modules: Imports & Modules ------------------- - :ref:`Modules ` - :ref:`Builtin Modules ` - :ref:`Imports ` .. _builtin: Compiled Modules (inference/compiled.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.inference.compiled .. _imports: Imports (inference/imports.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.inference.imports .. _caching-recursions: Caching & Recursions -------------------- - :ref:`Caching ` - :ref:`Recursions ` .. _cache: Caching (cache.py) ~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.cache .. _recursion: Recursions (recursion.py) ~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.inference.recursion .. _dev-helpers: Helper Modules --------------- Most other modules are not really central to how Jedi works. They all contain relevant code, but you if you understand the modules above, you pretty much understand Jedi. Python 2/3 compatibility (_compatibility.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi._compatibility jedi-0.15.2/docs/docs/settings.rst0000664000175000017500000000011513577124112016646 0ustar davedave00000000000000.. include:: ../global.rst Settings ======== .. automodule:: jedi.settings jedi-0.15.2/docs/docs/api-classes.rst0000664000175000017500000000023013577124112017210 0ustar davedave00000000000000.. include:: ../global.rst .. _api-classes: API Return Classes ------------------ .. automodule:: jedi.api.classes :members: :undoc-members: jedi-0.15.2/docs/docs/installation.rst0000664000175000017500000000535113577124112017516 0ustar davedave00000000000000.. include:: ../global.rst Installation and Configuration ============================== You can either include |jedi| as a submodule in your text editor plugin (like jedi-vim_ does by default), or you can install it systemwide. .. note:: This just installs the |jedi| library, not the :ref:`editor plugins `. For information about how to make it work with your editor, refer to the corresponding documentation. The normal way -------------- Most people use Jedi with a :ref:`editor plugins`. Typically you install Jedi by installing an editor plugin. No necessary steps are needed. Just take a look at the instructions for the plugin. With pip -------- On any system you can install |jedi| directly from the Python package index using pip:: sudo pip install jedi If you want to install the current development version (master branch):: sudo pip install -e git://github.com/davidhalter/jedi.git#egg=jedi System-wide installation via a package manager ---------------------------------------------- Arch Linux ~~~~~~~~~~ You can install |jedi| directly from official Arch Linux packages: - `python-jedi `__ (Python 3) - `python2-jedi `__ (Python 2) The specified Python version just refers to the *runtime environment* for |jedi|. Use the Python 2 version if you're running vim (or whatever editor you use) under Python 2. Otherwise, use the Python 3 version. But whatever version you choose, both are able to complete both Python 2 and 3 *code*. (There is also a packaged version of the vim plugin available: `vim-jedi at Arch Linux `__.) Debian ~~~~~~ Debian packages are available in the `unstable repository `__. Others ~~~~~~ We are in the discussion of adding |jedi| to the Fedora repositories. Manual installation from GitHub --------------------------------------------- If you prefer not to use an automated package installer, you can clone the source from GitHub and install it manually. To install it, run these commands:: git clone --recurse-submodules https://github.com/davidhalter/jedi cd jedi sudo python setup.py install Inclusion as a submodule ------------------------ If you use an editor plugin like jedi-vim_, you can simply include |jedi| as a git submodule of the plugin directory. Vim plugin managers like Vundle_ or Pathogen_ make it very easy to keep submodules up to date. .. _jedi-vim: https://github.com/davidhalter/jedi-vim .. _vundle: https://github.com/gmarik/vundle .. _pathogen: https://github.com/tpope/vim-pathogen jedi-0.15.2/docs/docs/usage.rst0000664000175000017500000000544613577124112016126 0ustar davedave00000000000000.. include:: ../global.rst End User Usage ============== If you are a not an IDE Developer, the odds are that you just want to use |jedi| as a browser plugin or in the shell. Yes that's :ref:`also possible `! |jedi| is relatively young and can be used in a variety of Plugins and Software. If your Editor/IDE is not among them, recommend |jedi| to your IDE developers. .. _editor-plugins: Editor Plugins -------------- Vim: - jedi-vim_ - YouCompleteMe_ - deoplete-jedi_ Emacs: - Jedi.el_ - elpy_ - anaconda-mode_ Sublime Text 2/3: - SublimeJEDI_ (ST2 & ST3) - anaconda_ (only ST3) SynWrite: - SynJedi_ TextMate: - Textmate_ (Not sure if it's actually working) Kate: - Kate_ version 4.13+ `supports it natively `__, you have to enable it, though. Visual Studio Code: - `Python Extension`_ Atom: - autocomplete-python-jedi_ GNOME Builder: - `GNOME Builder`_ `supports it natively `__, and is enabled by default. Gedit: - gedi_ Eric IDE: - `Eric IDE`_ (Available as a plugin) Web Debugger: - wdb_ and many more! .. _repl-completion: Tab Completion in the Python Shell ---------------------------------- Starting with Ipython `6.0.0` Jedi is a dependency of IPython. Autocompletion in IPython is therefore possible without additional configuration. There are two different options how you can use Jedi autocompletion in your Python interpreter. One with your custom ``$HOME/.pythonrc.py`` file and one that uses ``PYTHONSTARTUP``. Using ``PYTHONSTARTUP`` ~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi.api.replstartup Using a custom ``$HOME/.pythonrc.py`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. autofunction:: jedi.utils.setup_readline .. _jedi-vim: https://github.com/davidhalter/jedi-vim .. _youcompleteme: https://valloric.github.io/YouCompleteMe/ .. _deoplete-jedi: https://github.com/zchee/deoplete-jedi .. _Jedi.el: https://github.com/tkf/emacs-jedi .. _elpy: https://github.com/jorgenschaefer/elpy .. _anaconda-mode: https://github.com/proofit404/anaconda-mode .. _sublimejedi: https://github.com/srusskih/SublimeJEDI .. _anaconda: https://github.com/DamnWidget/anaconda .. _SynJedi: http://uvviewsoft.com/synjedi/ .. _wdb: https://github.com/Kozea/wdb .. _TextMate: https://github.com/lawrenceakka/python-jedi.tmbundle .. _kate: https://kate-editor.org/ .. _autocomplete-python-jedi: https://atom.io/packages/autocomplete-python-jedi .. _GNOME Builder: https://wiki.gnome.org/Apps/Builder/ .. _gedi: https://github.com/isamert/gedi .. _Eric IDE: https://eric-ide.python-projects.org .. _Python Extension: https://marketplace.visualstudio.com/items?itemName=donjayamanne.python jedi-0.15.2/docs/docs/testing.rst0000664000175000017500000000154113577124112016467 0ustar davedave00000000000000.. include:: ../global.rst Jedi Testing ============ The test suite depends on ``tox`` and ``pytest``:: pip install tox pytest To run the tests for all supported Python versions:: tox If you want to test only a specific Python version (e.g. Python 2.7), it's as easy as:: tox -e py27 Tests are also run automatically on `Travis CI `_. You want to add a test for |jedi|? Great! We love that. Normally you should write your tests as :ref:`Blackbox Tests `. Most tests would fit right in there. For specific API testing we're using simple unit tests, with a focus on a simple and readable testing structure. .. _blackbox: Blackbox Tests (run.py) ~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: test.run Refactoring Tests (refactor.py) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: test.refactor jedi-0.15.2/docs/docs/features.rst0000664000175000017500000001617213577124112016636 0ustar davedave00000000000000.. include:: ../global.rst Features and Caveats ==================== Jedi obviously supports autocompletion. It's also possible to get it working in (:ref:`your REPL (IPython, etc.) `). Static analysis is also possible by using the command ``jedi.names``. Jedi would in theory support refactoring, but we have never publicized it, because it's not production ready. If you're interested in helping out here, let me know. With the latest parser changes, it should be very easy to actually make it work. General Features ---------------- - Python 2.7 and 3.4+ support - Ignores syntax errors and wrong indentation - Can deal with complex module / function / class structures - Great Virtualenv support - Can infer function arguments from sphinx, epydoc and basic numpydoc docstrings, and PEP0484-style type hints (:ref:`type hinting `) - Stub files Supported Python Features ------------------------- |jedi| supports many of the widely used Python features: - builtins - returns, yields, yield from - tuple assignments / array indexing / dictionary indexing / star unpacking - with-statement / exception handling - ``*args`` / ``**kwargs`` - decorators / lambdas / closures - generators / iterators - some descriptors: property / staticmethod / classmethod - some magic methods: ``__call__``, ``__iter__``, ``__next__``, ``__get__``, ``__getitem__``, ``__init__`` - ``list.append()``, ``set.add()``, ``list.extend()``, etc. - (nested) list comprehensions / ternary expressions - relative imports - ``getattr()`` / ``__getattr__`` / ``__getattribute__`` - function annotations - class decorators (py3k feature, are being ignored too, until I find a use case, that doesn't work with |jedi|) - simple/usual ``sys.path`` modifications - ``isinstance`` checks for if/while/assert - namespace packages (includes ``pkgutil``, ``pkg_resources`` and PEP420 namespaces) - Django / Flask / Buildout support Not Supported ------------- Not yet implemented: - manipulations of instances outside the instance variables without using methods Will probably never be implemented: - metaclasses (how could an auto-completion ever support this) - ``setattr()``, ``__import__()`` - writing to some dicts: ``globals()``, ``locals()``, ``object.__dict__`` Caveats ------- **Slow Performance** Importing ``numpy`` can be quite slow sometimes, as well as loading the builtins the first time. If you want to speed things up, you could write import hooks in |jedi|, which preload stuff. However, once loaded, this is not a problem anymore. The same is true for huge modules like ``PySide``, ``wx``, etc. **Security** Security is an important issue for |jedi|. Therefore no Python code is executed. As long as you write pure Python, everything is inferred statically. But: If you use builtin modules (``c_builtin``) there is no other option than to execute those modules. However: Execute isn't that critical (as e.g. in pythoncomplete, which used to execute *every* import!), because it means one import and no more. So basically the only dangerous thing is using the import itself. If your ``c_builtin`` uses some strange initializations, it might be dangerous. But if it does you're screwed anyways, because eventually you're going to execute your code, which executes the import. Recipes ------- Here are some tips on how to use |jedi| efficiently. .. _type-hinting: Type Hinting ~~~~~~~~~~~~ If |jedi| cannot detect the type of a function argument correctly (due to the dynamic nature of Python), you can help it by hinting the type using one of the following docstring/annotation syntax styles: **PEP-0484 style** https://www.python.org/dev/peps/pep-0484/ function annotations :: def myfunction(node: ProgramNode, foo: str) -> None: """Do something with a ``node``. """ node.| # complete here assignment, for-loop and with-statement type hints (all Python versions). Note that the type hints must be on the same line as the statement :: x = foo() # type: int x, y = 2, 3 # type: typing.Optional[int], typing.Union[int, str] # typing module is mostly supported for key, value in foo.items(): # type: str, Employee # note that Employee must be in scope pass with foo() as f: # type: int print(f + 3) Most of the features in PEP-0484 are supported including the typing module (for Python < 3.5 you have to do ``pip install typing`` to use these), and forward references. You can also use stub files. **Sphinx style** http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists :: def myfunction(node, foo): """Do something with a ``node``. :type node: ProgramNode :param str foo: foo parameter description """ node.| # complete here **Epydoc** http://epydoc.sourceforge.net/manual-fields.html :: def myfunction(node): """Do something with a ``node``. @type node: ProgramNode """ node.| # complete here **Numpydoc** https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt In order to support the numpydoc format, you need to install the `numpydoc `__ package. :: def foo(var1, var2, long_var_name='hi'): r"""A one-line summary that does not use variable names or the function name. ... Parameters ---------- var1 : array_like Array_like means all those objects -- lists, nested lists, etc. -- that can be converted to an array. We can also refer to variables like `var1`. var2 : int The type above can either refer to an actual Python type (e.g. ``int``), or describe the type of the variable in more detail, e.g. ``(N,) ndarray`` or ``array_like``. long_variable_name : {'hi', 'ho'}, optional Choices in brackets, default first when optional. ... """ var2.| # complete here A little history ---------------- The Star Wars Jedi are awesome. My Jedi software tries to imitate a little bit of the precognition the Jedi have. There's even an awesome `scene `_ of Monty Python Jedis :-). But actually the name hasn't so much to do with Star Wars. It's part of my second name. After I explained Guido van Rossum, how some parts of my auto-completion work, he said (we drank a beer or two): *"Oh, that worries me..."* When it's finished, I hope he'll like it :-) I actually started Jedi, because there were no good solutions available for VIM. Most auto-completions just didn't work well. The only good solution was PyCharm. But I like my good old VIM. Rope was never really intended to be an auto-completion (and also I really hate project folders for my Python scripts). It's more of a refactoring suite. So I decided to do my own version of a completion, which would execute non-dangerous code. But I soon realized, that this wouldn't work. So I built an extremely recursive thing which understands many of Python's key features. By the way, I really tried to program it as understandable as possible. But I think understanding it might need quite some time, because of its recursive nature. jedi-0.15.2/docs/docs/api.rst0000664000175000017500000000606513577124112015571 0ustar davedave00000000000000.. include:: ../global.rst API Overview ============ .. currentmodule:: jedi Note: This documentation is for Plugin developers, who want to improve their editors/IDE autocompletion If you want to use |jedi|, you first need to ``import jedi``. You then have direct access to the :class:`.Script`. You can then call the functions documented here. These functions return :ref:`API classes `. Deprecations ------------ The deprecation process is as follows: 1. A deprecation is announced in the next major/minor release. 2. We wait either at least a year & at least two minor releases until we remove the deprecated functionality. API Documentation ----------------- The API consists of a few different parts: - The main starting points for completions/goto: :class:`.Script` and :class:`.Interpreter` - Helpful functions: :func:`.names`, :func:`.preload_module` and :func:`.set_debug_function` - :ref:`API Result Classes ` - :ref:`Python Versions/Virtualenv Support ` with functions like :func:`.find_system_environments` and :func:`.find_virtualenvs` .. _api: Static Analysis Interface ~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: jedi .. autoclass:: jedi.Script :members: .. autoclass:: jedi.Interpreter :members: .. autofunction:: jedi.names .. autofunction:: jedi.preload_module .. autofunction:: jedi.set_debug_function .. _environments: Environments ~~~~~~~~~~~~ .. automodule:: jedi.api.environment .. autofunction:: jedi.find_system_environments .. autofunction:: jedi.find_virtualenvs .. autofunction:: jedi.get_system_environment .. autofunction:: jedi.create_environment .. autofunction:: jedi.get_default_environment .. autoexception:: jedi.InvalidPythonEnvironment .. autoclass:: jedi.api.environment.Environment :members: Examples -------- Completions: .. sourcecode:: python >>> import jedi >>> source = '''import json; json.l''' >>> script = jedi.Script(source, 1, 19, '') >>> script >>> completions = script.completions() >>> completions [, ] >>> completions[1] >>> completions[1].complete 'oads' >>> completions[1].name 'loads' Definitions / Goto: .. sourcecode:: python >>> import jedi >>> source = '''def my_func(): ... print 'called' ... ... alias = my_func ... my_list = [1, None, alias] ... inception = my_list[2] ... ... inception()''' >>> script = jedi.Script(source, 8, 1, '') >>> >>> script.goto_assignments() [] >>> >>> script.goto_definitions() [] Related names: .. sourcecode:: python >>> import jedi >>> source = '''x = 3 ... if 1 == 2: ... x = 4 ... else: ... del x''' >>> script = jedi.Script(source, 5, 8, '') >>> rns = script.related_names() >>> rns [, ] >>> rns[0].start_pos (3, 4) >>> rns[0].is_keyword False >>> rns[0].text 'x' jedi-0.15.2/docs/conf.py0000664000175000017500000002167113577124112014635 0ustar davedave00000000000000# -*- coding: utf-8 -*- # # Jedi documentation build configuration file, created by # sphinx-quickstart on Wed Dec 26 00:11:34 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import datetime # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) sys.path.append(os.path.abspath('_themes')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.todo', 'sphinx.ext.intersphinx', 'sphinx.ext.inheritance_diagram'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. project = u'Jedi' copyright = u'jedi contributors' import jedi from jedi.utils import version_info # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '.'.join(str(x) for x in version_info()[:2]) # The full version, including alpha/beta/rc tags. release = jedi.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'flask' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_themes'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. html_sidebars = { '**': [ 'sidebarlogo.html', 'localtoc.html', #'relations.html', 'ghbuttons.html', #'sourcelink.html', #'searchbox.html' ] } # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'Jedidoc' #html_style = 'default.css' # Force usage of default template on RTD # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Jedi.tex', u'Jedi Documentation', u'Jedi contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'jedi', u'Jedi Documentation', [u'Jedi contributors'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'Jedi', u'Jedi Documentation', u'Jedi contributors', 'Jedi', 'Awesome Python autocompletion library.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # -- Options for todo module --------------------------------------------------- todo_include_todos = False # -- Options for autodoc module ------------------------------------------------ autoclass_content = 'both' autodoc_member_order = 'bysource' autodoc_default_flags = [] #autodoc_default_flags = ['members', 'undoc-members'] # -- Options for intersphinx module -------------------------------------------- intersphinx_mapping = { 'https://docs.python.org/': None, } def skip_deprecated(app, what, name, obj, skip, options): """ All attributes containing a deprecated note shouldn't be documented anymore. This makes it even clearer that they are not supported anymore. """ doc = obj.__doc__ return skip or doc and '.. deprecated::' in doc def setup(app): app.connect('autodoc-skip-member', skip_deprecated) jedi-0.15.2/docs/index.rst0000664000175000017500000000140013577124112015163 0ustar davedave00000000000000.. include global.rst Jedi - an awesome autocompletion/static analysis library for Python =================================================================== Release v\ |release|. (:doc:`Installation `) .. automodule:: jedi Autocompletion can look like this (e.g. VIM plugin): .. figure:: _screenshots/screenshot_complete.png .. _toc: Docs ---- .. toctree:: :maxdepth: 2 docs/usage docs/installation docs/features docs/api docs/api-classes docs/settings docs/development docs/testing .. _resources: Resources --------- - `Source Code on Github `_ - `Travis Testing `_ - `Python Package Index `_ jedi-0.15.2/docs/_screenshots/0000775000175000017500000000000013577125145016035 5ustar davedave00000000000000jedi-0.15.2/docs/_screenshots/screenshot_pydoc.png0000664000175000017500000005303113577124112022111 0ustar davedave00000000000000PNG  IHDR&%sRGBbKGD pHYs  tIME  30ﵞ IDATxwxlnz )"METPTlȵ]*^+6PQvQQJG@:(5@M?] |?(Μ2UZ;*h,ABaTm| ByOB BILB!@nDQq\t9Q̣+89D3?kKٞ-?61Њj,&-'N+S6 o_](/N٬ cBV8=A1gdWΚOx'i%_+]g@߇{}<'{R4yNPv ?4*bt5~"JӼFcI'g_aiT9Wv:RAU vZ 66ڍpPRq 0)(9FFbi{?9Pm2?NXO|PL<lWJncw>Enf3NBBJ ޿>#ٱo6$ /[ե8^Jw\4PA)mtg.-8SMՓuSUl; eN76Ui꽝t`3^ q`&XD–4v`K厇\Xr8VLڱak.Ԇ͗™/hEASӤdOz8T 7q#'OV:i~Zy5TCs4گK6`Ms|8yZC'N#6ķ4qp{U;rJ(|xLe<'vͣ`7!? g Q`eǏ1bpj(6zX1A>Z7O*g/O8~^`q⯩4 s61v#sRo99C3}:KE/S-[G<(WC_iAڏW>/\4@Ś`q5UbbM~__FzUIXra9$X6Ejrb~ڠ?>'u6PY $ 墁 ߿CLw@%0s}Kŭ+x>뿀d)O1x;^~/eB~h1]C 濟1\|)MRMA5MLMu8RA_Zt!.jO&`,uWђ,5̂,X1 亙:m] ƌZfKlԶ*ng!pu,/$C{;=Ƙ̸͋PM-lE!6]A/ Iw8iP\[ƴ~,$L<[ |KtY,W:<`>AֆL5*k3IzF<V&lf!R\7bQBSfݤxZ g)QVN)ֆV00t~7<&ڨ[O%& zBGemާs`ELLL<; H3zk()@މ"obu֏SZf;l7ëaGmWp:_ONnPK!qu-4(O7MrS1,?6Ńg|l_d95@qX+h!F ˘;ok4n~> #``WO{/ 5su'f[;5N}?/g# zshwAMTq񙤓mR&+J [E$t4Sp;6weB/TB Hp 8tq⫄(KۦOtW")K9nڱ%Ioɶ ⣄il>~QѶ!'Nb~Gter&њb U~ ڿ¹2 VJ&EA8:T7:\ERӰTpHGi`1 Mx/Q{czYg=>dbb;F-fd xWP jC5f1X!JEgcW?xԵ= {;9_12"~^/gO7 :7Wh~9kVE~@#_ǧZb"LddxlV}A/hIcq\t~|~2`Gř&K)`Qd)7Tוo|hOm-Xۥ[ǣj؂/cb83Yg/ 'B}Nh` `.? Ey4+EbQ(G+s_.qWoU3߿ʜܬ-xn|VS(6XklyA bL=/[TCAՏRQHU(2/R/XSU:5Ɔf(}T~SP UZRw"zٻ ~k=zTWB6*\ZIJjMN~&腍g`LRKşQW 2G1]X²m$#;DF,Pn;54cVP8U*V&Z#+-J؝/ 5tXЂM`GD޽VR4iATLfQ?J}ĤlOn~u+-nKw3w\;n@VxXj'^αp:IߤRf=zBUH-(@+7Pa LiN4.^bmKɴ2?4%2~HgEAmŠ7z/?=}Ha8+]Px;YW\g[IlxU t4IN.[ FcU,{Տ8is58QW_P Zr|EwƒngK<i|B|>/B׬áel]b?zרF }'l{Kn`x=&c;!gV 6J*Gym2)KШ^dPI.:h{ uX4Djm;ƹU 2ʋUs~lflM67*D.+=9ILZª S/'$μBD1C:;pvj)sWLdT}~S8 ȩ08Wj9j$#y~V(cgΩ\V*,1#N)+&3J\s OR9?X3#+&GVLVb+&|tK%1B!DUJB!B!$&B!D!"(|]X!]2=_^͵%2 2g !"<( qf1,BZZp Mb,B0Ebbl|wOH}S3QVzwQ'J,T.el? (e_zGcrȜtwɐ)yAB!NҊɱTNf`dY!HL3>*y WqVl]n!~M'r+GQiq_=nGq1Wt/Bo娜qo=iCʭt+ƪ8l(E!1zm]Xd!Y@ !d$&B!Q"wZB!B!$&B!D!B!BHb"B!l4yj&~@vbt϶f;5/ RʧQ -!W7HE"ZBպuώ3D;›?)S,fAi&%e.5V$~j?4?y_\D~bzMp;Wy!׼z+^ùg E!W.9_Po/jѶ_m^,c>>|l&y?,yV/J?49\UR&s< %2z~_BY19z!g9|MLdb$ӈlW#ILI^^v~ĽC㣍Y?tNQ!;cNe9ܽ{9V3ŢL2W3;ht f;rH&XNJ-,~ iPSSzR?R m˙vu?X^I{3f=NZGjۅ7G_u?2cjnx:ƣ#OVCU,wgc_c2oX%)\_Ȩ+xG7}:u ߭yKZ̩7n}郡V½L2[X+4>B?w+]4٣87VO7*?9WL2J7CPM {P|{COE5jozNJn QF5?˷_{F~L*/g~iϝ7g3}?z.cqGf\aOuK]ȽxaB_jh>OO ٌvcVLcrb ah9}ݽ,(b\X^Zi5&W_V`=dC?T/87)3zs]$c۷t:_(5nc?3֨9_{i00W{N >*c%,_M'!1Q,\ޜoNdj{ְ;͇8z-ʊ$zLEt7+?XA?8ԟ {sY|L zv0rM0<.'cz u̜Cl~]CQt`k^i-hB'dBL&Shi |ɶo-(qUYXC>|{g$J/8nT,U]mKܙ} fl̢ڧ+ =C0(bVRlȉG`363GQHhmcw_&6͵O) y11R&v,.?:⃔jmIS!^cщBCD+l2Jsj$w{m|&1jcxz^¡c 5 LURV*>a/Ek$]V>׵Wf@|qsVTW'&Sd?WK͐C>юNgUInN+t{ zվ_A!*!1Qc;{9RpՉc1FYF|'6:SuFo]vA!%*T9} [Gi9;:DYy~wLwa4I>HauԸVnT~;fR>fʗnC=k u[Сk=J_>jG Q+&6 IcK .Í tvK)y{Lf1_W}/+ V]I<~T/oIqC)=Tdh3eb8/6/dtMi3;j` lYȴEs1o̧Z?E(qW{Bwuvg6n6>k(g{| ? |Ī\Y})?z(`ѐ3OZǪ ]6[.VrCWNjw8q*r"ukgSFh\wlܾŠriѪJfq󂫹L|!WQ)+&U%Ò,Td(wẌ́vʤ. !8!*Qoݤ^̗bv\HBߩ+G! y>\!!BHb"BILB!NnbYluh !"|QpZZ>l;c6kR487wlI5Vwf99?y HBHbrki`aݥ 㤪*UIda^#O&p8޹_~bKY=.Z\Uyyu>KCB!$19$.]V?%'zLu*U6Sd͈4R/\Mհ+,Wn{ĞEH/ IDATp;Y\F!Meo}D'*!+U:݌q=bl3/UfLP-V!N2-t{0rA],_EIl{>kpbnAQĚgR!N .0''R(fW(eTi\nL5=4;M3O:E̡4>UumG2B2)GLBHb.q] <0.m>*79U@fθ"ztFrכ9;FgSu7GK~Dz+eInJho槌a'B!),Sժ`*Qj Hg|AʚzM^Šv19sRI"SV hɁtT!j%Nj:t~&ZC)JBi&K&(oŞ@OVN>SuFo]uiQuSqٵ;oL#:wA`wŒ!TWr/ yfmuY%8q%b^\@'xu6iΣo34i2O!TW Ϙ!B5Jz!BHb"B!B!$1B!D!!BHbr32w BBY)<=9vdΖޔg:IsBbo:7'4>sHBWkdޜX:v aMURF*eBow3.z/'W2z <绥 !8-ES}yr|&ab$`ZKoQI M(nSRd&2ܛa֣tfΖؓ9d'g]O +Kvv??b+qNYB!+&s^{@A*nphU/=xB%&&3)P陠r[7 Lg|AF aتѵnksf◼4!+~=gJIB!+&AS ƪ83[&g$5M7a0 uĥz-6jtexY9j uҭL99;Q9i`ъ^7N?{ ѢCZB!+&ǻt&eS$5NK&=mN:#49}*M`?S|vSG80?a!{% 0ԍQMjhI E_ tdQIRPh5 9TFVϤwXjw³)͹BHb^/'6+՟JgVCq)3,@i&K&(oC=9;rdWY_xgmZ:̰X({ @?(,XK@d{x9=~Šo9/%7-yq9McϬݗfom.='jLU(#IL?kpK_ *dUƞpT -MZL4|\0-vYlSk*Yگxn8  Щq vCΚoX;%_!}dqM[鷿(gCsAˁ !8KlK*#Ao_*&Xo种i2bՠ~c^-6٬d(jJk Zeq5π ΁) 3Gu{(qfoԝ x" h";cZNJy#`&;!UHt~XF;~Ɓn6ZL}e|Y' ;88=̲p]L s&/= s{U+>:F`>޳/]ً2B^ 3 n*NZt3ǐvHdo"!u΄9:'r)X|lQ*&gP en@gmV6=GK(OڜjN CݎHn{ 5&Z5OGz+26óh6k޴mr w}Ǹ8Bq%&F8Ja~CQ-i_=u^7wSe5V {~=Wʏ=Z ɱGCŦ28TFԝG7ncYxL;-E)QS^e;ѱEjHRɕLBn-=;2 ,t TRxOSYb8J5W GO}nĬua$Wxm~3U\ /bPXwWV5hgWaֺר:}IR"KL׺H+R0v0-Dލa38i )mx㛩='ax xylP3?a."-ҸMt},'g2n̢\ƀB.11 zΧbr/|(!&WL_:ׅBa^2q /ꄟY+XM5 VB?:z\. o⤥BY1B!Dv6 B!dD!!BHb"B*+*1Q]ZmЊx<2 !BSDc-N玳UpdH8:/=Cb,B0Eeę(7ٹσu`OR$B!8yE i>j*-1B!Dg{_,4h$1N7atB!NfbZZC9Gtq?Ժ.K|G!'-1qЧ;~%|L!ޘ8#F,Bl;k iq$49$B!OT~+!Nt|WG{`ŝW\[oT5m6]-Y%7烧INrG857xEݿ܋7<@{,.K+W-㧪S;U|EhyVbzr|N׫Aڑ '_0/$ϻ7ajݿ^ʖty+xSϩߪ?"osi'Y ٸ7scI.gPtu ,[~X#3vfc|XWSSzR?R m˙vuLΖ&lZw&~+ u|uL20KUo2z2fYӣ\5~2s3(] C0FתwfWXTIFj&}rFʯwhdc6ؿΏ ~ f;rH&XNJ-,~ i*}|G~<~d?;sc3> LVP{a/9g'Zਈ>͟ʲO6^9)sD[?(*vDQ <ۗSTsPtؽsx]z_L\ coi5&W_V`DeWK]HFݸgryFB8QqÐ5㶦~'ܺo=\ϡ]y<ʭFxƬ}JzKxf#K:;3뱁\Ҍs[G&W6c?aӮW>Q,\?i<2f3պ[3jYŒDoRgvIG&;䞃P:/W]6Cdنw4yUQVK&qPj2n2vˠ4%5lڿϿO}'JjoI=7wP䗍 y̚BSrm5+ɝ`l,1v1o,; }q {sY|L zvsIOTL|eۍЪ%[N~L9}&Gw#Wү#c{WRO 6~C/e~l/}wϧ=Q??G:~#n0yL^ꍪɀu z|РCԇ6NML [9 N'wqC-1M5x>?F(T}e(b/V1paɤq5HzQOP^v~%9oG4z1nkǑg9OEZ$jE;ڏ}գs|qo[}EϑP| )JxbpֳMUEPB7'm/܅> c]b;yQ2Ț2SᅆpWcxǖEaD+o62'+~o،p_HNBfհR ԋxn0x*}9|xvx#lz^ި(BLj%iPl뒤4^M?9x{pE21?dN~U"'k04hm)5peQi%0F~,Lf-FM4YYy~wLwa4iY (j?Â2>tKJLj=ZvS $3U\gf5i,?Oٹ[PυCBtZG(5/Vs8qQsgT{ ;{cn4%Ń$H緈7nb ?|㴈 gGC-ff`f|\<sˠ 1mQߝe(ŹwQɥ&sGe.U[|y!3WClŢRrym:V3Y 75Ge^>ק/Xu`_gU?}xKwg`˲;Tș/mĕ[ף[6.=Q!yecgZUl4\Xk4bR>ʚ9%{?tC/zF#>TԂ9*mWV_W$ƦQU|v17qXE ~2Qj=w< ͡-,A0O͟">Zz_F"A×O<>|^'͹ܿ"B?d|aS^Ƃ JkgƮtbk+g\1|s%e!ĩ"!B޵-wi^ *N5%VgdJR"iNVLBQeȯ !PLӔ $ BBdD!!BTij).LNwDó3[֥B!*511nMhS m}A7 `T6MIeӔjl~1yn?(@Vl$chz!xϮ5.MS}aSٙjs1E;Ës<8Tv&_:6ڻՄ6~5ޛ'xPwE7UovMh:fIF.{LT')IV4\wouU;+:(jo|_|:PP.#1/|u7 z rs ˜] ޻jZtBO%(45T{WRO 5)ӻkwhWu`K{Zũ. y)p7m0lX fۇk7N>Ek#h+{v{ISz޹q>^{5LoA#v:@&צjF7a\2!_IL4<ϋAsQJ02S~>ל7ȸu%opg5<$7rds~~&^X]ӮFx?@@i {ʱ6$%jToѨM=Zǡ֏+3PӨ噔oQY@?}W{؇ ]յiy M^»\v)Z?DqBRë|R;b!7\b AQO6su ۊm%+Θm__ŏt^.BDKf=Y)?i{?MƐyLL'^dnћ5<;ONpGq.q+'$zaW6ԬPDPņ4Q#Υ݀ 8լFj+-ZO).{6Eh11_%0 >D{_2=P%ܸŸ?E\8xǩ3 XfdOjpzG'y]߈?"|ӄ;F#ҟ0JRixeUIg_:l.l.("^`X(ʀ,WEE" . :l2aG.{  ת!pT$8K~ӧoA¨U^#,T Ns^UQ0D%zQ)$9Nٯ,zV(!#wIDAT=;E]d2V 0*nPO;_ˣh[=/_^_NɿΩwׯQsh % uC/5Q}6 =ȟ%n ,|֟vNK}x$ F|1ܚ$51c=PBM'8 pk>!>fJ) @) 43a$Ec _Fޑ\|D`T~HbГ pn=Ɉ_!vv* 'ѽ'+pRv%Ս#$ ^-Yw=?R̨T㞠T߂m8SDYz>>eKv;B!%%]q8Y;qg䭔 j`H|ޭKEk?A[s P<0o|S_c֚tgߺcSQN0wd%^_:%G3y"b"Dyk7%˸ (#9{t1@_:,N4gn|݆S=hS!Д6c1lnA5v a%֖-sb 5YGlZӥoV3" 8L%>s):E|!Dm`&soz6P0f5lL \0p/T+u:Y+% 'z.ؚ3jbxSws> 0>TG!crCD!o.,BZCiѪUwLI!B\5!B !B)L×G` D=4ߑJc/xA휿v)ErSQMs~d>dnSEwF ؎}$?BZtLL #6? 5Ksôi`. P$Sf3 qe3&T[UH=Gv| ac 䰖Ht~ seGQ _9,Ϳ4M:?a"?&9Sʰ$=F ]eW|j G7=lNͳmC/09JA,a~؄ʶ;Qy/ɞCPuϏ'jT=U!`{>(LuoL4P#:%nJ&L6X4}ϙQy{|2>RKrX 7|>;n'}A7oFB45edl؋=t)rWT /MezǙno˻iȘͥgzϙƓ[HV.ϣmU{ʶ*=HNsX63Ι!p@w??> rTa+SP{{~סcb4mWchc(oU)*:Wݣ5(lFp+ff@A8$u'_9?i(-ѳěJIɡ@ȻUc9T@+`5ًo~JtMo8䧰xvr옲K)8gt| 3ɪ}r|wvH~~VOgO-SnJCFd.o*s@PJŹ5xu<_߱&J`zJX~f3&u&{y  DYz7;# ku~5gTAvF%v6=n'dZHJW=,^ԃfސlvթbyS)9Qs'I)>ط=._Ǹ{) 2/q(S@,&c]-^uL,I-dnSEwF ؎KB\k115d72.΍Ӧ4@fL#(=RI̘T#&&1gK6deJғ LyR^Eb Su.aBQ _9,Ϳ4M:?a"?&9Sʰ$=FB.w4L-6ޅ#pX$f C^R\il;]/$_7'KI.pϲ%hSUԂZ0lr1]"CypF֟IJhom{q!gw٫g _].22GL1Qyp*2p%+*3.޹/0ySwngA+yu.~m힛y>M"X]=XuBT?cpOk~*J@#ww>F2M4EHNI S:V7h}_X0ڭĚG,{4,S`榡44R(@G:=@ǦIrǒ'SuiJů.XFʧS91D$e<(D5ap=J?EX ο Vq0.$?1a%W|58^ D#/|[:d̡_q~*މ=z&^9hǑ6hP &]8d뫨t ,8l/K>,Ԥ`j{@j r a)'`~,L OSEAi[:ufꁚ bbƃǯptÅKQq2~%:Z(F5#`XCDR HL˺Z5A/{/u+M&/nI}lpW}*GUBT{ǔPd|>|IL[Hz:YԦMuf2>q'3bAZ}Kcؽhlڗ͸]J x Xnױ:ma>K6rk4G3@Yʏ& .PƖ# ?aՠY6%ilKyk^UQϿ;co .Ҳr.v櫩M&jO&!O(-Zꣻz@")Bj:-!i>J~&q`ϳܡ!B\+1B!D! !B !B)LBQk?P@IENDB`jedi-0.15.2/docs/_screenshots/screenshot_function.png0000664000175000017500000011614313577124112022624 0ustar davedave00000000000000PNG  IHDR6sRGBbKGD pHYs  tIME  0&S IDATxy|L߳fUAPb5 RJ([]-4$b-X"L֙?(Z y^^W{sysG@ DL^@ xPExC  B~. W@ Ep@ (ߘu?ETQJ|5ߎbW~b]3Vmɱ0"缋pIK D1hTt?NyrOgl,k1R^'PWSNlss.御`:Df[^7b/1?_8߷n%KyyWߚky%|ar*0sSNʝ;lQVJ&_%,2s V$4mR"DE$![%W-sFQxfLMc؜p ecJ[' ߡN৬+\(@t7=u6$ۗLĜIS̒utp| :QV]}b?=Kԑt0ChV !QzPO{v({5A,_v΍q8ـև_bP*ҹqh%'.",.wm_W97:Pwt4ri&M^'?[>0f w6-犕,:v6{M1־?3#L8>9j Ge4KNR}J9 &x Vk$͜‘u ߕEYHzpgݸvq>E_xSW|wלb˷/])3io״/gՍ"rdv EQ  wQMf. Άb+r7`Xl;Dһ\.e?cR_Lj&p;GT=סն6&<&?nrViW3cWvM bZpuA?ӽTY|ẜ~-q>8gh?`ƒ=Iԋ4b$]k.nɼi57~п?ߟFڍ 7Hɰ?~cl4&OAaD6Tm1{LJ3+|8twUdr'k굤Dt=w3lVǽn W2YqH/;>`S'iMY6{>Yµ[|~}=$:gq~77s]IvO >jZOeOϑ0, v,2yQe>um:%uiN".6(}(2gQz 7صj5σhP&Ȱ;䷎QlJ 7YQ55LXҿGOV>D]9grkX=H|] AVp\9[FhCܱz@ A%toIlm rLt KCzI%ټvGhF  kb^]˞.6R3&zMZy !9>Qп{h޸Z!ʹcU{|*YS_n(&[{ӳIQlOVl+z RxP2 QĥީjXBKt))kݾ%L,Mf&O9CFqY5旂yygdbǏ@N̸y?)+ gO$$I^ %pp(Yg 8?LC1dJVTb=K*IR!{7jGwO,+tRC)p4nӛпֆtvP i?(吖xR qdB|pkW.>\ rD¹q-@ 0a)f(W(ȼPبX$rvJ*@\aI R1+fRiS ) үq,իoy{'zѫ#JZɐYI;]ύTEpR|?lI[M?KĖǪmݽ%>JBMSuIdjzj92Ҽ+S[9*YsVZJ>fЧp.qw M?ӹMoF/9BPg7Y@m0c֜!U|F ^bPo/aܷ^ҟu'nОǴ|!a7ձcU_{e={@]km&dXL1́Irŏqkr>vH ;U~;+}ʪGܻ6>r#,Ni\? ߖ#כ?#ʨ/k'c_Hm+iNΔfԺ86v'~^GȖ?CQ|DZqf^:&.(G%ްJU;Os r]"ef>D}l}JEYm9PEx0tme.g^]iD=Tz5ݬK/313uFoCI3b|,nFsJDPR? dʬz日}4g ' %b_UM\1wT^nAޙU8up1ܡ"\.|׮Vʪa:n: =5%ZezkL|([ҸȝZbp>7+$@` 13X+u[OJ{H^Kxy3v <ݽAl|y99rN`ĉL ̠(@ bP@ P@ @@ Q @ $, :.|9(**a0>o%s=S8Z 0bAo[#Ig1tj{}Zm:۫ @ ^  DͻwL6Gz[^g%jm@ u*u}dYI8 J M) )AC})@ N,6LAa2S_ײ@ ^bP&ofR!KOc|X'H@ }1(Sip)S#S8ie˱V @  )̟w` oT-+un@ (LrP1(@ x%A+@#A@ Q @ D1(@ Š@ GPbP @75>c9ʬ}eť´~^'qǐk,>KaWQp _cSA߁%Y{ R(mmz"pƘ]H&RMؕMLVW%\1}| k9Y?)? Az'3| g]r^}\g-:NԳD@щg>~( KY288/ M^nW(CZNwG<iϰfWZx\qmfTsSۗОL͵G_Š+.Z S@&EϨ V}z`NwXy(;RvNBJp)茮4N??c78DZm.ʁYuO!H&25uRLȑXtr_`/Mg y|u~w1уu}E:]DjNy0>u/IR/o[G< w{s];|R(cBٲ8;Ӻ_03h";d^ͅҾ0'TM䞶wA+c&$*C'rc}L=Gԟž9Գ2}6ya; ApHz~/Sg?=wp05H]\ȖnM?/}cо ޼?gg6p K.~plϘ 91m4Ǯm`L<颗B_ ĦҥMewL([RBenw|ߌ/#S&?㍶o@T/ J`Hu=9Yl3,cRmޫ?BI6<TxOMbՙZՑGb[M.3ƴ*ۀA0h'x%Ҏ`WVC4t~4遟fk@LKQoHэ?J62g'_WSM=dFvtz)_ƥҦ!LےYOS|ۍxۻ={1fT LYe7ӳ;tr짫qjњqg}&}1;}s0?gt gl@SZm[혴-7m),+*'vQZutF$aȇsӷqvԙ3K4*Տmwޮ1Z? <ʼ 8ŇV&|}dw/W(ʚCW {{"1 qQ?>e74ڴ: NJa{@K6c1ߌo~;>7˘ϘX7ͪD!hٙA+q"sJ;=o0n;R2 zՈa`nh 4W=iRao2 hR:vG񬂇М5)=nyw@mWb:\ӭWǐ~ݳBȨ _'\uSws;CC&)30X}ٗw*Y '  CVqi}>MO} Gw k9h?r]Xc?3erg)`H:|JQz8ȏ9c}R2sEs6*F~7r̩6gk&.k "Y7I­_ ٗ~oϿ&gh2Ƅ_>/%$;gLcY.A!eXsiHyhex8)+]KRDOALIW48`@VY\] ,Mft~?\!P:ڍy_P +Nrx(i&L r\ΠQB.[¦TqTQ$ Cv&z$$lM6$ ze(LEɞ,S3OFQ79ƞ&.h󲮀_OܲtME4@3_\֘WWWs_ܗZe5;oFrD\^28)Rf6;1޽2߼[_3P_)F_@abQI\NcټL:Qabj-Yy-c"+w]qUrV@q%s8!ɦs%V֜Lx>69Ф93OeU3RŐ_ݚ2apفK)YSyNx* K&0H2vN1j Q;O3tMgNLe[1x,ch3%NDԴL;L|$,AHzz&[}TC<*]QsDz?g~5y7HRAc$ ڿFMY:7 -˝llHfָɰ+@6 #ӹkLX3~'6xڡuijjm*Uc%99%ldlKxt`uus޽Yz)0˷ZCѻ2~deJ%۽&UT DZ9hCRlْJ3Sfo8.uƿ}-pCQ?i\ߗSI̶,jэJ^fWQQCCDfUDaz">L)@?QoKHRM5],G>l'9dG_Фrn9 eeE@?ە1s ឝ0+w'>^4$q`h7~'fבj잯 A|ywszmlM,6'GQg1sfeB|^ھ܅FKB?F?1?S\ɾƺp<\Y'Np[<IDVخcT-[ ;Xa?[ L}J\'Fs"v== ;yi~#ϹOFᬺ}sלf)ae 踽x&HF~[[ _ql%G>"Sf}+56cGhsǏ)W~3\=> X҇CF^61R@VӶvقW̺<!񊡮6U[p6ME/S`[3!Usw"S8IO7/ ILDU}b$ve(=n$ D~D @ xL##?}lt8}.2@ JM2@ ew @ bP @JQ }c0ƿDi-+.Ex Nx>CCf-X^Il$ @ؕ|TF#U0M߅_w}_^EO` ƗǾGe *[E"+U_;Sa]#pHM6;8rUҌFcŐ>n37%s~:S~<`l;7[tg_~)B޿\_&űe}|]i9GWC?/ςE9eBiOxbd}\"ԫR)~CcGT&b[՜"=^ % 2% 4ib0X2/ + 4(a8ʭ4jrYsA *?ʊLMՉڅRnZNKqihbzh;v}̾"~h"5'ټ~~E=/n2bskO] ewL([`Dk\< m4ĢG4}\T} χ&rO[\R6߳9"2^k}~cסʪ+' KmT(pk3Î&R{CF0x}k6 eOE5fƝ0&vۛ}Fk[a[t7Zڽ %xKWJLڷ`FĢ{jO[6p K.&RMdq6тNQwA+c&$*C'rkg,ԟž9Գ7M?eapO!H&25uRec7/S[}ˋ0xNv^>;ci}l$>WCFsƴ/8/{7`j4 - u\he7Tȱ+[*>Q/cbJ)y4%~ >cѡ!nmagg|6:+YW(% IDATeA.Lso MA> c4fxيqݘdnw#dFvtz)_ƥҦ!m.{dqz+3d'xoOJm Qfwax<ZC泓ߩ&zn@OS|ۍxۻ={1fT \xЅ.=x<&=K buk>cM?ͬ6m`R)ƥҲͪ{S?>mY:4wӪlm(àn2oB9N|! (߅q3B,w5^~rVh͸y혝>9ֿyo _Ui>^;SgӭXxuf7Vu˔})h~Svԙ3K4*Տmwޮ1њvCW|ƒ ~ᣬ9t@'VT1Oͣ<QlHlJĩjUIگ5)V@ʹdYb|1#~_g>ϋvT_8cҲlKjǤϹW__XA9>JŀջLnuT~?ݡk{{êޥ>>~QIz =+u"96qGd##bQҊUC͋iߨ}Yd=En'^{j8= YX0u73$0dr?Q˾WI2O8IpP,>.h6̺L)Eܢ5\V\|92 hR:vG|#q~vqќJdz㉏8TܗptAnJe)C)) To1,  !W'MJ+Mn+)[Ŗ;OCYSʹ琌ć1ʜjӮ~&nƀ>!uӎm05u$]z;:*0-`Zơ,卣W]wF+nsY?X2w|13~_/QYآtIf_f ZY1d2cd qŞ#]"OS(R)=~`w:MZvp8=UXIp;Hz\^A&G(_@FŦ~4u 7IWA?O4q$fJϼ3wy;FF 5l RQE['n<Kڋv*_duϘ|= ?w@F|Wk0  %\%>`#aDdБƀA2̴gf(YSP(]KRDǃ>I3%]UpYgD/} _WsIBxֲM/q5}Bl`qYc^2o'ٱ,eBee@ ̓6g|E_fJruLQ9fJh'vV1TE}zjԨ(OM2$@<Ӷy^|R.yAl7mq.;E<'8RnD4e†0=\%Sԝ,J_f \G99v4{g١i6iM|DH|AsTCsSEa*?ʀoRI!M6*Ҹ;vFʽ jgl8R H YՊ'ƯJ ޕ{2nj%lTR2Jcm߄bj@Mȩd2#V9$&-ɱԊ=AԜĿ%rI }ǣeH܇wo*lJQGfnfq3kk:ZnIVSF̶GX v_׽7SHi+}ҹ~7-TSH|t-a45me+f;M_5j ;Hd]Lv6BOr>$MѢuvEjH? ǿgg,?}1UlꫦX5m|~P(-3 Μz%zܼ#H1+S),>#%w2L.d$ OQ~:2^$Dc6t&?s 鵱56}eqڭAUOFQhIvިdz~#]aiVelѥ09g QYupYq?\ ,?]VMD}ǣ! 1B8t#1oElowo5 +-'ȪDkMԏ1}=5w ]a(+.rٮdD5^(ɂm3r݄bluHsYu a89͆?Sa̿8͎#XC)}#}/%.߉Dh9s=,吡ѣפOrˊ=kotig 9m}j4_D)_A볠3Doe:F3>ˏ/  ,5\BB#:O&[xD xQW-Yz8Φ)-ׁݪ97 ̺<Q(M6c؎N`)m1#X(7UrKӢy(#$Bl&7>cӺfjΰNJ7L##?}lt8\ vbX ebX M{ @ ^bP)A@ 7BV ́TD|XO``;4d#)8{|eť´/iU'oU ~ת*Δۮ si}#z3_A;>>_]2çЭ|}%_Cf_[lB},.O-}d-xyX22x)ȸCK{gHdgee }p:˶Z39yc_A;>> IˍAɸ#$=>q:g-M.,,43(á m\!)̀&@F > F-.0xFkʹ `FĢ{jOϧG+mRL`ݲt~]FlupϢK eLiߡ!nmagZu/IR/o[G<ܑVؕM$ïdy}&)ёji"Dg-(xh_쿗lOaOٛ?[1Cgu)r?MO(pk3Î&R{CF襰L|?Fg~L dx!i9vmcGh|ϲkԞgǣ!>poͦY̸@,Ư )!ǵ8s |T&phXoZ5~XH߂ע" ))-_B ,His>=O+C)7{FLEt(O-:|e:[#0y\۲thr4U PAs?[ Ji:n*Pǫ3K#^J0?Ȍv:81S.KץMChMm߮"Дe[2V;&-hƦP몵wI[4fxيqݘ҈,rF n2oB9N|! (߅q3B\oǔ5^~rVh͸y혝>9v}y')BF ݏힽ3֖O3RS?ycUxb/|5DbOPw0V5x|.L^&t!%K6&=K bu4ǯ1,F/H]ɹpCY(o#m1gIn"ގkJ'.2|T LBgl Z+εݑh<[F K&sCkBȄIZIk9h?r]c݄Jr}Ibq}QOo>SmdM\'Dn#nCf#*YAsɪ0dFae* oO)5$pP-B5M߼ ć]ET6ce s[ұvtRq1Y3\h )c:ڬVOܲtME4@3_\֘O#>8 $9t-I}wO Ir .,P/g8:(j /&̧G\Wk7* 8?(5yQPU"l>^=^c<0dgGB2dc@ \f~em.vgЈ(F-aS8(,?Ǩ_qR8d'ơѻ#j}]MRU司86n,]j/fVt|=c,2xXON4`8Ҹ) e+w?,oS >5娒!,9xYJ'&hc2vs1IŎUrV@aY6Z=߳ <\@ƣ;O3< o~M3TVexcϋdbe4PIϸ0H26]=ό $nMa8@%Wɔ~OvTC<\Rػ`χ(lq.8]+x`? d=@ȹx[92įI)!e.lgXeZpj̬2AfѷLi,tb†e&6T*|8Ҷ=o9p,ȰVdX));fߞ(֨!UKء@"3*WdSY$1bX znN 2R4݇b+}](r^*^*@\}1UlꫦXȩdA!%fV+>Rv(U68zWRXˌƯ_G>.}#q6MWq+E?ole@v:߾JP֡W-4-SY9hCRlْJ%O/Y?Rq֔!H`6oB15p&X>?2^ EGckT??>$eo8Q ~5pU 3˨?LַM58}ӣ\pbpo\/b݉^ErZza /U]h$ soY}~?S`.߉Dh9s Ks ]a(+.rٮdD5zxmL~r˳Ɵkckj {'"u귅{ܼ80?EglI“OLz5vPa0;ZD! 1B8t#1oEl@5 +-'ȪDk-$M?WlK6;`}Ej_J>#L<-3t'\ӥ)aT?E,Nu;Y}= (ٚ_1~a^T˫ȇ}^>UQ9~o) &11Xմ-'qhȬ˓kۘIauߴ9Oyš(!!'E`i_!cθ |E10p:Q1 ^ .AMBk~}r*sb"1 /%E[ c@,*4qqK )e2?̤BP fBWp@qh5Us5=VeVPnne\ JP<"\.r6Tzeb@ 7x03ȃN 'TXS8A >t @ ɈbP @9C|Q>_Ϻ@Mē -ilq@ bP_;j;V׳#+<}#f|;j݌_wE ,nݕ%𬄯cyjUbHH{c%پdUMV%_r?}\qi>t_5;%0`z}ߎn%[ Đ|S3iÜk,W>@Z&lB v|q-k`tC s|PO˨d1.& ˻|˾?hq U?,^bI*s+bY\/H?jݹ] qȐ4B<[ Y}۟ 'ėgW_#?A dA׬/O]{jUU`hז6s?z>}ץq麴}#]W:|_?R-3?x{2nmH;ѐԓ<1F֥Eʱ@4L?^I EJXa_244Ɠ:iKМ |03- 2OGs#Τ+ [E|+\{kIs ;ŇZ5i,XrGSߤ=|w{8,>K];jDܖ5*>uccj[-r#׈t.;&Xɜ6yS?%>hAÉόUW+ G.}2&Db9viΎ}aK<ٰ1`ejOľsFrWFlfE7eH’Oyikܕ A)+IHč4[ɧn2bfVͮt] ewL([`gjˊ{#8| ۠i 5S¦js!I7Ⱥ8,E>cŨY6EU'sm YͰJԊ_2f^2܁CO濫ϧ iiHiɈUc3Uw@m q0_CdFL+~r6f#o$N'á^7Xgm q2ٿOՇaV| _]D^NG\hJJ'!Z#y(m+ҹ@ ٺ%$ 2QD.KƠӁ*`H@w!2٣* /7QJro"K;7 ?yu1~Egۺ KQP<3ҹWtDedI+مbVk>`RtWYgEGWQAi4])Q'c;CcJJԆ@ ÝB}X>k W۞*8 ۹asMHqtbʸ9QIxrp}e5 ,ֲL΍lJS.b*U&/YAXr~tIÂ0&RixŐ˽PUل I$=.u@1~ТʖLƝVؗ\^*(yM9;s>c̘F JehْB("RfWh!ReK1 c;ssB2#CGs~^ػoNF '2(/a𵧯 VmOZo0˽簿N/nRۯZSʧod$>Yʾ_C4N6b!8<~-v7O]P#ˮ#L(-P*QYt8\L@A<b&)~|7րKl?qYف?7XOˣٲgn) xS(10_u$+Ga5I99W%6W?5U1={♙+ g6-߇3зgsm)uHt/۽ 4K Ğ؂w5iBGffr7uj NqlK;wKȕA'欟ˬ_yK (Iӆҧf#'ҤzON&`!4nED-V -jܭ y6mDèt&Z}9 fH ^ 7)B<+'aƹ>9I=wTΒקcvZ 4'g]Sr''@F?ÿaXTV?j r6 iѽд_vAަN8tDަ27Xl6+W÷y`d5S?ګ:סm ШDԛisH332ܖؖ'ǻvԼ<]8Uq۷WAAvښpUq5YvQz*j!8t͝tpmTm^hԡA;HSo$B={4u ^W*U77v<vıqئbڭ'~ܽU8^<މ7+]E{lj>yOU埍3x~*gpwXo(Չ}[!Ŀ6/_Ygg9AE|5[ |fAr5[N)XNSegb'8%g}z؎ϛ-抲}x|*iT, ޺u큾,w߇S>t}[!ĿTOԦ5N' ſX͠B!OB! @]G ) !Bː !BHB!uVO1o6\vQFX]XB!(àfi$E֊4t~fkѧZQJјkS)73~cOH;qc)BRT*wk%P,,-aP|hkn3kw|].L!B\aR)QV ^OMJV4ɬb `hf2LK3Q Tl!vTSǷ :J5T?kEV|o`I|&wǡZ|U TQY7+>}P< 'v>_&n/"On&5֙]xM Y y7?ڕ X;6mihۭa[GRhmT|S7buC`]T1 ! 9Զdm| *G>uR`Lr` zn̬S2k@[Ş?@Q p.$9G֌JUC5޷ز!5Fjׂ@k;ڡmwpm ,*-&KdEY3'˟g“ݓw`e`f|w\L0`BN;`䷹&҄EAe lFqpH[3¨nGC}Ǫ|à+ә z0;E.BUj •w"E1E5t'=_`/ʓ}y.nO'=i#sI=jcGlJKF},#/K,]4B!{Rot]9Tn&O=\.v k.D͔j%֛ O X (d;+\-X^q\L̼L #JBíjM|\G V@ANK}hTفj'R-L"B!ΔJ7OJWOvqUJ(z@bV P"٤+KI]x+j4xO/aU[`Q {>e/C~mGBq$NIkD^?'~0g?OρI䫑 O5 Z.[(fo\V_g|@^5뇐^ֿ;W-׹B!.]Tݼ".׾41vR!B⌘9Z&B!IB!]C7c}B!8KR3(B!aP!BHB!B!:DuƒIv͔B!tàBh}~̃a'N@x=B!.0o<D! ]]+>?1 B!.0h~u3 !'? '0QHB!({J7qa7VIA !BEm::ժ`'}HB!.0h u~EF0@A"TB!ĥ6!GQó4ǃdA!BK9 |,@B!.&2B!A!B!aP!BHB!B!A!B!a_x]y>Z_{k6>!Xq4FP(X(e'BH,)kxnA"&iOmv_& h^xel k XvptZrZ#iJvNEO7cLczn;ڼhsS"i<.K`EL!)H"I9*Gd.fk.1EW|[h?]NJ2Id/\֮jY <NB3Y;A^~ InsHB!.0Rw`4G<Pp֛и8Jb ?Kz1y*u QZTi)S<4=ZmޗYOP.CxKeT=qO6)Ld>|fQrT:Z3,A(3bW C8l ^ib6w@Vߎ+PG GmW>هO~} ꣭PB?_)@}mj Tw"(fq0 PݯP0R'O 5 21PHd- V ڤ,NОdA/a@Cz.F&a^ {=M\cGOXhs`J֘)r !tX\N%:X%0(ZoL"dܤp}dbAxr{)ܤp~۩(yp^/q7hNG5 VLw \ru$;Ž Ŧ* *~0/< c2rB[PBi<VPk_a%c#yPŠ9k=\gy1yHv#85)G2fܼB!Dĸٌd&_ Ao V;+v9LG;|sHd(>EP,*V_<ȍfQ>*_Ice%CtiST͙ 03/ 54դqg^?\ !-(P! կa(d愿 Lg@HDv=ɟRH9,BOS3( @)XMM7פIUU݊lO"23ӼƎЦNQ4H^|nOL%Y^[cs>̣yT+&̂M;TlP!ECQLEtS͖s so,z{ ]AYRؑE p?! (AM ã[P氫$~?}P@PIwcb{zl6@#fh& skS!Y(7t 8nKRs# A-!<eP7ȱb%f3/?c:w~8uES P` @ Qܸ3PBQR$Tr[Sx+'Q[U(-ԭPԅD8 +DׂVh`9PѵeRh0j:G5&TKB!Jr]Pyf3 /0tF >ƬBӨ۷Ѥ ??<4VA,*3ܙœұRˋ=xno w诽#EyiEȃf-n9*>[AYp4@LA(-@bO@?{UB});kqssX[ I{ald#Yf:QG(A-ڷIL^Oixn-ޓԤ&:3~ ?>A>+q:QR8kЦ|2Mؾy/lҞq;hB oxQ0P]uؿ=^K*F!LgѰ'A1{6nRh`?|kWAnV:Ά0rIth&N `U(wѻ$Z$c_,Ƹ>>>L D9qt:u&W6M&t( -Sxf3zۏ/[Q'go +Q ;1ݎׇA˩XotE"c:vA&|x2BqAvy,u,W$8Udd~8UjԴ[}jJZ~!fMQ7_I'5]?6 7Y7-R̟K~0:ݛyY|C,9u,X@y7/'mp~.GMbhM`ɨOؚce4GI!(17tm=^ޝw1_-*Amjk:۶W OjN{zLS!DHtjp4A`*OEѢF021ntLLÏAQih="U+ƒKk:/QeJhԢ2dB!DYVzYCѨHmX|1 'B֕;RJaԛ\A,* :K7ܙœwC y5'Eg0H]v/3KjXy[3$#*On}*n3MFgoşkD^?'~0g?OρI䫑 O5 Z.[(fo\V(b2j$#!w8O܇[3!즠낪_j0BLIaNjL_x ޳[7!B\ZF XAA3|B g4_\Mԁ$렕ݗ2x>ހk3v%*cU^N3v4-S :%ѣi&Q}">n='<x9TD i|Zߨ0c1/ƾCb?{.?#/7BQ9jݻsIEN C4=ʷ.ܼ=d{ ,QVڑR]G5Mk ףSS7߿z&漺%4'y\ܞNzFz$,Ǝٔ Y:F^NYLAh-}Bt:nxO6Pp8C4%wV⃨$L#=c6kbu뱶Rެ4S 6;WGnC?i89L&Nm]"|ucb~N/&E$MEiU4V,B\aH W1X59] RFf`oh'k\e3o<݅fmRyy(o7yڍt oڒ0hQrPb#,PB ^Zeπ1O>HfAxB!."ӆ{FÓDYi9pFСҼe u( ˟};ĵh'Ս氢f 'S%HA NàfT /0ޘ] (9@3c~@ШNXZ4jQ@En2!^7?Ě&[^Ʉy 8%ơżVlb-֌]㭛"[=k7Cse|Ȉg7P {;XiUϮ2VZ3G1m?#@,=WxĢi\b)#of}_=mb=&Bi֛X!B\\J7B!HB!0(B!$ !B B!B B!0(B!.UڐD R8аT%'-BQN͠j˕][ų*L`BB!nkbi7X<1s4ƅ#[8UB!.0h&jnWpć'D_.B!`,'Jz&ĐrB!(JcT]+2vdx]zL@"Bq A( 5k0%B!%Q@j]=?9B!ĥUÉ$kkoO=B!ĥDB!."2B!A!B!aP!BHB!B!A!B!a ǷjJ4 .Z Qb6I{ _k*ӥrOX6Ʊ(coj(-F[?`ٱWQ*jr% !A5NY$Iүi81,/ aIˆ]\ AVXRFVD`Ct(z7_M?D!H0 R3X+[!#]ehBVfX֔L#S'W{۰CS^gfRۢk<˩-+"P"`qc?N'8]PTw;e4F&@dy9>ߙ8\B!(A(=#;qnJn6>6:vCT;yZL0'po] 0 |V(:<&Aph&GVetȻ to%<0@~Tu~u'gܿ7܏\gc 6}>-:D5@{IeT26 cYk:y(jݰN|DiPơV)3ca;߭e@i4f MѾEcMTǑ|9,q}93cCW%k<bOf>֮d͚eh!B:5E(Vb_&kz nѰSѱ3XI:N|~JX0oRp,oi3DARxF.y51#[1+JDaX#"?UQ~_FLBkQ1u 0%?dMd̙(F@`9ԞL7HU.6-ݏ#ۍ$ԤÆaȘur !,}BMLn:biDU e[ Ј:ϭIWwh!wVMk@aKQ s=h}BQ0N6;*%|P\ CPQ[re61`QEnckvm4\*D:4ȑ`!B0ǯi***/&Uq.7\1aRsXk FL]1Xergd3|!9GP~v ]v&RSԷGI4 Y PP,C2c~EmfC?c9v"CGhsKB!άtzXՠr\_+),CJ1aM*N jT vh`Svw&!yw>M*QjB&6ϵ 64/fh1"C7Ei%1SAr~dAsoU_CEh71# !*Eytfp4F+&ߗkt-!)k<%a45*Í !Ҫd)InLZ ήRy]cf%?Oۏ:+&xua1{>?QE}kე4Υ;{P﯍rL/ڹԋ0)CVw>ydcnre'dJƳoaOsJzko%FӐR֒+׿BqS .J -YqSOȲ4N_6H'g3XV*P#.pYuJ6߯DiSmWBA3؜ehBG4Z֭[,E؟bn1Q1bq/6_ih'w ሡb\eoiEtfb𚑌#\';=hNu~n%.@#"]^ovz%JsL+,%X._:^ӨQ#,YB5, ;#J7 5ode܅fPP.>hҷ>ry?Z?ym2^X~c#I/V\!Ŀ͛7端"$[wJ Œ_n>2OyO  t['݅>IG_ׄu 08_DK~>`3/^EU$T 5LdTbμ~x_bgm۶|gյ+9XH,Vl9>2:v`I]LjS6lii"8TOZ|ܙ<8DLv5"4- |JD(٬Sμ\!ĿcXuxh׮޽z ZH ! $De9;<;IvZ YE/Ç7rvj*^?;,4iDt9u`X7O^u v v%2mOX_r!c5^'ڵ+oN-<SY14yp_YGpmHg/ =VIx]$x._wy>Ĝ| 1?J\!ĿO|յkc۱ʫRB!eR3h\h^頂;2BB!àRJLmEc݇X! !B\aPQٿ2o'u.`@"Ӝ!BQ3Ca6e\OaK [!St1ʭRB!iB!0(B!$ !B B!B B!0(B!.U)q1 l<2z?V{W#'xeZOUMWc^X)VD%/¿-]'^wQ}l\!ʪTH$Zc >\O7&io돚|R8UKMx y#nPׂ`LS" \>jt}3r}pM_;9~-/cႾ VD 庞/0b YM6@ƪ7xu⋼X<]BqnaQ; UF*aO"4/˲s7ۥܩ)ڤ\%Jr~?[*~ֻܝ2A#W_0EHVmyxR:~=#~gasezqu ^pvxJ &ëz9| ύ$w!G!JAO_8`qqXz ? Q DV+40d }ڍnÍasq hsM<09zv!4Y~ +Rb:}F5/cүJ@V[#oo,s1~-AF6@jXeyġڮJQDaƓ`Ru @e=ˇ&~:aX'4\xQB` LsxJTǑ37gh<6/ㄿmҠ+;'[ptjۄarO]_-f@ NiR9dӢYq%7v&A(w~:`M]]+~ׁ%̚<.T!80Os`>s W)jUn)#ut|?)~!7)d Xvo(/Nl5Z{L] 6|>%(iOC9 ,R!POw䦧 ?gz7~xcQ)g@\s( Q*Y0AE[,XwXcE}uV0|Z.h F;~8:e03̌](BQ!K_[)RRQHD?Bl%.m0a̘19?F0|-s?s}>|G b6& }atTd,m,o)/n/8'\)ks3wأ?߽k^\I1%GsӊزOoKl'8zʇz=ǿZбH%ٓg1%/e},fX$?tɿ$\.*O@/tJfI3T㩁!BH3~9,enT r/st[hj F?Ts{ǁx+'f'I scEz6J໏WrPE-8NGߐ~__T-g13z${xa' M7Aw@"HG9IDATu-QA*Bc&HmsN -=&KB[mS"E[HUo=\Ej3yUC˻ ٳ籵D'ǡʥi B6$dNBjؙ.O7!To%}vb3z &tnag͸_9VÂ,ƳDZx1}*@ KQnluZS˻_BÙuc'8oOdfvgPP#ȎBT 3LJh3t&xR*W$+8Sy'1TOaƴ pM=%λY% 9K`o^8 *JH~ ,ReϬI` 4dߊ(Dg&rfSXʊ{He;M&;¼ JU 7g:X;ft2HE-0o\f̓-Aq/g xn$N(mصT7}AD, c̙a(=^-}3Wҵbɛoc2V҅/jH Gi@@0?GT?Bup6)>LeC `7BMf}T(oWmI2եsG5Le\[FN22?n:<ܥ'>ųR&S7`Ϥ$7zI.aF \~:x;/*zKxGg `c唳jg[ _k NߑnUxdsEDwV3;L|) =pvYBj' NUW܏ D>T g:iH[ 5|6jHg[ D:t2DK/;wKz Lj>@f\]dedvOP !{aO'>Վ/ ٻXL7YBCL^ϗ$K-e/8ЬIۉ/}=oڕ~vVy>^EgƤhHk 9l6PR'׀ZAF ujl)N:ϡ|hh}C=jjP?w_[ӐfǞ tn0t${FKj"\]j0` Iu;/ > B=17 I*Hee@!,Ir ٷ3}|{${ïvDG^f`҃\=2c|Kk]^c۸;0> u)gFBzK-$!m/؉x֝VWDqin1N*/d g    Ŵj=h% p- AADAA@2PA-Ň=hh>?)n<@؜Gjc6B\q:aTݴ1͆9BHn] E)ebG5À׽/.26bT l*К) v?+$QiQAЫ>L|7æF/?t1~xQ/hv6bG?7OŻ8~$ۧ>:$M#Xv%F&@38Ss |<W{]7Y[Snʰ1#rOe,U@ںw6z;4pN?Ԕ z=i}e{>.jzIЖ?j$xARxMV+ r>k)sdԨGvaHO{040V!{[ / u&* L n=}YfLƄl>١2G{ G0\/TW:  :(~|m[0wmũ*INf B-&޼vq@ =՞( z0P=ds9 gzOϳeW3r錺>˧%Ȫqp$ldD\x=܅ W1p4"|} mmh*C|iVgbQ }gL=xu_7f0$ zuÖLŨ,;ri:vbuOSq/ՖN3QSʢʸ{`/6^<؞ >ZGnI~+s$1geL7ۣMۿiۆTr@#.<@@NT][~${1%ԯ9Ruب uwcKSk`},*S|JIBdۈB~ sJA>-U'Y֐u_!ρQV:{NǴ7bKv pp&f߱Lr8s`G25'[LdXYJAޑEa|8 J%ӃH!K^ɪ;arh@R]J$)? I~d6 9oͯAy߮B:ati1$B1Z?Sȁ8 bAe4qqv&KzImFәHNe*L_ ?MCf_3A, `Z0z:3=?|2@Fz]IdKQW:p,!|77D]E$#Z֗.Y$ޣPl/ V@WAXe y%_&8*$6$azhKH\dq$ @oWWW B\( 0fO%8z,Ox#"1Om"٘ X+)}^&?zg|`!kҮ3/z$+#}v<׾@bg; \zTԯ`@VdE>/y*&a-e~l"*b3+EO:[Z͋jqKyU$qy{Q]lF t5zheՒS$*6oG&c C-j0݋!nlgOʏ'0×{R$n\-P˹~2bp^AA\.;s$I:o#n{<$t }w(zqډWYzmܩ,:f`OXnͻBq}Lx^:NZIGENJrY3OdMxoɟ. a@hp?CR%6gVvQ! sep| U6#{r sV8V_F.L?f{S>}dtTZwhpCN8cсٌ*D'oy9mAZ 9r1Jye^8Gpa65>Ђ~hN'zJ|V)ra݅%Tߑy@#H 9}'Ԣh'kt'&W~Yb'AJg A-oCzJŽ#1ojԴy_ zeb9? g)j>DrBV.uABH-94 $Xَ9/tf7UAPAA&*#3@s_*AY,=cp %]&mzA:s-AAChAAdsxoWILVvLe@?΄-+ ByAWOCؽ4 iVlٽEU,8a>o'fj}~|<˃]eDoʦiSk\֮b(֯Z_C,BlNLV}&o=hAxm\OhOpdf^9i֮X?\~[0+WEe"t+X{|&2eܕl^ook; %s--kl'fzM@s|W% &oAPAntg:X$]"e#%Π=#ѳl$07Vo~Ycx9_1:ztvh%q Z!YȩLWH!KH=;^yaO~D@Dξydbo{qrn Kѣ&jr* {_ηfzwQť\~X&ds. 'm;`)wENs9p_\wˌ֋5.e|h:wһ4)4ڿ!ge:5_9ӃiNؕ' , K;Ɵ摞xk:'Su0DG J&3sH}D[ݕk9iSQ GumbyyICAN ;$Ax;)])HkۆlMllV]/ $#6S|RbBoJVQAdO6Lӿo 4פe5+{  aЭcM27zJP3#Ҕ&eLVzQ?{ο~j6)—'7l-saPfBLw' _k!m`>14mwh.n4TՅjHί._fMؼM_=E'TMA({^# 6MLx*V8WjN"[Ce_ 2CDOc?g2= ^O#˞Ʀ0ȥ4G6DI !AIu 2ѹ~ULC N\-^c|l1 A~pfށJ{5F +6/""֤KcRLöD2c]^u;~J}c5kA3 3'?@13 WvNKWR`F#OI03:hvo8^gWP`G FADPf>1¢y@;r򋛒.<ʇ>q ɉ3qoOG#yTxƭY?M/$& #SD5͹ώ(>7Z\*rc+)>//*Xc O[Ȩ)1Aa Ư%ٵ1#b.Ǎu@d>Qup wg߈?fæO^xozvm> +S['jŎ#  &&zJe1cܷ| 9=1ۯ\E MF>Ӭ>t':*aM" - " w՚N  pۄA`h ]늯{A%ӂ  wjIENDB`jedi-0.15.2/docs/_screenshots/screenshot_complete.png0000664000175000017500000004132513577124112022606 0ustar davedave00000000000000PNG  IHDR-{sRGBbKGD pHYs  tIME 8/  IDATxy|MGǿ%77{BBl%RZTK-Em UUUԮ Z[k%B%քrAm/ |ɜy3<;3sH(@ sd@ B@ ;Qxɀ=&J-_Y2Qon]FosXE! -&P=D[0مW@::~W(A޵/ h9`7 Gql; Ⰹk}pIX`q JQ/=B)O&OMmhMØ9jmd?̈D7cS1ÚUBCvQ%+(822r~lW4oT0\;_Kn=t2 ]?yxA.~MoS?.R;1x]E&?;uxy>anXv@[CHfSF|wBuy/ܼ4ό8NNGȞTy(z 8d~J w{V}WgHSJs8Z-% 'wj3+{xԭԖj}S{?Nc䝘rnPl{U:,YaNB ~L; sޓ"e Ss[`$;r D0""f6x4WkW`cv "Cq!6Z2X:uGd4g `௹EvvWua.Y72PQ>P'w1{g,R>!8kjOB$/\눉GzЅi6;6HSbB^G{k m ,S&e0x]wJig" ҙfQ`\o>FMӌ n@S'kܨ$eNC4*ыuW>;4%ygϴNNT/Ҟy|-ER*:Ocƨ2-Vr1e6Z?ħU#yZu]5+ {`<\^-ffufo pR/-ؿJr]uо%]@SW;s392USssD[ۍ9 "d6kc5"_l\=QyL`=a'SZccfң\m^)YBBG$g׆e2aM7b1R4(2&#WW"͌k$l Q^JƜ)&t^Ul6[i[bK&{*̧,)&;lX/r6,':C%s["0TP{S+["I={ct5a7an~w_O~otd@ @тr{z,j W7H40m c7&f [ 7u,W| nCgV\4nsﺽ៳uLVG1 }%>sVA(;evE %ѐڝ}췥\&)2;7ejzCvA\4 II#;1}'L|[s?_9&HQ[ImxQp1FHuй tj1$eN(YOZPR/!*r`=tzO ɱɘѥm}'{;4JF7h_3_AڍIk:M IHygfYtUQJ%mƲmfE1h5JPVq\ֺ*Zóx%j/chd >͚D@YnHrewfa%= Nݣ^U 羋Isܶ_޴%*BSbF  bcp>MRg4r~ Gfn&;8UX"yD; ʤQT_pNľ1H;L% Yx(aI9h<_ZX.,qǂ^ nhQ,dm،ܹaGL>ΞY׿ѯ32<0)Gؼg*^)+y}Ff=ӟzNtfОn؞P+MD߅ɒSlֳ9L yylBڗGe8?mdʤվ||8WX:" 8011Pw.A~΃+j bᚪ,i1ҰI*e0eg__kC9Zpl$Nɳd"iyVo5/ 0hPHI 6.볊 -"3Z _k1:~*0stp~9>㟱{,WgpD_,eyo +ϋ"32I @ I@ B@ "@ǍK|u_D@ xE«/6T \é3Y4΋f ψP ҩxꁢ =ΟT""?4s-D1C7-C"eFu5&ytH̀,8c4׽n=3.ؖ%q@ xRE52z_=ƪ9*jpty_2q"2NW`^*LWcFqO,{T\v^Ku] kSMDևar"/2xhfgLzx<7"}Vmb=lO3eP6?/gsR4ìZ֟Z*'ϩce ZKZW}fǖ}"n  _qsvYtSL8t?C0Z~_; ;3M~evO`/v i)RKfa8V^]/UVL~uig" ҙfQ`nKӦi{J7Rŵ8QލN]$:KXw5^᳿3@y *+P[̔Zv~sߞ)ZѱA13Q6M}L V*j}DKCL<B8u)KJa7d&+Do9 .'!fq%A0Bֳau,gor3P29%c@e ߘʱڛҕ\I l?ԀS-lj!Q6}(YQOrh*S @۝d|K+sf'ڌ$$`MH\?w|Jܫ1ODҶ1|^̶(PPVF3v6d PS]zjApYAW(-r(|sy($NESiM [Mou^*mx;_W?jluۍA *r,/ё@ $"T[4H|>݉V9*l)ħ;1OscyMWʨap=KJq|Q|&ֽ3Yyqd&aNu=rhܔw/Ʃh@/X0l]$@ xWbKmd|8gH 2ZɹJd5oLPPƸ[AdJ?IrBrl2fEƭktipkiKCiyu;sJn~[[cSj╨UN(ܖq,W1zE40@ o͍1xx2 l;RmG+HxDI9¢=5fF֜%W3CfmLE O gJsȖ* d壄%iM `OfGΌÄat{s)oo*V_ cЋ>&$Ԧ.Ӄ㣉_F]he@ <b D1߮n6 vYb8kƌfֺ+ @@ |X@ D@ -@ h)h);|;jG]-u/Wk_{"D'"Z @ %G4jj~XŇ+s܍3Y0֋ygӄQ~aʲ|;fW-˽H;Wl6J=AxR:n3o7 zZt7ǝ <'_ʮhV|TƹZBDa}I|~Q|T4ybɯ%swq5קHf+Gva![ӓqP@ DK-^V"%3Ӽve*ʘ<;H_ Ur>ņsd=J}]W#a1#J"[q!G3߬?{Gf#)9djNa{>n_9,}[z[a6PցlMYNtJ&D` LaޔʖHm`O>e$tnigW Ja<ǖCɪݎ7br>='?pi\IP,Ccy)V3HT!*4#U+=&I³;=Ѫo)=OaRAlg#n N0!5U:ɢ1j?Qm (lHBڬI+.s]7̈́.Hj~W + bœ'3s.RQE*LnNS]zjApYAW(bN|m޴QdPIHHӚxTCXw~*kpQˠll((v+f; vH*2k%$ o ~ ~xӉJq|55 uI|TjY\ %7E!t:gd j36圖튄2ַ0nr OVܻ~{N.^$x[Mc%'\q9U1ROwBqXlTUk;W3HK4.HjW0Ykcc^2>jAU{ʸI{Q6t{lŕJ61'BӅgrxl;gL&jB&켾4aKLRev4nȻUE@CCrnL$SxFmOEPRTtx9^Tqg ;}\KGirg\)Xn.~˞JbC@ <1ѢQ'$m&.!C=ytHWӽE35mFa{˲guJj =Gʕ29).Gr>#jv:G .dRvl)ذ*g7oZP8(F vv3a37ތbM_//y֤KCfÞ} &35 1{&a+p ٻlY-΃g3EΧSiߜ 1JehP*+D{) H {L0>ڕ>a[``0gZ$YTЖ]\XբZ$͙pȵ۬Q(켛\I4:nCWyGC73$ .J4^:pbWDZ6sɐːC即,XdKKe$*ݱkd*C$@ N' 9YO Fvݟ8),E̒՞IYɓg9xODe80Q <+O\+_ɇ9̴c `QrD1&UW>(i8 OW0"75߬<,@ Dp-&57F~Bh|y#'/m.G)YXAuS ? f7aCAG, gJ7OWN{w["@ D@ !ZAޠ)׌ covdy &~7(x1^hʇ|_3fv7jOw&])scڔ<28ϢE~E xڰ i]9ndOlޟJ^$W>O1ӳM3zkcg#i&\|Jq&~v?L䇛U <=("\ڥd%Ra62g0w" @РS0]8Aą4t G D@ ޖ~}Jႄǀm,pteVl/t,김SY {qXWَ)g,d#GY^oVCg/5*`\wSNkiDx70c4+Xc0c~ ]~)tum-e냱x| %4`ꎕ>tSz^CkGsr)_x(/{-_YʟwcTߑ}'5F M2q!Rln!-7y{AZ^VLDS?9FG.!?.l.Lv`>_!??S>LP nقѧ"Zk)bC@_.a{.0 yMnwoU קӢYiؓac&b-yh xgVGYp)Oj|*L:omUŅݓdND6/<8qs;xg[K'w:JG=Y6SF ١}69$czX!͟:OW02gsͭ#|ϋ-݈'1$Y!& -}'9{%}{_n2-bX^/&A`BKe&9.v V".[̵.PyRɦdZlq|fP?l JV<"b]R9ؒم Y[(VN юuKT|A?Kl^If i3Ӓ}7+C<.ߑH%jEUh=|)VeIo^j__K>ye[QSgu*qdH4(Ӵ"7*/gŏ#csw([CA~GEϺѤU>i–/6p&yk{o;3uElB7] U^ːxl#x n`:5:瑼IŽ|s G}w(+Hڴ_tӲ@^Vm+u:g{?IZ^5-8U,YɄ-ds-|sDž Q qx]K~B<ݐbє#;ٹ}h?6'0gٱc¦X80Q x큉.1 = 燻L3-AGRZ̴*T˨H^h6 r7)A.A &yt5C~@])Ӗh hyw&A9F.l] 4cvY=G<3A, O]<$36^$ @vo@ !b@ hsXnÈ>4; h[4?`k)ي)se 7_!Zcz /z)IOg{ԪK6U/y6dʜ)w߯Z'Kx5L>w|"?8؈+hG&ч/(i|5B!v֝}:ݯr㟧O bE x P⃉Fd&2톅(m-ET*ځGQS,o9-Èܿ5{s+=,ڰ B 5OwL\֍NoC15a;/tg۶ ys.[Ahfv{Uo%8ٝ*3ov"È ʑ//]+ޅ9kCٺ1BpQܥ\OaDnq>0~[2wOm."wy^W߲?';Y>ʁ'S;,Y;!}Gڿ z~LT_ `O>N-}*q1)&10u1:NOcp30.v/ևuI*K3hjQm_/v1&/|=F8a.k#f2u5Z]MOg*9-^iyY({ifNLFҡ?H "xؓ~+IR/xQΊCpPiFK+T-Nd;1 `󨃏և?oINǞO)|@fZmOWEڋ /GI1g!с}[ i쳦\!U^7-Dk#vǼځfv"̸6p:ӖF\cIH\*0n$ TvXL w0jgbgRkf%);=1d+yY+jtszMκg54|ѐفtn *nT3N? _I3&])Y6aMЋ8Q?'}؈+p7X߈b.k{u$26Z%׺4 ®sdROsdJ~owwGXZՃpOԖkEH*x@U_@l]e벣)=ahyQJzVƵ$cy@BVy糱;5L>/3Jͷdojn.r-ӔIalT;ؿr 85ZC`#WX'>ۿ]I KVvyk9?DJ•\0J ;F>2bqt`M@1|z]OOB\`73z"ګɼɊsg)g6WCG|ӀΙuy?gD`q|.ep!t0&SQ?YUZhxuol(g:Sbz8}~=+Q]\;#o.&deذ)>51yb0u-aKHng,?S'p@ xiUk.bU3蟂i0bE 3-b#@ X0M^N{;-fZ@ h@ D@ 4aY ߎBM;9^$s^hʇ|_3fv7jVVxЗǢ!)ydɛ}J/-ӆT(Ox؃S%JtWO I7S?ӳM3zkcy_๿ߧx~)3KJ3 '𨲑?IX?a msEww!Y-C_$~bk~cQ ]~)tum-e냱x| %4`ꎕ>tcxU{~ tdw;+MQȞ17YđHy ߐ)iQ{Yo?˱r|ȥot~h}o3 KljݲOE4R6.&$ [ou;߽sxEpOȼ~h|Z4>Ͷ{2s ?D-݈'1$Y!FNA;|\]~;?YC**;2qd_%6|\Kά'\Oj|*L:omUŅݓdND6/<8_K'w:JG=Y6SF ١} 3I'OsJI?1PB?%?u>{2ad<{;Rn p{5"v$"g$Zo w9CE AŎb &^qTfRΜf%6/$4Ov:E 98/P𘎁[8q (f@w<5ʓJĸO6'bÔ|o$\ B$c$d+(Y^uZHؾwg.dsd=nѢX92F;JU,8Qp}%81oWI@PDKʖߙf˭3¹Y0q0ٳ0?d[2oV:rqu=X~c]Ig*=s-$o$2=28/?`>[z2rgqO FR4>k~B0gW I0BAy:R᡼t(.{H``Y%vDXLq -[5;[;Ih$]\033 fS J <N2rk_YN">x7L_jԳT7{jFs5kn2<̽ľ^<ƼlMv#ĕqZNlGBv{i'j!7frbAp,>L14ceŻd>^o}d0cqN gi:irُ2jhlB+oIn&qqH=wOr)x=B*Rlsu}_aヱWAdv'}u[9rO.S׾0`D+-" EPvCsZBX%FdSq|P""SRP>Sh{Hdc~{HDd=EDDD|A<-"""RQ~@IENDB`jedi-0.15.2/docs/_themes/0000775000175000017500000000000013577125145014762 5ustar davedave00000000000000jedi-0.15.2/docs/_themes/flask_theme_support.py0000664000175000017500000001502013577124112021401 0ustar davedave00000000000000""" Copyright (c) 2010 by Armin Ronacher. Some rights reserved. Redistribution and use in source and binary forms of the theme, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission. We kindly ask you to only use these themes in an unmodified manner just for Flask and Flask-related products, not for unrelated projects. If you like the visual style and want to use it for your own projects, please consider making some larger changes to the themes (such as changing font faces, sizes, colors or margins). THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ # flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "" styles = { # No corresponding class for the following: #Text: "", # class: '' Whitespace: "underline #f8f8f8", # class: 'w' Error: "#a40000 border:#ef2929", # class: 'err' Other: "#000000", # class 'x' Comment: "italic #8f5902", # class: 'c' Comment.Preproc: "noitalic", # class: 'cp' Keyword: "bold #004461", # class: 'k' Keyword.Constant: "bold #004461", # class: 'kc' Keyword.Declaration: "bold #004461", # class: 'kd' Keyword.Namespace: "bold #004461", # class: 'kn' Keyword.Pseudo: "bold #004461", # class: 'kp' Keyword.Reserved: "bold #004461", # class: 'kr' Keyword.Type: "bold #004461", # class: 'kt' Operator: "#582800", # class: 'o' Operator.Word: "bold #004461", # class: 'ow' - like keywords Punctuation: "bold #000000", # class: 'p' # because special names such as Name.Class, Name.Function, etc. # are not recognized as such later in the parsing, we choose them # to look the same as ordinary variables. Name: "#000000", # class: 'n' Name.Attribute: "#c4a000", # class: 'na' - to be revised Name.Builtin: "#004461", # class: 'nb' Name.Builtin.Pseudo: "#3465a4", # class: 'bp' Name.Class: "#000000", # class: 'nc' - to be revised Name.Constant: "#000000", # class: 'no' - to be revised Name.Decorator: "#888", # class: 'nd' - to be revised Name.Entity: "#ce5c00", # class: 'ni' Name.Exception: "bold #cc0000", # class: 'ne' Name.Function: "#000000", # class: 'nf' Name.Property: "#000000", # class: 'py' Name.Label: "#f57900", # class: 'nl' Name.Namespace: "#000000", # class: 'nn' - to be revised Name.Other: "#000000", # class: 'nx' Name.Tag: "bold #004461", # class: 'nt' - like a keyword Name.Variable: "#000000", # class: 'nv' - to be revised Name.Variable.Class: "#000000", # class: 'vc' - to be revised Name.Variable.Global: "#000000", # class: 'vg' - to be revised Name.Variable.Instance: "#000000", # class: 'vi' - to be revised Number: "#990000", # class: 'm' Literal: "#000000", # class: 'l' Literal.Date: "#000000", # class: 'ld' String: "#4e9a06", # class: 's' String.Backtick: "#4e9a06", # class: 'sb' String.Char: "#4e9a06", # class: 'sc' String.Doc: "italic #8f5902", # class: 'sd' - like a comment String.Double: "#4e9a06", # class: 's2' String.Escape: "#4e9a06", # class: 'se' String.Heredoc: "#4e9a06", # class: 'sh' String.Interpol: "#4e9a06", # class: 'si' String.Other: "#4e9a06", # class: 'sx' String.Regex: "#4e9a06", # class: 'sr' String.Single: "#4e9a06", # class: 's1' String.Symbol: "#4e9a06", # class: 'ss' Generic: "#000000", # class: 'g' Generic.Deleted: "#a40000", # class: 'gd' Generic.Emph: "italic #000000", # class: 'ge' Generic.Error: "#ef2929", # class: 'gr' Generic.Heading: "bold #000080", # class: 'gh' Generic.Inserted: "#00A000", # class: 'gi' Generic.Output: "#888", # class: 'go' Generic.Prompt: "#745334", # class: 'gp' Generic.Strong: "bold #000000", # class: 'gs' Generic.Subheading: "bold #800080", # class: 'gu' Generic.Traceback: "bold #a40000", # class: 'gt' } jedi-0.15.2/docs/_themes/flask/0000775000175000017500000000000013577125145016062 5ustar davedave00000000000000jedi-0.15.2/docs/_themes/flask/layout.html0000664000175000017500000000164513577124112020264 0ustar davedave00000000000000{%- extends "basic/layout.html" %} {%- block extrahead %} {{ super() }} {% if theme_touch_icon %} {% endif %} Fork me on GitHub {% endblock %} {%- block relbar2 %}{% endblock %} {% block header %} {{ super() }} {% if pagename == 'index' %}
{% endif %} {% endblock %} {%- block footer %} {% if pagename == 'index' %}
{% endif %} {%- endblock %} jedi-0.15.2/docs/_themes/flask/LICENSE0000664000175000017500000000337513577124112017070 0ustar davedave00000000000000Copyright (c) 2010 by Armin Ronacher. Some rights reserved. Redistribution and use in source and binary forms of the theme, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission. We kindly ask you to only use these themes in an unmodified manner just for Flask and Flask-related products, not for unrelated projects. If you like the visual style and want to use it for your own projects, please consider making some larger changes to the themes (such as changing font faces, sizes, colors or margins). THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. jedi-0.15.2/docs/_themes/flask/theme.conf0000664000175000017500000000024213577124112020022 0ustar davedave00000000000000[theme] inherit = basic stylesheet = flasky.css pygments_style = flask_theme_support.FlaskyStyle [options] index_logo = index_logo_height = 120px touch_icon = jedi-0.15.2/docs/_themes/flask/static/0000775000175000017500000000000013577125145017351 5ustar davedave00000000000000jedi-0.15.2/docs/_themes/flask/static/flasky.css_t0000664000175000017500000001441313577124112021673 0ustar davedave00000000000000/* * flasky.css_t * ~~~~~~~~~~~~ * * :copyright: Copyright 2010 by Armin Ronacher. * :license: Flask Design License, see LICENSE for details. */ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} @import url("basic.css"); /* -- page layout ----------------------------------------------------------- */ body { font-family: 'Georgia', serif; font-size: 17px; background-color: white; color: #000; margin: 0; padding: 0; } div.document { width: {{ page_width }}; margin: 30px auto 0 auto; } div.documentwrapper { float: left; width: 100%; } div.bodywrapper { margin: 0 0 0 {{ sidebar_width }}; } div.sphinxsidebar { width: {{ sidebar_width }}; } hr { border: 1px solid #B1B4B6; } div.body { background-color: #ffffff; color: #3E4349; padding: 0 30px 0 30px; } img.floatingflask { padding: 0 0 10px 10px; float: right; } div.footer { width: {{ page_width }}; margin: 20px auto 30px auto; font-size: 14px; color: #888; text-align: right; } div.footer a { color: #888; } div.related { display: none; } div.sphinxsidebar a { color: #444; text-decoration: none; border-bottom: 1px dotted #999; } div.sphinxsidebar a:hover { border-bottom: 1px solid #999; } div.sphinxsidebar { font-size: 14px; line-height: 1.5; } div.sphinxsidebarwrapper { padding: 18px 10px; } div.sphinxsidebarwrapper p.logo { padding: 0 0 20px 0; margin: 0; text-align: center; } div.sphinxsidebar h3, div.sphinxsidebar h4 { font-family: 'Garamond', 'Georgia', serif; color: #444; font-size: 24px; font-weight: normal; margin: 0 0 5px 0; padding: 0; } div.sphinxsidebar h4 { font-size: 20px; } div.sphinxsidebar h3 a { color: #444; } div.sphinxsidebar p.logo a, div.sphinxsidebar h3 a, div.sphinxsidebar p.logo a:hover, div.sphinxsidebar h3 a:hover { border: none; } div.sphinxsidebar p { color: #555; margin: 10px 0; } div.sphinxsidebar ul { margin: 10px 0; padding: 0; color: #000; } div.sphinxsidebar input { border: 1px solid #ccc; font-family: 'Georgia', serif; font-size: 1em; } /* -- body styles ----------------------------------------------------------- */ a { color: #004B6B; text-decoration: underline; } a:hover { color: #6D4100; text-decoration: underline; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; margin: 30px 0px 10px 0px; padding: 0; } {% if theme_index_logo %} div.indexwrapper h1 { text-indent: -999999px; background: url({{ theme_index_logo }}) no-repeat center center; height: {{ theme_index_logo_height }}; } {% endif %} div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } div.body h2 { font-size: 180%; } div.body h3 { font-size: 150%; } div.body h4 { font-size: 130%; } div.body h5 { font-size: 100%; } div.body h6 { font-size: 100%; } a.headerlink { color: #ddd; padding: 0 4px; text-decoration: none; } a.headerlink:hover { color: #444; } div.body p, div.body dd, div.body li { line-height: 1.4em; } div.admonition { background: #fafafa; margin: 20px -30px; padding: 10px 30px; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; } div.admonition tt.xref, div.admonition a tt { border-bottom: 1px solid #fafafa; } dd div.admonition { margin-left: -60px; padding-left: 60px; } div.admonition p.admonition-title { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; font-size: 24px; margin: 0 0 10px 0; padding: 0; line-height: 1; } div.admonition p.last { margin-bottom: 0; } div.highlight { background-color: white; } dt:target, .highlight { background: #FAF3E8; } div.note { background-color: #eee; border: 1px solid #ccc; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } pre, tt { font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.9em; } img.screenshot { } tt.descname, tt.descclassname { font-size: 0.95em; } tt.descname { padding-right: 0.08em; } img.screenshot { -moz-box-shadow: 2px 2px 4px #eee; -webkit-box-shadow: 2px 2px 4px #eee; box-shadow: 2px 2px 4px #eee; } table.docutils { border: 1px solid #888; -moz-box-shadow: 2px 2px 4px #eee; -webkit-box-shadow: 2px 2px 4px #eee; box-shadow: 2px 2px 4px #eee; } table.docutils td, table.docutils th { border: 1px solid #888; padding: 0.25em 0.7em; } table.field-list, table.footnote { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } table.footnote { margin: 15px 0; width: 100%; border: 1px solid #eee; background: #fdfdfd; font-size: 0.9em; } table.footnote + table.footnote { margin-top: -15px; border-top: none; } table.field-list th { padding: 0 0.8em 0 0; } table.field-list td { padding: 0; } table.footnote td.label { width: 0px; padding: 0.3em 0 0.3em 0.5em; } table.footnote td { padding: 0.3em 0.5em; } dl { margin: 0; padding: 0; } dl dd { margin-left: 30px; } blockquote { margin: 0 0 0 30px; padding: 0; } ul, ol { margin: 10px 0 10px 30px; padding: 0; } pre { background: #eee; padding: 7px 30px; margin: 15px -30px; line-height: 1.3em; } dl pre, blockquote pre, li pre { margin-left: -60px; padding-left: 60px; } dl dl pre { margin-left: -90px; padding-left: 90px; } tt { background-color: #ecf0f3; color: #222; /* padding: 1px 2px; */ } tt.xref, a tt { background-color: #FBFBFB; border-bottom: 1px solid white; } a.reference { text-decoration: none; border-bottom: 1px dotted #004B6B; } a.reference:hover { border-bottom: 1px solid #6D4100; } a.footnote-reference { text-decoration: none; font-size: 0.7em; vertical-align: top; border-bottom: 1px dotted #004B6B; } a.footnote-reference:hover { border-bottom: 1px solid #6D4100; } a:hover tt { background: #EEE; } jedi-0.15.2/docs/_themes/flask/static/small_flask.css0000664000175000017500000000172013577124112022344 0ustar davedave00000000000000/* * small_flask.css_t * ~~~~~~~~~~~~~~~~~ * * :copyright: Copyright 2010 by Armin Ronacher. * :license: Flask Design License, see LICENSE for details. */ body { margin: 0; padding: 20px 30px; } div.documentwrapper { float: none; background: white; } div.sphinxsidebar { display: block; float: none; width: 102.5%; margin: 50px -30px -20px -30px; padding: 10px 20px; background: #333; color: white; } div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, div.sphinxsidebar h3 a { color: white; } div.sphinxsidebar a { color: #aaa; } div.sphinxsidebar p.logo { display: none; } div.document { width: 100%; margin: 0; } div.related { display: block; margin: 0; padding: 10px 0 20px 0; } div.related ul, div.related ul li { margin: 0; padding: 0; } div.footer { display: none; } div.bodywrapper { margin: 0; } div.body { min-height: 0; padding: 0; } jedi-0.15.2/docs/_themes/flask/relations.html0000664000175000017500000000111613577124112020740 0ustar davedave00000000000000

Related Topics

jedi-0.15.2/docs/_static/0000775000175000017500000000000013577125145014764 5ustar davedave00000000000000jedi-0.15.2/docs/_static/logo.png0000664000175000017500000007017313577124112016433 0ustar davedave00000000000000PNG  IHDR o AiCCPICC ProfileH wTSϽ7" %z ;HQIP&vDF)VdTG"cE b PQDE݌k 5ޚYg}׺PtX4X\XffGD=HƳ.d,P&s"7C$ E6<~&S2)212 "įl+ɘ&Y4Pޚ%ᣌ\%g|eTI(L0_&l2E9r9hxgIbטifSb1+MxL 0oE%YmhYh~S=zU&ϞAYl/$ZUm@O ޜl^ ' lsk.+7oʿ9V;?#I3eE妧KD d9i,UQ h A1vjpԁzN6p\W p G@ K0ށiABZyCAP8C@&*CP=#t] 4}a ٰ;GDxJ>,_“@FXDBX$!k"EHqaYbVabJ0՘cVL6f3bձX'?v 6-V``[a;p~\2n5׌ &x*sb|! ߏƿ' Zk! $l$T4QOt"y\b)AI&NI$R$)TIj"]&=&!:dGrY@^O$ _%?P(&OJEBN9J@y@yCR nXZOD}J}/G3ɭk{%Oחw_.'_!JQ@SVF=IEbbbb5Q%O@%!BӥyҸM:e0G7ӓ e%e[(R0`3R46i^)*n*|"fLUo՝mO0j&jajj.ϧwϝ_4갺zj=U45nɚ4ǴhZ ZZ^0Tf%9->ݫ=cXgN].[7A\SwBOK/X/_Q>QG[ `Aaac#*Z;8cq>[&IIMST`ϴ kh&45ǢYYF֠9<|y+ =X_,,S-,Y)YXmĚk]c}džjcΦ浭-v};]N"&1=xtv(}'{'IߝY) Σ -rqr.d._xpUەZM׍vm=+KGǔ ^WWbj>:>>>v}/avO8 FV> 2 u/_$\BCv< 5 ]s.,4&yUx~xw-bEDCĻHGKwFGEGME{EEKX,YFZ ={$vrK .3\rϮ_Yq*©L_wד+]eD]cIIIOAu_䩔)3ѩiB%a+]3='/40CiU@ёL(sYfLH$%Y jgGeQn~5f5wugv5k֮\۹Nw]m mHFˍenQQ`hBBQ-[lllfjۗ"^bO%ܒY}WwvwXbY^Ю]WVa[q`id2JjGէ{׿m>PkAma꺿g_DHGGu;776ƱqoC{P38!9 ҝˁ^r۽Ug9];}}_~imp㭎}]/}.{^=}^?z8hc' O*?f`ϳgC/Oϩ+FFGGόzˌㅿ)ѫ~wgbk?Jި9mdwi獵ޫ?cǑOO?w| x&mf2:Y~ pHYs  iTXtXML:com.adobe.xmp 1 5 72 1 72 200 1 226 2013-07-05T14:07:80 Pixelmator 2.2 '1s@IDATx} ]E-zIwgYȾB q\WG qAEtfQe}Ig{׷ߩ{_w^u[U:u9Uu.r]7y 5дyh^y PyA^-h -('k WAh.+Q>pUV||CN9^O%nr͇, 9"I\H?{vi*96d-p҉s+29Dîx`B?dۘm۱}hhQ /_/ <zSkq֒w,veYs/vQEڱn8": Nt$-C3eIláx83ܽ#GV|MqR;H%n^*(L"Q?;pR)g ! !8 0(J{#^g\w>МeA:/^~aH$FNKÀ]%PĜ)bd搙!B[*av$qѝoZɇk סp;)禴^JCwJje)!$LB0I I+\~EǪUY! y;>Ux̜?H;})#1nJ Q5wv/pȨsI v?.<oNaL0q+X5}D3J4r#BI4v(Q_g̺Ko+dtB/NHm… #[[\;)pxN灴*q5 -NxΥeK'- cQ[z,.HDCN]}N9k5u}AN@i,Y(lꑞp?~91o9*&/N!I *QNCXiWyUA㤒paՇl-vi R"7/a_3fR{gjȇ]k;m[ 2҇q Q?JV8R:7>aّ\|. ;V.1ȓԯ8F#L/ڡ,Ns9 ; Kbʎhq(8JKJwس),U^o8zLTV%L0ݸp|بx}[Km7TR: ZoHhF^ȐP:Շuc|-;a%g؎|h6= //H}&z 7NUUnz5Q|k̴i[_RF.:i cZ]ulF2vCHĊU8 Kͯ {͊xJyi%}޵XN\`q_t*W^ݹb7~}(q3kRRd~29*W,uY~[;}RݿpJ|kM`xݱc;ު][6] a=?w ?&EUUw֧*Ĺ%UAZaƞwʤTU[oUlnXNq-bzcEMTWDxWq<;kjҌbzf=pxUS{N WoH/wWGp+lӷݿ~SoFtyT=z9"+q n*yU1gϻvvI]GRAtwv/7o~}s- Tsp7,ZS=a\g6).))8VDq:ӇOס؂ [|qX#Xj뙐h(Wva±X!n~zú:ig_~milmǤ>dҥY*wXhK(YJ5K1>&=X6vqio1p}~{|)3h@/DT2m)w>hq2=U=]ۆ^uC5WuV =d`IZ#Fc9ppU_[;=ܷC.m rHc 9YĚ0guۛW֥P|yۨ{ԩ)3YM˯ȎED3[n\9]_7p9 `[x-xnjNf !0r˲cؽ0"Dë! \b>ZR:'qGQhн12a% #XG{ׁ ڋЀd{ @\8Fphj:(w`~$ڷ7OؘIޣ҂A0GYP4^ҶY#0BFbʫ'[cB* p_ٜ0m1[d .jϷ 8k?%^ Ϙ3l b?DOL$ H$Muzl&V)L<wx`/ Gwۨɟk*W9ȸsϛ떕 7 Vj7WŇ7BS 4+7 Aa3 m5]c-(+ԳS9%XtYI|ƨ0riƌmgO;Vhi -47rXFgԘ3f^iA&ѷҖ.3遆@s``&Bt9{ >rZ6VhJ eTrG;BkadE?DžgJzc}> nXh̿gAԄ2͂`UTu/:cp2~]s߄"/e G6er)= V&t#YB|ӱօ^,honX9𓟌[CN]('mz">xpxy|ڞ>b7HUƭo 1.?/]ڳvN{ê%91'u z48J:[{rO1c&B.ԣ& }PˤJ2t!3 pE_{EKTIb,S&5@? ^Q/A@guw-;{|ǶpfGW5+2&}4PelWTfmE}5@ [t=q?~mA_EH6,AO2Hұm̙_&wS=h'ۀiK|+XpVJx6& XLxƥhs$2EooMvA {*`ñyGg5x+!z*(Y_\jB>@LNe(L fxVxu̼yq;Ȥy[ֈr|6T[ t:/p| \/=ӓL ̶ț-%2&2jǁJ?׳Z<1Qerrۍf͟bÏ]o^!XG۔F삖el}:g:*nN;d_[]~ _?ⵇ@j2[b "3$oW})Xa=XTޯخ%wo n߁^.pftn.Nw\kE~ esph|t)MUVnXSe{U?2CUoJ4pRrT8;n1N+}qMnYf֦QLEld | ciZJ/$j>|>J;t#ܸ闿w,yYf\E= 'q*yrM:ZSu{utedU}D)]W?+RXnXMMaE >>`v$d:U2$;ٻϯZ92zD*5Oiۅ>S*ey@%)9;IpI3& ԰LҵK[93f_f=6:13D`Σ@P7#hB'M^'?x뭷ұmu[.3SOխ)6*p41 U8ȘyLLR?3AWd`t4'nxիlwp~?}'Z҇ޓӑ3f P( 7ALB'#( #fDo@6=8E0fN#2&)Q]XĶ_w/p=|<9RՈą=ĮM>ϾMKp r{W'ί):I(G@TK6Yiy}ͪ^v* *M04EAgh~U E0ު[wk5QMƜ1*7r:Wffai ɼ@m&ͼ(b*+Y':p3g5M e8Q"Vmϯ<:AO=kW#Ex1^U7oq>SNh_'ILF4F8PA ="`ݛ~9aƝvΈʐg3ӞS͒ZFJ1K8qKYef ~u:%b^>>ڽm۶;SD.2|*17c\՚MH7xiXnBA[a>Qyj?ϻ*OVw8o,\NjARH2J];zSGگ~(yvڅ/F08\>!fbQEI%Nj\mY߿;Tz4mڴ}[sŨ=,`륩,?,%e*b+~)|;)lxa|TI;%[vmYuyk?D'Fˡ>Ɯr_'9ϾrM펫r:DˑiO9I@)iHxsv4sPf|tihY&Kn]u%OQ[w!Y Y=Y5)It[iF szp[k1s/9J|ͿF4 'JI Du8t3ff-*x|WoxlSӧ݁S4ʤŸXa<C\SDTBTm4ڮ ¡ʟRٌG=C5_C#,cA$G‹w|V׬ ӦWH6oJYƥ L&ʈsOW8;ts˾[hj02)yJFK1|tJ|$ 'LIw~#;=:d@ҩau{tL Y<.3:y!8KZƲG]]g91CڬdS^8RS9Ɣ @t6t9uѐsSfٺfogAdN#MC1y0fL833eɺ2j:4li#8 `LD@%^^$"{ 07LNoc#=ܓ.) (.?vs6V̊~Υرt!FŘy )қYxȒHW帯<#r6y!:9$N4Id؁diLV v4|Œ3jBWHtӦ*#;ɼz3sPmo>WQQɪk?gr>Q'Xiÿp;[N~%;'n5cVƵَ7^~ve<|ڙӝX|dJJD2.ip e8Wu6?aji\8֍4q[|:[²o=|"i4M;DxI!c@3CHc݂:&,}J56#8fU N )cE_ŅrN~`GAY7Ï:|9Ȍ3qtZRA3 441.|0}vvO-{cMQűbMЎ9J!P;x%Ro_/3yو3'jS'.mݟvCKuC fuJм}yig79贷5 {j`<UÑ4v[ Mx/~:(vp%7 #6"1&c{k.(TCɫ?~֑'JFI :fHΗ ܆֯!@nSvզזXOh ʀrhǀxt~rG. ;AS}ʹx76Ӽi<<ĆuwwF:DǢJs]]4pti6*A§ >;S_O4|^` /M%:qt3yu0UA4|++ˍ'Ոm6Pq_"-Ӕ6xC8*jđF\I:X#vnCKuk՜[E۞A)CBXde ,waPGB{e]DxPqU$2 4ԋXD^!t N hE׵2^9Xd 6~$lvf(h)R֏xNvmJ4;G ΎS +]XX3ZaWM\@|TF]P%#6\bQx}Qlf(-)~o֋#U;p̙u:SOoxŠ7SvCUV+TnLbڕ{"_?͕St)C08!)t*a`>D CFY853w!05 NwsEK#DT?p[qC;ڊq $ieV ]pNwZV #njͮfe7{etճx%bȆ }DL"ȧRrPhW5Aˬy{ZF}'$mtxXv[rPxbVpیG3%t1FipiL{V l [ќ +[.OFc12^KL 6 ,Ih^h5@@GZQ#`J 54,bqޕ?wsD*: %.NfhK: knAbC`K04p ʧ =};,)EC8̒Er]J AgK/At+'\TRB;qd`@6X@po=-PQ'# A}5~s *hc: }㸴¨chGAC]C;*pW2dxO79hȼȠ/}T`̢^F'LQA NX8'"#?4ZMFX|,#z0HQc~Jc7+-Th[onSjKBPO YLAXU6mRY8xxRtD:>@NZ~R(/0Oƈ[Y# 6^Ջa0SBe3pnZ »XQR1B3bkCc$>6xj`aL|\<":H=ԭ~DvD=au}MqY]o؟E`f: FJ jDH=) mWίί_َ<읆 ƋiD "4&Ol$Q*db LWbDp~&U52+cp@V?P{N_rmp!)29_hTǍA) 0=ey tB*H?Q9-DC ڮxk"Ԉ:~LjQC^0QI~oxiw5moh: {/@C; ủꨰU> b0>m$݊*qźMxEy82PT꜁ʔ!!ksLX*!V}c쁧X44jN"i3J,viwHyGnS8HOsQlk){lg6>)3zmti39% 0oQ屒2uh"҇DVp,y2zb'n5+m )NGum a;r :BC][ ۍ9KAi{ ښNCO")L'Z@TrK 큉DF85s] ~ sfly|kXoѽ]zPȸXQA|8zheƧ$!KUt%sq|zyK>LuA>}q tBJtoYx\;l6s?#|qɂx>-zrPPU,!{wGK;W3R%t:O du+C ~ x* H(l&TF I O& a&LWR4seWEd7VΐSbɒ:1BݛX=:h˪RW/@ڣEWJYgitQF)a[4OE=_Q 4 ?s2uASV=wiEAg dy%+xp@m(Ov]8uŧz_`w ?jWk\>93%|Cb(yTYF)e!!A2IB%}%%ƓDJcVĀ[HQ*Qa~;yI6NH1,qڇ?7}M4yUh+v &&` 7nPߑć~ cTG0?Ah8I{ΣnT Mg`^ʃ'=:Ej> B61Uj{[ߠNȁ+p$| :۽=;A nY'jS]:-oFg9gpcbbTʬiC&vAM6֬L6uA]r%BN#[-;I:<@=ӫ-l2{6~Ӯy;ABl3>Cru=@ߡaÆ;\?M *% K!N2aA7:4JYN>ll_kQN_;b D[uٴN;UԩBo-{h$mk@U(~4yg#3fpSZN92kT @+hʤωDNm|*J|ÛDB@` %YeҞ$xfL1#:p*)㇟<|YLNx]&;3'" mgPqettrűA|hT*vԬDڒ1})  `)`eARP33J"jFpZPeHʫ:pV'LL+,CӟKCȑ"!Ѧgg6@EG-T"hҫO?1 h/7]YN]fs2>f`N5?iMyepB`ʘM 2Gq~_PiK(`ʫGa+:5#(KI@Ty0ATM:ܻI9w/p7h[ߙ9ұU0jpgs{/Ig ^^-؁u~)J/Zu~ &Og*aKX@,UsM͐g$t KSH'b1R $ 3H%iJ& (l4#K24^̳2 9^-,Z/^pO?|u;uͯlaג)^_PXP8ɗ\n+j靏7AC}تt>N-. D @ݿa3HTLz1&LFp, *cP1s(jq S7A7:P)By_rA 嬗} iܨѬbd p#o#naqɓn۰fӀw|FAY%]:ء=KHO1NGԤM +5cca4_Pu 7Z\֙A 2d}&@yq0p _x˙HՍ:|2:|麝_y/-sߎ7^mv]Q`ǺK <8үߨ{vO,?`bnx8%k1:%KO[v*@石 Sοx|2來mBe!FPb?Gv<%v vM۾.4*-X{)eeR;N.c G{{bKhX*0#*R1А/|(dRRVg +c+2I#e`!He5| ЇD>K r+5o Uq,TeM[=k I|bp¬"L %[xhaРz;Qx(:/k #-Tm~D04f dLzڧj}VywXW*jRN_xmъҨY#bU94\l /iIO$wu&K^lY`.1KU 4w,eo gAcVZoW!찆헎DB |JIhLQLIG"_rE,N<S$Pg$M«JM(GF*2W>#dTĜPg՚@gdѕ1Ih WIMO^ڽT2л! %<JFXK-zŏ/1))TB+=F'Ώwu{EաK}<;!yq觅^Fpy_hv&/0Wܦ.ʁiIi NI2&c$z ,k0p)j:Hޗ]}^ӧk`o6AH.iSpEjWaLSd?zyg'bC񋭪4n)R4-q*D4KQ~{F¼8K,1Aע%k P7cQ0Lt` L0!@O%Dy4јb &PV y -c I&=#iAp&/ HnԮd=x+Z6[l9NbPJeJuVPR4?*>Arb"4чX0U2@MG "Gȟ' d)J(,DJLe`@hx+NʨRš$"hJ`R0,"Eh<锢I 9CO (}-Zk^?SSF ݏOF1k17ZɌTG !<ҊXK'Lc^ټ eM'tM N8Ĵ_*$N`ZЊ N)rU Wе2WX$,Xk"&-f0*. Y5#QޱĊ%!hfv%*a(])xv, *CYAyFxIeLM^8ib6Rf,]ơJTyYXQMPZYȫL8~gSi< .!RA#eL2 &iuL{O(톶 -@9!g89qQމqQX{tTI f.UGiΈi(r0R0jc1iO=yH Lx,HEkx *PFB.@X$-T_D J9opLtcԴ5p14DqbpfPhGGVT,Qw;®] |S0 F` 1U8b>oM'ey"\Jx'YvǠY9L{y]BI1\%@ ~ę@1O$m{M`ڬ4glr?`U>^X1Z%)uH,~@w`wXo95ډueTopHҔbR6@wBS& ԴP||hZ4M ɌZjeDRX-B$kH᚟ƼȭdR'Rij9*荾4qAT錳Bx:{ .szJxfek[gJǛuHC1f V̬VJ)ؙ iPEYvp7PEN4d~@#Dpbe'OMBd·vɍB#v ?p%yO:HcNJY(@ذ$T90/"B/PqQgL3z%8%BNL$_%/DiHC[f5٥2OMU0Ӽ7h;!#,cHZYAY ?$5x~1߷;nG vSɭ5Ƿڿkoe2oиoV?z9E%7 ϘcO(ݴX >/yuP^ Lc""Ҽkp݁E3KZ Ӵ%܋'̯YԵnO(T쎜اpАanzLءu5ՓX'b|Әz*V씞hjh!xiKR(͟#Z`gb0EBML~MlrྗbNy4U_܋2|i3()ԎSQn7}!bFz͌ #V?L+"20i8bk&e19VnOȉV~k{q]pvp/Dcx3 4B!M!Щa^ #fa LJ$>ي;rYNt\xkP:<{*&$8EBrE*G':k-^}-,8P[k]u:&\E :{V8H6q IKʣ`BҺl ["e\Ymy غ曋wxLF˞s- afmsK%]@F#8 2IXJ@uG>מY>-3 IDAT\<> TWv$"m&51P$OʥOoZЃ4,NRNHbH|sIrK6jMV[[{~aςK/'B)7O(ǐ7Ncb`lM(0>bo}K,r?s}>N֟ΐ`{AfU[+,yg3noَПe#؍hV+*qm5|7:oO;_}߮xlyW;Pdۏ1h.Ahs\YL5b`,i ŊԀn,ӤN/u9䱣oPfH|[W}ֶVW+-+HnqQ련Wh %bg`J$R/߳魷˻3w~3.T_6J3ѫY_YV-Cࢗ83b|.G/Zs?J7atو%}MWh(-iS +Vliv[d[,ҎZV4RXXuՖV~$I%&m*@⋫}֔&0|z|bص6peI{L#k wO "J핁#YC?m6acNv &8QMnV-\6A :~\ho2/@Vmq׺YYFtlx5nY&`;r+"gEHmtsq^Ƹ\=}e]!1m-u52:___T X˸3B @IJ>yͪ-L 2lYCWـp9$c:0SxcE]8~؁_gпcf3U 2YuAxwsA4n}ϣy);Rq{ʅhS!36(/".krO᮵}ӣ|áT{|V-8౒T\hTN8꧞2.Q4zunM i /ϥoex8aA2NBhWIM88V }`9kVlʅ&匃p 'Kd@>䤝zI2ܰGCO?c(q8L8*~:,~kƢ<7u'o?_o}ߌQVm~~ūiP.ҖhQ )50<%Sʔ Pű}EpvoRQq4WZSB1V7Z)FwsfeCaԪz\:v3(:P)+NT\)Zţp ~wV=sE9rA/+b @ԍu%!ʮWs!dh"e&t)gs ގo`׈:'esAȷW=2~ 3.I[ҨK/Ph'I.ӻl땝?aEgl^9 /_;ÓĒs/F=U#keK-B)2Yg-'#,=H+f|h`G#O?gL"߷H3jZ/'dӣ_x4J;k޼a~0bb 0{2򪌂=gh t漡 cY+KY~ōšx 럅mrAURQ$ nLƸ&ds?\Aԭs1AG :#QކXeA3\cN=H:״e͐rӗ* m6|J1W6zBe G>KOa`M0ru "V?1v`Ĵ|Gδk.]}vvΐP>lO+p  ʹOrKG?wNP:Phdį~?0/V'= _mkCW/`Bi4HA^9*1}lU^9s*7`ʲdI:ST.ut CrA^{jd0.9d' U*Xt_{sǴ힏-CF~DV<[!Y35y‘Aa&LqM:[8GӠa_>[9dڕi!hdF!T';dv8vݟ}~;|nemO]q/A&C-6nԤlzq n>DUi#< ˓#`":[> 1hb>|֭}fSwO ^9Өq> ON|̙]"4x8_rC\tبLr^曹T~p7+[]m_jZF"*&ǘS|"~agbˊ]qZp) 2ż0ҳ*% DYO?t)7ץNYRj!Pe}*L{P}^^}~V=GO=Ab+TTUyOȨ9hdB8}:ag1miSp(`f#|1APq H)2LiqH_0I7Qy?S"O;&Hה1Bu~3R#e;%*{o6-wkU#QJ|`(_4~v"`g8ᴟV1ki[VR7TI( 8+ڵksr[׈j 6l8^eBJb4)ƾ߹KN[Z=.^>|”+:;n*CϠ)#ʬcpp}'A+öC?Xpq;:kפMZWЮC_RSCȮAz8nXd=֮%le84(`Ą#ө4|5c+ij4ѡ:i77xĄ?q+(lcF^p|)#iN/j':gS7m\'XYb#Ξx w1۷NC xKxa8zr5\zP!c'.JD Mvt;#2?¦6iɛNa%[u葻/ٶ^ t4?Py4 "6زS)peL; +|A2}v:j" >j ALnJYUim*n"{PwL/9qG/ Ht5.>²HsO’ _0 t?~}3xәT~!M3yCtQСN2?fE/|mJY9w~"b(l_I1y Pzr@L %{5Ʊ w=] lpU;''Vc`=oAbT}eQ07pG %kSDⅿ1kol.&'{d't jfylD}4.uw qۯ,oB?炩 :\t]f qeHNbP0,(~Yౢʋ:ʺ6ai mE"cU)"l\bP+/ iZ+\ھ;7,PS'kR)#nĞ"ѳ0 ZH;b .ݺ-^=0+z:SՎ5IL\:-!u kIH=}`9~hyվ}L_Owո}  Vp|y|CLkF3IedYæQүŵU Be܇E) g 8g:L{2Np +@',SCqCMT]s3xg܂HsIhM,QG@*fj+Sc{#ȡIX}4jyGl/j2E6J%km>}&xR}s38L$`U$~`xq|eӔ4RzxG?:G>I7*vU+,RyUᒋ^tt"PQ~Y!7= lLmXi K&ק9mz #TMHa񫉣G r*S}  e[!8x9!=a0hcGܱeK`l8=?Z1]6ױ#WG cY1ފ>g<iTcg:qp$r±G1RzN=̡%O G f+gdb.1qTf]C MXu0k)oTxljH']\/;zdG-d2vةoWփR>gႁI$LR% ,|SN&b&Ad>eϦdYs?w퇃{[;HæYVIh ;:/Jӓap4f$Ƃ_^ GDɺ]^?{ײxzwѣGg/RTVvjر$֑Cbe K"bXaXDbEE>&sF DcҸK,SV9R:xڃwm1e{?eԜ;<}܁%Kmn.t}(ydkjpjj&T3OO8VRH9\UL+tʻm\_>vk}Yi]5up3ut 7`AoEѳNhEW^|'>q٠A;iyhtx3u~^sM՟N1g$M>3d諿Y G~ଏ}n*LYnŮ|pCyԬw' χڥf@^h (&k;HhAyiA9yT^y@^-h -('k yk Qy $oy <*m 4wG5i* y@ rx M[0|l~/ 1nSl|iOv| Dݕ$@T4AVhZ[UhB `W|ꙁ@SB4m0Hf%v'7p±ƹq`ZtOtE-hF ,GCv`'"uT>Βe8F8gq<682ĝזR8К~gGp< G48[mpztyMjp\$I;I43-ppkV:'yp" ]us7 HCll?6!ppn1weMtyi_o>cy}E ًW6Jƥֳf{IlgoWV;y-e8>F,Ʊ #yiF8ɽh_}_w9h.h]#;HҶ7N"?#J)n*|^;Hֶ7 N׆ȣ.m"H{}kb/nס뺴 ,8.lzs_N[m $yi_?2gy~i 4h[CKm#maIӞwAdRo4HiAO}=vVQs;+9Ӧ JKBI瀸]&B~eVξA| y9iM mLҿG[u '՝l[fym%Ьk]"2N ?h1$whˠ|MxC sX|-ݽ-뵨st\qs_<9KUМ(:G6}:P_[l-$@p=tOֆԝtt\??Gl֞Z,ѐcryr0זGSUfd8^m ߇JrA/ᘍ/F4.FD-@K4RR/N},|r+nkw8~:8nk*4d}G)z/ΰ-؇;V$X=@vn)_J >nA猃[z*`4Zs߃̏mF}pk '$|sL 09&^^Wy^kq S!IENDB`jedi-0.15.2/docs/_static/logo-src.txt0000664000175000017500000000017213577124112017243 0ustar davedave00000000000000The source of the logo is a photoshop file hosted here: https://dl.dropboxusercontent.com/u/170011615/Jedi12_Logo.psd.xz jedi-0.15.2/docs/README.md0000664000175000017500000000035713577124112014613 0ustar davedave00000000000000Installation ------------ Install the graphviz library:: sudo apt-get install graphviz Install sphinx:: sudo pip install sphinx You might also need to install the Python graphviz interface:: sudo pip install graphviz jedi-0.15.2/docs/global.rst0000664000175000017500000000004513577124112015320 0ustar davedave00000000000000:orphan: .. |jedi| replace:: *Jedi* jedi-0.15.2/LICENSE.txt0000664000175000017500000000233113577124112014221 0ustar davedave00000000000000All contributions towards Jedi are MIT licensed. ------------------------------------------------------------------------------- The MIT License (MIT) Copyright (c) <2013> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jedi-0.15.2/.coveragerc0000664000175000017500000000047713577124112014530 0ustar davedave00000000000000[run] omit = jedi/_compatibility.py jedi/inference/compiled/subprocess/__main__.py jedi/__main__.py # For now this is not being used. jedi/refactoring.py [report] # Regexes for lines to exclude from consideration exclude_lines = # Don't complain about missing debug-only code: def __repr__ jedi-0.15.2/README.rst0000664000175000017500000001774413577124112014103 0ustar davedave00000000000000################################################################### Jedi - an awesome autocompletion/static analysis library for Python ################################################################### .. image:: https://img.shields.io/pypi/v/jedi.svg?style=flat :target: https://pypi.python.org/pypi/jedi :alt: PyPI version .. image:: https://img.shields.io/pypi/pyversions/jedi.svg :target: https://pypi.python.org/pypi/jedi :alt: Supported Python versions .. image:: https://travis-ci.org/davidhalter/jedi.svg?branch=master :target: https://travis-ci.org/davidhalter/jedi :alt: Linux Tests .. image:: https://ci.appveyor.com/api/projects/status/mgva3bbawyma1new/branch/master?svg=true :target: https://ci.appveyor.com/project/davidhalter/jedi/branch/master :alt: Windows Tests .. image:: https://coveralls.io/repos/davidhalter/jedi/badge.svg?branch=master :target: https://coveralls.io/r/davidhalter/jedi :alt: Coverage status *If you have specific questions, please add an issue or ask on* `Stack Overflow `_ *with the label* ``python-jedi``. Jedi is a static analysis tool for Python that can be used in IDEs/editors. Jedi has a focus on autocompletion and goto functionality. Jedi is fast and is very well tested. It understands Python and stubs on a deep level. Jedi has support for different goto functions. It's possible to search for usages and list names in a Python file to get information about them. Jedi uses a very simple API to connect with IDE's. There's a reference implementation as a `VIM-Plugin `_, which uses Jedi's autocompletion. We encourage you to use Jedi in your IDEs. Autocompletion in your REPL is also possible, IPython uses it natively and for the CPython REPL you have to install it. Jedi can currently be used with the following editors/projects: - Vim (jedi-vim_, YouCompleteMe_, deoplete-jedi_, completor.vim_) - Emacs (Jedi.el_, company-mode_, elpy_, anaconda-mode_, ycmd_) - Sublime Text (SublimeJEDI_ [ST2 + ST3], anaconda_ [only ST3]) - TextMate_ (Not sure if it's actually working) - Kate_ version 4.13+ supports it natively, you have to enable it, though. [`proof `_] - Atom_ (autocomplete-python-jedi_) - `GNOME Builder`_ (with support for GObject Introspection) - `Visual Studio Code`_ (via `Python Extension `_) - Gedit (gedi_) - wdb_ - Web Debugger - `Eric IDE`_ (Available as a plugin) - `IPython 6.0.0+ `_ and many more! Here are some pictures taken from jedi-vim_: .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_complete.png Completion for almost anything (Ctrl+Space). .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_function.png Display of function/class bodies, docstrings. .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_pydoc.png Pydoc support (Shift+k). There is also support for goto and renaming. Get the latest version from `github `_ (master branch should always be kind of stable/working). Docs are available at `https://jedi.readthedocs.org/en/latest/ `_. Pull requests with documentation enhancements and/or fixes are awesome and most welcome. Jedi uses `semantic versioning `_. If you want to stay up-to-date (News / RFCs), please subscribe to this `github thread `_.: Installation ============ pip install jedi Note: This just installs the Jedi library, not the editor plugins. For information about how to make it work with your editor, refer to the corresponding documentation. You don't want to use ``pip``? Please refer to the `manual `_. Feature Support and Caveats =========================== Jedi really understands your Python code. For a comprehensive list what Jedi understands, see: `Features `_. A list of caveats can be found on the same page. You can run Jedi on CPython 2.7 or 3.4+ but it should also understand/parse code older than those versions. Additionally you should be able to use `Virtualenvs `_ very well. Tips on how to use Jedi efficiently can be found `here `_. API --- You can find the documentation for the `API here `_. Autocompletion / Goto / Pydoc ----------------------------- Please check the API for a good explanation. There are the following commands: - ``jedi.Script.goto_assignments`` - ``jedi.Script.completions`` - ``jedi.Script.usages`` The returned objects are very powerful and really all you might need. Autocompletion in your REPL (IPython, etc.) ------------------------------------------- Starting with IPython `6.0.0` Jedi is a dependency of IPython. Autocompletion in IPython is therefore possible without additional configuration. It's possible to have Jedi autocompletion in REPL modes - `example video `_. This means that in Python you can enable tab completion in a `REPL `_. Static Analysis ------------------------ To do all forms of static analysis, please try to use ``jedi.names``. It will return a list of names that you can use to infer types and so on. Refactoring ----------- Jedi's parser would support refactoring, but there's no API to use it right now. If you're interested in helping out here, let me know. With the latest parser changes, it should be very easy to actually make it work. Development =========== There's a pretty good and extensive `development documentation `_. Testing ======= The test suite depends on ``tox`` and ``pytest``:: pip install tox pytest To run the tests for all supported Python versions:: tox If you want to test only a specific Python version (e.g. Python 2.7), it's as easy as :: tox -e py27 Tests are also run automatically on `Travis CI `_. For more detailed information visit the `testing documentation `_. Acknowledgements ================ - Takafumi Arakaki (@tkf) for creating a solid test environment and a lot of other things. - Danilo Bargen (@dbrgn) for general housekeeping and being a good friend :). - Guido van Rossum (@gvanrossum) for creating the parser generator pgen2 (originally used in lib2to3). .. _jedi-vim: https://github.com/davidhalter/jedi-vim .. _youcompleteme: https://github.com/ycm-core/YouCompleteMe .. _deoplete-jedi: https://github.com/zchee/deoplete-jedi .. _completor.vim: https://github.com/maralla/completor.vim .. _Jedi.el: https://github.com/tkf/emacs-jedi .. _company-mode: https://github.com/syohex/emacs-company-jedi .. _elpy: https://github.com/jorgenschaefer/elpy .. _anaconda-mode: https://github.com/proofit404/anaconda-mode .. _ycmd: https://github.com/abingham/emacs-ycmd .. _sublimejedi: https://github.com/srusskih/SublimeJEDI .. _anaconda: https://github.com/DamnWidget/anaconda .. _wdb: https://github.com/Kozea/wdb .. _TextMate: https://github.com/lawrenceakka/python-jedi.tmbundle .. _Kate: https://kate-editor.org .. _Atom: https://atom.io/ .. _autocomplete-python-jedi: https://atom.io/packages/autocomplete-python-jedi .. _GNOME Builder: https://wiki.gnome.org/Apps/Builder .. _Visual Studio Code: https://code.visualstudio.com/ .. _gedi: https://github.com/isamert/gedi .. _Eric IDE: https://eric-ide.python-projects.org jedi-0.15.2/MANIFEST.in0000664000175000017500000000066513577124112014144 0ustar davedave00000000000000include README.rst include CHANGELOG.rst include LICENSE.txt include AUTHORS.txt include .coveragerc include sith.py include conftest.py include pytest.ini include tox.ini include requirements.txt include jedi/parser/python/grammar*.txt recursive-include jedi/third_party *.pyi include jedi/third_party/typeshed/LICENSE include jedi/third_party/typeshed/README recursive-include test * recursive-include docs * recursive-exclude * *.pyc jedi-0.15.2/CHANGELOG.rst0000664000175000017500000001404213577124112014421 0ustar davedave00000000000000.. :changelog: Changelog --------- 0.15.2 (2019-12-20) +++++++++++++++++++ - Call signatures are now detected a lot better - Add fuzzy completions with ``Script(...).completions(fuzzy=True)`` - Files bigger than one MB (about 20kLOC) get cropped to avoid getting stuck completely. - Many small Bugfixes - A big refactoring around contexts/values 0.15.1 (2019-08-13) +++++++++++++++++++ - Small bugfix and removal of a print statement 0.15.0 (2019-08-11) +++++++++++++++++++ - Added file path completions, there's a **new** ``Completion.type`` now: ``path``. Example: ``'/ho`` -> ``'/home/`` - ``*args``/``**kwargs`` resolving. If possible Jedi replaces the parameters with the actual alternatives. - Better support for enums/dataclasses - When using Interpreter, properties are now executed, since a lot of people have complained about this. Discussion in #1299, #1347. New APIs: - ``Definition.get_signatures() -> List[Signature]``. Signatures are similar to ``CallSignature``. ``Definition.params`` is therefore deprecated. - ``Signature.to_string()`` to format call signatures. - ``Signature.params -> List[ParamDefinition]``, ParamDefinition has the following additional attributes ``infer_default()``, ``infer_annotation()``, ``to_string()``, and ``kind``. - ``Definition.execute() -> List[Definition]``, makes it possible to infer return values of functions. 0.14.1 (2019-07-13) +++++++++++++++++++ - CallSignature.index should now be working a lot better - A couple of smaller bugfixes 0.14.0 (2019-06-20) +++++++++++++++++++ - Added ``goto_*(prefer_stubs=True)`` as well as ``goto_*(prefer_stubs=True)`` - Stubs are used now for type inference - Typeshed is used for better type inference - Reworked Definition.full_name, should have more correct return values 0.13.3 (2019-02-24) +++++++++++++++++++ - Fixed an issue with embedded Python, see https://github.com/davidhalter/jedi-vim/issues/870 0.13.2 (2018-12-15) +++++++++++++++++++ - Fixed a bug that led to Jedi spawning a lot of subprocesses. 0.13.1 (2018-10-02) +++++++++++++++++++ - Bugfixes, because tensorflow completions were still slow. 0.13.0 (2018-10-02) +++++++++++++++++++ - A small release. Some bug fixes. - Remove Python 3.3 support. Python 3.3 support has been dropped by the Python foundation. - Default environments are now using the same Python version as the Python process. In 0.12.x, we used to load the latest Python version on the system. - Added ``include_builtins`` as a parameter to usages. - ``goto_assignments`` has a new ``follow_builtin_imports`` parameter that changes the previous behavior slightly. 0.12.1 (2018-06-30) +++++++++++++++++++ - This release forces you to upgrade parso. If you don't, nothing will work anymore. Otherwise changes should be limited to bug fixes. Unfortunately Jedi still uses a few internals of parso that make it hard to keep compatibility over multiple releases. Parso >=0.3.0 is going to be needed. 0.12.0 (2018-04-15) +++++++++++++++++++ - Virtualenv/Environment support - F-String Completion/Goto Support - Cannot crash with segfaults anymore - Cleaned up import logic - Understand async/await and autocomplete it (including async generators) - Better namespace completions - Passing tests for Windows (including CI for Windows) - Remove Python 2.6 support 0.11.1 (2017-12-14) +++++++++++++++++++ - Parso update - the caching layer was broken - Better usages - a lot of internal code was ripped out and improved. 0.11.0 (2017-09-20) +++++++++++++++++++ - Split Jedi's parser into a separate project called ``parso``. - Avoiding side effects in REPL completion. - Numpy docstring support should be much better. - Moved the `settings.*recursion*` away, they are no longer usable. 0.10.2 (2017-04-05) +++++++++++++++++++ - Python Packaging sucks. Some files were not included in 0.10.1. 0.10.1 (2017-04-05) +++++++++++++++++++ - Fixed a few very annoying bugs. - Prepared the parser to be factored out of Jedi. 0.10.0 (2017-02-03) +++++++++++++++++++ - Actual semantic completions for the complete Python syntax. - Basic type inference for ``yield from`` PEP 380. - PEP 484 support (most of the important features of it). Thanks Claude! (@reinhrst) - Added ``get_line_code`` to ``Definition`` and ``Completion`` objects. - Completely rewritten the type inference engine. - A new and better parser for (fast) parsing diffs of Python code. 0.9.0 (2015-04-10) ++++++++++++++++++ - The import logic has been rewritten to look more like Python's. There is now an ``InferState.modules`` import cache, which resembles ``sys.modules``. - Integrated the parser of 2to3. This will make refactoring possible. It will also be possible to check for error messages (like compiling an AST would give) in the future. - With the new parser, the type inference also completely changed. It's now simpler and more readable. - Completely rewritten REPL completion. - Added ``jedi.names``, a command to do static analysis. Thanks to that sourcegraph guys for sponsoring this! - Alpha version of the linter. 0.8.1 (2014-07-23) +++++++++++++++++++ - Bugfix release, the last release forgot to include files that improve autocompletion for builtin libraries. Fixed. 0.8.0 (2014-05-05) +++++++++++++++++++ - Memory Consumption for compiled modules (e.g. builtins, sys) has been reduced drastically. Loading times are down as well (it takes basically as long as an import). - REPL completion is starting to become usable. - Various small API changes. Generally this release focuses on stability and refactoring of internal APIs. - Introducing operator precedence, which makes calculating correct Array indices and ``__getattr__`` strings possible. 0.7.0 (2013-08-09) ++++++++++++++++++ - Switched from LGPL to MIT license. - Added an Interpreter class to the API to make autocompletion in REPL possible. - Added autocompletion support for namespace packages. - Add sith.py, a new random testing method. 0.6.0 (2013-05-14) ++++++++++++++++++ - Much faster parser with builtin part caching. - A test suite, thanks @tkf. 0.5 versions (2012) +++++++++++++++++++ - Initial development. jedi-0.15.2/setup.py0000775000175000017500000000515513577124112014122 0ustar davedave00000000000000#!/usr/bin/env python from setuptools import setup, find_packages import os import ast __AUTHOR__ = 'David Halter' __AUTHOR_EMAIL__ = 'davidhalter88@gmail.com' # Get the version from within jedi. It's defined in exactly one place now. with open('jedi/__init__.py') as f: tree = ast.parse(f.read()) version = tree.body[int(not hasattr(tree, 'docstring'))].value.s readme = open('README.rst').read() + '\n\n' + open('CHANGELOG.rst').read() with open('requirements.txt') as f: install_requires = f.read().splitlines() assert os.path.isfile("jedi/third_party/typeshed/LICENSE"), \ "Please download the typeshed submodule first (Hint: git submodule update --init)" setup(name='jedi', version=version, description='An autocompletion tool for Python that can be used for text editors.', author=__AUTHOR__, author_email=__AUTHOR_EMAIL__, include_package_data=True, maintainer=__AUTHOR__, maintainer_email=__AUTHOR_EMAIL__, url='https://github.com/davidhalter/jedi', license='MIT', keywords='python completion refactoring vim', long_description=readme, packages=find_packages(exclude=['test', 'test.*']), python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', install_requires=install_requires, extras_require={ 'testing': [ # Pytest 5 doesn't support Python 2 and Python 3.4 anymore. 'pytest>=3.9.0,<5.0.0', # docopt for sith doctests 'docopt', # coloroma for colored debug output 'colorama==0.4.1', # Pinned so it works for Python 3.4 ], }, package_data={'jedi': ['*.pyi', 'third_party/typeshed/LICENSE', 'third_party/typeshed/README']}, platforms=['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Plugins', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Editors :: Integrated Development Environments (IDE)', 'Topic :: Utilities', ], ) jedi-0.15.2/jedi.egg-info/0000775000175000017500000000000013577125145015013 5ustar davedave00000000000000jedi-0.15.2/jedi.egg-info/PKG-INFO0000664000175000017500000004501313577125145016113 0ustar davedave00000000000000Metadata-Version: 2.1 Name: jedi Version: 0.15.2 Summary: An autocompletion tool for Python that can be used for text editors. Home-page: https://github.com/davidhalter/jedi Author: David Halter Author-email: davidhalter88@gmail.com Maintainer: David Halter Maintainer-email: davidhalter88@gmail.com License: MIT Description: ################################################################### Jedi - an awesome autocompletion/static analysis library for Python ################################################################### .. image:: https://img.shields.io/pypi/v/jedi.svg?style=flat :target: https://pypi.python.org/pypi/jedi :alt: PyPI version .. image:: https://img.shields.io/pypi/pyversions/jedi.svg :target: https://pypi.python.org/pypi/jedi :alt: Supported Python versions .. image:: https://travis-ci.org/davidhalter/jedi.svg?branch=master :target: https://travis-ci.org/davidhalter/jedi :alt: Linux Tests .. image:: https://ci.appveyor.com/api/projects/status/mgva3bbawyma1new/branch/master?svg=true :target: https://ci.appveyor.com/project/davidhalter/jedi/branch/master :alt: Windows Tests .. image:: https://coveralls.io/repos/davidhalter/jedi/badge.svg?branch=master :target: https://coveralls.io/r/davidhalter/jedi :alt: Coverage status *If you have specific questions, please add an issue or ask on* `Stack Overflow `_ *with the label* ``python-jedi``. Jedi is a static analysis tool for Python that can be used in IDEs/editors. Jedi has a focus on autocompletion and goto functionality. Jedi is fast and is very well tested. It understands Python and stubs on a deep level. Jedi has support for different goto functions. It's possible to search for usages and list names in a Python file to get information about them. Jedi uses a very simple API to connect with IDE's. There's a reference implementation as a `VIM-Plugin `_, which uses Jedi's autocompletion. We encourage you to use Jedi in your IDEs. Autocompletion in your REPL is also possible, IPython uses it natively and for the CPython REPL you have to install it. Jedi can currently be used with the following editors/projects: - Vim (jedi-vim_, YouCompleteMe_, deoplete-jedi_, completor.vim_) - Emacs (Jedi.el_, company-mode_, elpy_, anaconda-mode_, ycmd_) - Sublime Text (SublimeJEDI_ [ST2 + ST3], anaconda_ [only ST3]) - TextMate_ (Not sure if it's actually working) - Kate_ version 4.13+ supports it natively, you have to enable it, though. [`proof `_] - Atom_ (autocomplete-python-jedi_) - `GNOME Builder`_ (with support for GObject Introspection) - `Visual Studio Code`_ (via `Python Extension `_) - Gedit (gedi_) - wdb_ - Web Debugger - `Eric IDE`_ (Available as a plugin) - `IPython 6.0.0+ `_ and many more! Here are some pictures taken from jedi-vim_: .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_complete.png Completion for almost anything (Ctrl+Space). .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_function.png Display of function/class bodies, docstrings. .. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_pydoc.png Pydoc support (Shift+k). There is also support for goto and renaming. Get the latest version from `github `_ (master branch should always be kind of stable/working). Docs are available at `https://jedi.readthedocs.org/en/latest/ `_. Pull requests with documentation enhancements and/or fixes are awesome and most welcome. Jedi uses `semantic versioning `_. If you want to stay up-to-date (News / RFCs), please subscribe to this `github thread `_.: Installation ============ pip install jedi Note: This just installs the Jedi library, not the editor plugins. For information about how to make it work with your editor, refer to the corresponding documentation. You don't want to use ``pip``? Please refer to the `manual `_. Feature Support and Caveats =========================== Jedi really understands your Python code. For a comprehensive list what Jedi understands, see: `Features `_. A list of caveats can be found on the same page. You can run Jedi on CPython 2.7 or 3.4+ but it should also understand/parse code older than those versions. Additionally you should be able to use `Virtualenvs `_ very well. Tips on how to use Jedi efficiently can be found `here `_. API --- You can find the documentation for the `API here `_. Autocompletion / Goto / Pydoc ----------------------------- Please check the API for a good explanation. There are the following commands: - ``jedi.Script.goto_assignments`` - ``jedi.Script.completions`` - ``jedi.Script.usages`` The returned objects are very powerful and really all you might need. Autocompletion in your REPL (IPython, etc.) ------------------------------------------- Starting with IPython `6.0.0` Jedi is a dependency of IPython. Autocompletion in IPython is therefore possible without additional configuration. It's possible to have Jedi autocompletion in REPL modes - `example video `_. This means that in Python you can enable tab completion in a `REPL `_. Static Analysis ------------------------ To do all forms of static analysis, please try to use ``jedi.names``. It will return a list of names that you can use to infer types and so on. Refactoring ----------- Jedi's parser would support refactoring, but there's no API to use it right now. If you're interested in helping out here, let me know. With the latest parser changes, it should be very easy to actually make it work. Development =========== There's a pretty good and extensive `development documentation `_. Testing ======= The test suite depends on ``tox`` and ``pytest``:: pip install tox pytest To run the tests for all supported Python versions:: tox If you want to test only a specific Python version (e.g. Python 2.7), it's as easy as :: tox -e py27 Tests are also run automatically on `Travis CI `_. For more detailed information visit the `testing documentation `_. Acknowledgements ================ - Takafumi Arakaki (@tkf) for creating a solid test environment and a lot of other things. - Danilo Bargen (@dbrgn) for general housekeeping and being a good friend :). - Guido van Rossum (@gvanrossum) for creating the parser generator pgen2 (originally used in lib2to3). .. _jedi-vim: https://github.com/davidhalter/jedi-vim .. _youcompleteme: https://github.com/ycm-core/YouCompleteMe .. _deoplete-jedi: https://github.com/zchee/deoplete-jedi .. _completor.vim: https://github.com/maralla/completor.vim .. _Jedi.el: https://github.com/tkf/emacs-jedi .. _company-mode: https://github.com/syohex/emacs-company-jedi .. _elpy: https://github.com/jorgenschaefer/elpy .. _anaconda-mode: https://github.com/proofit404/anaconda-mode .. _ycmd: https://github.com/abingham/emacs-ycmd .. _sublimejedi: https://github.com/srusskih/SublimeJEDI .. _anaconda: https://github.com/DamnWidget/anaconda .. _wdb: https://github.com/Kozea/wdb .. _TextMate: https://github.com/lawrenceakka/python-jedi.tmbundle .. _Kate: https://kate-editor.org .. _Atom: https://atom.io/ .. _autocomplete-python-jedi: https://atom.io/packages/autocomplete-python-jedi .. _GNOME Builder: https://wiki.gnome.org/Apps/Builder .. _Visual Studio Code: https://code.visualstudio.com/ .. _gedi: https://github.com/isamert/gedi .. _Eric IDE: https://eric-ide.python-projects.org .. :changelog: Changelog --------- 0.15.2 (2019-12-20) +++++++++++++++++++ - Call signatures are now detected a lot better - Add fuzzy completions with ``Script(...).completions(fuzzy=True)`` - Files bigger than one MB (about 20kLOC) get cropped to avoid getting stuck completely. - Many small Bugfixes - A big refactoring around contexts/values 0.15.1 (2019-08-13) +++++++++++++++++++ - Small bugfix and removal of a print statement 0.15.0 (2019-08-11) +++++++++++++++++++ - Added file path completions, there's a **new** ``Completion.type`` now: ``path``. Example: ``'/ho`` -> ``'/home/`` - ``*args``/``**kwargs`` resolving. If possible Jedi replaces the parameters with the actual alternatives. - Better support for enums/dataclasses - When using Interpreter, properties are now executed, since a lot of people have complained about this. Discussion in #1299, #1347. New APIs: - ``Definition.get_signatures() -> List[Signature]``. Signatures are similar to ``CallSignature``. ``Definition.params`` is therefore deprecated. - ``Signature.to_string()`` to format call signatures. - ``Signature.params -> List[ParamDefinition]``, ParamDefinition has the following additional attributes ``infer_default()``, ``infer_annotation()``, ``to_string()``, and ``kind``. - ``Definition.execute() -> List[Definition]``, makes it possible to infer return values of functions. 0.14.1 (2019-07-13) +++++++++++++++++++ - CallSignature.index should now be working a lot better - A couple of smaller bugfixes 0.14.0 (2019-06-20) +++++++++++++++++++ - Added ``goto_*(prefer_stubs=True)`` as well as ``goto_*(prefer_stubs=True)`` - Stubs are used now for type inference - Typeshed is used for better type inference - Reworked Definition.full_name, should have more correct return values 0.13.3 (2019-02-24) +++++++++++++++++++ - Fixed an issue with embedded Python, see https://github.com/davidhalter/jedi-vim/issues/870 0.13.2 (2018-12-15) +++++++++++++++++++ - Fixed a bug that led to Jedi spawning a lot of subprocesses. 0.13.1 (2018-10-02) +++++++++++++++++++ - Bugfixes, because tensorflow completions were still slow. 0.13.0 (2018-10-02) +++++++++++++++++++ - A small release. Some bug fixes. - Remove Python 3.3 support. Python 3.3 support has been dropped by the Python foundation. - Default environments are now using the same Python version as the Python process. In 0.12.x, we used to load the latest Python version on the system. - Added ``include_builtins`` as a parameter to usages. - ``goto_assignments`` has a new ``follow_builtin_imports`` parameter that changes the previous behavior slightly. 0.12.1 (2018-06-30) +++++++++++++++++++ - This release forces you to upgrade parso. If you don't, nothing will work anymore. Otherwise changes should be limited to bug fixes. Unfortunately Jedi still uses a few internals of parso that make it hard to keep compatibility over multiple releases. Parso >=0.3.0 is going to be needed. 0.12.0 (2018-04-15) +++++++++++++++++++ - Virtualenv/Environment support - F-String Completion/Goto Support - Cannot crash with segfaults anymore - Cleaned up import logic - Understand async/await and autocomplete it (including async generators) - Better namespace completions - Passing tests for Windows (including CI for Windows) - Remove Python 2.6 support 0.11.1 (2017-12-14) +++++++++++++++++++ - Parso update - the caching layer was broken - Better usages - a lot of internal code was ripped out and improved. 0.11.0 (2017-09-20) +++++++++++++++++++ - Split Jedi's parser into a separate project called ``parso``. - Avoiding side effects in REPL completion. - Numpy docstring support should be much better. - Moved the `settings.*recursion*` away, they are no longer usable. 0.10.2 (2017-04-05) +++++++++++++++++++ - Python Packaging sucks. Some files were not included in 0.10.1. 0.10.1 (2017-04-05) +++++++++++++++++++ - Fixed a few very annoying bugs. - Prepared the parser to be factored out of Jedi. 0.10.0 (2017-02-03) +++++++++++++++++++ - Actual semantic completions for the complete Python syntax. - Basic type inference for ``yield from`` PEP 380. - PEP 484 support (most of the important features of it). Thanks Claude! (@reinhrst) - Added ``get_line_code`` to ``Definition`` and ``Completion`` objects. - Completely rewritten the type inference engine. - A new and better parser for (fast) parsing diffs of Python code. 0.9.0 (2015-04-10) ++++++++++++++++++ - The import logic has been rewritten to look more like Python's. There is now an ``InferState.modules`` import cache, which resembles ``sys.modules``. - Integrated the parser of 2to3. This will make refactoring possible. It will also be possible to check for error messages (like compiling an AST would give) in the future. - With the new parser, the type inference also completely changed. It's now simpler and more readable. - Completely rewritten REPL completion. - Added ``jedi.names``, a command to do static analysis. Thanks to that sourcegraph guys for sponsoring this! - Alpha version of the linter. 0.8.1 (2014-07-23) +++++++++++++++++++ - Bugfix release, the last release forgot to include files that improve autocompletion for builtin libraries. Fixed. 0.8.0 (2014-05-05) +++++++++++++++++++ - Memory Consumption for compiled modules (e.g. builtins, sys) has been reduced drastically. Loading times are down as well (it takes basically as long as an import). - REPL completion is starting to become usable. - Various small API changes. Generally this release focuses on stability and refactoring of internal APIs. - Introducing operator precedence, which makes calculating correct Array indices and ``__getattr__`` strings possible. 0.7.0 (2013-08-09) ++++++++++++++++++ - Switched from LGPL to MIT license. - Added an Interpreter class to the API to make autocompletion in REPL possible. - Added autocompletion support for namespace packages. - Add sith.py, a new random testing method. 0.6.0 (2013-05-14) ++++++++++++++++++ - Much faster parser with builtin part caching. - A test suite, thanks @tkf. 0.5 versions (2012) +++++++++++++++++++ - Initial development. Keywords: python completion refactoring vim Platform: any Classifier: Development Status :: 4 - Beta Classifier: Environment :: Plugins Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE) Classifier: Topic :: Utilities Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Provides-Extra: testing jedi-0.15.2/jedi.egg-info/dependency_links.txt0000664000175000017500000000000113577125145021061 0ustar davedave00000000000000 jedi-0.15.2/jedi.egg-info/top_level.txt0000664000175000017500000000000513577125145017540 0ustar davedave00000000000000jedi jedi-0.15.2/jedi.egg-info/requires.txt0000664000175000017500000000010413577125145017406 0ustar davedave00000000000000parso>=0.5.2 [testing] pytest<5.0.0,>=3.9.0 docopt colorama==0.4.1 jedi-0.15.2/jedi.egg-info/SOURCES.txt0000664000175000017500000023656213577125145016715 0ustar davedave00000000000000.coveragerc AUTHORS.txt CHANGELOG.rst LICENSE.txt MANIFEST.in README.rst conftest.py pytest.ini requirements.txt setup.cfg setup.py sith.py tox.ini docs/Makefile docs/README.md docs/conf.py docs/global.rst docs/index.rst docs/_screenshots/screenshot_complete.png docs/_screenshots/screenshot_function.png docs/_screenshots/screenshot_pydoc.png docs/_static/logo-src.txt docs/_static/logo.png docs/_templates/ghbuttons.html docs/_templates/sidebarlogo.html docs/_themes/flask_theme_support.py docs/_themes/flask/LICENSE docs/_themes/flask/layout.html docs/_themes/flask/relations.html docs/_themes/flask/theme.conf docs/_themes/flask/static/flasky.css_t docs/_themes/flask/static/small_flask.css docs/docs/api-classes.rst docs/docs/api.rst docs/docs/development.rst docs/docs/features.rst docs/docs/installation.rst docs/docs/settings.rst docs/docs/testing.rst docs/docs/usage.rst jedi/__init__.py jedi/__main__.py jedi/_compatibility.py jedi/cache.py jedi/debug.py jedi/file_io.py jedi/parser_utils.py jedi/refactoring.py jedi/settings.py jedi/utils.py jedi.egg-info/PKG-INFO jedi.egg-info/SOURCES.txt jedi.egg-info/dependency_links.txt jedi.egg-info/requires.txt jedi.egg-info/top_level.txt jedi/api/__init__.py jedi/api/classes.py jedi/api/completion.py jedi/api/environment.py jedi/api/exceptions.py jedi/api/file_name.py jedi/api/helpers.py jedi/api/interpreter.py jedi/api/keywords.py jedi/api/project.py jedi/api/replstartup.py jedi/common/__init__.py jedi/common/utils.py jedi/common/value.py jedi/inference/__init__.py jedi/inference/analysis.py jedi/inference/arguments.py jedi/inference/base_value.py jedi/inference/cache.py jedi/inference/context.py jedi/inference/docstrings.py jedi/inference/dynamic_params.py jedi/inference/filters.py jedi/inference/finder.py jedi/inference/flow_analysis.py jedi/inference/helpers.py jedi/inference/imports.py jedi/inference/lazy_value.py jedi/inference/names.py jedi/inference/param.py jedi/inference/parser_cache.py jedi/inference/recursion.py jedi/inference/signature.py jedi/inference/star_args.py jedi/inference/syntax_tree.py jedi/inference/sys_path.py jedi/inference/usages.py jedi/inference/utils.py jedi/inference/compiled/__init__.py jedi/inference/compiled/access.py jedi/inference/compiled/getattr_static.py jedi/inference/compiled/mixed.py jedi/inference/compiled/value.py jedi/inference/compiled/subprocess/__init__.py jedi/inference/compiled/subprocess/__main__.py jedi/inference/compiled/subprocess/functions.py jedi/inference/gradual/__init__.py jedi/inference/gradual/annotation.py jedi/inference/gradual/base.py jedi/inference/gradual/conversion.py jedi/inference/gradual/generics.py jedi/inference/gradual/stub_value.py jedi/inference/gradual/type_var.py jedi/inference/gradual/typeshed.py jedi/inference/gradual/typing.py jedi/inference/gradual/utils.py jedi/inference/value/__init__.py jedi/inference/value/decorator.py jedi/inference/value/dynamic_arrays.py jedi/inference/value/function.py jedi/inference/value/instance.py jedi/inference/value/iterable.py jedi/inference/value/klass.py jedi/inference/value/module.py jedi/inference/value/namespace.py jedi/plugins/__init__.py jedi/plugins/flask.py jedi/plugins/registry.py jedi/plugins/stdlib.py jedi/third_party/typeshed/LICENSE jedi/third_party/typeshed/stdlib/2/BaseHTTPServer.pyi jedi/third_party/typeshed/stdlib/2/CGIHTTPServer.pyi jedi/third_party/typeshed/stdlib/2/ConfigParser.pyi jedi/third_party/typeshed/stdlib/2/Cookie.pyi jedi/third_party/typeshed/stdlib/2/HTMLParser.pyi jedi/third_party/typeshed/stdlib/2/Queue.pyi jedi/third_party/typeshed/stdlib/2/SimpleHTTPServer.pyi jedi/third_party/typeshed/stdlib/2/SocketServer.pyi jedi/third_party/typeshed/stdlib/2/StringIO.pyi jedi/third_party/typeshed/stdlib/2/UserDict.pyi jedi/third_party/typeshed/stdlib/2/UserList.pyi jedi/third_party/typeshed/stdlib/2/UserString.pyi jedi/third_party/typeshed/stdlib/2/__builtin__.pyi jedi/third_party/typeshed/stdlib/2/_ast.pyi jedi/third_party/typeshed/stdlib/2/_collections.pyi jedi/third_party/typeshed/stdlib/2/_functools.pyi jedi/third_party/typeshed/stdlib/2/_hotshot.pyi jedi/third_party/typeshed/stdlib/2/_io.pyi jedi/third_party/typeshed/stdlib/2/_json.pyi jedi/third_party/typeshed/stdlib/2/_md5.pyi jedi/third_party/typeshed/stdlib/2/_sha.pyi jedi/third_party/typeshed/stdlib/2/_sha256.pyi jedi/third_party/typeshed/stdlib/2/_sha512.pyi jedi/third_party/typeshed/stdlib/2/_socket.pyi jedi/third_party/typeshed/stdlib/2/_sre.pyi jedi/third_party/typeshed/stdlib/2/_struct.pyi jedi/third_party/typeshed/stdlib/2/_symtable.pyi jedi/third_party/typeshed/stdlib/2/_threading_local.pyi jedi/third_party/typeshed/stdlib/2/abc.pyi jedi/third_party/typeshed/stdlib/2/ast.pyi jedi/third_party/typeshed/stdlib/2/atexit.pyi jedi/third_party/typeshed/stdlib/2/cPickle.pyi jedi/third_party/typeshed/stdlib/2/cStringIO.pyi jedi/third_party/typeshed/stdlib/2/collections.pyi jedi/third_party/typeshed/stdlib/2/commands.pyi jedi/third_party/typeshed/stdlib/2/compileall.pyi jedi/third_party/typeshed/stdlib/2/cookielib.pyi jedi/third_party/typeshed/stdlib/2/copy_reg.pyi jedi/third_party/typeshed/stdlib/2/dircache.pyi jedi/third_party/typeshed/stdlib/2/dummy_thread.pyi jedi/third_party/typeshed/stdlib/2/exceptions.pyi jedi/third_party/typeshed/stdlib/2/fcntl.pyi jedi/third_party/typeshed/stdlib/2/fnmatch.pyi jedi/third_party/typeshed/stdlib/2/functools.pyi jedi/third_party/typeshed/stdlib/2/future_builtins.pyi jedi/third_party/typeshed/stdlib/2/gc.pyi jedi/third_party/typeshed/stdlib/2/getopt.pyi jedi/third_party/typeshed/stdlib/2/getpass.pyi jedi/third_party/typeshed/stdlib/2/gettext.pyi jedi/third_party/typeshed/stdlib/2/glob.pyi jedi/third_party/typeshed/stdlib/2/gzip.pyi jedi/third_party/typeshed/stdlib/2/hashlib.pyi jedi/third_party/typeshed/stdlib/2/heapq.pyi jedi/third_party/typeshed/stdlib/2/htmlentitydefs.pyi jedi/third_party/typeshed/stdlib/2/httplib.pyi jedi/third_party/typeshed/stdlib/2/imp.pyi jedi/third_party/typeshed/stdlib/2/importlib.pyi jedi/third_party/typeshed/stdlib/2/inspect.pyi jedi/third_party/typeshed/stdlib/2/io.pyi jedi/third_party/typeshed/stdlib/2/itertools.pyi jedi/third_party/typeshed/stdlib/2/json.pyi jedi/third_party/typeshed/stdlib/2/markupbase.pyi jedi/third_party/typeshed/stdlib/2/md5.pyi jedi/third_party/typeshed/stdlib/2/mimetools.pyi jedi/third_party/typeshed/stdlib/2/mutex.pyi jedi/third_party/typeshed/stdlib/2/nturl2path.pyi jedi/third_party/typeshed/stdlib/2/os2emxpath.pyi jedi/third_party/typeshed/stdlib/2/pipes.pyi jedi/third_party/typeshed/stdlib/2/platform.pyi jedi/third_party/typeshed/stdlib/2/popen2.pyi jedi/third_party/typeshed/stdlib/2/posix.pyi jedi/third_party/typeshed/stdlib/2/random.pyi jedi/third_party/typeshed/stdlib/2/re.pyi jedi/third_party/typeshed/stdlib/2/repr.pyi jedi/third_party/typeshed/stdlib/2/resource.pyi jedi/third_party/typeshed/stdlib/2/rfc822.pyi jedi/third_party/typeshed/stdlib/2/robotparser.pyi jedi/third_party/typeshed/stdlib/2/runpy.pyi jedi/third_party/typeshed/stdlib/2/sets.pyi jedi/third_party/typeshed/stdlib/2/sha.pyi jedi/third_party/typeshed/stdlib/2/shelve.pyi jedi/third_party/typeshed/stdlib/2/shlex.pyi jedi/third_party/typeshed/stdlib/2/signal.pyi jedi/third_party/typeshed/stdlib/2/smtplib.pyi jedi/third_party/typeshed/stdlib/2/spwd.pyi jedi/third_party/typeshed/stdlib/2/sre_constants.pyi jedi/third_party/typeshed/stdlib/2/sre_parse.pyi jedi/third_party/typeshed/stdlib/2/stat.pyi jedi/third_party/typeshed/stdlib/2/string.pyi jedi/third_party/typeshed/stdlib/2/stringold.pyi jedi/third_party/typeshed/stdlib/2/strop.pyi jedi/third_party/typeshed/stdlib/2/subprocess.pyi jedi/third_party/typeshed/stdlib/2/symbol.pyi jedi/third_party/typeshed/stdlib/2/sys.pyi jedi/third_party/typeshed/stdlib/2/tempfile.pyi jedi/third_party/typeshed/stdlib/2/textwrap.pyi jedi/third_party/typeshed/stdlib/2/thread.pyi jedi/third_party/typeshed/stdlib/2/toaiff.pyi jedi/third_party/typeshed/stdlib/2/tokenize.pyi jedi/third_party/typeshed/stdlib/2/types.pyi jedi/third_party/typeshed/stdlib/2/typing.pyi jedi/third_party/typeshed/stdlib/2/unittest.pyi jedi/third_party/typeshed/stdlib/2/urllib.pyi jedi/third_party/typeshed/stdlib/2/urllib2.pyi jedi/third_party/typeshed/stdlib/2/urlparse.pyi jedi/third_party/typeshed/stdlib/2/user.pyi jedi/third_party/typeshed/stdlib/2/whichdb.pyi jedi/third_party/typeshed/stdlib/2/xmlrpclib.pyi jedi/third_party/typeshed/stdlib/2/distutils/__init__.pyi jedi/third_party/typeshed/stdlib/2/distutils/emxccompiler.pyi jedi/third_party/typeshed/stdlib/2/email/MIMEText.pyi jedi/third_party/typeshed/stdlib/2/email/__init__.pyi jedi/third_party/typeshed/stdlib/2/email/_parseaddr.pyi jedi/third_party/typeshed/stdlib/2/email/base64mime.pyi jedi/third_party/typeshed/stdlib/2/email/charset.pyi jedi/third_party/typeshed/stdlib/2/email/encoders.pyi jedi/third_party/typeshed/stdlib/2/email/feedparser.pyi jedi/third_party/typeshed/stdlib/2/email/generator.pyi jedi/third_party/typeshed/stdlib/2/email/header.pyi jedi/third_party/typeshed/stdlib/2/email/iterators.pyi jedi/third_party/typeshed/stdlib/2/email/message.pyi jedi/third_party/typeshed/stdlib/2/email/parser.pyi jedi/third_party/typeshed/stdlib/2/email/quoprimime.pyi jedi/third_party/typeshed/stdlib/2/email/utils.pyi jedi/third_party/typeshed/stdlib/2/email/mime/__init__.pyi jedi/third_party/typeshed/stdlib/2/email/mime/application.pyi jedi/third_party/typeshed/stdlib/2/email/mime/audio.pyi jedi/third_party/typeshed/stdlib/2/email/mime/base.pyi jedi/third_party/typeshed/stdlib/2/email/mime/image.pyi jedi/third_party/typeshed/stdlib/2/email/mime/message.pyi jedi/third_party/typeshed/stdlib/2/email/mime/multipart.pyi jedi/third_party/typeshed/stdlib/2/email/mime/nonmultipart.pyi jedi/third_party/typeshed/stdlib/2/email/mime/text.pyi jedi/third_party/typeshed/stdlib/2/encodings/__init__.pyi jedi/third_party/typeshed/stdlib/2/encodings/utf_8.pyi jedi/third_party/typeshed/stdlib/2/multiprocessing/__init__.pyi jedi/third_party/typeshed/stdlib/2/multiprocessing/pool.pyi jedi/third_party/typeshed/stdlib/2/multiprocessing/process.pyi jedi/third_party/typeshed/stdlib/2/multiprocessing/util.pyi jedi/third_party/typeshed/stdlib/2/multiprocessing/dummy/__init__.pyi jedi/third_party/typeshed/stdlib/2/multiprocessing/dummy/connection.pyi jedi/third_party/typeshed/stdlib/2/os/__init__.pyi jedi/third_party/typeshed/stdlib/2/os/path.pyi jedi/third_party/typeshed/stdlib/2and3/__future__.pyi jedi/third_party/typeshed/stdlib/2and3/_bisect.pyi jedi/third_party/typeshed/stdlib/2and3/_codecs.pyi jedi/third_party/typeshed/stdlib/2and3/_csv.pyi jedi/third_party/typeshed/stdlib/2and3/_curses.pyi jedi/third_party/typeshed/stdlib/2and3/_heapq.pyi jedi/third_party/typeshed/stdlib/2and3/_random.pyi jedi/third_party/typeshed/stdlib/2and3/_warnings.pyi jedi/third_party/typeshed/stdlib/2and3/_weakref.pyi jedi/third_party/typeshed/stdlib/2and3/_weakrefset.pyi jedi/third_party/typeshed/stdlib/2and3/aifc.pyi jedi/third_party/typeshed/stdlib/2and3/argparse.pyi jedi/third_party/typeshed/stdlib/2and3/array.pyi jedi/third_party/typeshed/stdlib/2and3/asynchat.pyi jedi/third_party/typeshed/stdlib/2and3/asyncore.pyi jedi/third_party/typeshed/stdlib/2and3/audioop.pyi jedi/third_party/typeshed/stdlib/2and3/base64.pyi jedi/third_party/typeshed/stdlib/2and3/bdb.pyi jedi/third_party/typeshed/stdlib/2and3/binascii.pyi jedi/third_party/typeshed/stdlib/2and3/binhex.pyi jedi/third_party/typeshed/stdlib/2and3/bisect.pyi jedi/third_party/typeshed/stdlib/2and3/builtins.pyi jedi/third_party/typeshed/stdlib/2and3/bz2.pyi jedi/third_party/typeshed/stdlib/2and3/cProfile.pyi jedi/third_party/typeshed/stdlib/2and3/calendar.pyi jedi/third_party/typeshed/stdlib/2and3/cgi.pyi jedi/third_party/typeshed/stdlib/2and3/cgitb.pyi jedi/third_party/typeshed/stdlib/2and3/chunk.pyi jedi/third_party/typeshed/stdlib/2and3/cmath.pyi jedi/third_party/typeshed/stdlib/2and3/cmd.pyi jedi/third_party/typeshed/stdlib/2and3/code.pyi jedi/third_party/typeshed/stdlib/2and3/codecs.pyi jedi/third_party/typeshed/stdlib/2and3/codeop.pyi jedi/third_party/typeshed/stdlib/2and3/colorsys.pyi jedi/third_party/typeshed/stdlib/2and3/contextlib.pyi jedi/third_party/typeshed/stdlib/2and3/copy.pyi jedi/third_party/typeshed/stdlib/2and3/crypt.pyi jedi/third_party/typeshed/stdlib/2and3/csv.pyi jedi/third_party/typeshed/stdlib/2and3/datetime.pyi jedi/third_party/typeshed/stdlib/2and3/decimal.pyi jedi/third_party/typeshed/stdlib/2and3/difflib.pyi jedi/third_party/typeshed/stdlib/2and3/dis.pyi jedi/third_party/typeshed/stdlib/2and3/doctest.pyi jedi/third_party/typeshed/stdlib/2and3/errno.pyi jedi/third_party/typeshed/stdlib/2and3/filecmp.pyi jedi/third_party/typeshed/stdlib/2and3/fileinput.pyi jedi/third_party/typeshed/stdlib/2and3/formatter.pyi jedi/third_party/typeshed/stdlib/2and3/fractions.pyi jedi/third_party/typeshed/stdlib/2and3/ftplib.pyi jedi/third_party/typeshed/stdlib/2and3/genericpath.pyi jedi/third_party/typeshed/stdlib/2and3/grp.pyi jedi/third_party/typeshed/stdlib/2and3/hmac.pyi jedi/third_party/typeshed/stdlib/2and3/imaplib.pyi jedi/third_party/typeshed/stdlib/2and3/imghdr.pyi jedi/third_party/typeshed/stdlib/2and3/keyword.pyi jedi/third_party/typeshed/stdlib/2and3/linecache.pyi jedi/third_party/typeshed/stdlib/2and3/locale.pyi jedi/third_party/typeshed/stdlib/2and3/macpath.pyi jedi/third_party/typeshed/stdlib/2and3/mailbox.pyi jedi/third_party/typeshed/stdlib/2and3/mailcap.pyi jedi/third_party/typeshed/stdlib/2and3/marshal.pyi jedi/third_party/typeshed/stdlib/2and3/math.pyi jedi/third_party/typeshed/stdlib/2and3/mimetypes.pyi jedi/third_party/typeshed/stdlib/2and3/mmap.pyi jedi/third_party/typeshed/stdlib/2and3/modulefinder.pyi jedi/third_party/typeshed/stdlib/2and3/netrc.pyi jedi/third_party/typeshed/stdlib/2and3/nis.pyi jedi/third_party/typeshed/stdlib/2and3/ntpath.pyi jedi/third_party/typeshed/stdlib/2and3/numbers.pyi jedi/third_party/typeshed/stdlib/2and3/opcode.pyi jedi/third_party/typeshed/stdlib/2and3/operator.pyi jedi/third_party/typeshed/stdlib/2and3/optparse.pyi jedi/third_party/typeshed/stdlib/2and3/pdb.pyi jedi/third_party/typeshed/stdlib/2and3/pickle.pyi jedi/third_party/typeshed/stdlib/2and3/pickletools.pyi jedi/third_party/typeshed/stdlib/2and3/pkgutil.pyi jedi/third_party/typeshed/stdlib/2and3/plistlib.pyi jedi/third_party/typeshed/stdlib/2and3/poplib.pyi jedi/third_party/typeshed/stdlib/2and3/posixpath.pyi jedi/third_party/typeshed/stdlib/2and3/pprint.pyi jedi/third_party/typeshed/stdlib/2and3/profile.pyi jedi/third_party/typeshed/stdlib/2and3/pstats.pyi jedi/third_party/typeshed/stdlib/2and3/pty.pyi jedi/third_party/typeshed/stdlib/2and3/pwd.pyi jedi/third_party/typeshed/stdlib/2and3/py_compile.pyi jedi/third_party/typeshed/stdlib/2and3/pyclbr.pyi jedi/third_party/typeshed/stdlib/2and3/pydoc.pyi jedi/third_party/typeshed/stdlib/2and3/quopri.pyi jedi/third_party/typeshed/stdlib/2and3/readline.pyi jedi/third_party/typeshed/stdlib/2and3/rlcompleter.pyi jedi/third_party/typeshed/stdlib/2and3/sched.pyi jedi/third_party/typeshed/stdlib/2and3/select.pyi jedi/third_party/typeshed/stdlib/2and3/shutil.pyi jedi/third_party/typeshed/stdlib/2and3/site.pyi jedi/third_party/typeshed/stdlib/2and3/smtpd.pyi jedi/third_party/typeshed/stdlib/2and3/sndhdr.pyi jedi/third_party/typeshed/stdlib/2and3/socket.pyi jedi/third_party/typeshed/stdlib/2and3/sre_compile.pyi jedi/third_party/typeshed/stdlib/2and3/ssl.pyi jedi/third_party/typeshed/stdlib/2and3/stringprep.pyi jedi/third_party/typeshed/stdlib/2and3/struct.pyi jedi/third_party/typeshed/stdlib/2and3/sunau.pyi jedi/third_party/typeshed/stdlib/2and3/symtable.pyi jedi/third_party/typeshed/stdlib/2and3/sysconfig.pyi jedi/third_party/typeshed/stdlib/2and3/syslog.pyi jedi/third_party/typeshed/stdlib/2and3/tabnanny.pyi jedi/third_party/typeshed/stdlib/2and3/tarfile.pyi jedi/third_party/typeshed/stdlib/2and3/telnetlib.pyi jedi/third_party/typeshed/stdlib/2and3/termios.pyi jedi/third_party/typeshed/stdlib/2and3/threading.pyi jedi/third_party/typeshed/stdlib/2and3/time.pyi jedi/third_party/typeshed/stdlib/2and3/timeit.pyi jedi/third_party/typeshed/stdlib/2and3/token.pyi jedi/third_party/typeshed/stdlib/2and3/trace.pyi jedi/third_party/typeshed/stdlib/2and3/traceback.pyi jedi/third_party/typeshed/stdlib/2and3/tty.pyi jedi/third_party/typeshed/stdlib/2and3/turtle.pyi jedi/third_party/typeshed/stdlib/2and3/unicodedata.pyi jedi/third_party/typeshed/stdlib/2and3/uu.pyi jedi/third_party/typeshed/stdlib/2and3/uuid.pyi jedi/third_party/typeshed/stdlib/2and3/warnings.pyi jedi/third_party/typeshed/stdlib/2and3/wave.pyi jedi/third_party/typeshed/stdlib/2and3/weakref.pyi jedi/third_party/typeshed/stdlib/2and3/webbrowser.pyi jedi/third_party/typeshed/stdlib/2and3/xdrlib.pyi jedi/third_party/typeshed/stdlib/2and3/zipfile.pyi jedi/third_party/typeshed/stdlib/2and3/zipimport.pyi jedi/third_party/typeshed/stdlib/2and3/zlib.pyi jedi/third_party/typeshed/stdlib/2and3/ctypes/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/ctypes/util.pyi jedi/third_party/typeshed/stdlib/2and3/ctypes/wintypes.pyi jedi/third_party/typeshed/stdlib/2and3/curses/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/curses/ascii.pyi jedi/third_party/typeshed/stdlib/2and3/curses/panel.pyi jedi/third_party/typeshed/stdlib/2and3/curses/textpad.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/archive_util.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/bcppcompiler.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/ccompiler.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/cmd.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/core.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/cygwinccompiler.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/debug.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/dep_util.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/dir_util.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/dist.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/errors.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/extension.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/fancy_getopt.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/file_util.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/filelist.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/log.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/msvccompiler.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/spawn.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/sysconfig.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/text_file.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/unixccompiler.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/util.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/version.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_dumb.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_msi.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_packager.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_rpm.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_wininst.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/build.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_clib.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_ext.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_py.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_scripts.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/check.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/clean.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/config.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/install.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_data.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_headers.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_lib.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_scripts.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/register.pyi jedi/third_party/typeshed/stdlib/2and3/distutils/command/sdist.pyi jedi/third_party/typeshed/stdlib/2and3/ensurepip/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pygram.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pytree.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/driver.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/grammar.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/literals.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/parse.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/pgen.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/token.pyi jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/tokenize.pyi jedi/third_party/typeshed/stdlib/2and3/logging/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/logging/config.pyi jedi/third_party/typeshed/stdlib/2and3/logging/handlers.pyi jedi/third_party/typeshed/stdlib/2and3/pyexpat/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/pyexpat/errors.pyi jedi/third_party/typeshed/stdlib/2and3/pyexpat/model.pyi jedi/third_party/typeshed/stdlib/2and3/sqlite3/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/sqlite3/dbapi2.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/handlers.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/headers.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/simple_server.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/types.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/util.pyi jedi/third_party/typeshed/stdlib/2and3/wsgiref/validate.pyi jedi/third_party/typeshed/stdlib/2and3/xml/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/xml/etree/ElementInclude.pyi jedi/third_party/typeshed/stdlib/2and3/xml/etree/ElementPath.pyi jedi/third_party/typeshed/stdlib/2and3/xml/etree/ElementTree.pyi jedi/third_party/typeshed/stdlib/2and3/xml/etree/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/xml/etree/cElementTree.pyi jedi/third_party/typeshed/stdlib/2and3/xml/parsers/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/errors.pyi jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/model.pyi jedi/third_party/typeshed/stdlib/2and3/xml/sax/__init__.pyi jedi/third_party/typeshed/stdlib/2and3/xml/sax/handler.pyi jedi/third_party/typeshed/stdlib/2and3/xml/sax/saxutils.pyi jedi/third_party/typeshed/stdlib/2and3/xml/sax/xmlreader.pyi jedi/third_party/typeshed/stdlib/3/_ast.pyi jedi/third_party/typeshed/stdlib/3/_compression.pyi jedi/third_party/typeshed/stdlib/3/_dummy_thread.pyi jedi/third_party/typeshed/stdlib/3/_imp.pyi jedi/third_party/typeshed/stdlib/3/_importlib_modulespec.pyi jedi/third_party/typeshed/stdlib/3/_json.pyi jedi/third_party/typeshed/stdlib/3/_markupbase.pyi jedi/third_party/typeshed/stdlib/3/_operator.pyi jedi/third_party/typeshed/stdlib/3/_posixsubprocess.pyi jedi/third_party/typeshed/stdlib/3/_stat.pyi jedi/third_party/typeshed/stdlib/3/_subprocess.pyi jedi/third_party/typeshed/stdlib/3/_thread.pyi jedi/third_party/typeshed/stdlib/3/_threading_local.pyi jedi/third_party/typeshed/stdlib/3/_tracemalloc.pyi jedi/third_party/typeshed/stdlib/3/_winapi.pyi jedi/third_party/typeshed/stdlib/3/abc.pyi jedi/third_party/typeshed/stdlib/3/ast.pyi jedi/third_party/typeshed/stdlib/3/atexit.pyi jedi/third_party/typeshed/stdlib/3/compileall.pyi jedi/third_party/typeshed/stdlib/3/configparser.pyi jedi/third_party/typeshed/stdlib/3/copyreg.pyi jedi/third_party/typeshed/stdlib/3/enum.pyi jedi/third_party/typeshed/stdlib/3/faulthandler.pyi jedi/third_party/typeshed/stdlib/3/fcntl.pyi jedi/third_party/typeshed/stdlib/3/fnmatch.pyi jedi/third_party/typeshed/stdlib/3/functools.pyi jedi/third_party/typeshed/stdlib/3/gc.pyi jedi/third_party/typeshed/stdlib/3/getopt.pyi jedi/third_party/typeshed/stdlib/3/getpass.pyi jedi/third_party/typeshed/stdlib/3/gettext.pyi jedi/third_party/typeshed/stdlib/3/glob.pyi jedi/third_party/typeshed/stdlib/3/gzip.pyi jedi/third_party/typeshed/stdlib/3/hashlib.pyi jedi/third_party/typeshed/stdlib/3/heapq.pyi jedi/third_party/typeshed/stdlib/3/imp.pyi jedi/third_party/typeshed/stdlib/3/inspect.pyi jedi/third_party/typeshed/stdlib/3/io.pyi jedi/third_party/typeshed/stdlib/3/ipaddress.pyi jedi/third_party/typeshed/stdlib/3/itertools.pyi jedi/third_party/typeshed/stdlib/3/lzma.pyi jedi/third_party/typeshed/stdlib/3/msvcrt.pyi jedi/third_party/typeshed/stdlib/3/nntplib.pyi jedi/third_party/typeshed/stdlib/3/nturl2path.pyi jedi/third_party/typeshed/stdlib/3/pathlib.pyi jedi/third_party/typeshed/stdlib/3/pipes.pyi jedi/third_party/typeshed/stdlib/3/platform.pyi jedi/third_party/typeshed/stdlib/3/posix.pyi jedi/third_party/typeshed/stdlib/3/queue.pyi jedi/third_party/typeshed/stdlib/3/random.pyi jedi/third_party/typeshed/stdlib/3/re.pyi jedi/third_party/typeshed/stdlib/3/reprlib.pyi jedi/third_party/typeshed/stdlib/3/resource.pyi jedi/third_party/typeshed/stdlib/3/runpy.pyi jedi/third_party/typeshed/stdlib/3/selectors.pyi jedi/third_party/typeshed/stdlib/3/shelve.pyi jedi/third_party/typeshed/stdlib/3/shlex.pyi jedi/third_party/typeshed/stdlib/3/signal.pyi jedi/third_party/typeshed/stdlib/3/smtplib.pyi jedi/third_party/typeshed/stdlib/3/socketserver.pyi jedi/third_party/typeshed/stdlib/3/spwd.pyi jedi/third_party/typeshed/stdlib/3/sre_constants.pyi jedi/third_party/typeshed/stdlib/3/sre_parse.pyi jedi/third_party/typeshed/stdlib/3/stat.pyi jedi/third_party/typeshed/stdlib/3/statistics.pyi jedi/third_party/typeshed/stdlib/3/string.pyi jedi/third_party/typeshed/stdlib/3/subprocess.pyi jedi/third_party/typeshed/stdlib/3/symbol.pyi jedi/third_party/typeshed/stdlib/3/sys.pyi jedi/third_party/typeshed/stdlib/3/tempfile.pyi jedi/third_party/typeshed/stdlib/3/textwrap.pyi jedi/third_party/typeshed/stdlib/3/tokenize.pyi jedi/third_party/typeshed/stdlib/3/tracemalloc.pyi jedi/third_party/typeshed/stdlib/3/types.pyi jedi/third_party/typeshed/stdlib/3/typing.pyi jedi/third_party/typeshed/stdlib/3/zipapp.pyi jedi/third_party/typeshed/stdlib/3.6/secrets.pyi jedi/third_party/typeshed/stdlib/3.7/contextvars.pyi jedi/third_party/typeshed/stdlib/3.7/dataclasses.pyi jedi/third_party/typeshed/stdlib/3/asyncio/__init__.pyi jedi/third_party/typeshed/stdlib/3/asyncio/base_events.pyi jedi/third_party/typeshed/stdlib/3/asyncio/constants.pyi jedi/third_party/typeshed/stdlib/3/asyncio/coroutines.pyi jedi/third_party/typeshed/stdlib/3/asyncio/events.pyi jedi/third_party/typeshed/stdlib/3/asyncio/exceptions.pyi jedi/third_party/typeshed/stdlib/3/asyncio/futures.pyi jedi/third_party/typeshed/stdlib/3/asyncio/locks.pyi jedi/third_party/typeshed/stdlib/3/asyncio/proactor_events.pyi jedi/third_party/typeshed/stdlib/3/asyncio/protocols.pyi jedi/third_party/typeshed/stdlib/3/asyncio/queues.pyi jedi/third_party/typeshed/stdlib/3/asyncio/runners.pyi jedi/third_party/typeshed/stdlib/3/asyncio/selector_events.pyi jedi/third_party/typeshed/stdlib/3/asyncio/streams.pyi jedi/third_party/typeshed/stdlib/3/asyncio/subprocess.pyi jedi/third_party/typeshed/stdlib/3/asyncio/tasks.pyi jedi/third_party/typeshed/stdlib/3/asyncio/transports.pyi jedi/third_party/typeshed/stdlib/3/asyncio/windows_events.pyi jedi/third_party/typeshed/stdlib/3/asyncio/windows_utils.pyi jedi/third_party/typeshed/stdlib/3/collections/__init__.pyi jedi/third_party/typeshed/stdlib/3/collections/abc.pyi jedi/third_party/typeshed/stdlib/3/concurrent/__init__.pyi jedi/third_party/typeshed/stdlib/3/concurrent/futures/__init__.pyi jedi/third_party/typeshed/stdlib/3/concurrent/futures/_base.pyi jedi/third_party/typeshed/stdlib/3/concurrent/futures/process.pyi jedi/third_party/typeshed/stdlib/3/concurrent/futures/thread.pyi jedi/third_party/typeshed/stdlib/3/email/__init__.pyi jedi/third_party/typeshed/stdlib/3/email/charset.pyi jedi/third_party/typeshed/stdlib/3/email/contentmanager.pyi jedi/third_party/typeshed/stdlib/3/email/encoders.pyi jedi/third_party/typeshed/stdlib/3/email/errors.pyi jedi/third_party/typeshed/stdlib/3/email/feedparser.pyi jedi/third_party/typeshed/stdlib/3/email/generator.pyi jedi/third_party/typeshed/stdlib/3/email/header.pyi jedi/third_party/typeshed/stdlib/3/email/headerregistry.pyi jedi/third_party/typeshed/stdlib/3/email/iterators.pyi jedi/third_party/typeshed/stdlib/3/email/message.pyi jedi/third_party/typeshed/stdlib/3/email/parser.pyi jedi/third_party/typeshed/stdlib/3/email/policy.pyi jedi/third_party/typeshed/stdlib/3/email/utils.pyi jedi/third_party/typeshed/stdlib/3/email/mime/__init__.pyi jedi/third_party/typeshed/stdlib/3/email/mime/application.pyi jedi/third_party/typeshed/stdlib/3/email/mime/audio.pyi jedi/third_party/typeshed/stdlib/3/email/mime/base.pyi jedi/third_party/typeshed/stdlib/3/email/mime/image.pyi jedi/third_party/typeshed/stdlib/3/email/mime/message.pyi jedi/third_party/typeshed/stdlib/3/email/mime/multipart.pyi jedi/third_party/typeshed/stdlib/3/email/mime/nonmultipart.pyi jedi/third_party/typeshed/stdlib/3/email/mime/text.pyi jedi/third_party/typeshed/stdlib/3/encodings/__init__.pyi jedi/third_party/typeshed/stdlib/3/encodings/utf_8.pyi jedi/third_party/typeshed/stdlib/3/html/__init__.pyi jedi/third_party/typeshed/stdlib/3/html/entities.pyi jedi/third_party/typeshed/stdlib/3/html/parser.pyi jedi/third_party/typeshed/stdlib/3/http/__init__.pyi jedi/third_party/typeshed/stdlib/3/http/client.pyi jedi/third_party/typeshed/stdlib/3/http/cookiejar.pyi jedi/third_party/typeshed/stdlib/3/http/cookies.pyi jedi/third_party/typeshed/stdlib/3/http/server.pyi jedi/third_party/typeshed/stdlib/3/importlib/__init__.pyi jedi/third_party/typeshed/stdlib/3/importlib/abc.pyi jedi/third_party/typeshed/stdlib/3/importlib/machinery.pyi jedi/third_party/typeshed/stdlib/3/importlib/metadata.pyi jedi/third_party/typeshed/stdlib/3/importlib/resources.pyi jedi/third_party/typeshed/stdlib/3/importlib/util.pyi jedi/third_party/typeshed/stdlib/3/json/__init__.pyi jedi/third_party/typeshed/stdlib/3/json/decoder.pyi jedi/third_party/typeshed/stdlib/3/json/encoder.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/__init__.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/connection.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/context.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/managers.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/pool.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/process.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/queues.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/shared_memory.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/spawn.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/synchronize.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/dummy/__init__.pyi jedi/third_party/typeshed/stdlib/3/multiprocessing/dummy/connection.pyi jedi/third_party/typeshed/stdlib/3/os/__init__.pyi jedi/third_party/typeshed/stdlib/3/os/path.pyi jedi/third_party/typeshed/stdlib/3/tkinter/__init__.pyi jedi/third_party/typeshed/stdlib/3/tkinter/commondialog.pyi jedi/third_party/typeshed/stdlib/3/tkinter/constants.pyi jedi/third_party/typeshed/stdlib/3/tkinter/dialog.pyi jedi/third_party/typeshed/stdlib/3/tkinter/filedialog.pyi jedi/third_party/typeshed/stdlib/3/tkinter/messagebox.pyi jedi/third_party/typeshed/stdlib/3/tkinter/ttk.pyi jedi/third_party/typeshed/stdlib/3/unittest/__init__.pyi jedi/third_party/typeshed/stdlib/3/unittest/async_case.pyi jedi/third_party/typeshed/stdlib/3/unittest/case.pyi jedi/third_party/typeshed/stdlib/3/unittest/loader.pyi jedi/third_party/typeshed/stdlib/3/unittest/mock.pyi jedi/third_party/typeshed/stdlib/3/unittest/result.pyi jedi/third_party/typeshed/stdlib/3/unittest/runner.pyi jedi/third_party/typeshed/stdlib/3/unittest/signals.pyi jedi/third_party/typeshed/stdlib/3/unittest/suite.pyi jedi/third_party/typeshed/stdlib/3/unittest/util.pyi jedi/third_party/typeshed/stdlib/3/urllib/__init__.pyi jedi/third_party/typeshed/stdlib/3/urllib/error.pyi jedi/third_party/typeshed/stdlib/3/urllib/parse.pyi jedi/third_party/typeshed/stdlib/3/urllib/request.pyi jedi/third_party/typeshed/stdlib/3/urllib/response.pyi jedi/third_party/typeshed/stdlib/3/urllib/robotparser.pyi jedi/third_party/typeshed/third_party/2/enum.pyi jedi/third_party/typeshed/third_party/2/gflags.pyi jedi/third_party/typeshed/third_party/2/ipaddress.pyi jedi/third_party/typeshed/third_party/2/pathlib2.pyi jedi/third_party/typeshed/third_party/2/pymssql.pyi jedi/third_party/typeshed/third_party/2/OpenSSL/__init__.pyi jedi/third_party/typeshed/third_party/2/OpenSSL/crypto.pyi jedi/third_party/typeshed/third_party/2/concurrent/__init__.pyi jedi/third_party/typeshed/third_party/2/concurrent/futures/__init__.pyi jedi/third_party/typeshed/third_party/2/concurrent/futures/_base.pyi jedi/third_party/typeshed/third_party/2/concurrent/futures/process.pyi jedi/third_party/typeshed/third_party/2/concurrent/futures/thread.pyi jedi/third_party/typeshed/third_party/2/fb303/FacebookService.pyi jedi/third_party/typeshed/third_party/2/fb303/__init__.pyi jedi/third_party/typeshed/third_party/2/kazoo/__init__.pyi jedi/third_party/typeshed/third_party/2/kazoo/client.pyi jedi/third_party/typeshed/third_party/2/kazoo/exceptions.pyi jedi/third_party/typeshed/third_party/2/kazoo/recipe/__init__.pyi jedi/third_party/typeshed/third_party/2/kazoo/recipe/watchers.pyi jedi/third_party/typeshed/third_party/2/routes/__init__.pyi jedi/third_party/typeshed/third_party/2/routes/mapper.pyi jedi/third_party/typeshed/third_party/2/routes/util.pyi jedi/third_party/typeshed/third_party/2/scribe/__init__.pyi jedi/third_party/typeshed/third_party/2/scribe/scribe.pyi jedi/third_party/typeshed/third_party/2/scribe/ttypes.pyi jedi/third_party/typeshed/third_party/2/six/__init__.pyi jedi/third_party/typeshed/third_party/2/six/moves/BaseHTTPServer.pyi jedi/third_party/typeshed/third_party/2/six/moves/CGIHTTPServer.pyi jedi/third_party/typeshed/third_party/2/six/moves/SimpleHTTPServer.pyi jedi/third_party/typeshed/third_party/2/six/moves/__init__.pyi jedi/third_party/typeshed/third_party/2/six/moves/_dummy_thread.pyi jedi/third_party/typeshed/third_party/2/six/moves/_thread.pyi jedi/third_party/typeshed/third_party/2/six/moves/cPickle.pyi jedi/third_party/typeshed/third_party/2/six/moves/configparser.pyi jedi/third_party/typeshed/third_party/2/six/moves/email_mime_base.pyi jedi/third_party/typeshed/third_party/2/six/moves/email_mime_multipart.pyi jedi/third_party/typeshed/third_party/2/six/moves/email_mime_nonmultipart.pyi jedi/third_party/typeshed/third_party/2/six/moves/email_mime_text.pyi jedi/third_party/typeshed/third_party/2/six/moves/html_entities.pyi jedi/third_party/typeshed/third_party/2/six/moves/html_parser.pyi jedi/third_party/typeshed/third_party/2/six/moves/http_client.pyi jedi/third_party/typeshed/third_party/2/six/moves/http_cookiejar.pyi jedi/third_party/typeshed/third_party/2/six/moves/http_cookies.pyi jedi/third_party/typeshed/third_party/2/six/moves/queue.pyi jedi/third_party/typeshed/third_party/2/six/moves/reprlib.pyi jedi/third_party/typeshed/third_party/2/six/moves/socketserver.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib_error.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib_parse.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib_request.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib_response.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib_robotparser.pyi jedi/third_party/typeshed/third_party/2/six/moves/xmlrpc_client.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib/__init__.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib/error.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib/parse.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib/request.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib/response.pyi jedi/third_party/typeshed/third_party/2/six/moves/urllib/robotparser.pyi jedi/third_party/typeshed/third_party/2/tornado/__init__.pyi jedi/third_party/typeshed/third_party/2/tornado/concurrent.pyi jedi/third_party/typeshed/third_party/2/tornado/gen.pyi jedi/third_party/typeshed/third_party/2/tornado/httpclient.pyi jedi/third_party/typeshed/third_party/2/tornado/httpserver.pyi jedi/third_party/typeshed/third_party/2/tornado/httputil.pyi jedi/third_party/typeshed/third_party/2/tornado/ioloop.pyi jedi/third_party/typeshed/third_party/2/tornado/locks.pyi jedi/third_party/typeshed/third_party/2/tornado/netutil.pyi jedi/third_party/typeshed/third_party/2/tornado/process.pyi jedi/third_party/typeshed/third_party/2/tornado/tcpserver.pyi jedi/third_party/typeshed/third_party/2/tornado/testing.pyi jedi/third_party/typeshed/third_party/2/tornado/util.pyi jedi/third_party/typeshed/third_party/2/tornado/web.pyi jedi/third_party/typeshed/third_party/2and3/backports_abc.pyi jedi/third_party/typeshed/third_party/2and3/certifi.pyi jedi/third_party/typeshed/third_party/2and3/croniter.pyi jedi/third_party/typeshed/third_party/2and3/decorator.pyi jedi/third_party/typeshed/third_party/2and3/emoji.pyi jedi/third_party/typeshed/third_party/2and3/first.pyi jedi/third_party/typeshed/third_party/2and3/itsdangerous.pyi jedi/third_party/typeshed/third_party/2and3/mock.pyi jedi/third_party/typeshed/third_party/2and3/mypy_extensions.pyi jedi/third_party/typeshed/third_party/2and3/pycurl.pyi jedi/third_party/typeshed/third_party/2and3/pyre_extensions.pyi jedi/third_party/typeshed/third_party/2and3/singledispatch.pyi jedi/third_party/typeshed/third_party/2and3/tabulate.pyi jedi/third_party/typeshed/third_party/2and3/termcolor.pyi jedi/third_party/typeshed/third_party/2and3/toml.pyi jedi/third_party/typeshed/third_party/2and3/typing_extensions.pyi jedi/third_party/typeshed/third_party/2and3/ujson.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/pct_warnings.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/AES.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/ARC2.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/ARC4.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/Blowfish.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/CAST.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/DES.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/DES3.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/PKCS1_OAEP.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/PKCS1_v1_5.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/XOR.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/blockalgo.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/HMAC.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/MD2.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/MD4.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/MD5.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/RIPEMD.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA224.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA256.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA384.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA512.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/hashalgo.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/AllOrNothing.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/Chaffing.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/KDF.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/DSA.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/ElGamal.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/RSA.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/pubkey.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/random.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/FortunaAccumulator.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/FortunaGenerator.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/SHAd256.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/fallback.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/posix.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/rng_base.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/PKCS1_PSS.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/PKCS1_v1_5.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/Counter.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/RFC1751.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/__init__.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/asn1.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/number.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/randpool.pyi jedi/third_party/typeshed/third_party/2and3/Crypto/Util/strxor.pyi jedi/third_party/typeshed/third_party/2and3/atomicwrites/__init__.pyi jedi/third_party/typeshed/third_party/2and3/attr/__init__.pyi jedi/third_party/typeshed/third_party/2and3/attr/converters.pyi jedi/third_party/typeshed/third_party/2and3/attr/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/attr/filters.pyi jedi/third_party/typeshed/third_party/2and3/attr/validators.pyi jedi/third_party/typeshed/third_party/2and3/backports/__init__.pyi jedi/third_party/typeshed/third_party/2and3/backports/ssl_match_hostname.pyi jedi/third_party/typeshed/third_party/2and3/bleach/__init__.pyi jedi/third_party/typeshed/third_party/2and3/bleach/callbacks.pyi jedi/third_party/typeshed/third_party/2and3/bleach/linkifier.pyi jedi/third_party/typeshed/third_party/2and3/bleach/sanitizer.pyi jedi/third_party/typeshed/third_party/2and3/bleach/utils.pyi jedi/third_party/typeshed/third_party/2and3/boto/__init__.pyi jedi/third_party/typeshed/third_party/2and3/boto/auth.pyi jedi/third_party/typeshed/third_party/2and3/boto/auth_handler.pyi jedi/third_party/typeshed/third_party/2and3/boto/compat.pyi jedi/third_party/typeshed/third_party/2and3/boto/connection.pyi jedi/third_party/typeshed/third_party/2and3/boto/exception.pyi jedi/third_party/typeshed/third_party/2and3/boto/plugin.pyi jedi/third_party/typeshed/third_party/2and3/boto/regioninfo.pyi jedi/third_party/typeshed/third_party/2and3/boto/utils.pyi jedi/third_party/typeshed/third_party/2and3/boto/ec2/__init__.pyi jedi/third_party/typeshed/third_party/2and3/boto/elb/__init__.pyi jedi/third_party/typeshed/third_party/2and3/boto/kms/__init__.pyi jedi/third_party/typeshed/third_party/2and3/boto/kms/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/boto/kms/layer1.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/__init__.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/acl.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/bucket.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/bucketlistresultset.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/bucketlogging.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/connection.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/cors.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/deletemarker.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/key.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/keyfile.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/lifecycle.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/multidelete.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/multipart.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/prefix.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/tagging.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/user.pyi jedi/third_party/typeshed/third_party/2and3/boto/s3/website.pyi jedi/third_party/typeshed/third_party/2and3/characteristic/__init__.pyi jedi/third_party/typeshed/third_party/2and3/click/__init__.pyi jedi/third_party/typeshed/third_party/2and3/click/_termui_impl.pyi jedi/third_party/typeshed/third_party/2and3/click/core.pyi jedi/third_party/typeshed/third_party/2and3/click/decorators.pyi jedi/third_party/typeshed/third_party/2and3/click/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/click/formatting.pyi jedi/third_party/typeshed/third_party/2and3/click/globals.pyi jedi/third_party/typeshed/third_party/2and3/click/parser.pyi jedi/third_party/typeshed/third_party/2and3/click/termui.pyi jedi/third_party/typeshed/third_party/2and3/click/testing.pyi jedi/third_party/typeshed/third_party/2and3/click/types.pyi jedi/third_party/typeshed/third_party/2and3/click/utils.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/fernet.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/x509.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/interfaces.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/binding.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/constant_time.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/padding.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/poly1305.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed25519.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed448.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/padding.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x25519.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x448.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/aead.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/algorithms.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/modes.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/__init__.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/hotp.pyi jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/totp.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/__init__.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/_common.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/parser.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/relativedelta.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/rrule.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/utils.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/tz/__init__.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/tz/_common.pyi jedi/third_party/typeshed/third_party/2and3/dateutil/tz/tz.pyi jedi/third_party/typeshed/third_party/2and3/flask/__init__.pyi jedi/third_party/typeshed/third_party/2and3/flask/app.pyi jedi/third_party/typeshed/third_party/2and3/flask/blueprints.pyi jedi/third_party/typeshed/third_party/2and3/flask/cli.pyi jedi/third_party/typeshed/third_party/2and3/flask/config.pyi jedi/third_party/typeshed/third_party/2and3/flask/ctx.pyi jedi/third_party/typeshed/third_party/2and3/flask/debughelpers.pyi jedi/third_party/typeshed/third_party/2and3/flask/globals.pyi jedi/third_party/typeshed/third_party/2and3/flask/helpers.pyi jedi/third_party/typeshed/third_party/2and3/flask/logging.pyi jedi/third_party/typeshed/third_party/2and3/flask/sessions.pyi jedi/third_party/typeshed/third_party/2and3/flask/signals.pyi jedi/third_party/typeshed/third_party/2and3/flask/templating.pyi jedi/third_party/typeshed/third_party/2and3/flask/testing.pyi jedi/third_party/typeshed/third_party/2and3/flask/views.pyi jedi/third_party/typeshed/third_party/2and3/flask/wrappers.pyi jedi/third_party/typeshed/third_party/2and3/flask/json/__init__.pyi jedi/third_party/typeshed/third_party/2and3/flask/json/tag.pyi jedi/third_party/typeshed/third_party/2and3/geoip2/__init__.pyi jedi/third_party/typeshed/third_party/2and3/geoip2/database.pyi jedi/third_party/typeshed/third_party/2and3/geoip2/errors.pyi jedi/third_party/typeshed/third_party/2and3/geoip2/mixins.pyi jedi/third_party/typeshed/third_party/2and3/geoip2/models.pyi jedi/third_party/typeshed/third_party/2and3/geoip2/records.pyi jedi/third_party/typeshed/third_party/2and3/google/__init__.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/__init__.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/any_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/any_test_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/api_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/descriptor.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/descriptor_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/descriptor_pool.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/duration_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/empty_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/field_mask_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/json_format.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/map_proto2_unittest_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/map_unittest_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/message.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/message_factory.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/reflection.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/service.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/source_context_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/struct_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/symbol_database.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/test_messages_proto2_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/test_messages_proto3_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/timestamp_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/type_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_arena_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_custom_options_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_import_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_import_public_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_mset_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_arena_import_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_arena_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_generic_services_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/wrappers_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/compiler/__init__.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/__init__.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/containers.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/decoder.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/encoder.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/enum_type_wrapper.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/message_listener.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/well_known_types.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/wire_format.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/util/__init__.pyi jedi/third_party/typeshed/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/__init__.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/_compat.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/_stringdefs.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/bccache.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/compiler.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/constants.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/debug.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/defaults.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/environment.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/ext.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/filters.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/lexer.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/loaders.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/meta.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/nodes.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/optimizer.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/parser.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/runtime.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/sandbox.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/tests.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/utils.pyi jedi/third_party/typeshed/third_party/2and3/jinja2/visitor.pyi jedi/third_party/typeshed/third_party/2and3/markupsafe/__init__.pyi jedi/third_party/typeshed/third_party/2and3/markupsafe/_compat.pyi jedi/third_party/typeshed/third_party/2and3/markupsafe/_constants.pyi jedi/third_party/typeshed/third_party/2and3/markupsafe/_native.pyi jedi/third_party/typeshed/third_party/2and3/markupsafe/_speedups.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/__init__.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/compat.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/const.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/decoder.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/errors.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/extension.pyi jedi/third_party/typeshed/third_party/2and3/maxminddb/reader.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/__init__.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/charset.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/connections.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/converters.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/cursors.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/err.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/times.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/util.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/CLIENT.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/COMMAND.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/ER.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/FIELD_TYPE.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/FLAG.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/SERVER_STATUS.pyi jedi/third_party/typeshed/third_party/2and3/pymysql/constants/__init__.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/__init__.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/attributes.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/constants.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/indexes.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/models.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/settings.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/throttle.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/types.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/__init__.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/base.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/table.pyi jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/util.pyi jedi/third_party/typeshed/third_party/2and3/pytz/__init__.pyi jedi/third_party/typeshed/third_party/2and3/redis/__init__.pyi jedi/third_party/typeshed/third_party/2and3/redis/client.pyi jedi/third_party/typeshed/third_party/2and3/redis/connection.pyi jedi/third_party/typeshed/third_party/2and3/redis/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/redis/utils.pyi jedi/third_party/typeshed/third_party/2and3/requests/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/adapters.pyi jedi/third_party/typeshed/third_party/2and3/requests/api.pyi jedi/third_party/typeshed/third_party/2and3/requests/auth.pyi jedi/third_party/typeshed/third_party/2and3/requests/compat.pyi jedi/third_party/typeshed/third_party/2and3/requests/cookies.pyi jedi/third_party/typeshed/third_party/2and3/requests/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/requests/hooks.pyi jedi/third_party/typeshed/third_party/2and3/requests/models.pyi jedi/third_party/typeshed/third_party/2and3/requests/sessions.pyi jedi/third_party/typeshed/third_party/2and3/requests/status_codes.pyi jedi/third_party/typeshed/third_party/2and3/requests/structures.pyi jedi/third_party/typeshed/third_party/2and3/requests/utils.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/_collections.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/connection.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/connectionpool.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/fields.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/filepost.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/poolmanager.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/request.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/response.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/contrib/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/__init__.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/connection.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/request.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/response.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/retry.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/ssl_.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/timeout.pyi jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/url.pyi jedi/third_party/typeshed/third_party/2and3/simplejson/__init__.pyi jedi/third_party/typeshed/third_party/2and3/simplejson/decoder.pyi jedi/third_party/typeshed/third_party/2and3/simplejson/encoder.pyi jedi/third_party/typeshed/third_party/2and3/simplejson/scanner.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/__init__.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/_compat.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/_internal.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/_reloader.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/datastructures.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/exceptions.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/filesystem.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/formparser.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/http.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/local.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/posixemulation.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/routing.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/script.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/security.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/serving.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/test.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/testapp.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/urls.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/useragents.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/utils.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/wrappers.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/wsgi.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/__init__.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/atom.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/cache.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/fixers.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/iterio.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/jsrouting.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/limiter.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/lint.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/profiler.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/securecookie.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/sessions.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/testtools.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/wrappers.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/__init__.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/console.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/repr.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/tbtools.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/__init__.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/dispatcher.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/http_proxy.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/lint.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/profiler.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/proxy_fix.pyi jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/shared_data.pyi jedi/third_party/typeshed/third_party/2and3/yaml/__init__.pyi jedi/third_party/typeshed/third_party/2and3/yaml/composer.pyi jedi/third_party/typeshed/third_party/2and3/yaml/constructor.pyi jedi/third_party/typeshed/third_party/2and3/yaml/cyaml.pyi jedi/third_party/typeshed/third_party/2and3/yaml/dumper.pyi jedi/third_party/typeshed/third_party/2and3/yaml/emitter.pyi jedi/third_party/typeshed/third_party/2and3/yaml/error.pyi jedi/third_party/typeshed/third_party/2and3/yaml/events.pyi jedi/third_party/typeshed/third_party/2and3/yaml/loader.pyi jedi/third_party/typeshed/third_party/2and3/yaml/nodes.pyi jedi/third_party/typeshed/third_party/2and3/yaml/parser.pyi jedi/third_party/typeshed/third_party/2and3/yaml/reader.pyi jedi/third_party/typeshed/third_party/2and3/yaml/representer.pyi jedi/third_party/typeshed/third_party/2and3/yaml/resolver.pyi jedi/third_party/typeshed/third_party/2and3/yaml/scanner.pyi jedi/third_party/typeshed/third_party/2and3/yaml/serializer.pyi jedi/third_party/typeshed/third_party/2and3/yaml/tokens.pyi jedi/third_party/typeshed/third_party/3/contextvars.pyi jedi/third_party/typeshed/third_party/3/dataclasses.pyi jedi/third_party/typeshed/third_party/3/orjson.pyi jedi/third_party/typeshed/third_party/3/docutils/__init__.pyi jedi/third_party/typeshed/third_party/3/docutils/examples.pyi jedi/third_party/typeshed/third_party/3/docutils/nodes.pyi jedi/third_party/typeshed/third_party/3/docutils/parsers/__init__.pyi jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/__init__.pyi jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/nodes.pyi jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/roles.pyi jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/states.pyi jedi/third_party/typeshed/third_party/3/jwt/__init__.pyi jedi/third_party/typeshed/third_party/3/jwt/algorithms.pyi jedi/third_party/typeshed/third_party/3/jwt/contrib/__init__.pyi jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/__init__.pyi jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/py_ecdsa.pyi jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/pycrypto.pyi jedi/third_party/typeshed/third_party/3/pkg_resources/__init__.pyi jedi/third_party/typeshed/third_party/3/pkg_resources/py31compat.pyi jedi/third_party/typeshed/third_party/3/six/__init__.pyi jedi/third_party/typeshed/third_party/3/six/moves/BaseHTTPServer.pyi jedi/third_party/typeshed/third_party/3/six/moves/CGIHTTPServer.pyi jedi/third_party/typeshed/third_party/3/six/moves/SimpleHTTPServer.pyi jedi/third_party/typeshed/third_party/3/six/moves/__init__.pyi jedi/third_party/typeshed/third_party/3/six/moves/_dummy_thread.pyi jedi/third_party/typeshed/third_party/3/six/moves/_thread.pyi jedi/third_party/typeshed/third_party/3/six/moves/builtins.pyi jedi/third_party/typeshed/third_party/3/six/moves/cPickle.pyi jedi/third_party/typeshed/third_party/3/six/moves/configparser.pyi jedi/third_party/typeshed/third_party/3/six/moves/email_mime_base.pyi jedi/third_party/typeshed/third_party/3/six/moves/email_mime_multipart.pyi jedi/third_party/typeshed/third_party/3/six/moves/email_mime_nonmultipart.pyi jedi/third_party/typeshed/third_party/3/six/moves/email_mime_text.pyi jedi/third_party/typeshed/third_party/3/six/moves/html_entities.pyi jedi/third_party/typeshed/third_party/3/six/moves/html_parser.pyi jedi/third_party/typeshed/third_party/3/six/moves/http_client.pyi jedi/third_party/typeshed/third_party/3/six/moves/http_cookiejar.pyi jedi/third_party/typeshed/third_party/3/six/moves/http_cookies.pyi jedi/third_party/typeshed/third_party/3/six/moves/queue.pyi jedi/third_party/typeshed/third_party/3/six/moves/reprlib.pyi jedi/third_party/typeshed/third_party/3/six/moves/socketserver.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter_commondialog.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter_constants.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter_dialog.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter_filedialog.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter_tkfiledialog.pyi jedi/third_party/typeshed/third_party/3/six/moves/tkinter_ttk.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib_error.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib_parse.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib_request.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib_response.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib_robotparser.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib/__init__.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib/error.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib/parse.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib/request.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib/response.pyi jedi/third_party/typeshed/third_party/3/six/moves/urllib/robotparser.pyi jedi/third_party/typeshed/third_party/3/typed_ast/__init__.pyi jedi/third_party/typeshed/third_party/3/typed_ast/ast27.pyi jedi/third_party/typeshed/third_party/3/typed_ast/ast3.pyi jedi/third_party/typeshed/third_party/3/typed_ast/conversions.pyi test/__init__.py test/blabla_test_documentation.py test/conftest.py test/helpers.py test/refactor.py test/run.py test/test_cache.py test/test_compatibility.py test/test_debug.py test/test_integration.py test/test_settings.py test/test_speed.py test/test_utils.py test/completion/__init__.py test/completion/arrays.py test/completion/async_.py test/completion/basic.py test/completion/classes.py test/completion/completion.py test/completion/complex.py test/completion/comprehensions.py test/completion/context.py test/completion/decorators.py test/completion/definition.py test/completion/descriptors.py test/completion/docstring.py test/completion/dynamic_arrays.py test/completion/dynamic_params.py test/completion/flow_analysis.py test/completion/fstring.py test/completion/functions.py test/completion/generators.py test/completion/goto.py test/completion/imports.py test/completion/invalid.py test/completion/isinstance.py test/completion/keywords.py test/completion/lambdas.py test/completion/named_expression.py test/completion/named_param.py test/completion/on_import.py test/completion/ordering.py test/completion/parser.py test/completion/pep0484_basic.py test/completion/pep0484_comments.py test/completion/pep0484_overload.py test/completion/pep0484_typing.py test/completion/pep0526_variables.py test/completion/positional_only_params.py test/completion/precedence.py test/completion/recursion.py test/completion/stdlib.py test/completion/stubs.py test/completion/sys_path.py test/completion/types.py test/completion/usages.py test/completion/import_tree/__init__.py test/completion/import_tree/classes.py test/completion/import_tree/flow_import.py test/completion/import_tree/globals.py test/completion/import_tree/invisible_pkg.py test/completion/import_tree/mod1.py test/completion/import_tree/mod2.py test/completion/import_tree/random.py test/completion/import_tree/recurse_class1.py test/completion/import_tree/recurse_class2.py test/completion/import_tree/rename1.py test/completion/import_tree/rename2.py test/completion/import_tree/pkg/__init__.py test/completion/import_tree/pkg/mod1.py test/completion/stub_folder/stub_only.pyi test/completion/stub_folder/with_stub.py test/completion/stub_folder/with_stub.pyi test/completion/stub_folder/stub_only_folder/__init__.pyi test/completion/stub_folder/stub_only_folder/nested_stub_only.pyi test/completion/stub_folder/stub_only_folder/nested_with_stub.py test/completion/stub_folder/stub_only_folder/nested_with_stub.pyi test/completion/stub_folder/stub_only_folder/python_only.py test/completion/stub_folder/with_stub_folder/__init__.py test/completion/stub_folder/with_stub_folder/__init__.pyi test/completion/stub_folder/with_stub_folder/nested_stub_only.pyi test/completion/stub_folder/with_stub_folder/nested_with_stub.py test/completion/stub_folder/with_stub_folder/nested_with_stub.pyi test/completion/stub_folder/with_stub_folder/python_only.py test/completion/thirdparty/PyQt4_.py test/completion/thirdparty/django_.py test/completion/thirdparty/jedi_.py test/completion/thirdparty/psycopg2_.py test/completion/thirdparty/pylab_.py test/examples/README.rst test/examples/buildout_project/buildout.cfg test/examples/buildout_project/bin/app test/examples/buildout_project/bin/binary_file test/examples/buildout_project/bin/empty_file test/examples/buildout_project/src/proj_name/module_name.py test/examples/django/manage.py test/examples/django/app/__init__.py test/examples/django/app/models.py test/examples/inheritance/pkg/__init__.py test/examples/inheritance/pkg/module.py test/examples/issue1209/__init__.py test/examples/issue1209/api/__init__.py test/examples/issue1209/api/whatever/__init__.py test/examples/issue1209/api/whatever/api_test1.py test/examples/issue1209/whatever/__init__.py test/examples/issue1209/whatever/test.py test/examples/namespace_package_relative_import/rel1.py test/examples/namespace_package_relative_import/rel2.py test/examples/stub_packages/no_python-stubs/__init__.pyi test/examples/stub_packages/with_python/__init__.py test/examples/stub_packages/with_python/module.py test/examples/stub_packages/with_python-stubs/__init__.pyi test/examples/stub_packages/with_python-stubs/module.pyi test/examples/typing_overload/file.py test/examples/typing_overload/file.pyi test/refactor/extract.py test/refactor/inline.py test/refactor/rename.py test/speed/precedence.py test/static_analysis/attribute_error.py test/static_analysis/attribute_warnings.py test/static_analysis/branches.py test/static_analysis/builtins.py test/static_analysis/class_simple.py test/static_analysis/comprehensions.py test/static_analysis/descriptors.py test/static_analysis/generators.py test/static_analysis/imports.py test/static_analysis/iterable.py test/static_analysis/keywords.py test/static_analysis/normal_arguments.py test/static_analysis/operations.py test/static_analysis/python2.py test/static_analysis/star_arguments.py test/static_analysis/try_except.py test/static_analysis/with_.py test/static_analysis/import_tree/__init__.py test/static_analysis/import_tree/a.py test/static_analysis/import_tree/b.py test/test_api/__init__.py test/test_api/test_analysis.py test/test_api/test_api.py test/test_api/test_api_classes_follow_definition.py test/test_api/test_call_signatures.py test/test_api/test_classes.py test/test_api/test_completion.py test/test_api/test_defined_names.py test/test_api/test_environment.py test/test_api/test_full_name.py test/test_api/test_interpreter.py test/test_api/test_keyword.py test/test_api/test_project.py test/test_api/test_settings.py test/test_api/test_signatures.py test/test_api/test_unicode.py test/test_api/test_usages.py test/test_api/import_tree_for_usages/__init__.py test/test_api/import_tree_for_usages/a.py test/test_api/import_tree_for_usages/b.py test/test_api/simple_import/__init__.py test/test_api/simple_import/module.py test/test_api/simple_import/module2.py test/test_inference/__init__.py test/test_inference/test_absolute_import.py test/test_inference/test_annotations.py test/test_inference/test_buildout_detection.py test/test_inference/test_compiled.py test/test_inference/test_context.py test/test_inference/test_docstring.py test/test_inference/test_extension.py test/test_inference/test_fstring.py test/test_inference/test_helpers.py test/test_inference/test_implicit_namespace_package.py test/test_inference/test_imports.py test/test_inference/test_literals.py test/test_inference/test_mixed.py test/test_inference/test_namespace_package.py test/test_inference/test_precedence.py test/test_inference/test_pyc.py test/test_inference/test_representation.py test/test_inference/test_signature.py test/test_inference/test_stdlib.py test/test_inference/test_sys_path.py test/test_inference/absolute_import/local_module.py test/test_inference/absolute_import/unittest.py test/test_inference/flask-site-packages/flask_foo.py test/test_inference/flask-site-packages/flask/__init__.py test/test_inference/flask-site-packages/flask/ext/__init__.py test/test_inference/flask-site-packages/flask_baz/__init__.py test/test_inference/flask-site-packages/flaskext/__init__.py test/test_inference/flask-site-packages/flaskext/bar.py test/test_inference/flask-site-packages/flaskext/moo/__init__.py test/test_inference/implicit_namespace_package/ns1/pkg/ns1_file.py test/test_inference/implicit_namespace_package/ns2/pkg/ns2_file.py test/test_inference/implicit_nested_namespaces/namespace/pkg/module.py test/test_inference/init_extension_module/__init__.cpython-34m.so test/test_inference/init_extension_module/module.c test/test_inference/init_extension_module/setup.py test/test_inference/namespace_package/ns1/pkg/__init__.py test/test_inference/namespace_package/ns1/pkg/ns1_file.py test/test_inference/namespace_package/ns1/pkg/ns1_folder/__init__.py test/test_inference/namespace_package/ns2/pkg/ns2_file.py test/test_inference/namespace_package/ns2/pkg/ns2_folder/__init__.py test/test_inference/namespace_package/ns2/pkg/ns2_folder/nested/__init__.py test/test_inference/nested_namespaces/__init__.py test/test_inference/nested_namespaces/namespace/__init__.py test/test_inference/nested_namespaces/namespace/pkg/__init__.py test/test_inference/not_in_sys_path/__init__.py test/test_inference/not_in_sys_path/not_in_sys_path.py test/test_inference/not_in_sys_path/not_in_sys_path_package/__init__.py test/test_inference/not_in_sys_path/not_in_sys_path_package/module.py test/test_inference/not_in_sys_path/pkg/__init__.py test/test_inference/not_in_sys_path/pkg/module.py test/test_inference/sample_venvs/pth_directory/egg_link.egg-link test/test_inference/sample_venvs/pth_directory/foo.pth test/test_inference/sample_venvs/pth_directory/import_smth.pth test/test_inference/sample_venvs/pth_directory/relative.egg-link test/test_inference/sample_venvs/pth_directory/smth.py test/test_inference/sample_venvs/pth_directory/dir-from-foo-pth/__init__.py test/test_inference/test_gradual/test_conversion.py test/test_inference/test_gradual/test_stub_loading.py test/test_inference/test_gradual/test_stubs.py test/test_inference/test_gradual/test_typeshed.py test/test_inference/zipped_imports/not_pkg.zip test/test_inference/zipped_imports/pkg.zip test/test_parso_integration/test_basic.py test/test_parso_integration/test_error_correction.py test/test_parso_integration/test_parser_utils.pyjedi-0.15.2/test/0000775000175000017500000000000013577125145013365 5ustar davedave00000000000000jedi-0.15.2/test/completion/0000775000175000017500000000000013577125145015536 5ustar davedave00000000000000jedi-0.15.2/test/completion/arrays.py0000664000175000017500000001341613577124112017407 0ustar davedave00000000000000# ----------------- # basic array lookups # ----------------- #? int() [1,""][0] #? str() [1,""][1] #? int() str() [1,""][2] #? int() str() [1,""][20] #? int() str() [1,""][str(hello)] a = list() #? list() [a][0] #? list() [[a,a,a]][2][100] c = [[a,""]] #? str() c[0][1] b = [6,7] #? int() b[8-7] # Something unreasonable: #? int() b[''] # ----------------- # Slices # ----------------- #? list() b[8:] #? list() b[int():] #? list() b[:] #? 3 b[:] #? int() b[:, 1] #? int() b[:1, 1] #? int() b[1:1, 1] #? int() b[1:1:, ...] #? int() b[1:1:5, ...] class _StrangeSlice(): def __getitem__(self, sliced): return sliced # Should not result in an error, just because the slice itself is returned. #? slice() _StrangeSlice()[1:2] # ----------------- # iterable multiplication # ----------------- a = ['']*2 #? list() a # ----------------- # tuple assignments # ----------------- a1, b1 = (1, "") #? int() a1 #? str() b1 (a2, b2) = (1, "") #? int() a2 #? str() b2 # list assignment [list1, list2] = (1, "") #? int() list1 #? str() list2 [list3, list4] = [1, ""] #? int() list3 #? str() list4 # ----------------- # subtuple assignment # ----------------- (a3, (b3, c3)) = (1, ("", list)) #? list c3 a4, (b4, c4) = (1, ("", list)) #? list c4 #? int() a4 #? str() b4 # ----------------- # multiple assignments # ----------------- a = b = 1 #? int() a #? int() b (a, b) = (c, (e, f)) = ('2', (3, 4)) #? str() a #? tuple() b #? str() c #? int() e #? int() f # ----------------- # unnessecary braces # ----------------- a = (1) #? int() a #? int() (1) #? int() ((1)) #? int() ((1)+1) u, v = 1, "" #? int() u ((u1, v1)) = 1, "" #? int() u1 #? int() (u1) (a), b = 1, '' #? int() a def a(): return '' #? str() (a)() #? str() (a)().title() #? int() (tuple).index() #? int() (tuple)().index() class C(): def __init__(self): self.a = (str()).upper() #? str() C().a # ----------------- # imbalanced sides # ----------------- (f, g) = (1,) #? int() f #? [] g. (f, g, h) = (1,'') #? int() f #? str() g #? [] h. (f1, g1) = 1 #? [] f1. #? [] g1. (f, g) = (1,'',1.0) #? int() f #? str() g # ----------------- # dicts # ----------------- dic2 = {'asdf': 3, 'b': 'str'} #? int() dic2['asdf'] #? None int() str() dic2.get('asdf') # string literal #? int() dic2[r'asdf'] #? int() dic2[r'asdf'] #? int() dic2[r'as' 'd' u'f'] #? int() str() dic2['just_something'] # unpacking a, b = dic2 #? str() a a, b = {1: 'x', 2.0: 1j} #? int() float() a #? int() float() b def f(): """ github #83 """ r = {} r['status'] = (200, 'ok') return r #? dict() f() # completion within dicts #? 9 ['str'] {str: str} # iteration problem (detected with sith) d = dict({'a':''}) def y(a): return a #? y(**d) #? str() d['a'] # problem with more complicated casts dic = {str(key): ''} #? str() dic[''] # Just skip Python 2 tests from here. EoL soon, I'm too lazy for it. # python > 2.7 for x in {1: 3.0, '': 1j}: #? int() str() x #? ['__iter__'] dict().values().__iter__ d = dict(a=3, b='') x, = d.values() #? int() str() x #? int() d['a'] #? int() str() None d.get('a') some_dct = dict({'a': 1, 'b': ''}, a=1.0) #? float() some_dct['a'] #? str() some_dct['b'] #? int() float() str() some_dct['c'] # ----------------- # with variable as index # ----------------- a = (1, "") index = 1 #? str() a[index] # these should just ouput the whole array index = int #? int() str() a[index] index = int() #? int() str() a[index] # dicts index = 'asdf' dic2 = {'asdf': 3, 'b': 'str'} #? int() dic2[index] # ----------------- # __getitem__ # ----------------- class GetItem(): def __getitem__(self, index): return 1.0 #? float() GetItem()[0] class GetItem(): def __init__(self, el): self.el = el def __getitem__(self, index): return self.el #? str() GetItem("")[1] class GetItemWithList(): def __getitem__(self, index): return [1, 1.0, 's'][index] #? float() GetItemWithList()[1] for i in 0, 2: #? int() str() GetItemWithList()[i] # With super class SuperYeah(list): def __getitem__(self, index): return super()[index] #? SuperYeah([1])[0] #? SuperYeah()[0] # ----------------- # conversions # ----------------- a = [1, ""] #? int() str() list(a)[1] #? int() str() list(a)[0] #? set(a)[0] #? int() str() list(set(a))[1] #? int() str() next(iter(set(a))) #? int() str() list(list(set(a)))[1] # does not yet work, because the recursion catching is not good enough (catches # to much) #? int() str() list(set(list(set(a))))[1] #? int() str() list(set(set(a)))[1] # frozenset #? int() str() list(frozenset(a))[1] #? int() str() list(set(frozenset(a)))[1] # iter #? int() str() list(iter(a))[1] #? int() str() list(iter(list(set(a))))[1] # tuple #? int() str() tuple(a)[1] #? int() str() tuple(list(set(a)))[1] #? int() tuple((1,))[0] # implementation detail for lists, should not be visible #? [] list().__iterable # With a list comprehension. for i in set(a for a in [1]): #? int() i # ----------------- # Merged Arrays # ----------------- for x in [1] + ['']: #? int() str() x # ----------------- # Potential Recursion Issues # ----------------- class X(): def y(self): self.a = [1] def x(self): self.a = list(self.a) #? int() self.a[0] # ----------------- # For loops with attribute assignment. # ----------------- def test_func(): x = 'asdf' for x.something in [6,7,8]: pass #? str() x for x.something, b in [[6, 6.0]]: pass #? str() x #? int() tuple({1})[0] # python >= 3.4 # ----------------- # PEP 3132 Extended Iterable Unpacking (star unpacking) # ----------------- a, *b, c = [1, 'b', list, dict] #? int() a #? b #? list c # Not valid syntax a, *b, *c = [1, 'd', list] #? int() a #? b #? c lc = [x for a, *x in [(1, '', 1.0)]] #? lc[0][0] #? lc[0][1] jedi-0.15.2/test/completion/parser.py0000664000175000017500000000134613577124112017401 0ustar davedave00000000000000""" Issues with the parser and not the type inference should be part of this file. """ class IndentIssues(): """ issue jedi-vim#288 Which is really a fast parser issue. It used to start a new block at the parentheses, because it had problems with the indentation. """ def one_param( self, ): return 1 def with_param( self, y): return y #? int() IndentIssues().one_param() #? str() IndentIssues().with_param('') """ Just because there's a def keyword, doesn't mean it should not be able to complete to definition. """ definition = 0 #? ['definition'] str(def # It might be hard to determine the value class Foo(object): @property #? ['str'] def bar(str jedi-0.15.2/test/completion/classes.py0000664000175000017500000002243113577124112017540 0ustar davedave00000000000000def find_class(): """ This scope is special, because its in front of TestClass """ #? ['ret'] TestClass.ret if 1: #? ['ret'] TestClass.ret class FindClass(): #? [] TestClass.ret if a: #? [] TestClass.ret def find_class(self): #? ['ret'] TestClass.ret if 1: #? ['ret'] TestClass.ret #? [] FindClass().find_class.self #? [] FindClass().find_class.self.find_class # set variables, which should not be included, because they don't belong to the # class second = 1 second = "" class TestClass(object): var_class = TestClass(1) self.pseudo_var = 3 def __init__(self2, first_param, second_param, third=1.0): self2.var_inst = first_param self2.second = second_param self2.first = first_param self2.first.var_on_argument = 5 a = 3 def var_func(self): return 1 def get_first(self): # traversal self.second_new = self.second return self.var_inst def values(self): self.var_local = 3 #? ['var_class', 'var_func', 'var_inst', 'var_local'] self.var_ #? var_local def ret(self, a1): # should not know any class functions! #? [] values #? values #? ['return'] ret return a1 # should not work #? [] var_local #? [] var_inst #? [] var_func # instance inst = TestClass(1) #? ['var_class', 'var_func', 'var_inst', 'var_local'] inst.var #? ['var_class', 'var_func'] TestClass.var #? int() inst.var_local #? [] TestClass.var_local. #? TestClass.pseudo_var #? TestClass().pseudo_var #? int() TestClass().ret(1) # Should not return int(), because we want the type before `.ret(1)`. #? 11 TestClass() TestClass().ret(1) #? int() inst.ret(1) myclass = TestClass(1, '', 3.0) #? int() myclass.get_first() #? [] myclass.get_first.real # too many params #? int() TestClass(1,1,1).var_inst # too few params #? int() TestClass(1).first #? [] TestClass(1).second. # complicated variable settings in class #? str() myclass.second #? str() myclass.second_new # multiple classes / ordering ints = TestClass(1, 1.0) strs = TestClass("", '') #? float() ints.second #? str() strs.second #? ['var_class'] TestClass.var_class.var_class.var_class.var_class # operations (+, *, etc) shouldn't be InstanceElements - #246 class A(): def __init__(self): self.addition = 1 + 2 #? int() A().addition # should also work before `=` #? 8 int() A().addition = None #? 8 int() A(1).addition = None #? 1 A A(1).addition = None a = A() #? 8 int() a.addition = None # ----------------- # inheritance # ----------------- class Base(object): def method_base(self): return 1 class SuperClass(Base): class_super = 3 def __init__(self): self.var_super = '' def method_super(self): self.var2_super = list class Mixin(SuperClass): def method_mixin(self): return int #? 20 SuperClass class SubClass(SuperClass): class_sub = 3 def __init__(self): self.var_sub = '' def method_sub(self): self.var_sub = list return tuple instance = SubClass() #? ['method_base', 'method_sub', 'method_super'] instance.method_ #? ['var2_super', 'var_sub', 'var_super'] instance.var #? ['class_sub', 'class_super'] instance.class_ #? ['method_base', 'method_sub', 'method_super'] SubClass.method_ #? [] SubClass.var #? ['class_sub', 'class_super'] SubClass.class_ # ----------------- # inheritance of builtins # ----------------- class Base(str): pass #? ['upper'] Base.upper #? ['upper'] Base().upper # ----------------- # dynamic inheritance # ----------------- class Angry(object): def shout(self): return 'THIS IS MALARKEY!' def classgetter(): return Angry class Dude(classgetter()): def react(self): #? ['shout'] self.s # ----------------- # multiple inheritance # 1071 # ----------------- class FactorMixin(object): FACTOR_1 = 0.1 class Calc(object): def sum(self, a, b): self.xxx = 3 return a + b class BetterCalc(Calc, FactorMixin): def multiply_factor(self, a): return a * self.FACTOR_1 calc = BetterCalc() #? ['sum'] calc.sum #? ['multiply_factor'] calc.multip #? ['FACTOR_1'] calc.FACTOR_1 #? ['xxx'] calc.xxx # ----------------- # __call__ # ----------------- class CallClass(): def __call__(self): return 1 #? int() CallClass()() # ----------------- # variable assignments # ----------------- class V: def __init__(self, a): self.a = a def ret(self): return self.a d = b b = ret if 1: c = b #? int() V(1).b() #? int() V(1).c() #? V(1).d() # Only keywords should be possible to complete. #? ['is', 'in', 'not', 'and', 'or', 'if'] V(1).d() # ----------------- # ordering # ----------------- class A(): def b(self): #? int() a_func() #? str() self.a_func() return a_func() def a_func(self): return "" def a_func(): return 1 #? int() A().b() #? str() A().a_func() # ----------------- # nested classes # ----------------- class A(): class B(): pass def b(self): return 1.0 #? float() A().b() class A(): def b(self): class B(): def b(self): return [] return B().b() #? list() A().b() # ----------------- # ducktyping # ----------------- def meth(self): return self.a, self.b class WithoutMethod(): a = 1 def __init__(self): self.b = 1.0 def blub(self): return self.b m = meth class B(): b = '' a = WithoutMethod().m() #? int() a[0] #? float() a[1] #? float() WithoutMethod.blub(WithoutMethod()) #? str() WithoutMethod.blub(B()) # ----------------- # __getattr__ / getattr() / __getattribute__ # ----------------- #? str().upper getattr(str(), 'upper') #? str.upper getattr(str, 'upper') # some strange getattr calls #? getattr(str, 1) #? getattr() #? getattr(str) #? getattr(getattr, 1) #? getattr(str, []) class Base(): def ret(self, b): return b class Wrapper(): def __init__(self, obj): self.obj = obj def __getattr__(self, name): return getattr(self.obj, name) class Wrapper2(): def __getattribute__(self, name): return getattr(Base(), name) #? int() Wrapper(Base()).ret(3) #? int() Wrapper2(Base()).ret(3) class GetattrArray(): def __getattr__(self, name): return [1] #? int() GetattrArray().something[0] # ----------------- # private vars # ----------------- class PrivateVar(): def __init__(self): self.__var = 1 #? int() self.__var #? ['__var'] self.__var def __private_func(self): return 1 #? int() __private_func() def wrap_private(self): return self.__private_func() #? [] PrivateVar().__var #? PrivateVar().__var #? [] PrivateVar().__private_func #? [] PrivateVar.__private_func #? int() PrivateVar().wrap_private() class PrivateSub(PrivateVar): def test(self): #? [] self.__var def wrap_private(self): #? [] self.__var #? [] PrivateSub().__var # ----------------- # super # ----------------- class Super(object): a = 3 def return_sup(self): return 1 SuperCopy = Super class TestSuper(Super): #? super() def test(self): #? SuperCopy() super() #? ['a'] super().a if 1: #? SuperCopy() super() def a(): #? super() def return_sup(self): #? int() return super().return_sup() #? int() TestSuper().return_sup() Super = 3 class Foo(): def foo(self): return 1 # Somehow overwriting the same name caused problems (#1044) class Foo(Foo): def foo(self): #? int() super().foo() # ----------------- # if flow at class level # ----------------- class TestX(object): def normal_method(self): return 1 if True: def conditional_method(self): var = self.normal_method() #? int() var return 2 def other_method(self): var = self.conditional_method() #? int() var # ----------------- # mro method # ----------------- class A(object): a = 3 #? ['mro'] A.mro #? [] A().mro # ----------------- # mro resolution # ----------------- class B(A()): b = 3 #? B.a #? B().a #? int() B.b #? int() B().b # ----------------- # With import # ----------------- from import_tree.classes import Config2, BaseClass class Config(BaseClass): """#884""" #? Config2() Config.mode #? int() Config.mode2 # ----------------- # Nested class/def/class # ----------------- class Foo(object): a = 3 def create_class(self): class X(): a = self.a self.b = 3.0 return X #? int() Foo().create_class().a #? float() Foo().b class Foo(object): def comprehension_definition(self): return [1 for self.b in [1]] #? int() Foo().b # ----------------- # default arguments # ----------------- default = '' class DefaultArg(): default = 3 def x(self, arg=default): #? str() default return arg def y(self): return default #? int() DefaultArg().x() #? str() DefaultArg().y() #? int() DefaultArg.x() #? str() DefaultArg.y() jedi-0.15.2/test/completion/pep0484_typing.py0000664000175000017500000002120513577124112020577 0ustar davedave00000000000000""" Test the typing library, with docstrings. This is needed since annotations are not supported in python 2.7 else then annotating by comment (and this is still TODO at 2016-01-23) """ import typing class B: pass def we_can_has_sequence(p, q, r, s, t, u): """ :type p: typing.Sequence[int] :type q: typing.Sequence[B] :type r: typing.Sequence[int] :type s: typing.Sequence["int"] :type t: typing.MutableSequence[dict] :type u: typing.List[float] """ #? ["count"] p.c #? int() p[1] #? ["count"] q.c #? B() q[1] #? ["count"] r.c #? int() r[1] #? ["count"] s.c #? int() s[1] #? [] s.a #? ["append"] t.a #? dict() t[1] #? ["append"] u.a #? float() list() u[1.0] #? float() u[1] def iterators(ps, qs, rs, ts): """ :type ps: typing.Iterable[int] :type qs: typing.Iterator[str] :type rs: typing.Sequence["ForwardReference"] :type ts: typing.AbstractSet["float"] """ for p in ps: #? int() p #? next(ps) a, b = ps #? int() a ##? int() --- TODO fix support for tuple assignment # https://github.com/davidhalter/jedi/pull/663#issuecomment-172317854 # test below is just to make sure that in case it gets fixed by accident # these tests will be fixed as well the way they should be #? b for q in qs: #? str() q #? str() next(qs) for r in rs: #? ForwardReference() r #? next(rs) for t in ts: #? float() t def sets(p, q): """ :type p: typing.AbstractSet[int] :type q: typing.MutableSet[float] """ #? [] p.a #? ["add"] q.a def tuple(p, q, r): """ :type p: typing.Tuple[int] :type q: typing.Tuple[int, str, float] :type r: typing.Tuple[B, ...] """ #? int() p[0] #? ['index'] p.index #? int() q[0] #? str() q[1] #? float() q[2] #? B() r[0] #? B() r[1] #? B() r[2] #? B() r[10000] i, s, f = q #? int() i #? str() s #? float() f class Key: pass class Value: pass def mapping(p, q, d, dd, r, s, t): """ :type p: typing.Mapping[Key, Value] :type q: typing.MutableMapping[Key, Value] :type d: typing.Dict[Key, Value] :type dd: typing.DefaultDict[Key, Value] :type r: typing.KeysView[Key] :type s: typing.ValuesView[Value] :type t: typing.ItemsView[Key, Value] """ #? [] p.setd #? ["setdefault"] q.setd #? ["setdefault"] d.setd #? ["setdefault"] dd.setd #? Value() p[1] for key in p: #? Key() key for key in p.keys(): #? Key() key for value in p.values(): #? Value() value for item in p.items(): #? Key() item[0] #? Value() item[1] (key, value) = item #? Key() key #? Value() value for key, value in p.items(): #? Key() key #? Value() value for key, value in q.items(): #? Key() key #? Value() value for key, value in d.items(): #? Key() key #? Value() value for key, value in dd.items(): #? Key() key #? Value() value for key in r: #? Key() key for value in s: #? Value() value for key, value in t: #? Key() key #? Value() value def union(p, q, r, s, t): """ :type p: typing.Union[int] :type q: typing.Union[int, int] :type r: typing.Union[int, str, "int"] :type s: typing.Union[int, typing.Union[str, "typing.Union['float', 'dict']"]] :type t: typing.Union[int, None] """ #? int() p #? int() q #? int() str() r #? int() str() float() dict() s #? int() None t def optional(p): """ :type p: typing.Optional[int] Optional does not do anything special. However it should be recognised as being of that type. Jedi doesn't do anything with the extra into that it can be None as well """ #? int() None p class ForwardReference: pass class TestDict(typing.Dict[str, int]): def setdud(self): pass def testdict(x): """ :type x: TestDict """ #? ["setdud", "setdefault"] x.setd for key in x.keys(): #? str() key for value in x.values(): #? int() value x = TestDict() #? ["setdud", "setdefault"] x.setd for key in x.keys(): #? str() key for value in x.values(): #? int() value WrappingType = typing.NewType('WrappingType', str) # Chosen arbitrarily y = WrappingType(0) # Per https://github.com/davidhalter/jedi/issues/1015#issuecomment-355795929 #? str() y def testnewtype(y): """ :type y: WrappingType """ #? str() y #? ["upper"] y.u WrappingType2 = typing.NewType() def testnewtype2(y): """ :type y: WrappingType2 """ #? y #? [] y. # python >= 3.4 class TestDefaultDict(typing.DefaultDict[str, int]): def setdud(self): pass def testdict(x): """ :type x: TestDefaultDict """ #? ["setdud", "setdefault"] x.setd for key in x.keys(): #? str() key for value in x.values(): #? int() value x = TestDefaultDict() #? ["setdud", "setdefault"] x.setd for key in x.keys(): #? str() key for value in x.values(): #? int() value # python >= 3.4 """ docstrings have some auto-import, annotations can use all of Python's import logic """ import typing as t def union2(x: t.Union[int, str]): #? int() str() x from typing import Union def union3(x: Union[int, str]): #? int() str() x from typing import Union as U def union4(x: U[int, str]): #? int() str() x # ------------------------- # Type Vars # ------------------------- TYPE_VARX = typing.TypeVar('TYPE_VARX') TYPE_VAR_CONSTRAINTSX = typing.TypeVar('TYPE_VAR_CONSTRAINTSX', str, int) # TODO there should at least be some results. #? [] TYPE_VARX. #! ["TYPE_VARX = typing.TypeVar('TYPE_VARX')"] TYPE_VARX class WithTypeVar(typing.Generic[TYPE_VARX]): def lala(self) -> TYPE_VARX: ... def maaan(p: WithTypeVar[int]): #? int() p.lala() def in_out1(x: TYPE_VARX) -> TYPE_VARX: ... #? int() in_out1(1) #? str() in_out1("") #? str() in_out1(str()) #? in_out1() def type_in_out1(x: typing.Type[TYPE_VARX]) -> TYPE_VARX: ... #? int() type_in_out1(int) #? str() type_in_out1(str) #? float() type_in_out1(float) #? type_in_out1() def in_out2(x: TYPE_VAR_CONSTRAINTSX) -> TYPE_VAR_CONSTRAINTSX: ... #? int() in_out2(1) #? str() in_out2("") #? str() in_out2(str()) #? str() int() in_out2() # TODO this should actually be str() int(), because of the constraints. #? float() in_out2(1.0) def type_in_out2(x: typing.Type[TYPE_VAR_CONSTRAINTSX]) -> TYPE_VAR_CONSTRAINTSX: ... #? int() type_in_out2(int) #? str() type_in_out2(str) #? str() int() type_in_out2() # TODO this should actually be str() int(), because of the constraints. #? float() type_in_out2(float) def ma(a: typing.Callable[[str], TYPE_VARX]) -> typing.Callable[[str], TYPE_VARX]: return a def mf(s: str) -> int: return int(s) #? int() ma(mf)('2') def xxx(x: typing.Iterable[TYPE_VARX]) -> typing.Tuple[str, TYPE_VARX]: ... #? str() xxx([0])[0] #? int() xxx([0])[1] #? xxx([0])[2] def call_pls() -> typing.Callable[[TYPE_VARX], TYPE_VARX]: ... #? int() call_pls()(1) def call2_pls() -> typing.Callable[[str, typing.Callable[[int], TYPE_VARX]], TYPE_VARX]: ... #? float() call2_pls('')(1, lambda x: 3.0) def call3_pls() -> typing.Callable[[typing.Callable[[int], TYPE_VARX]], typing.List[TYPE_VARX]]: ... def the_callable() -> float: ... #? float() call3_pls()(the_callable)[0] # ------------------------- # TYPE_CHECKING # ------------------------- if typing.TYPE_CHECKING: with_type_checking = 1 else: without_type_checking = 1.0 #? int() with_type_checking #? without_type_checking def foo(a: typing.List, b: typing.Dict, c: typing.MutableMapping) -> typing.Type[int]: #? ['append'] a.appen #? list() a #? a[0] #? ['setdefault'] b.setd #? ['setdefault'] c.setd #? typing.MutableMapping() c #? c['asdf'] #? int foo() # ------------------------- # cast # ------------------------- def cast_tests(): x = 3.0 y = typing.cast(int, x) #? int() y return typing.cast(str, x) #? str() cast_tests() # ------------------------- # dynamic # ------------------------- def dynamic_annotation(x: int): #? int() return x #? int() dynamic_annotation('') jedi-0.15.2/test/completion/dynamic_arrays.py0000664000175000017500000001237013577124112021111 0ustar davedave00000000000000""" Checking for ``list.append`` and all the other possible array modifications. """ # ----------------- # list.append # ----------------- arr = [] for a in [1,2]: arr.append(a); arr.append # should not cause an exception arr.append() # should not cause an exception #? int() arr[10] arr = [tuple()] for a in [1,2]: arr.append(a); #? int() tuple() arr[10] #? int() arr[10].index() arr = list([]) arr.append(1) #? int() arr[0] # ----------------- # list.insert # ----------------- arr = [""] arr.insert(0, 1.0) # on exception due to this, please! arr.insert(0) arr.insert() #? float() str() arr[10] for a in arr: #? float() str() a #? float() str() list(arr)[10] # ----------------- # list.extend / set.update # ----------------- arr = [1.0] arr.extend([1,2,3]) arr.extend([]) arr.extend("") arr.extend(list) # should ignore #? float() int() str() arr[100] a = set(arr) a.update(list(["", 1])) #? float() int() str() list(a)[0] # ----------------- # set/list initialized as functions # ----------------- st = set() st.add(1) #? int() for s in st: s lst = list() lst.append(1) #? int() for i in lst: i # ----------------- # renames / type changes # ----------------- arr = [] arr2 = arr arr2.append('') #? str() arr2[0] lst = [1] lst.append(1.0) s = set(lst) s.add("ahh") lst = list(s) lst.append({}) #? dict() int() float() str() lst[0] # should work with tuple conversion, too. #? dict() int() float() str() tuple(lst)[0] # but not with an iterator #? iter(lst)[0] # ----------------- # complex including += # ----------------- class C(): pass class D(): pass class E(): pass lst = [1] lst.append(1.0) lst += [C()] s = set(lst) s.add("") s += [D()] lst = list(s) lst.append({}) lst += [E()] #? dict() int() float() str() C() D() E() lst[0] # ----------------- # functions # ----------------- def arr_append(arr4, a): arr4.append(a) def add_to_arr(arr2, a): arr2.append(a) return arr2 def app(a): arr3.append(a) arr3 = [1.0] res = add_to_arr(arr3, 1) arr_append(arr3, 'str') app(set()) #? float() str() int() set() arr3[10] #? float() str() int() set() res[10] # ----------------- # returns, special because the module dicts are not correct here. # ----------------- def blub(): a = [] a.append(1.0) #? float() a[0] return a #? float() blub()[0] # list with default def blub(): a = list([1]) a.append(1.0) return a #? int() float() blub()[0] # empty list def blub(): a = list() a.append(1.0) return a #? float() blub()[0] # with if def blub(): if 1: a = [] a.append(1.0) return a #? float() blub()[0] # with else clause def blub(): if random.choice([0, 1]): 1 else: a = [] a.append(1) return a #? int() blub()[0] # ----------------- # returns, the same for classes # ----------------- class C(): def blub(self, b): if 1: a = [] a.append(b) return a def blub2(self): """ mapper function """ a = self.blub(1.0) #? float() a[0] return a def literal_arr(self, el): self.a = [] self.a.append(el) #? int() self.a[0] return self.a def list_arr(self, el): self.b = list([]) self.b.append(el) #? float() self.b[0] return self.b #? int() C().blub(1)[0] #? float() C().blub2(1)[0] #? int() C().a[0] #? int() C().literal_arr(1)[0] #? float() C().b[0] #? float() C().list_arr(1.0)[0] # ----------------- # array recursions # ----------------- a = set([1.0]) a.update(a) a.update([1]) #? float() int() list(a)[0] def first(a): b = [] b.append(a) b.extend(second(a)) return list(b) def second(a): b = [] b.extend(first(a)) return list(b) #? float() first(1.0)[0] def third(): b = [] b.extend extend() b.extend(first()) return list(b) #? third()[0] # ----------------- # set.add # ----------------- st = {1.0} for a in [1,2]: st.add(a) st.append('') # lists should not have an influence st.add # should not cause an exception st.add() st = {1.0} st.add(1) lst = list(st) lst.append('') #? float() int() str() lst[0] # ----------------- # list setitem # ----------------- some_lst = [int] some_lst[3] = str #? int some_lst[0] #? str some_lst[3] #? int str some_lst[2] some_lst[0] = tuple #? tuple some_lst[0] #? int str tuple some_lst[1] some_lst2 = list([1]) some_lst2[3] = '' #? int() str() some_lst2[0] #? str() some_lst2[3] #? int() str() some_lst2[2] some_lst3 = [] some_lst3[0] = 3 some_lst3[:] = '' # Is ignored for now. #? int() some_lst3[0] # ----------------- # set setitem/other modifications (should not work) # ----------------- some_set = {int} some_set[3] = str #? int some_set[0] #? int some_set[3] something = object() something[3] = str #? something[0] #? something[3] # ----------------- # dict setitem # ----------------- some_dct = {'a': float, 1: int} some_dct['x'] = list some_dct['y'] = tuple #? list some_dct['x'] #? int float list tuple some_dct['unknown'] #? float some_dct['a'] some_dct = dict({'a': 1, 1: ''}) #? int() str() some_dct['la'] #? int() some_dct['a'] some_dct['x'] = list some_dct['y'] = tuple #? list some_dct['x'] #? int() str() list tuple some_dct['unknown'] #? int() some_dct['a'] jedi-0.15.2/test/completion/invalid.py0000664000175000017500000000523613577124112017535 0ustar davedave00000000000000""" This file is less about the results and much more about the fact, that no exception should be thrown. Basically this file could change depending on the current implementation. But there should never be any errors. """ # wait until keywords are out of definitions (pydoc function). #? 5 's'() #? [] str()).upper # ----------------- # funcs # ----------------- def asdf(a or b): # multiple param names return a #? asdf(2) asdf = '' from a import (b def blub(): return 0 def wrong_indents(): asdf = 3 asdf asdf( # TODO this seems to be wrong now? #? int() asdf def openbrace(): asdf = 3 asdf( #? int() asdf return 1 #? int() openbrace() blub([ #? int() openbrace() def indentfault(): asd( indentback #? [] indentfault(). def openbrace2(): asd( def normalfunc(): return 1 #? int() normalfunc() # dots in param def f(seq1...=None): return seq1 #? f(1) @ def test_empty_decorator(): return 1 #? int() test_empty_decorator() def invalid_param(param=): #? param # ----------------- # flows # ----------------- # first part not complete (raised errors) if a a else: #? ['AttributeError'] AttributeError try #? ['AttributeError'] except AttributeError pass finally: pass #? ['isinstance'] if isi try: except TypeError: #? str() str() def break(): pass # wrong ternary expression a = '' a = 1 if #? str() a # No completions for for loops without the right syntax for for_local in : for_local #? [] for_local #? for_local # ----------------- # list comprehensions # ----------------- a2 = [for a2 in [0]] #? a2[0] a3 = [for xyz in] #? a3[0] a3 = [a4 for in 'b'] #? a3[0] a3 = [a4 for a in for x in y] #? a3[0] a = [for a in def break(): pass #? str() a[0] a = [a for a in [1,2] def break(): pass #? str() a[0] #? [] int()).real # ----------------- # keywords # ----------------- #! [] as def empty_assert(): x = 3 assert #? int() x import datetime as # ----------------- # statements # ----------------- call = '' invalid = .call #? invalid invalid = call?.call #? str() invalid # comma invalid = ,call #? str() invalid # ----------------- # classes # ----------------- class BrokenPartsOfClass(): def foo(self): # This construct contains two places where Jedi with Python 3 can fail. # It should just ignore those constructs and still execute `bar`. pass if 2: try: pass except ValueError, e: raise TypeError, e else: pass def bar(self): self.x = 3 return '' #? str() BrokenPartsOfClass().bar() jedi-0.15.2/test/completion/pep0484_overload.py0000664000175000017500000000224113577124112021077 0ustar davedave00000000000000# python >= 3.6 from typing import List, Dict, overload lst: list list_alias: List list_str: List[str] list_str: List[int] # ------------------------- # With base classes # ------------------------- @overload def overload_f2(value: List) -> str: ... @overload def overload_f2(value: Dict) -> int: ... #? str() overload_f2(['']) #? int() overload_f2({1.0: 1.0}) #? str() overload_f2(lst) #? str() overload_f2(list_alias) #? str() overload_f2(list_str) @overload def overload_f3(value: list) -> str: ... @overload def overload_f3(value: dict) -> float: ... #? str() overload_f3(['']) #? float() overload_f3({1.0: 1.0}) #? str() overload_f3(lst) #? str() overload_f3(list_alias) #? str() overload_f3(list_str) # ------------------------- # Generics Matching # ------------------------- @overload def overload_f1(value: List[str]) -> str: ... @overload def overload_f1(value: Dict[str, str]) -> Dict[str, str]: ... def overload_f1(): pass #? str() overload_f1(['']) #? str() dict() overload_f1(1) #? dict() overload_f1({'': ''}) #? str() dict() overload_f1(lst) #? str() dict() overload_f1(list_alias) #? str() overload_f1(list_str) #? str() dict() overload_f1(list_int) jedi-0.15.2/test/completion/isinstance.py0000664000175000017500000000332313577124112020242 0ustar davedave00000000000000if isinstance(i, str): #? str() i if isinstance(j, (str, int)): #? str() int() j while isinstance(k, (str, int)): #? str() int() k if not isinstance(k, (str, int)): #? k while not isinstance(k, (str, int)): #? k assert isinstance(ass, int) #? int() ass assert isinstance(ass, str) assert not isinstance(ass, int) if 2: #? str() ass # ----------------- # invalid arguments # ----------------- if isinstance(wrong, str()): #? wrong # ----------------- # in functions # ----------------- import datetime def fooooo(obj): if isinstance(obj, datetime.datetime): #? datetime.datetime() obj def fooooo2(obj): if isinstance(obj, datetime.date): return obj else: return 1 a # In earlier versions of Jedi, this returned both datetime and int, but now # Jedi does flow checks and realizes that the top return isn't executed. #? int() fooooo2('') def isinstance_func(arr): for value in arr: if isinstance(value, dict): # Shouldn't fail, even with the dot. #? 17 dict() value. elif isinstance(value, int): x = value #? int() x # ----------------- # Names with multiple indices. # ----------------- class Test(): def __init__(self, testing): if isinstance(testing, str): self.testing = testing else: self.testing = 10 def boo(self): if isinstance(self.testing, str): # TODO this is wrong, it should only be str. #? str() int() self.testing #? Test() self # ----------------- # Syntax # ----------------- #? isinstance(1, int()) jedi-0.15.2/test/completion/types.py0000664000175000017500000000431413577124112017247 0ustar davedave00000000000000# ----------------- # non array # ----------------- #? ['imag'] int.imag #? [] int.is_integer #? ['is_integer'] float.is_int #? ['is_integer'] 1.0.is_integer #? ['upper'] "".upper #? ['upper'] r"".upper # strangely this didn't work, because the = is used for assignments #? ['upper'] "=".upper a = "=" #? ['upper'] a.upper # ----------------- # lists # ----------------- arr = [] #? ['append'] arr.app #? ['append'] list().app #? ['append'] [].append arr2 = [1,2,3] #? ['append'] arr2.app #? int() arr.count(1) x = [] #? x.pop() x = [3] #? int() x.pop() x = [] x.append(1.0) #? float() x.pop() # ----------------- # dicts # ----------------- dic = {} #? ['copy', 'clear'] dic.c dic2 = dict(a=1, b=2) #? ['pop', 'popitem'] dic2.p #? ['popitem'] {}.popitem dic2 = {'asdf': 3} #? ['popitem'] dic2.popitem #? int() dic2['asdf'] d = {'a': 3, 1.0: list} #? int() list d.values()[0] ##? int() list dict(d).values()[0] #? str() d.items()[0][0] #? int() d.items()[0][1] (a, b), = {a:1 for a in [1.0]}.items() #? float() a #? int() b # ----------------- # tuples # ----------------- tup = ('',2) #? ['count'] tup.c tup2 = tuple() #? ['index'] tup2.i #? ['index'] ().i tup3 = 1,"" #? ['index'] tup3.index tup4 = 1,"" #? ['index'] tup4.index # ----------------- # set # ----------------- set_t = {1,2} #? ['clear', 'copy'] set_t.c set_t2 = set() #? ['clear', 'copy'] set_t2.c # ----------------- # pep 448 unpacking generalizations # ----------------- # python >= 3.5 d = {'a': 3} dc = {v: 3 for v in ['a']} #? dict() {**d} #? dict() {**dc} #? str() {**d, "b": "b"}["b"] #? str() {**dc, "b": "b"}["b"] # Should resolve to int() but jedi is not smart enough yet # Here to make sure it doesn't result in crash though #? {**d}["a"] # Should resolve to int() but jedi is not smart enough yet # Here to make sure it doesn't result in crash though #? {**dc}["a"] s = {1, 2, 3} #? set() {*s} #? set() {*s, 4, *s} s = {1, 2, 3} # Should resolve to int() but jedi is not smart enough yet # Here to make sure it doesn't result in crash though #? {*s}.pop() #? int() {*s, 4}.pop() # Should resolve to int() but jedi is not smart enough yet # Here to make sure it doesn't result in crash though #? [*s][0] #? int() [*s, 4][0] jedi-0.15.2/test/completion/keywords.py0000664000175000017500000000107613577124112017754 0ustar davedave00000000000000 #? ['raise'] raise #? ['Exception'] except #? [] b + continu #? [] b + continue #? ['continue'] b; continue #? ['continue'] b; continu #? [] c + pass #? [] a + pass #? ['pass'] b; pass # ----------------- # Keywords should not appear everywhere. # ----------------- #? [] with open() as f #? [] def i #? [] class i #? [] continue i # More syntax details, e.g. while only after newline, but not after semicolon, # continue also after semicolon #? ['while'] while #? [] x while #? [] x; while #? ['continue'] x; continue #? [] and #? ['and'] x and #? [] x * and jedi-0.15.2/test/completion/named_expression.py0000664000175000017500000000014413577124112021443 0ustar davedave00000000000000# python >= 3.8 b = (a:=1, a) #? int() b[0] #? b[1] # Should not fail b = ('':=1,) #? int() b[0] jedi-0.15.2/test/completion/precedence.py0000664000175000017500000000364413577124112020205 0ustar davedave00000000000000""" Test Jedi's operation understanding. Jedi should understand simple additions, multiplications, etc. """ # ----------------- # numbers # ----------------- x = [1, 'a', 1.0] #? int() str() float() x[12] #? float() x[1 + 1] index = 0 + 1 #? str() x[index] #? int() x[1 + (-1)] def calculate(number): return number + constant constant = 1 #? float() x[calculate(1)] def calculate(number): return number + constant # ----------------- # strings # ----------------- x = 'upp' + 'e' #? str.upper getattr(str, x + 'r') a = "a"*3 #? str() a a = 3 * "a" #? str() a a = 3 * "a" #? str() a #? int() (3 ** 3) #? int() str() (3 ** 'a') class X(): foo = 2 #? int() (X.foo ** 3) # ----------------- # assignments # ----------------- x = [1, 'a', 1.0] i = 0 i += 1 i += 1 #? float() x[i] i = 1 i += 1 i -= 3 i += 1 #? int() x[i] # ----------------- # in # ----------------- if 'X' in 'Y': a = 3 else: a = '' # For now don't really check for truth values. So in should return both # results. #? str() int() a # ----------------- # for flow assignments # ----------------- class FooBar(object): fuu = 0.1 raboof = 'fourtytwo' # targets should be working target = '' for char in ['f', 'u', 'u']: target += char #? float() getattr(FooBar, target) # github #24 target = u'' for char in reversed(['f', 'o', 'o', 'b', 'a', 'r']): target += char #? str() getattr(FooBar, target) # ----------------- # repetition problems -> could be very slow and memory expensive - shouldn't # be. # ----------------- b = [str(1)] l = list for x in [l(0), l(1), l(2), l(3), l(4), l(5), l(6), l(7), l(8), l(9), l(10), l(11), l(12), l(13), l(14), l(15), l(16), l(17), l(18), l(19), l(20), l(21), l(22), l(23), l(24), l(25), l(26), l(27), l(28), l(29)]: b += x #? str() b[1] # ----------------- # undefined names # ----------------- a = foobarbaz + 'hello' #? int() float() {'hello': 1, 'bar': 1.0}[a] jedi-0.15.2/test/completion/on_import.py0000664000175000017500000000422013577124112020105 0ustar davedave00000000000000def from_names(): #? ['mod1'] from import_tree.pkg. #? ['path'] from os. def from_names_goto(): from import_tree import pkg #? pkg from import_tree.pkg def builtin_test(): #? ['math'] import math # ----------------- # completions within imports # ----------------- #? ['sqlite3'] import sqlite3 # classes is a local module that has an __init__.py and can therefore not be # found. test can be found. #? [] import classes #? ['test'] import test #? ['timedelta'] from datetime import timedel #? 21 [] from datetime.timedel import timedel # should not be possible, because names can only be looked up 1 level deep. #? [] from datetime.timedelta import resolution #? [] from datetime.timedelta import #? ['Cursor'] from sqlite3 import Cursor #? ['some_variable'] from . import some_variable #? ['arrays'] from . import arrays #? [] from . import import_tree as ren #? [] import json as import os #? os.path.join from os.path import join # ----------------- # special positions -> edge cases # ----------------- import datetime #? 6 datetime from datetime.time import time #? [] import datetime. #? [] import datetime.date #? 21 ['import'] from import_tree.pkg import pkg #? 49 ['a', 'foobar', '__name__', '__doc__', '__file__', '__package__'] from import_tree.pkg.mod1 import not_existant, # whitespace before #? ['a', 'foobar', '__name__', '__doc__', '__file__', '__package__'] from import_tree.pkg.mod1 import not_existant, #? 22 ['mod1'] from import_tree.pkg. import mod1 #? 17 ['mod1', 'mod2', 'random', 'pkg', 'rename1', 'rename2', 'classes', 'globals', 'recurse_class1', 'recurse_class2', 'invisible_pkg', 'flow_import'] from import_tree. import pkg #? 18 ['pkg'] from import_tree.p import pkg #? 17 ['import_tree'] from .import_tree import #? 10 ['run'] from ..run import #? ['run'] from ..run #? 10 ['run'] from ..run. #? [] from ..run. #? ['run'] from .. import run #? [] from not_a_module import #137 import json #? 23 json.dump from json import load, dump #? 17 json.load from json import load, dump # without the from clause: import json, datetime #? 7 json import json, datetime #? 13 datetime import json, datetime jedi-0.15.2/test/completion/async_.py0000664000175000017500000000310013577124112017347 0ustar davedave00000000000000""" Tests for all async use cases. Currently we're not supporting completion of them, but they should at least not raise errors or return extremely strange results. """ # python >= 3.5 async def x(): return 1 #? [] x.cr_awai #? ['cr_await'] x().cr_awai a = await x() #? int() a async def y(): argh = await x() #? int() argh #? ['__next__'] x().__await__().__next return 2 async def x2(): async with open('asdf') as f: #? ['readlines'] f.readlines class A(): @staticmethod async def b(c=1, d=2): return 1 #! 9 ['def b'] await A.b() #! 11 ['param d=2'] await A.b(d=3) class Awaitable: def __await__(self): yield None return '' async def awaitable_test(): foo = await Awaitable() #? str() foo # python >= 3.6 async def asgen(): yield 1 await asyncio.sleep(0) yield 2 async def wrapper(): #? int() [x async for x in asgen()][0] async for y in asgen(): #? int() y #? ['__anext__'] asgen().__ane #? [] asgen().mro # Normal completion (#1092) normal_var1 = 42 async def foo(): normal_var2 = False #? ['normal_var1', 'normal_var2'] normal_var class C: @classmethod async def async_for_classmethod(cls) -> "C": return async def async_for_method(cls) -> int: return async def f(): c = await C.async_for_method() #? int() c d = await C().async_for_method() #? int() d e = await C.async_for_classmethod() #? C() e f = await C().async_for_classmethod() #? C() f jedi-0.15.2/test/completion/goto.py0000664000175000017500000000646013577124112017057 0ustar davedave00000000000000# goto_assignments command tests are different in syntax definition = 3 #! 0 ['a = definition'] a = definition #! [] b #! ['a = definition'] a b = a c = b #! ['c = b'] c cd = 1 #! 1 ['cd = c'] cd = c #! 0 ['cd = e'] cd = e #! ['module math'] import math #! ['module math'] math #! ['module math'] b = math #! ['b = math'] b #! 18 ['foo = 10'] foo = 10;print(foo) # ----------------- # classes # ----------------- class C(object): def b(self): #! ['b = math'] b #! ['def b'] self.b #! 14 ['def b'] self.b() #! 11 ['param self'] self.b return 1 #! ['def b'] b #! ['b = math'] b #! ['def b'] C.b #! ['def b'] C().b #! 0 ['class C'] C().b #! 0 ['class C'] C().b D = C #! ['def b'] D.b #! ['def b'] D().b #! 0 ['D = C'] D().b #! 0 ['D = C'] D().b def c(): return '' #! ['def c'] c #! 0 ['def c'] c() class ClassVar(): x = 3 #! ['x = 3'] ClassVar.x #! ['x = 3'] ClassVar().x # before assignments #! 10 ['x = 3'] ClassVar.x = '' #! 12 ['x = 3'] ClassVar().x = '' # Recurring use of the same var name, github #315 def f(t=None): #! 9 ['param t=None'] t = t or 1 class X(): pass #! 3 [] X(foo=x) # Multiple inheritance class Foo: def foo(self): print("foo") class Bar: def bar(self): print("bar") class Baz(Foo, Bar): def baz(self): #! ['def foo'] super().foo #! ['def bar'] super().bar #! ['instance Foo'] super() # ----------------- # imports # ----------------- #! ['module import_tree'] import import_tree #! ["a = ''"] import_tree.a #! ['module mod1'] import import_tree.mod1 #! ['module mod1'] from import_tree.mod1 #! ['a = 1'] import_tree.mod1.a #! ['module pkg'] import import_tree.pkg #! ['a = list'] import_tree.pkg.a #! ['module mod1'] import import_tree.pkg.mod1 #! ['a = 1.0'] import_tree.pkg.mod1.a #! ["a = ''"] import_tree.a #! ['module mod1'] from import_tree.pkg import mod1 #! ['a = 1.0'] mod1.a #! ['module mod1'] from import_tree import mod1 #! ['a = 1'] mod1.a #! ['a = 1.0'] from import_tree.pkg.mod1 import a #! ['module os'] from .imports import os #! ['some_variable = 1'] from . import some_variable # ----------------- # anonymous classes # ----------------- def func(): class A(): def b(self): return 1 return A() #! 8 ['def b'] func().b() # ----------------- # on itself # ----------------- #! 7 ['class ClassDef'] class ClassDef(): """ abc """ pass # ----------------- # params # ----------------- param = ClassDef #! 8 ['param param'] def ab1(param): pass #! 9 ['param param'] def ab2(param): pass #! 11 ['param = ClassDef'] def ab3(a=param): pass ab1(ClassDef);ab2(ClassDef);ab3(ClassDef) # ----------------- # for loops # ----------------- for i in range(1): #! ['for i in range(1): i'] i for key, value in [(1,2)]: #! ['for key, value in [(1,2)]: key'] key #! 4 ['for y in [1]: y'] for y in [1]: #! ['for y in [1]: y'] y # ----------------- # decorator # ----------------- def dec(dec_param=3): pass #! 8 ['param dec_param=3'] @dec(dec_param=5) def y(): pass class ClassDec(): def class_func(func): return func #! 14 ['def class_func'] @ClassDec.class_func def x(): pass #! 2 ['class ClassDec'] @ClassDec.class_func def z(): pass jedi-0.15.2/test/completion/stubs.py0000664000175000017500000000452513577124112017247 0ustar davedave00000000000000# python >= 3.4 from stub_folder import with_stub, stub_only, with_stub_folder, stub_only_folder # ------------------------- # Just files # ------------------------- #? int() stub_only.in_stub_only #? str() with_stub.in_with_stub_both #? int() with_stub.in_with_stub_python #? float() with_stub.in_with_stub_stub #! ['in_stub_only: int'] stub_only.in_stub_only #! ['in_with_stub_both = 5'] with_stub.in_with_stub_both #! ['in_with_stub_python = 8'] with_stub.in_with_stub_python #! ['in_with_stub_stub: float'] with_stub.in_with_stub_stub #? ['in_stub_only'] stub_only.in_ #? ['in_stub_only'] from stub_folder.stub_only import in_ #? ['in_with_stub_both', 'in_with_stub_python', 'in_with_stub_stub'] with_stub.in_ #? ['in_with_stub_both', 'in_with_stub_python', 'in_with_stub_stub'] from stub_folder.with_stub import in_ #? ['with_stub', 'stub_only', 'with_stub_folder', 'stub_only_folder'] from stub_folder. # ------------------------- # Folders # ------------------------- #? int() stub_only_folder.in_stub_only_folder #? str() with_stub_folder.in_with_stub_both_folder #? int() with_stub_folder.in_with_stub_python_folder #? float() with_stub_folder.in_with_stub_stub_folder #? ['in_stub_only_folder'] stub_only_folder.in_ #? ['in_with_stub_both_folder', 'in_with_stub_python_folder', 'in_with_stub_stub_folder'] with_stub_folder.in_ # ------------------------- # Folders nested with stubs # ------------------------- from stub_folder.with_stub_folder import nested_stub_only, nested_with_stub, \ python_only #? int() nested_stub_only.in_stub_only #? float() nested_with_stub.in_both #? str() nested_with_stub.in_python #? int() nested_with_stub.in_stub #? str() python_only.in_python #? ['in_stub_only_folder'] stub_only_folder.in_ #? ['in_with_stub_both_folder', 'in_with_stub_python_folder', 'in_with_stub_stub_folder'] with_stub_folder.in_ #? ['in_python'] python_only.in_ # ------------------------- # Folders nested with stubs # ------------------------- from stub_folder.stub_only_folder import nested_stub_only, nested_with_stub, \ python_only #? int() nested_stub_only.in_stub_only #? float() nested_with_stub.in_both #? str() nested_with_stub.in_python #? int() nested_with_stub.in_stub #? str() python_only.in_python #? ['in_stub_only'] nested_stub_only.in_ #? ['in_both', 'in_python', 'in_stub'] nested_with_stub.in_ #? ['in_python'] python_only.in_ jedi-0.15.2/test/completion/usages.py0000664000175000017500000001376113577124112017400 0ustar davedave00000000000000""" Renaming tests. This means search for usages. I always leave a little bit of space to add room for additions, because the results always contain position informations. """ #< 4 (0,4), (3,0), (5,0), (17,0), (12,4), (14,5), (15,0) def abc(): pass #< 0 (-3,4), (0,0), (2,0), (14,0), (9,4), (11,5), (12,0) abc.d.a.bsaasd.abc.d abc # unicode chars shouldn't be a problem. x['smörbröd'].abc # With the new parser these statements are not recognized as stateents, because # they are not valid Python. if 1: abc = else: (abc) = abc = #< (-17,4), (-14,0), (-12,0), (0,0), (-2,0), (-3,5), (-5,4) abc abc = 5 Abc = 3 #< 6 (0,6), (2,4), (5,8), (17,0) class Abc(): #< (-2,6), (0,4), (3,8), (15,0) Abc def Abc(self): Abc; self.c = 3 #< 17 (0,16), (2,8) def a(self, Abc): #< 10 (-2,16), (0,8) Abc #< 19 (0,18), (2,8) def self_test(self): #< 12 (-2,18), (0,8) self.b Abc.d.Abc #< 4 (0,4), (5,1) def blubi(): pass #< (-5,4), (0,1) @blubi def a(): pass #< 0 (0,0), (1,0) set_object_var = object() set_object_var.var = 1 response = 5 #< 0 (0,0), (1,0), (2,0), (4,0) response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attachment; filename=%s.pdf' % id response.write(pdf) #< (-4,0), (-3,0), (-2,0), (0,0) response # ----------------- # imports # ----------------- #< (0,7), (3,0) import module_not_exists #< (-3,7), (0,0) module_not_exists #< ('import_tree.rename1', 1,0), (0,24), (3,0), (6,17), ('import_tree.rename2', 4,17), (11,17), (14,17), ('imports', 72, 16) from import_tree import rename1 #< (0,8), ('import_tree.rename1',3,0), ('import_tree.rename2',4,32), ('import_tree.rename2',6,0), (3,32), (8,32), (5,0) rename1.abc #< (-3,8), ('import_tree.rename1', 3,0), ('import_tree.rename2', 4,32), ('import_tree.rename2', 6,0), (0,32), (5,32), (2,0) from import_tree.rename1 import abc #< (-5,8), (-2,32), ('import_tree.rename1', 3,0), ('import_tree.rename2', 4,32), ('import_tree.rename2', 6,0), (0,0), (3,32) abc #< 20 ('import_tree.rename1', 1,0), ('import_tree.rename2', 4,17), (-11,24), (-8,0), (-5,17), (0,17), (3,17), ('imports', 72, 16) from import_tree.rename1 import abc #< (0, 32), from import_tree.rename1 import not_existing # Shouldn't raise an error or do anything weird. from not_existing import * # ----------------- # classes # ----------------- class TestMethods(object): #< 8 (0,8), (2,13) def a_method(self): #< 13 (-2,8), (0,13) self.a_method() #< 13 (2,8), (0,13), (3,13) self.b_method() def b_method(self): self.b_method class TestClassVar(object): #< 4 (0,4), (5,13), (7,21) class_v = 1 def a(self): class_v = 1 #< (-5,4), (0,13), (2,21) self.class_v #< (-7,4), (-2,13), (0,21) TestClassVar.class_v #< (0,8), (-7, 8) class_v class TestInstanceVar(): def a(self): #< 13 (4,13), (0,13) self._instance_var = 3 def b(self): #< (-4,13), (0,13) self._instance_var # A call to self used to trigger an error, because it's also a trailer # with two children. self() class NestedClass(): def __getattr__(self, name): return self # Shouldn't find a definition, because there's other `instance`. #< (0, 14), NestedClass().instance # ----------------- # inheritance # ----------------- class Super(object): #< 4 (0,4), (23,18), (25,13) base_class = 1 #< 4 (0,4), class_var = 1 #< 8 (0,8), def base_method(self): #< 13 (0,13), (20,13) self.base_var = 1 #< 13 (0,13), self.instance_var = 1 #< 8 (0,8), def just_a_method(self): pass #< 20 (0,16), (-18,6) class TestClass(Super): #< 4 (0,4), class_var = 1 def x_method(self): #< (0,18), (2,13), (-23,4) TestClass.base_class #< (-2,18), (0,13), (-25,4) self.base_class #< (-20,13), (0,13) self.base_var #< (0, 18), TestClass.base_var #< 13 (5,13), (0,13) self.instance_var = 3 #< 9 (0,8), def just_a_method(self): #< (-5,13), (0,13) self.instance_var # ----------------- # properties # ----------------- class TestProperty: @property #< 10 (0,8), (5,13) def prop(self): return 1 def a(self): #< 13 (-5,8), (0,13) self.prop @property #< 13 (0,8), (4,5) def rw_prop(self): return self._rw_prop #< 8 (-4,8), (0,5) @rw_prop.setter #< 8 (0,8), (5,13) def rw_prop(self, value): self._rw_prop = value def b(self): #< 13 (-5,8), (0,13) self.rw_prop # ----------------- # *args, **kwargs # ----------------- #< 11 (1,11), (0,8) def f(**kwargs): return kwargs # ----------------- # No result # ----------------- if isinstance(j, int): #< (0, 4), j # ----------------- # Dynamic Param Search # ----------------- class DynamicParam(): def foo(self): return def check(instance): #< 13 (-5,8), (0,13) instance.foo() check(DynamicParam()) # ----------------- # Compiled Objects # ----------------- import _sre # TODO reenable this, it's currently not working, because of 2/3 # inconsistencies in typeshed (_sre exists in typeshed/2, but not in # typeshed/3). ##< 0 (-3,7), (0,0), ('_sre', None, None) _sre # ----------------- # on syntax # ----------------- #< 0 import undefined # ----------------- # comprehensions # ----------------- #< 0 (0,0), (2,12) x = 32 #< 12 (-2,0), (0,12) [x for x in x] #< 0 (0,0), (2,1), (2,12) x = 32 #< 12 (-2,0), (0,1), (0,12) [x for b in x] #< 1 (0,1), (0,7) [x for x in something] #< 7 (0,1), (0,7) [x for x in something] x = 3 #< 1 (0,1), (0,10) {x:1 for x in something} #< 10 (0,1), (0,10) {x:1 for x in something} def x(): zzz = 3 if UNDEFINED: zzz = 5 if UNDEFINED2: #< (3, 8), (4, 4), (0, 12), (-3, 8), (-5, 4) zzz else: #< (0, 8), (1, 4), (-3, 12), (-6, 8), (-8, 4) zzz zzz jedi-0.15.2/test/completion/__init__.py0000664000175000017500000000020113577124112017631 0ustar davedave00000000000000""" needed for some modules to test against packages. """ some_variable = 1 from . import imports #? int() imports.relative() jedi-0.15.2/test/completion/ordering.py0000664000175000017500000000404013577124112017710 0ustar davedave00000000000000# ----------------- # normal # ----------------- a = "" a = 1 #? int() a #? [] a.append a = list b = 1; b = "" #? str() b # temp should not be accessible before definition #? [] temp a = 1 temp = b; b = a a = temp #? int() b #? int() b #? str() a a = tuple if 1: a = list #? ['append'] a.append #? ['index'] a.index # ----------------- # tuples exchanges # ----------------- a, b = 1, "" #? int() a #? str() b b, a = a, b #? int() b #? str() a b, a = a, b #? int() a #? str() b # ----------------- # function # ----------------- def a(a=3): #? int() a #? [] a.func return a #? int() a(2) #? [] a(2).func a_param = 3 def func(a_param): # should not be int #? [] a_param. from os import path # should not return a function, because `a` is a function above def f(b, a): return a #? [] f(b=3). # ----------------- # closure # ----------------- def x(): a = 0 def x(): return a a = 3.0 return x() #? float() x() # ----------------- # class # ----------------- class A(object): a = "" a = 3 #? int() a a = list() def __init__(self): self.b = "" def before(self): self.b = 3 # TODO should this be so? include entries after cursor? #? int() str() list self.b self.b = list self.a = 1 #? str() int() self.a #? ['after'] self.after self.c = 3 #? int() self.c def after(self): self.a = '' c = set() #? list() A.a a = A() #? ['after'] a.after #? [] a.upper #? [] a.append #? [] a.real #? str() int() a.a a = 3 class a(): def __init__(self, a): self.a = a #? float() a(1.0).a #? a().a # ----------------- # imports # ----------------- math = 3 import math #? ['cosh'] math.cosh #? [] math.real math = 3 #? int() math #? [] math.cos # do the same for star imports cosh = 3 from math import * # cosh doesn't work, but that's not a problem, star imports should be at the # start of EVERY script! cosh.real cosh = 3 #? int() cosh jedi-0.15.2/test/completion/stub_folder/0000775000175000017500000000000013577125145020046 5ustar davedave00000000000000jedi-0.15.2/test/completion/stub_folder/stub_only.pyi0000664000175000017500000000010313577124112022572 0ustar davedave00000000000000in_stub_only: int class Foo(Bar): pass class Bar: pass jedi-0.15.2/test/completion/stub_folder/stub_only_folder/0000775000175000017500000000000013577125145023417 5ustar davedave00000000000000jedi-0.15.2/test/completion/stub_folder/stub_only_folder/__init__.pyi0000664000175000017500000000003113577124112025664 0ustar davedave00000000000000in_stub_only_folder: int jedi-0.15.2/test/completion/stub_folder/stub_only_folder/python_only.py0000664000175000017500000000001713577124112026342 0ustar davedave00000000000000in_python = '' jedi-0.15.2/test/completion/stub_folder/stub_only_folder/nested_with_stub.pyi0000664000175000017500000000003413577124112027502 0ustar davedave00000000000000in_stub: int in_both: float jedi-0.15.2/test/completion/stub_folder/stub_only_folder/nested_with_stub.py0000664000175000017500000000003413577124112027331 0ustar davedave00000000000000in_python = '' in_both = '' jedi-0.15.2/test/completion/stub_folder/stub_only_folder/nested_stub_only.pyi0000664000175000017500000000002213577124112027505 0ustar davedave00000000000000in_stub_only: int jedi-0.15.2/test/completion/stub_folder/with_stub.py0000664000175000017500000000005613577124112022422 0ustar davedave00000000000000in_with_stub_both = 5 in_with_stub_python = 8 jedi-0.15.2/test/completion/stub_folder/with_stub_folder/0000775000175000017500000000000013577125145023411 5ustar davedave00000000000000jedi-0.15.2/test/completion/stub_folder/with_stub_folder/__init__.pyi0000664000175000017500000000007613577124112025667 0ustar davedave00000000000000in_with_stub_both_folder: str in_with_stub_stub_folder: float jedi-0.15.2/test/completion/stub_folder/with_stub_folder/python_only.py0000664000175000017500000000001713577124112026334 0ustar davedave00000000000000in_python = '' jedi-0.15.2/test/completion/stub_folder/with_stub_folder/nested_with_stub.pyi0000664000175000017500000000003413577124112027474 0ustar davedave00000000000000in_stub: int in_both: float jedi-0.15.2/test/completion/stub_folder/with_stub_folder/__init__.py0000664000175000017500000000007413577124112025514 0ustar davedave00000000000000in_with_stub_both_folder = 5 in_with_stub_python_folder = 8 jedi-0.15.2/test/completion/stub_folder/with_stub_folder/nested_with_stub.py0000664000175000017500000000003413577124112027323 0ustar davedave00000000000000in_python = '' in_both = '' jedi-0.15.2/test/completion/stub_folder/with_stub_folder/nested_stub_only.pyi0000664000175000017500000000002213577124112027477 0ustar davedave00000000000000in_stub_only: int jedi-0.15.2/test/completion/stub_folder/with_stub.pyi0000664000175000017500000000006013577124112022566 0ustar davedave00000000000000in_with_stub_both: str in_with_stub_stub: float jedi-0.15.2/test/completion/sys_path.py0000664000175000017500000000071413577124112017735 0ustar davedave00000000000000 import sys import os from os.path import dirname sys.path.insert(0, '../../jedi') sys.path.append(os.path.join(dirname(__file__), 'thirdparty')) # modifications, that should fail: # syntax err sys.path.append('a' +* '/thirdparty') #? ['inference'] import inference #? ['inference_state_function_cache'] inference.inference_state_fu # Those don't work because dirname and abspath are not properly understood. #? ['jedi_'] import jedi_ #? ['el'] jedi_.el jedi-0.15.2/test/completion/basic.py0000664000175000017500000001121613577124112017163 0ustar davedave00000000000000# ----------------- # cursor position # ----------------- #? 0 int int() #? 3 int int() #? 4 str int(str) # ----------------- # should not complete # ----------------- #? [] . #? [] str.. #? [] a(0):. #? 2 [] 0x0 #? [] 1j #? ['and', 'or', 'if', 'is', 'in', 'not'] 1j x = None() #? x # ----------------- # if/else/elif # ----------------- if (random.choice([0, 1])): 1 elif(random.choice([0, 1])): a = 3 else: a = '' #? int() str() a def func(): if random.choice([0, 1]): 1 elif(random.choice([0, 1])): a = 3 else: a = '' #? int() str() return a #? int() str() func() # ----------------- # keywords # ----------------- #? list() assert [] def focus_return(): #? list() return [] # ----------------- # for loops # ----------------- for a in [1,2]: #? int() a for a1 in 1,"": #? int() str() a1 for a3, b3 in (1,""), (1,""), (1,""): #? int() a3 #? str() b3 for (a3, b3) in (1,""), (1,""), (1,""): #? int() a3 #? str() b3 for a4, (b4, c4) in (1,("", list)), (1,("", list)): #? int() a4 #? str() b4 #? list c4 a = [] for i in [1,'']: #? int() str() i a += [i] #? int() str() a[0] for i in list([1,'']): #? int() str() i #? int() str() for x in [1,'']: x a = [] b = [1.0,''] for i in b: a += [i] #? float() str() a[0] for i in [1,2,3]: #? int() i else: i # ----------------- # range() # ----------------- for i in range(10): #? int() i # ----------------- # ternary operator # ----------------- a = 3 b = '' if a else set() #? str() set() b def ret(a): return ['' if a else set()] #? str() set() ret(1)[0] #? str() set() ret()[0] # ----------------- # global vars # ----------------- def global_define(): #? int() global global_var_in_func global_var_in_func = 3 #? int() global_var_in_func #? ['global_var_in_func'] global_var_in_f def funct1(): # From issue #610 global global_dict_var global_dict_var = dict() def funct2(): #! ['global_dict_var', 'global_dict_var'] global global_dict_var #? dict() global_dict_var global_var_predefined = None def init_global_var_predefined(): global global_var_predefined if global_var_predefined is None: global_var_predefined = 3 #? int() None global_var_predefined def global_as_import(): from import_tree import globals #? ['foo'] globals.foo #? int() globals.foo global r r = r[r] if r: r += r + 2 #? int() r # ----------------- # within docstrs # ----------------- def a(): """ #? ['global_define'] global_define """ pass #? # str literals in comment """ upper def completion_in_comment(): #? ['Exception'] # might fail because the comment is not a leaf: Exception pass some_word #? ['Exception'] # Very simple comment completion: Exception # Commment after it # ----------------- # magic methods # ----------------- class A(object): pass class B(): pass #? ['__init__'] A.__init__ #? ['__init__'] B.__init__ #? ['__init__'] int().__init__ # ----------------- # comments # ----------------- class A(): def __init__(self): self.hello = {} # comment shouldn't be a string #? dict() A().hello # ----------------- # unicode # ----------------- a = 'smörbröd' #? str() a xyz = 'smörbröd.py' if 1: #? str() xyz #? ¹. # ----------------- # exceptions # ----------------- try: import math except ImportError as i_a: #? ['i_a'] i_a #? ImportError() i_a try: import math except ImportError, i_b: # TODO check this only in Python2 ##? ['i_b'] i_b ##? ImportError() i_b class MyException(Exception): def __init__(self, my_attr): self.my_attr = my_attr try: raise MyException(1) except MyException as e: #? ['my_attr'] e.my_attr #? 22 ['my_attr'] for x in e.my_attr: pass # ----------------- # continuations # ----------------- foo = \ 1 #? int() foo # ----------------- # module attributes # ----------------- # Don't move this to imports.py, because there's a star import. #? str() __file__ #? ['__file__'] __file__ #? str() math.__file__ # Should not lead to errors #? math() # ----------------- # with statements # ----------------- with open('') as f: #? ['closed'] f.closed for line in f: #? str() bytes() line with open('') as f1, open('') as f2: #? ['closed'] f1.closed #? ['closed'] f2.closed class Foo(): def __enter__(self): return '' #? 14 str() with Foo() as f3: #? str() f3 #! 14 ['with Foo() as f3: f3'] with Foo() as f3: f3 #? 6 Foo with Foo() as f3: f3 jedi-0.15.2/test/completion/imports.py0000664000175000017500000001263213577124112017602 0ustar davedave00000000000000# ----------------- # own structure # ----------------- # do separate scopes def scope_basic(): from import_tree import mod1 #? int() mod1.a #? [] import_tree.a #? [] import_tree.mod1 import import_tree #? str() import_tree.a def scope_pkg(): import import_tree.mod1 #? str() import_tree.a #? ['mod1'] import_tree.mod1 #? int() import_tree.mod1.a def scope_nested(): import import_tree.pkg.mod1 #? str() import_tree.a #? list import_tree.pkg.a #? ['sqrt'] import_tree.pkg.sqrt #? ['pkg'] import_tree.p #? float() import_tree.pkg.mod1.a #? ['a', 'foobar', '__name__', '__package__', '__file__', '__doc__'] a = import_tree.pkg.mod1. import import_tree.random #? set import_tree.random.a def scope_nested2(): """Multiple modules should be indexable, if imported""" import import_tree.mod1 import import_tree.pkg #? ['mod1'] import_tree.mod1 #? ['pkg'] import_tree.pkg # With the latest changes this completion also works, because submodules # are always included (some nested import structures lead to this, # typically). #? ['rename1'] import_tree.rename1 def scope_from_import_variable(): """ All of them shouldn't work, because "fake" imports don't work in python without the use of ``sys.modules`` modifications (e.g. ``os.path`` see also github issue #213 for clarification. """ a = 3 #? from import_tree.mod2.fake import a #? from import_tree.mod2.fake import c #? a #? c def scope_from_import_variable_with_parenthesis(): from import_tree.mod2.fake import ( a, foobarbaz ) #? a #? foobarbaz # shouldn't complete, should still list the name though. #? ['foobarbaz'] foobarbaz def as_imports(): from import_tree.mod1 import a as xyz #? int() xyz import not_existant, import_tree.mod1 as foo #? int() foo.a import import_tree.mod1 as bar #? int() bar.a def broken_import(): import import_tree.mod1 #? import_tree.mod1 from import_tree.mod1 #? 25 import_tree.mod1 import import_tree.mod1. #? 25 import_tree.mod1 impo5t import_tree.mod1.foo #? 25 import_tree.mod1 import import_tree.mod1.foo. #? 31 import_tree.mod1 import json, import_tree.mod1.foo. # Cases with ; mod1 = 3 #? 25 int() import import_tree; mod1. #? 38 import_tree.mod1 import_tree; import import_tree.mod1. #! ['module json'] from json def test_import_priorities(): """ It's possible to overwrite import paths in an ``__init__.py`` file, by just assigining something there. See also #536. """ from import_tree import the_pkg, invisible_pkg #? int() invisible_pkg # In real Python, this would be the module, but it's not, because Jedi # doesn't care about most stateful issues such as __dict__, which it would # need to, to do this in a correct way. #? int() the_pkg # Importing foo is still possible, even though inivisible_pkg got changed. #? float() from import_tree.invisible_pkg import foo # ----------------- # std lib modules # ----------------- import tokenize #? ['tok_name'] tokenize.tok_name from pyclbr import * #? ['readmodule_ex'] readmodule_ex import os #? ['dirname'] os.path.dirname from os.path import ( expanduser ) #? os.path.expanduser expanduser from itertools import (tee, islice) #? ['islice'] islice from functools import (partial, wraps) #? ['wraps'] wraps from keyword import kwlist, \ iskeyword #? ['kwlist'] kwlist #? [] from keyword import not_existing1, not_existing2 from tokenize import io tokenize.generate_tokens # ----------------- # builtins # ----------------- import sys #? ['prefix'] sys.prefix #? ['append'] sys.path.append from math import * #? ['cos', 'cosh'] cos def func_with_import(): import time return time #? ['sleep'] func_with_import().sleep # ----------------- # relative imports # ----------------- from .import_tree import mod1 #? int() mod1.a from ..import_tree import mod1 #? mod1.a from .......import_tree import mod1 #? mod1.a from .. import helpers #? int() helpers.sample_int from ..helpers import sample_int as f #? int() f from . import run #? [] run. from . import import_tree as imp_tree #? str() imp_tree.a from . import datetime as mod1 #? [] mod1. # self import # this can cause recursions from imports import * # ----------------- # packages # ----------------- from import_tree.mod1 import c #? set c from import_tree import recurse_class1 #? ['a'] recurse_class1.C.a # github #239 RecursionError #? ['a'] recurse_class1.C().a # ----------------- # Jedi debugging # ----------------- # memoizing issues (check git history for the fix) import not_existing_import if not_existing_import: a = not_existing_import else: a = not_existing_import #? a # ----------------- # module underscore descriptors # ----------------- def underscore(): import keyword #? ['__file__'] keyword.__file__ #? str() keyword.__file__ # Does that also work for our own module? #? ['__file__'] __file__ # ----------------- # complex relative imports #784 # ----------------- def relative(): #? ['foobar'] from import_tree.pkg.mod1 import foobar #? int() foobar return 1 jedi-0.15.2/test/completion/fstring.py0000664000175000017500000000057013577124112017557 0ustar davedave00000000000000# python >= 3.6 class Foo: bar = 1 #? 10 int() f'{Foo.bar}' #? 10 ['bar'] f'{Foo.bar}' #? 10 int() Fr'{Foo.bar' #? 10 ['bar'] Fr'{Foo.bar' #? int() Fr'{Foo.bar #? ['bar'] Fr'{Foo.bar #? ['Exception'] F"{Excepti #? 8 Foo Fr'a{Foo.bar' #? str() Fr'sasdf' #? 7 str() Fr'''sasdf''' + '' #? ['upper'] f'xyz'.uppe #? 3 [] f'f' # Github #1248 #? int() {"foo": 1}[f"foo"] jedi-0.15.2/test/completion/pep0526_variables.py0000664000175000017500000000327613577124112021242 0ustar davedave00000000000000""" PEP 526 introduced a new way of using type annotations on variables. It was introduced in Python 3.6. """ # python >= 3.6 import typing asdf = '' asdf: int # This is not necessarily correct, but for now this is ok (at least no error). #? int() asdf direct: int = NOT_DEFINED #? int() direct with_typing_module: typing.List[float] = NOT_DEFINED #? float() with_typing_module[0] somelist = [1, 2, 3, "A", "A"] element : int for element in somelist: #? int() element test_string: str = NOT_DEFINED #? str() test_string char: str for char in NOT_DEFINED: #? str() char # ------------------------- # instance/class vars # ------------------------- class Foo(): bar: int baz: typing.ClassVar[str] #? Foo.bar #? int() Foo().bar #? str() Foo.baz #? str() Foo().baz class VarClass: var_instance1: int = 1 var_instance2: float var_class1: typing.ClassVar[str] = 1 var_class2: typing.ClassVar[bytes] def __init__(self): #? int() d.var_instance1 #? float() d.var_instance2 #? str() d.var_class1 #? bytes() d.var_class2 #? [] d.int #? ['var_class1', 'var_class2', 'var_instance1', 'var_instance2'] self.var_ #? ['var_class1', 'var_class2'] VarClass.var_ #? VarClass.var_instance1 #? VarClass.var_instance2 #? str() VarClass.var_class1 #? bytes() VarClass.var_class2 #? [] VarClass.int d = VarClass() #? ['var_class1', 'var_class2', 'var_instance1', 'var_instance2'] d.var_ #? int() d.var_instance1 #? float() d.var_instance2 #? str() d.var_class1 #? bytes() d.var_class2 #? [] d.int import dataclasses @dataclasses.dataclass class DC: name: int = 1 #? int() DC().name jedi-0.15.2/test/completion/completion.py0000664000175000017500000000106313577124112020252 0ustar davedave00000000000000""" Special cases of completions (typically special positions that caused issues with value parsing. """ def pass_decorator(func): return func def x(): return ( 1, #? ["tuple"] tuple ) # Comment just somewhere class MyClass: @pass_decorator def x(foo, #? 5 ["tuple"] tuple, ): return 1 if x: pass #? ['else'] else try: pass #? ['except', 'Exception'] except try: pass #? 6 ['except', 'Exception'] except AttributeError: pass #? ['finally'] finally for x in y: pass #? ['else'] else jedi-0.15.2/test/completion/pep0484_comments.py0000664000175000017500000000635013577124112021116 0ustar davedave00000000000000a = 3 # type: str #? str() a b = 3 # type: str but I write more #? int() b c = 3 # type: str # I comment more #? str() c d = "It should not read comments from the next line" # type: int #? str() d # type: int e = "It should not read comments from the previous line" #? str() e class BB: pass def test(a, b): a = a # type: BB c = a # type: str d = a # type: str e = a # type: str # Should ignore long whitespace #? BB() a #? str() c #? BB() d #? str() e class AA: class BB: pass def test(a): # type: (AA.BB) -> None #? AA.BB() a def test(a): # type: (AA.BB,) -> None #? AA.BB() a a,b = 1, 2 # type: str, float #? str() a #? float() b class Employee: pass from typing import List, Tuple x = [] # type: List[Employee] #? Employee() x[1] x, y, z = [], [], [] # type: List[int], List[int], List[str] #? int() y[2] x, y, z = [], [], [] # type: (List[float], List[float], List[BB]) for zi in z: #? BB() zi x = [ 1, 2, ] # type: List[str] #? str() x[1] for bar in foo(): # type: str #? str() bar for bar, baz in foo(): # type: int, float #? int() bar #? float() baz for bar, baz in foo(): # type: str, str """ type hinting on next line should not work """ #? bar #? baz with foo(): # type: int ... with foo() as f: # type: str #? str() f with foo() as f: # type: str """ type hinting on next line should not work """ #? f aaa = some_extremely_long_function_name_that_doesnt_leave_room_for_hints() \ # type: float # We should be able to put hints on the next line with a \ #? float() aaa # Test instance methods class Dog: def __init__(self, age, friends, name): # type: (int, List[Tuple[str, Dog]], str) -> None #? int() self.age = age self.friends = friends #? Dog() friends[0][1] #? str() self.name = name def friend_for_name(self, name): # type: (str) -> Dog for (friend_name, friend) in self.friends: if friend_name == name: return friend raise ValueError() def bark(self): pass buddy = Dog(UNKNOWN_NAME1, UNKNOWN_NAME2, UNKNOWN_NAME3) friend = buddy.friend_for_name('buster') # type of friend is determined by function return type #! 9 ['def bark'] friend.bark() friend = buddy.friends[0][1] # type of friend is determined by function parameter type #! 9 ['def bark'] friend.bark() # type is determined by function parameter type following nested generics #? str() friend.name # Mypy comment describing function return type. def annot(): # type: () -> str pass #? str() annot() # Mypy variable type annotation. x = UNKNOWN_NAME2 # type: str #? str() x class Cat(object): def __init__(self, age, friends, name): # type: (int, List[Dog], str) -> None self.age = age self.friends = friends self.name = name cat = Cat(UNKNOWN_NAME4, UNKNOWN_NAME5, UNKNOWN_NAME6) #? str() cat.name # Check potential errors def x(a, b): # type: ([) -> a #? a def x(a, b): # type: (1) -> a #? a def x(a, b, c): # type: (str) -> a #? b #? c jedi-0.15.2/test/completion/lambdas.py0000664000175000017500000000345113577124112017507 0ustar davedave00000000000000# ----------------- # lambdas # ----------------- a = lambda: 3 #? int() a() x = [] a = lambda x: x #? int() a(0) #? float() (lambda x: x)(3.0) arg_l = lambda x, y: y, x #? float() arg_l[0]('', 1.0) #? list() arg_l[1] arg_l = lambda x, y: (y, x) args = 1,"" result = arg_l(*args) #? tuple() result #? str() result[0] #? int() result[1] def with_lambda(callable_lambda, *args, **kwargs): return callable_lambda(1, *args, **kwargs) #? int() with_lambda(arg_l, 1.0)[1] #? float() with_lambda(arg_l, 1.0)[0] #? float() with_lambda(arg_l, y=1.0)[0] #? int() with_lambda(lambda x: x) #? float() with_lambda(lambda x, y: y, y=1.0) arg_func = lambda *args, **kwargs: (args[0], kwargs['a']) #? int() arg_func(1, 2, a='', b=10)[0] #? list() arg_func(1, 2, a=[], b=10)[1] # magic method a = lambda: 3 #? ['__closure__'] a.__closure__ class C(): def __init__(self, foo=1.0): self.a = lambda: 1 self.foo = foo def ret(self): return lambda: self.foo def with_param(self): return lambda x: x + self.a() lambd = lambda self: self.foo #? int() C().a() #? str() C('foo').ret()() index = C().with_param()(1) #? float() ['', 1, 1.0][index] #? float() C().lambd() #? int() C(1).lambd() def xy(param): def ret(a, b): return a + b return lambda b: ret(param, b) #? int() xy(1)(2) # ----------------- # lambda param (#379) # ----------------- class Test(object): def __init__(self, pred=lambda a, b: a): self.a = 1 #? int() self.a #? float() pred(1.0, 2) # ----------------- # test_nocond in grammar (happens in list comprehensions with `if`) # ----------------- # Doesn't need to do anything yet. It should just not raise an error. These # nocond lambdas make no sense at all. #? int() [a for a in [1,2] if lambda: 3][0] jedi-0.15.2/test/completion/complex.py0000664000175000017500000000104213577124112017545 0ustar davedave00000000000000""" Mostly for stupid error reports of @dbrgn. :-) """ import time class Foo(object): global time asdf = time def asdfy(): return Foo xorz = getattr(asdfy()(), 'asdf') #? time xorz def args_returner(*args): return args #? tuple() args_returner(1)[:] #? int() args_returner(1)[:][0] def kwargs_returner(**kwargs): return kwargs # TODO This is not really correct, needs correction probably at some point, but # at least it doesn't raise an error. #? int() kwargs_returner(a=1)[:] #? kwargs_returner(b=1)[:][0] jedi-0.15.2/test/completion/thirdparty/0000775000175000017500000000000013577125145017730 5ustar davedave00000000000000jedi-0.15.2/test/completion/thirdparty/jedi_.py0000664000175000017500000000272113577124112021347 0ustar davedave00000000000000 from jedi import functions, inference, parsing el = functions.completions()[0] #? ['description'] el.description #? str() el.description scopes, path, dot, like = \ api._prepare_goto(source, row, column, path, True) # has problems with that (sometimes) very deep nesting. #? set() el = scopes # get_names_for_scope is also recursion stuff #? tuple() el = list(inference.get_names_for_scope())[0] #? int() parsing.Module() el = list(inference.get_names_for_scope(1))[0][0] #? parsing.Module() el = list(inference.get_names_for_scope())[0][0] #? list() el = list(inference.get_names_for_scope(1))[0][1] #? list() el = list(inference.get_names_for_scope())[0][1] #? list() parsing.Scope((0,0)).get_set_vars() #? parsing.Import() parsing.Name() parsing.Scope((0,0)).get_set_vars()[0] # TODO access parent is not possible, because that is not set in the class ## parsing.Class() parsing.Scope((0,0)).get_set_vars()[0].parent #? parsing.Import() parsing.Name() el = list(inference.get_names_for_scope())[0][1][0] #? inference.Array() inference.Class() inference.Function() inference.Instance() list(inference.follow_call())[0] # With the right recursion settings, this should be possible (and maybe more): # Array Class Function Generator Instance Module # However, this was produced with the recursion settings 10/350/10000, and # lasted 18.5 seconds. So we just have to be content with the results. #? inference.Class() inference.Function() inference.get_scopes_for_name()[0] jedi-0.15.2/test/completion/thirdparty/pylab_.py0000664000175000017500000000104013577124112021534 0ustar davedave00000000000000import pylab # two gotos #! ['module numpy'] import numpy #! ['module random'] import numpy.random #? ['array2string'] numpy.array2string #? ['shape'] numpy.matrix().shape #? ['random_integers'] pylab.random_integers #? [] numpy.random_integers #? ['random_integers'] numpy.random.random_integers #? ['sample'] numpy.random.sample import numpy na = numpy.array([1,2]) #? ['shape'] na.shape # shouldn't raise an error #29, jedi-vim # doesn't return something, because matplotlib uses __import__ fig = pylab.figure() #? fig.add_subplot jedi-0.15.2/test/completion/thirdparty/django_.py0000664000175000017500000000032413577124112021673 0ustar davedave00000000000000#! ['class ObjectDoesNotExist'] from django.core.exceptions import ObjectDoesNotExist import django #? ['get_version'] django.get_version from django.conf import settings #? ['configured'] settings.configured jedi-0.15.2/test/completion/thirdparty/psycopg2_.py0000664000175000017500000000020613577124112022176 0ustar davedave00000000000000import psycopg2 conn = psycopg2.connect('dbname=test') #? ['cursor'] conn.cursor cur = conn.cursor() #? ['fetchall'] cur.fetchall jedi-0.15.2/test/completion/thirdparty/PyQt4_.py0000664000175000017500000000050013577124112021406 0ustar davedave00000000000000from PyQt4.QtCore import * from PyQt4.QtGui import * #? ['QActionGroup'] QActionGroup #? ['currentText'] QStyleOptionComboBox().currentText #? [] QStyleOptionComboBox().currentText. from PyQt4 import QtGui #? ['currentText'] QtGui.QStyleOptionComboBox().currentText #? [] QtGui.QStyleOptionComboBox().currentText. jedi-0.15.2/test/completion/flow_analysis.py0000664000175000017500000001003713577124112020754 0ustar davedave00000000000000# ----------------- # First a few name resolution things # ----------------- x = 3 if NOT_DEFINED: x = '' #? 6 int() elif x: pass else: #? int() x x = 1 try: x = '' #? 8 int() str() except x: #? 5 int() str() x x = 1.0 else: #? 5 int() str() x x = list finally: #? 5 int() str() float() list x x = tuple if False: with open("") as defined_in_false: #? ['flush'] defined_in_false.flu # ----------------- # Return checks # ----------------- def foo(x): if 1.0: return 1 else: return '' #? int() foo(1) # Exceptions are not analyzed. So check both if branches def try_except(x): try: if 0: return 1 else: return '' except AttributeError: return 1.0 #? float() str() try_except(1) # Exceptions are not analyzed. So check both if branches def try_except(x): try: if 0: return 1 else: return '' except AttributeError: return 1.0 #? float() str() try_except(1) # ----------------- # elif # ----------------- def elif_flows1(x): if False: return 1 elif True: return 1.0 else: return '' #? float() elif_flows1(1) def elif_flows2(x): try: if False: return 1 elif 0: return 1.0 else: return '' except ValueError: return set #? str() set elif_flows2(1) def elif_flows3(x): try: if True: return 1 elif 0: return 1.0 else: return '' except ValueError: return set #? int() set elif_flows3(1) # ----------------- # mid-difficulty if statements # ----------------- def check(a): if a is None: return 1 return '' return set #? int() check(None) #? str() check('asb') a = list if 2 == True: a = set elif 1 == True: a = 0 #? int() a if check != 1: a = '' #? str() a if check == check: a = list #? list a if check != check: a = set else: a = dict #? dict a if not (check is not check): a = 1 #? int() a # ----------------- # name resolution # ----------------- a = list def elif_name(x): try: if True: a = 1 elif 0: a = 1.0 else: return '' except ValueError: a = x return a #? int() set elif_name(set) if 0: a = '' else: a = int #? int a # ----------------- # isinstance # ----------------- class A(): pass def isinst(x): if isinstance(x, A): return dict elif isinstance(x, int) and x == 1 or x is True: return set elif isinstance(x, (float, reversed)): return list elif not isinstance(x, str): return tuple return 1 #? dict isinst(A()) #? set isinst(True) #? set isinst(1) #? tuple isinst(2) #? list isinst(1.0) #? tuple isinst(False) #? int() isinst('') # ----------------- # flows that are not reachable should be able to access parent scopes. # ----------------- foobar = '' if 0: within_flow = 1.0 #? float() within_flow #? str() foobar if 0: nested = 1 #? int() nested #? float() within_flow #? str() foobar #? nested if False: in_false = 1 #? ['in_false'] in_false # ----------------- # True objects like modules # ----------------- class X(): pass if X: a = 1 else: a = '' #? int() a # ----------------- # Recursion issues # ----------------- def possible_recursion_error(filename): if filename == 'a': return filename # It seems like without the brackets there wouldn't be a RecursionError. elif type(filename) == str: return filename if NOT_DEFINED: s = str() else: s = str() #? str() possible_recursion_error(s) # ----------------- # In combination with imports # ----------------- from import_tree import flow_import if 1 == flow_import.env: a = 1 elif 2 == flow_import.env: a = '' elif 3 == flow_import.env: a = 1.0 #? int() str() a jedi-0.15.2/test/completion/positional_only_params.py0000664000175000017500000000077413577124112022676 0ustar davedave00000000000000# python >= 3.8 def positional_only_call(a, /, b): #? str() a #? int() b return a + b #? int() str() positional_only_call('', 1) def positional_only_call2(a, /, b=3): return a + b #? int() positional_only_call2(1) #? int() positional_only_call2(SOMETHING_UNDEFINED) #? str() positional_only_call2(SOMETHING_UNDEFINED, '') # Maybe change this? Because it's actually not correct #? int() str() positional_only_call2(a=1, b='') #? tuple str() positional_only_call2(b='', a=tuple) jedi-0.15.2/test/completion/named_param.py0000664000175000017500000000220013577124112020337 0ustar davedave00000000000000""" Named Params: >>> def a(abc): pass ... >>> a(abc=3) # <- this stuff (abc) """ def a(abc): pass #? 5 ['abc'] a(abc) def a(*some_args, **some_kwargs): pass #? 11 [] a(some_args) #? 13 [] a(some_kwargs) def multiple(foo, bar): pass #? 17 ['bar'] multiple(foo, bar) #? ['bar'] multiple(foo, bar my_lambda = lambda lambda_param: lambda_param + 1 #? 22 ['lambda_param'] my_lambda(lambda_param) # __call__ / __init__ class Test(object): def __init__(self, hello_other): pass def __call__(self, hello): pass def test(self, blub): pass #? 10 ['hello_other'] Test(hello=) #? 12 ['hello'] Test()(hello=) #? 11 [] Test()(self=) #? 16 [] Test().test(self=) #? 16 ['blub'] Test().test(blub=) # builtins #? 12 [] any(iterable=) def foo(xyz): pass #? 7 ['xyz'] foo(xyz) # No completion should be possible if it's not a simple name #? 17 [] x = " "; foo(x.xyz) #? 17 [] x = " "; foo([xyz) #? 20 [] x = " "; foo(z[f,xyz) #? 18 [] x = " "; foo(z[xyz) #? 20 [] x = " "; foo(xyz[xyz) #? 20 [] x = " "; foo(xyz[(xyz) #? 8 ['xyz'] @foo(xyz) def x(): pass @str #? 8 ['xyz'] @foo(xyz) def x(): pass jedi-0.15.2/test/completion/recursion.py0000664000175000017500000000267013577124112020117 0ustar davedave00000000000000""" Code that might cause recursion issues (or has caused in the past). """ def Recursion(): def recurse(self): self.a = self.a self.b = self.b.recurse() #? Recursion().a #? Recursion().b class X(): def __init__(self): self.recursive = [1, 3] def annoying(self): self.recursive = [self.recursive[0]] def recurse(self): self.recursive = [self.recursive[1]] #? int() X().recursive[0] def to_list(iterable): return list(set(iterable)) def recursion1(foo): return to_list(to_list(foo)) + recursion1(foo) #? int() recursion1([1,2])[0] class FooListComp(): def __init__(self): self.recursive = [1] def annoying(self): self.recursive = [x for x in self.recursive] #? int() FooListComp().recursive[0] class InstanceAttributeIfs: def b(self): self.a1 = 1 self.a2 = 1 def c(self): self.a2 = '' def x(self): self.b() if self.a1 == 1: self.a1 = self.a1 + 1 if self.a2 == UNDEFINED: self.a2 = self.a2 + 1 #? int() self.a1 #? int() str() self.a2 #? int() InstanceAttributeIfs().a1 #? int() str() InstanceAttributeIfs().a2 class A: def a(self, b): for x in [self.a(i) for i in b]: #? x class B: def a(self, b): for i in b: for i in self.a(i): #? yield i jedi-0.15.2/test/completion/docstring.py0000664000175000017500000000721313577124112020100 0ustar davedave00000000000000""" Test docstrings in functions and classes, which are used to infer types """ # ----------------- # sphinx style # ----------------- def sphinxy(a, b, c, d, x): """ asdfasdf :param a: blablabla :type a: str :type b: (str, int) :type c: random.Random :type d: :class:`random.Random` :param str x: blablabla :rtype: dict """ #? str() a #? str() b[0] #? int() b[1] #? ['seed'] c.seed #? ['seed'] d.seed #? ['lower'] x.lower #? dict() sphinxy() # wrong declarations def sphinxy2(a, b, x, y, z): """ :param a: Forgot type declaration :type a: :param b: Just something :type b: `` :param x: Just something without type :param y: A function :type y: def l(): pass :param z: A keyword :type z: return :rtype: """ #? a #? b #? x #? y #? z #? sphinxy2() def sphinxy_param_type_wrapped(a): """ :param str a: Some description wrapped onto the next line with no space after the colon. """ #? str() a # local classes -> github #370 class ProgramNode(): pass def local_classes(node, node2): """ :type node: ProgramNode ... and the class definition after this func definition: :type node2: ProgramNode2 """ #? ProgramNode() node #? ProgramNode2() node2 class ProgramNode2(): pass def list_with_non_imports(lst): """ Should be able to work with tuples and lists and still import stuff. :type lst: (random.Random, [collections.defaultdict, ...]) """ #? ['seed'] lst[0].seed import collections as col # use some weird index #? col.defaultdict() lst[1][10] def two_dots(a): """ :type a: json.decoder.JSONDecoder """ #? ['raw_decode'] a.raw_decode # sphinx returns def return_module_object(): """ :rtype: :class:`random.Random` """ #? ['seed'] return_module_object().seed # ----------------- # epydoc style # ----------------- def epydoc(a, b): """ asdfasdf @type a: str @param a: blablabla @type b: (str, int) @param b: blablah @rtype: list """ #? str() a #? str() b[0] #? int() b[1] #? list() epydoc() # Returns with param type only def rparam(a,b): """ @type a: str """ return a #? str() rparam() # Composite types def composite(): """ @rtype: (str, int, dict) """ x, y, z = composite() #? str() x #? int() y #? dict() z # Both docstring and calculated return type def both(): """ @rtype: str """ return 23 #? str() int() both() class Test(object): def __init__(self): self.teststr = "" """ # jedi issue #210 """ def test(self): #? ['teststr'] self.teststr # ----------------- # statement docstrings # ----------------- d = '' """ bsdf """ #? str() d.upper() # ----------------- # class docstrings # ----------------- class InInit(): def __init__(self, foo): """ :type foo: str """ #? str() foo class InClass(): """ :type foo: str """ def __init__(self, foo): #? str() foo class InBoth(): """ :type foo: str """ def __init__(self, foo): """ :type foo: int """ #? str() int() foo def __init__(foo): """ :type foo: str """ #? str() foo # ----------------- # Renamed imports (#507) # ----------------- import datetime from datetime import datetime as datetime_imported def import_issues(foo): """ @type foo: datetime_imported """ #? datetime.datetime() foo jedi-0.15.2/test/completion/functions.py0000664000175000017500000001553413577124112020121 0ustar davedave00000000000000def x(): return #? None x() def array(first_param): #? ['first_param'] first_param return list() #? [] array.first_param #? [] array.first_param. func = array #? [] func.first_param #? list() array() #? ['array'] arr def inputs(param): return param #? list inputs(list) def variable_middle(): var = 3 return var #? int() variable_middle() def variable_rename(param): var = param return var #? int() variable_rename(1) def multi_line_func(a, # comment blabla b): return b #? str() multi_line_func(1,'') def multi_line_call(b): return b multi_line_call( #? int() b=1) # nothing after comma def asdf(a): return a x = asdf(a=1, ) #? int() x # ----------------- # double execution # ----------------- def double_exe(param): return param #? str() variable_rename(double_exe)("") # -> shouldn't work (and throw no error) #? [] variable_rename(list())(). #? [] variable_rename(1)(). # ----------------- # recursions (should ignore) # ----------------- def recursion(a, b): if a: return b else: return recursion(a+".", b+1) # Does not also return int anymore, because we now support operators in simple cases. #? float() recursion("a", 1.0) def other(a): return recursion2(a) def recursion2(a): if random.choice([0, 1]): return other(a) else: if random.choice([0, 1]): return recursion2("") else: return a #? int() str() recursion2(1) # ----------------- # ordering # ----------------- def a(): #? int() b() return b() def b(): return 1 #? int() a() # ----------------- # keyword arguments # ----------------- def func(a=1, b=''): return a, b exe = func(b=list, a=tuple) #? tuple exe[0] #? list exe[1] # ----------------- # default arguments # ----------------- #? int() func()[0] #? str() func()[1] #? float() func(1.0)[0] #? str() func(1.0)[1] #? float() func(a=1.0)[0] #? str() func(a=1.0)[1] #? int() func(b=1.0)[0] #? float() func(b=1.0)[1] #? list func(a=list, b=set)[0] #? set func(a=list, b=set)[1] def func_default(a, b=1): return a, b def nested_default(**kwargs): return func_default(**kwargs) #? float() nested_default(a=1.0)[0] #? int() nested_default(a=1.0)[1] #? str() nested_default(a=1.0, b='')[1] # Defaults should only work if they are defined before - not after. def default_function(a=default): #? return a #? default_function() default = int() def default_function(a=default): #? int() return a #? int() default_function() def default(a=default): #? int() a # ----------------- # closures # ----------------- def a(): l = 3 def func_b(): l = '' #? str() l #? ['func_b'] func_b #? int() l # ----------------- # *args # ----------------- def args_func(*args): #? tuple() return args exe = args_func(1, "") #? int() exe[0] #? str() exe[1] # illegal args (TypeError) #? args_func(*1)[0] # iterator #? int() args_func(*iter([1]))[0] # different types e = args_func(*[1+"", {}]) #? int() str() e[0] #? dict() e[1] _list = [1,""] exe2 = args_func(_list)[0] #? str() exe2[1] exe3 = args_func([1,""])[0] #? str() exe3[1] def args_func(arg1, *args): return arg1, args exe = args_func(1, "", list) #? int() exe[0] #? tuple() exe[1] #? list exe[1][1] # In a dynamic search, both inputs should be given. def simple(a): #? int() str() return a def xargs(*args): return simple(*args) xargs(1) xargs('') # *args without a self symbol def memoize(func): def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper class Something(): @memoize def x(self, a, b=1): return a #? int() Something().x(1) # ----------------- # ** kwargs # ----------------- def kwargs_func(**kwargs): #? ['keys'] kwargs.keys #? dict() return kwargs exe = kwargs_func(a=3,b=4.0) #? dict() exe #? int() exe['a'] #? float() exe['b'] #? int() float() exe['c'] a = 'a' exe2 = kwargs_func(**{a:3, 'b':4.0}) #? int() exe2['a'] #? float() exe2['b'] #? int() float() exe2['c'] exe3 = kwargs_func(**{k: v for k, v in [(a, 3), ('b', 4.0)]}) # Should resolve to the same as 2 but jedi is not smart enough yet # Here to make sure it doesn't result in crash though #? exe3['a'] #? exe3['b'] #? exe3['c'] # ----------------- # *args / ** kwargs # ----------------- def func_without_call(*args, **kwargs): #? tuple() args #? dict() kwargs def fu(a=1, b="", *args, **kwargs): return a, b, args, kwargs exe = fu(list, 1, "", c=set, d="") #? list exe[0] #? int() exe[1] #? tuple() exe[2] #? str() exe[2][0] #? dict() exe[3] #? set exe[3]['c'] def kwargs_iteration(**kwargs): return kwargs for x in kwargs_iteration(d=3): #? float() {'d': 1.0, 'c': '1'}[x] # ----------------- # nested *args # ----------------- def function_args(a, b, c): return b def nested_args(*args): return function_args(*args) def nested_args2(*args, **kwargs): return nested_args(*args) #? int() nested_args('', 1, 1.0, list) #? [] nested_args(''). #? int() nested_args2('', 1, 1.0) #? [] nested_args2(''). # ----------------- # nested **kwargs # ----------------- def nested_kw(**kwargs1): return function_args(**kwargs1) def nested_kw2(**kwargs2): return nested_kw(**kwargs2) # invalid command, doesn't need to return anything #? nested_kw(b=1, c=1.0, list) #? int() nested_kw(b=1) # invalid command, doesn't need to return anything #? nested_kw(d=1.0, b=1, list) #? int() nested_kw(a=3.0, b=1) #? int() nested_kw(b=1, a=r"") #? [] nested_kw(1, ''). #? [] nested_kw(a=''). #? int() nested_kw2(b=1) #? int() nested_kw2(b=1, c=1.0) #? int() nested_kw2(c=1.0, b=1) #? [] nested_kw2(''). #? [] nested_kw2(a=''). #? [] nested_kw2('', b=1). # ----------------- # nested *args/**kwargs # ----------------- def nested_both(*args, **kwargs): return function_args(*args, **kwargs) def nested_both2(*args, **kwargs): return nested_both(*args, **kwargs) # invalid commands, may return whatever. #? list nested_both('', b=1, c=1.0, list) #? list nested_both('', c=1.0, b=1, list) #? [] nested_both(''). #? int() nested_both2('', b=1, c=1.0) #? int() nested_both2('', c=1.0, b=1) #? [] nested_both2(''). # ----------------- # nested *args/**kwargs with a default arg # ----------------- def function_def(a, b, c): return a, b def nested_def(a, *args, **kwargs): return function_def(a, *args, **kwargs) def nested_def2(*args, **kwargs): return nested_def(*args, **kwargs) #? str() nested_def2('', 1, 1.0)[0] #? str() nested_def2('', b=1, c=1.0)[0] #? str() nested_def2('', c=1.0, b=1)[0] #? int() nested_def2('', 1, 1.0)[1] #? int() nested_def2('', b=1, c=1.0)[1] #? int() nested_def2('', c=1.0, b=1)[1] #? [] nested_def2('')[1]. # ----------------- # magic methods # ----------------- def a(): pass #? ['__closure__'] a.__closure__ jedi-0.15.2/test/completion/descriptors.py0000664000175000017500000000653513577124112020453 0ustar davedave00000000000000class RevealAccess(object): """ A data descriptor that sets and returns values normally and prints a message logging their access. """ def __init__(self, initval=None, name='var'): self.val = initval self.name = name def __get__(self, obj, objtype): print('Retrieving', self.name) return self.val def __set__(self, obj, val): print('Updating', self.name) self.val = val def just_a_method(self): pass class C(object): x = RevealAccess(10, 'var "x"') #? RevealAccess() x #? ['just_a_method'] x.just_a_method y = 5.0 def __init__(self): #? int() self.x #? [] self.just_a_method #? [] C.just_a_method m = C() #? int() m.x #? float() m.y #? int() C.x #? [] m.just_a_method #? [] C.just_a_method # ----------------- # properties # ----------------- class B(): @property def r(self): return 1 @r.setter def r(self, value): return '' def t(self): return '' p = property(t) #? [] B().r(). #? int() B().r #? str() B().p #? [] B().p(). class PropClass(): def __init__(self, a): self.a = a @property def ret(self): return self.a @ret.setter def ret(self, value): return 1.0 def ret2(self): return self.a ret2 = property(ret2) @property def nested(self): """ causes recusions in properties, should work """ return self.ret @property def nested2(self): """ causes recusions in properties, should not work """ return self.nested2 @property def join1(self): """ mutual recusion """ return self.join2 @property def join2(self): """ mutual recusion """ return self.join1 #? str() PropClass("").ret #? [] PropClass().ret. #? str() PropClass("").ret2 #? PropClass().ret2 #? int() PropClass(1).nested #? [] PropClass().nested. #? PropClass(1).nested2 #? [] PropClass().nested2. #? PropClass(1).join1 # ----------------- # staticmethod/classmethod # ----------------- class E(object): a = '' def __init__(self, a): self.a = a def f(x): return x f = staticmethod(f) #? f.__func @staticmethod def g(x): return x def s(cls, x): return x s = classmethod(s) @classmethod def t(cls, x): return x @classmethod def u(cls, x): return cls.a e = E(1) #? int() e.f(1) #? int() E.f(1) #? int() e.g(1) #? int() E.g(1) #? int() e.s(1) #? int() E.s(1) #? int() e.t(1) #? int() E.t(1) #? str() e.u(1) #? str() E.u(1) # ----------------- # Conditions # ----------------- from functools import partial class Memoize(): def __init__(self, func): self.func = func def __get__(self, obj, objtype): if obj is None: return self.func return partial(self, obj) def __call__(self, *args, **kwargs): # We don't do caching here, but that's what would normally happen. return self.func(*args, **kwargs) class MemoizeTest(): def __init__(self, x): self.x = x @Memoize def some_func(self): return self.x #? int() MemoizeTest(10).some_func() # Now also call the same function over the class (see if clause above). #? float() MemoizeTest.some_func(MemoizeTest(10.0)) jedi-0.15.2/test/completion/comprehensions.py0000664000175000017500000000732413577124112021143 0ustar davedave00000000000000# ----------------- # list comprehensions # ----------------- # basics: a = ['' for a in [1]] #? str() a[0] #? ['insert'] a.insert a = [a for a in [1]] #? int() a[0] y = 1.0 # Should not leak. [y for y in [3]] #? float() y a = [a for a in (1, 2)] #? int() a[0] a = [a for a,b in [(1,'')]] #? int() a[0] a = [a for (a,b) in [(1,'')]] #? int() a[0] arr = [1,''] a = [a for a in arr] #? int() a[0] #? str() a[1] #? int() str() a[2] a = [a if 1.0 else '' for a in [1] if [1.0]] #? int() str() a[0] # name resolve should be correct left, right = 'a', 'b' left, right = [x for x in (left, right)] #? str() left # with a dict literal #? int() [a for a in {1:'x'}][0] # list comprehensions should also work in combination with functions def _listen(arg): for x in arg: #? str() x _listen(['' for x in [1]]) #? ([str for x in []])[0] # ----------------- # nested list comprehensions # ----------------- b = [a for arr in [[1, 1.0]] for a in arr] #? int() b[0] #? float() b[1] b = [arr for arr in [[1, 1.0]] for a in arr] #? int() b[0][0] #? float() b[1][1] b = [a for arr in [[1]] if '' for a in arr if ''] #? int() b[0] b = [b for arr in [[[1.0]]] for a in arr for b in a] #? float() b[0] #? str() [x for x in 'chr'][0] # jedi issue #26 #? list() a = [[int(v) for v in line.strip().split() if v] for line in ["123", str(), "123"] if line] #? list() a[0] #? int() a[0][0] # ----------------- # generator comprehensions # ----------------- left, right = (i for i in (1, '')) #? int() left #? str() right gen = (i for i in (1,)) #? int() next(gen) #? gen[0] gen = (a for arr in [[1.0]] for a in arr) #? float() next(gen) #? int() (i for i in (1,)).send() # issues with different formats left, right = (i for i in ('1', 2)) #? str() left #? int() right # ----------------- # name resolution in comprehensions. # ----------------- def x(): """Should not try to resolve to the if hio, which was a bug.""" #? 22 [a for a in h if hio] if hio: pass # ----------------- # slices # ----------------- #? list() foo = [x for x in [1, '']][:1] #? int() foo[0] #? str() foo[1] # ----------------- # In class # ----------------- class X(): def __init__(self, bar): self.bar = bar def foo(self): x = [a for a in self.bar][0] #? int() x return x #? int() X([1]).foo() # set/dict comprehensions were introduced in 2.7, therefore: # python >= 2.7 # ----------------- # dict comprehensions # ----------------- #? int() list({a - 1: 3 for a in [1]})[0] d = {a - 1: b for a, b in {1: 'a', 3: 1.0}.items()} #? int() list(d)[0] #? str() float() d.values()[0] #? str() d[0] #? float() str() d[1] #? float() d[2] # ----------------- # set comprehensions # ----------------- #? set() {a - 1 for a in [1]} #? set() {a for a in range(10)} #? int() [x for x in {a for a in range(10)}][0] #? int() {a for a in range(10)}.pop() #? float() str() {b for a in [[3.0], ['']] for b in a}.pop() #? int() next(iter({a for a in range(10)})) #? int() [a for a in {1, 2, 3}][0] # ----------------- # syntax errors # ----------------- # Issue #1146 #? ['list'] [int(str(x.value) for x in list def reset_missing_bracket(): pass # ----------------- # function calls # ----------------- def foo(arg): return arg x = foo(x for x in [1]) #? int() next(x) #? x[0] # While it's illegal to have more than one argument, when a generator # expression is involved, it's still a valid parse tree and Jedi should still # work (and especially not raise Exceptions). It's debatable wheter inferring # values for invalid statements is a good idea, but not failing is a must. #? int() next(foo(x for x in [1], 1)) def bar(x, y): return y #? str() next(bar(x for x in [1], x for x in [''])) jedi-0.15.2/test/completion/context.py0000664000175000017500000000135113577124112017565 0ustar davedave00000000000000class Base(): myfoobar = 3 class X(Base): def func(self, foo): pass class Y(X): def actual_function(self): pass #? [] def actual_function #? ['func'] def f #? ['__doc__'] __doc__ #? [] def __doc__ # This might or might not be what we wanted, currently properties are also # used like this. IMO this is not wanted ~dave. #? ['__class__'] def __class__ #? [] __class__ #? ['__repr__'] def __repr__ #? [] def mro #? ['myfoobar'] myfoobar #? [] myfoobar # ----------------- # Inheritance # ----------------- class Super(): enabled = True if enabled: yo_dude = 4 class Sub(Super): #? ['yo_dude'] yo_dud jedi-0.15.2/test/completion/decorators.py0000664000175000017500000001261513577124112020253 0ustar davedave00000000000000# ----------------- # normal decorators # ----------------- def decorator(func): def wrapper(*args): return func(1, *args) return wrapper @decorator def decorated(a,b): return a,b exe = decorated(set, '') #? set exe[1] #? int() exe[0] # more complicated with args/kwargs def dec(func): def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper @dec def fu(a, b, c, *args, **kwargs): return a, b, c, args, kwargs exe = fu(list, c=set, b=3, d='') #? list exe[0] #? int() exe[1] #? set exe[2] #? [] exe[3][0]. #? str() exe[4]['d'] exe = fu(list, set, 3, '', d='') #? str() exe[3][0] # ----------------- # multiple decorators # ----------------- def dec2(func2): def wrapper2(first_arg, *args2, **kwargs2): return func2(first_arg, *args2, **kwargs2) return wrapper2 @dec2 @dec def fu2(a, b, c, *args, **kwargs): return a, b, c, args, kwargs exe = fu2(list, c=set, b=3, d='str') #? list exe[0] #? int() exe[1] #? set exe[2] #? [] exe[3][0]. #? str() exe[4]['d'] # ----------------- # Decorator is a class # ----------------- def same_func(func): return func class Decorator(object): def __init__(self, func): self.func = func def __call__(self, *args, **kwargs): return self.func(1, *args, **kwargs) @Decorator def nothing(a,b,c): return a,b,c #? int() nothing("")[0] #? str() nothing("")[1] @same_func @Decorator def nothing(a,b,c): return a,b,c #? int() nothing("")[0] class MethodDecoratorAsClass(): class_var = 3 @Decorator def func_without_self(arg, arg2): return arg, arg2 @Decorator def func_with_self(self, arg): return self.class_var #? int() MethodDecoratorAsClass().func_without_self('')[0] #? str() MethodDecoratorAsClass().func_without_self('')[1] #? MethodDecoratorAsClass().func_with_self(1) class SelfVars(): """Init decorator problem as an instance, #247""" @Decorator def __init__(self): """ __init__ decorators should be ignored when looking up variables in the class. """ self.c = list @Decorator def shouldnt_expose_var(not_self): """ Even though in real Python this shouldn't expose the variable, in this case Jedi exposes the variable, because these kind of decorators are normally descriptors, which SHOULD be exposed (at least 90%). """ not_self.b = 1.0 def other_method(self): #? float() self.b #? list self.c # ----------------- # not found decorators (are just ignored) # ----------------- @not_found_decorator def just_a_func(): return 1 #? int() just_a_func() #? ['__closure__'] just_a_func.__closure__ class JustAClass: @not_found_decorator2 def a(self): return 1 #? ['__call__'] JustAClass().a.__call__ #? int() JustAClass().a() #? ['__call__'] JustAClass.a.__call__ #? int() JustAClass.a() # ----------------- # illegal decorators # ----------------- class DecoratorWithoutCall(): def __init__(self, func): self.func = func @DecoratorWithoutCall def f(): return 1 # cannot be resolved - should be ignored @DecoratorWithoutCall(None) def g(): return 1 #? f() #? int() g() class X(): @str def x(self): pass def y(self): #? str() self.x #? self.x() def decorator_var_args(function, *args): return function(*args) @decorator_var_args def function_var_args(param): return param #? int() function_var_args(1) # ----------------- # method decorators # ----------------- def dec(f): def wrapper(s): return f(s) return wrapper class MethodDecorators(): _class_var = 1 def __init__(self): self._method_var = '' @dec def constant(self): return 1.0 @dec def class_var(self): return self._class_var @dec def method_var(self): return self._method_var #? float() MethodDecorators().constant() #? int() MethodDecorators().class_var() #? str() MethodDecorators().method_var() class Base(): @not_existing def __init__(self): pass @not_existing def b(self): return '' @dec def c(self): return 1 class MethodDecoratorDoesntExist(Base): """#272 github: combination of method decorators and super()""" def a(self): #? super().__init__() #? str() super().b() #? int() super().c() #? float() self.d() @doesnt_exist def d(self): return 1.0 # ----------------- # others # ----------------- def memoize(function): def wrapper(*args): if random.choice([0, 1]): pass else: rv = function(*args) return rv return wrapper @memoize def follow_statement(stmt): return stmt # here we had problems with the else clause, because the parent was not right. #? int() follow_statement(1) # ----------------- # class decorators # ----------------- # class decorators should just be ignored @should_ignore class A(): x = 3 def ret(self): return 1 #? int() A().ret() #? int() A().x # ----------------- # On decorator completions # ----------------- import abc #? ['abc'] @abc #? ['abstractmethod'] @abc.abstractmethod # ----------------- # Goto # ----------------- x = 1 #! 5 [] @x.foo() def f(): pass #! 1 ['x = 1'] @x.foo() def f(): pass jedi-0.15.2/test/completion/generators.py0000664000175000017500000000657513577124112020267 0ustar davedave00000000000000# ----------------- # yield statement # ----------------- def gen(): if random.choice([0, 1]): yield 1 else: yield "" gen_exe = gen() #? int() str() next(gen_exe) #? int() str() list next(gen_exe, list) def gen_ret(value): yield value #? int() next(gen_ret(1)) #? [] next(gen_ret()). # generators infer to true if cast by bool. a = '' if gen_ret(): a = 3 #? int() a # ----------------- # generators should not be indexable # ----------------- def get(param): if random.choice([0, 1]): yield 1 else: yield "" #? [] get()[0]. # ----------------- # __iter__ # ----------------- for a in get(): #? int() str() a class Get(): def __iter__(self): if random.choice([0, 1]): yield 1 else: yield "" b = [] for a in Get(): #? int() str() a b += [a] #? list() b #? int() str() b[0] g = iter(Get()) #? int() str() next(g) g = iter([1.0]) #? float() next(g) # ----------------- # __next__ # ----------------- class Counter: def __init__(self, low, high): self.current = low self.high = high def __iter__(self): return self def next(self): """ need to have both __next__ and next, because of py2/3 testing """ return self.__next__() def __next__(self): if self.current > self.high: raise StopIteration else: self.current += 1 return self.current - 1 for c in Counter(3, 8): #? int() print c # ----------------- # tuple assignments # ----------------- def gen(): if random.choice([0,1]): yield 1, "" else: yield 2, 1.0 a, b = next(gen()) #? int() a #? str() float() b def simple(): if random.choice([0, 1]): yield 1 else: yield "" a, b = simple() #? int() str() a # For now this is ok. #? b def simple2(): yield 1 yield "" a, b = simple2() #? int() a #? str() b a, = (a for a in [1]) #? int() a # ----------------- # More complicated access # ----------------- # `close` is a method wrapper. #? ['__call__'] gen().close.__call__ #? gen().throw() #? ['co_consts'] gen().gi_code.co_consts #? [] gen.gi_code.co_consts # `send` is also a method wrapper. #? ['__call__'] gen().send.__call__ #? tuple() gen().send() #? gen()() # ----------------- # empty yield # ----------------- def x(): yield #? None next(x()) #? gen() x() def x(): for i in range(3): yield #? None next(x()) # ----------------- # yield in expression # ----------------- def x(): a= [(yield 1)] #? int() next(x()) # ----------------- # statements # ----------------- def x(): foo = yield #? foo # ----------------- # yield from # ----------------- # python >= 3.4 def yield_from(): yield from iter([1]) #? int() next(yield_from()) def yield_from_multiple(): yield from iter([1]) yield str() return 2.0 x, y = yield_from_multiple() #? int() x #? str() y def test_nested(): x = yield from yield_from_multiple() #? float() x yield x x, y, z = test_nested() #? int() x #? str() y # For whatever reason this is currently empty #? float() z def test_in_brackets(): x = 1 + (yield from yield_from_multiple()) #? float() x generator = (1 for 1 in [1]) x = yield from generator #? None x x = yield from 1 #? x x = yield from [1] #? None x jedi-0.15.2/test/completion/definition.py0000664000175000017500000000206013577124112020227 0ustar davedave00000000000000""" Fallback to callee definition when definition not found. - https://github.com/davidhalter/jedi/issues/131 - https://github.com/davidhalter/jedi/pull/149 """ """Parenthesis closed at next line.""" # Ignore these definitions for a little while, not sure if we really want them. # python <= 2.5 #? isinstance isinstance( ) #? isinstance isinstance( ) #? isinstance isinstance(None, ) #? isinstance isinstance(None, ) """Parenthesis closed at same line.""" # Note: len('isinstance(') == 11 #? 11 isinstance isinstance() # Note: len('isinstance(None,') == 16 ##? 16 isinstance isinstance(None,) # Note: len('isinstance(None,') == 16 ##? 16 isinstance isinstance(None, ) # Note: len('isinstance(None, ') == 17 ##? 17 isinstance isinstance(None, ) # Note: len('isinstance( ') == 12 ##? 12 isinstance isinstance( ) """Unclosed parenthesis.""" #? isinstance isinstance( def x(): pass # acts like EOF ##? isinstance isinstance( def x(): pass # acts like EOF #? isinstance isinstance(None, def x(): pass # acts like EOF ##? isinstance isinstance(None, jedi-0.15.2/test/completion/pep0484_basic.py0000664000175000017500000000577113577124112020360 0ustar davedave00000000000000""" Pep-0484 type hinting """ # python >= 3.4 class A(): pass def function_parameters(a: A, b, c: str, d: int, e: str, f: str, g: int=4): """ :param e: if docstring and annotation agree, only one should be returned :type e: str :param f: if docstring and annotation disagree, both should be returned :type f: int """ #? A() a #? b #? str() c #? int() d #? str() e #? str() f # int() g def return_unspecified(): pass #? return_unspecified() def return_none() -> None: """ Return type None means the same as no return type as far as jedi is concerned """ pass #? None return_none() def return_str() -> str: pass #? str() return_str() def return_custom_class() -> A: pass #? A() return_custom_class() def return_annotation_and_docstring() -> str: """ :rtype: int """ pass #? str() return_annotation_and_docstring() def return_annotation_and_docstring_different() -> str: """ :rtype: str """ pass #? str() return_annotation_and_docstring_different() def annotation_forward_reference(b: "B") -> "B": #? B() b #? ["test_element"] annotation_forward_reference(1).t class B: test_element = 1 pass #? B() annotation_forward_reference(1) class SelfReference: test_element = 1 def test_method(self, x: "SelfReference") -> "SelfReference": #? SelfReference() x #? ["test_element", "test_method"] self.t #? ["test_element", "test_method"] x.t #? ["test_element", "test_method"] self.test_method(1).t #? SelfReference() SelfReference().test_method() def function_with_non_pep_0484_annotation( x: "I can put anything here", xx: "", yy: "\r\n\0;+*&^564835(---^&*34", y: 3 + 3, zz: float) -> int("42"): # infers int from function call #? int() x # infers int from function call #? int() xx # infers int from function call #? int() yy # infers str from function call #? str() y #? float() zz #? function_with_non_pep_0484_annotation(1, 2, 3, "force string") def function_forward_reference_dynamic( x: return_str_type(), y: "return_str_type()") -> None: #? str() x #? str() y def return_str_type(): return str X = str def function_with_assined_class_in_reference(x: X, y: "Y"): #? str() x #? int() y Y = int def just_because_we_can(x: "flo" + "at"): #? float() x def keyword_only(a: str, *, b: str): #? ['startswith'] a.startswi #? ['startswith'] b.startswi def argskwargs(*args: int, **kwargs: float): """ This might be a bit confusing, but is part of the standard. args is changed to Tuple[int] in this case and kwargs to Dict[str, float], which makes sense if you think about it a bit. """ #? tuple() args #? int() args[0] #? str() next(iter(kwargs.keys())) #? float() kwargs[''] jedi-0.15.2/test/completion/dynamic_params.py0000664000175000017500000000422713577124112021075 0ustar davedave00000000000000""" This is used for dynamic object completion. Jedi tries to guess param types with a backtracking approach. """ def func(a, default_arg=2): #? int() default_arg #? int() str() return a #? int() func(1) func int(1) + (int(2))+ func('') # Again the same function, but with another call. def func(a): #? float() return a func(1.0) # Again the same function, but with no call. def func(a): #? return a def func(a): #? float() return a str(func(1.0)) # ----------------- # *args, **args # ----------------- def arg(*args): #? tuple() args #? int() args[0] arg(1,"") # ----------------- # decorators # ----------------- def def_func(f): def wrapper(*args, **kwargs): return f(*args, **kwargs) return wrapper @def_func def func(c): #? str() return c #? str() func("something") @def_func def func(c=1): #? float() return c func(1.0) def tricky_decorator(func): def wrapper(*args): return func(1, *args) return wrapper @tricky_decorator def func(a, b): #? int() a #? float() b func(1.0) # Needs to be here, because in this case func is an import -> shouldn't lead to # exceptions. import sys as func func.sys # ----------------- # classes # ----------------- class A(): def __init__(self, a): #? str() a A("s") class A(): def __init__(self, a): #? int() a self.a = a def test(self, a): #? float() a self.c = self.test2() def test2(self): #? int() return self.a def test3(self): #? int() self.test2() #? int() self.c A(3).test(2.0) A(3).test2() def from_class(x): #? x from UNDEFINED import from_class class Foo(from_class(1),): pass # ----------------- # comprehensions # ----------------- def from_comprehension(foo): #? int() float() return foo [from_comprehension(1.0) for n in (1,)] [from_comprehension(n) for n in (1,)] # ----------------- # lambdas # ----------------- #? int() x_lambda = lambda x: x x_lambda(1) class X(): #? str() x_method = lambda self, a: a X().x_method('') jedi-0.15.2/test/completion/stdlib.py0000664000175000017500000001134413577124112017365 0ustar davedave00000000000000""" std library stuff """ # ----------------- # builtins # ----------------- arr = [''] #? str() sorted(arr)[0] #? str() next(reversed(arr)) next(reversed(arr)) # should not fail if there's no return value. def yielder(): yield None #? None next(reversed(yielder())) # empty reversed should not raise an error #? next(reversed()) #? str() bytes() next(open('')) #? int() {'a':2}.setdefault('a', 3) # Compiled classes should have the meta class attributes. #? ['__itemsize__'] tuple.__itemsize__ #? [] tuple().__itemsize__ # ----------------- # type() calls with one parameter # ----------------- #? int type(1) #? int type(int()) #? type type(int) #? type type(type) #? list type([]) def x(): yield 1 generator = type(x()) #? generator type(x for x in []) #? type(x) type(lambda: x) import math import os #? type(os) type(math) class X(): pass #? type type(X) # ----------------- # type() calls with multiple parameters # ----------------- X = type('X', (object,), dict(a=1)) # Doesn't work yet. #? X.a #? X if os.path.isfile(): #? ['abspath'] fails = os.path.abspath # The type vars and other underscored things from typeshed should not be # findable. #? os._T with open('foo') as f: for line in f.readlines(): #? str() bytes() line # ----------------- # enumerate # ----------------- for i, j in enumerate(["as", "ad"]): #? int() i #? str() j # ----------------- # re # ----------------- import re c = re.compile(r'a') # re.compile should not return str -> issue #68 #? [] c.startswith #? int() c.match().start() #? int() re.match(r'a', 'a').start() for a in re.finditer('a', 'a'): #? int() a.start() # ----------------- # ref # ----------------- import weakref #? int() weakref.proxy(1) #? weakref.ref() weakref.ref(1) #? int() None weakref.ref(1)() # ----------------- # functools # ----------------- import functools basetwo = functools.partial(int, base=2) #? int() basetwo() def function(a, b): return a, b a = functools.partial(function, 0) #? int() a('')[0] #? str() a('')[1] kw = functools.partial(function, b=1.0) tup = kw(1) #? int() tup[0] #? float() tup[1] def my_decorator(f): @functools.wraps(f) def wrapper(*args, **kwds): return f(*args, **kwds) return wrapper @my_decorator def example(a): return a #? str() example('') # ----------------- # sqlite3 (#84) # ----------------- import sqlite3 #? sqlite3.Connection() con = sqlite3.connect() #? sqlite3.Cursor() c = con.cursor() def huhu(db): """ :type db: sqlite3.Connection :param db: the db connection """ #? sqlite3.Connection() db with sqlite3.connect() as c: #? sqlite3.Connection() c # ----------------- # hashlib # ----------------- import hashlib #? ['md5'] hashlib.md5 # ----------------- # copy # ----------------- import copy #? int() copy.deepcopy(1) #? copy.copy() # ----------------- # json # ----------------- # We don't want any results for json, because it depends on IO. import json #? json.load('asdf') #? json.loads('[1]') # ----------------- # random # ----------------- import random class A(object): def say(self): pass class B(object): def shout(self): pass cls = random.choice([A, B]) #? ['say', 'shout'] cls().s # ----------------- # random # ----------------- import zipfile z = zipfile.ZipFile("foo") #? ['upper'] z.read('name').upper # ----------------- # contextlib # ----------------- import contextlib with contextlib.closing('asd') as string: #? str() string # ----------------- # operator # ----------------- import operator f = operator.itemgetter(1) #? float() f([1.0]) #? str() f([1, '']) g = operator.itemgetter(1, 2) x1, x2 = g([1, 1.0, '']) #? float() x1 #? str() x2 x1, x2 = g([1, '']) #? str() x1 #? int() str() x2 # ----------------- # shlex # ----------------- # Github issue #929 import shlex qsplit = shlex.split("foo, ferwerwerw werw werw e") for part in qsplit: #? str() part # ----------------- # Unknown metaclass # ----------------- # Github issue 1321 class Meta(object): pass class Test(metaclass=Meta): def test_function(self): result = super(Test, self).test_function() #? [] result. # ----------------- # Enum # ----------------- # python >= 3.4 import enum class X(enum.Enum): attr_x = 3 attr_y = 2.0 #? ['mro'] X.mro #? ['attr_x', 'attr_y'] X.attr_ #? str() X.attr_x.name #? int() X.attr_x.value #? str() X.attr_y.name #? float() X.attr_y.value #? str() X().name #? float() X().attr_x.attr_y.value # ----------------- # functools Python 3.8 # ----------------- # python >= 3.8 @functools.lru_cache def x() -> int: ... @functools.lru_cache() def y() -> float: ... @functools.lru_cache(8) def z() -> str: ... #? int() x() #? float() y() #? str() z() jedi-0.15.2/test/completion/import_tree/0000775000175000017500000000000013577125145020067 5ustar davedave00000000000000jedi-0.15.2/test/completion/import_tree/globals.py0000664000175000017500000000005613577124112022056 0ustar davedave00000000000000 def something(): global foo foo = 3 jedi-0.15.2/test/completion/import_tree/classes.py0000664000175000017500000000020313577124112022062 0ustar davedave00000000000000blub = 1 class Config2(): pass class BaseClass(): mode = Config2() if isinstance(whaat, int): mode2 = whaat jedi-0.15.2/test/completion/import_tree/mod1.py0000664000175000017500000000007513577124112021274 0ustar davedave00000000000000a = 1 from import_tree.random import a as c foobarbaz = 3.0 jedi-0.15.2/test/completion/import_tree/flow_import.py0000664000175000017500000000004713577124112022774 0ustar davedave00000000000000if name: env = 1 else: env = 2 jedi-0.15.2/test/completion/import_tree/__init__.py0000664000175000017500000000012013577124112022162 0ustar davedave00000000000000a = '' from . import invisible_pkg the_pkg = invisible_pkg invisible_pkg = 1 jedi-0.15.2/test/completion/import_tree/recurse_class1.py0000664000175000017500000000012713577124112023350 0ustar davedave00000000000000from . import recurse_class2 class C(recurse_class2.C): def a(self): pass jedi-0.15.2/test/completion/import_tree/recurse_class2.py0000664000175000017500000000010213577124112023342 0ustar davedave00000000000000from . import recurse_class1 class C(recurse_class1.C): pass jedi-0.15.2/test/completion/import_tree/random.py0000664000175000017500000000011213577124112021704 0ustar davedave00000000000000""" Here because random is also a builtin module. """ a = set foobar = 0 jedi-0.15.2/test/completion/import_tree/mod2.py0000664000175000017500000000003313577124112021267 0ustar davedave00000000000000from . import mod1 as fake jedi-0.15.2/test/completion/import_tree/rename2.py0000664000175000017500000000011313577124112021756 0ustar davedave00000000000000""" used for renaming tests """ from import_tree.rename1 import abc abc jedi-0.15.2/test/completion/import_tree/rename1.py0000664000175000017500000000005113577124112021756 0ustar davedave00000000000000""" used for renaming tests """ abc = 3 jedi-0.15.2/test/completion/import_tree/invisible_pkg.py0000664000175000017500000000030113577124112023251 0ustar davedave00000000000000""" It should not be possible to import this pkg except for the import_tree itself, because it is overwritten there. (It would be possible with a sys.path modification, though). """ foo = 1.0 jedi-0.15.2/test/completion/import_tree/pkg/0000775000175000017500000000000013577125145020650 5ustar davedave00000000000000jedi-0.15.2/test/completion/import_tree/pkg/mod1.py0000664000175000017500000000004513577124112022052 0ustar davedave00000000000000a = 1.0 from ..random import foobar jedi-0.15.2/test/completion/import_tree/pkg/__init__.py0000664000175000017500000000003513577124112022750 0ustar davedave00000000000000a = list from math import * jedi-0.15.2/test/test_compatibility.py0000664000175000017500000000253713577124112017647 0ustar davedave00000000000000from collections import namedtuple from jedi._compatibility import highest_pickle_protocol def test_highest_pickle_protocol(): v = namedtuple('version', 'major, minor') assert highest_pickle_protocol([v(2, 7), v(2, 7)]) == 2 assert highest_pickle_protocol([v(2, 7), v(3, 3)]) == 2 assert highest_pickle_protocol([v(2, 7), v(3, 4)]) == 2 assert highest_pickle_protocol([v(2, 7), v(3, 5)]) == 2 assert highest_pickle_protocol([v(2, 7), v(3, 6)]) == 2 assert highest_pickle_protocol([v(3, 3), v(2, 7)]) == 2 assert highest_pickle_protocol([v(3, 3), v(3, 3)]) == 3 assert highest_pickle_protocol([v(3, 3), v(3, 4)]) == 3 assert highest_pickle_protocol([v(3, 3), v(3, 5)]) == 3 assert highest_pickle_protocol([v(3, 3), v(3, 6)]) == 3 assert highest_pickle_protocol([v(3, 4), v(2, 7)]) == 2 assert highest_pickle_protocol([v(3, 4), v(3, 3)]) == 3 assert highest_pickle_protocol([v(3, 4), v(3, 4)]) == 4 assert highest_pickle_protocol([v(3, 4), v(3, 5)]) == 4 assert highest_pickle_protocol([v(3, 4), v(3, 6)]) == 4 assert highest_pickle_protocol([v(3, 6), v(2, 7)]) == 2 assert highest_pickle_protocol([v(3, 6), v(3, 3)]) == 3 assert highest_pickle_protocol([v(3, 6), v(3, 4)]) == 4 assert highest_pickle_protocol([v(3, 6), v(3, 5)]) == 4 assert highest_pickle_protocol([v(3, 6), v(3, 6)]) == 4 jedi-0.15.2/test/test_inference/0000775000175000017500000000000013577125145016362 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/zipped_imports/0000775000175000017500000000000013577125145021432 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/zipped_imports/pkg.zip0000664000175000017500000000204113577124112022725 0ustar davedave00000000000000PK Hpkg/UX wWwWPKtN2?pkg/__init__.pyK+US-/*QO)IB80ĜT.̼[c#C.PKH pkg/module.pyUX vW`W+K)MUUP/NO)I+sPK0PPKiLzNpkg/namespace/PK cLzN!pkg/namespace/namespace_module.pyPKKzN pkg/nested/PK KzNpkg/nested/__init__.pyPK KzNpkg/nested/nested_module.pyPK H @Apkg/UXwWwWPK?tN2? 2pkg/__init__.pyPKH0P @pkg/module.pyUXvW`WPK?iLzNApkg/namespace/PK? cLzN! #pkg/namespace/namespace_module.pyPK?KzN Abpkg/nested/PK? KzN pkg/nested/__init__.pyPK? KzN pkg/nested/nested_module.pyPKjedi-0.15.2/test/test_inference/zipped_imports/not_pkg.zip0000664000175000017500000000031413577124112023606 0ustar davedave00000000000000PKH not_pkg.pyUX "W"W+K)MUUP/KIOIUJI($*$&g'EPK<6*,PKH<6*, @not_pkg.pyUX"W"WPKDrjedi-0.15.2/test/test_inference/test_fstring.py0000664000175000017500000000060313577124112021437 0ustar davedave00000000000000import pytest from textwrap import dedent @pytest.fixture(autouse=True) def skip_not_supported(environment): if environment.version_info < (3, 6): pytest.skip() def test_fstring_multiline(Script): code = dedent("""\ '' f'''s{ str.uppe ''' """ ) c, = Script(code, line=2, column=9).completions() assert c.name == 'upper' jedi-0.15.2/test/test_inference/test_sys_path.py0000664000175000017500000001003113577124112021611 0ustar davedave00000000000000import os from glob import glob import sys import shutil import pytest from ..helpers import skip_if_windows, skip_if_not_windows from jedi.inference import sys_path from jedi.api.environment import create_environment def test_paths_from_assignment(Script): def paths(src): script = Script(src, path='/foo/bar.py') expr_stmt = script._module_node.children[0] return set(sys_path._paths_from_assignment(script._get_module_context(), expr_stmt)) # Normalize paths for Windows. path_a = os.path.abspath('/foo/a') path_b = os.path.abspath('/foo/b') path_c = os.path.abspath('/foo/c') assert paths('sys.path[0:0] = ["a"]') == {path_a} assert paths('sys.path = ["b", 1, x + 3, y, "c"]') == {path_b, path_c} assert paths('sys.path = a = ["a"]') == {path_a} # Fail for complicated examples. assert paths('sys.path, other = ["a"], 2') == set() def test_venv_and_pths(venv_path): pjoin = os.path.join CUR_DIR = os.path.dirname(__file__) site_pkg_path = pjoin(venv_path, 'lib') if os.name == 'nt': site_pkg_path = pjoin(site_pkg_path, 'site-packages') else: site_pkg_path = glob(pjoin(site_pkg_path, 'python*', 'site-packages'))[0] shutil.rmtree(site_pkg_path) shutil.copytree(pjoin(CUR_DIR, 'sample_venvs', 'pth_directory'), site_pkg_path) virtualenv = create_environment(venv_path) venv_paths = virtualenv.get_sys_path() ETALON = [ # For now disable egg-links. I have no idea how they work... ~ dave #pjoin('/path', 'from', 'egg-link'), #pjoin(site_pkg_path, '.', 'relative', 'egg-link', 'path'), site_pkg_path, pjoin(site_pkg_path, 'dir-from-foo-pth'), '/foo/smth.py:module', # Not sure why it's added twice. It has to do with site.py which is not # something we can change. However this obviously also doesn't matter. '/foo/smth.py:from_func', '/foo/smth.py:from_func', ] # Ensure that pth and egg-link paths were added. assert venv_paths[-len(ETALON):] == ETALON # Ensure that none of venv dirs leaked to the interpreter. assert not set(sys.path).intersection(ETALON) _s = ['/a', '/b', '/c/d/'] @pytest.mark.parametrize( 'sys_path_, module_path, expected, is_package', [ (_s, '/a/b', ('b',), False), (_s, '/a/b/c', ('b', 'c'), False), (_s, '/a/b.py', ('b',), False), (_s, '/a/b/c.py', ('b', 'c'), False), (_s, '/x/b.py', None, False), (_s, '/c/d/x.py', ('x',), False), (_s, '/c/d/x.py', ('x',), False), (_s, '/c/d/x/y.py', ('x', 'y'), False), # If dots are in there they also resolve. These are obviously illegal # in Python, but Jedi can handle them. Give the user a bit more freedom # that he will have to correct eventually. (_s, '/a/b.c.py', ('b.c',), False), (_s, '/a/b.d/foo.bar.py', ('b.d', 'foo.bar'), False), (_s, '/a/.py', None, False), (_s, '/a/c/.py', None, False), (['/foo'], '/foo/bar/__init__.py', ('bar',), True), (['/foo'], '/foo/bar/baz/__init__.py', ('bar', 'baz'), True), skip_if_windows(['/foo'], '/foo/bar.so', ('bar',), False), skip_if_windows(['/foo'], '/foo/bar/__init__.so', ('bar',), True), skip_if_not_windows(['/foo'], '/foo/bar.pyd', ('bar',), False), skip_if_not_windows(['/foo'], '/foo/bar/__init__.pyd', ('bar',), True), (['/foo'], '/x/bar.py', None, False), (['/foo'], '/foo/bar.xyz', ('bar.xyz',), False), (['/foo', '/foo/bar'], '/foo/bar/baz', ('baz',), False), (['/foo/bar', '/foo'], '/foo/bar/baz', ('baz',), False), (['/'], '/bar/baz.py', ('bar', 'baz',), False), ]) def test_transform_path_to_dotted(sys_path_, module_path, expected, is_package): # transform_path_to_dotted expects normalized absolute paths. sys_path_ = [os.path.abspath(path) for path in sys_path_] module_path = os.path.abspath(module_path) assert sys_path.transform_path_to_dotted(sys_path_, module_path) \ == (expected, is_package) jedi-0.15.2/test/test_inference/namespace_package/0000775000175000017500000000000013577125145021771 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns1/0000775000175000017500000000000013577125145022472 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns1/pkg/0000775000175000017500000000000013577125145023253 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns1/pkg/ns1_file.py0000664000175000017500000000002213577124112025310 0ustar davedave00000000000000foo = 'ns1_file!' jedi-0.15.2/test/test_inference/namespace_package/ns1/pkg/ns1_folder/0000775000175000017500000000000013577125145025307 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns1/pkg/ns1_folder/__init__.py0000664000175000017500000000002413577124112027405 0ustar davedave00000000000000foo = 'ns1_folder!' jedi-0.15.2/test/test_inference/namespace_package/ns1/pkg/__init__.py0000664000175000017500000000032613577124112025356 0ustar davedave00000000000000foo = 'ns1!' # this is a namespace package try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) jedi-0.15.2/test/test_inference/namespace_package/ns2/0000775000175000017500000000000013577125145022473 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns2/pkg/0000775000175000017500000000000013577125145023254 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns2/pkg/ns2_file.py0000664000175000017500000000002213577124112025312 0ustar davedave00000000000000foo = 'ns2_file!' jedi-0.15.2/test/test_inference/namespace_package/ns2/pkg/ns2_folder/0000775000175000017500000000000013577125145025311 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns2/pkg/ns2_folder/__init__.py0000664000175000017500000000002413577124112027407 0ustar davedave00000000000000foo = 'ns2_folder!' jedi-0.15.2/test/test_inference/namespace_package/ns2/pkg/ns2_folder/nested/0000775000175000017500000000000013577125145026573 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/namespace_package/ns2/pkg/ns2_folder/nested/__init__.py0000664000175000017500000000002013577124112030665 0ustar davedave00000000000000foo = 'nested!' jedi-0.15.2/test/test_inference/flask-site-packages/0000775000175000017500000000000013577125145022200 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flaskext/0000775000175000017500000000000013577125145024021 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flaskext/bar.py0000664000175000017500000000003413577124112025125 0ustar davedave00000000000000class Bar(object): pass jedi-0.15.2/test/test_inference/flask-site-packages/flaskext/__init__.py0000664000175000017500000000000013577124112026111 0ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flaskext/moo/0000775000175000017500000000000013577125145024613 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flaskext/moo/__init__.py0000664000175000017500000000001013577124112026704 0ustar davedave00000000000000Moo = 1 jedi-0.15.2/test/test_inference/flask-site-packages/flask/0000775000175000017500000000000013577125145023300 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flask/__init__.py0000664000175000017500000000002513577124112025377 0ustar davedave00000000000000 jedi-0.15.2/test/test_inference/flask-site-packages/flask/ext/0000775000175000017500000000000013577125145024100 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flask/ext/__init__.py0000664000175000017500000000000113577124112026171 0ustar davedave00000000000000 jedi-0.15.2/test/test_inference/flask-site-packages/flask_baz/0000775000175000017500000000000013577125145024134 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/flask-site-packages/flask_baz/__init__.py0000664000175000017500000000001013577124112026225 0ustar davedave00000000000000Baz = 1 jedi-0.15.2/test/test_inference/flask-site-packages/flask_foo.py0000664000175000017500000000003413577124112024503 0ustar davedave00000000000000class Foo(object): pass jedi-0.15.2/test/test_inference/test_docstring.py0000664000175000017500000002421113577124112021760 0ustar davedave00000000000000""" Testing of docstring related issues and especially ``jedi.docstrings``. """ from textwrap import dedent import jedi import pytest from ..helpers import unittest import sys try: import numpydoc # NOQA except ImportError: numpydoc_unavailable = True else: numpydoc_unavailable = False try: import numpy # NOQA except ImportError: numpy_unavailable = True else: numpy_unavailable = False if sys.version_info.major == 2: # In Python 2 there's an issue with tox/docutils that makes the tests fail, # Python 2 is soon end-of-life, so just don't support numpydoc for it anymore. numpydoc_unavailable = True def test_function_doc(Script): defs = Script(""" def func(): '''Docstring of `func`.''' func""").goto_definitions() assert defs[0].docstring() == 'func()\n\nDocstring of `func`.' def test_class_doc(Script): defs = Script(""" class TestClass(): '''Docstring of `TestClass`.''' TestClass""").goto_definitions() expected = 'Docstring of `TestClass`.' assert defs[0].docstring(raw=True) == expected assert defs[0].docstring() == 'TestClass()\n\n' + expected def test_class_doc_with_init(Script): d, = Script(""" class TestClass(): '''Docstring''' def __init__(self, foo, bar=3): pass TestClass""").goto_definitions() assert d.docstring() == 'TestClass(foo, bar=3)\n\nDocstring' def test_instance_doc(Script): defs = Script(""" class TestClass(): '''Docstring of `TestClass`.''' tc = TestClass() tc""").goto_definitions() assert defs[0].docstring() == 'Docstring of `TestClass`.' @unittest.skip('need inference_state class for that') def test_attribute_docstring(Script): defs = Script(""" x = None '''Docstring of `x`.''' x""").goto_definitions() assert defs[0].docstring() == 'Docstring of `x`.' @unittest.skip('need inference_state class for that') def test_multiple_docstrings(Script): defs = Script(""" def func(): '''Original docstring.''' x = func '''Docstring of `x`.''' x""").goto_definitions() docs = [d.docstring() for d in defs] assert docs == ['Original docstring.', 'Docstring of `x`.'] def test_completion(Script): assert Script(''' class DocstringCompletion(): #? [] """ asdfas """''').completions() def test_docstrings_type_dotted_import(Script): s = """ def func(arg): ''' :type arg: random.Random ''' arg.""" names = [c.name for c in Script(s).completions()] assert 'seed' in names def test_docstrings_param_type(Script): s = """ def func(arg): ''' :param str arg: some description ''' arg.""" names = [c.name for c in Script(s).completions()] assert 'join' in names def test_docstrings_type_str(Script): s = """ def func(arg): ''' :type arg: str ''' arg.""" names = [c.name for c in Script(s).completions()] assert 'join' in names def test_docstring_instance(Script): # The types hint that it's a certain kind s = dedent(""" class A: def __init__(self,a): ''' :type a: threading.Thread ''' if a is not None: a.start() self.a = a def method_b(c): ''' :type c: A ''' c.""") names = [c.name for c in Script(s).completions()] assert 'a' in names assert '__init__' in names assert 'mro' not in names # Exists only for types. def test_docstring_keyword(Script): completions = Script('assert').completions() assert 'assert' in completions[0].docstring() def test_docstring_params_formatting(Script): defs = Script(""" def func(param1, param2, param3): pass func""").goto_definitions() assert defs[0].docstring() == 'func(param1, param2, param3)' # ---- Numpy Style Tests --- @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_parameters(): s = dedent(''' def foobar(x, y): """ Parameters ---------- x : int y : str """ y.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' in names assert 'capitalize' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_parameters_set_of_values(): s = dedent(''' def foobar(x, y): """ Parameters ---------- x : {'foo', 'bar', 100500}, optional """ x.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' in names assert 'capitalize' in names assert 'numerator' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_parameters_alternative_types(): s = dedent(''' def foobar(x, y): """ Parameters ---------- x : int or str or list """ x.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' in names assert 'capitalize' in names assert 'numerator' in names assert 'append' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_invalid(): s = dedent(''' def foobar(x, y): """ Parameters ---------- x : int (str, py.path.local """ x.''') assert not jedi.Script(s).completions() @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_returns(): s = dedent(''' def foobar(): """ Returns ---------- x : int y : str """ return x def bazbiz(): z = foobar() z.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' in names assert 'capitalize' in names assert 'numerator' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_returns_set_of_values(): s = dedent(''' def foobar(): """ Returns ---------- x : {'foo', 'bar', 100500} """ return x def bazbiz(): z = foobar() z.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' in names assert 'capitalize' in names assert 'numerator' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_returns_alternative_types(): s = dedent(''' def foobar(): """ Returns ---------- int or list of str """ return x def bazbiz(): z = foobar() z.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' not in names assert 'capitalize' not in names assert 'numerator' in names assert 'append' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_returns_list_of(): s = dedent(''' def foobar(): """ Returns ---------- list of str """ return x def bazbiz(): z = foobar() z.''') names = [c.name for c in jedi.Script(s).completions()] assert 'append' in names assert 'isupper' not in names assert 'capitalize' not in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_returns_obj(): s = dedent(''' def foobar(x, y): """ Returns ---------- int or random.Random """ return x + y def bazbiz(): z = foobar(x, y) z.''') script = jedi.Script(s) names = [c.name for c in script.completions()] assert 'numerator' in names assert 'seed' in names @pytest.mark.skipif(numpydoc_unavailable, reason='numpydoc module is unavailable') def test_numpydoc_yields(): s = dedent(''' def foobar(): """ Yields ---------- x : int y : str """ return x def bazbiz(): z = foobar(): z.''') names = [c.name for c in jedi.Script(s).completions()] assert 'isupper' in names assert 'capitalize' in names assert 'numerator' in names @pytest.mark.skipif(numpydoc_unavailable or numpy_unavailable, reason='numpydoc or numpy module is unavailable') def test_numpy_returns(): s = dedent(''' import numpy x = numpy.asarray([]) x.d''' ) names = [c.name for c in jedi.Script(s).completions()] assert 'diagonal' in names @pytest.mark.skipif(numpydoc_unavailable or numpy_unavailable, reason='numpydoc or numpy module is unavailable') def test_numpy_comp_returns(): s = dedent(''' import numpy x = numpy.array([]) x.d''' ) names = [c.name for c in jedi.Script(s).completions()] assert 'diagonal' in names def test_decorator(Script): code = dedent(''' def decorator(name=None): def _decorate(func): @wraps(func) def wrapper(*args, **kwargs): """wrapper docstring""" return func(*args, **kwargs) return wrapper return _decorate @decorator('testing') def check_user(f): """Nice docstring""" pass check_user''') d, = Script(code).goto_definitions() assert d.docstring(raw=True) == 'Nice docstring' def test_basic_str_init_signature(Script, disable_typeshed): # See GH #1414 and GH #1426 code = dedent(''' class Foo(str): pass Foo(''') c, = Script(code).call_signatures() assert c.name == 'Foo' jedi-0.15.2/test/test_inference/test_precedence.py0000664000175000017500000000121113577124112022054 0ustar davedave00000000000000from jedi.inference.compiled import CompiledObject import pytest @pytest.mark.parametrize('source', [ pytest.param('1 == 1'), pytest.param('1.0 == 1'), # Unfortunately for now not possible, because it's a typeshed object. pytest.param('... == ...', marks=pytest.mark.xfail), ]) def test_equals(Script, environment, source): if environment.version_info.major < 3: pytest.skip("Ellipsis does not exists in 2") script = Script(source) node = script._module_node.children[0] first, = script._get_module_context().infer_node(node) assert isinstance(first, CompiledObject) and first.get_safe_value() is True jedi-0.15.2/test/test_inference/test_mixed.py0000664000175000017500000000171213577124112021073 0ustar davedave00000000000000import sys if sys.version_info > (3, 5): from typing import Generic, TypeVar, List import pytest import jedi def interpreter(code, namespace, *args, **kwargs): return jedi.Interpreter(code, [namespace], *args, **kwargs) def test_on_code(): from functools import wraps i = interpreter("wraps.__code__", {'wraps': wraps}) assert i.goto_definitions() @pytest.mark.skipif('sys.version_info < (3,5)') def test_generics(): # Used to raise a recursion error T = TypeVar('T') class Stack(Generic[T]): def __init__(self): self.items = [] # type: List[T] def push(self, item): self.items.append(item) def pop(self): # type: () -> T return self.items.pop() class StackWrapper(): def __init__(self): self.stack = Stack() self.stack.push(1) s = StackWrapper() print(interpreter('s.stack.pop().', locals()).completions()) jedi-0.15.2/test/test_inference/absolute_import/0000775000175000017500000000000013577125145021572 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/absolute_import/local_module.py0000664000175000017500000000057713577124112024605 0ustar davedave00000000000000""" This is a module that imports the *standard library* unittest, despite there being a local "unittest" module. It specifies that it wants the stdlib one with the ``absolute_import`` __future__ import. The twisted equivalent of this module is ``twisted.trial._synctest``. """ from __future__ import absolute_import import unittest class Assertions(unittest.TestCase): pass jedi-0.15.2/test/test_inference/absolute_import/unittest.py0000664000175000017500000000066513577124112024023 0ustar davedave00000000000000""" This is a module that shadows a builtin (intentionally). It imports a local module, which in turn imports stdlib unittest (the name shadowed by this module). If that is properly resolved, there's no problem. However, if jedi doesn't understand absolute_imports, it will get this module again, causing infinite recursion. """ from local_module import Assertions class TestCase(Assertions): def test(self): self.assertT jedi-0.15.2/test/test_inference/test_absolute_import.py0000664000175000017500000000043713577124112023200 0ustar davedave00000000000000""" Tests ``from __future__ import absolute_import`` (only important for Python 2.X) """ from .. import helpers @helpers.cwd_at("test/test_inference/absolute_import") def test_can_complete_when_shadowing(Script): script = Script(path="unittest.py") assert script.completions() jedi-0.15.2/test/test_inference/implicit_namespace_package/0000775000175000017500000000000013577125145023663 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_namespace_package/ns1/0000775000175000017500000000000013577125145024364 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_namespace_package/ns1/pkg/0000775000175000017500000000000013577125145025145 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_namespace_package/ns1/pkg/ns1_file.py0000664000175000017500000000002213577124112027202 0ustar davedave00000000000000foo = 'ns1_file!' jedi-0.15.2/test/test_inference/implicit_namespace_package/ns2/0000775000175000017500000000000013577125145024365 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_namespace_package/ns2/pkg/0000775000175000017500000000000013577125145025146 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_namespace_package/ns2/pkg/ns2_file.py0000664000175000017500000000002213577124112027204 0ustar davedave00000000000000foo = 'ns2_file!' jedi-0.15.2/test/test_inference/test_compiled.py0000664000175000017500000001262513577124112021566 0ustar davedave00000000000000from textwrap import dedent import math import sys from collections import Counter from datetime import datetime import pytest from jedi.inference import compiled from jedi.inference.compiled.access import DirectObjectAccess from jedi.inference.gradual.conversion import _stub_to_python_value_set from jedi.inference.syntax_tree import _infer_comparison_part def test_simple(inference_state, environment): obj = compiled.create_simple_object(inference_state, u'_str_') upper, = obj.py__getattribute__(u'upper') objs = list(upper.execute_with_values()) assert len(objs) == 1 if environment.version_info.major == 2: expected = 'unicode' else: expected = 'str' assert objs[0].name.string_name == expected def test_builtin_loading(inference_state): string, = inference_state.builtins_module.py__getattribute__(u'str') from_name, = string.py__getattribute__(u'__init__') assert from_name.tree_node assert not from_name.py__doc__() # It's a stub def test_next_docstr(inference_state): next_ = compiled.builtin_from_name(inference_state, u'next') assert next_.tree_node is not None assert next_.py__doc__() == '' # It's a stub for non_stub in _stub_to_python_value_set(next_): assert non_stub.py__doc__() == next.__doc__ def test_parse_function_doc_illegal_docstr(): docstr = """ test_func(o doesn't have a closing bracket. """ assert ('', '') == compiled.value._parse_function_doc(docstr) def test_doc(inference_state): """ Even CompiledObject docs always return empty docstrings - not None, that's just a Jedi API definition. """ str_ = compiled.create_simple_object(inference_state, u'') # Equals `''.__getnewargs__` obj, = str_.py__getattribute__(u'__getnewargs__') assert obj.py__doc__() == '' def test_string_literals(Script, environment): def typ(string): d = Script("a = %s; a" % string).goto_definitions()[0] return d.name assert typ('""') == 'str' assert typ('r""') == 'str' if environment.version_info.major > 2: assert typ('br""') == 'bytes' assert typ('b""') == 'bytes' assert typ('u""') == 'str' else: assert typ('b""') == 'str' assert typ('u""') == 'unicode' def test_method_completion(Script, environment): code = dedent(''' class Foo: def bar(self): pass foo = Foo() foo.bar.__func__''') assert [c.name for c in Script(code).completions()] == ['__func__'] def test_time_docstring(Script): import time comp, = Script('import time\ntime.sleep').completions() assert comp.docstring(raw=True) == time.sleep.__doc__ expected = 'sleep(secs: float) -> None\n\n' + time.sleep.__doc__ assert comp.docstring() == expected def test_dict_values(Script, environment): if environment.version_info.major == 2: # It looks like typeshed for Python 2 returns Any. pytest.skip() assert Script('import sys\nsys.modules["alshdb;lasdhf"]').goto_definitions() def test_getitem_on_none(Script): script = Script('None[1j]') assert not script.goto_definitions() issue, = script._inference_state.analysis assert issue.name == 'type-error-not-subscriptable' def _return_int(): return 1 @pytest.mark.parametrize( 'attribute, expected_name, expected_parent', [ ('x', 'int', 'builtins'), ('y', 'int', 'builtins'), ('z', 'bool', 'builtins'), ('cos', 'cos', 'math'), ('dec', 'Decimal', 'decimal'), ('dt', 'datetime', 'datetime'), ('ret_int', '_return_int', 'test.test_inference.test_compiled'), ] ) def test_parent_context(same_process_inference_state, attribute, expected_name, expected_parent): import decimal class C: x = 1 y = int z = True cos = math.cos dec = decimal.Decimal(1) dt = datetime(2000, 1, 1) ret_int = _return_int o = compiled.CompiledObject( same_process_inference_state, DirectObjectAccess(same_process_inference_state, C) ) x, = o.py__getattribute__(attribute) assert x.py__name__() == expected_name module_name = x.parent_context.py__name__() if module_name == '__builtin__': module_name = 'builtins' # Python 2 assert module_name == expected_parent assert x.parent_context.parent_context is None @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize( 'obj, expected_names', [ ('', ['str']), (str, ['str']), (''.upper, ['str', 'upper']), (str.upper, ['str', 'upper']), (math.cos, ['cos']), (Counter, ['Counter']), (Counter(""), ['Counter']), (Counter.most_common, ['Counter', 'most_common']), (Counter("").most_common, ['Counter', 'most_common']), ] ) def test_qualified_names(same_process_inference_state, obj, expected_names): o = compiled.CompiledObject( same_process_inference_state, DirectObjectAccess(same_process_inference_state, obj) ) assert o.get_qualified_names() == tuple(expected_names) def test_operation(Script, inference_state, create_compiled_object): b = create_compiled_object(bool) true, = _infer_comparison_part( inference_state, b.parent_context, left=list(b.execute_with_values())[0], operator=u'is not', right=b, ) assert true.py__name__() == 'bool' jedi-0.15.2/test/test_inference/test_buildout_detection.py0000664000175000017500000000502613577124112023654 0ustar davedave00000000000000import os from textwrap import dedent from jedi._compatibility import force_unicode from jedi.inference.sys_path import (_get_parent_dir_with_file, _get_buildout_script_paths, check_sys_path_modifications) from ..helpers import cwd_at def check_module_test(Script, code): module_context = Script(code)._get_module_context() return check_sys_path_modifications(module_context) @cwd_at('test/examples/buildout_project/src/proj_name') def test_parent_dir_with_file(Script): parent = _get_parent_dir_with_file( os.path.abspath(os.curdir), 'buildout.cfg') assert parent is not None assert parent.endswith(os.path.join('test', 'examples', 'buildout_project')) @cwd_at('test/examples/buildout_project/src/proj_name') def test_buildout_detection(Script): scripts = list(_get_buildout_script_paths(os.path.abspath('./module_name.py'))) assert len(scripts) == 1 curdir = os.path.abspath(os.curdir) appdir_path = os.path.normpath(os.path.join(curdir, '../../bin/app')) assert scripts[0] == appdir_path def test_append_on_non_sys_path(Script): code = dedent(""" class Dummy(object): path = [] d = Dummy() d.path.append('foo')""" ) paths = check_module_test(Script, code) assert not paths assert 'foo' not in paths def test_path_from_invalid_sys_path_assignment(Script): code = dedent(""" import sys sys.path = 'invalid'""" ) paths = check_module_test(Script, code) assert not paths assert 'invalid' not in paths @cwd_at('test/examples/buildout_project/src/proj_name/') def test_sys_path_with_modifications(Script): code = dedent(""" import os """) path = os.path.abspath(os.path.join(os.curdir, 'module_name.py')) paths = Script(code, path=path)._inference_state.get_sys_path() assert '/tmp/.buildout/eggs/important_package.egg' in paths def test_path_from_sys_path_assignment(Script): code = dedent(""" #!/usr/bin/python import sys sys.path[0:0] = [ '/usr/lib/python3.4/site-packages', '/home/test/.buildout/eggs/important_package.egg' ] path[0:0] = [1] import important_package if __name__ == '__main__': sys.exit(important_package.main())""" ) paths = check_module_test(Script, code) paths = list(map(force_unicode, paths)) assert 1 not in paths assert '/home/test/.buildout/eggs/important_package.egg' in paths jedi-0.15.2/test/test_inference/test_literals.py0000664000175000017500000000261713577124112021611 0ustar davedave00000000000000import pytest from jedi.inference.value import TreeInstance def _infer_literal(Script, code, is_fstring=False): def_, = Script(code).goto_definitions() if is_fstring: assert def_.name == 'str' assert isinstance(def_._name._value, TreeInstance) return '' else: return def_._name._value.get_safe_value() def test_f_strings(Script, environment): """ f literals are not really supported in Jedi. They just get ignored and an empty string is returned. """ if environment.version_info < (3, 6): pytest.skip() assert _infer_literal(Script, 'f"asdf"', is_fstring=True) == '' assert _infer_literal(Script, 'f"{asdf} "', is_fstring=True) == '' assert _infer_literal(Script, 'F"{asdf} "', is_fstring=True) == '' assert _infer_literal(Script, 'rF"{asdf} "', is_fstring=True) == '' def test_rb_strings(Script, environment, skip_python2): assert _infer_literal(Script, 'x = br"asdf"; x') == b'asdf' assert _infer_literal(Script, 'x = rb"asdf"; x') == b'asdf' def test_thousand_separators(Script, environment): if environment.version_info < (3, 6): pytest.skip() assert _infer_literal(Script, '1_2_3') == 123 assert _infer_literal(Script, '123_456_789') == 123456789 assert _infer_literal(Script, '0x3_4') == 52 assert _infer_literal(Script, '0b1_0') == 2 assert _infer_literal(Script, '0o1_0') == 8 jedi-0.15.2/test/test_inference/__init__.py0000664000175000017500000000000013577124112020452 0ustar davedave00000000000000jedi-0.15.2/test/test_inference/test_stdlib.py0000664000175000017500000000553713577124112021257 0ustar davedave00000000000000""" Tests of various stdlib related things that could not be tested with "Black Box Tests". """ from textwrap import dedent import pytest @pytest.mark.parametrize(['letter', 'expected'], [ ('n', ['name']), ('s', ['smart']), ]) def test_namedtuple_str(letter, expected, Script): source = dedent("""\ import collections Person = collections.namedtuple('Person', 'name smart') dave = Person('Dave', False) dave.%s""") % letter result = Script(source).completions() completions = set(r.name for r in result) assert completions == set(expected) def test_namedtuple_list(Script): source = dedent("""\ import collections Cat = collections.namedtuple('Person', ['legs', u'length', 'large']) garfield = Cat(4, '85cm', True) garfield.l""") result = Script(source).completions() completions = set(r.name for r in result) assert completions == {'legs', 'length', 'large'} def test_namedtuple_content(Script): source = dedent("""\ import collections Foo = collections.namedtuple('Foo', ['bar', 'baz']) named = Foo(baz=4, bar=3.0) unnamed = Foo(4, '') """) def d(source): x, = Script(source).goto_definitions() return x.name assert d(source + 'unnamed.bar') == 'int' assert d(source + 'unnamed.baz') == 'str' assert d(source + 'named.bar') == 'float' assert d(source + 'named.baz') == 'int' def test_nested_namedtuples(Script): """ From issue #730. """ s = Script(dedent(''' import collections Dataset = collections.namedtuple('Dataset', ['data']) Datasets = collections.namedtuple('Datasets', ['train']) train_x = Datasets(train=Dataset('data_value')) train_x.train.''' )) assert 'data' in [c.name for c in s.completions()] def test_namedtuple_goto_definitions(Script): source = dedent(""" from collections import namedtuple Foo = namedtuple('Foo', 'id timestamp gps_timestamp attributes') Foo""") from jedi.api import Script d1, = Script(source).goto_definitions() assert d1.get_line_code() == "class Foo(tuple):\n" assert d1.module_path is None def test_re_sub(Script, environment): """ This whole test was taken out of completion/stdlib.py, because of the version differences. """ def run(code): defs = Script(code).goto_definitions() return {d.name for d in defs} names = run("import re; re.sub('a', 'a', 'f')") if environment.version_info.major == 2: assert names == {'str'} else: assert names == {'str'} # This param is missing because of overloading. names = run("import re; re.sub('a', 'a')") if environment.version_info.major == 2: assert names == {'str', 'unicode'} else: assert names == {'str', 'bytes'} jedi-0.15.2/test/test_inference/test_namespace_package.py0000664000175000017500000000633213577124112023377 0ustar davedave00000000000000from os.path import dirname, join import pytest import py from ..helpers import get_example_dir SYS_PATH = [join(dirname(__file__), d) for d in ['namespace_package/ns1', 'namespace_package/ns2']] def script_with_path(Script, *args, **kwargs): return Script(sys_path=SYS_PATH, *args, **kwargs) def test_goto_definition(Script): assert script_with_path(Script, 'from pkg import ns1_file').goto_definitions() assert script_with_path(Script, 'from pkg import ns2_file').goto_definitions() assert not script_with_path(Script, 'from pkg import ns3_file').goto_definitions() @pytest.mark.parametrize( ('source', 'solution'), [ ('from pkg.ns2_folder.nested import foo', 'nested!'), ('from pkg.ns2_folder import foo', 'ns2_folder!'), ('from pkg.ns2_file import foo', 'ns2_file!'), ('from pkg.ns1_folder import foo', 'ns1_folder!'), ('from pkg.ns1_file import foo', 'ns1_file!'), ('from pkg import foo', 'ns1!'), ] ) def test_goto_assignment(Script, source, solution): ass = script_with_path(Script, source).goto_assignments() assert len(ass) == 1 assert ass[0].description == "foo = '%s'" % solution def test_simple_completions(Script): # completion completions = script_with_path(Script, 'from pkg import ').completions() names = [str(c.name) for c in completions] # str because of unicode compare = ['foo', 'ns1_file', 'ns1_folder', 'ns2_folder', 'ns2_file', 'pkg_resources', 'pkgutil', '__name__', '__path__', '__package__', '__file__', '__doc__'] # must at least contain these items, other items are not important assert set(compare) == set(names) @pytest.mark.parametrize( ('source', 'solution'), [ ('from pkg import ns2_folder as x', 'ns2_folder!'), ('from pkg import ns2_file as x', 'ns2_file!'), ('from pkg.ns2_folder import nested as x', 'nested!'), ('from pkg import ns1_folder as x', 'ns1_folder!'), ('from pkg import ns1_file as x', 'ns1_file!'), ('import pkg as x', 'ns1!'), ] ) def test_completions(Script, source, solution): for c in script_with_path(Script, source + '; x.').completions(): if c.name == 'foo': completion = c solution = "foo = '%s'" % solution assert completion.description == solution def test_nested_namespace_package(Script): code = 'from nested_namespaces.namespace.pkg import CONST' sys_path = [dirname(__file__)] script = Script(sys_path=sys_path, source=code, line=1, column=45) result = script.goto_definitions() assert len(result) == 1 def test_relative_import(Script, environment, tmpdir): """ Attempt a relative import in a very simple namespace package. """ if environment.version_info < (3, 4): pytest.skip() directory = get_example_dir('namespace_package_relative_import') # Need to copy the content in a directory where there's no __init__.py. py.path.local(directory).copy(tmpdir) file_path = join(tmpdir.strpath, "rel1.py") script = Script(path=file_path, line=1) d, = script.goto_definitions() assert d.name == 'int' d, = script.goto_assignments() assert d.name == 'name' assert d.module_name == 'rel2' jedi-0.15.2/test/test_inference/init_extension_module/0000775000175000017500000000000013577125145022766 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/init_extension_module/__init__.cpython-34m.so0000775000175000017500000004015513577124112027155 0ustar davedave00000000000000ELF>@H0@8@"    88 8 $$Ptd000QtdRtd  GNUue+Betaߜ`@  )֡BE|qX p \m|+ "? 0     p__gmon_start___init_fini__cxa_finalize_Jv_RegisterClassesPyInit_init_extension_modulePyModule_Create2_Py_NoneStructPyModule_AddObjectlibpthread.so.0libc.so.6_edata__bss_start_endGLIBC_2.2.5ui     h        HWMH5Z %\ @%Z h%R h%J hHH HtHÐU= HATSubH= t H= H  L% H L)HHH9s DHHe AHZ H9rF [A\]fH= UHtHS Ht]H= @]ÐSH= H H5VHHH[UHSHH0 HtH# HHHuH[]ÐHHfooinit_extension_module;`8p`zRx $ @FJ w?;*3$"D0An p o8  H( oxooVo8   GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3,0od 8?int5 ii i;17xb#(###4 # k#(#0#8 #@ #H!#P"#X$#`5&#h(b#p#,b#tN.p#x2F#w3T#U4#8#RA{#J#K#L#M#N-#+Pb#6R#   # # fb#  8x  8 g0?  G iY k # lZ#NZ.O#xP#Q # Q #(U #0V #85W #@mX. #HaY#PZf #X|^O#`\_U#h`[#pdr #xe#ff #g" #hZ # ka#>n8#7p#t( #w#({ #C ~ #@ # ##*##VZ## #1 # # #I(# #z #># #H#%#y#k# #M# #Ym0o .p`# q #rk`%^$b4?E U`f{ b b Pxbuf#obj#len #  # 1b# b#$ #( ex#0 \ x#8 x#@ #H bb~Cb   b( 3 9 bS  ^ # # # # R# #( #0 #8 #@ #H #P  #X #` h#h #p #x ## ###`## #- #% #\ #k #{#j##P## #tS P 4##U#VU## >{#(^#0 #8:"#@#U#HJ$j &M '4#(#)#* -  .#k/#0Y 3   _4   :  b  bJ<  " =>: @ bZ ?G@A~   zB   bCD@EFGH(Z# I4:OZ ^  M  T ( )# *# +b# -#g (  #get #set @#doc #  # oT/g" ( !x . "`# - #~#  $ #  %# x &3 !h /  0# x 1#( * 2#0 U 3 #8 L 4-#@  5#H  6( #P  7#X < 8 #`O %+@Z KQbk m L  @ MVS`% : ; I$ > $ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I : ; : ; ' II : ; I8 '  : ; : ;I : ;< ' I.? : ; ' I@4: ; I4: ; I 4: ; I? < 4: ;I? < *  /usr/lib/gcc/x86_64-linux-gnu/4.6/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/python3.4mmodule.cstddef.htypes.hstdio.hlibio.hpyport.hobject.hmethodobject.hdescrobject.hmoduleobject.h  !=getiterfunc__off_tnb_inplace_subtract_IO_read_ptr_chainm_freereleasebufferproc_shortbufdestructornb_floor_dividetp_freePyMemberDefnb_xorml_namesq_lengthobjobjargproc_IO_buf_basemp_ass_subscriptfreefunclong long unsigned intnb_inplace_powerPyObject_IO_buf_endPyMappingMethodstp_memberstp_getattrdescrgetfuncstdoutPyMethodDefnb_inplace_multiplyPyNumberMethodshashfunctp_dictoffsettp_getattronb_subtracttp_as_mappingtp_init_IO_read_endPy_bufferclosure_fileno_IO_backup_basetp_methods__ssize_tinitproc_cur_columnm_doclong long inttp_is_gcdouble_old_offsetsettertp_reservedtp_setattrm_nameiternextfuncnb_multiply_typeobjectprintfunc__pad2nb_rshiftob_typetp_dict_nextwas_sq_slice_IO_markerstdinPyInit_init_extension_modulenb_inplace_remainderternaryfuncreadonlysq_inplace_concatm_methods_Py_NoneStructshape_IO_write_ptrtp_subclassesm_traversem_copytp_clearshort unsigned intsq_concatml_methtp_itemsizem_base_IO_save_basetp_basicsizePyModuleDef_Baseobjobjproc_locknb_positive_flags2_modetp_descr_setsq_ass_itemgetattrfuncsq_itemwas_sq_ass_slicemodule.ctp_nametp_delsq_repeatdescrsetfuncndimPyGetSetDefnb_reservedtp_hashgetbufferproc_IO_write_endvisitprocnb_boolml_flagstp_iternext__off64_tgetattrofunc_objectnb_inplace_rshift_IO_FILEtp_itertp_mrogettertp_baseinquiry_posbf_releasebuffertp_as_numberbinaryfuncnb_absolute_markersm_indexnb_inplace_true_dividetp_descr_getnewfunctp_traversessizeargfunclenfuncPyBufferProcsnb_intunsigned charPyModuleDefnb_inplace_lshiftshort inttp_allocnb_divmodtp_as_sequencetp_weaklist_vtable_offsetm_reloadob_sizessizeobjargprocformattraverseproctp_calltp_version_tagtp_reprnb_addtp_newsetattrfuncm_clearGNU C 4.6.3tp_strsq_containsmp_subscripttp_richcomparetp_doctp_flagsreprfuncnb_inplace_floor_dividenb_andPyCFunctionnb_inplace_orml_docnb_power_IO_lock_ttp_setattrosq_inplace_repeat_IO_read_base_IO_save_endPy_hash_tbufferinfotp_dealloc__pad1PyVarObject__pad3__pad4__pad5tp_cacheob_base_unused2Py_ssize_tPySequenceMethodsnb_inplace_andnb_inplace_xorrichcmpfunctp_printmp_lengthnb_negativenb_invertnb_true_dividenb_inplace_addsetattrofuncnb_remaindertp_finalizeunaryfunctp_getsetnb_lshiftnb_indextp_basesallocfuncm_init_IO_write_basetp_weaklistoffsetm_sizestrides/home/david/source/jedi/test/test_evaluate/init_extension_moduletp_as_buffernb_floatsuboffsets_sbufnb_orinternalob_refcntbf_getbufferw/w/0w#*P*/S/0P.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc$.oH8 88P@HoVVUoxx dn((H xpps@~8200PPd   0 08 8   0    0*0!]#.0$ (}./38!3 >8Vx( p    0P   0 8        *  80 E [ j x p 0  @ h(   8     &7F K Wj ~ 0" pcall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST____do_global_dtors_auxcompleted.6531dtor_idx.6533frame_dummy__CTOR_END____FRAME_END____JCR_END____do_global_ctors_auxmodule.cmodule__DTOR_END____dso_handle_DYNAMIC_GLOBAL_OFFSET_TABLE__edata_fini__gmon_start__PyModule_Create2_Py_NoneStruct_end__bss_startPyModule_AddObject_Jv_RegisterClassesPyInit_init_extension_module__cxa_finalize@@GLIBC_2.2.5_initjedi-0.15.2/test/test_inference/init_extension_module/setup.py0000664000175000017500000000037213577124112024473 0ustar davedave00000000000000from distutils.core import setup, Extension setup(name='init_extension_module', version='0.0', description='', ext_modules=[ Extension('init_extension_module.__init__', sources=['module.c']) ] ) jedi-0.15.2/test/test_inference/init_extension_module/module.c0000664000175000017500000000044613577124112024414 0ustar davedave00000000000000#include "Python.h" static struct PyModuleDef module = { PyModuleDef_HEAD_INIT, "init_extension_module", NULL, -1, NULL }; PyMODINIT_FUNC PyInit_init_extension_module(void){ PyObject *m = PyModule_Create(&module); PyModule_AddObject(m, "foo", Py_None); return m; } jedi-0.15.2/test/test_inference/implicit_nested_namespaces/0000775000175000017500000000000013577125145023735 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_nested_namespaces/namespace/0000775000175000017500000000000013577125145025671 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_nested_namespaces/namespace/pkg/0000775000175000017500000000000013577125145026452 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/implicit_nested_namespaces/namespace/pkg/module.py0000664000175000017500000000001213577124112030273 0ustar davedave00000000000000CONST = 1 jedi-0.15.2/test/test_inference/sample_venvs/0000775000175000017500000000000013577125145021064 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/0000775000175000017500000000000013577125145023743 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/import_smth.pth0000664000175000017500000000004413577124112027014 0ustar davedave00000000000000import smth; smth.extend_path_foo() jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/foo.pth0000664000175000017500000000002313577124112025227 0ustar davedave00000000000000./dir-from-foo-pth jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/relative.egg-link0000664000175000017500000000003113577124112027160 0ustar davedave00000000000000./relative/egg-link/path jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/dir-from-foo-pth/0000775000175000017500000000000013577125145027034 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/dir-from-foo-pth/__init__.py0000664000175000017500000000015213577124112031134 0ustar davedave00000000000000# This file is here to force git to create the directory, as *.pth files only # add existing directories. jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/smth.py0000664000175000017500000000017113577124112025260 0ustar davedave00000000000000import sys sys.path.append('/foo/smth.py:module') def extend_path_foo(): sys.path.append('/foo/smth.py:from_func') jedi-0.15.2/test/test_inference/sample_venvs/pth_directory/egg_link.egg-link0000664000175000017500000000002413577124112027126 0ustar davedave00000000000000/path/from/egg-link jedi-0.15.2/test/test_inference/test_gradual/0000775000175000017500000000000013577125145021040 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/test_gradual/test_conversion.py0000664000175000017500000000365713577124112024642 0ustar davedave00000000000000import os from test.helpers import root_dir from jedi.api.project import Project from jedi.inference.gradual.conversion import convert_names def test_sqlite3_conversion(Script): script1 = Script('import sqlite3; sqlite3.Connection') d, = script1.goto_definitions() assert not d.module_path assert d.full_name == 'sqlite3.Connection' assert convert_names([d._name], only_stubs=True) d, = script1.goto_definitions(only_stubs=True) assert d.is_stub() assert d.full_name == 'sqlite3.dbapi2.Connection' script2 = Script(path=d.module_path, line=d.line, column=d.column) d, = script2.goto_definitions() assert not d.is_stub() assert d.full_name == 'sqlite3.Connection' v, = d._name.infer() assert v.is_compiled() def test_conversion_of_stub_only(Script): project = Project(os.path.join(root_dir, 'test', 'completion', 'stub_folder')) code = 'import stub_only; stub_only.in_stub_only' d1, = Script(code, _project=project).goto_assignments() assert d1.is_stub() script = Script(path=d1.module_path, line=d1.line, column=d1.column, _project=project) d2, = script.goto_assignments() assert d2.is_stub() assert d2.module_path == d1.module_path assert d2.line == d1.line assert d2.column == d1.column assert d2.name == 'in_stub_only' def test_goto_on_file(Script): project = Project(os.path.join(root_dir, 'test', 'completion', 'stub_folder')) script = Script('import stub_only; stub_only.Foo', _project=project) d1, = script.goto_assignments() v, = d1._name.infer() foo, bar, obj = v.py__mro__() assert foo.py__name__() == 'Foo' assert bar.py__name__() == 'Bar' assert obj.py__name__() == 'object' # Make sure we go to Bar, because Foo is a bit before: `class Foo(Bar):` script = Script(path=d1.module_path, line=d1.line, column=d1.column + 4, _project=project) d2, = script.goto_assignments() assert d2.name == 'Bar' jedi-0.15.2/test/test_inference/test_gradual/test_stubs.py0000664000175000017500000000736613577124112023616 0ustar davedave00000000000000import os import pytest from jedi.api.project import Project from test.helpers import root_dir @pytest.mark.parametrize('type_', ['goto', 'infer']) @pytest.mark.parametrize('way', ['direct', 'indirect']) @pytest.mark.parametrize( 'kwargs', [ dict(only_stubs=False, prefer_stubs=False), dict(only_stubs=False, prefer_stubs=True), dict(only_stubs=True, prefer_stubs=False), ] ) @pytest.mark.parametrize( ('code', 'full_name', 'has_stub', 'has_python', 'options'), [ ['import os; os.walk', 'os.walk', True, True, {}], ['from collections import Counter', 'collections.Counter', True, True, {}], ['from collections', 'collections', True, True, {}], ['from collections import Counter; Counter', 'collections.Counter', True, True, {}], ['from collections import Counter; Counter()', 'collections.Counter', True, True, {}], ['from collections import Counter; Counter.most_common', 'collections.Counter.most_common', True, True, {}], ['from collections import deque', 'collections.deque', True, False, {'goto_has_python': True}], ['from keyword import kwlist; kwlist', 'typing.Sequence', True, True, {'goto_full_name': 'keyword.kwlist'}], ['from keyword import kwlist', 'typing.Sequence', True, True, {'goto_full_name': 'keyword.kwlist'}], ['from socket import AF_INET', 'socket.AddressFamily', True, False, {'goto_full_name': 'socket.AF_INET'}], ['from socket import socket', 'socket.socket', True, True, {}], ['import with_stub', 'with_stub', True, True, {}], ['import with_stub', 'with_stub', True, True, {}], ['import with_stub_folder.python_only', 'with_stub_folder.python_only', False, True, {}], ['import stub_only', 'stub_only', True, False, {}], ]) def test_infer_and_goto(Script, code, full_name, has_stub, has_python, way, kwargs, type_, options, environment): if environment.version_info < (3, 5): # We just don't care about much of the detailed Python 2 failures # anymore, because its end-of-life soon. (same for 3.4) pytest.skip() if type_ == 'infer' and full_name == 'typing.Sequence' and environment.version_info >= (3, 7): # In Python 3.7+ there's not really a sequence definition, there's just # a name that leads nowhere. has_python = False project = Project(os.path.join(root_dir, 'test', 'completion', 'stub_folder')) s = Script(code, _project=project) prefer_stubs = kwargs['prefer_stubs'] only_stubs = kwargs['only_stubs'] if type_ == 'goto': full_name = options.get('goto_full_name', full_name) has_python = options.get('goto_has_python', has_python) if way == 'direct': if type_ == 'goto': defs = s.goto_assignments(follow_imports=True, **kwargs) else: defs = s.goto_definitions(**kwargs) else: goto_defs = s.goto_assignments( # Prefering stubs when we want to go to python and vice versa prefer_stubs=not (prefer_stubs or only_stubs), follow_imports=True, ) if type_ == 'goto': defs = [d for goto_def in goto_defs for d in goto_def.goto_assignments(**kwargs)] else: defs = [d for goto_def in goto_defs for d in goto_def.infer(**kwargs)] if not has_stub and only_stubs: assert not defs else: assert defs for d in defs: if prefer_stubs and has_stub: assert d.is_stub() elif only_stubs: assert d.is_stub() else: assert has_python == (not d.is_stub()) assert d.full_name == full_name assert d.is_stub() == d.module_path.endswith('.pyi') jedi-0.15.2/test/test_inference/test_gradual/test_typeshed.py0000664000175000017500000001677213577124112024304 0ustar davedave00000000000000import os import pytest from parso.utils import PythonVersionInfo from jedi.inference.gradual import typeshed, stub_value from jedi.inference.value import TreeInstance, BoundMethod, FunctionValue, \ MethodValue, ClassValue TYPESHED_PYTHON3 = os.path.join(typeshed.TYPESHED_PATH, 'stdlib', '3') def test_get_typeshed_directories(): def get_dirs(version_info): return { d.replace(typeshed.TYPESHED_PATH, '').lstrip(os.path.sep) for d in typeshed._get_typeshed_directories(version_info) } def transform(set_): return {x.replace('/', os.path.sep) for x in set_} dirs = get_dirs(PythonVersionInfo(2, 7)) assert dirs == transform({'stdlib/2and3', 'stdlib/2', 'third_party/2and3', 'third_party/2'}) dirs = get_dirs(PythonVersionInfo(3, 4)) assert dirs == transform({'stdlib/2and3', 'stdlib/3', 'third_party/2and3', 'third_party/3'}) dirs = get_dirs(PythonVersionInfo(3, 5)) assert dirs == transform({'stdlib/2and3', 'stdlib/3', 'third_party/2and3', 'third_party/3'}) dirs = get_dirs(PythonVersionInfo(3, 6)) assert dirs == transform({'stdlib/2and3', 'stdlib/3', 'stdlib/3.6', 'third_party/2and3', 'third_party/3', 'third_party/3.6'}) def test_get_stub_files(): def get_map(version_info): return typeshed._create_stub_map(version_info) map_ = typeshed._create_stub_map(TYPESHED_PYTHON3) assert map_['functools'] == os.path.join(TYPESHED_PYTHON3, 'functools.pyi') def test_function(Script, environment): code = 'import threading; threading.current_thread' def_, = Script(code).goto_definitions() value = def_._name._value assert isinstance(value, FunctionValue), value def_, = Script(code + '()').goto_definitions() value = def_._name._value assert isinstance(value, TreeInstance) def_, = Script('import threading; threading.Thread').goto_definitions() assert isinstance(def_._name._value, ClassValue), def_ def test_keywords_variable(Script): code = 'import keyword; keyword.kwlist' for seq in Script(code).goto_definitions(): assert seq.name == 'Sequence' # This points towards the typeshed implementation stub_seq, = seq.goto_assignments(only_stubs=True) assert typeshed.TYPESHED_PATH in stub_seq.module_path def test_class(Script): def_, = Script('import threading; threading.Thread').goto_definitions() value = def_._name._value assert isinstance(value, ClassValue), value def test_instance(Script): def_, = Script('import threading; threading.Thread()').goto_definitions() value = def_._name._value assert isinstance(value, TreeInstance) def test_class_function(Script): def_, = Script('import threading; threading.Thread.getName').goto_definitions() value = def_._name._value assert isinstance(value, MethodValue), value def test_method(Script): code = 'import threading; threading.Thread().getName' def_, = Script(code).goto_definitions() value = def_._name._value assert isinstance(value, BoundMethod), value assert isinstance(value._wrapped_value, MethodValue), value def_, = Script(code + '()').goto_definitions() value = def_._name._value assert isinstance(value, TreeInstance) assert value.class_value.py__name__() == 'str' def test_sys_exc_info(Script): code = 'import sys; sys.exc_info()' none, def_ = Script(code + '[1]').goto_definitions() # It's an optional. assert def_.name == 'BaseException' assert def_.type == 'instance' assert none.name == 'NoneType' none, def_ = Script(code + '[0]').goto_definitions() assert def_.name == 'BaseException' assert def_.type == 'class' def test_sys_getwindowsversion(Script, environment): # This should only exist on Windows, but type inference should happen # everywhere. definitions = Script('import sys; sys.getwindowsversion().major').goto_definitions() if environment.version_info.major == 2: assert not definitions else: def_, = definitions assert def_.name == 'int' def test_sys_hexversion(Script): script = Script('import sys; sys.hexversion') def_, = script.completions() assert isinstance(def_._name, stub_value._StubName), def_._name assert typeshed.TYPESHED_PATH in def_.module_path def_, = script.goto_definitions() assert def_.name == 'int' def test_math(Script): def_, = Script('import math; math.acos()').goto_definitions() assert def_.name == 'float' value = def_._name._value assert value def test_type_var(Script): def_, = Script('import typing; T = typing.TypeVar("T1")').goto_definitions() assert def_.name == 'TypeVar' assert def_.description == 'TypeVar = object()' @pytest.mark.parametrize( 'code, full_name', ( ('import math', 'math'), ('from math import cos', 'math.cos') ) ) def test_math_is_stub(Script, code, full_name): s = Script(code) cos, = s.goto_definitions() wanted = os.path.join('typeshed', 'stdlib', '2and3', 'math.pyi') assert cos.module_path.endswith(wanted) assert cos.is_stub() is True assert cos.goto_assignments(only_stubs=True) == [cos] assert cos.full_name == full_name cos, = s.goto_assignments() assert cos.module_path.endswith(wanted) assert cos.goto_assignments(only_stubs=True) == [cos] assert cos.is_stub() is True assert cos.full_name == full_name def test_goto_stubs(Script): s = Script('import os; os') os_module, = s.goto_definitions() assert os_module.full_name == 'os' assert os_module.is_stub() is False stub, = os_module.goto_assignments(only_stubs=True) assert stub.is_stub() is True os_module, = s.goto_assignments() def _assert_is_same(d1, d2): assert d1.name == d2.name assert d1.module_path == d2.module_path assert d1.line == d2.line assert d1.column == d2.column @pytest.mark.parametrize('type_', ['goto', 'infer']) @pytest.mark.parametrize( 'code', [ 'import os; os.walk', 'from collections import Counter; Counter', 'from collections import Counter; Counter()', 'from collections import Counter; Counter.most_common', ]) def test_goto_stubs_on_itself(Script, code, type_): """ If goto_stubs is used on an identifier in e.g. the stdlib, we should goto the stub of it. """ s = Script(code) if type_ == 'infer': def_, = s.goto_definitions() else: def_, = s.goto_assignments(follow_imports=True) stub, = def_.goto_assignments(only_stubs=True) script_on_source = Script( path=def_.module_path, line=def_.line, column=def_.column ) if type_ == 'infer': definition, = script_on_source.goto_definitions() else: definition, = script_on_source.goto_assignments() same_stub, = definition.goto_assignments(only_stubs=True) _assert_is_same(same_stub, stub) _assert_is_same(definition, def_) assert same_stub.module_path != def_.module_path # And the reverse. script_on_stub = Script( path=same_stub.module_path, line=same_stub.line, column=same_stub.column ) if type_ == 'infer': same_definition, = script_on_stub.goto_definitions() same_definition2, = same_stub.infer() else: same_definition, = script_on_stub.goto_assignments() same_definition2, = same_stub.goto_assignments() _assert_is_same(same_definition, definition) _assert_is_same(same_definition, same_definition2) jedi-0.15.2/test/test_inference/test_gradual/test_stub_loading.py0000664000175000017500000000157713577124112025126 0ustar davedave00000000000000from functools import partial from test.helpers import get_example_dir from jedi.api.project import Project import pytest @pytest.fixture def ScriptInStubFolder(Script): path = get_example_dir('stub_packages') project = Project(path, sys_path=[path], smart_sys_path=False) return partial(Script, _project=project) @pytest.mark.parametrize( ('code', 'expected'), [ ('from no_python import foo', ['int']), ('from with_python import stub_only', ['str']), ('from with_python import python_only', ['int']), ('from with_python import both', ['int']), ('from with_python import something_random', []), ('from with_python.module import in_sub_module', ['int']), ] ) def test_find_stubs_infer(ScriptInStubFolder, code, expected): defs = ScriptInStubFolder(code).goto_definitions() assert [d.name for d in defs] == expected jedi-0.15.2/test/test_inference/test_helpers.py0000664000175000017500000000056313577124112021432 0ustar davedave00000000000000from textwrap import dedent from jedi import names from jedi.inference import helpers def test_call_of_leaf_in_brackets(environment): s = dedent(""" x = 1 type(x) """) last_x = names(s, references=True, definitions=False, environment=environment)[-1] name = last_x._name.tree_name call = helpers.call_of_leaf(name) assert call == name jedi-0.15.2/test/test_inference/test_representation.py0000664000175000017500000000200113577124112023017 0ustar davedave00000000000000from textwrap import dedent def get_definition_and_inference_state(Script, source): first, = Script(dedent(source)).goto_definitions() return first._name._value, first._inference_state def test_function_execution(Script): """ We've been having an issue of a mutable list that was changed inside the function execution. Test if an execution always returns the same result. """ s = """ def x(): return str() x""" func, inference_state = get_definition_and_inference_state(Script, s) # Now just use the internals of the result (easiest way to get a fully # usable function). # Should return the same result both times. assert len(func.execute_with_values()) == 1 assert len(func.execute_with_values()) == 1 def test_class_mro(Script): s = """ class X(object): pass X""" cls, inference_state = get_definition_and_inference_state(Script, s) mro = cls.py__mro__() assert [c.name.string_name for c in mro] == ['X', 'object'] jedi-0.15.2/test/test_inference/test_signature.py0000664000175000017500000002355213577124112021774 0ustar davedave00000000000000from textwrap import dedent from operator import ge, lt import re import os import pytest from jedi.inference.gradual.conversion import _stub_to_python_value_set from ..helpers import get_example_dir @pytest.mark.parametrize( 'code, sig, names, op, version', [ ('import math; math.cos', 'cos(x, /)', ['x'], ge, (2, 7)), ('next', 'next(iterator, default=None, /)', ['iterator', 'default'], ge, (2, 7)), ('str', "str(object='', /) -> str", ['object'], ge, (2, 7)), ('pow', 'pow(x, y, z=None, /) -> number', ['x', 'y', 'z'], lt, (3, 5)), ('pow', 'pow(base, exp, mod=None)', ['base', 'exp', 'mod'], ge, (3, 8)), ('bytes.partition', 'partition(self, sep, /) -> (head, sep, tail)', ['self', 'sep'], lt, (3, 5)), ('bytes.partition', 'partition(self, sep, /)', ['self', 'sep'], ge, (3, 5)), ('bytes().partition', 'partition(sep, /) -> (head, sep, tail)', ['sep'], lt, (3, 5)), ('bytes().partition', 'partition(sep, /)', ['sep'], ge, (3, 5)), ] ) def test_compiled_signature(Script, environment, code, sig, names, op, version): if not op(environment.version_info, version): return # The test right next to it should take over. d, = Script(code).goto_definitions() value, = d._name.infer() compiled, = _stub_to_python_value_set(value) signature, = compiled.get_signatures() assert signature.to_string() == sig assert [n.string_name for n in signature.get_param_names()] == names classmethod_code = ''' class X: @classmethod def x(cls, a, b): pass @staticmethod def static(a, b): pass ''' partial_code = ''' import functools def func(a, b, c): pass a = functools.partial(func) b = functools.partial(func, 1) c = functools.partial(func, 1, c=2) d = functools.partial() ''' @pytest.mark.parametrize( 'code, expected', [ ('def f(a, * args, x): pass\n f(', 'f(a, *args, x)'), ('def f(a, *, x): pass\n f(', 'f(a, *, x)'), ('def f(*, x= 3,**kwargs): pass\n f(', 'f(*, x=3, **kwargs)'), ('def f(x,/,y,* ,z): pass\n f(', 'f(x, /, y, *, z)'), ('def f(a, /, *, x=3, **kwargs): pass\n f(', 'f(a, /, *, x=3, **kwargs)'), (classmethod_code + 'X.x(', 'x(a, b)'), (classmethod_code + 'X().x(', 'x(a, b)'), (classmethod_code + 'X.static(', 'static(a, b)'), (classmethod_code + 'X().static(', 'static(a, b)'), (partial_code + 'a(', 'func(a, b, c)'), (partial_code + 'b(', 'func(b, c)'), (partial_code + 'c(', 'func(b)'), (partial_code + 'd(', None), ] ) def test_tree_signature(Script, environment, code, expected): # Only test this in the latest version, because of / if environment.version_info < (3, 8): pytest.skip() if expected is None: assert not Script(code).call_signatures() else: sig, = Script(code).call_signatures() assert expected == sig.to_string() @pytest.mark.parametrize( 'combination, expected', [ # Functions ('full_redirect(simple)', 'b, *, c'), ('full_redirect(simple4)', 'b, x: int'), ('full_redirect(a)', 'b, *args'), ('full_redirect(kw)', 'b, *, c, **kwargs'), ('full_redirect(akw)', 'c, *args, **kwargs'), # Non functions ('full_redirect(lambda x, y: ...)', 'y'), ('full_redirect()', '*args, **kwargs'), ('full_redirect(1)', '*args, **kwargs'), # Classes / inheritance ('full_redirect(C)', 'z, *, c'), ('full_redirect(C())', 'y'), ('D', 'D(a, z, /)'), ('D()', 'D(x, y)'), ('D().foo', 'foo(a, *, bar, z, **kwargs)'), # Merging ('two_redirects(simple, simple)', 'a, b, *, c'), ('two_redirects(simple2, simple2)', 'x'), ('two_redirects(akw, kw)', 'a, c, *args, **kwargs'), ('two_redirects(kw, akw)', 'a, b, *args, c, **kwargs'), ('combined_redirect(simple, simple2)', 'a, b, /, *, x'), ('combined_redirect(simple, simple3)', 'a, b, /, *, a, x: int'), ('combined_redirect(simple2, simple)', 'x, /, *, a, b, c'), ('combined_redirect(simple3, simple)', 'a, x: int, /, *, a, b, c'), ('combined_redirect(simple, kw)', 'a, b, /, *, a, b, c, **kwargs'), ('combined_redirect(kw, simple)', 'a, b, /, *, a, b, c'), ('combined_lot_of_args(kw, simple4)', '*, b'), ('combined_lot_of_args(simple4, kw)', '*, b, c, **kwargs'), ('combined_redirect(combined_redirect(simple2, simple4), combined_redirect(kw, simple5))', 'x, /, *, y'), ('combined_redirect(combined_redirect(simple4, simple2), combined_redirect(simple5, kw))', 'a, b, x: int, /, *, a, b, c, **kwargs'), ('combined_redirect(combined_redirect(a, kw), combined_redirect(kw, simple5))', 'a, b, /, *args, y'), ('no_redirect(kw)', '*args, **kwargs'), ('no_redirect(akw)', '*args, **kwargs'), ('no_redirect(simple)', '*args, **kwargs'), ] ) def test_nested_signatures(Script, environment, combination, expected, skip_pre_python35): code = dedent(''' def simple(a, b, *, c): ... def simple2(x): ... def simple3(a, x: int): ... def simple4(a, b, x: int): ... def simple5(y): ... def a(a, b, *args): ... def kw(a, b, *, c, **kwargs): ... def akw(a, c, *args, **kwargs): ... def no_redirect(func): return lambda *args, **kwargs: func(1) def full_redirect(func): return lambda *args, **kwargs: func(1, *args, **kwargs) def two_redirects(func1, func2): return lambda *args, **kwargs: func1(*args, **kwargs) + func2(1, *args, **kwargs) def combined_redirect(func1, func2): return lambda *args, **kwargs: func1(*args) + func2(**kwargs) def combined_lot_of_args(func1, func2): return lambda *args, **kwargs: func1(1, 2, 3, 4, *args) + func2(a=3, x=1, y=1, **kwargs) class C: def __init__(self, a, z, *, c): ... def __call__(self, x, y): ... def foo(self, bar, z, **kwargs): ... class D(C): def __init__(self, *args): super().__init__(*args) def foo(self, a, **kwargs): super().foo(**kwargs) ''') code += 'z = ' + combination + '\nz(' sig, = Script(code).call_signatures() computed = sig.to_string() if not re.match(r'\w+\(', expected): expected = '(' + expected + ')' assert expected == computed def test_pow_signature(Script): # See github #1357 sigs = Script('pow(').call_signatures() strings = {sig.to_string() for sig in sigs} assert strings == {'pow(x: float, y: float, z: float, /) -> float', 'pow(x: float, y: float, /) -> float', 'pow(x: int, y: int, z: int, /) -> Any', 'pow(x: int, y: int, /) -> Any'} @pytest.mark.parametrize( 'code, signature', [ [dedent(''' import functools def f(x): pass def x(f): @functools.wraps(f) def wrapper(*args): # Have no arguments here, but because of wraps, the signature # should still be f's. return f(*args) return wrapper x(f)('''), 'f(x, /)'], [dedent(''' import functools def f(x): pass def x(f): @functools.wraps(f) def wrapper(): # Have no arguments here, but because of wraps, the signature # should still be f's. return 1 return wrapper x(f)('''), 'f()'], ] ) def test_wraps_signature(Script, code, signature, skip_pre_python35): sigs = Script(code).call_signatures() assert {sig.to_string() for sig in sigs} == {signature} @pytest.mark.parametrize( 'start, start_params', [ ['@dataclass\nclass X:', []], ['@dataclass(eq=True)\nclass X:', []], [dedent(''' class Y(): y: int @dataclass class X(Y):'''), []], [dedent(''' @dataclass class Y(): y: int z = 5 @dataclass class X(Y):'''), ['y']], ] ) def test_dataclass_signature(Script, skip_pre_python37, start, start_params): code = dedent(''' name: str foo = 3 price: float quantity: int = 0.0 X(''') code = 'from dataclasses import dataclass\n' + start + code sig, = Script(code).call_signatures() assert [p.name for p in sig.params] == start_params + ['name', 'price', 'quantity'] quantity, = sig.params[-1].infer() assert quantity.name == 'int' price, = sig.params[-2].infer() assert price.name == 'float' @pytest.mark.parametrize( 'stmt, expected', [ ('args = 1', 'wrapped(*args, b, c)'), ('args = (1,)', 'wrapped(*args, c)'), ('kwargs = 1', 'wrapped(b, /, **kwargs)'), ('kwargs = dict(b=3)', 'wrapped(b, /, **kwargs)'), ] ) def test_param_resolving_to_static(Script, stmt, expected, skip_pre_python35): code = dedent('''\ def full_redirect(func): def wrapped(*args, **kwargs): {stmt} return func(1, *args, **kwargs) return wrapped def simple(a, b, *, c): ... full_redirect(simple)('''.format(stmt=stmt)) sig, = Script(code).call_signatures() assert sig.to_string() == expected def test_overload(Script): dir_ = get_example_dir('typing_overload') code = 'from file import with_overload; with_overload(' x1, x2 = Script(code, path=os.path.join(dir_, 'foo.py')).call_signatures() assert x1.to_string() == 'with_overload(x: int, y: int) -> float' assert x2.to_string() == 'with_overload(x: str, y: list) -> float' jedi-0.15.2/test/test_inference/test_implicit_namespace_package.py0000664000175000017500000000707013577124112025271 0ustar davedave00000000000000from os.path import dirname, join import pytest @pytest.fixture(autouse=True) def skip_not_supported_versions(environment): if environment.version_info < (3, 4): pytest.skip() def test_implicit_namespace_package(Script): sys_path = [join(dirname(__file__), d) for d in ['implicit_namespace_package/ns1', 'implicit_namespace_package/ns2']] def script_with_path(*args, **kwargs): return Script(sys_path=sys_path, *args, **kwargs) # goto definition assert script_with_path('from pkg import ns1_file').goto_definitions() assert script_with_path('from pkg import ns2_file').goto_definitions() assert not script_with_path('from pkg import ns3_file').goto_definitions() # goto assignment tests = { 'from pkg.ns2_file import foo': 'ns2_file!', 'from pkg.ns1_file import foo': 'ns1_file!', } for source, solution in tests.items(): ass = script_with_path(source).goto_assignments() assert len(ass) == 1 assert ass[0].description == "foo = '%s'" % solution # completion completions = script_with_path('from pkg import ').completions() names = [c.name for c in completions] compare = ['ns1_file', 'ns2_file'] # must at least contain these items, other items are not important assert set(compare) == set(names) tests = { 'from pkg import ns2_file as x': 'ns2_file!', 'from pkg import ns1_file as x': 'ns1_file!' } for source, solution in tests.items(): for c in script_with_path(source + '; x.').completions(): if c.name == 'foo': completion = c solution = "foo = '%s'" % solution assert completion.description == solution def test_implicit_nested_namespace_package(Script): code = 'from implicit_nested_namespaces.namespace.pkg.module import CONST' sys_path = [dirname(__file__)] script = Script(sys_path=sys_path, source=code, line=1, column=61) result = script.goto_definitions() assert len(result) == 1 implicit_pkg, = Script(code, column=10, sys_path=sys_path).goto_definitions() assert implicit_pkg.type == 'module' assert implicit_pkg.module_path is None def test_implicit_namespace_package_import_autocomplete(Script): CODE = 'from implicit_name' sys_path = [dirname(__file__)] script = Script(sys_path=sys_path, source=CODE) compl = script.completions() assert [c.name for c in compl] == ['implicit_namespace_package'] def test_namespace_package_in_multiple_directories_autocompletion(Script): CODE = 'from pkg.' sys_path = [join(dirname(__file__), d) for d in ['implicit_namespace_package/ns1', 'implicit_namespace_package/ns2']] script = Script(sys_path=sys_path, source=CODE) compl = script.completions() assert set(c.name for c in compl) == set(['ns1_file', 'ns2_file']) def test_namespace_package_in_multiple_directories_goto_definition(Script): CODE = 'from pkg import ns1_file' sys_path = [join(dirname(__file__), d) for d in ['implicit_namespace_package/ns1', 'implicit_namespace_package/ns2']] script = Script(sys_path=sys_path, source=CODE) result = script.goto_definitions() assert len(result) == 1 def test_namespace_name_autocompletion_full_name(Script): CODE = 'from pk' sys_path = [join(dirname(__file__), d) for d in ['implicit_namespace_package/ns1', 'implicit_namespace_package/ns2']] script = Script(sys_path=sys_path, source=CODE) compl = script.completions() assert set(c.full_name for c in compl) == set(['pkg']) jedi-0.15.2/test/test_inference/test_context.py0000664000175000017500000000133113577124112021446 0ustar davedave00000000000000from jedi._compatibility import force_unicode def test_module_attributes(Script): def_, = Script('__name__').completions() assert def_.name == '__name__' assert def_.line is None assert def_.column is None str_, = def_.infer() assert str_.name == 'str' def test_module__file__(Script, environment): assert not Script('__file__').goto_definitions() def_, = Script('__file__', path='example.py').goto_definitions() value = force_unicode(def_._name._value.get_safe_value()) assert value.endswith('example.py') def_, = Script('import antigravity; antigravity.__file__').goto_definitions() value = force_unicode(def_._name._value.get_safe_value()) assert value.endswith('.py') jedi-0.15.2/test/test_inference/test_pyc.py0000664000175000017500000000420313577124112020556 0ustar davedave00000000000000""" Test completions from *.pyc files: - generate a dummy python module - compile the dummy module to generate a *.pyc - delete the pure python dummy module - try jedi on the generated *.pyc """ import os import shutil import sys import pytest import jedi from jedi.api.environment import SameEnvironment, InterpreterEnvironment SRC = """class Foo: pass class Bar: pass """ @pytest.fixture def pyc_project_path(tmpdir): path = tmpdir.strpath dummy_package_path = os.path.join(path, "dummy_package") os.mkdir(dummy_package_path) with open(os.path.join(dummy_package_path, "__init__.py"), 'w'): pass dummy_path = os.path.join(dummy_package_path, 'dummy.py') with open(dummy_path, 'w') as f: f.write(SRC) import compileall compileall.compile_file(dummy_path) os.remove(dummy_path) if sys.version_info.major == 3: # Python3 specific: # To import pyc modules, we must move them out of the __pycache__ # directory and rename them to remove ".cpython-%s%d" # see: http://stackoverflow.com/questions/11648440/python-does-not-detect-pyc-files pycache = os.path.join(dummy_package_path, "__pycache__") for f in os.listdir(pycache): dst = f.replace('.cpython-%s%s' % sys.version_info[:2], "") dst = os.path.join(dummy_package_path, dst) shutil.copy(os.path.join(pycache, f), dst) try: yield path finally: shutil.rmtree(path) def test_pyc(pyc_project_path, environment): """ The list of completion must be greater than 2. """ path = os.path.join(pyc_project_path, 'blub.py') if not isinstance(environment, InterpreterEnvironment): # We are using the same version for pyc completions here, because it # was compiled in that version. However with interpreter environments # we also have the same version and it's easier to debug. environment = SameEnvironment() environment = environment s = jedi.Script( "from dummy_package import dummy; dummy.", path=path, environment=environment) assert len(s.completions()) >= 2 jedi-0.15.2/test/test_inference/test_imports.py0000664000175000017500000004230613577124112021466 0ustar davedave00000000000000""" Tests of various import related things that could not be tested with "Black Box Tests". """ import os import pytest from jedi.file_io import FileIO, KnownContentFileIO from jedi._compatibility import find_module_py33, find_module from jedi.inference import compiled from jedi.inference import imports from jedi.api.project import Project from jedi.inference.gradual.conversion import _stub_to_python_value_set from ..helpers import cwd_at, get_example_dir, test_dir, root_dir THIS_DIR = os.path.dirname(__file__) @pytest.mark.skipif('sys.version_info < (3,3)') def test_find_module_py33(): """Needs to work like the old find_module.""" assert find_module_py33('_io') == (None, False) with pytest.raises(ImportError): assert find_module_py33('_DOESNTEXIST_') == (None, None) def test_find_module_package(): file_io, is_package = find_module('json') assert file_io.path.endswith(os.path.join('json', '__init__.py')) assert is_package is True def test_find_module_not_package(): file_io, is_package = find_module('io') assert file_io.path.endswith('io.py') assert is_package is False pkg_zip_path = os.path.join(os.path.dirname(__file__), 'zipped_imports', 'pkg.zip') def test_find_module_package_zipped(Script, inference_state, environment): sys_path = environment.get_sys_path() + [pkg_zip_path] script = Script('import pkg; pkg.mod', sys_path=sys_path) assert len(script.completions()) == 1 file_io, is_package = inference_state.compiled_subprocess.get_module_info( sys_path=sys_path, string=u'pkg', full_name=u'pkg' ) assert file_io is not None assert file_io.path.endswith(os.path.join('pkg.zip', 'pkg', '__init__.py')) assert file_io._zip_path.endswith('pkg.zip') assert is_package is True @pytest.mark.parametrize( 'code, file, package, path', [ ('import pkg', '__init__.py', 'pkg', 'pkg'), ('import pkg', '__init__.py', 'pkg', 'pkg'), ('from pkg import module', 'module.py', 'pkg', None), ('from pkg.module', 'module.py', 'pkg', None), ('from pkg import nested', os.path.join('nested', '__init__.py'), 'pkg.nested', os.path.join('pkg', 'nested')), ('from pkg.nested', os.path.join('nested', '__init__.py'), 'pkg.nested', os.path.join('pkg', 'nested')), ('from pkg.nested import nested_module', os.path.join('nested', 'nested_module.py'), 'pkg.nested', None), ('from pkg.nested.nested_module', os.path.join('nested', 'nested_module.py'), 'pkg.nested', None), ('from pkg.namespace import namespace_module', os.path.join('namespace', 'namespace_module.py'), 'pkg.namespace', None), ('from pkg.namespace.namespace_module', os.path.join('namespace', 'namespace_module.py'), 'pkg.namespace', None), ] ) def test_correct_zip_package_behavior(Script, inference_state, environment, code, file, package, path, skip_python2): sys_path = environment.get_sys_path() + [pkg_zip_path] pkg, = Script(code, sys_path=sys_path).goto_definitions() value, = pkg._name.infer() assert value.py__file__() == os.path.join(pkg_zip_path, 'pkg', file) assert '.'.join(value.py__package__()) == package assert value.is_package() is (path is not None) if path is not None: assert value.py__path__() == [os.path.join(pkg_zip_path, path)] def test_find_module_not_package_zipped(Script, inference_state, environment): path = os.path.join(os.path.dirname(__file__), 'zipped_imports/not_pkg.zip') sys_path = environment.get_sys_path() + [path] script = Script('import not_pkg; not_pkg.val', sys_path=sys_path) assert len(script.completions()) == 1 file_io, is_package = inference_state.compiled_subprocess.get_module_info( sys_path=sys_path, string=u'not_pkg', full_name=u'not_pkg' ) assert file_io.path.endswith(os.path.join('not_pkg.zip', 'not_pkg.py')) assert is_package is False @cwd_at('test/test_inference/not_in_sys_path/pkg') def test_import_not_in_sys_path(Script): """ non-direct imports (not in sys.path) This is in the end just a fallback. """ a = Script(path='module.py', line=5).goto_definitions() assert a[0].name == 'int' a = Script(path='module.py', line=6).goto_definitions() assert a[0].name == 'str' a = Script(path='module.py', line=7).goto_definitions() assert a[0].name == 'str' @pytest.mark.parametrize("code,name", [ ("from flask.ext import foo; foo.", "Foo"), # flask_foo.py ("from flask.ext import bar; bar.", "Bar"), # flaskext/bar.py ("from flask.ext import baz; baz.", "Baz"), # flask_baz/__init__.py ("from flask.ext import moo; moo.", "Moo"), # flaskext/moo/__init__.py ("from flask.ext.", "foo"), ("from flask.ext.", "bar"), ("from flask.ext.", "baz"), ("from flask.ext.", "moo"), pytest.param("import flask.ext.foo; flask.ext.foo.", "Foo", marks=pytest.mark.xfail), pytest.param("import flask.ext.bar; flask.ext.bar.", "Foo", marks=pytest.mark.xfail), pytest.param("import flask.ext.baz; flask.ext.baz.", "Foo", marks=pytest.mark.xfail), pytest.param("import flask.ext.moo; flask.ext.moo.", "Foo", marks=pytest.mark.xfail), ]) def test_flask_ext(Script, code, name): """flask.ext.foo is really imported from flaskext.foo or flask_foo. """ path = os.path.join(os.path.dirname(__file__), 'flask-site-packages') completions = Script(code, sys_path=[path]).completions() assert name in [c.name for c in completions] @cwd_at('test/test_inference/') def test_not_importable_file(Script): src = 'import not_importable_file as x; x.' assert not Script(src, path='example.py').completions() def test_import_unique(Script): src = "import os; os.path" defs = Script(src, path='example.py').goto_definitions() parent_contexts = [d._name._value for d in defs] assert len(parent_contexts) == len(set(parent_contexts)) def test_cache_works_with_sys_path_param(Script, tmpdir): foo_path = tmpdir.join('foo') bar_path = tmpdir.join('bar') foo_path.join('module.py').write('foo = 123', ensure=True) bar_path.join('module.py').write('bar = 123', ensure=True) foo_completions = Script('import module; module.', sys_path=[foo_path.strpath]).completions() bar_completions = Script('import module; module.', sys_path=[bar_path.strpath]).completions() assert 'foo' in [c.name for c in foo_completions] assert 'bar' not in [c.name for c in foo_completions] assert 'bar' in [c.name for c in bar_completions] assert 'foo' not in [c.name for c in bar_completions] def test_import_completion_docstring(Script): import abc s = Script('"""test"""\nimport ab') abc_completions = [c for c in s.completions() if c.name == 'abc'] assert len(abc_completions) == 1 assert abc_completions[0].docstring(fast=False) == abc.__doc__ # However for performance reasons not all modules are loaded and the # docstring is empty in this case. assert abc_completions[0].docstring() == '' def test_goto_definition_on_import(Script): assert Script("import sys_blabla", 1, 8).goto_definitions() == [] assert len(Script("import sys", 1, 8).goto_definitions()) == 1 @cwd_at('jedi') def test_complete_on_empty_import(Script): assert Script("from datetime import").completions()[0].name == 'import' # should just list the files in the directory assert 10 < len(Script("from .", path='whatever.py').completions()) < 30 # Global import assert len(Script("from . import", 1, 5, 'whatever.py').completions()) > 30 # relative import assert 10 < len(Script("from . import", 1, 6, 'whatever.py').completions()) < 30 # Global import assert len(Script("from . import classes", 1, 5, 'whatever.py').completions()) > 30 # relative import assert 10 < len(Script("from . import classes", 1, 6, 'whatever.py').completions()) < 30 wanted = {'ImportError', 'import', 'ImportWarning'} assert {c.name for c in Script("import").completions()} == wanted assert len(Script("import import", path='').completions()) > 0 # 111 assert Script("from datetime import").completions()[0].name == 'import' assert Script("from datetime import ").completions() def test_imports_on_global_namespace_without_path(Script): """If the path is None, there shouldn't be any import problem""" completions = Script("import operator").completions() assert [c.name for c in completions] == ['operator'] completions = Script("import operator", path='example.py').completions() assert [c.name for c in completions] == ['operator'] # the first one has a path the second doesn't completions = Script("import keyword", path='example.py').completions() assert [c.name for c in completions] == ['keyword'] completions = Script("import keyword").completions() assert [c.name for c in completions] == ['keyword'] def test_named_import(Script): """named import - jedi-vim issue #8""" s = "import time as dt" assert len(Script(s, 1, 15, '/').goto_definitions()) == 1 assert len(Script(s, 1, 10, '/').goto_definitions()) == 1 @pytest.mark.skipif('True', reason='The nested import stuff is still very messy.') def test_goto_following_on_imports(Script): s = "import multiprocessing.dummy; multiprocessing.dummy" g = Script(s).goto_assignments() assert len(g) == 1 assert (g[0].line, g[0].column) != (0, 0) def test_goto_assignments(Script): sys, = Script("import sys", 1, 10).goto_assignments(follow_imports=True) assert sys.type == 'module' def test_os_after_from(Script): def check(source, result, column=None): completions = Script(source, column=column).completions() assert [c.name for c in completions] == result check('\nfrom os. ', ['path']) check('\nfrom os ', ['import']) check('from os ', ['import']) check('\nfrom os import whatever', ['import'], len('from os im')) check('from os\\\n', ['import']) check('from os \\\n', ['import']) def test_os_issues(Script): def import_names(*args, **kwargs): return [d.name for d in Script(*args, **kwargs).completions()] # Github issue #759 s = 'import os, s' assert 'sys' in import_names(s) assert 'path' not in import_names(s, column=len(s) - 1) assert 'os' in import_names(s, column=len(s) - 3) # Some more checks s = 'from os import path, e' assert 'environ' in import_names(s) assert 'json' not in import_names(s, column=len(s) - 1) assert 'environ' in import_names(s, column=len(s) - 1) assert 'path' in import_names(s, column=len(s) - 3) def test_path_issues(Script): """ See pull request #684 for details. """ source = '''from datetime import ''' assert Script(source).completions() def test_compiled_import_none(monkeypatch, Script): """ Related to #1079. An import might somehow fail and return None. """ script = Script('import sys') monkeypatch.setattr(compiled, 'load_module', lambda *args, **kwargs: None) def_, = script.goto_definitions() assert def_.type == 'module' value, = def_._name.infer() assert not _stub_to_python_value_set(value) @pytest.mark.parametrize( ('path', 'is_package', 'goal'), [ (os.path.join(THIS_DIR, 'test_docstring.py'), False, ('ok', 'lala', 'test_imports')), (os.path.join(THIS_DIR, '__init__.py'), True, ('ok', 'lala', 'x', 'test_imports')), ] ) def test_get_modules_containing_name(inference_state, path, goal, is_package): module = imports._load_python_module( inference_state, FileIO(path), import_names=('ok', 'lala', 'x'), is_package=is_package, ) assert module module_context = module.as_context() input_module, found_module = imports.get_module_contexts_containing_name( inference_state, [module_context], 'string_that_only_exists_here' ) assert input_module is module_context assert found_module.string_names == goal @pytest.mark.parametrize( ('path', 'base_names', 'is_package', 'names'), [ ('/foo/bar.py', ('foo',), False, ('foo', 'bar')), ('/foo/bar.py', ('foo', 'baz'), False, ('foo', 'baz', 'bar')), ('/foo/__init__.py', ('foo',), True, ('foo',)), ('/__init__.py', ('foo',), True, ('foo',)), ('/foo/bar/__init__.py', ('foo',), True, ('foo',)), ('/foo/bar/__init__.py', ('foo', 'bar'), True, ('foo', 'bar')), ] ) def test_load_module_from_path(inference_state, path, base_names, is_package, names): file_io = KnownContentFileIO(path, '') m = imports._load_module_from_path(inference_state, file_io, base_names) assert m.is_package() == is_package assert m.string_names == names @pytest.mark.parametrize( 'path', ('api/whatever/test_this.py', 'api/whatever/file')) @pytest.mark.parametrize('empty_sys_path', (False, True)) def test_relative_imports_with_multiple_similar_directories(Script, path, empty_sys_path): dir = get_example_dir('issue1209') if empty_sys_path: project = Project(dir, sys_path=(), smart_sys_path=False) else: project = Project(dir) script = Script( "from . ", path=os.path.join(dir, path), _project=project, ) name, import_ = script.completions() assert import_.name == 'import' assert name.name == 'api_test1' def test_relative_imports_with_outside_paths(Script): dir = get_example_dir('issue1209') project = Project(dir, sys_path=[], smart_sys_path=False) script = Script( "from ...", path=os.path.join(dir, 'api/whatever/test_this.py'), _project=project, ) assert [c.name for c in script.completions()] == ['api', 'import', 'whatever'] script = Script( "from " + '.' * 100, path=os.path.join(dir, 'api/whatever/test_this.py'), _project=project, ) assert [c.name for c in script.completions()] == ['import'] @cwd_at('test/examples/issue1209/api/whatever/') def test_relative_imports_without_path(Script): project = Project('.', sys_path=[], smart_sys_path=False) script = Script("from . ", _project=project) assert [c.name for c in script.completions()] == ['api_test1', 'import'] script = Script("from .. ", _project=project) assert [c.name for c in script.completions()] == ['import', 'whatever'] script = Script("from ... ", _project=project) assert [c.name for c in script.completions()] == ['api', 'import', 'whatever'] def test_relative_import_out_of_file_system(Script): script = Script("from " + '.' * 100) import_, = script.completions() assert import_.name == 'import' script = Script("from " + '.' * 100 + 'abc import ABCMeta') assert not script.goto_definitions() assert not script.completions() @pytest.mark.parametrize( 'level, directory, project_path, result', [ (1, '/a/b/c', '/a', (['b', 'c'], '/a')), (2, '/a/b/c', '/a', (['b'], '/a')), (3, '/a/b/c', '/a', ([], '/a')), (4, '/a/b/c', '/a', (None, '/')), (5, '/a/b/c', '/a', (None, None)), (1, '/', '/', ([], '/')), (2, '/', '/', (None, None)), (1, '/a/b', '/a/b/c', (None, '/a/b')), (2, '/a/b', '/a/b/c', (None, '/a')), (3, '/a/b', '/a/b/c', (None, '/')), ] ) def test_level_to_import_path(level, directory, project_path, result): assert imports._level_to_base_import_path(project_path, directory, level) == result def test_import_name_calculation(Script): s = Script(path=os.path.join(test_dir, 'completion', 'isinstance.py')) m = s._get_module_context() assert m.string_names == ('test', 'completion', 'isinstance') @pytest.mark.parametrize('name', ('builtins', 'typing')) def test_pre_defined_imports_module(Script, environment, name): if environment.version_info.major < 3 and name == 'builtins': name = '__builtin__' path = os.path.join(root_dir, name + '.py') module = Script('', path=path)._get_module_context() assert module.string_names == (name,) assert module.inference_state.builtins_module.py__file__() != path assert module.inference_state.typing_module.py__file__() != path @pytest.mark.parametrize('name', ('builtins', 'typing')) def test_import_needed_modules_by_jedi(Script, environment, tmpdir, name): if environment.version_info.major < 3 and name == 'builtins': name = '__builtin__' module_path = tmpdir.join(name + '.py') module_path.write('int = ...') script = Script( 'import ' + name, path=tmpdir.join('something.py').strpath, sys_path=[tmpdir.strpath] + environment.get_sys_path(), ) module, = script.goto_definitions() assert module._inference_state.builtins_module.py__file__() != module_path assert module._inference_state.typing_module.py__file__() != module_path def test_import_with_semicolon(Script): names = [c.name for c in Script('xzy; from abc import ').completions()] assert 'ABCMeta' in names assert 'abc' not in names def test_relative_import_star(Script): # Coming from github #1235 import jedi source = """ from . import * furl.c """ script = jedi.Script(source, 3, len("furl.c"), 'export.py') assert script.completions() jedi-0.15.2/test/test_inference/test_annotations.py0000664000175000017500000000277613577124112022335 0ustar davedave00000000000000from textwrap import dedent import pytest def test_simple_annotations(Script, environment): """ Annotations only exist in Python 3. If annotations adhere to PEP-0484, we use them (they override inference), else they are parsed but ignored """ if environment.version_info.major == 2: pytest.skip() source = dedent("""\ def annot(a:3): return a annot('')""") assert [d.name for d in Script(source).goto_definitions()] == ['str'] source = dedent("""\ def annot_ret(a:3) -> 3: return a annot_ret('')""") assert [d.name for d in Script(source).goto_definitions()] == ['str'] source = dedent("""\ def annot(a:int): return a annot('')""") assert [d.name for d in Script(source).goto_definitions()] == ['int'] @pytest.mark.parametrize('reference', [ 'assert 1', '1', 'def x(): pass', '1, 2', r'1\n' ]) def test_illegal_forward_references(Script, environment, reference): if environment.version_info.major == 2: pytest.skip() source = 'def foo(bar: "%s"): bar' % reference assert not Script(source).goto_definitions() def test_lambda_forward_references(Script, environment): if environment.version_info.major == 2: pytest.skip() source = 'def foo(bar: "lambda: 3"): bar' # For now just receiving the 3 is ok. I'm doubting that this is what we # want. We also execute functions. Should we only execute classes? assert Script(source).goto_definitions() jedi-0.15.2/test/test_inference/nested_namespaces/0000775000175000017500000000000013577125145022043 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/nested_namespaces/__init__.py0000664000175000017500000000000013577124112024133 0ustar davedave00000000000000jedi-0.15.2/test/test_inference/nested_namespaces/namespace/0000775000175000017500000000000013577125145023777 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/nested_namespaces/namespace/__init__.py0000664000175000017500000000013613577124112026101 0ustar davedave00000000000000try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: pass jedi-0.15.2/test/test_inference/nested_namespaces/namespace/pkg/0000775000175000017500000000000013577125145024560 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/nested_namespaces/namespace/pkg/__init__.py0000664000175000017500000000001213577124112026653 0ustar davedave00000000000000CONST = 1 jedi-0.15.2/test/test_inference/not_in_sys_path/0000775000175000017500000000000013577125145021562 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/not_in_sys_path/not_in_sys_path_package/0000775000175000017500000000000013577125145026435 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/not_in_sys_path/not_in_sys_path_package/module.py0000664000175000017500000000003113577124112030257 0ustar davedave00000000000000value = 'package.module' jedi-0.15.2/test/test_inference/not_in_sys_path/not_in_sys_path_package/__init__.py0000664000175000017500000000002213577124112030531 0ustar davedave00000000000000value = 'package' jedi-0.15.2/test/test_inference/not_in_sys_path/__init__.py0000664000175000017500000000000013577124112023652 0ustar davedave00000000000000jedi-0.15.2/test/test_inference/not_in_sys_path/not_in_sys_path.py0000664000175000017500000000001213577124112025316 0ustar davedave00000000000000value = 3 jedi-0.15.2/test/test_inference/not_in_sys_path/pkg/0000775000175000017500000000000013577125145022343 5ustar davedave00000000000000jedi-0.15.2/test/test_inference/not_in_sys_path/pkg/module.py0000664000175000017500000000033513577124112024174 0ustar davedave00000000000000from not_in_sys_path import not_in_sys_path from not_in_sys_path import not_in_sys_path_package from not_in_sys_path.not_in_sys_path_package import module not_in_sys_path.value not_in_sys_path_package.value module.value jedi-0.15.2/test/test_inference/not_in_sys_path/pkg/__init__.py0000664000175000017500000000000013577124112024433 0ustar davedave00000000000000jedi-0.15.2/test/test_inference/test_extension.py0000664000175000017500000000323213577124112022000 0ustar davedave00000000000000""" Test compiled module """ import os import jedi from ..helpers import cwd_at import pytest def test_completions(Script): s = Script('import _ctypes; _ctypes.') assert len(s.completions()) >= 15 def test_call_signatures_extension(Script): if os.name == 'nt': func = 'LoadLibrary' params = 1 else: func = 'dlopen' params = 2 s = Script('import _ctypes; _ctypes.%s(' % (func,)) sigs = s.call_signatures() assert len(sigs) == 1 assert len(sigs[0].params) == params def test_call_signatures_stdlib(Script): s = Script('import math; math.cos(') sigs = s.call_signatures() assert len(sigs) == 1 assert len(sigs[0].params) == 1 # Check only on linux 64 bit platform and Python3.4. @pytest.mark.skipif('sys.platform != "linux" or sys.maxsize <= 2**32 or sys.version_info[:2] != (3, 4)') @cwd_at('test/test_inference') def test_init_extension_module(Script): """ ``__init__`` extension modules are also packages and Jedi should understand that. Originally coming from #472. This test was built by the module.c and setup.py combination you can find in the init_extension_module folder. You can easily build the `__init__.cpython-34m.so` by compiling it (create a virtualenv and run `setup.py install`. This is also why this test only runs on certain systems (and Python 3.4). """ s = jedi.Script('import init_extension_module as i\ni.', path='not_existing.py') assert 'foo' in [c.name for c in s.completions()] s = jedi.Script('from init_extension_module import foo\nfoo', path='not_existing.py') assert ['foo'] == [c.name for c in s.completions()] jedi-0.15.2/test/test_api/0000775000175000017500000000000013577125145015175 5ustar davedave00000000000000jedi-0.15.2/test/test_api/test_interpreter.py0000664000175000017500000004177613577124112021161 0ustar davedave00000000000000""" Tests of ``jedi.api.Interpreter``. """ import sys import warnings import pytest import jedi from jedi._compatibility import is_py3, py_version from jedi.inference.compiled import mixed, value from importlib import import_module if py_version > 30: def exec_(source, global_map): exec(source, global_map) else: eval(compile("""def exec_(source, global_map): exec source in global_map """, 'blub', 'exec')) class _GlobalNameSpace: class SideEffectContainer: pass def get_completion(source, namespace): i = jedi.Interpreter(source, [namespace]) completions = i.completions() assert len(completions) == 1 return completions[0] def test_builtin_details(): import keyword class EmptyClass: pass variable = EmptyClass() def func(): pass cls = get_completion('EmptyClass', locals()) var = get_completion('variable', locals()) f = get_completion('func', locals()) m = get_completion('keyword', locals()) assert cls.type == 'class' assert var.type == 'instance' assert f.type == 'function' assert m.type == 'module' def test_numpy_like_non_zero(): """ Numpy-like array can't be caster to bool and need to be compacre with `is`/`is not` and not `==`/`!=` """ class NumpyNonZero: def __zero__(self): raise ValueError('Numpy arrays would raise and tell you to use .any() or all()') def __bool__(self): raise ValueError('Numpy arrays would raise and tell you to use .any() or all()') class NumpyLike: def __eq__(self, other): return NumpyNonZero() def something(self): pass x = NumpyLike() d = {'a': x} # just assert these do not raise. They (strangely) trigger different # codepath get_completion('d["a"].some', {'d':d}) get_completion('x.some', {'x':x}) def test_nested_resolve(): class XX: def x(): pass cls = get_completion('XX', locals()) func = get_completion('XX.x', locals()) assert (func.line, func.column) == (cls.line + 1, 12) def test_side_effect_completion(): """ In the repl it's possible to cause side effects that are not documented in Python code, however we want references to Python code as well. Therefore we need some mixed kind of magic for tests. """ _GlobalNameSpace.SideEffectContainer.foo = 1 side_effect = get_completion('SideEffectContainer', _GlobalNameSpace.__dict__) # It's a class that contains MixedObject. value, = side_effect._name.infer() assert isinstance(value, mixed.MixedObject) foo = get_completion('SideEffectContainer.foo', _GlobalNameSpace.__dict__) assert foo.name == 'foo' def _assert_interpreter_complete(source, namespace, completions, **kwds): script = jedi.Interpreter(source, [namespace], **kwds) cs = script.completions() actual = [c.name for c in cs] assert sorted(actual) == sorted(completions) def test_complete_raw_function(): from os.path import join _assert_interpreter_complete('join("").up', locals(), ['upper']) def test_complete_raw_function_different_name(): from os.path import join as pjoin _assert_interpreter_complete('pjoin("").up', locals(), ['upper']) def test_complete_raw_module(): import os _assert_interpreter_complete('os.path.join("a").up', locals(), ['upper']) def test_complete_raw_instance(): import datetime dt = datetime.datetime(2013, 1, 1) completions = ['time', 'timetz', 'timetuple'] if is_py3: completions += ['timestamp'] _assert_interpreter_complete('(dt - dt).ti', locals(), completions) def test_list(): array = ['haha', 1] _assert_interpreter_complete('array[0].uppe', locals(), ['upper']) _assert_interpreter_complete('array[0].real', locals(), []) # something different, no index given, still just return the right _assert_interpreter_complete('array[int].real', locals(), ['real']) _assert_interpreter_complete('array[int()].real', locals(), ['real']) # inexistent index _assert_interpreter_complete('array[2].upper', locals(), ['upper']) def test_getattr(): class Foo1: bar = [] baz = 'bar' _assert_interpreter_complete('getattr(Foo1, baz).app', locals(), ['append']) def test_slice(): class Foo1: bar = [] baz = 'xbarx' _assert_interpreter_complete('getattr(Foo1, baz[1:-1]).append', locals(), ['append']) def test_getitem_side_effects(): class Foo2: def __getitem__(self, index): # Possible side effects here, should therefore not call this. if True: raise NotImplementedError() return index foo = Foo2() _assert_interpreter_complete('foo["asdf"].upper', locals(), ['upper']) @pytest.mark.parametrize('stacklevel', [1, 2]) @pytest.mark.filterwarnings("error") def test_property_warnings(stacklevel, allow_unsafe_getattr): class Foo3: @property def prop(self): # Possible side effects here, should therefore not call this. warnings.warn("foo", DeprecationWarning, stacklevel=stacklevel) return '' foo = Foo3() expected = ['upper'] if allow_unsafe_getattr else [] _assert_interpreter_complete('foo.prop.uppe', locals(), expected) @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize('class_is_findable', [False, True]) def test__getattr__completions(allow_unsafe_getattr, class_is_findable): class CompleteGetattr(object): def __getattr__(self, name): if name == 'foo': return self if name == 'fbar': return '' raise AttributeError(name) def __dir__(self): return ['foo', 'fbar'] + object.__dir__(self) if not class_is_findable: CompleteGetattr.__name__ = "something_somewhere" namespace = {'c': CompleteGetattr()} expected = ['foo', 'fbar'] _assert_interpreter_complete('c.f', namespace, expected) # Completions don't work for class_is_findable, because __dir__ is checked # for interpreter analysis, but if the static analysis part tries to help # it will not work. However static analysis is pretty good and understands # how gettatr works (even the ifs/comparisons). if not allow_unsafe_getattr: expected = [] _assert_interpreter_complete('c.foo.f', namespace, expected) _assert_interpreter_complete('c.foo.foo.f', namespace, expected) _assert_interpreter_complete('c.foo.uppe', namespace, []) expected_int = ['upper'] if allow_unsafe_getattr or class_is_findable else [] _assert_interpreter_complete('c.foo.fbar.uppe', namespace, expected_int) @pytest.fixture(params=[False, True]) def allow_unsafe_getattr(request, monkeypatch): monkeypatch.setattr(jedi.Interpreter, '_allow_descriptor_getattr_default', request.param) return request.param def test_property_error_oldstyle(allow_unsafe_getattr): lst = [] class Foo3: @property def bar(self): lst.append(1) raise ValueError foo = Foo3() _assert_interpreter_complete('foo.bar', locals(), ['bar']) _assert_interpreter_complete('foo.bar.baz', locals(), []) if allow_unsafe_getattr: assert lst == [1, 1] else: # There should not be side effects assert lst == [] def test_property_error_newstyle(allow_unsafe_getattr): lst = [] class Foo3(object): @property def bar(self): lst.append(1) raise ValueError foo = Foo3() _assert_interpreter_complete('foo.bar', locals(), ['bar']) _assert_interpreter_complete('foo.bar.baz', locals(), []) if allow_unsafe_getattr: assert lst == [1, 1] else: # There should not be side effects assert lst == [] def test_property_content(): class Foo3(object): @property def bar(self): return 1 foo = Foo3() def_, = jedi.Interpreter('foo.bar', [locals()]).goto_definitions() assert def_.name == 'int' @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") def test_param_completion(): def foo(bar): pass lambd = lambda xyz: 3 _assert_interpreter_complete('foo(bar', locals(), ['bar']) assert bool(jedi.Interpreter('lambd(xyz', [locals()]).completions()) == is_py3 def test_endless_yield(): lst = [1] * 10000 # If iterating over lists it should not be possible to take an extremely # long time. _assert_interpreter_complete('list(lst)[9000].rea', locals(), ['real']) @pytest.mark.skipif('py_version < 33', reason='inspect.signature was created in 3.3.') def test_completion_params(): foo = lambda a, b=3: None script = jedi.Interpreter('foo', [locals()]) c, = script.completions() assert [p.name for p in c.params] == ['a', 'b'] assert c.params[0].infer() == [] t, = c.params[1].infer() assert t.name == 'int' @pytest.mark.skipif('py_version < 33', reason='inspect.signature was created in 3.3.') def test_completion_param_annotations(): # Need to define this function not directly in Python. Otherwise Jedi is to # clever and uses the Python code instead of the signature object. code = 'def foo(a: 1, b: str, c: int = 1.0) -> bytes: pass' exec_(code, locals()) script = jedi.Interpreter('foo', [locals()]) c, = script.completions() a, b, c = c.params assert a.infer() == [] assert [d.name for d in b.infer()] == ['str'] assert {d.name for d in c.infer()} == {'int', 'float'} d, = jedi.Interpreter('foo()', [locals()]).goto_definitions() assert d.name == 'bytes' @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") def test_keyword_argument(): def f(some_keyword_argument): pass c, = jedi.Interpreter("f(some_keyw", [{'f': f}]).completions() assert c.name == 'some_keyword_argument' assert c.complete == 'ord_argument=' # This needs inspect.signature to work. if is_py3: # Make it impossible for jedi to find the source of the function. f.__name__ = 'xSOMETHING' c, = jedi.Interpreter("x(some_keyw", [{'x': f}]).completions() assert c.name == 'some_keyword_argument' def test_more_complex_instances(): class Something: def foo(self, other): return self class Base: def wow(self): return Something() #script = jedi.Interpreter('Base().wow().foo', [locals()]) #c, = script.completions() #assert c.name == 'foo' x = Base() script = jedi.Interpreter('x.wow().foo', [locals()]) c, = script.completions() assert c.name == 'foo' def test_repr_execution_issue(): """ Anticipate inspect.getfile executing a __repr__ of all kinds of objects. See also #919. """ class ErrorRepr: def __repr__(self): raise Exception('xyz') er = ErrorRepr() script = jedi.Interpreter('er', [locals()]) d, = script.goto_definitions() assert d.name == 'ErrorRepr' assert d.type == 'instance' def test_dir_magic_method(allow_unsafe_getattr): class CompleteAttrs(object): def __getattr__(self, name): if name == 'foo': return 1 if name == 'bar': return 2 raise AttributeError(name) def __dir__(self): if is_py3: names = object.__dir__(self) else: names = dir(object()) return ['foo', 'bar'] + names itp = jedi.Interpreter("ca.", [{'ca': CompleteAttrs()}]) completions = itp.completions() names = [c.name for c in completions] assert ('__dir__' in names) == is_py3 assert '__class__' in names assert 'foo' in names assert 'bar' in names foo = [c for c in completions if c.name == 'foo'][0] if allow_unsafe_getattr: inst, = foo.infer() assert inst.name == 'int' assert inst.type == 'instance' else: assert foo.infer() == [] def test_name_not_findable(): class X(): if 0: NOT_FINDABLE def hidden(self): return hidden.__name__ = 'NOT_FINDABLE' setattr(X, 'NOT_FINDABLE', X.hidden) assert jedi.Interpreter("X.NOT_FINDA", [locals()]).completions() def test_stubs_working(): from multiprocessing import cpu_count defs = jedi.Interpreter("cpu_count()", [locals()]).goto_definitions() assert [d.name for d in defs] == ['int'] def test_sys_path_docstring(): # Was an issue in #1298 import jedi s = jedi.Interpreter("from sys import path\npath", line=2, column=4, namespaces=[locals()]) s.completions()[0].docstring() @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize( 'code, completions', [ ('x[0].uppe', ['upper']), ('x[1337].uppe', ['upper']), ('x[""].uppe', ['upper']), ('x.appen', ['append']), ('y.add', ['add']), ('y[0].', []), ('list(y)[0].', []), # TODO use stubs properly to improve this. ('z[0].uppe', ['upper']), ('z[0].append', ['append']), ('z[1].uppe', ['upper']), ('z[1].append', []), ('collections.deque().app', ['append', 'appendleft']), ('deq.app', ['append', 'appendleft']), ('deq.pop', ['pop', 'popleft']), ('deq.pop().', []), ('collections.Counter("asdf").setdef', ['setdefault']), ('collections.Counter("asdf").pop().imag', ['imag']), ('list(collections.Counter("asdf").keys())[0].uppe', ['upper']), ('counter.setdefa', ['setdefault']), ('counter.pop().imag', []), # TODO stubs could make this better ('counter.keys())[0].uppe', []), ('string.upper().uppe', ['upper']), ('"".upper().uppe', ['upper']), ] ) def test_simple_completions(code, completions): x = [str] y = {1} z = {1: str, 2: list} import collections deq = collections.deque([1]) counter = collections.Counter(['asdf']) string = '' defs = jedi.Interpreter(code, [locals()]).completions() assert [d.name for d in defs] == completions @pytest.mark.skipif(sys.version_info[0] == 2, reason="Python 2 doesn't have lru_cache") def test__wrapped__(): from functools import lru_cache @lru_cache(maxsize=128) def syslogs_to_df(): pass c, = jedi.Interpreter('syslogs_to_df', [locals()]).completions() # Apparently the function starts on the line where the decorator starts. assert c.line == syslogs_to_df.__wrapped__.__code__.co_firstlineno + 1 @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize('module_name', ['sys', 'time', 'unittest.mock']) def test_core_module_completes(module_name): module = import_module(module_name) assert jedi.Interpreter('module.', [locals()]).completions() @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize( 'code, expected, index', [ ('a(', ['a', 'b', 'c'], 0), ('b(', ['b', 'c'], 0), # Might or might not be correct, because c is given as a keyword # argument as well, but that is just what inspect.signature returns. ('c(', ['b', 'c'], 0), ] ) def test_partial_signatures(code, expected, index): import functools def func(a, b, c): pass a = functools.partial(func) b = functools.partial(func, 1) c = functools.partial(func, 1, c=2) sig, = jedi.Interpreter(code, [locals()]).call_signatures() assert sig.name == 'partial' assert [p.name for p in sig.params] == expected assert index == sig.index @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") def test_type_var(): """This was an issue before, see Github #1369""" import typing x = typing.TypeVar('myvar') def_, = jedi.Interpreter('x', [locals()]).goto_definitions() assert def_.name == 'TypeVar' @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, because EOL") @pytest.mark.parametrize('class_is_findable', [False, True]) def test_param_annotation_completion(class_is_findable): class Foo: bar = 3 if not class_is_findable: Foo.__name__ = 'asdf' code = 'def CallFoo(x: Foo):\n x.ba' def_, = jedi.Interpreter(code, [locals()]).completions() assert def_.name == 'bar' jedi-0.15.2/test/test_api/test_usages.py0000664000175000017500000000101013577124112020056 0ustar davedave00000000000000def test_import_usage(Script): s = Script("from .. import foo", line=1, column=18, path="foo.py") assert [usage.line for usage in s.usages()] == [1] def test_exclude_builtin_modules(Script): def get(include): return [(d.line, d.column) for d in Script(source, column=8).usages(include_builtins=include)] source = '''import sys\nprint(sys.path)''' places = get(include=True) assert len(places) > 2 # Includes stubs places = get(include=False) assert places == [(1, 7), (2, 6)] jedi-0.15.2/test/test_api/test_api.py0000664000175000017500000002523613577124112017360 0ustar davedave00000000000000""" Test all things related to the ``jedi.api`` module. """ import os import sys from textwrap import dedent import pytest from pytest import raises from parso import cache from jedi._compatibility import unicode from jedi import preload_module from jedi.inference.gradual import typeshed from test.helpers import test_dir @pytest.mark.skipif(sys.version_info[0] == 2, reason="Ignore Python 2, EoL") def test_preload_modules(): def check_loaded(*modules): for grammar_cache in cache.parser_cache.values(): if None in grammar_cache: break # Filter the typeshed parser cache. typeshed_cache_count = sum( 1 for path in grammar_cache if path is not None and path.startswith(typeshed.TYPESHED_PATH) ) # +1 for None module (currently used) assert len(grammar_cache) - typeshed_cache_count == len(modules) + 1 for i in modules: assert [i in k for k in grammar_cache.keys() if k is not None] old_cache = cache.parser_cache.copy() cache.parser_cache.clear() try: preload_module('sys') check_loaded() # compiled (c_builtin) modules shouldn't be in the cache. preload_module('types', 'token') check_loaded('types', 'token') finally: cache.parser_cache.update(old_cache) def test_empty_script(Script): assert Script('') def test_line_number_errors(Script): """ Script should raise a ValueError if line/column numbers are not in a valid range. """ s = 'hello' # lines with raises(ValueError): Script(s, 2, 0) with raises(ValueError): Script(s, 0, 0) # columns with raises(ValueError): Script(s, 1, len(s) + 1) with raises(ValueError): Script(s, 1, -1) # ok Script(s, 1, 0) Script(s, 1, len(s)) def _check_number(Script, source, result='float'): completions = Script(source).completions() assert completions[0].parent().name == result def test_completion_on_number_literals(Script): # No completions on an int literal (is a float). assert [c.name for c in Script('1. ').completions()] \ == ['and', 'if', 'in', 'is', 'not', 'or'] # Multiple points after an int literal basically mean that there's a float # and a call after that. _check_number(Script, '1..') _check_number(Script, '1.0.') # power notation _check_number(Script, '1.e14.') _check_number(Script, '1.e-3.') _check_number(Script, '9e3.') assert Script('1.e3..').completions() == [] assert Script('1.e-13..').completions() == [] def test_completion_on_hex_literals(Script): assert Script('0x1..').completions() == [] _check_number(Script, '0x1.', 'int') # hexdecimal # Completing binary literals doesn't work if they are not actually binary # (invalid statements). assert Script('0b2.b').completions() == [] _check_number(Script, '0b1.', 'int') # binary _check_number(Script, '0x2e.', 'int') _check_number(Script, '0xE7.', 'int') _check_number(Script, '0xEa.', 'int') # theoretically, but people can just check for syntax errors: assert Script('0x.').completions() == [] def test_completion_on_complex_literals(Script): assert Script('1j..').completions() == [] _check_number(Script, '1j.', 'complex') _check_number(Script, '44.j.', 'complex') _check_number(Script, '4.0j.', 'complex') # No dot no completion - I thought, but 4j is actually a literal after # which a keyword like or is allowed. Good times, haha! # However this has been disabled again, because it apparently annoyed # users. So no completion after j without a space :) assert not Script('4j').completions() assert ({c.name for c in Script('4j ').completions()} == {'if', 'and', 'in', 'is', 'not', 'or'}) def test_goto_assignments_on_non_name(Script, environment): assert Script('for').goto_assignments() == [] assert Script('assert').goto_assignments() == [] assert Script('True').goto_assignments() == [] def test_goto_definitions_on_non_name(Script): assert Script('import x', column=0).goto_definitions() == [] def test_goto_definitions_on_generator(Script): def_, = Script('def x(): yield 1\ny=x()\ny').goto_definitions() assert def_.name == 'Generator' def test_goto_definition_not_multiple(Script): """ There should be only one Definition result if it leads back to the same origin (e.g. instance method) """ s = dedent('''\ import random class A(): def __init__(self, a): self.a = 3 def foo(self): pass if random.randint(0, 1): a = A(2) else: a = A(1) a''') assert len(Script(s).goto_definitions()) == 1 def test_usage_description(Script): descs = [u.description for u in Script("foo = ''; foo").usages()] assert set(descs) == {"foo = ''", 'foo'} def test_get_line_code(Script): def get_line_code(source, line=None, **kwargs): return Script(source, line=line).completions()[0].get_line_code(**kwargs) # On builtin assert get_line_code('abs') == 'def abs(__n: SupportsAbs[_T]) -> _T: ...\n' # On custom code first_line = 'def foo():\n' line = ' foo' code = first_line + line assert get_line_code(code) == first_line # With before/after code = code + '\nother_line' assert get_line_code(code, line=2) == first_line assert get_line_code(code, line=2, after=1) == first_line + line + '\n' assert get_line_code(code, line=2, after=2, before=1) == code # Should just be the whole thing, since there are no more lines on both # sides. assert get_line_code(code, line=2, after=3, before=3) == code def test_get_line_code_on_builtin(Script, disable_typeshed): abs_ = Script('abs').completions()[0] assert abs_.name == 'abs' assert abs_.get_line_code() == '' assert abs_.line is None def test_goto_assignments_follow_imports(Script): code = dedent(""" import inspect inspect.isfunction""") definition, = Script(code, column=0).goto_assignments(follow_imports=True) assert 'inspect.py' in definition.module_path assert (definition.line, definition.column) == (1, 0) definition, = Script(code).goto_assignments(follow_imports=True) assert 'inspect.py' in definition.module_path assert (definition.line, definition.column) > (1, 0) code = '''def param(p): pass\nparam(1)''' start_pos = 1, len('def param(') script = Script(code, *start_pos) definition, = script.goto_assignments(follow_imports=True) assert (definition.line, definition.column) == start_pos assert definition.name == 'p' result, = definition.goto_assignments() assert result.name == 'p' result, = definition.infer() assert result.name == 'int' result, = result.infer() assert result.name == 'int' definition, = script.goto_assignments() assert (definition.line, definition.column) == start_pos d, = Script('a = 1\na').goto_assignments(follow_imports=True) assert d.name == 'a' def test_goto_module(Script): def check(line, expected, follow_imports=False): script = Script(path=path, line=line) module, = script.goto_assignments(follow_imports=follow_imports) assert module.module_path == expected base_path = os.path.join(os.path.dirname(__file__), 'simple_import') path = os.path.join(base_path, '__init__.py') check(1, os.path.join(base_path, 'module.py')) check(1, os.path.join(base_path, 'module.py'), follow_imports=True) check(5, os.path.join(base_path, 'module2.py')) def test_goto_definition_cursor(Script): s = ("class A():\n" " def _something(self):\n" " return\n" " def different_line(self,\n" " b):\n" " return\n" "A._something\n" "A.different_line" ) in_name = 2, 9 under_score = 2, 8 cls = 2, 7 should1 = 7, 10 diff_line = 4, 10 should2 = 8, 10 def get_def(pos): return [d.description for d in Script(s, *pos).goto_definitions()] in_name = get_def(in_name) under_score = get_def(under_score) should1 = get_def(should1) should2 = get_def(should2) diff_line = get_def(diff_line) assert should1 == in_name assert should1 == under_score assert should2 == diff_line assert get_def(cls) == [] def test_no_statement_parent(Script): source = dedent(""" def f(): pass class C: pass variable = f if random.choice([0, 1]) else C""") defs = Script(source, column=3).goto_definitions() defs = sorted(defs, key=lambda d: d.line) assert [d.description for d in defs] == ['def f', 'class C'] def test_backslash_continuation_and_bracket(Script): code = dedent(r""" x = 0 a = \ [1, 2, 3, (x)]""") lines = code.splitlines() column = lines[-1].index('(') def_, = Script(code, line=len(lines), column=column).goto_definitions() assert def_.name == 'int' def test_goto_follow_builtin_imports(Script): s = Script('import sys; sys') d, = s.goto_assignments(follow_imports=True) assert d.in_builtin_module() is True d, = s.goto_assignments(follow_imports=True, follow_builtin_imports=True) assert d.in_builtin_module() is True def test_docstrings_for_completions(Script): for c in Script('').completions(): assert isinstance(c.docstring(), (str, unicode)) def test_fuzzy_completion(Script): script = Script('string = "hello"\nstring.upper') assert ['isupper', 'upper'] == [comp.name for comp in script.completions(fuzzy=True)] def test_math_fuzzy_completion(Script, environment): script = Script('import math\nmath.og') expected = ['copysign', 'log', 'log10', 'log1p'] if environment.version_info.major >= 3: expected.append('log2') completions = script.completions(fuzzy=True) assert expected == [comp.name for comp in completions] for c in completions: assert c.complete is None def test_file_fuzzy_completion(Script): path = os.path.join(test_dir, 'completion') script = Script('"{}/ep08_i'.format(path)) assert ['pep0484_basic.py"', 'pep0484_typing.py"'] \ == [comp.name for comp in script.completions(fuzzy=True)] @pytest.mark.parametrize( 'code, column', [ ('"foo"', 0), ('"foo"', 3), ('"foo"', None), ('"""foo"""', 5), ('"""foo"""', 1), ('"""foo"""', 2), ] ) def test_goto_on_string(Script, code, column): script = Script(code, column=column) assert not script.goto_definitions() assert not script.goto_assignments() jedi-0.15.2/test/test_api/test_settings.py0000664000175000017500000000202713577124112020440 0ustar davedave00000000000000import os import pytest from jedi import api from jedi.inference import imports from ..helpers import cwd_at @pytest.mark.skipif('True', reason='Skip for now, test case is not really supported.') @cwd_at('jedi') def test_add_dynamic_mods(Script): fname = '__main__.py' api.settings.additional_dynamic_modules = [fname] # Fictional module that defines a function. src1 = "def r(a): return a" # Other fictional modules in another place in the fs. src2 = 'from .. import setup; setup.r(1)' script = Script(src1, path='../setup.py') imports.load_module(script._inference_state, os.path.abspath(fname), src2) result = script.goto_definitions() assert len(result) == 1 assert result[0].description == 'class int' def test_add_bracket_after_function(monkeypatch, Script): settings = api.settings monkeypatch.setattr(settings, 'add_bracket_after_function', True) script = Script('''\ def foo(): pass foo''') completions = script.completions() assert completions[0].complete == '(' jedi-0.15.2/test/test_api/import_tree_for_usages/0000775000175000017500000000000013577125145021743 5ustar davedave00000000000000jedi-0.15.2/test/test_api/import_tree_for_usages/b.py0000664000175000017500000000002413577124112022523 0ustar davedave00000000000000def bar(): pass jedi-0.15.2/test/test_api/import_tree_for_usages/__init__.py0000664000175000017500000000005513577124112024045 0ustar davedave00000000000000""" An import tree, for testing usages. """ jedi-0.15.2/test/test_api/import_tree_for_usages/a.py0000664000175000017500000000005013577124112022521 0ustar davedave00000000000000from . import b def foo(): b.bar() jedi-0.15.2/test/test_api/test_defined_names.py0000664000175000017500000001036513577124112021365 0ustar davedave00000000000000""" Tests for `api.names`. """ from textwrap import dedent def _assert_definition_names(definitions, names_): assert [d.name for d in definitions] == names_ def _check_names(names, source, names_): definitions = names(dedent(source)) _assert_definition_names(definitions, names_) return definitions def test_get_definitions_flat(names): _check_names(names, """ import module class Class: pass def func(): pass data = None """, ['module', 'Class', 'func', 'data']) def test_dotted_assignment(names): _check_names(names, """ x = Class() x.y.z = None """, ['x', 'z']) # TODO is this behavior what we want? def test_multiple_assignment(names): _check_names(names, "x = y = None", ['x', 'y']) def test_multiple_imports(names): _check_names(names, """ from module import a, b from another_module import * """, ['a', 'b']) def test_nested_definitions(names): definitions = _check_names(names, """ class Class: def f(): pass def g(): pass """, ['Class']) subdefinitions = definitions[0].defined_names() _assert_definition_names(subdefinitions, ['f', 'g']) assert [d.full_name for d in subdefinitions] == ['__main__.Class.f', '__main__.Class.g'] def test_nested_class(names): definitions = _check_names(names, """ class L1: class L2: class L3: def f(): pass def f(): pass def f(): pass def f(): pass """, ['L1', 'f']) subdefs = definitions[0].defined_names() subsubdefs = subdefs[0].defined_names() _assert_definition_names(subdefs, ['L2', 'f']) _assert_definition_names(subsubdefs, ['L3', 'f']) _assert_definition_names(subsubdefs[0].defined_names(), ['f']) def test_class_fields_with_all_scopes_false(names): definitions = _check_names(names, """ from module import f g = f(f) class C: h = g def foo(x=a): bar = x return bar """, ['f', 'g', 'C', 'foo']) C_subdefs = definitions[-2].defined_names() foo_subdefs = definitions[-1].defined_names() _assert_definition_names(C_subdefs, ['h']) _assert_definition_names(foo_subdefs, ['x', 'bar']) def test_async_stmt_with_all_scopes_false(names): definitions = _check_names(names, """ from module import f import asyncio g = f(f) class C: h = g def __init__(self): pass async def __aenter__(self): pass def foo(x=a): bar = x return bar async def async_foo(duration): async def wait(): await asyncio.sleep(100) for i in range(duration//100): await wait() return duration//100*100 async with C() as cinst: d = cinst """, ['f', 'asyncio', 'g', 'C', 'foo', 'async_foo', 'cinst', 'd']) C_subdefs = definitions[3].defined_names() foo_subdefs = definitions[4].defined_names() async_foo_subdefs = definitions[5].defined_names() cinst_subdefs = definitions[6].defined_names() _assert_definition_names(C_subdefs, ['h', '__init__', '__aenter__']) _assert_definition_names(foo_subdefs, ['x', 'bar']) _assert_definition_names(async_foo_subdefs, ['duration', 'wait', 'i']) # We treat d as a name outside `async with` block _assert_definition_names(cinst_subdefs, []) def test_follow_imports(names): # github issue #344 imp = names('import datetime')[0] assert imp.name == 'datetime' datetime_names = [str(d.name) for d in imp.defined_names()] assert 'timedelta' in datetime_names def test_names_twice(names): source = dedent(''' def lol(): pass ''') defs = names(source=source) assert defs[0].defined_names() == [] def test_simple_name(names): defs = names('foo', references=True) assert not defs[0]._name.infer() def test_no_error(names): code = dedent(""" def foo(a, b): if a == 10: if b is None: print("foo") a = 20 """) func_name, = names(code) a, b, a20 = func_name.defined_names() assert a.name == 'a' assert b.name == 'b' assert a20.name == 'a' assert a20.goto_assignments() == [a20] jedi-0.15.2/test/test_api/__init__.py0000664000175000017500000000000013577124112017265 0ustar davedave00000000000000jedi-0.15.2/test/test_api/test_api_classes_follow_definition.py0000664000175000017500000000422013577124112024655 0ustar davedave00000000000000from itertools import chain import jedi from ..helpers import cwd_at def test_import_empty(Script): """ github #340, return the full word. """ completion = Script("import ").completions()[0] definition = completion.infer()[0] assert definition def check_follow_definition_types(Script, source): # nested import completions = Script(source, path='some_path.py').completions() defs = chain.from_iterable(c.infer() for c in completions) return [d.type for d in defs] def test_follow_import_incomplete(Script, environment): """ Completion on incomplete imports should always take the full completion to do any type inference. """ datetime = check_follow_definition_types(Script, "import itertool") assert datetime == ['module'] # empty `from * import` parts itert = jedi.Script("from itertools import ").completions() definitions = [d for d in itert if d.name == 'chain'] assert len(definitions) == 1 assert [d.type for d in definitions[0].infer()] == ['class'] # incomplete `from * import` part datetime = check_follow_definition_types(Script, "from datetime import datetim") if environment.version_info.major == 2: assert datetime == ['class'] else: assert set(datetime) == {'class', 'instance'} # py3: builtin and pure py version # os.path check ospath = check_follow_definition_types(Script, "from os.path import abspat") assert set(ospath) == {'function'} # alias alias = check_follow_definition_types(Script, "import io as abcd; abcd") assert alias == ['module'] @cwd_at('test/completion/import_tree') def test_follow_definition_nested_import(Script): types = check_follow_definition_types(Script, "import pkg.mod1; pkg") assert types == ['module'] types = check_follow_definition_types(Script, "import pkg.mod1; pkg.mod1") assert types == ['module'] types = check_follow_definition_types(Script, "import pkg.mod1; pkg.mod1.a") assert types == ['instance'] def test_follow_definition_land_on_import(Script): types = check_follow_definition_types(Script, "import datetime; datetim") assert types == ['module'] jedi-0.15.2/test/test_api/test_completion.py0000664000175000017500000002341313577124112020753 0ustar davedave00000000000000from os.path import join, sep as s, dirname import os import sys from textwrap import dedent import pytest from ..helpers import root_dir def test_in_whitespace(Script): code = dedent(''' def x(): pass''') assert len(Script(code, column=2).completions()) > 20 def test_empty_init(Script): """This was actually an issue.""" code = dedent('''\ class X(object): pass X(''') assert Script(code).completions() def test_in_empty_space(Script): code = dedent('''\ class X(object): def __init__(self): hello ''') comps = Script(code, 3, 7).completions() self, = [c for c in comps if c.name == 'self'] assert self.name == 'self' def_, = self.infer() assert def_.name == 'X' def test_indent_value(Script): """ If an INDENT is the next supposed token, we should still be able to complete. """ code = 'if 1:\nisinstanc' comp, = Script(code).completions() assert comp.name == 'isinstance' def test_keyword_value(Script): def get_names(*args, **kwargs): return [d.name for d in Script(*args, **kwargs).completions()] names = get_names('if 1:\n pass\n') assert 'if' in names assert 'elif' in names def test_os_nowait(Script): """ github issue #45 """ s = Script("import os; os.P_").completions() assert 'P_NOWAIT' in [i.name for i in s] def test_points_in_completion(Script): """At some point, points were inserted into the completions, this caused problems, sometimes. """ c = Script("if IndentationErr").completions() assert c[0].name == 'IndentationError' assert c[0].complete == 'or' def test_loading_unicode_files_with_bad_global_charset(Script, monkeypatch, tmpdir): dirname = str(tmpdir.mkdir('jedi-test')) filename1 = join(dirname, 'test1.py') filename2 = join(dirname, 'test2.py') if sys.version_info < (3, 0): data = "# coding: latin-1\nfoo = 'm\xf6p'\n" else: data = "# coding: latin-1\nfoo = 'm\xf6p'\n".encode("latin-1") with open(filename1, "wb") as f: f.write(data) s = Script("from test1 import foo\nfoo.", line=2, column=4, path=filename2) s.completions() def test_fake_subnodes(Script): """ Test the number of subnodes of a fake object. There was a bug where the number of child nodes would grow on every call to :func:``jedi.inference.compiled.fake.get_faked``. See Github PR#649 and isseu #591. """ def get_str_completion(values): for c in values: if c.name == 'str': return c limit = None for i in range(2): completions = Script('').completions() c = get_str_completion(completions) str_value, = c._name.infer() n = len(str_value.tree_node.children[-1].children) if i == 0: limit = n else: assert n == limit def test_generator(Script): # Did have some problems with the usage of generator completions this # way. s = "def abc():\n" \ " yield 1\n" \ "abc()." assert Script(s).completions() def test_in_comment(Script): assert Script(" # Comment").completions() # TODO this is a bit ugly, that the behaviors in comments are different. assert not Script("max_attr_value = int(2) # Cast to int for spe").completions() def test_in_comment_before_string(Script): assert not Script(" # Foo\n'asdf'", line=1).completions() def test_async(Script, environment): if environment.version_info < (3, 5): pytest.skip() code = dedent(''' foo = 3 async def x(): hey = 3 ho''' ) comps = Script(code, column=4).completions() names = [c.name for c in comps] assert 'foo' in names assert 'hey' in names def test_with_stmt_error_recovery(Script): assert Script('with open('') as foo: foo.\na', line=1).completions() @pytest.mark.parametrize( 'code, has_keywords', ( ('', True), ('x;', True), ('1', False), ('1 ', True), ('1\t', True), ('1\n', True), ('1\\\n', True), ) ) def test_keyword_completion(Script, code, has_keywords): assert has_keywords == any(x.is_keyword for x in Script(code).completions()) f1 = join(root_dir, 'example.py') f2 = join(root_dir, 'test', 'example.py') os_path = 'from os.path import *\n' # os.path.sep escaped se = s * 2 if s == '\\' else s current_dirname = os.path.basename(dirname(dirname(dirname(__file__)))) @pytest.mark.parametrize( 'file, code, column, expected', [ # General tests / relative paths (None, '"comp', None, ['ile', 'lex']), # No files like comp (None, '"test', None, [s]), (None, '"test', 4, ['t' + s]), ('example.py', '"test%scomp' % s, None, ['letion' + s]), ('example.py', 'r"comp"', None, "A LOT"), ('example.py', 'r"tes"', None, "A LOT"), ('example.py', 'r"tes"', 5, ['t' + s]), ('example.py', 'r" tes"', 6, []), ('test%sexample.py' % se, 'r"tes"', 5, ['t' + s]), ('test%sexample.py' % se, 'r"test%scomp"' % s, 5, ['t' + s]), ('test%sexample.py' % se, 'r"test%scomp"' % s, 11, ['letion' + s]), ('test%sexample.py' % se, '"%s"' % join('test', 'completion', 'basi'), 21, ['c.py']), ('example.py', 'rb"'+ join('..', current_dirname, 'tes'), None, ['t' + s]), # Absolute paths (None, '"' + join(root_dir, 'test', 'test_ca'), None, ['che.py"']), (None, '"%s"' % join(root_dir, 'test', 'test_ca'), len(root_dir) + 14, ['che.py']), # Longer quotes ('example.py', 'r"""test', None, [s]), ('example.py', 'r"""\ntest', None, []), ('example.py', 'u"""tes\n', (1, 7), ['t' + s]), ('example.py', '"""test%stest_cache.p"""' % s, 20, ['y']), ('example.py', '"""test%stest_cache.p"""' % s, 19, ['py"""']), # Adding ('example.py', '"test" + "%stest_cac' % se, None, ['he.py"']), ('example.py', '"test" + "%s" + "test_cac' % se, None, ['he.py"']), ('example.py', 'x = 1 + "test', None, []), ('example.py', 'x = f("te" + "st)', 16, [s]), ('example.py', 'x = f("te" + "st', 16, [s]), ('example.py', 'x = f("te" + "st"', 16, [s]), ('example.py', 'x = f("te" + "st")', 16, [s]), ('example.py', 'x = f("t" + "est")', 16, [s]), # This is actually not correct, but for now leave it here, because of # Python 2. ('example.py', 'x = f(b"t" + "est")', 17, [s]), ('example.py', '"test" + "', None, [s]), # __file__ (f1, os_path + 'dirname(__file__) + "%stest' % s, None, [s]), (f2, os_path + 'dirname(__file__) + "%stest_ca' % se, None, ['che.py"']), (f2, os_path + 'dirname(abspath(__file__)) + sep + "test_ca', None, ['che.py"']), (f2, os_path + 'join(dirname(__file__), "completion") + sep + "basi', None, ['c.py"']), (f2, os_path + 'join("test", "completion") + sep + "basi', None, ['c.py"']), # inside join (f2, os_path + 'join(dirname(__file__), "completion", "basi', None, ['c.py"']), (f2, os_path + 'join(dirname(__file__), "completion", "basi)', 43, ['c.py"']), (f2, os_path + 'join(dirname(__file__), "completion", "basi")', 43, ['c.py']), (f2, os_path + 'join(dirname(__file__), "completion", "basi)', 35, ['']), (f2, os_path + 'join(dirname(__file__), "completion", "basi)', 33, ['on"']), (f2, os_path + 'join(dirname(__file__), "completion", "basi")', 33, ['on"']), # join with one argument. join will not get inferred and the result is # that directories and in a slash. This is unfortunate, but doesn't # really matter. (f2, os_path + 'join("tes', 9, ['t"']), (f2, os_path + 'join(\'tes)', 9, ["t'"]), (f2, os_path + 'join(r"tes"', 10, ['t']), (f2, os_path + 'join("""tes""")', 11, ['t']), # Almost like join but not really (f2, os_path + 'join["tes', 9, ['t' + s]), (f2, os_path + 'join["tes"', 9, ['t' + s]), (f2, os_path + 'join["tes"]', 9, ['t' + s]), (f2, os_path + 'join[dirname(__file__), "completi', 33, []), (f2, os_path + 'join[dirname(__file__), "completi"', 33, []), (f2, os_path + 'join[dirname(__file__), "completi"]', 33, []), # With full paths (f2, 'import os\nos.path.join(os.path.dirname(__file__), "completi', 49, ['on"']), (f2, 'import os\nos.path.join(os.path.dirname(__file__), "completi"', 49, ['on']), (f2, 'import os\nos.path.join(os.path.dirname(__file__), "completi")', 49, ['on']), # With alias (f2, 'import os.path as p as p\np.join(p.dirname(__file__), "completi', None, ['on"']), (f2, 'from os.path import dirname, join as j\nj(dirname(__file__), "completi', None, ['on"']), # Trying to break it (f2, os_path + 'join(["tes', 10, ['t' + s]), (f2, os_path + 'join(["tes"]', 10, ['t' + s]), (f2, os_path + 'join(["tes"])', 10, ['t' + s]), (f2, os_path + 'join("test", "test_cac" + x,', 22, ['he.py']), ] ) def test_file_path_completions(Script, file, code, column, expected): line = None if isinstance(column, tuple): line, column = column comps = Script(code, path=file, line=line, column=column).completions() if expected == "A LOT": assert len(comps) > 100 # This is basically global completions. else: assert [c.complete for c in comps] == expected from jedi.api.helpers import start_match, fuzzy_match def test_start_match(): assert start_match('Condition', 'C') def test_fuzzy_match(): assert fuzzy_match('Condition', 'i') assert not fuzzy_match('Condition', 'p') assert fuzzy_match('Condition', 'ii') assert not fuzzy_match('Condition', 'Ciito') assert fuzzy_match('Condition', 'Cdiio') jedi-0.15.2/test/test_api/simple_import/0000775000175000017500000000000013577125145020060 5ustar davedave00000000000000jedi-0.15.2/test/test_api/simple_import/module.py0000664000175000017500000000000013577124112021676 0ustar davedave00000000000000jedi-0.15.2/test/test_api/simple_import/__init__.py0000664000175000017500000000013413577124112022160 0ustar davedave00000000000000from simple_import import module def in_function(): from simple_import import module2 jedi-0.15.2/test/test_api/simple_import/module2.py0000664000175000017500000000000013577124112021760 0ustar davedave00000000000000jedi-0.15.2/test/test_api/test_call_signatures.py0000664000175000017500000004521213577124112021762 0ustar davedave00000000000000import sys from textwrap import dedent import inspect import pytest from ..helpers import TestCase from jedi import cache from jedi.parser_utils import get_call_signature from jedi import Interpreter def assert_signature(Script, source, expected_name, expected_index=0, line=None, column=None): signatures = Script(source, line, column).call_signatures() assert len(signatures) <= 1 if not signatures: assert expected_name is None, \ 'There are no signatures, but `%s` expected.' % expected_name else: assert signatures[0].name == expected_name assert signatures[0].index == expected_index return signatures[0] def test_valid_call(Script): assert_signature(Script, 'bool()', 'bool', column=5) class TestCallSignatures(TestCase): @pytest.fixture(autouse=True) def init(self, Script): self.Script = Script def _run_simple(self, source, name, index=0, column=None, line=1): assert_signature(self.Script, source, name, index, line, column) def test_simple(self): run = self._run_simple # simple s1 = "sorted(a, bool(" run(s1, 'sorted', 0, 7) run(s1, 'sorted', 1, 9) run(s1, 'sorted', 1, 10) run(s1, 'sorted', None, 11) run(s1, 'bool', 0, 15) s2 = "abs(), " run(s2, 'abs', 0, 4) run(s2, None, column=5) run(s2, None) s3 = "abs()." run(s3, None, column=5) run(s3, None) def test_more_complicated(self): run = self._run_simple s4 = 'abs(bool(), , set,' run(s4, None, column=3) run(s4, 'abs', 0, 4) run(s4, 'bool', 0, 9) run(s4, 'abs', 0, 10) run(s4, 'abs', None, 11) s5 = "sorted(1,\nif 2:\n def a():" run(s5, 'sorted', 0, 7) run(s5, 'sorted', 1, 9) s6 = "bool().__eq__(" run(s6, '__eq__', 0) run(s6, 'bool', 0, 5) s7 = "str().upper().center(" s8 = "bool(int[abs(" run(s7, 'center', 0) run(s8, 'abs', 0) run(s8, 'bool', 0, 10) run("import time; abc = time; abc.sleep(", 'sleep', 0) def test_issue_57(self): # jedi #57 s = "def func(alpha, beta): pass\n" \ "func(alpha='101'," self._run_simple(s, 'func', 0, column=13, line=2) def test_for(self): # jedi-vim #11 self._run_simple("for sorted(", 'sorted', 0) self._run_simple("for s in sorted(", 'sorted', 0) def test_with(Script): # jedi-vim #9 sigs = Script("with open(").call_signatures() assert sigs assert all(sig.name == 'open' for sig in sigs) def test_call_signatures_empty_parentheses_pre_space(Script): s = dedent("""\ def f(a, b): pass f( )""") assert_signature(Script, s, 'f', 0, line=3, column=3) def test_multiple_signatures(Script): s = dedent("""\ if x: def f(a, b): pass else: def f(a, b): pass f(""") assert len(Script(s).call_signatures()) == 2 def test_call_signatures_whitespace(Script): s = dedent("""\ abs( def x(): pass """) assert_signature(Script, s, 'abs', 0, line=1, column=5) def test_decorator_in_class(Script): """ There's still an implicit param, with a decorator. Github issue #319. """ s = dedent("""\ def static(func): def wrapped(obj, *args): return f(type(obj), *args) return wrapped class C(object): @static def test(cls): return 10 C().test(""") signatures = Script(s).call_signatures() assert len(signatures) == 1 x = [p.description for p in signatures[0].params] assert x == ['param *args'] def test_additional_brackets(Script): assert_signature(Script, 'abs((', 'abs', 0) def test_unterminated_strings(Script): assert_signature(Script, 'abs(";', 'abs', 0) def test_whitespace_before_bracket(Script): assert_signature(Script, 'abs (', 'abs', 0) assert_signature(Script, 'abs (";', 'abs', 0) assert_signature(Script, 'abs\n(', None) def test_brackets_in_string_literals(Script): assert_signature(Script, 'abs (" (', 'abs', 0) assert_signature(Script, 'abs (" )', 'abs', 0) def test_function_definitions_should_break(Script): """ Function definitions (and other tokens that cannot exist within call signatures) should break and not be able to return a call signature. """ assert_signature(Script, 'abs(\ndef x', 'abs', 0) assert not Script('abs(\ndef x(): pass').call_signatures() def test_flow_call(Script): assert not Script('if (1').call_signatures() def test_chained_calls(Script): source = dedent(''' class B(): def test2(self, arg): pass class A(): def test1(self): return B() A().test1().test2(''') assert_signature(Script, source, 'test2', 0) def test_return(Script): source = dedent(''' def foo(): return '.'.join()''') assert_signature(Script, source, 'join', 0, column=len(" return '.'.join(")) def test_call_signature_on_module(Script): """github issue #240""" s = 'import datetime; datetime(' # just don't throw an exception (if numpy doesn't exist, just ignore it) assert Script(s).call_signatures() == [] def test_complex(Script, environment): s = """ def abc(a,b): pass def a(self): abc( if 1: pass """ assert_signature(Script, s, 'abc', 0, line=6, column=20) s = """ import re def huhu(it): re.compile( return it * 2 """ sig1, sig2 = sorted(Script(s, line=4, column=27).call_signatures(), key=lambda s: s.line) assert sig1.name == sig2.name == 'compile' assert sig1.index == sig2.index == 0 func1, = sig1._name.infer() func2, = sig2._name.infer() if environment.version_info.major == 3: # Do these checks just for Python 3, I'm too lazy to deal with this # legacy stuff. ~ dave. assert get_call_signature(func1.tree_node) \ == 'compile(pattern: AnyStr, flags: _FlagsType = ...) -> Pattern[AnyStr]' assert get_call_signature(func2.tree_node) \ == 'compile(pattern: Pattern[AnyStr], flags: _FlagsType = ...) ->\nPattern[AnyStr]' # jedi-vim #70 s = """def foo(""" assert Script(s).call_signatures() == [] # jedi-vim #116 s = """import itertools; test = getattr(itertools, 'chain'); test(""" assert_signature(Script, s, 'chain', 0) def _params(Script, source, line=None, column=None): signatures = Script(source, line, column).call_signatures() assert len(signatures) == 1 return signatures[0].params def test_int_params(Script): sig1, sig2 = Script('int(').call_signatures() # int is defined as: `int(x[, base])` assert len(sig1.params) == 1 assert sig1.params[0].name == 'x' assert len(sig2.params) == 2 assert sig2.params[0].name == 'x' assert sig2.params[1].name == 'base' def test_pow_params(Script): # See Github #1357. for sig in Script('pow(').call_signatures(): param_names = [p.name for p in sig.params] assert param_names in (['x', 'y'], ['x', 'y', 'z']) def test_param_name(Script): sigs = Script('open(something,').call_signatures() for sig in sigs: # All of the signatures (in Python the function is overloaded), # contain the same param names. assert sig.params[0].name in ['file', 'name'] assert sig.params[1].name == 'mode' assert sig.params[2].name == 'buffering' def test_builtins(Script): """ The self keyword should be visible even for builtins, if not instantiated. """ p = _params(Script, 'str.endswith(') assert p[0].name == 'self' assert p[1].name == 'suffix' p = _params(Script, 'str().endswith(') assert p[0].name == 'suffix' def test_signature_is_definition(Script): """ Through inheritance, a call signature is a sub class of Definition. Check if the attributes match. """ s = """class Spam(): pass\nSpam""" signature = Script(s + '(').call_signatures()[0] definition = Script(s + '(', column=0).goto_definitions()[0] signature.line == 1 signature.column == 6 # Now compare all the attributes that a CallSignature must also have. for attr_name in dir(definition): dont_scan = ['defined_names', 'parent', 'goto_assignments', 'infer', 'params', 'get_signatures', 'execute'] if attr_name.startswith('_') or attr_name in dont_scan: continue attribute = getattr(definition, attr_name) signature_attribute = getattr(signature, attr_name) if inspect.ismethod(attribute): assert attribute() == signature_attribute() else: assert attribute == signature_attribute def test_no_signature(Script): # str doesn't have a __call__ method assert Script('str()(').call_signatures() == [] s = dedent("""\ class X(): pass X()(""") assert Script(s).call_signatures() == [] assert len(Script(s, column=2).call_signatures()) == 1 assert Script('').call_signatures() == [] def test_dict_literal_in_incomplete_call(Script): source = """\ import json def foo(): json.loads( json.load.return_value = {'foo': [], 'bar': True} c = Foo() """ script = Script(dedent(source), line=4, column=15) assert script.call_signatures() def test_completion_interference(Script): """Seems to cause problems, see also #396.""" cache.parser_cache.pop(None, None) assert Script('open(').call_signatures() # complete something usual, before doing the same call_signatures again. assert Script('from datetime import ').completions() assert Script('open(').call_signatures() def test_keyword_argument_index(Script, environment): def get(source, column=None): return Script(source, column=column).call_signatures()[0] # The signature of sorted changed from 2 to 3. py2_offset = int(environment.version_info.major == 2) assert get('sorted([], key=a').index == 1 + py2_offset assert get('sorted([], key=').index == 1 + py2_offset assert get('sorted([], no_key=a').index is None kw_func = 'def foo(a, b): pass\nfoo(b=3, a=4)' assert get(kw_func, column=len('foo(b')).index == 0 assert get(kw_func, column=len('foo(b=')).index == 1 assert get(kw_func, column=len('foo(b=3, a=')).index == 0 kw_func_simple = 'def foo(a, b): pass\nfoo(b=4)' assert get(kw_func_simple, column=len('foo(b')).index == 0 assert get(kw_func_simple, column=len('foo(b=')).index == 1 args_func = 'def foo(*kwargs): pass\n' assert get(args_func + 'foo(a').index == 0 assert get(args_func + 'foo(a, b').index == 0 kwargs_func = 'def foo(**kwargs): pass\n' assert get(kwargs_func + 'foo(a=2').index == 0 assert get(kwargs_func + 'foo(a=2, b=2').index == 0 both = 'def foo(*args, **kwargs): pass\n' assert get(both + 'foo(a=2').index == 1 assert get(both + 'foo(a=2, b=2').index == 1 assert get(both + 'foo(a=2, b=2)', column=len('foo(b=2, a=2')).index == 1 assert get(both + 'foo(a, b, c').index == 0 code1 = 'def f(u, /, v=3, *, abc, abd, xyz): pass' code2 = 'def g(u, /, v=3, *, abc, abd, xyz, **kwargs): pass' code3 = 'def h(u, /, v, *args, x=1, y): pass' code4 = 'def i(u, /, v, *args, x=1, y, **kwargs): pass' _calls = [ # No *args, **kwargs (code1, 'f(', 0), (code1, 'f(a', 0), (code1, 'f(a,', 1), (code1, 'f(a,b', 1), (code1, 'f(a,b,', 2), (code1, 'f(a,b,c', None), (code1, 'f(a,b,a', 2), (code1, 'f(a,b,a=', None), (code1, 'f(a,b,abc', 2), (code1, 'f(a,b,abc=(', 2), (code1, 'f(a,b,abc=(f,1,2,3', 2), (code1, 'f(a,b,abd', 3), (code1, 'f(a,b,x', 4), (code1, 'f(a,b,xy', 4), (code1, 'f(a,b,xyz=', 4), (code1, 'f(a,b,xy=', None), (code1, 'f(u=', (0, None)), (code1, 'f(v=', 1), # **kwargs (code2, 'g(a,b,a', 2), (code2, 'g(a,b,abc', 2), (code2, 'g(a,b,abd', 3), (code2, 'g(a,b,arr', 5), (code2, 'g(a,b,xy', 4), (code2, 'g(a,b,xyz=', 4), (code2, 'g(a,b,xy=', 5), (code2, 'g(a,b,abc=1,abd=4,', 4), (code2, 'g(a,b,abc=1,xyz=3,abd=4,', 5), (code2, 'g(a,b,abc=1,abd=4,lala', 5), (code2, 'g(a,b,abc=1,abd=4,lala=', 5), (code2, 'g(a,b,abc=1,abd=4,abd=', 5), (code2, 'g(a,b,kw', 5), (code2, 'g(a,b,kwargs=', 5), (code2, 'g(u=', (0, 5)), (code2, 'g(v=', 1), # *args (code3, 'h(a,b,c', 2), (code3, 'h(a,b,c,', 2), (code3, 'h(a,b,c,d', 2), (code3, 'h(a,b,c,d[', 2), (code3, 'h(a,b,c,(3,', 2), (code3, 'h(a,b,c,(3,)', 2), (code3, 'h(a,b,args=', None), (code3, 'h(u,v=', 1), (code3, 'h(u=', (0, None)), (code3, 'h(u,*xxx', 1), (code3, 'h(u,*xxx,*yyy', 1), (code3, 'h(u,*[]', 1), (code3, 'h(u,*', 1), (code3, 'h(u,*, *', 1), (code3, 'h(u,1,**', 3), (code3, 'h(u,**y', 1), (code3, 'h(u,x=2,**', 1), (code3, 'h(u,x=2,**y', 1), (code3, 'h(u,v=2,**y', 3), (code3, 'h(u,x=2,**vv', 1), # *args, **kwargs (code4, 'i(a,b,c,d', 2), (code4, 'i(a,b,c,d,e', 2), (code4, 'i(a,b,c,d,e=', 5), (code4, 'i(a,b,c,d,e=3', 5), (code4, 'i(a,b,c,d=,x=', 3), (code4, 'i(a,b,c,d=5,x=4', 3), (code4, 'i(a,b,c,d=5,x=4,y', 4), (code4, 'i(a,b,c,d=5,x=4,y=3,', 5), (code4, 'i(a,b,c,d=5,y=4,x=3,', 5), (code4, 'i(a,b,c,d=4,', 3), (code4, 'i(a,b,c,x=1,d=,', 4), # Error nodes (code4, 'i(1, [a,b', 1), (code4, 'i(1, [a,b=,', 2), (code4, 'i(1, [a?b,', 2), (code4, 'i(1, [a?b,*', 2), (code4, 'i(?b,*r,c', 1), (code4, 'i(?*', 0), (code4, 'i(?**', (0, 1)), # Random (code4, 'i(()', 0), (code4, 'i((),', 1), (code4, 'i([(),', 0), (code4, 'i([(,', 1), (code4, 'i(x,()', 1), ] @pytest.mark.parametrize('ending', ['', ')']) @pytest.mark.parametrize('code, call, expected_index', _calls) def test_signature_index(skip_python2, Script, environment, code, call, expected_index, ending): if isinstance(expected_index, tuple): expected_index = expected_index[environment.version_info > (3, 8)] if environment.version_info < (3, 8): code = code.replace('/,', '') sig, = Script(code + '\n' + call + ending, column=len(call)).call_signatures() index = sig.index assert expected_index == index @pytest.mark.skipif(sys.version_info[0] == 2, reason="Python 2 doesn't support __signature__") @pytest.mark.parametrize('code', ['foo', 'instance.foo']) def test_arg_defaults(Script, environment, code): def foo(arg="bla", arg1=1): pass class Klass: def foo(self, arg="bla", arg1=1): pass instance = Klass() src = dedent(""" def foo2(arg="bla", arg1=1): pass class Klass2: def foo2(self, arg="bla", arg1=1): pass instance = Klass2() """) executed_locals = dict() exec(src, None, executed_locals) locals_ = locals() def iter_scripts(): yield Interpreter(code + '(', namespaces=[locals_]) yield Script(src + code + "2(") yield Interpreter(code + '2(', namespaces=[executed_locals]) for script in iter_scripts(): signatures = script.call_signatures() assert signatures[0].params[0].description in ('param arg="bla"', "param arg='bla'") assert signatures[0].params[1].description == 'param arg1=1' def test_bracket_start(Script): def bracket_start(src): signatures = Script(src).call_signatures() assert len(signatures) == 1 return signatures[0].bracket_start assert bracket_start('abs(') == (1, 3) def test_different_caller(Script): """ It's possible to not use names, but another function result or an array index and then get the call signature of it. """ assert_signature(Script, '[abs][0](', 'abs', 0) assert_signature(Script, '[abs][0]()', 'abs', 0, column=len('[abs][0](')) assert_signature(Script, '(abs)(', 'abs', 0) assert_signature(Script, '(abs)()', 'abs', 0, column=len('(abs)(')) def test_in_function(Script): code = dedent('''\ class X(): @property def func(''') assert not Script(code).call_signatures() def test_lambda_params(Script): code = dedent('''\ my_lambda = lambda x: x+1 my_lambda(1)''') sig, = Script(code, column=11).call_signatures() assert sig.index == 0 assert sig.name == '' assert [p.name for p in sig.params] == ['x'] CLASS_CODE = dedent('''\ class X(): def __init__(self, foo, bar): self.foo = foo ''') def test_class_creation(Script): sig, = Script(CLASS_CODE + 'X(').call_signatures() assert sig.index == 0 assert sig.name == 'X' assert [p.name for p in sig.params] == ['foo', 'bar'] def test_call_init_on_class(Script): sig, = Script(CLASS_CODE + 'X.__init__(').call_signatures() assert [p.name for p in sig.params] == ['self', 'foo', 'bar'] def test_call_init_on_instance(Script): sig, = Script(CLASS_CODE + 'X().__init__(').call_signatures() assert [p.name for p in sig.params] == ['foo', 'bar'] def test_call_magic_method(Script): code = dedent('''\ class X(): def __call__(self, baz): pass ''') sig, = Script(code + 'X()(').call_signatures() assert sig.index == 0 assert sig.name == 'X' assert [p.name for p in sig.params] == ['baz'] sig, = Script(code + 'X.__call__(').call_signatures() assert [p.name for p in sig.params] == ['self', 'baz'] sig, = Script(code + 'X().__call__(').call_signatures() assert [p.name for p in sig.params] == ['baz'] @pytest.mark.parametrize('column', [6, 9]) def test_cursor_after_signature(Script, column): source = dedent(""" def foo(*args): pass foo() # _ """) script = Script(source, 4, column) assert not script.call_signatures() @pytest.mark.parametrize( 'code, line, column, name, index', [ ('abs(()\ndef foo(): pass', 1, None, 'abs', 0), ('abs(chr() \ndef foo(): pass', 1, 10, 'abs', 0), ('abs(chr()\ndef foo(): pass', 1, None, 'abs', 0), ('abs(chr()\ndef foo(): pass', 1, 8, 'chr', 0), ('abs(chr()\ndef foo(): pass', 1, 7, 'abs', 0), ('abs(chr ( \nclass y: pass', 1, None, 'chr', 0), ('abs(chr ( \nclass y: pass', 1, 8, 'abs', 0), ('abs(chr ( \nclass y: pass', 1, 9, 'abs', 0), ('abs(chr ( \nclass y: pass', 1, 10, 'chr', 0), ] ) def test_base_signatures(Script, code, line, column, name, index): sig, = Script(code, line=line, column=column).call_signatures() assert sig.name == name assert sig.index == index jedi-0.15.2/test/test_api/test_keyword.py0000664000175000017500000000340613577124112020266 0ustar davedave00000000000000""" Test of keywords and ``jedi.keywords`` """ import pytest def test_goto_assignments_keyword(Script): """ Bug: goto assignments on ``in`` used to raise AttributeError:: 'unicode' object has no attribute 'generate_call_path' """ Script('in').goto_assignments() def test_keyword(Script, environment): """ github jedi-vim issue #44 """ defs = Script("print").goto_definitions() if environment.version_info.major < 3: assert defs == [] else: assert [d.docstring() for d in defs] assert Script("import").goto_assignments() == [] completions = Script("import", 1, 1).completions() assert len(completions) > 10 and 'if' in [c.name for c in completions] assert Script("assert").goto_definitions() == [] def test_keyword_attributes(Script): def_, = Script('def').completions() assert def_.name == 'def' assert def_.complete == '' assert def_.is_keyword is True assert def_.is_stub() is False assert def_.goto_assignments(only_stubs=True) == [] assert def_.goto_assignments() == [] assert def_.infer() == [] assert def_.parent() is None assert def_.docstring() assert def_.description == 'keyword def' assert def_.get_line_code() == '' assert def_.full_name is None assert def_.line is def_.column is None assert def_.in_builtin_module() is True assert def_.module_name in ('builtins', '__builtin__') assert 'typeshed' in def_.module_path assert def_.type == 'keyword' def test_none_keyword(Script, environment): if environment.version_info.major == 2: # Just don't care about Python 2 anymore, it's almost gone. pytest.skip() none, = Script('None').completions() assert not none.docstring() assert none.name == 'None' jedi-0.15.2/test/test_api/test_environment.py0000664000175000017500000001222413577124112021144 0ustar davedave00000000000000import os import sys import pytest import jedi from jedi._compatibility import py_version from jedi.api.environment import get_default_environment, find_virtualenvs, \ InvalidPythonEnvironment, find_system_environments, \ get_system_environment, create_environment, InterpreterEnvironment, \ get_cached_default_environment def test_sys_path(): assert get_default_environment().get_sys_path() def test_find_system_environments(): envs = list(find_system_environments()) assert len(envs) for env in envs: assert env.version_info assert env.get_sys_path() parser_version = env.get_grammar().version_info assert parser_version[:2] == env.version_info[:2] @pytest.mark.parametrize( 'version', ['2.7', '3.3', '3.4', '3.5', '3.6', '3.7'] ) def test_versions(version): try: env = get_system_environment(version) except InvalidPythonEnvironment: if int(version.replace('.', '')) == py_version: # At least the current version has to work raise pytest.skip() assert version == str(env.version_info[0]) + '.' + str(env.version_info[1]) assert env.get_sys_path() def test_load_module(inference_state): access_path = inference_state.compiled_subprocess.load_module( dotted_name=u'math', sys_path=inference_state.get_sys_path() ) name, access_handle = access_path.accesses[0] assert access_handle.py__bool__() is True assert access_handle.get_api_type() == 'module' with pytest.raises(AttributeError): access_handle.py__mro__() def test_error_in_environment(inference_state, Script, environment): if isinstance(environment, InterpreterEnvironment): pytest.skip("We don't catch these errors at the moment.") # Provoke an error to show how Jedi can recover from it. with pytest.raises(jedi.InternalError): inference_state.compiled_subprocess._test_raise_error(KeyboardInterrupt) # The second time it should raise an InternalError again. with pytest.raises(jedi.InternalError): inference_state.compiled_subprocess._test_raise_error(KeyboardInterrupt) # Jedi should still work. def_, = Script('str').goto_definitions() assert def_.name == 'str' def test_stdout_in_subprocess(inference_state, Script): inference_state.compiled_subprocess._test_print(stdout='.') Script('1').goto_definitions() def test_killed_subprocess(inference_state, Script, environment): if isinstance(environment, InterpreterEnvironment): pytest.skip("We cannot kill our own process") # Just kill the subprocess. inference_state.compiled_subprocess._compiled_subprocess._get_process().kill() # Since the process was terminated (and nobody knows about it) the first # Jedi call fails. with pytest.raises(jedi.InternalError): Script('str').goto_definitions() def_, = Script('str').goto_definitions() # Jedi should now work again. assert def_.name == 'str' def test_not_existing_virtualenv(monkeypatch): """Should not match the path that was given""" path = '/foo/bar/jedi_baz' monkeypatch.setenv('VIRTUAL_ENV', path) assert get_default_environment().executable != path def test_working_venv(venv_path, monkeypatch): monkeypatch.setenv('VIRTUAL_ENV', venv_path) assert get_default_environment().path == venv_path def test_scanning_venvs(venv_path): parent_dir = os.path.dirname(venv_path) assert any(venv.path == venv_path for venv in find_virtualenvs([parent_dir])) def test_create_environment_venv_path(venv_path): environment = create_environment(venv_path) assert environment.path == venv_path def test_create_environment_executable(): environment = create_environment(sys.executable) assert environment.executable == sys.executable def test_get_default_environment_from_env_does_not_use_safe(tmpdir, monkeypatch): fake_python = os.path.join(str(tmpdir), 'fake_python') with open(fake_python, 'w') as f: f.write('') def _get_subprocess(self): if self._start_executable != fake_python: raise RuntimeError('Should not get called!') self.executable = fake_python self.path = 'fake' monkeypatch.setattr('jedi.api.environment.Environment._get_subprocess', _get_subprocess) monkeypatch.setenv('VIRTUAL_ENV', fake_python) env = get_default_environment() assert env.path == 'fake' @pytest.mark.parametrize('virtualenv', ['', 'fufuuuuu', sys.prefix]) def test_get_default_environment_when_embedded(monkeypatch, virtualenv): # When using Python embedded, sometimes the executable is not a Python # executable. executable_name = 'RANDOM_EXE' monkeypatch.setattr(sys, 'executable', executable_name) monkeypatch.setenv('VIRTUAL_ENV', virtualenv) env = get_default_environment() assert env.executable != executable_name def test_changing_venv(venv_path, monkeypatch): monkeypatch.setitem(os.environ, 'VIRTUAL_ENV', venv_path) get_cached_default_environment() monkeypatch.setitem(os.environ, 'VIRTUAL_ENV', sys.executable) assert get_cached_default_environment().executable == sys.executable jedi-0.15.2/test/test_api/test_full_name.py0000664000175000017500000000627313577124112020551 0ustar davedave00000000000000""" Tests for :attr:`.BaseDefinition.full_name`. There are three kinds of test: #. Test classes derived from :class:`MixinTestFullName`. Child class defines :attr:`.operation` to alter how the api definition instance is created. #. :class:`TestFullDefinedName` is to test combination of ``obj.full_name`` and ``jedi.defined_names``. #. Misc single-function tests. """ import textwrap import pytest import jedi from ..helpers import TestCase class MixinTestFullName(object): operation = None @pytest.fixture(autouse=True) def init(self, Script, environment): self.Script = Script self.environment = environment def check(self, source, desired): script = self.Script(textwrap.dedent(source)) definitions = getattr(script, type(self).operation)() for d in definitions: self.assertEqual(d.full_name, desired) def test_os_path_join(self): self.check('import os; os.path.join', 'os.path.join') def test_builtin(self): self.check('TypeError', 'builtins.TypeError') class TestFullNameWithGotoDefinitions(MixinTestFullName, TestCase): operation = 'goto_definitions' def test_tuple_mapping(self): if self.environment.version_info.major == 2: pytest.skip('Python 2 also yields None.') self.check(""" import re any_re = re.compile('.*') any_re""", 'typing.Pattern') def test_from_import(self): self.check('from os import path', 'os.path') class TestFullNameWithCompletions(MixinTestFullName, TestCase): operation = 'completions' class TestFullDefinedName(TestCase): """ Test combination of ``obj.full_name`` and ``jedi.defined_names``. """ @pytest.fixture(autouse=True) def init(self, environment): self.environment = environment def check(self, source, desired): definitions = jedi.names(textwrap.dedent(source), environment=self.environment) full_names = [d.full_name for d in definitions] self.assertEqual(full_names, desired) def test_local_names(self): self.check(""" def f(): pass class C: pass """, ['__main__.f', '__main__.C']) def test_imports(self): self.check(""" import os from os import path from os.path import join from os import path as opath """, ['os', 'os.path', 'os.path.join', 'os.path']) def test_sub_module(Script, jedi_path): """ ``full_name needs to check sys.path to actually find it's real path module path. """ sys_path = [jedi_path] defs = Script('from jedi.api import classes; classes', sys_path=sys_path).goto_definitions() assert [d.full_name for d in defs] == ['jedi.api.classes'] defs = Script('import jedi.api; jedi.api', sys_path=sys_path).goto_definitions() assert [d.full_name for d in defs] == ['jedi.api'] def test_os_path(Script): d, = Script('from os.path import join').completions() assert d.full_name == 'os.path.join' d, = Script('import os.p').completions() assert d.full_name == 'os.path' def test_os_issues(Script): """Issue #873""" assert [c.name for c in Script('import os\nos.nt''').completions()] == ['nt'] jedi-0.15.2/test/test_api/test_classes.py0000664000175000017500000003406313577124112020242 0ustar davedave00000000000000""" Test all things related to the ``jedi.api_classes`` module. """ from textwrap import dedent from inspect import cleandoc import os import pytest import jedi from jedi import __doc__ as jedi_doc from jedi.inference.compiled import CompiledValueName from ..helpers import get_example_dir def test_is_keyword(Script): results = Script('str', 1, 1, None).goto_definitions() assert len(results) == 1 and results[0].is_keyword is False def test_basedefinition_type(Script, names): def make_definitions(): """ Return a list of definitions for parametrized tests. :rtype: [jedi.api_classes.BaseDefinition] """ source = dedent(""" import sys class C: pass x = C() def f(): pass def g(): yield h = lambda: None """) definitions = [] definitions += names(source) source += dedent(""" variable = sys or C or x or f or g or g() or h""") lines = source.splitlines() script = Script(source, len(lines), len('variable'), None) definitions += script.goto_definitions() script2 = Script(source, 4, len('class C'), None) definitions += script2.usages() source_param = "def f(a): return a" script_param = Script(source_param, 1, len(source_param), None) definitions += script_param.goto_assignments() return definitions for definition in make_definitions(): assert definition.type in ('module', 'class', 'instance', 'function', 'generator', 'statement', 'import', 'param') @pytest.mark.parametrize( ('src', 'expected_result', 'column'), [ # import one level ('import t', 'module', None), ('import ', 'module', None), ('import datetime; datetime', 'module', None), # from ('from datetime import timedelta', 'class', None), ('from datetime import timedelta; timedelta', 'class', None), ('from json import tool', 'module', None), ('from json import tool; tool', 'module', None), # import two levels ('import json.tool; json', 'module', None), ('import json.tool; json.tool', 'module', None), ('import json.tool; json.tool.main', 'function', None), ('import json.tool', 'module', None), ('import json.tool', 'module', 9), ] ) def test_basedefinition_type_import(Script, src, expected_result, column): types = {t.type for t in Script(src, column=column).completions()} assert types == {expected_result} def test_function_call_signature_in_doc(Script): defs = Script(""" def f(x, y=1, z='a'): pass f""").goto_definitions() doc = defs[0].docstring() assert "f(x, y=1, z='a')" in str(doc) def test_param_docstring(names): param = names("def test(parameter): pass", all_scopes=True)[1] assert param.name == 'parameter' assert param.docstring() == '' def test_class_call_signature(Script): defs = Script(""" class Foo: def __init__(self, x, y=1, z='a'): pass Foo""").goto_definitions() doc = defs[0].docstring() assert doc == "Foo(x, y=1, z='a')" def test_position_none_if_builtin(Script): gotos = Script('import sys; sys.path').goto_assignments() assert gotos[0].in_builtin_module() assert gotos[0].line is not None assert gotos[0].column is not None def test_completion_docstring(Script, jedi_path): """ Jedi should follow imports in certain conditions """ def docstr(src, result): c = Script(src, sys_path=[jedi_path]).completions()[0] assert c.docstring(raw=True, fast=False) == cleandoc(result) c = Script('import jedi\njed', sys_path=[jedi_path]).completions()[0] assert c.docstring(fast=False) == cleandoc(jedi_doc) docstr('import jedi\njedi.Scr', cleandoc(jedi.Script.__doc__)) docstr('abcd=3;abcd', '') docstr('"hello"\nabcd=3\nabcd', '') docstr( dedent(''' def x(): "hello" 0 x'''), 'hello' ) docstr( dedent(''' def x(): "hello";0 x'''), 'hello' ) # Shouldn't work with a tuple. docstr( dedent(''' def x(): "hello",0 x'''), '' ) # Should also not work if we rename something. docstr( dedent(''' def x(): "hello" y = x y'''), '' ) def test_completion_params(Script): c = Script('import string; string.capwords').completions()[0] assert [p.name for p in c.params] == ['s', 'sep'] def test_functions_should_have_params(Script): for c in Script('bool.').completions(): if c.type == 'function': assert isinstance(c.params, list) def test_hashlib_params(Script, environment): if environment.version_info < (3,): pytest.skip() script = Script(source='from hashlib import sha256') c, = script.completions() assert [p.name for p in c.params] == ['arg'] def test_signature_params(Script): def check(defs): params = defs[0].params assert len(params) == 1 assert params[0].name == 'bar' s = dedent(''' def foo(bar): pass foo''') check(Script(s).goto_definitions()) check(Script(s).goto_assignments()) check(Script(s + '\nbar=foo\nbar').goto_assignments()) def test_param_endings(Script): """ Params should be represented without the comma and whitespace they have around them. """ sig = Script('def x(a, b=5, c=""): pass\n x(').call_signatures()[0] assert [p.description for p in sig.params] == ['param a', 'param b=5', 'param c=""'] @pytest.mark.parametrize( 'code, index, name, is_definition', [ ('name', 0, 'name', False), ('a = f(x)', 0, 'a', True), ('a = f(x)', 1, 'f', False), ('a = f(x)', 2, 'x', False), ] ) def test_is_definition(names, code, index, name, is_definition): d = names( dedent(code), references=True, all_scopes=True, )[index] assert d.name == name assert d.is_definition() == is_definition @pytest.mark.parametrize( 'code, expected', ( ('import x as a', [False, True]), ('from x import y', [False, True]), ('from x.z import y', [False, False, True]), ) ) def test_is_definition_import(names, code, expected): ns = names(dedent(code), references=True, all_scopes=True) # Assure that names are definitely sorted. ns = sorted(ns, key=lambda name: (name.line, name.column)) assert [name.is_definition() for name in ns] == expected def test_parent(Script): def _parent(source, line=None, column=None): def_, = Script(dedent(source), line, column).goto_assignments() return def_.parent() parent = _parent('foo=1\nfoo') assert parent.type == 'module' parent = _parent(''' def spam(): if 1: y=1 y''') assert parent.name == 'spam' assert parent.parent().type == 'module' def test_parent_on_function(Script): code = 'def spam():\n pass' def_, = Script(code, line=1, column=len('def spam')).goto_assignments() parent = def_.parent() assert parent.name == '' assert parent.type == 'module' def test_parent_on_completion(Script): parent = Script(dedent('''\ class Foo(): def bar(): pass Foo().bar''')).completions()[0].parent() assert parent.name == 'Foo' assert parent.type == 'class' parent = Script('str.join').completions()[0].parent() assert parent.name == 'str' assert parent.type == 'class' def test_parent_on_comprehension(): ns = jedi.names('''\ def spam(): return [i for i in range(5)] ''', all_scopes=True) assert [name.name for name in ns] == ['spam', 'i'] assert ns[0].parent().name == '' assert ns[0].parent().type == 'module' assert ns[1].parent().name == 'spam' assert ns[1].parent().type == 'function' def test_type(Script): for c in Script('a = [str()]; a[0].').completions(): if c.name == '__class__' and False: # TODO fix. assert c.type == 'class' else: assert c.type in ('function', 'statement') for c in Script('list.').completions(): assert c.type # Github issue #397, type should never raise an error. for c in Script('import os; os.path.').completions(): assert c.type def test_type_II(Script): """ GitHub Issue #833, `keyword`s are seen as `module`s """ for c in Script('f').completions(): if c.name == 'for': assert c.type == 'keyword' """ This tests the BaseDefinition.goto_assignments function, not the jedi function. They are not really different in functionality, but really different as an implementation. """ def test_goto_assignment_repetition(names): defs = names('a = 1; a', references=True, definitions=False) # Repeat on the same variable. Shouldn't change once we're on a # definition. for _ in range(3): assert len(defs) == 1 ass = defs[0].goto_assignments() assert ass[0].description == 'a = 1' def test_goto_assignments_named_params(names): src = """\ def foo(a=1, bar=2): pass foo(bar=1) """ bar = names(dedent(src), references=True)[-1] param = bar.goto_assignments()[0] assert (param.line, param.column) == (1, 13) assert param.type == 'param' def test_class_call(names): src = 'from threading import Thread; Thread(group=1)' n = names(src, references=True)[-1] assert n.name == 'group' param_def = n.goto_assignments()[0] assert param_def.name == 'group' assert param_def.type == 'param' def test_parentheses(names): n = names('("").upper', references=True)[-1] assert n.goto_assignments()[0].name == 'upper' def test_import(names): nms = names('from json import load', references=True) assert nms[0].name == 'json' assert nms[0].type == 'module' n = nms[0].goto_assignments()[0] assert n.name == 'json' assert n.type == 'module' assert nms[1].name == 'load' assert nms[1].type == 'function' n = nms[1].goto_assignments()[0] assert n.name == 'load' assert n.type == 'function' nms = names('import os; os.path', references=True) assert nms[0].name == 'os' assert nms[0].type == 'module' n = nms[0].goto_assignments()[0] assert n.name == 'os' assert n.type == 'module' n = nms[2].goto_assignments()[0] assert n.name == 'path' assert n.type == 'module' nms = names('import os.path', references=True) n = nms[0].goto_assignments()[0] assert n.name == 'os' assert n.type == 'module' n = nms[1].goto_assignments()[0] # This is very special, normally the name doesn't chance, but since # os.path is a sys.modules hack, it does. assert n.name in ('macpath', 'ntpath', 'posixpath', 'os2emxpath') assert n.type == 'module' def test_import_alias(names): nms = names('import json as foo', references=True) assert nms[0].name == 'json' assert nms[0].type == 'module' assert nms[0]._name.tree_name.parent.type == 'dotted_as_name' n = nms[0].goto_assignments()[0] assert n.name == 'json' assert n.type == 'module' assert n._name._value.tree_node.type == 'file_input' assert nms[1].name == 'foo' assert nms[1].type == 'module' assert nms[1]._name.tree_name.parent.type == 'dotted_as_name' ass = nms[1].goto_assignments() assert len(ass) == 1 assert ass[0].name == 'json' assert ass[0].type == 'module' assert ass[0]._name._value.tree_node.type == 'file_input' def test_added_equals_to_params(Script): def run(rest_source): source = dedent(""" def foo(bar, baz): pass """) results = Script(source + rest_source).completions() assert len(results) == 1 return results[0] assert run('foo(bar').name_with_symbols == 'bar=' assert run('foo(bar').complete == '=' assert run('foo(bar, baz').complete == '=' assert run(' bar').name_with_symbols == 'bar' assert run(' bar').complete == '' x = run('foo(bar=isins').name_with_symbols assert x == 'isinstance' def test_builtin_module_with_path(Script): """ This test simply tests if a module from /usr/lib/python3.8/lib-dynload/ has a path or not. It shouldn't have a module_path, because that is just confusing. """ semlock, = Script('from _multiprocessing import SemLock').goto_definitions() assert isinstance(semlock._name, CompiledValueName) assert semlock.module_path is None assert semlock.in_builtin_module() is True assert semlock.name == 'SemLock' assert semlock.line is None assert semlock.column is None @pytest.mark.parametrize( 'code, description', [ ('int', 'instance int'), ('str.index', 'instance int'), ('1', None), ] ) def test_execute(Script, code, description): definition, = Script(code).goto_assignments() definitions = definition.execute() if description is None: assert not definitions else: d, = definitions assert d.description == description @pytest.mark.parametrize('goto_assignment', [False, True, None]) @pytest.mark.parametrize( 'code, name, file_name', [ ('from pkg import Foo; Foo.foo', 'foo', '__init__.py'), ('from pkg import Foo; Foo().foo', 'foo', '__init__.py'), ('from pkg import Foo; Foo.bar', 'bar', 'module.py'), ('from pkg import Foo; Foo().bar', 'bar', 'module.py'), ]) def test_inheritance_module_path(Script, goto_assignment, code, name, file_name): base_path = os.path.join(get_example_dir('inheritance'), 'pkg') whatever_path = os.path.join(base_path, 'NOT_EXISTING.py') script = Script(code, path=whatever_path) if goto_assignment is None: func, = script.goto_definitions() else: func, = script.goto_assignments(follow_imports=goto_assignment) assert func.type == 'function' assert func.name == name assert func.module_path == os.path.join(base_path, file_name) jedi-0.15.2/test/test_api/test_analysis.py0000664000175000017500000000051013577124112020416 0ustar davedave00000000000000""" Test of keywords and ``jedi.keywords`` """ def test_issue436(Script): code = "bar = 0\nbar += 'foo' + 4" errors = set(repr(e) for e in Script(code)._analysis()) assert len(errors) == 2 assert '' in errors assert '' in errors jedi-0.15.2/test/test_api/test_signatures.py0000664000175000017500000000564313577124112020773 0ustar davedave00000000000000import sys import pytest _tuple_code = 'from typing import Tuple\ndef f(x: Tuple[int]): ...\nf' @pytest.mark.parametrize( 'code, expected_params, execute_annotation', [ ('def f(x: 1, y): ...\nf', [None, None], True), ('def f(x: 1, y): ...\nf', ['instance int', None], False), ('def f(x: int): ...\nf', ['instance int'], True), ('from typing import List\ndef f(x: List[int]): ...\nf', ['instance list'], True), ('from typing import List\ndef f(x: List[int]): ...\nf', ['class list'], False), (_tuple_code, ['instance tuple'], True), (_tuple_code, ['Tuple: _SpecialForm = ...'], False), ('x=str\ndef f(p: x): ...\nx=int\nf', ['instance int'], True), ('def f(*args, **kwargs): ...\nf', [None, None], False), ('def f(*args: int, **kwargs: str): ...\nf', ['class int', 'class str'], False), ] ) def test_param_annotation(Script, code, expected_params, execute_annotation, skip_python2): func, = Script(code).goto_assignments() sig, = func.get_signatures() for p, expected in zip(sig.params, expected_params): annotations = p.infer_annotation(execute_annotation=execute_annotation) if expected is None: assert not annotations else: annotation, = annotations assert annotation.description == expected @pytest.mark.parametrize( 'code, expected_params', [ ('def f(x=1, y=int, z): pass\nf', ['instance int', 'class int', None]), ('def f(*args, **kwargs): pass\nf', [None, None]), ('x=1\ndef f(p=x): pass\nx=""\nf', ['instance int']), ] ) def test_param_default(Script, code, expected_params): func, = Script(code).goto_assignments() sig, = func.get_signatures() for p, expected in zip(sig.params, expected_params): annotations = p.infer_default() if expected is None: assert not annotations else: annotation, = annotations assert annotation.description == expected @pytest.mark.skipif(sys.version_info < (3, 5), reason="Python <3.5 doesn't support __signature__") @pytest.mark.parametrize( 'code, index, param_code, kind', [ ('def f(x=1): pass\nf', 0, 'x=1', 'POSITIONAL_OR_KEYWORD'), ('def f(*args:int): pass\nf', 0, '*args: int', 'VAR_POSITIONAL'), ('def f(**kwargs: List[x]): pass\nf', 0, '**kwargs: List[x]', 'VAR_KEYWORD'), ('def f(*, x:int=5): pass\nf', 0, 'x: int=5', 'KEYWORD_ONLY'), ('def f(*args, x): pass\nf', 1, 'x', 'KEYWORD_ONLY'), ] ) def test_param_kind_and_name(code, index, param_code, kind, Script, skip_python2): func, = Script(code).goto_assignments() sig, = func.get_signatures() param = sig.params[index] assert param.to_string() == param_code assert param.kind.name == kind def test_staticmethod(Script): s, = Script('staticmethod(').call_signatures() assert s.to_string() == 'staticmethod(f: Callable[..., Any])' jedi-0.15.2/test/test_api/test_project.py0000664000175000017500000000124513577124112020247 0ustar davedave00000000000000import os from ..helpers import get_example_dir, set_cwd, root_dir from jedi import Interpreter def test_django_default_project(Script): dir = get_example_dir('django') script = Script( "from app import models\nmodels.SomeMo", path=os.path.join(dir, 'models/x.py') ) c, = script.completions() assert c.name == "SomeModel" assert script._inference_state.project._django is True def test_interpreter_project_path(): # Run from anywhere it should be the cwd. dir = os.path.join(root_dir, 'test') with set_cwd(dir): project = Interpreter('', [locals()])._inference_state.project assert project._path == dir jedi-0.15.2/test/test_api/test_unicode.py0000664000175000017500000000510713577124112020230 0ustar davedave00000000000000# -*- coding: utf-8 -*- """ All character set and unicode related tests. """ from jedi._compatibility import u, unicode def test_unicode_script(Script): """ normally no unicode objects are being used. (<=2.7) """ s = unicode("import datetime; datetime.timedelta") completions = Script(s).completions() assert len(completions) assert type(completions[0].description) is unicode s = u("author='öä'; author") completions = Script(s).completions() x = completions[0].description assert type(x) is unicode s = u("#-*- coding: iso-8859-1 -*-\nauthor='öä'; author") s = s.encode('latin-1') completions = Script(s).completions() assert type(completions[0].description) is unicode def test_unicode_attribute(Script): """ github jedi-vim issue #94 """ s1 = u('#-*- coding: utf-8 -*-\nclass Person():\n' ' name = "e"\n\nPerson().name.') completions1 = Script(s1).completions() assert 'strip' in [c.name for c in completions1] s2 = u('#-*- coding: utf-8 -*-\nclass Person():\n' ' name = "é"\n\nPerson().name.') completions2 = Script(s2).completions() assert 'strip' in [c.name for c in completions2] def test_multibyte_script(Script): """ `jedi.Script` must accept multi-byte string source. """ try: code = u("import datetime; datetime.d") comment = u("# multi-byte comment あいうえおä") s = (u('%s\n%s') % (code, comment)).encode('utf-8') except NameError: pass # python 3 has no unicode method else: assert len(Script(s, 1, len(code)).completions()) def test_goto_definition_at_zero(Script): """At zero usually sometimes raises unicode issues.""" assert Script("a", 1, 1).goto_definitions() == [] s = Script("str", 1, 1).goto_definitions() assert len(s) == 1 assert list(s)[0].description == 'class str' assert Script("", 1, 0).goto_definitions() == [] def test_complete_at_zero(Script): s = Script("str", 1, 3).completions() assert len(s) == 1 assert list(s)[0].name == 'str' s = Script("", 1, 0).completions() assert len(s) > 0 def test_wrong_encoding(Script, tmpdir): x = tmpdir.join('x.py') # Use both latin-1 and utf-8 (a really broken file). x.write_binary(u'foobar = 1\nä'.encode('latin-1') + u'ä'.encode('utf-8')) c, = Script('import x; x.foo', sys_path=[tmpdir.strpath]).completions() assert c.name == 'foobar' def test_encoding_parameter(Script): name = u('hö') s = Script(name.encode('latin-1'), encoding='latin-1') assert s._module_node.get_code() == name jedi-0.15.2/test/run.py0000775000175000017500000004257613577124112014555 0ustar davedave00000000000000#!/usr/bin/env python """ |jedi| is mostly being tested by what I would call "Blackbox Tests". These tests are just testing the interface and do input/output testing. This makes a lot of sense for |jedi|. Jedi supports so many different code structures, that it is just stupid to write 200'000 unittests in the manner of ``regression.py``. Also, it is impossible to do doctests/unittests on most of the internal data structures. That's why |jedi| uses mostly these kind of tests. There are different kind of tests: - completions / goto_definitions ``#?`` - goto_assignments: ``#!`` - usages: ``#<`` How to run tests? +++++++++++++++++ Jedi uses pytest_ to run unit and integration tests. To run tests, simply run ``pytest``. You can also use tox_ to run tests for multiple Python versions. .. _pytest: http://pytest.org .. _tox: http://testrun.org/tox Integration test cases are located in ``test/completion`` directory and each test case is indicated by either the comment ``#?`` (completions / definitions), ``#!`` (assignments), or ``#<`` (usages). There is also support for third party libraries. In a normal test run they are not being executed, you have to provide a ``--thirdparty`` option. In addition to standard `-k` and `-m` options in pytest, you can use the `-T` (`--test-files`) option to specify integration test cases to run. It takes the format of ``FILE_NAME[:LINE[,LINE[,...]]]`` where ``FILE_NAME`` is a file in ``test/completion`` and ``LINE`` is a line number of the test comment. Here is some recipes: Run tests only in ``basic.py`` and ``imports.py``:: pytest test/test_integration.py -T basic.py -T imports.py Run test at line 4, 6, and 8 in ``basic.py``:: pytest test/test_integration.py -T basic.py:4,6,8 See ``pytest --help`` for more information. If you want to debug a test, just use the ``--pdb`` option. Alternate Test Runner +++++++++++++++++++++ If you don't like the output of ``pytest``, there's an alternate test runner that you can start by running ``./run.py``. The above example could be run by:: ./run.py basic 4 6 8 50-80 The advantage of this runner is simplicity and more customized error reports. Using both runners will help you to have a quicker overview of what's happening. Auto-Completion +++++++++++++++ Uses comments to specify a test in the next line. The comment says which results are expected. The comment always begins with `#?`. The last row symbolizes the cursor. For example:: #? ['real'] a = 3; a.rea Because it follows ``a.rea`` and a is an ``int``, which has a ``real`` property. Goto Definitions ++++++++++++++++ Definition tests use the same symbols like completion tests. This is possible because the completion tests are defined with a list:: #? int() ab = 3; ab Goto Assignments ++++++++++++++++ Tests look like this:: abc = 1 #! ['abc=1'] abc Additionally it is possible to specify the column by adding a number, which describes the position of the test (otherwise it's just the end of line):: #! 2 ['abc=1'] abc Usages ++++++ Tests look like this:: abc = 1 #< abc@1,0 abc@3,0 abc """ import os import re import sys import operator from ast import literal_eval from io import StringIO from functools import reduce import parso import jedi from jedi import debug from jedi._compatibility import unicode, is_py3 from jedi.api.classes import Definition from jedi.api.completion import get_user_context from jedi import parser_utils from jedi.api.environment import get_default_environment, get_system_environment from jedi.inference.gradual.conversion import convert_values from jedi.inference.analysis import Warning TEST_COMPLETIONS = 0 TEST_DEFINITIONS = 1 TEST_ASSIGNMENTS = 2 TEST_USAGES = 3 grammar36 = parso.load_grammar(version='3.6') class BaseTestCase(object): def __init__(self, skip_version_info=None): self._skip_version_info = skip_version_info self._skip = None def set_skip(self, reason): self._skip = reason def get_skip_reason(self, environment): if self._skip is not None: return self._skip if self._skip_version_info is None: return comp_map = { '==': 'eq', '<=': 'le', '>=': 'ge', '<': 'lt', '>': 'gt', } min_version, operator_ = self._skip_version_info operation = getattr(operator, comp_map[operator_]) if not operation(environment.version_info[:2], min_version): return "Python version %s %s.%s" % ( operator_, min_version[0], min_version[1] ) class IntegrationTestCase(BaseTestCase): def __init__(self, test_type, correct, line_nr, column, start, line, path=None, skip_version_info=None): super(IntegrationTestCase, self).__init__(skip_version_info) self.test_type = test_type self.correct = correct self.line_nr = line_nr self.column = column self.start = start self.line = line self.path = path @property def module_name(self): return os.path.splitext(os.path.basename(self.path))[0] @property def line_nr_test(self): """The test is always defined on the line before.""" return self.line_nr - 1 def __repr__(self): return '<%s: %s:%s %r>' % (self.__class__.__name__, self.path, self.line_nr_test, self.line.rstrip()) def script(self, environment): return jedi.Script( self.source, self.line_nr, self.column, self.path, environment=environment ) def run(self, compare_cb, environment=None): testers = { TEST_COMPLETIONS: self.run_completion, TEST_DEFINITIONS: self.run_goto_definitions, TEST_ASSIGNMENTS: self.run_goto_assignments, TEST_USAGES: self.run_usages, } return testers[self.test_type](compare_cb, environment) def run_completion(self, compare_cb, environment): completions = self.script(environment).completions() #import cProfile; cProfile.run('script.completions()') comp_str = {c.name for c in completions} return compare_cb(self, comp_str, set(literal_eval(self.correct))) def run_goto_definitions(self, compare_cb, environment): script = self.script(environment) inference_state = script._inference_state def comparison(definition): suffix = '()' if definition.type == 'instance' else '' return definition.desc_with_module + suffix def definition(correct, correct_start, path): should_be = set() for match in re.finditer('(?:[^ ]+)', correct): string = match.group(0) parser = grammar36.parse(string, start_symbol='eval_input', error_recovery=False) parser_utils.move(parser.get_root_node(), self.line_nr) node = parser.get_root_node() module_context = script._get_module_context() user_context = get_user_context(module_context, (self.line_nr, 0)) # TODO needed? #if user_context._value.api_type == 'function': # user_context = user_context.get_function_execution() node.parent = user_context.tree_node results = convert_values(user_context.infer_node(node)) if not results: raise Exception('Could not resolve %s on line %s' % (match.string, self.line_nr - 1)) should_be |= set(Definition(inference_state, r.name) for r in results) debug.dbg('Finished getting types', color='YELLOW') # Because the objects have different ids, `repr`, then compare. should = set(comparison(r) for r in should_be) return should should = definition(self.correct, self.start, script.path) result = script.goto_definitions() is_str = set(comparison(r) for r in result) return compare_cb(self, is_str, should) def run_goto_assignments(self, compare_cb, environment): result = self.script(environment).goto_assignments() comp_str = str(sorted(str(r.description) for r in result)) return compare_cb(self, comp_str, self.correct) def run_usages(self, compare_cb, environment): result = self.script(environment).usages() self.correct = self.correct.strip() compare = sorted( (re.sub(r'^test\.completion\.', '', r.module_name), r.line, r.column) for r in result ) wanted = [] if not self.correct: positions = [] else: positions = literal_eval(self.correct) for pos_tup in positions: if type(pos_tup[0]) == str: # this means that there is a module specified wanted.append(pos_tup) else: line = pos_tup[0] if pos_tup[0] is not None: line += self.line_nr wanted.append((self.module_name, line, pos_tup[1])) return compare_cb(self, compare, sorted(wanted)) class StaticAnalysisCase(BaseTestCase): """ Static Analysis cases lie in the static_analysis folder. The tests also start with `#!`, like the goto_definition tests. """ def __init__(self, path): self._path = path self.name = os.path.basename(path) with open(path) as f: self._source = f.read() skip_version_info = None for line in self._source.splitlines(): skip_version_info = skip_python_version(line) or skip_version_info super(StaticAnalysisCase, self).__init__(skip_version_info) def collect_comparison(self): cases = [] for line_nr, line in enumerate(self._source.splitlines(), 1): match = re.match(r'(\s*)#! (\d+ )?(.*)$', line) if match is not None: column = int(match.group(2) or 0) + len(match.group(1)) cases.append((line_nr + 1, column, match.group(3))) return cases def run(self, compare_cb, environment): analysis = jedi.Script( self._source, path=self._path, environment=environment, )._analysis() typ_str = lambda inst: 'warning ' if isinstance(inst, Warning) else '' analysis = [(r.line, r.column, typ_str(r) + r.name) for r in analysis] compare_cb(self, analysis, self.collect_comparison()) def __repr__(self): return "<%s: %s>" % (self.__class__.__name__, os.path.basename(self._path)) def skip_python_version(line): # check for python minimal version number match = re.match(r" *# *python *([<>]=?|==) *(\d+(?:\.\d+)?)$", line) if match: minimal_python_version = tuple(map(int, match.group(2).split("."))) return minimal_python_version, match.group(1) return None def collect_file_tests(path, lines, lines_to_execute): def makecase(t): return IntegrationTestCase(t, correct, line_nr, column, start, line, path=path, skip_version_info=skip_version_info) start = None correct = None test_type = None skip_version_info = None for line_nr, line in enumerate(lines, 1): if correct is not None: r = re.match(r'^(\d+)\s*(.*)$', correct) if r: column = int(r.group(1)) correct = r.group(2) start += r.regs[2][0] # second group, start index else: column = len(line) - 1 # -1 for the \n if test_type == '!': yield makecase(TEST_ASSIGNMENTS) elif test_type == '<': yield makecase(TEST_USAGES) elif correct.startswith('['): yield makecase(TEST_COMPLETIONS) else: yield makecase(TEST_DEFINITIONS) correct = None else: skip_version_info = skip_python_version(line) or skip_version_info try: r = re.search(r'(?:^|(?<=\s))#([?!<])\s*([^\n]*)', line) # test_type is ? for completion and ! for goto_assignments test_type = r.group(1) correct = r.group(2) # Quick hack to make everything work (not quite a bloody unicorn hack though). if correct == '': correct = ' ' start = r.start() except AttributeError: correct = None else: # Skip the test, if this is not specified test. for l in lines_to_execute: if isinstance(l, tuple) and l[0] <= line_nr <= l[1] \ or line_nr == l: break else: if lines_to_execute: correct = None def collect_dir_tests(base_dir, test_files, check_thirdparty=False): for f_name in os.listdir(base_dir): files_to_execute = [a for a in test_files.items() if f_name.startswith(a[0])] lines_to_execute = reduce(lambda x, y: x + y[1], files_to_execute, []) if f_name.endswith(".py") and (not test_files or files_to_execute): skip = None if check_thirdparty: lib = f_name.replace('_.py', '') try: # there is always an underline at the end. # It looks like: completion/thirdparty/pylab_.py __import__(lib) except ImportError: skip = 'Thirdparty-Library %s not found.' % lib path = os.path.join(base_dir, f_name) if is_py3: with open(path, encoding='utf-8') as f: source = f.read() else: with open(path) as f: source = unicode(f.read(), 'UTF-8') for case in collect_file_tests(path, StringIO(source), lines_to_execute): case.source = source if skip: case.set_skip(skip) yield case docoptstr = """ Using run.py to make debugging easier with integration tests. An alternative testing format, which is much more hacky, but very nice to work with. Usage: run.py [--pdb] [--debug] [--thirdparty] [--env ] [...] run.py --help Options: -h --help Show this screen. --pdb Enable pdb debugging on fail. -d, --debug Enable text output debugging (please install ``colorama``). --thirdparty Also run thirdparty tests (in ``completion/thirdparty``). --env A Python version, like 2.7, 3.4, etc. """ if __name__ == '__main__': import docopt arguments = docopt.docopt(docoptstr) import time t_start = time.time() if arguments['--debug']: jedi.set_debug_function() # get test list, that should be executed test_files = {} last = None for arg in arguments['']: match = re.match(r'(\d+)-(\d+)', arg) if match: start, end = match.groups() test_files[last].append((int(start), int(end))) elif arg.isdigit(): if last is None: continue test_files[last].append(int(arg)) else: test_files[arg] = [] last = arg # completion tests: dir_ = os.path.dirname(os.path.realpath(__file__)) completion_test_dir = os.path.join(dir_, '../test/completion') completion_test_dir = os.path.abspath(completion_test_dir) tests_fail = 0 # execute tests cases = list(collect_dir_tests(completion_test_dir, test_files)) if test_files or arguments['--thirdparty']: completion_test_dir += '/thirdparty' cases += collect_dir_tests(completion_test_dir, test_files, True) def file_change(current, tests, fails): if current is None: current = '' else: current = os.path.basename(current) print('{:25} {} tests and {} fails.'.format(current, tests, fails)) def report(case, actual, desired): if actual == desired: return 0 else: print("\ttest fail @%d, actual = %s, desired = %s" % (case.line_nr - 1, actual, desired)) return 1 if arguments['--env']: environment = get_system_environment(arguments['--env']) else: # Will be 3.6. environment = get_default_environment() import traceback current = cases[0].path if cases else None count = fails = 0 for c in cases: if c.get_skip_reason(environment): continue if current != c.path: file_change(current, count, fails) current = c.path count = fails = 0 try: if c.run(report, environment): tests_fail += 1 fails += 1 except Exception: traceback.print_exc() print("\ttest fail @%d" % (c.line_nr - 1)) tests_fail += 1 fails += 1 if arguments['--pdb']: import pdb pdb.post_mortem() count += 1 file_change(current, count, fails) print('\nSummary: (%s fails of %s tests) in %.3fs' % (tests_fail, len(cases), time.time() - t_start)) exit_code = 1 if tests_fail else 0 sys.exit(exit_code) jedi-0.15.2/test/test_settings.py0000664000175000017500000000310313577124112016624 0ustar davedave00000000000000import pytest from jedi import settings from jedi.inference.names import ValueName from jedi.inference.compiled import CompiledValueName from jedi.inference.gradual.typeshed import StubModuleValue @pytest.fixture() def auto_import_json(monkeypatch): monkeypatch.setattr(settings, 'auto_import_modules', ['json']) def test_base_auto_import_modules(auto_import_json, Script): loads, = Script('import json; json.loads').goto_definitions() assert isinstance(loads._name, ValueName) value, = loads._name.infer() assert isinstance(value.parent_context._value, StubModuleValue) def test_auto_import_modules_imports(auto_import_json, Script): main, = Script('from json import tool; tool.main').goto_definitions() assert isinstance(main._name, CompiledValueName) def test_additional_dynamic_modules(monkeypatch, Script): # We could add further tests, but for now it's even more important that # this doesn't fail. monkeypatch.setattr( settings, 'additional_dynamic_modules', ['/foo/bar/jedi_not_existing_file.py'] ) assert not Script('def some_func(f):\n f.').completions() def test_cropped_file_size(monkeypatch, names, Script): code = 'class Foo(): pass\n' monkeypatch.setattr( settings, '_cropped_file_size', len(code) ) foo, = names(code + code) assert foo.line == 1 # It should just not crash if we are outside of the cropped range. script = Script(code + code + 'Foo') assert not script.goto_definitions() assert 'Foo' in [c.name for c in script.completions()] jedi-0.15.2/test/test_utils.py0000664000175000017500000000747413577124112016143 0ustar davedave00000000000000try: import readline except ImportError: readline = False from jedi import utils from .helpers import unittest, cwd_at @unittest.skipIf(not readline, "readline not found") class TestSetupReadline(unittest.TestCase): class NameSpace(object): pass def __init__(self, *args, **kwargs): super(type(self), self).__init__(*args, **kwargs) self.namespace = self.NameSpace() utils.setup_readline(self.namespace) def completions(self, text): completer = readline.get_completer() i = 0 completions = [] while True: completion = completer(text, i) if completion is None: break completions.append(completion) i += 1 return completions def test_simple(self): assert self.completions('list') == ['list'] assert self.completions('importerror') == ['ImportError'] s = "print(BaseE" assert self.completions(s) == [s + 'xception'] def test_nested(self): assert self.completions('list.Insert') == ['list.insert'] assert self.completions('list().Insert') == ['list().insert'] def test_magic_methods(self): assert self.completions('list.__getitem__') == ['list.__getitem__'] assert self.completions('list().__getitem__') == ['list().__getitem__'] def test_modules(self): import sys import os self.namespace.sys = sys self.namespace.os = os try: assert self.completions('os.path.join') == ['os.path.join'] string = 'os.path.join("a").upper' assert self.completions(string) == [string] c = {'os.' + d for d in dir(os) if d.startswith('ch')} assert set(self.completions('os.ch')) == set(c) finally: del self.namespace.sys del self.namespace.os def test_calls(self): s = 'str(bytes' assert self.completions(s) == [s, 'str(BytesWarning'] def test_import(self): s = 'from os.path import a' assert set(self.completions(s)) == {s + 'ltsep', s + 'bspath'} assert self.completions('import keyword') == ['import keyword'] import os s = 'from os import ' goal = {s + el for el in dir(os)} # There are minor differences, e.g. the dir doesn't include deleted # items as well as items that are not only available on linux. difference = set(self.completions(s)).symmetric_difference(goal) difference = { x for x in difference if all(not x.startswith('from os import ' + s) for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_', 'ST_']) } # There are quite a few differences, because both Windows and Linux # (posix and nt) librariesare included. assert len(difference) < 20 @cwd_at('test') def test_local_import(self): s = 'import test_utils' assert self.completions(s) == [s] def test_preexisting_values(self): self.namespace.a = range(10) assert set(self.completions('a.')) == {'a.' + n for n in dir(range(1))} del self.namespace.a def test_colorama(self): """ Only test it if colorama library is available. This module is being tested because it uses ``setattr`` at some point, which Jedi doesn't understand, but it should still work in the REPL. """ try: # if colorama is installed import colorama except ImportError: pass else: self.namespace.colorama = colorama assert self.completions('colorama') assert self.completions('colorama.Fore.BLACK') == ['colorama.Fore.BLACK'] del self.namespace.colorama def test_version_info(): assert utils.version_info()[:2] > (0, 7) jedi-0.15.2/test/__init__.py0000664000175000017500000000000013577124112015455 0ustar davedave00000000000000jedi-0.15.2/test/test_debug.py0000664000175000017500000000032113577124112016051 0ustar davedave00000000000000import jedi from jedi import debug def test_simple(): jedi.set_debug_function() debug.speed('foo') debug.dbg('bar') debug.warning('baz') jedi.set_debug_function(None, False, False, False) jedi-0.15.2/test/test_cache.py0000664000175000017500000000142013577124112016027 0ustar davedave00000000000000""" Test all things related to the ``jedi.cache`` module. """ def test_cache_call_signatures(Script): """ See github issue #390. """ def check(column, call_name, path=None): assert Script(s, 1, column, path).call_signatures()[0].name == call_name s = 'str(int())' for i in range(3): check(8, 'int') check(4, 'str') # Can keep doing these calls and always get the right result. # Now lets specify a source_path of boo and alternate these calls, it # should still work. for i in range(3): check(8, 'int', 'boo') check(4, 'str', 'boo') def test_cache_line_split_issues(Script): """Should still work even if there's a newline.""" assert Script('int(\n').call_signatures()[0].name == 'int' jedi-0.15.2/test/refactor.py0000775000175000017500000000662613577124112015552 0ustar davedave00000000000000#!/usr/bin/env python """ Refactoring tests work a little bit similar to Black Box tests. But the idea is here to compare two versions of code. **Note: Refactoring is currently not in active development (and was never stable), the tests are therefore not really valuable - just ignore them.** """ from __future__ import with_statement import os import re from functools import reduce import jedi from jedi import refactoring class RefactoringCase(object): def __init__(self, name, source, line_nr, index, path, new_name, start_line_test, desired): self.name = name self.source = source self.line_nr = line_nr self.index = index self.path = path self.new_name = new_name self.start_line_test = start_line_test self.desired = desired def refactor(self): script = jedi.Script(self.source, self.line_nr, self.index, self.path) f_name = os.path.basename(self.path) refactor_func = getattr(refactoring, f_name.replace('.py', '')) args = (self.new_name,) if self.new_name else () return refactor_func(script, *args) def run(self): refactor_object = self.refactor() # try to get the right excerpt of the newfile f = refactor_object.new_files()[self.path] lines = f.splitlines()[self.start_line_test:] end = self.start_line_test + len(lines) pop_start = None for i, l in enumerate(lines): if l.startswith('# +++'): end = i break elif '#? ' in l: pop_start = i lines.pop(pop_start) self.result = '\n'.join(lines[:end - 1]).strip() return self.result def check(self): return self.run() == self.desired def __repr__(self): return '<%s: %s:%s>' % (self.__class__.__name__, self.name, self.line_nr - 1) def collect_file_tests(source, path, lines_to_execute): r = r'^# --- ?([^\n]*)\n((?:(?!\n# \+\+\+).)*)' \ r'\n# \+\+\+((?:(?!\n# ---).)*)' for match in re.finditer(r, source, re.DOTALL | re.MULTILINE): name = match.group(1).strip() first = match.group(2).strip() second = match.group(3).strip() start_line_test = source[:match.start()].count('\n') + 1 # get the line with the position of the operation p = re.match(r'((?:(?!#\?).)*)#\? (\d*) ?([^\n]*)', first, re.DOTALL) if p is None: print("Please add a test start.") continue until = p.group(1) index = int(p.group(2)) new_name = p.group(3) line_nr = start_line_test + until.count('\n') + 2 if lines_to_execute and line_nr - 1 not in lines_to_execute: continue yield RefactoringCase(name, source, line_nr, index, path, new_name, start_line_test, second) def collect_dir_tests(base_dir, test_files): for f_name in os.listdir(base_dir): files_to_execute = [a for a in test_files.items() if a[0] in f_name] lines_to_execute = reduce(lambda x, y: x + y[1], files_to_execute, []) if f_name.endswith(".py") and (not test_files or files_to_execute): path = os.path.join(base_dir, f_name) with open(path) as f: source = f.read() for case in collect_file_tests(source, path, lines_to_execute): yield case jedi-0.15.2/test/static_analysis/0000775000175000017500000000000013577125145016557 5ustar davedave00000000000000jedi-0.15.2/test/static_analysis/attribute_error.py0000664000175000017500000000404713577124112022343 0ustar davedave00000000000000class Cls(): class_attr = '' def __init__(self, input): self.instance_attr = 3 self.input = input def f(self): #! 12 attribute-error return self.not_existing def undefined_object(self, obj): """ Uses an arbitrary object and performs an operation on it, shouldn't be a problem. """ obj.arbitrary_lookup def defined_lookup(self, obj): """ `obj` is defined by a call into this function. """ obj.upper #! 4 attribute-error obj.arbitrary_lookup #! 13 name-error class_attr = a Cls(1).defined_lookup('') c = Cls(1) c.class_attr Cls.class_attr #! 4 attribute-error Cls.class_attr_error c.instance_attr #! 2 attribute-error c.instance_attr_error c.something = None #! 12 name-error something = a something # ----------------- # Unused array variables should still raise attribute errors. # ----------------- # should not raise anything. for loop_variable in [1, 2]: #! 4 name-error x = undefined loop_variable #! 28 name-error for loop_variable in [1, 2, undefined]: pass #! 7 attribute-error [1, ''.undefined_attr] def return_one(something): return 1 #! 14 attribute-error return_one(''.undefined_attribute) #! 12 name-error [r for r in undefined] #! 1 name-error [undefined for r in [1, 2]] [r for r in [1, 2]] # some random error that showed up class NotCalled(): def match_something(self, param): seems_to_need_an_assignment = param return [value.match_something() for value in []] # ----------------- # decorators # ----------------- #! 1 name-error @undefined_decorator def func(): return 1 # ----------------- # operators # ----------------- string = '%s %s' % (1, 2) # Shouldn't raise an error, because `string` is really just a string, not an # array or something. string.upper # ----------------- # imports # ----------------- # Star imports and the like in modules should not cause attribute errors in # this module. import import_tree import_tree.a import_tree.b jedi-0.15.2/test/static_analysis/keywords.py0000664000175000017500000000015413577124112020771 0ustar davedave00000000000000def raises(): raise KeyError() def wrong_name(): #! 6 name-error raise NotExistingException() jedi-0.15.2/test/static_analysis/branches.py0000664000175000017500000000141013577124112020703 0ustar davedave00000000000000# ----------------- # Simple tests # ----------------- import random if random.choice([0, 1]): x = '' else: x = 1 if random.choice([0, 1]): y = '' else: y = 1 # A simple test if x != 1: x.upper() else: #! 2 attribute-error x.upper() pass # This operation is wrong, because the types could be different. #! 6 type-error-operation z = x + y # However, here we have correct types. if x == y: z = x + y else: #! 6 type-error-operation z = x + y # TODO enable this one. #x = 3 #if x != 1: # x.upper() # ----------------- # With a function # ----------------- def addition(a, b): if type(a) == type(b): return a + b else: #! 9 type-error-operation return a + b addition(1, 1) addition(1.0, '') jedi-0.15.2/test/static_analysis/star_arguments.py0000664000175000017500000000427513577124112022170 0ustar davedave00000000000000# ----------------- # *args # ----------------- def simple(a): return a def nested(*args): return simple(*args) nested(1) #! 6 type-error-too-few-arguments nested() def nested_no_call_to_function(*args): return simple(1, *args) def simple2(a, b, c): return b def nested(*args): return simple2(1, *args) def nested_twice(*args1): return nested(*args1) nested_twice(2, 3) #! 13 type-error-too-few-arguments nested_twice(2) #! 19 type-error-too-many-arguments nested_twice(2, 3, 4) # A named argument can be located before *args. def star_args_with_named(*args): return simple2(c='', *args) star_args_with_named(1, 2) # ----------------- # **kwargs # ----------------- def kwargs_test(**kwargs): return simple2(1, **kwargs) kwargs_test(c=3, b=2) #! 12 type-error-too-few-arguments kwargs_test(c=3) #! 12 type-error-too-few-arguments kwargs_test(b=2) #! 22 type-error-keyword-argument kwargs_test(b=2, c=3, d=4) #! 12 type-error-multiple-values kwargs_test(b=2, c=3, a=4) def kwargs_nested(**kwargs): return kwargs_test(b=2, **kwargs) kwargs_nested(c=3) #! 13 type-error-too-few-arguments kwargs_nested() #! 19 type-error-keyword-argument kwargs_nested(c=2, d=4) #! 14 type-error-multiple-values kwargs_nested(c=2, a=4) # TODO reenable ##! 14 type-error-multiple-values #kwargs_nested(b=3, c=2) # ----------------- # mixed *args/**kwargs # ----------------- def simple_mixed(a, b, c): return b def mixed(*args, **kwargs): return simple_mixed(1, *args, **kwargs) mixed(1, 2) mixed(1, c=2) mixed(b=2, c=3) mixed(c=4, b='') # need separate functions, otherwise these might swallow the errors def mixed2(*args, **kwargs): return simple_mixed(1, *args, **kwargs) #! 7 type-error-too-few-arguments mixed2(c=2) #! 7 type-error-too-few-arguments mixed2(3) #! 13 type-error-too-many-arguments mixed2(3, 4, 5) # TODO reenable ##! 13 type-error-too-many-arguments #mixed2(3, 4, c=5) #! 7 type-error-multiple-values mixed2(3, b=5) # ----------------- # plain wrong arguments # ----------------- #! 12 type-error-star-star simple(1, **[]) #! 12 type-error-star-star simple(1, **1) class A(): pass #! 12 type-error-star-star simple(1, **A()) #! 11 type-error-star simple(1, *1) jedi-0.15.2/test/static_analysis/attribute_warnings.py0000664000175000017500000000135213577124112023036 0ustar davedave00000000000000""" Jedi issues warnings for possible errors if ``__getattr__``, ``__getattribute__`` or ``setattr`` are used. """ # ----------------- # __getattr*__ # ----------------- class Cls(): def __getattr__(self, name): return getattr(str, name) Cls().upper #! 6 warning attribute-error Cls().undefined class Inherited(Cls): pass Inherited().upper #! 12 warning attribute-error Inherited().undefined # ----------------- # setattr # ----------------- class SetattrCls(): def __init__(self, dct): # Jedi doesn't even try to understand such code for k, v in dct.items(): setattr(self, k, v) self.defined = 3 c = SetattrCls({'a': 'b'}) c.defined #! 2 warning attribute-error c.undefined jedi-0.15.2/test/static_analysis/class_simple.py0000664000175000017500000000023013577124112021573 0ustar davedave00000000000000class Base(object): class Nested(): def foo(): pass class X(Base.Nested): pass X().foo() #! 4 attribute-error X().bar() jedi-0.15.2/test/static_analysis/operations.py0000664000175000017500000000030713577124112021305 0ustar davedave00000000000000-1 + 1 1 + 1.0 #! 2 type-error-operation 1 + '1' #! 2 type-error-operation 1 - '1' -1 - - 1 # TODO uncomment #-1 - int() #int() - float() float() - 3.0 a = 3 b = '' #! 2 type-error-operation a + b jedi-0.15.2/test/static_analysis/imports.py0000664000175000017500000000057213577124112020623 0ustar davedave00000000000000 #! 7 import-error import not_existing import os from os.path import abspath #! 20 import-error from os.path import not_existing from datetime import date date.today #! 5 attribute-error date.not_existing_attribute #! 14 import-error from datetime.date import today #! 16 import-error import datetime.date #! 7 import-error import not_existing_nested.date import os.path jedi-0.15.2/test/static_analysis/iterable.py0000664000175000017500000000055613577124112020717 0ustar davedave00000000000000 a, b = {'asdf': 3, 'b': 'str'} a x = [1] x[0], b = {'a': 1, 'b': '2'} dct = {3: ''} for x in dct: pass #! 4 type-error-not-iterable for x, y in dct: pass # Shouldn't cause issues, because if there are no types (or we don't know what # the types are, we should just ignore it. #! 0 value-error-too-few-values a, b = [] #! 7 name-error a, b = NOT_DEFINED jedi-0.15.2/test/static_analysis/python2.py0000664000175000017500000000020013577124112020515 0ustar davedave00000000000000""" Some special cases of Python 2. """ # python <= 2.7 # print is syntax: print 1 print(1) #! 6 name-error print NOT_DEFINED jedi-0.15.2/test/static_analysis/builtins.py0000664000175000017500000000027113577124112020753 0ustar davedave00000000000000# ---------- # isinstance # ---------- isinstance(1, int) isinstance(1, (int, str)) #! 14 type-error-isinstance isinstance(1, 1) #! 14 type-error-isinstance isinstance(1, [int, str]) jedi-0.15.2/test/static_analysis/try_except.py0000664000175000017500000000331413577124112021311 0ustar davedave00000000000000try: #! 4 attribute-error str.not_existing except TypeError: pass try: str.not_existing except AttributeError: #! 4 attribute-error str.not_existing pass try: import not_existing_import except ImportError: pass try: #! 7 import-error import not_existing_import except AttributeError: pass # ----------------- # multi except # ----------------- try: str.not_existing except (TypeError, AttributeError): pass try: str.not_existing except ImportError: pass except (NotImplementedError, AttributeError): pass try: #! 4 attribute-error str.not_existing except (TypeError, NotImplementedError): pass # ----------------- # detailed except # ----------------- try: str.not_existing except ((AttributeError)): pass try: #! 4 attribute-error str.not_existing except [AttributeError]: pass # Should be able to detect errors in except statement as well. try: pass #! 7 name-error except Undefined: pass # ----------------- # inheritance # ----------------- try: undefined except Exception: pass # should catch everything try: undefined except: pass # ----------------- # kind of similar: hasattr # ----------------- if hasattr(str, 'undefined'): str.undefined str.upper #! 4 attribute-error str.undefined2 #! 4 attribute-error int.undefined else: str.upper #! 4 attribute-error str.undefined # ----------------- # arguments # ----------------- def i_see(r): return r def lala(): # This weird structure checks if the error is actually resolved in the # right place. a = TypeError try: i_see() except a: pass #! 5 type-error-too-few-arguments i_see() jedi-0.15.2/test/static_analysis/descriptors.py0000664000175000017500000000036513577124112021467 0ustar davedave00000000000000# classmethod class TarFile(): @classmethod def open(cls, name, **kwargs): return cls.taropen(name, **kwargs) @classmethod def taropen(cls, name, **kwargs): return name # should just work TarFile.open('hallo') jedi-0.15.2/test/static_analysis/comprehensions.py0000664000175000017500000000140513577124112022156 0ustar davedave00000000000000[a + 1 for a in [1, 2]] #! 3 type-error-operation [a + '' for a in [1, 2]] #! 3 type-error-operation (a + '' for a in [1, 2]) #! 12 type-error-not-iterable [a for a in 1] tuple(str(a) for a in [1]) #! 8 type-error-operation tuple(a + 3 for a in ['']) # ---------- # Some variables within are not defined # ---------- abcdef = [] #! 12 name-error [1 for a in NOT_DEFINFED for b in abcdef if 1] #! 25 name-error [1 for a in [1] for b in NOT_DEFINED if 1] #! 12 name-error [1 for a in NOT_DEFINFED for b in [1] if 1] #! 19 name-error (1 for a in [1] if NOT_DEFINED) # ---------- # unbalanced sides. # ---------- # ok (1 for a, b in [(1, 2)]) #! 13 value-error-too-few-values (1 for a, b, c in [(1, 2)]) #! 10 value-error-too-many-values (1 for a, b in [(1, 2, 3)]) jedi-0.15.2/test/static_analysis/normal_arguments.py0000664000175000017500000000217613577124112022505 0ustar davedave00000000000000# ----------------- # normal arguments (no keywords) # ----------------- def simple(a): return a simple(1) #! 6 type-error-too-few-arguments simple() #! 10 type-error-too-many-arguments simple(1, 2) #! 10 type-error-too-many-arguments simple(1, 2, 3) # ----------------- # keyword arguments # ----------------- simple(a=1) #! 7 type-error-keyword-argument simple(b=1) #! 10 type-error-too-many-arguments simple(1, a=1) def two_params(x, y): return y two_params(y=2, x=1) two_params(1, y=2) #! 11 type-error-multiple-values two_params(1, x=2) #! 17 type-error-too-many-arguments two_params(1, 2, y=3) # ----------------- # default arguments # ----------------- def default(x, y=1, z=2): return x #! 7 type-error-too-few-arguments default() default(1) default(1, 2) default(1, 2, 3) #! 17 type-error-too-many-arguments default(1, 2, 3, 4) default(x=1) # ----------------- # class arguments # ----------------- class Instance(): def __init__(self, foo): self.foo = foo Instance(1).foo Instance(foo=1).foo #! 12 type-error-too-many-arguments Instance(1, 2).foo #! 8 type-error-too-few-arguments Instance().foo jedi-0.15.2/test/static_analysis/generators.py0000664000175000017500000000014613577124112021274 0ustar davedave00000000000000def generator(): yield 1 #! 11 type-error-not-subscriptable generator()[0] list(generator())[0] jedi-0.15.2/test/static_analysis/with_.py0000664000175000017500000000004313577124112020231 0ustar davedave00000000000000with open() as fin: fin.read() jedi-0.15.2/test/static_analysis/import_tree/0000775000175000017500000000000013577125145021110 5ustar davedave00000000000000jedi-0.15.2/test/static_analysis/import_tree/b.py0000664000175000017500000000000013577124112021662 0ustar davedave00000000000000jedi-0.15.2/test/static_analysis/import_tree/__init__.py0000664000175000017500000000014213577124112023207 0ustar davedave00000000000000""" Another import tree, this time not for completion, but static analysis. """ from .a import * jedi-0.15.2/test/static_analysis/import_tree/a.py0000664000175000017500000000002013577124112021663 0ustar davedave00000000000000from . import b jedi-0.15.2/test/test_speed.py0000664000175000017500000000423413577124112016072 0ustar davedave00000000000000""" Speed tests of Jedi. To prove that certain things don't take longer than they should. """ import time import functools from .helpers import cwd_at import jedi def _check_speed(time_per_run, number=4, run_warm=True): """ Speed checks should typically be very tolerant. Some machines are faster than others, but the tests should still pass. These tests are here to assure that certain effects that kill jedi performance are not reintroduced to Jedi.""" def decorated(func): @functools.wraps(func) def wrapper(Script, **kwargs): if run_warm: func(Script=Script, **kwargs) first = time.time() for i in range(number): func(Script=Script, **kwargs) single_time = (time.time() - first) / number message = 'speed issue %s, %s' % (func, single_time) assert single_time < time_per_run, message return wrapper return decorated @_check_speed(0.5) def test_os_path_join(Script): s = "from posixpath import join; join('', '')." assert len(Script(s).completions()) > 10 # is a str completion @_check_speed(0.15) def test_scipy_speed(Script): s = 'import scipy.weave; scipy.weave.inline(' script = Script(s, 1, len(s), '') script.call_signatures() @_check_speed(0.8) @cwd_at('test') def test_precedence_slowdown(Script): """ Precedence calculation can slow down things significantly in edge cases. Having strange recursion structures increases the problem. """ with open('speed/precedence.py') as f: line = len(f.read().splitlines()) assert Script(line=line, path='speed/precedence.py').goto_definitions() @_check_speed(0.1) def test_no_repr_computation(Script): """ For Interpreter completion aquisition of sourcefile can trigger unwanted computation of repr(). Exemple : big pandas data. See issue #919. """ class SlowRepr: "class to test what happens if __repr__ is very slow." def some_method(self): pass def __repr__(self): time.sleep(0.2) test = SlowRepr() jedi.Interpreter('test.som', [locals()]).completions() jedi-0.15.2/test/test_parso_integration/0000775000175000017500000000000013577125145020153 5ustar davedave00000000000000jedi-0.15.2/test/test_parso_integration/test_error_correction.py0000664000175000017500000000201513577124112025133 0ustar davedave00000000000000from textwrap import dedent def test_error_correction_with(Script): source = """ with open() as f: try: f.""" comps = Script(source).completions() assert len(comps) > 30 # `open` completions have a closed attribute. assert [1 for c in comps if c.name == 'closed'] def test_string_literals(Script): """Simplified case of jedi-vim#377.""" source = dedent(""" x = ur''' def foo(): pass """) script = Script(dedent(source)) assert script._get_module_context().tree_node.end_pos == (6, 0) assert script.completions() def test_incomplete_function(Script): source = '''return ImportErr''' script = Script(dedent(source), 1, 3) assert script.completions() def test_decorator_string_issue(Script): """ Test case from #589 """ source = dedent('''\ """ @""" def bla(): pass bla.''') s = Script(source) assert s.completions() assert s._get_module_context().tree_node.get_code() == source jedi-0.15.2/test/test_parso_integration/test_basic.py0000664000175000017500000000403413577124112022637 0ustar davedave00000000000000from textwrap import dedent import pytest from parso import parse def test_form_feed_characters(Script): s = "\f\nclass Test(object):\n pass" Script(s, line=2, column=18).call_signatures() def check_p(src): module_node = parse(src) assert src == module_node.get_code() return module_node def test_if(Script): src = dedent('''\ def func(): x = 3 if x: def y(): return x return y() func() ''') # Two parsers needed, one for pass and one for the function. check_p(src) assert [d.name for d in Script(src, 8, 6).goto_definitions()] == ['int'] def test_class_and_if(Script): src = dedent("""\ class V: def __init__(self): pass if 1: c = 3 def a_func(): return 1 # COMMENT a_func()""") check_p(src) assert [d.name for d in Script(src).goto_definitions()] == ['int'] def test_add_to_end(Script): """ The diff parser doesn't parse everything again. It just updates with the help of caches, this is an example that didn't work. """ a = dedent("""\ class Abc(): def abc(self): self.x = 3 class Two(Abc): def g(self): self """) # ^ here is the first completion b = " def h(self):\n" \ " self." def complete(code, line=None, column=None): script = Script(code, line, column, 'example.py') assert script.completions() complete(a, 7, 12) complete(a + b) a = a[:-1] + '.\n' complete(a, 7, 13) complete(a + b) def test_tokenizer_with_string_literal_backslash(Script): c = Script("statement = u'foo\\\n'; statement").goto_definitions() assert c[0]._name._value.get_safe_value() == 'foo' def test_ellipsis_without_getitem(Script, environment): if environment.version_info.major == 2: pytest.skip('In 2.7 Ellipsis can only be used like x[...]') def_, = Script('x=...;x').goto_definitions() assert def_.name == 'ellipsis' jedi-0.15.2/test/test_parso_integration/test_parser_utils.py0000664000175000017500000000444613577124112024301 0ustar davedave00000000000000# -*- coding: utf-8 -*- from jedi._compatibility import is_py3 from jedi import parser_utils from parso import parse from parso.python import tree import pytest class TestCallAndName: def get_call(self, source): # Get the simple_stmt and then the first one. node = parse(source).children[0] if node.type == 'simple_stmt': return node.children[0] return node def test_name_and_call_positions(self): name = self.get_call('name\nsomething_else') assert name.value == 'name' assert name.start_pos == (1, 0) assert name.end_pos == (1, 4) leaf = self.get_call('1.0\n') assert leaf.value == '1.0' assert parser_utils.safe_literal_eval(leaf.value) == 1.0 assert leaf.start_pos == (1, 0) assert leaf.end_pos == (1, 3) def test_call_type(self): call = self.get_call('hello') assert isinstance(call, tree.Name) def test_literal_type(self): literal = self.get_call('1.0') assert isinstance(literal, tree.Literal) assert type(parser_utils.safe_literal_eval(literal.value)) == float literal = self.get_call('1') assert isinstance(literal, tree.Literal) assert type(parser_utils.safe_literal_eval(literal.value)) == int literal = self.get_call('"hello"') assert isinstance(literal, tree.Literal) assert parser_utils.safe_literal_eval(literal.value) == 'hello' def test_hex_values_in_docstring(): source = r''' def foo(object): """ \xff """ return 1 ''' doc = parser_utils.clean_scope_docstring(next(parse(source).iter_funcdefs())) if is_py3: assert doc == '\xff' else: assert doc == u'�' @pytest.mark.parametrize( 'code,call_signature', [ ('def my_function(x, typed: Type, z):\n return', 'my_function(x, typed: Type, z)'), ('def my_function(x, y, z) -> str:\n return', 'my_function(x, y, z) -> str'), ('lambda x, y, z: x + y * z\n', '(x, y, z)') ]) def test_get_call_signature(code, call_signature): node = parse(code, version='3.5').children[0] if node.type == 'simple_stmt': node = node.children[0] assert parser_utils.get_call_signature(node) == call_signature jedi-0.15.2/test/examples/0000775000175000017500000000000013577125145015203 5ustar davedave00000000000000jedi-0.15.2/test/examples/typing_overload/0000775000175000017500000000000013577125145020410 5ustar davedave00000000000000jedi-0.15.2/test/examples/typing_overload/file.pyi0000664000175000017500000000022413577124112022041 0ustar davedave00000000000000from typing import overload @overload def with_overload(x: int, y: int) -> float: ... @overload def with_overload(x: str, y: list) -> float: ... jedi-0.15.2/test/examples/typing_overload/file.py0000664000175000017500000000005713577124112021674 0ustar davedave00000000000000def with_overload(x, y: int) -> list: pass jedi-0.15.2/test/examples/namespace_package_relative_import/0000775000175000017500000000000013577125145024077 5ustar davedave00000000000000jedi-0.15.2/test/examples/namespace_package_relative_import/rel1.py0000664000175000017500000000002713577124112025304 0ustar davedave00000000000000from .rel2 import name jedi-0.15.2/test/examples/namespace_package_relative_import/rel2.py0000664000175000017500000000001113577124112025276 0ustar davedave00000000000000name = 1 jedi-0.15.2/test/examples/inheritance/0000775000175000017500000000000013577125145017474 5ustar davedave00000000000000jedi-0.15.2/test/examples/inheritance/pkg/0000775000175000017500000000000013577125145020255 5ustar davedave00000000000000jedi-0.15.2/test/examples/inheritance/pkg/module.py0000664000175000017500000000005413577124112022104 0ustar davedave00000000000000 class Bar: def bar(self): pass jedi-0.15.2/test/examples/inheritance/pkg/__init__.py0000664000175000017500000000011213577124112022351 0ustar davedave00000000000000from .module import Bar class Foo(Bar): def foo(self): pass jedi-0.15.2/test/examples/issue1209/0000775000175000017500000000000013577125145016647 5ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/whatever/0000775000175000017500000000000013577125145020474 5ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/whatever/__init__.py0000664000175000017500000000000013577124112022564 0ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/whatever/test.py0000664000175000017500000000000013577124112022004 0ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/__init__.py0000664000175000017500000000000013577124112020737 0ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/api/0000775000175000017500000000000013577125145017420 5ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/api/whatever/0000775000175000017500000000000013577125145021245 5ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/api/whatever/api_test1.py0000664000175000017500000000000013577124112023467 0ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/api/whatever/__init__.py0000664000175000017500000000000013577124112023335 0ustar davedave00000000000000jedi-0.15.2/test/examples/issue1209/api/__init__.py0000664000175000017500000000000013577124112021510 0ustar davedave00000000000000jedi-0.15.2/test/examples/README.rst0000664000175000017500000000023313577124112016661 0ustar davedave00000000000000Examples ======== Here you can find project structures that match other Python projects. This is then used to check if jedi understands these structures. jedi-0.15.2/test/examples/django/0000775000175000017500000000000013577125145016445 5ustar davedave00000000000000jedi-0.15.2/test/examples/django/manage.py0000664000175000017500000000037113577124112020241 0ustar davedave00000000000000#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "foobar.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) jedi-0.15.2/test/examples/django/app/0000775000175000017500000000000013577125145017225 5ustar davedave00000000000000jedi-0.15.2/test/examples/django/app/__init__.py0000664000175000017500000000000013577124112021315 0ustar davedave00000000000000jedi-0.15.2/test/examples/django/app/models.py0000664000175000017500000000002213577124112021045 0ustar davedave00000000000000SomeModel = "bar" jedi-0.15.2/test/examples/buildout_project/0000775000175000017500000000000013577125145020560 5ustar davedave00000000000000jedi-0.15.2/test/examples/buildout_project/bin/0000775000175000017500000000000013577125145021330 5ustar davedave00000000000000jedi-0.15.2/test/examples/buildout_project/bin/binary_file0000664000175000017500000000000513577124112023522 0ustar davedave00000000000000PNG jedi-0.15.2/test/examples/buildout_project/bin/app0000664000175000017500000000034313577124112022024 0ustar davedave00000000000000#!/usr/bin/python import sys sys.path[0:0] = [ '/usr/lib/python3.4/site-packages', '/tmp/.buildout/eggs/important_package.egg' ] import important_package if __name__ == '__main__': sys.exit(important_package.main()) jedi-0.15.2/test/examples/buildout_project/bin/empty_file0000664000175000017500000000000013577124112023367 0ustar davedave00000000000000jedi-0.15.2/test/examples/buildout_project/src/0000775000175000017500000000000013577125145021347 5ustar davedave00000000000000jedi-0.15.2/test/examples/buildout_project/src/proj_name/0000775000175000017500000000000013577125145023321 5ustar davedave00000000000000jedi-0.15.2/test/examples/buildout_project/src/proj_name/module_name.py0000664000175000017500000000000013577124112026137 0ustar davedave00000000000000jedi-0.15.2/test/examples/buildout_project/buildout.cfg0000664000175000017500000000000013577124112023047 0ustar davedave00000000000000jedi-0.15.2/test/examples/stub_packages/0000775000175000017500000000000013577125145020016 5ustar davedave00000000000000jedi-0.15.2/test/examples/stub_packages/no_python-stubs/0000775000175000017500000000000013577125145023171 5ustar davedave00000000000000jedi-0.15.2/test/examples/stub_packages/no_python-stubs/__init__.pyi0000664000175000017500000000001113577124112025434 0ustar davedave00000000000000foo: int jedi-0.15.2/test/examples/stub_packages/with_python-stubs/0000775000175000017500000000000013577125145023530 5ustar davedave00000000000000jedi-0.15.2/test/examples/stub_packages/with_python-stubs/__init__.pyi0000664000175000017500000000003113577124112025775 0ustar davedave00000000000000both: int stub_only: str jedi-0.15.2/test/examples/stub_packages/with_python-stubs/module.pyi0000664000175000017500000000002313577124112025524 0ustar davedave00000000000000in_sub_module: int jedi-0.15.2/test/examples/stub_packages/with_python/0000775000175000017500000000000013577125145022372 5ustar davedave00000000000000jedi-0.15.2/test/examples/stub_packages/with_python/module.py0000664000175000017500000000002313577124112024215 0ustar davedave00000000000000in_sub_module = '' jedi-0.15.2/test/examples/stub_packages/with_python/__init__.py0000664000175000017500000000003213577124112024467 0ustar davedave00000000000000python_only = 1 both = '' jedi-0.15.2/test/refactor/0000775000175000017500000000000013577125145015172 5ustar davedave00000000000000jedi-0.15.2/test/refactor/inline.py0000664000175000017500000000036613577124112017020 0ustar davedave00000000000000# --- simple def test(): #? 4 a = (30 + b, c) + 1 return test(100, a) # +++ def test(): return test(100, (30 + b, c) + 1) # --- simple if 1: #? 4 a = 1, 2 return test(100, a) # +++ if 1: return test(100, (1, 2)) jedi-0.15.2/test/refactor/extract.py0000664000175000017500000000127113577124112017210 0ustar davedave00000000000000# --- simple def test(): #? 35 a return test(100, (30 + b, c) + 1) # +++ def test(): a = (30 + b, c) + 1 return test(100, a) # --- simple #2 def test(): #? 25 a return test(100, (30 + b, c) + 1) # +++ def test(): a = 30 + b return test(100, (a, c) + 1) # --- multiline def test(): #? 30 x return test(1, (30 + b, c) + 1) # +++ def test(): x = ((30 + b, c) + 1) return test(1, x ) # --- multiline #2 def test(): #? 25 x return test(1, (30 + b, c) + 1) # +++ def test(): x = 30 + b return test(1, (x, c) + 1) jedi-0.15.2/test/refactor/rename.py0000664000175000017500000000043713577124112017010 0ustar davedave00000000000000""" Test coverage for renaming is mostly being done by testing `Script.usages`. """ # --- simple def test1(): #? 7 blabla test1() AssertionError return test1, test1.not_existing # +++ def blabla(): blabla() AssertionError return blabla, blabla.not_existing jedi-0.15.2/test/test_integration.py0000664000175000017500000000374013577124112017316 0ustar davedave00000000000000import os import pytest from . import helpers def assert_case_equal(case, actual, desired): """ Assert ``actual == desired`` with formatted message. This is not needed for typical pytest use case, but as we need ``--assert=plain`` (see ../pytest.ini) to workaround some issue due to pytest magic, let's format the message by hand. """ assert actual == desired, """ Test %r failed. actual = %s desired = %s """ % (case, actual, desired) def assert_static_analysis(case, actual, desired): """A nicer formatting for static analysis tests.""" a = set(actual) d = set(desired) assert actual == desired, """ Test %r failed. not raised = %s unspecified = %s """ % (case, sorted(d - a), sorted(a - d)) def test_completion(case, monkeypatch, environment, has_typing): skip_reason = case.get_skip_reason(environment) if skip_reason is not None: pytest.skip(skip_reason) _CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables') if not has_typing and any(x in case.path for x in _CONTAINS_TYPING): pytest.skip('Needs the typing module installed to run this test.') repo_root = helpers.root_dir monkeypatch.chdir(os.path.join(repo_root, 'jedi')) case.run(assert_case_equal, environment) def test_static_analysis(static_analysis_case, environment): skip_reason = static_analysis_case.get_skip_reason(environment) if skip_reason is not None: pytest.skip(skip_reason) else: static_analysis_case.run(assert_static_analysis, environment) def test_refactor(refactor_case): """ Run refactoring test case. :type refactor_case: :class:`.refactor.RefactoringCase` """ if 0: # TODO Refactoring is not relevant at the moment, it will be changed # significantly in the future, but maybe we can use these tests: refactor_case.run() assert_case_equal(refactor_case, refactor_case.result, refactor_case.desired) jedi-0.15.2/test/helpers.py0000664000175000017500000000267213577124112015401 0ustar davedave00000000000000""" A helper module for testing, improves compatibility for testing (as ``jedi._compatibility``) as well as introducing helper functions. """ import sys from contextlib import contextmanager if sys.hexversion < 0x02070000: import unittest2 as unittest else: import unittest TestCase = unittest.TestCase import os import pytest from os.path import abspath, dirname, join from functools import partial, wraps test_dir = dirname(abspath(__file__)) root_dir = dirname(test_dir) sample_int = 1 # This is used in completion/imports.py skip_if_windows = partial(pytest.param, marks=pytest.mark.skipif("sys.platform=='win32'")) skip_if_not_windows = partial(pytest.param, marks=pytest.mark.skipif("sys.platform!='win32'")) def get_example_dir(name): return join(test_dir, 'examples', name) def cwd_at(path): """ Decorator to run function at `path`. :type path: str :arg path: relative path from repository root (e.g., ``'jedi'``). """ def decorator(func): @wraps(func) def wrapper(Script, **kwargs): with set_cwd(path): return func(Script, **kwargs) return wrapper return decorator @contextmanager def set_cwd(path, absolute_path=False): repo_root = os.path.dirname(test_dir) oldcwd = os.getcwd() os.chdir(os.path.join(repo_root, path)) try: yield finally: os.chdir(oldcwd) jedi-0.15.2/test/speed/0000775000175000017500000000000013577125145014465 5ustar davedave00000000000000jedi-0.15.2/test/speed/precedence.py0000664000175000017500000000120713577124112017125 0ustar davedave00000000000000def marks(code): if '.' in code: another(code[:code.index(',') - 1] + '!') else: another(code + '.') def another(code2): call(numbers(code2 + 'haha')) marks('start1 ') marks('start2 ') def alphabet(code4): if 1: if 2: return code4 + 'a' else: return code4 + 'b' else: if 2: return code4 + 'c' else: return code4 + 'd' def numbers(code5): if 2: return alphabet(code5 + '1') else: return alphabet(code5 + '2') def call(code3): code3 = numbers(numbers('end')) + numbers(code3) code3.partition jedi-0.15.2/test/blabla_test_documentation.py0000664000175000017500000000145313577124112021140 0ustar davedave00000000000000def test_keyword_doc(Script): r = list(Script("or", 1, 1).goto_definitions()) assert len(r) == 1 assert len(r[0].doc) > 100 r = list(Script("asfdasfd", 1, 1).goto_definitions()) assert len(r) == 0 k = Script("fro").completions()[0] imp_start = '\nThe ``import' assert k.raw_doc.startswith(imp_start) assert k.doc.startswith(imp_start) def test_blablabla(Script): defs = Script("import").goto_definitions() assert len(defs) == 1 and [1 for d in defs if d.doc] # unrelated to #44 def test_operator_doc(Script): r = list(Script("a == b", 1, 3).goto_definitions()) assert len(r) == 1 assert len(r[0].doc) > 100 def test_lambda(Script): defs = Script('lambda x: x', column=0).goto_definitions() assert [d.type for d in defs] == ['keyword'] jedi-0.15.2/test/conftest.py0000664000175000017500000001157313577124112015564 0ustar davedave00000000000000import os import re import subprocess import pytest from . import helpers from . import run from . import refactor import jedi from jedi.api.environment import InterpreterEnvironment from jedi.inference.compiled.value import create_from_access_path def pytest_addoption(parser): parser.addoption( "--integration-case-dir", default=os.path.join(helpers.test_dir, 'completion'), help="Directory in which integration test case files locate.") parser.addoption( "--refactor-case-dir", default=os.path.join(helpers.test_dir, 'refactor'), help="Directory in which refactoring test case files locate.") parser.addoption( "--test-files", "-T", default=[], action='append', help=( "Specify test files using FILE_NAME[:LINE[,LINE[,...]]]. " "For example: -T generators.py:10,13,19. " "Note that you can use -m to specify the test case by id.")) parser.addoption( "--thirdparty", action='store_true', help="Include integration tests that requires third party modules.") def parse_test_files_option(opt): """ Parse option passed to --test-files into a key-value pair. >>> parse_test_files_option('generators.py:10,13,19') ('generators.py', [10, 13, 19]) """ opt = str(opt) if ':' in opt: (f_name, rest) = opt.split(':', 1) return f_name, list(map(int, rest.split(','))) else: return opt, [] def pytest_generate_tests(metafunc): """ :type metafunc: _pytest.python.Metafunc """ test_files = dict(map(parse_test_files_option, metafunc.config.option.test_files)) if 'case' in metafunc.fixturenames: base_dir = metafunc.config.option.integration_case_dir thirdparty = metafunc.config.option.thirdparty cases = list(run.collect_dir_tests(base_dir, test_files)) if thirdparty: cases.extend(run.collect_dir_tests( os.path.join(base_dir, 'thirdparty'), test_files, True)) ids = ["%s:%s" % (c.module_name, c.line_nr_test) for c in cases] metafunc.parametrize('case', cases, ids=ids) if 'refactor_case' in metafunc.fixturenames: base_dir = metafunc.config.option.refactor_case_dir metafunc.parametrize( 'refactor_case', refactor.collect_dir_tests(base_dir, test_files)) if 'static_analysis_case' in metafunc.fixturenames: base_dir = os.path.join(os.path.dirname(__file__), 'static_analysis') cases = list(collect_static_analysis_tests(base_dir, test_files)) metafunc.parametrize( 'static_analysis_case', cases, ids=[c.name for c in cases] ) def collect_static_analysis_tests(base_dir, test_files): for f_name in os.listdir(base_dir): files_to_execute = [a for a in test_files.items() if a[0] in f_name] if f_name.endswith(".py") and (not test_files or files_to_execute): path = os.path.join(base_dir, f_name) yield run.StaticAnalysisCase(path) @pytest.fixture(scope='session') def venv_path(tmpdir_factory, environment): if environment.version_info.major < 3: pytest.skip("python -m venv does not exist in Python 2") tmpdir = tmpdir_factory.mktemp('venv_path') dirname = os.path.join(tmpdir.dirname, 'venv') # We cannot use the Python from tox because tox creates virtualenvs and # they have different site.py files that work differently than the default # ones. Instead, we find the real Python executable by printing the value # of sys.base_prefix or sys.real_prefix if we are in a virtualenv. output = subprocess.check_output([ environment.executable, "-c", "import sys; " "print(sys.real_prefix if hasattr(sys, 'real_prefix') else sys.base_prefix)" ]) prefix = output.rstrip().decode('utf8') if os.name == 'nt': executable_path = os.path.join(prefix, 'python') else: executable_name = os.path.basename(environment.executable) executable_path = os.path.join(prefix, 'bin', executable_name) subprocess.call([executable_path, '-m', 'venv', dirname]) return dirname @pytest.fixture() def cwd_tmpdir(monkeypatch, tmpdir): with helpers.set_cwd(tmpdir.strpath): yield tmpdir @pytest.fixture def inference_state(Script): return Script('')._inference_state @pytest.fixture def same_process_inference_state(Script): return Script('', environment=InterpreterEnvironment())._inference_state @pytest.fixture def disable_typeshed(monkeypatch): from jedi.inference.gradual import typeshed monkeypatch.setattr(typeshed, '_load_from_typeshed', lambda *args, **kwargs: None) @pytest.fixture def create_compiled_object(inference_state): return lambda obj: create_from_access_path( inference_state, inference_state.compiled_subprocess.create_simple_object(obj) ) jedi-0.15.2/sith.py0000775000175000017500000001636413577124112013735 0ustar davedave00000000000000#!/usr/bin/env python """ Sith attacks (and helps debugging) Jedi. Randomly search Python files and run Jedi on it. Exception and used arguments are recorded to ``./record.json`` (specified by --record):: ./sith.py random /path/to/sourcecode Redo recorded exception:: ./sith.py redo Show recorded exception:: ./sith.py show Run a specific operation ./sith.py run Where operation is one of completions, goto_assignments, goto_definitions, usages, or call_signatures. Note: Line numbers start at 1; columns start at 0 (this is consistent with many text editors, including Emacs). Usage: sith.py [--pdb|--ipdb|--pudb] [-d] [-n=] [-f] [--record=] random [-s] [] sith.py [--pdb|--ipdb|--pudb] [-d] [-f] [--record=] redo sith.py [--pdb|--ipdb|--pudb] [-d] [-f] run sith.py show [--record=] sith.py -h | --help Options: -h --help Show this screen. --record= Exceptions are recorded in here [default: record.json]. -f, --fs-cache By default, file system cache is off for reproducibility. -n, --maxtries= Maximum of random tries [default: 100] -d, --debug Jedi print debugging when an error is raised. -s Shows the path/line numbers of every completion before it starts. --pdb Launch pdb when error is raised. --ipdb Launch ipdb when error is raised. --pudb Launch pudb when error is raised. """ from __future__ import print_function, division, unicode_literals from docopt import docopt import json import os import random import sys import traceback import jedi class SourceFinder(object): _files = None @staticmethod def fetch(file_path): if not os.path.isdir(file_path): yield file_path return for root, dirnames, filenames in os.walk(file_path): for name in filenames: if name.endswith('.py'): yield os.path.join(root, name) @classmethod def files(cls, file_path): if cls._files is None: cls._files = list(cls.fetch(file_path)) return cls._files class TestCase(object): def __init__(self, operation, path, line, column, traceback=None): if operation not in self.operations: raise ValueError("%s is not a valid operation" % operation) # Set other attributes self.operation = operation self.path = path self.line = line self.column = column self.traceback = traceback @classmethod def from_cache(cls, record): with open(record) as f: args = json.load(f) return cls(*args) operations = [ 'completions', 'goto_assignments', 'goto_definitions', 'usages', 'call_signatures'] @classmethod def generate(cls, file_path): operation = random.choice(cls.operations) path = random.choice(SourceFinder.files(file_path)) with open(path) as f: source = f.read() lines = source.splitlines() if not lines: lines = [''] line = random.randint(1, len(lines)) line_string = lines[line - 1] line_len = len(line_string) if line_string.endswith('\r\n'): line_len -= 1 if line_string.endswith('\n'): line_len -= 1 column = random.randint(0, line_len) return cls(operation, path, line, column) def run(self, debugger, record=None, print_result=False): try: with open(self.path) as f: self.script = jedi.Script(f.read(), self.line, self.column, self.path) kwargs = {} if self.operation == 'goto_assignments': kwargs['follow_imports'] = random.choice([False, True]) self.objects = getattr(self.script, self.operation)(**kwargs) if print_result: print("{path}: Line {line} column {column}".format(**self.__dict__)) self.show_location(self.line, self.column) self.show_operation() except Exception: self.traceback = traceback.format_exc() if record is not None: call_args = (self.operation, self.path, self.line, self.column, self.traceback) with open(record, 'w') as f: json.dump(call_args, f) self.show_errors() if debugger: einfo = sys.exc_info() pdb = __import__(debugger) if debugger == 'pudb': pdb.post_mortem(einfo[2], einfo[0], einfo[1]) else: pdb.post_mortem(einfo[2]) exit(1) def show_location(self, lineno, column, show=3): # Three lines ought to be enough lower = lineno - show if lineno - show > 0 else 0 prefix = ' |' for i, line in enumerate(self.script._source.split('\n')[lower:lineno]): print(prefix, lower + i + 1, line) print(prefix, ' ', ' ' * (column + len(str(lineno))), '^') def show_operation(self): print("%s:\n" % self.operation.capitalize()) if self.operation == 'completions': self.show_completions() else: self.show_definitions() def show_completions(self): for completion in self.objects: print(completion.name) def show_definitions(self): for completion in self.objects: print(completion.desc_with_module) if completion.module_path is None: continue if os.path.abspath(completion.module_path) == os.path.abspath(self.path): self.show_location(completion.line, completion.column) def show_errors(self): sys.stderr.write(self.traceback) print(("Error with running Script(...).{operation}() with\n" "\tpath: {path}\n" "\tline: {line}\n" "\tcolumn: {column}").format(**self.__dict__)) def main(arguments): debugger = 'pdb' if arguments['--pdb'] else \ 'ipdb' if arguments['--ipdb'] else \ 'pudb' if arguments['--pudb'] else None record = arguments['--record'] jedi.settings.use_filesystem_cache = arguments['--fs-cache'] if arguments['--debug']: jedi.set_debug_function() if arguments['redo'] or arguments['show']: t = TestCase.from_cache(record) if arguments['show']: t.show_errors() else: t.run(debugger) elif arguments['run']: TestCase( arguments[''], arguments[''], int(arguments['']), int(arguments['']) ).run(debugger, print_result=True) else: for _ in range(int(arguments['--maxtries'])): t = TestCase.generate(arguments[''] or '.') if arguments['-s']: print('%s %s %s %s ' % (t.operation, t.path, t.line, t.column)) sys.stdout.flush() else: print('.', end='') t.run(debugger, record) sys.stdout.flush() print() if __name__ == '__main__': arguments = docopt(__doc__) main(arguments) jedi-0.15.2/tox.ini0000664000175000017500000000231113577124112013707 0ustar davedave00000000000000[tox] envlist = py27, py35, py36, py37 [testenv] extras = testing deps = # for testing the typing module py27: typing py34: typing # numpydoc for typing scipy stack numpydoc # sphinx, a dependency of numpydoc, dropped Python 2 support in version 2.0 sphinx < 2.0 cov: coverage # Overwrite the parso version (only used sometimes). git+https://github.com/davidhalter/parso.git passenv = JEDI_TEST_ENVIRONMENT setenv = # https://github.com/tomchristie/django-rest-framework/issues/1957 # tox corrupts __pycache__, solution from here: PYTHONDONTWRITEBYTECODE=1 # Enable all warnings. PYTHONWARNINGS=always # To test Jedi in different versions than the same Python version, set a # different test environment. env27: JEDI_TEST_ENVIRONMENT=27 env34: JEDI_TEST_ENVIRONMENT=34 env35: JEDI_TEST_ENVIRONMENT=35 env36: JEDI_TEST_ENVIRONMENT=36 env37: JEDI_TEST_ENVIRONMENT=37 commands = pytest {posargs} [testenv:cov] commands = coverage run --source jedi -m pytest coverage report [testenv:sith] commands = {envpython} -c "import os; a='{envtmpdir}'; os.path.exists(a) or os.makedirs(a)" {envpython} sith.py --record {envtmpdir}/record.json random {posargs:jedi} jedi-0.15.2/jedi/0000775000175000017500000000000013577125145013321 5ustar davedave00000000000000jedi-0.15.2/jedi/refactoring.py0000664000175000017500000001556613577124112016204 0ustar davedave00000000000000""" THIS is not in active development, please check https://github.com/davidhalter/jedi/issues/667 first before editing. Introduce some basic refactoring functions to |jedi|. This module is still in a very early development stage and needs much testing and improvement. .. warning:: I won't do too much here, but if anyone wants to step in, please do. Refactoring is none of my priorities It uses the |jedi| `API `_ and supports currently the following functions (sometimes bug-prone): - rename - extract variable - inline variable """ import difflib from parso import python_bytes_to_unicode, split_lines from jedi.inference import helpers class Refactoring(object): def __init__(self, change_dct): """ :param change_dct: dict(old_path=(new_path, old_lines, new_lines)) """ self.change_dct = change_dct def old_files(self): dct = {} for old_path, (new_path, old_l, new_l) in self.change_dct.items(): dct[old_path] = '\n'.join(old_l) return dct def new_files(self): dct = {} for old_path, (new_path, old_l, new_l) in self.change_dct.items(): dct[new_path] = '\n'.join(new_l) return dct def diff(self): texts = [] for old_path, (new_path, old_l, new_l) in self.change_dct.items(): if old_path: udiff = difflib.unified_diff(old_l, new_l) else: udiff = difflib.unified_diff(old_l, new_l, old_path, new_path) texts.append('\n'.join(udiff)) return '\n'.join(texts) def rename(script, new_name): """ The `args` / `kwargs` params are the same as in `api.Script`. :param new_name: The new name of the script. :param script: The source Script object. :return: list of changed lines/changed files """ return Refactoring(_rename(script.usages(), new_name)) def _rename(names, replace_str): """ For both rename and inline. """ order = sorted(names, key=lambda x: (x.module_path, x.line, x.column), reverse=True) def process(path, old_lines, new_lines): if new_lines is not None: # goto next file, save last dct[path] = path, old_lines, new_lines dct = {} current_path = object() new_lines = old_lines = None for name in order: if name.in_builtin_module(): continue if current_path != name.module_path: current_path = name.module_path process(current_path, old_lines, new_lines) if current_path is not None: # None means take the source that is a normal param. with open(current_path) as f: source = f.read() new_lines = split_lines(python_bytes_to_unicode(source)) old_lines = new_lines[:] nr, indent = name.line, name.column line = new_lines[nr - 1] new_lines[nr - 1] = line[:indent] + replace_str + \ line[indent + len(name.name):] process(current_path, old_lines, new_lines) return dct def extract(script, new_name): """ The `args` / `kwargs` params are the same as in `api.Script`. :param operation: The refactoring operation to execute. :type operation: str :type source: str :return: list of changed lines/changed files """ new_lines = split_lines(python_bytes_to_unicode(script.source)) old_lines = new_lines[:] user_stmt = script._parser.user_stmt() # TODO care for multi-line extracts dct = {} if user_stmt: pos = script._pos line_index = pos[0] - 1 # Be careful here. 'array_for_pos' does not exist in 'helpers'. arr, index = helpers.array_for_pos(user_stmt, pos) if arr is not None: start_pos = arr[index].start_pos end_pos = arr[index].end_pos # take full line if the start line is different from end line e = end_pos[1] if end_pos[0] == start_pos[0] else None start_line = new_lines[start_pos[0] - 1] text = start_line[start_pos[1]:e] for l in range(start_pos[0], end_pos[0] - 1): text += '\n' + str(l) if e is None: end_line = new_lines[end_pos[0] - 1] text += '\n' + end_line[:end_pos[1]] # remove code from new lines t = text.lstrip() del_start = start_pos[1] + len(text) - len(t) text = t.rstrip() del_end = len(t) - len(text) if e is None: new_lines[end_pos[0] - 1] = end_line[end_pos[1] - del_end:] e = len(start_line) else: e = e - del_end start_line = start_line[:del_start] + new_name + start_line[e:] new_lines[start_pos[0] - 1] = start_line new_lines[start_pos[0]:end_pos[0] - 1] = [] # add parentheses in multi-line case open_brackets = ['(', '[', '{'] close_brackets = [')', ']', '}'] if '\n' in text and not (text[0] in open_brackets and text[-1] == close_brackets[open_brackets.index(text[0])]): text = '(%s)' % text # add new line before statement indent = user_stmt.start_pos[1] new = "%s%s = %s" % (' ' * indent, new_name, text) new_lines.insert(line_index, new) dct[script.path] = script.path, old_lines, new_lines return Refactoring(dct) def inline(script): """ :type script: api.Script """ new_lines = split_lines(python_bytes_to_unicode(script.source)) dct = {} definitions = script.goto_assignments() assert len(definitions) == 1 stmt = definitions[0]._definition usages = script.usages() inlines = [r for r in usages if not stmt.start_pos <= (r.line, r.column) <= stmt.end_pos] inlines = sorted(inlines, key=lambda x: (x.module_path, x.line, x.column), reverse=True) expression_list = stmt.expression_list() # don't allow multi-line refactorings for now. assert stmt.start_pos[0] == stmt.end_pos[0] index = stmt.start_pos[0] - 1 line = new_lines[index] replace_str = line[expression_list[0].start_pos[1]:stmt.end_pos[1] + 1] replace_str = replace_str.strip() # tuples need parentheses if expression_list and isinstance(expression_list[0], pr.Array): arr = expression_list[0] if replace_str[0] not in ['(', '[', '{'] and len(arr) > 1: replace_str = '(%s)' % replace_str # if it's the only assignment, remove the statement if len(stmt.get_defined_names()) == 1: line = line[:stmt.start_pos[1]] + line[stmt.end_pos[1]:] dct = _rename(inlines, replace_str) # remove the empty line new_lines = dct[script.path][2] if line.strip(): new_lines[index] = line else: new_lines.pop(index) return Refactoring(dct) jedi-0.15.2/jedi/utils.py0000664000175000017500000001114013577124112015021 0ustar davedave00000000000000""" Utilities for end-users. """ from __future__ import absolute_import import __main__ from collections import namedtuple import logging import traceback import re import os import sys from jedi import Interpreter READLINE_DEBUG = False def setup_readline(namespace_module=__main__, fuzzy=False): """ Install Jedi completer to :mod:`readline`. This function setups :mod:`readline` to use Jedi in Python interactive shell. If you want to use a custom ``PYTHONSTARTUP`` file (typically ``$HOME/.pythonrc.py``), you can add this piece of code:: try: from jedi.utils import setup_readline setup_readline() except ImportError: # Fallback to the stdlib readline completer if it is installed. # Taken from http://docs.python.org/2/library/rlcompleter.html print("Jedi is not installed, falling back to readline") try: import readline import rlcompleter readline.parse_and_bind("tab: complete") except ImportError: print("Readline is not installed either. No tab completion is enabled.") This will fallback to the readline completer if Jedi is not installed. The readline completer will only complete names in the global namespace, so for example:: ran will complete to ``range`` with both Jedi and readline, but:: range(10).cou will show complete to ``range(10).count`` only with Jedi. You'll also need to add ``export PYTHONSTARTUP=$HOME/.pythonrc.py`` to your shell profile (usually ``.bash_profile`` or ``.profile`` if you use bash). """ if READLINE_DEBUG: logging.basicConfig( filename='/tmp/jedi.log', filemode='a', level=logging.DEBUG ) class JediRL(object): def complete(self, text, state): """ This complete stuff is pretty weird, a generator would make a lot more sense, but probably due to backwards compatibility this is still the way how it works. The only important part is stuff in the ``state == 0`` flow, everything else has been copied from the ``rlcompleter`` std. library module. """ if state == 0: sys.path.insert(0, os.getcwd()) # Calling python doesn't have a path, so add to sys.path. try: logging.debug("Start REPL completion: " + repr(text)) interpreter = Interpreter(text, [namespace_module.__dict__]) completions = interpreter.completions(fuzzy=fuzzy) logging.debug("REPL completions: %s", completions) self.matches = [ text[:len(text) - c._like_name_length] + c.name_with_symbols for c in completions ] except: logging.error("REPL Completion error:\n" + traceback.format_exc()) raise finally: sys.path.pop(0) try: return self.matches[state] except IndexError: return None try: # Need to import this one as well to make sure it's executed before # this code. This didn't use to be an issue until 3.3. Starting with # 3.4 this is different, it always overwrites the completer if it's not # already imported here. import rlcompleter # noqa: F401 import readline except ImportError: print("Jedi: Module readline not available.") else: readline.set_completer(JediRL().complete) readline.parse_and_bind("tab: complete") # jedi itself does the case matching readline.parse_and_bind("set completion-ignore-case on") # because it's easier to hit the tab just once readline.parse_and_bind("set show-all-if-unmodified") readline.parse_and_bind("set show-all-if-ambiguous on") # don't repeat all the things written in the readline all the time readline.parse_and_bind("set completion-prefix-display-length 2") # No delimiters, Jedi handles that. readline.set_completer_delims('') def version_info(): """ Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ Version = namedtuple('Version', 'major, minor, micro') from jedi import __version__ tupl = re.findall(r'[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)]) jedi-0.15.2/jedi/common/0000775000175000017500000000000013577125145014611 5ustar davedave00000000000000jedi-0.15.2/jedi/common/utils.py0000664000175000017500000000114213577124112016312 0ustar davedave00000000000000import os from contextlib import contextmanager def traverse_parents(path, include_current=False): if not include_current: path = os.path.dirname(path) previous = None while previous != path: yield path previous = path path = os.path.dirname(path) @contextmanager def monkeypatch(obj, attribute_name, new_value): """ Like pytest's monkeypatch, but as a value manager. """ old_value = getattr(obj, attribute_name) try: setattr(obj, attribute_name, new_value) yield finally: setattr(obj, attribute_name, old_value) jedi-0.15.2/jedi/common/__init__.py0000664000175000017500000000006613577124112016715 0ustar davedave00000000000000from jedi.common.value import BaseValueSet, BaseValue jedi-0.15.2/jedi/common/value.py0000664000175000017500000000403413577124112016271 0ustar davedave00000000000000class BaseValue(object): def __init__(self, inference_state, parent_context=None): self.inference_state = inference_state self.parent_context = parent_context def get_root_context(self): value = self while True: if value.parent_context is None: return value value = value.parent_context class BaseValueSet(object): def __init__(self, iterable): self._set = frozenset(iterable) for value in iterable: assert not isinstance(value, BaseValueSet) @classmethod def _from_frozen_set(cls, frozenset_): self = cls.__new__(cls) self._set = frozenset_ return self @classmethod def from_sets(cls, sets): """ Used to work with an iterable of set. """ aggregated = set() for set_ in sets: if isinstance(set_, BaseValueSet): aggregated |= set_._set else: aggregated |= frozenset(set_) return cls._from_frozen_set(frozenset(aggregated)) def __or__(self, other): return self._from_frozen_set(self._set | other._set) def __and__(self, other): return self._from_frozen_set(self._set & other._set) def __iter__(self): for element in self._set: yield element def __bool__(self): return bool(self._set) def __len__(self): return len(self._set) def __repr__(self): return 'S{%s}' % (', '.join(str(s) for s in self._set)) def filter(self, filter_func): return self.__class__(filter(filter_func, self._set)) def __getattr__(self, name): def mapper(*args, **kwargs): return self.from_sets( getattr(value, name)(*args, **kwargs) for value in self._set ) return mapper def __eq__(self, other): return self._set == other._set def __ne__(self, other): return not self.__eq__(other) def __hash__(self): return hash(self._set) jedi-0.15.2/jedi/parser_utils.py0000664000175000017500000002125313577124112016403 0ustar davedave00000000000000import re import textwrap from inspect import cleandoc from weakref import WeakKeyDictionary from parso.python import tree from parso.cache import parser_cache from parso import split_lines from jedi._compatibility import literal_eval, force_unicode _EXECUTE_NODES = {'funcdef', 'classdef', 'import_from', 'import_name', 'test', 'or_test', 'and_test', 'not_test', 'comparison', 'expr', 'xor_expr', 'and_expr', 'shift_expr', 'arith_expr', 'atom_expr', 'term', 'factor', 'power', 'atom'} _FLOW_KEYWORDS = ( 'try', 'except', 'finally', 'else', 'if', 'elif', 'with', 'for', 'while' ) def get_executable_nodes(node, last_added=False): """ For static analysis. """ result = [] typ = node.type if typ == 'name': next_leaf = node.get_next_leaf() if last_added is False and node.parent.type != 'param' and next_leaf != '=': result.append(node) elif typ == 'expr_stmt': # I think inferring the statement (and possibly returned arrays), # should be enough for static analysis. result.append(node) for child in node.children: result += get_executable_nodes(child, last_added=True) elif typ == 'decorator': # decorator if node.children[-2] == ')': node = node.children[-3] if node != '(': result += get_executable_nodes(node) else: try: children = node.children except AttributeError: pass else: if node.type in _EXECUTE_NODES and not last_added: result.append(node) for child in children: result += get_executable_nodes(child, last_added) return result def get_sync_comp_fors(comp_for): yield comp_for last = comp_for.children[-1] while True: if last.type == 'comp_for': yield last.children[1] # Ignore the async. elif last.type == 'sync_comp_for': yield last elif not last.type == 'comp_if': break last = last.children[-1] def for_stmt_defines_one_name(for_stmt): """ Returns True if only one name is returned: ``for x in y``. Returns False if the for loop is more complicated: ``for x, z in y``. :returns: bool """ return for_stmt.children[1].type == 'name' def get_flow_branch_keyword(flow_node, node): start_pos = node.start_pos if not (flow_node.start_pos < start_pos <= flow_node.end_pos): raise ValueError('The node is not part of the flow.') keyword = None for i, child in enumerate(flow_node.children): if start_pos < child.start_pos: return keyword first_leaf = child.get_first_leaf() if first_leaf in _FLOW_KEYWORDS: keyword = first_leaf return 0 def clean_scope_docstring(scope_node): """ Returns a cleaned version of the docstring token. """ node = scope_node.get_doc_node() if node is not None: # TODO We have to check next leaves until there are no new # leaves anymore that might be part of the docstring. A # docstring can also look like this: ``'foo' 'bar' # Returns a literal cleaned version of the ``Token``. cleaned = cleandoc(safe_literal_eval(node.value)) # Since we want the docstr output to be always unicode, just # force it. return force_unicode(cleaned) return '' def safe_literal_eval(value): first_two = value[:2].lower() if first_two[0] == 'f' or first_two in ('fr', 'rf'): # literal_eval is not able to resovle f literals. We have to do that # manually, but that's right now not implemented. return '' try: return literal_eval(value) except SyntaxError: # It's possible to create syntax errors with literals like rb'' in # Python 2. This should not be possible and in that case just return an # empty string. # Before Python 3.3 there was a more strict definition in which order # you could define literals. return '' def get_call_signature(funcdef, width=72, call_string=None, omit_first_param=False, omit_return_annotation=False): """ Generate call signature of this function. :param width: Fold lines if a line is longer than this value. :type width: int :arg func_name: Override function name when given. :type func_name: str :rtype: str """ # Lambdas have no name. if call_string is None: if funcdef.type == 'lambdef': call_string = '' else: call_string = funcdef.name.value params = funcdef.get_params() if omit_first_param: params = params[1:] p = '(' + ''.join(param.get_code() for param in params).strip() + ')' # TODO this is pretty bad, we should probably just normalize. p = re.sub(r'\s+', ' ', p) if funcdef.annotation and not omit_return_annotation: rtype = " ->" + funcdef.annotation.get_code() else: rtype = "" code = call_string + p + rtype return '\n'.join(textwrap.wrap(code, width)) def move(node, line_offset): """ Move the `Node` start_pos. """ try: children = node.children except AttributeError: node.line += line_offset else: for c in children: move(c, line_offset) def get_following_comment_same_line(node): """ returns (as string) any comment that appears on the same line, after the node, including the # """ try: if node.type == 'for_stmt': whitespace = node.children[5].get_first_leaf().prefix elif node.type == 'with_stmt': whitespace = node.children[3].get_first_leaf().prefix elif node.type == 'funcdef': # actually on the next line whitespace = node.children[4].get_first_leaf().get_next_leaf().prefix else: whitespace = node.get_last_leaf().get_next_leaf().prefix except AttributeError: return None except ValueError: # TODO in some particular cases, the tree doesn't seem to be linked # correctly return None if "#" not in whitespace: return None comment = whitespace[whitespace.index("#"):] if "\r" in comment: comment = comment[:comment.index("\r")] if "\n" in comment: comment = comment[:comment.index("\n")] return comment def is_scope(node): t = node.type if t == 'comp_for': # Starting with Python 3.8, async is outside of the statement. return node.children[1].type != 'sync_comp_for' return t in ('file_input', 'classdef', 'funcdef', 'lambdef', 'sync_comp_for') def _get_parent_scope_cache(func): cache = WeakKeyDictionary() def wrapper(used_names, node, include_flows=False): try: for_module = cache[used_names] except KeyError: for_module = cache[used_names] = {} try: return for_module[node] except KeyError: result = for_module[node] = func(node, include_flows) return result return wrapper def get_parent_scope(node, include_flows=False): """ Returns the underlying scope. """ scope = node.parent if scope is None: return None # It's a module already. while True: if is_scope(scope) or include_flows and isinstance(scope, tree.Flow): if scope.type in ('classdef', 'funcdef', 'lambdef'): index = scope.children.index(':') if scope.children[index].start_pos >= node.start_pos: if node.parent.type == 'param' and node.parent.name == node: pass elif node.parent.type == 'tfpdef' and node.parent.children[0] == node: pass else: scope = scope.parent continue return scope scope = scope.parent return scope get_cached_parent_scope = _get_parent_scope_cache(get_parent_scope) def get_cached_code_lines(grammar, path): """ Basically access the cached code lines in parso. This is not the nicest way to do this, but we avoid splitting all the lines again. """ return parser_cache[grammar._hashed][path].lines def cut_value_at_position(leaf, position): """ Cuts of the value of the leaf at position """ lines = split_lines(leaf.value, keepends=True)[:position[0] - leaf.line + 1] column = position[1] if leaf.line == position[0]: column -= leaf.column lines[-1] = lines[-1][:column] return ''.join(lines) def get_string_quote(leaf): return re.match(r'\w*("""|\'{3}|"|\')', leaf.value).group(1) jedi-0.15.2/jedi/__init__.py0000664000175000017500000000332113577124112015422 0ustar davedave00000000000000""" Jedi is a static analysis tool for Python that can be used in IDEs/editors. Jedi has a focus on autocompletion and goto functionality. Jedi is fast and is very well tested. It understands Python and stubs on a deep level. Jedi has support for different goto functions. It's possible to search for usages and list names in a Python file to get information about them. Jedi uses a very simple API to connect with IDE's. There's a reference implementation as a `VIM-Plugin `_, which uses Jedi's autocompletion. We encourage you to use Jedi in your IDEs. Autocompletion in your REPL is also possible, IPython uses it natively and for the CPython REPL you have to install it. Here's a simple example of the autocompletion feature: >>> import jedi >>> source = ''' ... import json ... json.lo''' >>> script = jedi.Script(source, 3, len('json.lo'), 'example.py') >>> script >>> completions = script.completions() >>> completions [, ] >>> print(completions[0].complete) ad >>> print(completions[0].name) load As you see Jedi is pretty simple and allows you to concentrate on writing a good text editor, while still having very good IDE features for Python. """ __version__ = '0.15.2' from jedi.api import Script, Interpreter, set_debug_function, \ preload_module, names from jedi import settings from jedi.api.environment import find_virtualenvs, find_system_environments, \ get_default_environment, InvalidPythonEnvironment, create_environment, \ get_system_environment from jedi.api.exceptions import InternalError # Finally load the internal plugins. This is only internal. from jedi.plugins import registry del registry jedi-0.15.2/jedi/_compatibility.py0000664000175000017500000005656113577124112016711 0ustar davedave00000000000000""" To ensure compatibility from Python ``2.7`` - ``3.x``, a module has been created. Clearly there is huge need to use conforming syntax. """ from __future__ import print_function import atexit import errno import functools import sys import os import re import pkgutil import warnings import inspect import subprocess import weakref try: import importlib except ImportError: pass from zipimport import zipimporter from jedi.file_io import KnownContentFileIO, ZipFileIO is_py3 = sys.version_info[0] >= 3 is_py35 = is_py3 and sys.version_info[1] >= 5 py_version = int(str(sys.version_info[0]) + str(sys.version_info[1])) if sys.version_info[:2] < (3, 5): """ A super-minimal shim around listdir that behave like scandir for the information we need. """ class _DirEntry: def __init__(self, name, basepath): self.name = name self.basepath = basepath def is_dir(self): path_for_name = os.path.join(self.basepath, self.name) return os.path.isdir(path_for_name) def scandir(dir): return [_DirEntry(name, dir) for name in os.listdir(dir)] else: from os import scandir class DummyFile(object): def __init__(self, loader, string): self.loader = loader self.string = string def read(self): return self.loader.get_source(self.string) def close(self): del self.loader def find_module_py34(string, path=None, full_name=None, is_global_search=True): spec = None loader = None for finder in sys.meta_path: if is_global_search and finder != importlib.machinery.PathFinder: p = None else: p = path try: find_spec = finder.find_spec except AttributeError: # These are old-school clases that still have a different API, just # ignore those. continue spec = find_spec(string, p) if spec is not None: loader = spec.loader if loader is None and not spec.has_location: # This is a namespace package. full_name = string if not path else full_name implicit_ns_info = ImplicitNSInfo(full_name, spec.submodule_search_locations._path) return implicit_ns_info, True break return find_module_py33(string, path, loader) def find_module_py33(string, path=None, loader=None, full_name=None, is_global_search=True): loader = loader or importlib.machinery.PathFinder.find_module(string, path) if loader is None and path is None: # Fallback to find builtins try: with warnings.catch_warnings(record=True): # Mute "DeprecationWarning: Use importlib.util.find_spec() # instead." While we should replace that in the future, it's # probably good to wait until we deprecate Python 3.3, since # it was added in Python 3.4 and find_loader hasn't been # removed in 3.6. loader = importlib.find_loader(string) except ValueError as e: # See #491. Importlib might raise a ValueError, to avoid this, we # just raise an ImportError to fix the issue. raise ImportError("Originally " + repr(e)) if loader is None: raise ImportError("Couldn't find a loader for {}".format(string)) return _from_loader(loader, string) def _from_loader(loader, string): is_package = loader.is_package(string) try: get_filename = loader.get_filename except AttributeError: return None, is_package else: module_path = cast_path(get_filename(string)) # To avoid unicode and read bytes, "overwrite" loader.get_source if # possible. f = type(loader).get_source if is_py3 and f is not importlib.machinery.SourceFileLoader.get_source: # Unfortunately we are reading unicode here, not bytes. # It seems hard to get bytes, because the zip importer # logic just unpacks the zip file and returns a file descriptor # that we cannot as easily access. Therefore we just read it as # a string in the cases where get_source was overwritten. code = loader.get_source(string) else: code = _get_source(loader, string) if code is None: return None, is_package if isinstance(loader, zipimporter): return ZipFileIO(module_path, code, cast_path(loader.archive)), is_package return KnownContentFileIO(module_path, code), is_package def _get_source(loader, fullname): """ This method is here as a replacement for SourceLoader.get_source. That method returns unicode, but we prefer bytes. """ path = loader.get_filename(fullname) try: return loader.get_data(path) except OSError: raise ImportError('source not available through get_data()', name=fullname) def find_module_pre_py3(string, path=None, full_name=None, is_global_search=True): # This import is here, because in other places it will raise a # DeprecationWarning. import imp try: module_file, module_path, description = imp.find_module(string, path) module_type = description[2] is_package = module_type is imp.PKG_DIRECTORY if is_package: # In Python 2 directory package imports are returned as folder # paths, not __init__.py paths. p = os.path.join(module_path, '__init__.py') try: module_file = open(p) module_path = p except FileNotFoundError: pass elif module_type != imp.PY_SOURCE: if module_file is not None: module_file.close() module_file = None if module_file is None: code = None return None, is_package with module_file: code = module_file.read() return KnownContentFileIO(cast_path(module_path), code), is_package except ImportError: pass if path is None: path = sys.path for item in path: loader = pkgutil.get_importer(item) if loader: loader = loader.find_module(string) if loader is not None: return _from_loader(loader, string) raise ImportError("No module named {}".format(string)) find_module = find_module_py34 if is_py3 else find_module_pre_py3 find_module.__doc__ = """ Provides information about a module. This function isolates the differences in importing libraries introduced with python 3.3 on; it gets a module name and optionally a path. It will return a tuple containin an open file for the module (if not builtin), the filename or the name of the module if it is a builtin one and a boolean indicating if the module is contained in a package. """ def _iter_modules(paths, prefix=''): # Copy of pkgutil.iter_modules adapted to work with namespaces for path in paths: importer = pkgutil.get_importer(path) if not isinstance(importer, importlib.machinery.FileFinder): # We're only modifying the case for FileFinder. All the other cases # still need to be checked (like zip-importing). Do this by just # calling the pkgutil version. for mod_info in pkgutil.iter_modules([path], prefix): yield mod_info continue # START COPY OF pkutils._iter_file_finder_modules. if importer.path is None or not os.path.isdir(importer.path): return yielded = {} try: filenames = os.listdir(importer.path) except OSError: # ignore unreadable directories like import does filenames = [] filenames.sort() # handle packages before same-named modules for fn in filenames: modname = inspect.getmodulename(fn) if modname == '__init__' or modname in yielded: continue # jedi addition: Avoid traversing special directories if fn.startswith('.') or fn == '__pycache__': continue path = os.path.join(importer.path, fn) ispkg = False if not modname and os.path.isdir(path) and '.' not in fn: modname = fn # A few jedi modifications: Don't check if there's an # __init__.py try: os.listdir(path) except OSError: # ignore unreadable directories like import does continue ispkg = True if modname and '.' not in modname: yielded[modname] = 1 yield importer, prefix + modname, ispkg # END COPY iter_modules = _iter_modules if py_version >= 34 else pkgutil.iter_modules class ImplicitNSInfo(object): """Stores information returned from an implicit namespace spec""" def __init__(self, name, paths): self.name = name self.paths = paths if is_py3: all_suffixes = importlib.machinery.all_suffixes else: def all_suffixes(): # Is deprecated and raises a warning in Python 3.6. import imp return [suffix for suffix, _, _ in imp.get_suffixes()] # unicode function try: unicode = unicode except NameError: unicode = str # re-raise function if is_py3: def reraise(exception, traceback): raise exception.with_traceback(traceback) else: eval(compile(""" def reraise(exception, traceback): raise exception, None, traceback """, 'blub', 'exec')) reraise.__doc__ = """ Re-raise `exception` with a `traceback` object. Usage:: reraise(Exception, sys.exc_info()[2]) """ def use_metaclass(meta, *bases): """ Create a class with a metaclass. """ if not bases: bases = (object,) return meta("Py2CompatibilityMetaClass", bases, {}) try: encoding = sys.stdout.encoding if encoding is None: encoding = 'utf-8' except AttributeError: encoding = 'ascii' def u(string, errors='strict'): """Cast to unicode DAMMIT! Written because Python2 repr always implicitly casts to a string, so we have to cast back to a unicode (and we now that we always deal with valid unicode, because we check that in the beginning). """ if isinstance(string, bytes): return unicode(string, encoding='UTF-8', errors=errors) return string def cast_path(obj): """ Take a bytes or str path and cast it to unicode. Apparently it is perfectly fine to pass both byte and unicode objects into the sys.path. This probably means that byte paths are normal at other places as well. Since this just really complicates everything and Python 2.7 will be EOL soon anyway, just go with always strings. """ return u(obj, errors='replace') def force_unicode(obj): # Intentionally don't mix those two up, because those two code paths might # be different in the future (maybe windows?). return cast_path(obj) try: import builtins # module name in python 3 except ImportError: import __builtin__ as builtins # noqa: F401 import ast # noqa: F401 def literal_eval(string): return ast.literal_eval(string) try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest # Python 2 # noqa: F401 try: FileNotFoundError = FileNotFoundError except NameError: FileNotFoundError = IOError try: IsADirectoryError = IsADirectoryError except NameError: IsADirectoryError = IOError try: PermissionError = PermissionError except NameError: PermissionError = IOError def no_unicode_pprint(dct): """ Python 2/3 dict __repr__ may be different, because of unicode differens (with or without a `u` prefix). Normally in doctests we could use `pprint` to sort dicts and check for equality, but here we have to write a separate function to do that. """ import pprint s = pprint.pformat(dct) print(re.sub("u'", "'", s)) def utf8_repr(func): """ ``__repr__`` methods in Python 2 don't allow unicode objects to be returned. Therefore cast them to utf-8 bytes in this decorator. """ def wrapper(self): result = func(self) if isinstance(result, unicode): return result.encode('utf-8') else: return result if is_py3: return func else: return wrapper if is_py3: import queue else: import Queue as queue # noqa: F401 try: # Attempt to load the C implementation of pickle on Python 2 as it is way # faster. import cPickle as pickle except ImportError: import pickle if sys.version_info[:2] == (3, 3): """ Monkeypatch the unpickler in Python 3.3. This is needed, because the argument `encoding='bytes'` is not supported in 3.3, but badly needed to communicate with Python 2. """ class NewUnpickler(pickle._Unpickler): dispatch = dict(pickle._Unpickler.dispatch) def _decode_string(self, value): # Used to allow strings from Python 2 to be decoded either as # bytes or Unicode strings. This should be used only with the # STRING, BINSTRING and SHORT_BINSTRING opcodes. if self.encoding == "bytes": return value else: return value.decode(self.encoding, self.errors) def load_string(self): data = self.readline()[:-1] # Strip outermost quotes if len(data) >= 2 and data[0] == data[-1] and data[0] in b'"\'': data = data[1:-1] else: raise pickle.UnpicklingError("the STRING opcode argument must be quoted") self.append(self._decode_string(pickle.codecs.escape_decode(data)[0])) dispatch[pickle.STRING[0]] = load_string def load_binstring(self): # Deprecated BINSTRING uses signed 32-bit length len, = pickle.struct.unpack(' 5: from inspect import unwrap else: # Only Python >=3.6 does properly limit the amount of unwraps. This is very # relevant in the case of unittest.mock.patch. # Below is the implementation of Python 3.7. def unwrap(func, stop=None): """Get the object wrapped by *func*. Follows the chain of :attr:`__wrapped__` attributes returning the last object in the chain. *stop* is an optional callback accepting an object in the wrapper chain as its sole argument that allows the unwrapping to be terminated early if the callback returns a true value. If the callback never returns a true value, the last object in the chain is returned as usual. For example, :func:`signature` uses this to stop unwrapping if any object in the chain has a ``__signature__`` attribute defined. :exc:`ValueError` is raised if a cycle is encountered. """ if stop is None: def _is_wrapper(f): return hasattr(f, '__wrapped__') else: def _is_wrapper(f): return hasattr(f, '__wrapped__') and not stop(f) f = func # remember the original func for error reporting # Memoise by id to tolerate non-hashable objects, but store objects to # ensure they aren't destroyed, which would allow their IDs to be reused. memo = {id(f): f} recursion_limit = sys.getrecursionlimit() while _is_wrapper(func): func = func.__wrapped__ id_func = id(func) if (id_func in memo) or (len(memo) >= recursion_limit): raise ValueError('wrapper loop when unwrapping {!r}'.format(f)) memo[id_func] = func return func jedi-0.15.2/jedi/api/0000775000175000017500000000000013577125145014072 5ustar davedave00000000000000jedi-0.15.2/jedi/api/environment.py0000664000175000017500000004111313577124112017001 0ustar davedave00000000000000""" Environments are a way to activate different Python versions or Virtualenvs for static analysis. The Python binary in that environment is going to be executed. """ import os import sys import hashlib import filecmp from collections import namedtuple from jedi._compatibility import highest_pickle_protocol, which from jedi.cache import memoize_method, time_cache from jedi.inference.compiled.subprocess import CompiledSubprocess, \ InferenceStateSameProcess, InferenceStateSubprocess import parso _VersionInfo = namedtuple('VersionInfo', 'major minor micro') _SUPPORTED_PYTHONS = ['3.8', '3.7', '3.6', '3.5', '3.4', '2.7'] _SAFE_PATHS = ['/usr/bin', '/usr/local/bin'] _CONDA_VAR = 'CONDA_PREFIX' _CURRENT_VERSION = '%s.%s' % (sys.version_info.major, sys.version_info.minor) class InvalidPythonEnvironment(Exception): """ If you see this exception, the Python executable or Virtualenv you have been trying to use is probably not a correct Python version. """ class _BaseEnvironment(object): @memoize_method def get_grammar(self): version_string = '%s.%s' % (self.version_info.major, self.version_info.minor) return parso.load_grammar(version=version_string) @property def _sha256(self): try: return self._hash except AttributeError: self._hash = _calculate_sha256_for_file(self.executable) return self._hash def _get_info(): return ( sys.executable, sys.prefix, sys.version_info[:3], ) class Environment(_BaseEnvironment): """ This class is supposed to be created by internal Jedi architecture. You should not create it directly. Please use create_environment or the other functions instead. It is then returned by that function. """ _subprocess = None def __init__(self, executable): self._start_executable = executable # Initialize the environment self._get_subprocess() def _get_subprocess(self): if self._subprocess is not None and not self._subprocess.is_crashed: return self._subprocess try: self._subprocess = CompiledSubprocess(self._start_executable) info = self._subprocess._send(None, _get_info) except Exception as exc: raise InvalidPythonEnvironment( "Could not get version information for %r: %r" % ( self._start_executable, exc)) # Since it could change and might not be the same(?) as the one given, # set it here. self.executable = info[0] """ The Python executable, matches ``sys.executable``. """ self.path = info[1] """ The path to an environment, matches ``sys.prefix``. """ self.version_info = _VersionInfo(*info[2]) """ Like ``sys.version_info``. A tuple to show the current Environment's Python version. """ # py2 sends bytes via pickle apparently?! if self.version_info.major == 2: self.executable = self.executable.decode() self.path = self.path.decode() # Adjust pickle protocol according to host and client version. self._subprocess._pickle_protocol = highest_pickle_protocol([ sys.version_info, self.version_info]) return self._subprocess def __repr__(self): version = '.'.join(str(i) for i in self.version_info) return '<%s: %s in %s>' % (self.__class__.__name__, version, self.path) def get_inference_state_subprocess(self, inference_state): return InferenceStateSubprocess(inference_state, self._get_subprocess()) @memoize_method def get_sys_path(self): """ The sys path for this environment. Does not include potential modifications like ``sys.path.append``. :returns: list of str """ # It's pretty much impossible to generate the sys path without actually # executing Python. The sys path (when starting with -S) itself depends # on how the Python version was compiled (ENV variables). # If you omit -S when starting Python (normal case), additionally # site.py gets executed. return self._get_subprocess().get_sys_path() class _SameEnvironmentMixin(object): def __init__(self): self._start_executable = self.executable = sys.executable self.path = sys.prefix self.version_info = _VersionInfo(*sys.version_info[:3]) class SameEnvironment(_SameEnvironmentMixin, Environment): pass class InterpreterEnvironment(_SameEnvironmentMixin, _BaseEnvironment): def get_inference_state_subprocess(self, inference_state): return InferenceStateSameProcess(inference_state) def get_sys_path(self): return sys.path def _get_virtual_env_from_var(env_var='VIRTUAL_ENV'): """Get virtualenv environment from VIRTUAL_ENV environment variable. It uses `safe=False` with ``create_environment``, because the environment variable is considered to be safe / controlled by the user solely. """ var = os.environ.get(env_var) if var: # Under macOS in some cases - notably when using Pipenv - the # sys.prefix of the virtualenv is /path/to/env/bin/.. instead of # /path/to/env so we need to fully resolve the paths in order to # compare them. if os.path.realpath(var) == os.path.realpath(sys.prefix): return _try_get_same_env() try: return create_environment(var, safe=False) except InvalidPythonEnvironment: pass def _calculate_sha256_for_file(path): sha256 = hashlib.sha256() with open(path, 'rb') as f: for block in iter(lambda: f.read(filecmp.BUFSIZE), b''): sha256.update(block) return sha256.hexdigest() def get_default_environment(): """ Tries to return an active Virtualenv or conda environment. If there is no VIRTUAL_ENV variable or no CONDA_PREFIX variable set set it will return the latest Python version installed on the system. This makes it possible to use as many new Python features as possible when using autocompletion and other functionality. :returns: :class:`Environment` """ virtual_env = _get_virtual_env_from_var() if virtual_env is not None: return virtual_env conda_env = _get_virtual_env_from_var(_CONDA_VAR) if conda_env is not None: return conda_env return _try_get_same_env() def _try_get_same_env(): env = SameEnvironment() if not os.path.basename(env.executable).lower().startswith('python'): # This tries to counter issues with embedding. In some cases (e.g. # VIM's Python Mac/Windows, sys.executable is /foo/bar/vim. This # happens, because for Mac a function called `_NSGetExecutablePath` is # used and for Windows `GetModuleFileNameW`. These are both platform # specific functions. For all other systems sys.executable should be # alright. However here we try to generalize: # # 1. Check if the executable looks like python (heuristic) # 2. In case it's not try to find the executable # 3. In case we don't find it use an interpreter environment. # # The last option will always work, but leads to potential crashes of # Jedi - which is ok, because it happens very rarely and even less, # because the code below should work for most cases. if os.name == 'nt': # The first case would be a virtualenv and the second a normal # Python installation. checks = (r'Scripts\python.exe', 'python.exe') else: # For unix it looks like Python is always in a bin folder. checks = ( 'bin/python%s.%s' % (sys.version_info[0], sys.version[1]), 'bin/python%s' % (sys.version_info[0]), 'bin/python', ) for check in checks: guess = os.path.join(sys.exec_prefix, check) if os.path.isfile(guess): # Bingo - We think we have our Python. return Environment(guess) # It looks like there is no reasonable Python to be found. return InterpreterEnvironment() # If no virtualenv is found, use the environment we're already # using. return env def get_cached_default_environment(): var = os.environ.get('VIRTUAL_ENV') or os.environ.get(_CONDA_VAR) environment = _get_cached_default_environment() # Under macOS in some cases - notably when using Pipenv - the # sys.prefix of the virtualenv is /path/to/env/bin/.. instead of # /path/to/env so we need to fully resolve the paths in order to # compare them. if var and os.path.realpath(var) != os.path.realpath(environment.path): _get_cached_default_environment.clear_cache() return _get_cached_default_environment() return environment @time_cache(seconds=10 * 60) # 10 Minutes def _get_cached_default_environment(): return get_default_environment() def find_virtualenvs(paths=None, **kwargs): """ :param paths: A list of paths in your file system to be scanned for Virtualenvs. It will search in these paths and potentially execute the Python binaries. :param safe: Default True. In case this is False, it will allow this function to execute potential `python` environments. An attacker might be able to drop an executable in a path this function is searching by default. If the executable has not been installed by root, it will not be executed. :param use_environment_vars: Default True. If True, the VIRTUAL_ENV variable will be checked if it contains a valid VirtualEnv. CONDA_PREFIX will be checked to see if it contains a valid conda environment. :yields: :class:`Environment` """ def py27_comp(paths=None, safe=True, use_environment_vars=True): if paths is None: paths = [] _used_paths = set() if use_environment_vars: # Using this variable should be safe, because attackers might be # able to drop files (via git) but not environment variables. virtual_env = _get_virtual_env_from_var() if virtual_env is not None: yield virtual_env _used_paths.add(virtual_env.path) conda_env = _get_virtual_env_from_var(_CONDA_VAR) if conda_env is not None: yield conda_env _used_paths.add(conda_env.path) for directory in paths: if not os.path.isdir(directory): continue directory = os.path.abspath(directory) for path in os.listdir(directory): path = os.path.join(directory, path) if path in _used_paths: # A path shouldn't be inferred twice. continue _used_paths.add(path) try: executable = _get_executable_path(path, safe=safe) yield Environment(executable) except InvalidPythonEnvironment: pass return py27_comp(paths, **kwargs) def find_system_environments(): """ Ignores virtualenvs and returns the Python versions that were installed on your system. This might return nothing, if you're running Python e.g. from a portable version. The environments are sorted from latest to oldest Python version. :yields: :class:`Environment` """ for version_string in _SUPPORTED_PYTHONS: try: yield get_system_environment(version_string) except InvalidPythonEnvironment: pass # TODO: this function should probably return a list of environments since # multiple Python installations can be found on a system for the same version. def get_system_environment(version): """ Return the first Python environment found for a string of the form 'X.Y' where X and Y are the major and minor versions of Python. :raises: :exc:`.InvalidPythonEnvironment` :returns: :class:`Environment` """ exe = which('python' + version) if exe: if exe == sys.executable: return SameEnvironment() return Environment(exe) if os.name == 'nt': for exe in _get_executables_from_windows_registry(version): try: return Environment(exe) except InvalidPythonEnvironment: pass raise InvalidPythonEnvironment("Cannot find executable python%s." % version) def create_environment(path, safe=True): """ Make it possible to manually create an Environment object by specifying a Virtualenv path or an executable path. :raises: :exc:`.InvalidPythonEnvironment` :returns: :class:`Environment` """ if os.path.isfile(path): _assert_safe(path, safe) return Environment(path) return Environment(_get_executable_path(path, safe=safe)) def _get_executable_path(path, safe=True): """ Returns None if it's not actually a virtual env. """ if os.name == 'nt': python = os.path.join(path, 'Scripts', 'python.exe') else: python = os.path.join(path, 'bin', 'python') if not os.path.exists(python): raise InvalidPythonEnvironment("%s seems to be missing." % python) _assert_safe(python, safe) return python def _get_executables_from_windows_registry(version): # The winreg module is named _winreg on Python 2. try: import winreg except ImportError: import _winreg as winreg # TODO: support Python Anaconda. sub_keys = [ r'SOFTWARE\Python\PythonCore\{version}\InstallPath', r'SOFTWARE\Wow6432Node\Python\PythonCore\{version}\InstallPath', r'SOFTWARE\Python\PythonCore\{version}-32\InstallPath', r'SOFTWARE\Wow6432Node\Python\PythonCore\{version}-32\InstallPath' ] for root_key in [winreg.HKEY_CURRENT_USER, winreg.HKEY_LOCAL_MACHINE]: for sub_key in sub_keys: sub_key = sub_key.format(version=version) try: with winreg.OpenKey(root_key, sub_key) as key: prefix = winreg.QueryValueEx(key, '')[0] exe = os.path.join(prefix, 'python.exe') if os.path.isfile(exe): yield exe except WindowsError: pass def _assert_safe(executable_path, safe): if safe and not _is_safe(executable_path): raise InvalidPythonEnvironment( "The python binary is potentially unsafe.") def _is_safe(executable_path): # Resolve sym links. A venv typically is a symlink to a known Python # binary. Only virtualenvs copy symlinks around. real_path = os.path.realpath(executable_path) if _is_unix_safe_simple(real_path): return True # Just check the list of known Python versions. If it's not in there, # it's likely an attacker or some Python that was not properly # installed in the system. for environment in find_system_environments(): if environment.executable == real_path: return True # If the versions don't match, just compare the binary files. If we # don't do that, only venvs will be working and not virtualenvs. # venvs are symlinks while virtualenvs are actual copies of the # Python files. # This still means that if the system Python is updated and the # virtualenv's Python is not (which is probably never going to get # upgraded), it will not work with Jedi. IMO that's fine, because # people should just be using venv. ~ dave if environment._sha256 == _calculate_sha256_for_file(real_path): return True return False def _is_unix_safe_simple(real_path): if _is_unix_admin(): # In case we are root, just be conservative and # only execute known paths. return any(real_path.startswith(p) for p in _SAFE_PATHS) uid = os.stat(real_path).st_uid # The interpreter needs to be owned by root. This means that it wasn't # written by a user and therefore attacking Jedi is not as simple. # The attack could look like the following: # 1. A user clones a repository. # 2. The repository has an innocent looking folder called foobar. jedi # searches for the folder and executes foobar/bin/python --version if # there's also a foobar/bin/activate. # 3. The bin/python is obviously not a python script but a bash script or # whatever the attacker wants. return uid == 0 def _is_unix_admin(): try: return os.getuid() == 0 except AttributeError: return False # Windows jedi-0.15.2/jedi/api/file_name.py0000664000175000017500000001416613577124112016364 0ustar davedave00000000000000import os from jedi._compatibility import FileNotFoundError, force_unicode, scandir from jedi.inference.names import AbstractArbitraryName from jedi.api import classes from jedi.api.helpers import fuzzy_match, start_match from jedi.inference.helpers import get_str_or_none from jedi.parser_utils import get_string_quote def file_name_completions(inference_state, module_context, start_leaf, string, like_name, call_signatures_callback, code_lines, position, fuzzy): # First we want to find out what can actually be changed as a name. like_name_length = len(os.path.basename(string) + like_name) addition = _get_string_additions(module_context, start_leaf) if addition is None: return string = addition + string # Here we use basename again, because if strings are added like # `'foo' + 'bar`, it should complete to `foobar/`. must_start_with = os.path.basename(string) + like_name string = os.path.dirname(string) sigs = call_signatures_callback() is_in_os_path_join = sigs and all(s.full_name == 'os.path.join' for s in sigs) if is_in_os_path_join: to_be_added = _add_os_path_join(module_context, start_leaf, sigs[0].bracket_start) if to_be_added is None: is_in_os_path_join = False else: string = to_be_added + string base_path = os.path.join(inference_state.project._path, string) try: listed = sorted(scandir(base_path), key=lambda e: e.name) # OSError: [Errno 36] File name too long: '...' except (FileNotFoundError, OSError): return for entry in listed: name = entry.name if fuzzy: match = fuzzy_match(name, must_start_with) else: match = start_match(name, must_start_with) if match: if is_in_os_path_join or not entry.is_dir(): if start_leaf.type == 'string': quote = get_string_quote(start_leaf) else: assert start_leaf.type == 'error_leaf' quote = start_leaf.value potential_other_quote = \ code_lines[position[0] - 1][position[1]:position[1] + len(quote)] # Add a quote if it's not already there. if quote != potential_other_quote: name += quote else: name += os.path.sep yield classes.Completion( inference_state, FileName(inference_state, name[len(must_start_with) - like_name_length:]), stack=None, like_name_length=like_name_length, is_fuzzy=fuzzy, ) def _get_string_additions(module_context, start_leaf): def iterate_nodes(): node = addition.parent was_addition = True for child_node in reversed(node.children[:node.children.index(addition)]): if was_addition: was_addition = False yield child_node continue if child_node != '+': break was_addition = True addition = start_leaf.get_previous_leaf() if addition != '+': return '' context = module_context.create_context(start_leaf) return _add_strings(context, reversed(list(iterate_nodes()))) def _add_strings(context, nodes, add_slash=False): string = '' first = True for child_node in nodes: values = context.infer_node(child_node) if len(values) != 1: return None c, = values s = get_str_or_none(c) if s is None: return None if not first and add_slash: string += os.path.sep string += force_unicode(s) first = False return string class FileName(AbstractArbitraryName): api_type = u'path' is_value_name = False def _add_os_path_join(module_context, start_leaf, bracket_start): def check(maybe_bracket, nodes): if maybe_bracket.start_pos != bracket_start: return None if not nodes: return '' context = module_context.create_context(nodes[0]) return _add_strings(context, nodes, add_slash=True) or '' if start_leaf.type == 'error_leaf': # Unfinished string literal, like `join('` value_node = start_leaf.parent index = value_node.children.index(start_leaf) if index > 0: error_node = value_node.children[index - 1] if error_node.type == 'error_node' and len(error_node.children) >= 2: index = -2 if error_node.children[-1].type == 'arglist': arglist_nodes = error_node.children[-1].children index -= 1 else: arglist_nodes = [] return check(error_node.children[index + 1], arglist_nodes[::2]) return None # Maybe an arglist or some weird error case. Therefore checked below. searched_node_child = start_leaf while searched_node_child.parent is not None \ and searched_node_child.parent.type not in ('arglist', 'trailer', 'error_node'): searched_node_child = searched_node_child.parent if searched_node_child.get_first_leaf() is not start_leaf: return None searched_node = searched_node_child.parent if searched_node is None: return None index = searched_node.children.index(searched_node_child) arglist_nodes = searched_node.children[:index] if searched_node.type == 'arglist': trailer = searched_node.parent if trailer.type == 'error_node': trailer_index = trailer.children.index(searched_node) assert trailer_index >= 2 assert trailer.children[trailer_index - 1] == '(' return check(trailer.children[trailer_index - 1], arglist_nodes[::2]) elif trailer.type == 'trailer': return check(trailer.children[0], arglist_nodes[::2]) elif searched_node.type == 'trailer': return check(searched_node.children[0], []) elif searched_node.type == 'error_node': # Stuff like `join(""` return check(arglist_nodes[-1], []) jedi-0.15.2/jedi/api/classes.py0000664000175000017500000006201713577124112016100 0ustar davedave00000000000000""" The :mod:`jedi.api.classes` module contains the return classes of the API. These classes are the much bigger part of the whole API, because they contain the interesting information about completion and goto operations. """ import re import sys import warnings from jedi import settings from jedi import debug from jedi.inference.utils import unite from jedi.cache import memoize_method from jedi.inference import imports from jedi.inference.imports import ImportName from jedi.inference.gradual.typeshed import StubModuleValue from jedi.inference.gradual.conversion import convert_names, convert_values from jedi.inference.base_value import ValueSet from jedi.api.keywords import KeywordName def _sort_names_by_start_pos(names): return sorted(names, key=lambda s: s.start_pos or (0, 0)) def defined_names(inference_state, context): """ List sub-definitions (e.g., methods in class). :type scope: Scope :rtype: list of Definition """ filter = next(context.get_filters()) names = [name for name in filter.values()] return [Definition(inference_state, n) for n in _sort_names_by_start_pos(names)] def _values_to_definitions(values): return [Definition(c.inference_state, c.name) for c in values] class BaseDefinition(object): _mapping = { 'posixpath': 'os.path', 'riscospath': 'os.path', 'ntpath': 'os.path', 'os2emxpath': 'os.path', 'macpath': 'os.path', 'genericpath': 'os.path', 'posix': 'os', '_io': 'io', '_functools': 'functools', '_collections': 'collections', '_socket': 'socket', '_sqlite3': 'sqlite3', '__builtin__': 'builtins', } _tuple_mapping = dict((tuple(k.split('.')), v) for (k, v) in { 'argparse._ActionsContainer': 'argparse.ArgumentParser', }.items()) def __init__(self, inference_state, name): self._inference_state = inference_state self._name = name """ An instance of :class:`parso.python.tree.Name` subclass. """ self.is_keyword = isinstance(self._name, KeywordName) @memoize_method def _get_module_context(self): # This can take a while to complete, because in the worst case of # imports (consider `import a` completions), we need to load all # modules starting with a first. return self._name.get_root_context() @property def module_path(self): """Shows the file path of a module. e.g. ``/usr/lib/python2.7/os.py``""" module = self._get_module_context() if module.is_stub() or not module.is_compiled(): # Compiled modules should not return a module path even if they # have one. return self._get_module_context().py__file__() return None @property def name(self): """ Name of variable/function/class/module. For example, for ``x = None`` it returns ``'x'``. :rtype: str or None """ return self._name.get_public_name() @property def type(self): """ The type of the definition. Here is an example of the value of this attribute. Let's consider the following source. As what is in ``variable`` is unambiguous to Jedi, :meth:`jedi.Script.goto_definitions` should return a list of definition for ``sys``, ``f``, ``C`` and ``x``. >>> from jedi._compatibility import no_unicode_pprint >>> from jedi import Script >>> source = ''' ... import keyword ... ... class C: ... pass ... ... class D: ... pass ... ... x = D() ... ... def f(): ... pass ... ... for variable in [keyword, f, C, x]: ... variable''' >>> script = Script(source) >>> defs = script.goto_definitions() Before showing what is in ``defs``, let's sort it by :attr:`line` so that it is easy to relate the result to the source code. >>> defs = sorted(defs, key=lambda d: d.line) >>> no_unicode_pprint(defs) # doctest: +NORMALIZE_WHITESPACE [, , , ] Finally, here is what you can get from :attr:`type`: >>> defs = [str(d.type) for d in defs] # It's unicode and in Py2 has u before it. >>> defs[0] 'module' >>> defs[1] 'class' >>> defs[2] 'instance' >>> defs[3] 'function' Valid values for are ``module``, ``class``, ``instance``, ``function``, ``param``, ``path`` and ``keyword``. """ tree_name = self._name.tree_name resolve = False if tree_name is not None: # TODO move this to their respective names. definition = tree_name.get_definition() if definition is not None and definition.type == 'import_from' and \ tree_name.is_definition(): resolve = True if isinstance(self._name, imports.SubModuleName) or resolve: for value in self._name.infer(): return value.api_type return self._name.api_type @property def module_name(self): """ The module name. >>> from jedi import Script >>> source = 'import json' >>> script = Script(source, path='example.py') >>> d = script.goto_definitions()[0] >>> print(d.module_name) # doctest: +ELLIPSIS json """ return self._get_module_context().py__name__() def in_builtin_module(self): """Whether this is a builtin module.""" value = self._get_module_context().get_value() if isinstance(value, StubModuleValue): return any(v.is_compiled() for v in value.non_stub_value_set) return value.is_compiled() @property def line(self): """The line where the definition occurs (starting with 1).""" start_pos = self._name.start_pos if start_pos is None: return None return start_pos[0] @property def column(self): """The column where the definition occurs (starting with 0).""" start_pos = self._name.start_pos if start_pos is None: return None return start_pos[1] def docstring(self, raw=False, fast=True): r""" Return a document string for this completion object. Example: >>> from jedi import Script >>> source = '''\ ... def f(a, b=1): ... "Document for function f." ... ''' >>> script = Script(source, 1, len('def f'), 'example.py') >>> doc = script.goto_definitions()[0].docstring() >>> print(doc) f(a, b=1) Document for function f. Notice that useful extra information is added to the actual docstring. For function, it is call signature. If you need actual docstring, use ``raw=True`` instead. >>> print(script.goto_definitions()[0].docstring(raw=True)) Document for function f. :param fast: Don't follow imports that are only one level deep like ``import foo``, but follow ``from foo import bar``. This makes sense for speed reasons. Completing `import a` is slow if you use the ``foo.docstring(fast=False)`` on every object, because it parses all libraries starting with ``a``. """ return _Help(self._name).docstring(fast=fast, raw=raw) @property def description(self): """A textual description of the object.""" return self._name.get_public_name() @property def full_name(self): """ Dot-separated path of this object. It is in the form of ``[.[...]][.]``. It is useful when you want to look up Python manual of the object at hand. Example: >>> from jedi import Script >>> source = ''' ... import os ... os.path.join''' >>> script = Script(source, 3, len('os.path.join'), 'example.py') >>> print(script.goto_definitions()[0].full_name) os.path.join Notice that it returns ``'os.path.join'`` instead of (for example) ``'posixpath.join'``. This is not correct, since the modules name would be `````. However most users find the latter more practical. """ if not self._name.is_value_name: return None names = self._name.get_qualified_names(include_module_names=True) if names is None: return names names = list(names) try: names[0] = self._mapping[names[0]] except KeyError: pass return '.'.join(names) def is_stub(self): if not self._name.is_value_name: return False return self._name.get_root_context().is_stub() def goto_assignments(self, **kwargs): # Python 2... with debug.increase_indent_cm('goto for %s' % self._name): return self._goto_assignments(**kwargs) def _goto_assignments(self, only_stubs=False, prefer_stubs=False): assert not (only_stubs and prefer_stubs) if not self._name.is_value_name: return [] names = convert_names( self._name.goto(), only_stubs=only_stubs, prefer_stubs=prefer_stubs, ) return [self if n == self._name else Definition(self._inference_state, n) for n in names] def infer(self, **kwargs): # Python 2... with debug.increase_indent_cm('infer for %s' % self._name): return self._infer(**kwargs) def _infer(self, only_stubs=False, prefer_stubs=False): assert not (only_stubs and prefer_stubs) if not self._name.is_value_name: return [] # First we need to make sure that we have stub names (if possible) that # we can follow. If we don't do that, we can end up with the inferred # results of Python objects instead of stubs. names = convert_names([self._name], prefer_stubs=True) values = convert_values( ValueSet.from_sets(n.infer() for n in names), only_stubs=only_stubs, prefer_stubs=prefer_stubs, ) resulting_names = [c.name for c in values] return [self if n == self._name else Definition(self._inference_state, n) for n in resulting_names] @property @memoize_method def params(self): """ Deprecated! Will raise a warning soon. Use get_signatures()[...].params. Raises an ``AttributeError`` if the definition is not callable. Otherwise returns a list of `Definition` that represents the params. """ # Only return the first one. There might be multiple one, especially # with overloading. for value in self._name.infer(): for signature in value.get_signatures(): return [ Definition(self._inference_state, n) for n in signature.get_param_names(resolve_stars=True) ] if self.type == 'function' or self.type == 'class': # Fallback, if no signatures were defined (which is probably by # itself a bug). return [] raise AttributeError('There are no params defined on this.') def parent(self): if not self._name.is_value_name: return None context = self._name.parent_context if context is None: return None while context.name is None: # Happens for comprehension contexts context = context.parent_context return Definition(self._inference_state, context.name) def __repr__(self): return "<%s %sname=%r, description=%r>" % ( self.__class__.__name__, 'full_' if self.full_name else '', self.full_name or self.name, self.description, ) def get_line_code(self, before=0, after=0): """ Returns the line of code where this object was defined. :param before: Add n lines before the current line to the output. :param after: Add n lines after the current line to the output. :return str: Returns the line(s) of code or an empty string if it's a builtin. """ if not self._name.is_value_name: return '' lines = self._name.get_root_context().code_lines if lines is None: # Probably a builtin module, just ignore in that case. return '' index = self._name.start_pos[0] - 1 start_index = max(index - before, 0) return ''.join(lines[start_index:index + after + 1]) def get_signatures(self): return [Signature(self._inference_state, s) for s in self._name.infer().get_signatures()] def execute(self): return _values_to_definitions(self._name.infer().execute_with_values()) class Completion(BaseDefinition): """ `Completion` objects are returned from :meth:`api.Script.completions`. They provide additional information about a completion. """ def __init__(self, inference_state, name, stack, like_name_length, is_fuzzy): super(Completion, self).__init__(inference_state, name) self._like_name_length = like_name_length self._stack = stack self._is_fuzzy = is_fuzzy # Completion objects with the same Completion name (which means # duplicate items in the completion) self._same_name_completions = [] def _complete(self, like_name): append = '' if settings.add_bracket_after_function \ and self.type == 'function': append = '(' if self._name.api_type == 'param' and self._stack is not None: nonterminals = [stack_node.nonterminal for stack_node in self._stack] if 'trailer' in nonterminals and 'argument' not in nonterminals: # TODO this doesn't work for nested calls. append += '=' name = self._name.get_public_name() if like_name: name = name[self._like_name_length:] return name + append @property def complete(self): """ Only works with non-fuzzy completions. Returns None if fuzzy completions are used. Return the rest of the word, e.g. completing ``isinstance``:: isinstan# <-- Cursor is here would return the string 'ce'. It also adds additional stuff, depending on your `settings.py`. Assuming the following function definition:: def foo(param=0): pass completing ``foo(par`` would give a ``Completion`` which `complete` would be `am=` """ if self._is_fuzzy: return None return self._complete(True) @property def name_with_symbols(self): """ Similar to :attr:`name`, but like :attr:`name` returns also the symbols, for example assuming the following function definition:: def foo(param=0): pass completing ``foo(`` would give a ``Completion`` which ``name_with_symbols`` would be "param=". """ return self._complete(False) def docstring(self, raw=False, fast=True): if self._like_name_length >= 3: # In this case we can just resolve the like name, because we # wouldn't load like > 100 Python modules anymore. fast = False return super(Completion, self).docstring(raw=raw, fast=fast) @property def description(self): """Provide a description of the completion object.""" # TODO improve the class structure. return Definition.description.__get__(self) def __repr__(self): return '<%s: %s>' % (type(self).__name__, self._name.get_public_name()) @memoize_method def follow_definition(self): """ Deprecated! Return the original definitions. I strongly recommend not using it for your completions, because it might slow down |jedi|. If you want to read only a few objects (<=20), it might be useful, especially to get the original docstrings. The basic problem of this function is that it follows all results. This means with 1000 completions (e.g. numpy), it's just PITA-slow. """ warnings.warn( "Deprecated since version 0.14.0. Use .infer.", DeprecationWarning, stacklevel=2 ) return self.infer() class Definition(BaseDefinition): """ *Definition* objects are returned from :meth:`api.Script.goto_assignments` or :meth:`api.Script.goto_definitions`. """ def __init__(self, inference_state, definition): super(Definition, self).__init__(inference_state, definition) @property def description(self): """ A description of the :class:`.Definition` object, which is heavily used in testing. e.g. for ``isinstance`` it returns ``def isinstance``. Example: >>> from jedi._compatibility import no_unicode_pprint >>> from jedi import Script >>> source = ''' ... def f(): ... pass ... ... class C: ... pass ... ... variable = f if random.choice([0,1]) else C''' >>> script = Script(source, column=3) # line is maximum by default >>> defs = script.goto_definitions() >>> defs = sorted(defs, key=lambda d: d.line) >>> no_unicode_pprint(defs) # doctest: +NORMALIZE_WHITESPACE [, ] >>> str(defs[0].description) # strip literals in python2 'def f' >>> str(defs[1].description) 'class C' """ typ = self.type tree_name = self._name.tree_name if typ == 'param': return typ + ' ' + self._name.to_string() if typ in ('function', 'class', 'module', 'instance') or tree_name is None: if typ == 'function': # For the description we want a short and a pythonic way. typ = 'def' return typ + ' ' + self._name.get_public_name() definition = tree_name.get_definition(include_setitem=True) or tree_name # Remove the prefix, because that's not what we want for get_code # here. txt = definition.get_code(include_prefix=False) # Delete comments: txt = re.sub(r'#[^\n]+\n', ' ', txt) # Delete multi spaces/newlines txt = re.sub(r'\s+', ' ', txt).strip() return txt @property def desc_with_module(self): """ In addition to the definition, also return the module. .. warning:: Don't use this function yet, its behaviour may change. If you really need it, talk to me. .. todo:: Add full path. This function is should return a `module.class.function` path. """ position = '' if self.in_builtin_module else '@%s' % self.line return "%s:%s%s" % (self.module_name, self.description, position) @memoize_method def defined_names(self): """ List sub-definitions (e.g., methods in class). :rtype: list of Definition """ defs = self._name.infer() return sorted( unite(defined_names(self._inference_state, d.as_context()) for d in defs), key=lambda s: s._name.start_pos or (0, 0) ) def is_definition(self): """ Returns True, if defined as a name in a statement, function or class. Returns False, if it's a reference to such a definition. """ if self._name.tree_name is None: return True else: return self._name.tree_name.is_definition() def __eq__(self, other): return self._name.start_pos == other._name.start_pos \ and self.module_path == other.module_path \ and self.name == other.name \ and self._inference_state == other._inference_state def __ne__(self, other): return not self.__eq__(other) def __hash__(self): return hash((self._name.start_pos, self.module_path, self.name, self._inference_state)) class Signature(Definition): """ `Signature` objects is the return value of `Script.function_definition`. It knows what functions you are currently in. e.g. `isinstance(` would return the `isinstance` function. without `(` it would return nothing. """ def __init__(self, inference_state, signature): super(Signature, self).__init__(inference_state, signature.name) self._signature = signature @property def params(self): """ :return list of ParamDefinition: """ return [ParamDefinition(self._inference_state, n) for n in self._signature.get_param_names(resolve_stars=True)] def to_string(self): return self._signature.to_string() class CallSignature(Signature): """ `CallSignature` objects is the return value of `Script.call_signatures`. It knows what functions you are currently in. e.g. `isinstance(` would return the `isinstance` function with its params. Without `(` it would return nothing. """ def __init__(self, inference_state, signature, call_details): super(CallSignature, self).__init__(inference_state, signature) self._call_details = call_details self._signature = signature @property def index(self): """ The Param index of the current call. Returns None if the index cannot be found in the curent call. """ return self._call_details.calculate_index( self._signature.get_param_names(resolve_stars=True) ) @property def bracket_start(self): """ The line/column of the bracket that is responsible for the last function call. """ return self._call_details.bracket_leaf.start_pos def __repr__(self): return '<%s: index=%r %s>' % ( type(self).__name__, self.index, self._signature.to_string(), ) class ParamDefinition(Definition): def infer_default(self): """ :return list of Definition: """ return _values_to_definitions(self._name.infer_default()) def infer_annotation(self, **kwargs): """ :return list of Definition: :param execute_annotation: If False, the values are not executed and you get classes instead of instances. """ return _values_to_definitions(self._name.infer_annotation(ignore_stars=True, **kwargs)) def to_string(self): return self._name.to_string() @property def kind(self): """ Returns an enum instance. Returns the same values as the builtin :py:attr:`inspect.Parameter.kind`. No support for Python < 3.4 anymore. """ if sys.version_info < (3, 5): raise NotImplementedError( 'Python 2 is end-of-life, the new feature is not available for it' ) return self._name.get_kind() def _format_signatures(value): return '\n'.join( signature.to_string() for signature in value.get_signatures() ) class _Help(object): """ Temporary implementation, will be used as `Script.help() or something in the future. """ def __init__(self, definition): self._name = definition @memoize_method def _get_values(self, fast): if isinstance(self._name, ImportName) and fast: return {} if self._name.api_type == 'statement': return {} return self._name.infer() def docstring(self, fast=True, raw=True): """ The docstring ``__doc__`` for any object. See :attr:`doc` for example. """ full_doc = '' # Using the first docstring that we see. for value in self._get_values(fast=fast): if full_doc: # In case we have multiple values, just return all of them # separated by a few dashes. full_doc += '\n' + '-' * 30 + '\n' doc = value.py__doc__() signature_text = '' if self._name.is_value_name: if not raw: signature_text = _format_signatures(value) if not doc and value.is_stub(): for c in convert_values(ValueSet({value}), ignore_compiled=False): doc = c.py__doc__() if doc: break if signature_text and doc: full_doc += signature_text + '\n\n' + doc else: full_doc += signature_text + doc return full_doc jedi-0.15.2/jedi/api/interpreter.py0000664000175000017500000000236413577124112017005 0ustar davedave00000000000000""" TODO Some parts of this module are still not well documented. """ from jedi.inference import compiled from jedi.inference.compiled import mixed from jedi.inference.compiled.access import create_access_path from jedi.inference.context import ModuleContext def _create(inference_state, obj): return compiled.create_from_access_path( inference_state, create_access_path(inference_state, obj) ) class NamespaceObject(object): def __init__(self, dct): self.__dict__ = dct class MixedModuleContext(ModuleContext): def __init__(self, tree_module_value, namespaces): super(MixedModuleContext, self).__init__(tree_module_value) self._namespace_objects = [NamespaceObject(n) for n in namespaces] def get_filters(self, *args, **kwargs): for filter in self._value.as_context().get_filters(*args, **kwargs): yield filter for namespace_obj in self._namespace_objects: compiled_object = _create(self.inference_state, namespace_obj) mixed_object = mixed.MixedObject( compiled_object=compiled_object, tree_value=self._value ) for filter in mixed_object.get_filters(*args, **kwargs): yield filter jedi-0.15.2/jedi/api/keywords.py0000664000175000017500000000432613577124112016311 0ustar davedave00000000000000import pydoc from jedi.inference.utils import ignored from jedi.inference.names import AbstractArbitraryName try: from pydoc_data import topics as pydoc_topics except ImportError: # Python 2 try: import pydoc_topics except ImportError: # This is for Python 3 embeddable version, which dont have # pydoc_data module in its file python3x.zip. pydoc_topics = None def get_operator(inference_state, string, pos): return Keyword(inference_state, string, pos) class KeywordName(AbstractArbitraryName): api_type = u'keyword' def infer(self): return [Keyword(self.inference_state, self.string_name, (0, 0))] class Keyword(object): api_type = u'keyword' def __init__(self, inference_state, name, pos): self.name = KeywordName(inference_state, name) self.start_pos = pos self.parent = inference_state.builtins_module @property def names(self): """ For a `parsing.Name` like comparision """ return [self.name] def py__doc__(self): return imitate_pydoc(self.name.string_name) def get_signatures(self): # TODO this makes no sense, I think Keyword should somehow merge with # Value to make it easier for the api/classes.py to deal with all # of it. return [] def __repr__(self): return '<%s: %s>' % (type(self).__name__, self.name) def imitate_pydoc(string): """ It's not possible to get the pydoc's without starting the annoying pager stuff. """ if pydoc_topics is None: return '' # str needed because of possible unicode stuff in py2k (pydoc doesn't work # with unicode strings) string = str(string) h = pydoc.help with ignored(KeyError): # try to access symbols string = h.symbols[string] string, _, related = string.partition(' ') get_target = lambda s: h.topics.get(s, h.keywords.get(s)) while isinstance(string, str): string = get_target(string) try: # is a tuple now label, related = string except TypeError: return '' try: return pydoc_topics.topics[label].strip() if pydoc_topics else '' except KeyError: return '' jedi-0.15.2/jedi/api/__init__.py0000664000175000017500000005244013577124112016201 0ustar davedave00000000000000""" The API basically only provides one class. You can create a :class:`Script` and use its methods. Additionally you can add a debug function with :func:`set_debug_function`. Alternatively, if you don't need a custom function and are happy with printing debug messages to stdout, simply call :func:`set_debug_function` without arguments. .. warning:: Please, note that Jedi is **not thread safe**. """ import os import sys import warnings import parso from parso.python import tree from jedi._compatibility import force_unicode, cast_path, is_py3 from jedi.parser_utils import get_executable_nodes from jedi import debug from jedi import settings from jedi import cache from jedi.file_io import KnownContentFileIO from jedi.api import classes from jedi.api import interpreter from jedi.api import helpers from jedi.api.completion import Completion from jedi.api.environment import InterpreterEnvironment from jedi.api.project import get_default_project, Project from jedi.inference import InferenceState from jedi.inference import imports from jedi.inference import usages from jedi.inference.arguments import try_iter_content from jedi.inference.helpers import get_module_names, infer_call_of_leaf from jedi.inference.sys_path import transform_path_to_dotted from jedi.inference.syntax_tree import tree_name_to_values from jedi.inference.value import ModuleValue from jedi.inference.base_value import ValueSet from jedi.inference.value.iterable import unpack_tuple_to_dict from jedi.inference.gradual.conversion import convert_names, convert_values from jedi.inference.gradual.utils import load_proper_stub_module # Jedi uses lots and lots of recursion. By setting this a little bit higher, we # can remove some "maximum recursion depth" errors. sys.setrecursionlimit(3000) class Script(object): """ A Script is the base for completions, goto or whatever you want to do with |jedi|. You can either use the ``source`` parameter or ``path`` to read a file. Usually you're going to want to use both of them (in an editor). The script might be analyzed in a different ``sys.path`` than |jedi|: - if `sys_path` parameter is not ``None``, it will be used as ``sys.path`` for the script; - if `sys_path` parameter is ``None`` and ``VIRTUAL_ENV`` environment variable is defined, ``sys.path`` for the specified environment will be guessed (see :func:`jedi.inference.sys_path.get_venv_path`) and used for the script; - otherwise ``sys.path`` will match that of |jedi|. :param source: The source code of the current file, separated by newlines. :type source: str :param line: The line to perform actions on (starting with 1). :type line: int :param column: The column of the cursor (starting with 0). :type column: int :param path: The path of the file in the file system, or ``''`` if it hasn't been saved yet. :type path: str or None :param encoding: The encoding of ``source``, if it is not a ``unicode`` object (default ``'utf-8'``). :type encoding: str :param sys_path: ``sys.path`` to use during analysis of the script :type sys_path: list :param environment: TODO :type environment: Environment """ def __init__(self, source=None, line=None, column=None, path=None, encoding='utf-8', sys_path=None, environment=None, _project=None): self._orig_path = path # An empty path (also empty string) should always result in no path. self.path = os.path.abspath(path) if path else None if source is None: # TODO add a better warning than the traceback! with open(path, 'rb') as f: source = f.read() # Load the Python grammar of the current interpreter. self._grammar = parso.load_grammar() if sys_path is not None and not is_py3: sys_path = list(map(force_unicode, sys_path)) project = _project if project is None: # Load the Python grammar of the current interpreter. project = get_default_project( os.path.dirname(self.path)if path else os.getcwd() ) # TODO deprecate and remove sys_path from the Script API. if sys_path is not None: project._sys_path = sys_path self._inference_state = InferenceState( project, environment=environment, script_path=self.path ) debug.speed('init') self._module_node, source = self._inference_state.parse_and_get_code( code=source, path=self.path, encoding=encoding, use_latest_grammar=path and path.endswith('.pyi'), cache=False, # No disk cache, because the current script often changes. diff_cache=settings.fast_parser, cache_path=settings.cache_directory, ) debug.speed('parsed') self._code_lines = parso.split_lines(source, keepends=True) self._code = source line = max(len(self._code_lines), 1) if line is None else line if not (0 < line <= len(self._code_lines)): raise ValueError('`line` parameter is not in a valid range.') line_string = self._code_lines[line - 1] line_len = len(line_string) if line_string.endswith('\r\n'): line_len -= 1 if line_string.endswith('\n'): line_len -= 1 column = line_len if column is None else column if not (0 <= column <= line_len): raise ValueError('`column` parameter (%d) is not in a valid range ' '(0-%d) for line %d (%r).' % ( column, line_len, line, line_string)) self._pos = line, column cache.clear_time_caches() debug.reset_time() # Cache the module, this is mostly useful for testing, since this shouldn't # be called multiple times. @cache.memoize_method def _get_module(self): names = None is_package = False if self.path is not None: import_names, is_p = transform_path_to_dotted( self._inference_state.get_sys_path(add_parent_paths=False), self.path ) if import_names is not None: names = import_names is_package = is_p if self.path is None: file_io = None else: file_io = KnownContentFileIO(cast_path(self.path), self._code) if self.path is not None and self.path.endswith('.pyi'): # We are in a stub file. Try to load the stub properly. stub_module = load_proper_stub_module( self._inference_state, file_io, names, self._module_node ) if stub_module is not None: return stub_module if names is None: names = ('__main__',) module = ModuleValue( self._inference_state, self._module_node, file_io, string_names=names, code_lines=self._code_lines, is_package=is_package, ) if names[0] not in ('builtins', '__builtin__', 'typing'): # These modules are essential for Jedi, so don't overwrite them. self._inference_state.module_cache.add(names, ValueSet([module])) return module def _get_module_context(self): return self._get_module().as_context() def __repr__(self): return '<%s: %s %r>' % ( self.__class__.__name__, repr(self._orig_path), self._inference_state.environment, ) def completions(self, fuzzy=False): """ Return :class:`classes.Completion` objects. Those objects contain information about the completions, more than just names. :return: Completion objects, sorted by name and __ comes last. :rtype: list of :class:`classes.Completion` """ with debug.increase_indent_cm('completions'): completion = Completion( self._inference_state, self._get_module_context(), self._code_lines, self._pos, self.call_signatures ) return completion.completions(fuzzy) def goto_definitions(self, **kwargs): """ Return the definitions of a the path under the cursor. goto function! This follows complicated paths and returns the end, not the first definition. The big difference between :meth:`goto_assignments` and :meth:`goto_definitions` is that :meth:`goto_assignments` doesn't follow imports and statements. Multiple objects may be returned, because Python itself is a dynamic language, which means depending on an option you can have two different versions of a function. :param only_stubs: Only return stubs for this goto call. :param prefer_stubs: Prefer stubs to Python objects for this type inference call. :rtype: list of :class:`classes.Definition` """ with debug.increase_indent_cm('goto_definitions'): return self._goto_definitions(**kwargs) def _goto_definitions(self, only_stubs=False, prefer_stubs=False): leaf = self._module_node.get_name_of_position(self._pos) if leaf is None: leaf = self._module_node.get_leaf_for_position(self._pos) if leaf is None or leaf.type == 'string': return [] context = self._get_module_context().create_context(leaf) values = helpers.infer_goto_definition(self._inference_state, context, leaf) values = convert_values( values, only_stubs=only_stubs, prefer_stubs=prefer_stubs, ) defs = [classes.Definition(self._inference_state, c.name) for c in values] # The additional set here allows the definitions to become unique in an # API sense. In the internals we want to separate more things than in # the API. return helpers.sorted_definitions(set(defs)) def goto_assignments(self, follow_imports=False, follow_builtin_imports=False, **kwargs): """ Return the first definition found, while optionally following imports. Multiple objects may be returned, because Python itself is a dynamic language, which means depending on an option you can have two different versions of a function. .. note:: It is deprecated to use follow_imports and follow_builtin_imports as positional arguments. Will be a keyword argument in 0.16.0. :param follow_imports: The goto call will follow imports. :param follow_builtin_imports: If follow_imports is True will decide if it follow builtin imports. :param only_stubs: Only return stubs for this goto call. :param prefer_stubs: Prefer stubs to Python objects for this goto call. :rtype: list of :class:`classes.Definition` """ with debug.increase_indent_cm('goto_assignments'): return self._goto_assignments(follow_imports, follow_builtin_imports, **kwargs) def _goto_assignments(self, follow_imports, follow_builtin_imports, only_stubs=False, prefer_stubs=False): def filter_follow_imports(names): for name in names: if name.is_import(): new_names = list(filter_follow_imports(name.goto())) found_builtin = False if follow_builtin_imports: for new_name in new_names: if new_name.start_pos is None: found_builtin = True if found_builtin: yield name else: for new_name in new_names: yield new_name else: yield name tree_name = self._module_node.get_name_of_position(self._pos) if tree_name is None: # Without a name we really just want to jump to the result e.g. # executed by `foo()`, if we the cursor is after `)`. return self.goto_definitions(only_stubs=only_stubs, prefer_stubs=prefer_stubs) name = self._get_module_context().create_name(tree_name) names = list(name.goto()) if follow_imports: names = filter_follow_imports(names) names = convert_names( names, only_stubs=only_stubs, prefer_stubs=prefer_stubs, ) defs = [classes.Definition(self._inference_state, d) for d in set(names)] return helpers.sorted_definitions(defs) def usages(self, additional_module_paths=(), **kwargs): """ Return :class:`classes.Definition` objects, which contain all names that point to the definition of the name under the cursor. This is very useful for refactoring (renaming), or to show all usages of a variable. .. todo:: Implement additional_module_paths :param additional_module_paths: Deprecated, never ever worked. :param include_builtins: Default True, checks if a usage is a builtin (e.g. ``sys``) and in that case does not return it. :rtype: list of :class:`classes.Definition` """ if additional_module_paths: warnings.warn( "Deprecated since version 0.12.0. This never even worked, just ignore it.", DeprecationWarning, stacklevel=2 ) def _usages(include_builtins=True): tree_name = self._module_node.get_name_of_position(self._pos) if tree_name is None: # Must be syntax return [] names = usages.usages(self._get_module_context(), tree_name) definitions = [classes.Definition(self._inference_state, n) for n in names] if not include_builtins: definitions = [d for d in definitions if not d.in_builtin_module()] return helpers.sorted_definitions(definitions) return _usages(**kwargs) def call_signatures(self): """ Return the function object of the call you're currently in. E.g. if the cursor is here:: abs(# <-- cursor is here This would return the ``abs`` function. On the other hand:: abs()# <-- cursor is here This would return an empty list.. :rtype: list of :class:`classes.CallSignature` """ call_details = helpers.get_call_signature_details(self._module_node, self._pos) if call_details is None: return [] context = self._get_module_context().create_context(call_details.bracket_leaf) definitions = helpers.cache_call_signatures( self._inference_state, context, call_details.bracket_leaf, self._code_lines, self._pos ) debug.speed('func_call followed') # TODO here we use stubs instead of the actual values. We should use # the signatures from stubs, but the actual values, probably?! return [classes.CallSignature(self._inference_state, signature, call_details) for signature in definitions.get_signatures()] def _analysis(self): self._inference_state.is_analysis = True self._inference_state.analysis_modules = [self._module_node] module = self._get_module_context() try: for node in get_executable_nodes(self._module_node): context = module.create_context(node) if node.type in ('funcdef', 'classdef'): # Resolve the decorators. tree_name_to_values(self._inference_state, context, node.children[1]) elif isinstance(node, tree.Import): import_names = set(node.get_defined_names()) if node.is_nested(): import_names |= set(path[-1] for path in node.get_paths()) for n in import_names: imports.infer_import(context, n) elif node.type == 'expr_stmt': types = context.infer_node(node) for testlist in node.children[:-1:2]: # Iterate tuples. unpack_tuple_to_dict(context, types, testlist) else: if node.type == 'name': defs = self._inference_state.goto_definitions(context, node) else: defs = infer_call_of_leaf(context, node) try_iter_content(defs) self._inference_state.reset_recursion_limitations() ana = [a for a in self._inference_state.analysis if self.path == a.path] return sorted(set(ana), key=lambda x: x.line) finally: self._inference_state.is_analysis = False class Interpreter(Script): """ Jedi API for Python REPLs. In addition to completion of simple attribute access, Jedi supports code completion based on static code analysis. Jedi can complete attributes of object which is not initialized yet. >>> from os.path import join >>> namespace = locals() >>> script = Interpreter('join("").up', [namespace]) >>> print(script.completions()[0].name) upper """ _allow_descriptor_getattr_default = True def __init__(self, source, namespaces, **kwds): """ Parse `source` and mixin interpreted Python objects from `namespaces`. :type source: str :arg source: Code to parse. :type namespaces: list of dict :arg namespaces: a list of namespace dictionaries such as the one returned by :func:`locals`. Other optional arguments are same as the ones for :class:`Script`. If `line` and `column` are None, they are assumed be at the end of `source`. """ try: namespaces = [dict(n) for n in namespaces] except Exception: raise TypeError("namespaces must be a non-empty list of dicts.") environment = kwds.get('environment', None) if environment is None: environment = InterpreterEnvironment() else: if not isinstance(environment, InterpreterEnvironment): raise TypeError("The environment needs to be an InterpreterEnvironment subclass.") super(Interpreter, self).__init__(source, environment=environment, _project=Project(os.getcwd()), **kwds) self.namespaces = namespaces self._inference_state.allow_descriptor_getattr = self._allow_descriptor_getattr_default @cache.memoize_method def _get_module_context(self): tree_module_value = ModuleValue( self._inference_state, self._module_node, file_io=KnownContentFileIO(self.path, self._code), string_names=('__main__',), code_lines=self._code_lines, ) return interpreter.MixedModuleContext( tree_module_value, self.namespaces, ) def names(source=None, path=None, encoding='utf-8', all_scopes=False, definitions=True, references=False, environment=None): """ Returns a list of `Definition` objects, containing name parts. This means you can call ``Definition.goto_assignments()`` and get the reference of a name. The parameters are the same as in :py:class:`Script`, except or the following ones: :param all_scopes: If True lists the names of all scopes instead of only the module namespace. :param definitions: If True lists the names that have been defined by a class, function or a statement (``a = b`` returns ``a``). :param references: If True lists all the names that are not listed by ``definitions=True``. E.g. ``a = b`` returns ``b``. """ def def_ref_filter(_def): is_def = _def._name.tree_name.is_definition() return definitions and is_def or references and not is_def # Set line/column to a random position, because they don't matter. script = Script(source, line=1, column=0, path=path, encoding=encoding, environment=environment) module_context = script._get_module_context() defs = [ classes.Definition( script._inference_state, module_context.create_name(name) ) for name in get_module_names(script._module_node, all_scopes) ] return sorted(filter(def_ref_filter, defs), key=lambda x: (x.line, x.column)) def preload_module(*modules): """ Preloading modules tells Jedi to load a module now, instead of lazy parsing of modules. Usful for IDEs, to control which modules to load on startup. :param modules: different module names, list of string. """ for m in modules: s = "import %s as x; x." % m Script(s, 1, len(s), None).completions() def set_debug_function(func_cb=debug.print_to_stdout, warnings=True, notices=True, speed=True): """ Define a callback debug function to get all the debug messages. If you don't specify any arguments, debug messages will be printed to stdout. :param func_cb: The callback function for debug messages, with n params. """ debug.debug_function = func_cb debug.enable_warning = warnings debug.enable_notice = notices debug.enable_speed = speed jedi-0.15.2/jedi/api/replstartup.py0000664000175000017500000000166613577124112017033 0ustar davedave00000000000000""" To use Jedi completion in Python interpreter, add the following in your shell setup (e.g., ``.bashrc``). This works only on Linux/Mac, because readline is not available on Windows. If you still want Jedi autocompletion in your REPL, just use IPython instead:: export PYTHONSTARTUP="$(python -m jedi repl)" Then you will be able to use Jedi completer in your Python interpreter:: $ python Python 2.7.2+ (default, Jul 20 2012, 22:15:08) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.join('a', 'b').split().in # doctest: +SKIP ..dex ..sert """ import jedi.utils from jedi import __version__ as __jedi_version__ print('REPL completion using Jedi %s' % __jedi_version__) jedi.utils.setup_readline(fuzzy=False) del jedi # Note: try not to do many things here, as it will contaminate global # namespace of the interpreter. jedi-0.15.2/jedi/api/completion.py0000664000175000017500000003227313577124112016615 0ustar davedave00000000000000import re from parso.python.token import PythonTokenTypes from parso.python import tree from parso.tree import search_ancestor, Leaf from jedi._compatibility import Parameter from jedi import debug from jedi import settings from jedi.api import classes from jedi.api import helpers from jedi.api import keywords from jedi.api.file_name import file_name_completions from jedi.inference import imports from jedi.inference.helpers import infer_call_of_leaf, parse_dotted_names from jedi.inference.context import get_global_filters from jedi.inference.gradual.conversion import convert_values from jedi.parser_utils import cut_value_at_position def get_call_signature_param_names(call_signatures): # add named params for call_sig in call_signatures: for p in call_sig.params: # Allow protected access, because it's a public API. if p._name.get_kind() in (Parameter.POSITIONAL_OR_KEYWORD, Parameter.KEYWORD_ONLY): yield p._name def filter_names(inference_state, completion_names, stack, like_name, fuzzy): comp_dct = {} if settings.case_insensitive_completion: like_name = like_name.lower() for name in completion_names: string = name.string_name if settings.case_insensitive_completion: string = string.lower() if fuzzy: match = helpers.fuzzy_match(string, like_name) else: match = helpers.start_match(string, like_name) if match: new = classes.Completion( inference_state, name, stack, len(like_name), is_fuzzy=fuzzy, ) k = (new.name, new.complete) # key if k in comp_dct and settings.no_completion_duplicates: comp_dct[k]._same_name_completions.append(new) else: comp_dct[k] = new yield new def get_user_context(module_context, position): """ Returns the scope in which the user resides. This includes flows. """ leaf = module_context.tree_node.get_leaf_for_position(position, include_prefixes=True) return module_context.create_context(leaf) def get_flow_scope_node(module_node, position): node = module_node.get_leaf_for_position(position, include_prefixes=True) while not isinstance(node, (tree.Scope, tree.Flow)): node = node.parent return node class Completion: def __init__(self, inference_state, module_context, code_lines, position, call_signatures_callback, fuzzy=False): self._inference_state = inference_state self._module_context = module_context self._module_node = module_context.tree_node self._code_lines = code_lines # The first step of completions is to get the name self._like_name = helpers.get_on_completion_name(self._module_node, code_lines, position) # The actual cursor position is not what we need to calculate # everything. We want the start of the name we're on. self._original_position = position self._position = position[0], position[1] - len(self._like_name) self._call_signatures_callback = call_signatures_callback self._fuzzy = fuzzy def completions(self, fuzzy=False, **kwargs): return self._completions(fuzzy, **kwargs) def _completions(self, fuzzy): leaf = self._module_node.get_leaf_for_position(self._position, include_prefixes=True) string, start_leaf = _extract_string_while_in_string(leaf, self._position) if string is not None: completions = list(file_name_completions( self._inference_state, self._module_context, start_leaf, string, self._like_name, self._call_signatures_callback, self._code_lines, self._original_position, fuzzy )) if completions: return completions completion_names = self._get_value_completions(leaf) completions = filter_names(self._inference_state, completion_names, self.stack, self._like_name, fuzzy) return sorted(completions, key=lambda x: (x.name.startswith('__'), x.name.startswith('_'), x.name.lower())) def _get_value_completions(self, leaf): """ Analyzes the value that a completion is made in and decides what to return. Technically this works by generating a parser stack and analysing the current stack for possible grammar nodes. Possible enhancements: - global/nonlocal search global - yield from / raise from <- could be only exceptions/generators - In args: */**: no completion - In params (also lambda): no completion before = """ grammar = self._inference_state.grammar self.stack = stack = None try: self.stack = stack = helpers.get_stack_at_position( grammar, self._code_lines, leaf, self._position ) except helpers.OnErrorLeaf as e: value = e.error_leaf.value if value == '.': # After ErrorLeaf's that are dots, we will not do any # completions since this probably just confuses the user. return [] # If we don't have a value, just use global completion. return self._global_completions() allowed_transitions = \ list(stack._allowed_transition_names_and_token_types()) if 'if' in allowed_transitions: leaf = self._module_node.get_leaf_for_position(self._position, include_prefixes=True) previous_leaf = leaf.get_previous_leaf() indent = self._position[1] if not (leaf.start_pos <= self._position <= leaf.end_pos): indent = leaf.start_pos[1] if previous_leaf is not None: stmt = previous_leaf while True: stmt = search_ancestor( stmt, 'if_stmt', 'for_stmt', 'while_stmt', 'try_stmt', 'error_node', ) if stmt is None: break type_ = stmt.type if type_ == 'error_node': first = stmt.children[0] if isinstance(first, Leaf): type_ = first.value + '_stmt' # Compare indents if stmt.start_pos[1] == indent: if type_ == 'if_stmt': allowed_transitions += ['elif', 'else'] elif type_ == 'try_stmt': allowed_transitions += ['except', 'finally', 'else'] elif type_ == 'for_stmt': allowed_transitions.append('else') completion_names = [] current_line = self._code_lines[self._position[0] - 1][:self._position[1]] if not current_line or current_line[-1] in ' \t.;': completion_names += self._get_keyword_completion_names(allowed_transitions) if any(t in allowed_transitions for t in (PythonTokenTypes.NAME, PythonTokenTypes.INDENT)): # This means that we actually have to do type inference. nonterminals = [stack_node.nonterminal for stack_node in stack] nodes = [] for stack_node in stack: if stack_node.dfa.from_rule == 'small_stmt': nodes = [] else: nodes += stack_node.nodes if nodes and nodes[-1] in ('as', 'def', 'class'): # No completions for ``with x as foo`` and ``import x as foo``. # Also true for defining names as a class or function. return list(self._get_class_value_completions(is_function=True)) elif "import_stmt" in nonterminals: level, names = parse_dotted_names(nodes, "import_from" in nonterminals) only_modules = not ("import_from" in nonterminals and 'import' in nodes) completion_names += self._get_importer_names( names, level, only_modules=only_modules, ) elif nonterminals[-1] in ('trailer', 'dotted_name') and nodes[-1] == '.': dot = self._module_node.get_leaf_for_position(self._position) completion_names += self._trailer_completions(dot.get_previous_leaf()) else: completion_names += self._global_completions() completion_names += self._get_class_value_completions(is_function=False) # Apparently this looks like it's good enough to filter most cases # so that signature completions don't randomly appear. # To understand why this works, three things are important: # 1. trailer with a `,` in it is either a subscript or an arglist. # 2. If there's no `,`, it's at the start and only signatures start # with `(`. Other trailers could start with `.` or `[`. # 3. Decorators are very primitive and have an optional `(` with # optional arglist in them. if nodes[-1] in ['(', ','] and nonterminals[-1] in ('trailer', 'arglist', 'decorator'): call_signatures = self._call_signatures_callback() completion_names += get_call_signature_param_names(call_signatures) return completion_names def _get_keyword_completion_names(self, allowed_transitions): for k in allowed_transitions: if isinstance(k, str) and k.isalpha(): yield keywords.KeywordName(self._inference_state, k) def _global_completions(self): context = get_user_context(self._module_context, self._position) debug.dbg('global completion scope: %s', context) flow_scope_node = get_flow_scope_node(self._module_node, self._position) filters = get_global_filters( context, self._position, flow_scope_node ) completion_names = [] for filter in filters: completion_names += filter.values() return completion_names def _trailer_completions(self, previous_leaf): user_value = get_user_context(self._module_context, self._position) inferred_context = self._module_context.create_context(previous_leaf) values = infer_call_of_leaf(inferred_context, previous_leaf) completion_names = [] debug.dbg('trailer completion values: %s', values, color='MAGENTA') for value in values: for filter in value.get_filters(origin_scope=user_value.tree_node): completion_names += filter.values() python_values = convert_values(values) for c in python_values: if c not in values: for filter in c.get_filters(origin_scope=user_value.tree_node): completion_names += filter.values() return completion_names def _get_importer_names(self, names, level=0, only_modules=True): names = [n.value for n in names] i = imports.Importer(self._inference_state, names, self._module_context, level) return i.completion_names(self._inference_state, only_modules=only_modules) def _get_class_value_completions(self, is_function=True): """ Autocomplete inherited methods when overriding in child class. """ leaf = self._module_node.get_leaf_for_position(self._position, include_prefixes=True) cls = tree.search_ancestor(leaf, 'classdef') if cls is None: return # Complete the methods that are defined in the super classes. class_value = self._module_context.create_value(cls) if cls.start_pos[1] >= leaf.start_pos[1]: return filters = class_value.get_filters(is_instance=True) # The first dict is the dictionary of class itself. next(filters) for filter in filters: for name in filter.values(): # TODO we should probably check here for properties if (name.api_type == 'function') == is_function: yield name def _extract_string_while_in_string(leaf, position): if position < leaf.start_pos: return None, None if leaf.type == 'string': match = re.match(r'^\w*(\'{3}|"{3}|\'|")', leaf.value) quote = match.group(1) if leaf.line == position[0] and position[1] < leaf.column + match.end(): return None, None if leaf.end_pos[0] == position[0] and position[1] > leaf.end_pos[1] - len(quote): return None, None return cut_value_at_position(leaf, position)[match.end():], leaf leaves = [] while leaf is not None and leaf.line == position[0]: if leaf.type == 'error_leaf' and ('"' in leaf.value or "'" in leaf.value): return ''.join(l.get_code() for l in leaves), leaf leaves.insert(0, leaf) leaf = leaf.get_previous_leaf() return None, None jedi-0.15.2/jedi/api/helpers.py0000664000175000017500000003570713577124112016113 0ustar davedave00000000000000""" Helpers for the API """ import re from collections import namedtuple from textwrap import dedent from parso.python.parser import Parser from parso.python import tree from jedi._compatibility import u, Parameter from jedi.inference.base_value import NO_VALUES from jedi.inference.syntax_tree import infer_atom from jedi.inference.helpers import infer_call_of_leaf from jedi.inference.compiled import get_string_value_set from jedi.cache import call_signature_time_cache CompletionParts = namedtuple('CompletionParts', ['path', 'has_dot', 'name']) def start_match(string, like_name): return string.startswith(like_name) def fuzzy_match(string, like_name): if len(like_name) <= 1: return like_name in string pos = string.find(like_name[0]) if pos >= 0: return fuzzy_match(string[pos + 1:], like_name[1:]) return False def sorted_definitions(defs): # Note: `or ''` below is required because `module_path` could be return sorted(defs, key=lambda x: (x.module_path or '', x.line or 0, x.column or 0, x.name)) def get_on_completion_name(module_node, lines, position): leaf = module_node.get_leaf_for_position(position) if leaf is None or leaf.type in ('string', 'error_leaf'): # Completions inside strings are a bit special, we need to parse the # string. The same is true for comments and error_leafs. line = lines[position[0] - 1] # The first step of completions is to get the name return re.search(r'(?!\d)\w+$|$', line[:position[1]]).group(0) elif leaf.type not in ('name', 'keyword'): return '' return leaf.value[:position[1] - leaf.start_pos[1]] def _get_code(code_lines, start_pos, end_pos): # Get relevant lines. lines = code_lines[start_pos[0] - 1:end_pos[0]] # Remove the parts at the end of the line. lines[-1] = lines[-1][:end_pos[1]] # Remove first line indentation. lines[0] = lines[0][start_pos[1]:] return ''.join(lines) class OnErrorLeaf(Exception): @property def error_leaf(self): return self.args[0] def _get_code_for_stack(code_lines, leaf, position): # It might happen that we're on whitespace or on a comment. This means # that we would not get the right leaf. if leaf.start_pos >= position: # If we're not on a comment simply get the previous leaf and proceed. leaf = leaf.get_previous_leaf() if leaf is None: return u('') # At the beginning of the file. is_after_newline = leaf.type == 'newline' while leaf.type == 'newline': leaf = leaf.get_previous_leaf() if leaf is None: return u('') if leaf.type == 'error_leaf' or leaf.type == 'string': if leaf.start_pos[0] < position[0]: # On a different line, we just begin anew. return u('') # Error leafs cannot be parsed, completion in strings is also # impossible. raise OnErrorLeaf(leaf) else: user_stmt = leaf while True: if user_stmt.parent.type in ('file_input', 'suite', 'simple_stmt'): break user_stmt = user_stmt.parent if is_after_newline: if user_stmt.start_pos[1] > position[1]: # This means that it's actually a dedent and that means that we # start without value (part of a suite). return u('') # This is basically getting the relevant lines. return _get_code(code_lines, user_stmt.get_start_pos_of_prefix(), position) def get_stack_at_position(grammar, code_lines, leaf, pos): """ Returns the possible node names (e.g. import_from, xor_test or yield_stmt). """ class EndMarkerReached(Exception): pass def tokenize_without_endmarker(code): # TODO This is for now not an official parso API that exists purely # for Jedi. tokens = grammar._tokenize(code) for token in tokens: if token.string == safeword: raise EndMarkerReached() elif token.prefix.endswith(safeword): # This happens with comments. raise EndMarkerReached() elif token.string.endswith(safeword): yield token # Probably an f-string literal that was not finished. raise EndMarkerReached() else: yield token # The code might be indedented, just remove it. code = dedent(_get_code_for_stack(code_lines, leaf, pos)) # We use a word to tell Jedi when we have reached the start of the # completion. # Use Z as a prefix because it's not part of a number suffix. safeword = 'ZZZ_USER_WANTS_TO_COMPLETE_HERE_WITH_JEDI' code = code + ' ' + safeword p = Parser(grammar._pgen_grammar, error_recovery=True) try: p.parse(tokens=tokenize_without_endmarker(code)) except EndMarkerReached: return p.stack raise SystemError( "This really shouldn't happen. There's a bug in Jedi:\n%s" % list(tokenize_without_endmarker(code)) ) def infer_goto_definition(inference_state, context, leaf): if leaf.type == 'name': # In case of a name we can just use goto_definition which does all the # magic itself. return inference_state.goto_definitions(context, leaf) parent = leaf.parent definitions = NO_VALUES if parent.type == 'atom': # e.g. `(a + b)` definitions = context.infer_node(leaf.parent) elif parent.type == 'trailer': # e.g. `a()` definitions = infer_call_of_leaf(context, leaf) elif isinstance(leaf, tree.Literal): # e.g. `"foo"` or `1.0` return infer_atom(context, leaf) elif leaf.type in ('fstring_string', 'fstring_start', 'fstring_end'): return get_string_value_set(inference_state) return definitions class CallDetails(object): def __init__(self, bracket_leaf, children, position): ['bracket_leaf', 'call_index', 'keyword_name_str'] self.bracket_leaf = bracket_leaf self._children = children self._position = position @property def index(self): return _get_index_and_key(self._children, self._position)[0] @property def keyword_name_str(self): return _get_index_and_key(self._children, self._position)[1] def calculate_index(self, param_names): positional_count = 0 used_names = set() star_count = -1 args = list(_iter_arguments(self._children, self._position)) if not args: if param_names: return 0 else: return None is_kwarg = False for i, (star_count, key_start, had_equal) in enumerate(args): is_kwarg |= had_equal | (star_count == 2) if star_count: pass # For now do nothing, we don't know what's in there here. else: if i + 1 != len(args): # Not last if had_equal: used_names.add(key_start) else: positional_count += 1 for i, param_name in enumerate(param_names): kind = param_name.get_kind() if not is_kwarg: if kind == Parameter.VAR_POSITIONAL: return i if kind in (Parameter.POSITIONAL_OR_KEYWORD, Parameter.POSITIONAL_ONLY): if i == positional_count: return i if key_start is not None and not star_count == 1 or star_count == 2: if param_name.string_name not in used_names \ and (kind == Parameter.KEYWORD_ONLY or kind == Parameter.POSITIONAL_OR_KEYWORD and positional_count <= i): if star_count: return i if had_equal: if param_name.string_name == key_start: return i else: if param_name.string_name.startswith(key_start): return i if kind == Parameter.VAR_KEYWORD: return i return None def _iter_arguments(nodes, position): def remove_after_pos(name): if name.type != 'name': return None return name.value[:position[1] - name.start_pos[1]] # Returns Generator[Tuple[star_count, Optional[key_start: str], had_equal]] nodes_before = [c for c in nodes if c.start_pos < position] if nodes_before[-1].type == 'arglist': for x in _iter_arguments(nodes_before[-1].children, position): yield x # Python 2 :( return previous_node_yielded = False stars_seen = 0 for i, node in enumerate(nodes_before): if node.type == 'argument': previous_node_yielded = True first = node.children[0] second = node.children[1] if second == '=': if second.start_pos < position: yield 0, first.value, True else: yield 0, remove_after_pos(first), False elif first in ('*', '**'): yield len(first.value), remove_after_pos(second), False else: # Must be a Comprehension first_leaf = node.get_first_leaf() if first_leaf.type == 'name' and first_leaf.start_pos >= position: yield 0, remove_after_pos(first_leaf), False else: yield 0, None, False stars_seen = 0 elif node.type in ('testlist', 'testlist_star_expr'): # testlist is Python 2 for n in node.children[::2]: if n.type == 'star_expr': stars_seen = 1 n = n.children[1] yield stars_seen, remove_after_pos(n), False stars_seen = 0 # The count of children is even if there's a comma at the end. previous_node_yielded = bool(len(node.children) % 2) elif isinstance(node, tree.PythonLeaf) and node.value == ',': if not previous_node_yielded: yield stars_seen, '', False stars_seen = 0 previous_node_yielded = False elif isinstance(node, tree.PythonLeaf) and node.value in ('*', '**'): stars_seen = len(node.value) elif node == '=' and nodes_before[-1]: previous_node_yielded = True before = nodes_before[i - 1] if before.type == 'name': yield 0, before.value, True else: yield 0, None, False # Just ignore the star that is probably a syntax error. stars_seen = 0 if not previous_node_yielded: if nodes_before[-1].type == 'name': yield stars_seen, remove_after_pos(nodes_before[-1]), False else: yield stars_seen, '', False def _get_index_and_key(nodes, position): """ Returns the amount of commas and the keyword argument string. """ nodes_before = [c for c in nodes if c.start_pos < position] if nodes_before[-1].type == 'arglist': return _get_index_and_key(nodes_before[-1].children, position) key_str = None last = nodes_before[-1] if last.type == 'argument' and last.children[1] == '=' \ and last.children[1].end_pos <= position: # Checked if the argument key_str = last.children[0].value elif last == '=': key_str = nodes_before[-2].value return nodes_before.count(','), key_str def _get_call_signature_details_from_error_node(node, additional_children, position): for index, element in reversed(list(enumerate(node.children))): # `index > 0` means that it's a trailer and not an atom. if element == '(' and element.end_pos <= position and index > 0: # It's an error node, we don't want to match too much, just # until the parentheses is enough. children = node.children[index:] name = element.get_previous_leaf() if name is None: continue if name.type == 'name' or name.parent.type in ('trailer', 'atom'): return CallDetails(element, children + additional_children, position) def get_call_signature_details(module, position): leaf = module.get_leaf_for_position(position, include_prefixes=True) # It's easier to deal with the previous token than the next one in this # case. if leaf.start_pos >= position: # Whitespace / comments after the leaf count towards the previous leaf. leaf = leaf.get_previous_leaf() if leaf is None: return None # Now that we know where we are in the syntax tree, we start to look at # parents for possible function definitions. node = leaf.parent while node is not None: if node.type in ('funcdef', 'classdef'): # Don't show call signatures if there's stuff before it that just # makes it feel strange to have a call signature. return None additional_children = [] for n in reversed(node.children): if n.start_pos < position: if n.type == 'error_node': result = _get_call_signature_details_from_error_node( n, additional_children, position ) if result is not None: return result additional_children[0:0] = n.children continue additional_children.insert(0, n) # Find a valid trailer if node.type == 'trailer' and node.children[0] == '(': # Additionally we have to check that an ending parenthesis isn't # interpreted wrong. There are two cases: # 1. Cursor before paren -> The current signature is good # 2. Cursor after paren -> We need to skip the current signature if not (leaf is node.children[-1] and position >= leaf.end_pos): leaf = node.get_previous_leaf() if leaf is None: return None return CallDetails(node.children[0], node.children, position) node = node.parent return None @call_signature_time_cache("call_signatures_validity") def cache_call_signatures(inference_state, context, bracket_leaf, code_lines, user_pos): """This function calculates the cache key.""" line_index = user_pos[0] - 1 before_cursor = code_lines[line_index][:user_pos[1]] other_lines = code_lines[bracket_leaf.start_pos[0]:line_index] whole = ''.join(other_lines + [before_cursor]) before_bracket = re.match(r'.*\(', whole, re.DOTALL) module_path = context.get_root_context().py__file__() if module_path is None: yield None # Don't cache! else: yield (module_path, before_bracket, bracket_leaf.start_pos) yield infer_goto_definition( inference_state, context, bracket_leaf.get_previous_leaf(), ) jedi-0.15.2/jedi/api/project.py0000664000175000017500000001571413577124112016113 0ustar davedave00000000000000import os import json from jedi._compatibility import FileNotFoundError, PermissionError, IsADirectoryError from jedi.api.environment import SameEnvironment, \ get_cached_default_environment from jedi.api.exceptions import WrongVersion from jedi._compatibility import force_unicode from jedi.inference.sys_path import discover_buildout_paths from jedi.inference.cache import inference_state_as_method_param_cache from jedi.common.utils import traverse_parents _CONFIG_FOLDER = '.jedi' _CONTAINS_POTENTIAL_PROJECT = 'setup.py', '.git', '.hg', 'requirements.txt', 'MANIFEST.in' _SERIALIZER_VERSION = 1 def _remove_duplicates_from_path(path): used = set() for p in path: if p in used: continue used.add(p) yield p def _force_unicode_list(lst): return list(map(force_unicode, lst)) class Project(object): # TODO serialize environment _serializer_ignore_attributes = ('_environment',) _environment = None @staticmethod def _get_json_path(base_path): return os.path.join(base_path, _CONFIG_FOLDER, 'project.json') @classmethod def load(cls, path): """ :param path: The path of the directory you want to use as a project. """ with open(cls._get_json_path(path)) as f: version, data = json.load(f) if version == 1: self = cls.__new__() self.__dict__.update(data) return self else: raise WrongVersion( "The Jedi version of this project seems newer than what we can handle." ) def __init__(self, path, **kwargs): """ :param path: The base path for this project. :param sys_path: list of str. You can override the sys path if you want. By default the ``sys.path.`` is generated from the environment (virtualenvs, etc). :param smart_sys_path: If this is enabled (default), adds paths from local directories. Otherwise you will have to rely on your packages being properly configured on the ``sys.path``. """ def py2_comp(path, environment=None, sys_path=None, smart_sys_path=True, _django=False): self._path = os.path.abspath(path) if isinstance(environment, SameEnvironment): self._environment = environment self._sys_path = sys_path self._smart_sys_path = smart_sys_path self._django = _django py2_comp(path, **kwargs) @inference_state_as_method_param_cache() def _get_base_sys_path(self, inference_state, environment=None): if self._sys_path is not None: return self._sys_path # The sys path has not been set explicitly. if environment is None: environment = self.get_environment() sys_path = list(environment.get_sys_path()) try: sys_path.remove('') except ValueError: pass return sys_path @inference_state_as_method_param_cache() def _get_sys_path(self, inference_state, environment=None, add_parent_paths=True, add_init_paths=False): """ Keep this method private for all users of jedi. However internally this one is used like a public method. """ suffixed = [] prefixed = [] sys_path = list(self._get_base_sys_path(inference_state, environment)) if self._smart_sys_path: prefixed.append(self._path) if inference_state.script_path is not None: suffixed += discover_buildout_paths(inference_state, inference_state.script_path) if add_parent_paths: # Collect directories in upward search by: # 1. Skipping directories with __init__.py # 2. Stopping immediately when above self._path traversed = [] for parent_path in traverse_parents(inference_state.script_path): if not parent_path.startswith(self._path): break if not add_init_paths \ and os.path.isfile(os.path.join(parent_path, "__init__.py")): continue traversed.append(parent_path) # AFAIK some libraries have imports like `foo.foo.bar`, which # leads to the conclusion to by default prefer longer paths # rather than shorter ones by default. suffixed += reversed(traversed) if self._django: prefixed.append(self._path) path = prefixed + sys_path + suffixed return list(_force_unicode_list(_remove_duplicates_from_path(path))) def save(self): data = dict(self.__dict__) for attribute in self._serializer_ignore_attributes: data.pop(attribute, None) with open(self._get_json_path(self._path), 'wb') as f: return json.dump((_SERIALIZER_VERSION, data), f) def get_environment(self): if self._environment is None: return get_cached_default_environment() return self._environment def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._path) def _is_potential_project(path): for name in _CONTAINS_POTENTIAL_PROJECT: if os.path.exists(os.path.join(path, name)): return True return False def _is_django_path(directory): """ Detects the path of the very well known Django library (if used) """ try: with open(os.path.join(directory, 'manage.py'), 'rb') as f: return b"DJANGO_SETTINGS_MODULE" in f.read() except (FileNotFoundError, IsADirectoryError, PermissionError): return False return False def get_default_project(path=None): if path is None: path = os.getcwd() check = os.path.realpath(path) probable_path = None first_no_init_file = None for dir in traverse_parents(check, include_current=True): try: return Project.load(dir) except (FileNotFoundError, IsADirectoryError, PermissionError): pass if first_no_init_file is None: if os.path.exists(os.path.join(dir, '__init__.py')): # In the case that a __init__.py exists, it's in 99% just a # Python package and the project sits at least one level above. continue else: first_no_init_file = dir if _is_django_path(dir): return Project(dir, _django=True) if probable_path is None and _is_potential_project(dir): probable_path = dir if probable_path is not None: # TODO search for setup.py etc return Project(probable_path) if first_no_init_file is not None: return Project(first_no_init_file) curdir = path if os.path.isdir(path) else os.path.dirname(path) return Project(curdir) jedi-0.15.2/jedi/api/exceptions.py0000664000175000017500000000017513577124112016621 0ustar davedave00000000000000class _JediError(Exception): pass class InternalError(_JediError): pass class WrongVersion(_JediError): pass jedi-0.15.2/jedi/third_party/0000775000175000017500000000000013577125145015652 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/0000775000175000017500000000000013577125145017477 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/0000775000175000017500000000000013577125145020760 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/0000775000175000017500000000000013577125145021667 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/binhex.pyi0000664000175000017500000000222113577124116023661 0ustar davedave00000000000000from typing import ( Any, IO, Tuple, Union, ) class Error(Exception): ... REASONABLY_LARGE: int LINELEN: int RUNCHAR: bytes class FInfo: def __init__(self) -> None: ... Type: str Creator: str Flags: int _FileInfoTuple = Tuple[str, FInfo, int, int] _FileHandleUnion = Union[str, IO[bytes]] def getfileinfo(name: str) -> _FileInfoTuple: ... class openrsrc: def __init__(self, *args: Any) -> None: ... def read(self, *args: Any) -> bytes: ... def write(self, *args: Any) -> None: ... def close(self) -> None: ... class BinHex: def __init__(self, name_finfo_dlen_rlen: _FileInfoTuple, ofp: _FileHandleUnion) -> None: ... def write(self, data: bytes) -> None: ... def close_data(self) -> None: ... def write_rsrc(self, data: bytes) -> None: ... def close(self) -> None: ... def binhex(inp: str, out: str) -> None: ... class HexBin: def __init__(self, ifp: _FileHandleUnion) -> None: ... def read(self, *n: int) -> bytes: ... def close_data(self) -> None: ... def read_rsrc(self, *n: int) -> bytes: ... def close(self) -> None: ... def hexbin(inp: str, out: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sre_compile.pyi0000664000175000017500000000117313577124116024712 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_compile.py # and https://github.com/python/cpython/blob/master/Lib/sre_compile.py import sys from sre_parse import SubPattern from typing import Any, List, Pattern, Tuple, Type, TypeVar, Union MAXCODE: int if sys.version_info < (3, 0): STRING_TYPES: Tuple[Type[str], Type[unicode]] _IsStringType = int else: from sre_constants import _NamedIntConstant def dis(code: List[_NamedIntConstant]) -> None: ... _IsStringType = bool def isstring(obj: Any) -> _IsStringType: ... def compile(p: Union[str, bytes, SubPattern], flags: int = ...) -> Pattern[Any]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_csv.pyi0000664000175000017500000000263513577124116023347 0ustar davedave00000000000000import sys from typing import Any, Iterable, Iterator, List, Optional, Sequence, Text QUOTE_ALL: int QUOTE_MINIMAL: int QUOTE_NONE: int QUOTE_NONNUMERIC: int class Error(Exception): ... class Dialect: delimiter: str quotechar: Optional[str] escapechar: Optional[str] doublequote: bool skipinitialspace: bool lineterminator: str quoting: int strict: int def __init__(self) -> None: ... class _reader(Iterator[List[str]]): dialect: Dialect line_num: int if sys.version_info >= (3, 0): def __next__(self) -> List[str]: ... else: def next(self) -> List[str]: ... class _writer: dialect: Dialect if sys.version_info >= (3, 5): def writerow(self, row: Iterable[Any]) -> None: ... def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ... else: def writerow(self, row: Sequence[Any]) -> None: ... def writerows(self, rows: Iterable[Sequence[Any]]) -> None: ... # TODO: precise type def writer(csvfile: Any, dialect: Any = ..., **fmtparams: Any) -> _writer: ... def reader(csvfile: Iterable[Text], dialect: Any = ..., **fmtparams: Any) -> _reader: ... def register_dialect(name: str, dialect: Any = ..., **fmtparams: Any) -> None: ... def unregister_dialect(name: str) -> None: ... def get_dialect(name: str) -> Dialect: ... def list_dialects() -> List[str]: ... def field_size_limit(new_limit: int = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pyclbr.pyi0000664000175000017500000000164313577124116023706 0ustar davedave00000000000000from typing import List, Union, Sequence, Optional, Dict class Class: module: str name: str super: Optional[List[Union[Class, str]]] methods: Dict[str, int] file: int lineno: int def __init__(self, module: str, name: str, super: Optional[List[Union[Class, str]]], file: str, lineno: int) -> None: ... class Function: module: str name: str file: int lineno: int def __init__(self, module: str, name: str, file: str, lineno: int) -> None: ... def readmodule(module: str, path: Optional[Sequence[str]] = ... ) -> Dict[str, Class]: ... def readmodule_ex(module: str, path: Optional[Sequence[str]] = ... ) -> Dict[str, Union[Class, Function, List[str]]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/plistlib.pyi0000664000175000017500000000463313577124116024237 0ustar davedave00000000000000# Stubs for plistlib from typing import ( Any, IO, Mapping, MutableMapping, Optional, Union, Type, TypeVar, ) from typing import Dict as DictT import sys if sys.version_info >= (3,): from enum import Enum class PlistFormat(Enum): FMT_XML: int FMT_BINARY: int FMT_XML = PlistFormat.FMT_XML FMT_BINARY = PlistFormat.FMT_BINARY mm = MutableMapping[str, Any] _D = TypeVar('_D', bound=mm) if sys.version_info >= (3,): _Path = str else: _Path = Union[str, unicode] if sys.version_info >= (3, 4): def load(fp: IO[bytes], *, fmt: Optional[PlistFormat] = ..., use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ... def loads(data: bytes, *, fmt: Optional[PlistFormat] = ..., use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ... def dump(value: Mapping[str, Any], fp: IO[bytes], *, fmt: PlistFormat = ..., sort_keys: bool = ..., skipkeys: bool = ...) -> None: ... def dumps(value: Mapping[str, Any], *, fmt: PlistFormat = ..., skipkeys: bool = ..., sort_keys: bool = ...) -> bytes: ... def readPlist(pathOrFile: Union[_Path, IO[bytes]]) -> DictT[str, Any]: ... def writePlist(value: Mapping[str, Any], pathOrFile: Union[_Path, IO[bytes]]) -> None: ... def readPlistFromBytes(data: bytes) -> DictT[str, Any]: ... def writePlistToBytes(value: Mapping[str, Any]) -> bytes: ... if sys.version_info < (3,): def readPlistFromResource(path: _Path, restype: str = ..., resid: int = ...) -> DictT[str, Any]: ... def writePlistToResource(rootObject: Mapping[str, Any], path: _Path, restype: str = ..., resid: int = ...) -> None: ... def readPlistFromString(data: str) -> DictT[str, Any]: ... def writePlistToString(rootObject: Mapping[str, Any]) -> str: ... if sys.version_info < (3, 7): class Dict(DictT[str, Any]): def __getattr__(self, attr: str) -> Any: ... def __setattr__(self, attr: str, value: Any) -> None: ... def __delattr__(self, attr: str) -> None: ... class Data: data: bytes def __init__(self, data: bytes) -> None: ... if sys.version_info >= (3, 8): class UID: data: int def __init__(self, data: int) -> None: ... def __index__(self) -> int: ... def __reduce__(self) -> Any: ... def __hash__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/site.pyi0000664000175000017500000000074213577124116023356 0ustar davedave00000000000000# Stubs for site from typing import List, Iterable, Optional import sys PREFIXES: List[str] ENABLE_USER_SITE: Optional[bool] USER_SITE: Optional[str] USER_BASE: Optional[str] if sys.version_info < (3,): def main() -> None: ... def addsitedir(sitedir: str, known_paths: Optional[Iterable[str]] = ...) -> None: ... def getsitepackages(prefixes: Optional[Iterable[str]] = ...) -> List[str]: ... def getuserbase() -> str: ... def getusersitepackages() -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/0000775000175000017500000000000013577125145023713 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/__init__.pyi0000664000175000017500000000000013577124116026160 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/0000775000175000017500000000000013577125145025331 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/__init__.pyi0000664000175000017500000000000013577124116027576 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/register.pyi0000664000175000017500000000000013577124116027663 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_ext.pyi0000664000175000017500000000000013577124116030016 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_dumb.pyi0000664000175000017500000000000013577124116030153 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/clean.pyi0000664000175000017500000000000013577124116027121 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_msi.pyi0000664000175000017500000000026613577124116030032 0ustar davedave00000000000000from distutils.cmd import Command class bdist_msi(Command): def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_lib.pyi0000664000175000017500000000000013577124116030333 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_wininst.pyi0000664000175000017500000000000013577124116030717 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/build.pyi0000664000175000017500000000000013577124116027136 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_rpm.pyi0000664000175000017500000000000013577124116030022 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist.pyi0000664000175000017500000000000013577124116027144 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/install.pyi0000664000175000017500000000052413577124116027520 0ustar davedave00000000000000from distutils.cmd import Command from typing import Optional, Text class install(Command): user: bool prefix: Optional[Text] home: Optional[Text] root: Optional[Text] install_lib: Optional[Text] def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_headers.pyi0000664000175000017500000000000013577124116031200 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_scripts.pyi0000664000175000017500000000000013577124116030705 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/sdist.pyi0000664000175000017500000000000013577124116027165 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_data.pyi0000664000175000017500000000000013577124116030476 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/bdist_packager.pyi0000664000175000017500000000000013577124116031001 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/check.pyi0000664000175000017500000000000013577124116027114 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_py.pyi0000664000175000017500000000042513577124116027661 0ustar davedave00000000000000from distutils.cmd import Command import sys if sys.version_info >= (3,): class build_py(Command): def initialize_options(self) -> None: ... def finalize_options(self) -> None: ... def run(self) -> None: ... class build_py_2to3(build_py): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/config.pyi0000664000175000017500000000000013577124116027304 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/build_clib.pyi0000664000175000017500000000000013577124116030127 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/command/install_scripts.pyi0000664000175000017500000000000013577124116031254 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/unixccompiler.pyi0000664000175000017500000000016513577124116027316 0ustar davedave00000000000000# Stubs for distutils.unixccompiler from distutils.ccompiler import CCompiler class UnixCCompiler(CCompiler): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/core.pyi0000664000175000017500000000364713577124116025375 0ustar davedave00000000000000# Stubs for distutils.core from typing import Any, List, Mapping, Optional, Tuple, Type, Union from distutils.cmd import Command as Command from distutils.dist import Distribution as Distribution from distutils.extension import Extension as Extension def setup(name: str = ..., version: str = ..., description: str = ..., long_description: str = ..., author: str = ..., author_email: str = ..., maintainer: str = ..., maintainer_email: str = ..., url: str = ..., download_url: str = ..., packages: List[str] = ..., py_modules: List[str] = ..., scripts: List[str] = ..., ext_modules: List[Extension] = ..., classifiers: List[str] = ..., distclass: Type[Distribution] = ..., script_name: str = ..., script_args: List[str] = ..., options: Mapping[str, Any] = ..., license: str = ..., keywords: Union[List[str], str] = ..., platforms: Union[List[str], str] = ..., cmdclass: Mapping[str, Type[Command]] = ..., data_files: List[Tuple[str, List[str]]] = ..., package_dir: Mapping[str, str] = ..., obsoletes: List[str] = ..., provides: List[str] = ..., requires: List[str] = ..., command_packages: List[str] = ..., command_options: Mapping[str, Mapping[str, Tuple[Any, Any]]] = ..., package_data: Mapping[str, List[str]] = ..., include_package_data: bool = ..., libraries: List[str] = ..., headers: List[str] = ..., ext_package: str = ..., include_dirs: List[str] = ..., password: str = ..., fullname: str = ..., **attrs: Any) -> None: ... def run_setup(script_name: str, script_args: Optional[List[str]] = ..., stop_after: str = ...) -> Distribution: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/dep_util.pyi0000664000175000017500000000045713577124116026246 0ustar davedave00000000000000# Stubs for distutils.dep_util from typing import List, Tuple def newer(source: str, target: str) -> bool: ... def newer_pairwise(sources: List[str], targets: List[str]) -> List[Tuple[str, str]]: ... def newer_group(sources: List[str], target: str, missing: str = ...) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/filelist.pyi0000664000175000017500000000006413577124116026246 0ustar davedave00000000000000# Stubs for distutils.filelist class FileList: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/log.pyi0000664000175000017500000000141013577124116025210 0ustar davedave00000000000000from typing import Any, Callable, Iterable, Text DEBUG: int INFO: int WARN: int ERROR: int FATAL: int class Log: def __init__(self, threshold: int = ...) -> None: ... def log(self, level: int, msg: Text, *args: Any) -> None: ... def debug(self, msg: Text, *args: Any) -> None: ... def info(self, msg: Text, *args: Any) -> None: ... def warn(self, msg: Text, *args: Any) -> None: ... def error(self, msg: Text, *args: Any) -> None: ... def fatal(self, msg: Text, *args: Any) -> None: ... _LogFunc = Callable[[Text, Iterable[Any]], None] log: Callable[[int, Text, Iterable[Any]], None] debug: _LogFunc info: _LogFunc warn: _LogFunc error: _LogFunc fatal: _LogFunc def set_threshold(level: int) -> int: ... def set_verbosity(v: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/archive_util.pyi0000664000175000017500000000101513577124116027106 0ustar davedave00000000000000# Stubs for distutils.archive_util from typing import Optional def make_archive(base_name: str, format: str, root_dir: Optional[str] = ..., base_dir: Optional[str] = ..., verbose: int = ..., dry_run: int = ...) -> str: ... def make_tarball(base_name: str, base_dir: str, compress: Optional[str] = ..., verbose: int = ..., dry_run: int = ...) -> str: ... def make_zipfile(base_name: str, base_dir: str, verbose: int = ..., dry_run: int = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/cygwinccompiler.pyi0000664000175000017500000000026213577124116027631 0ustar davedave00000000000000# Stubs for distutils.cygwinccompiler from distutils.unixccompiler import UnixCCompiler class CygwinCCompiler(UnixCCompiler): ... class Mingw32CCompiler(CygwinCCompiler): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/msvccompiler.pyi0000664000175000017500000000016313577124116027136 0ustar davedave00000000000000# Stubs for distutils.msvccompiler from distutils.ccompiler import CCompiler class MSVCCompiler(CCompiler): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/version.pyi0000664000175000017500000000353413577124116026125 0ustar davedave00000000000000import sys from abc import abstractmethod from typing import Any, Optional, TypeVar, Union, Pattern, Text, Tuple _T = TypeVar('_T', bound=Version) class Version: def __repr__(self) -> str: ... if sys.version_info >= (3,): def __eq__(self, other: object) -> bool: ... def __lt__(self: _T, other: Union[_T, str]) -> bool: ... def __le__(self: _T, other: Union[_T, str]) -> bool: ... def __gt__(self: _T, other: Union[_T, str]) -> bool: ... def __ge__(self: _T, other: Union[_T, str]) -> bool: ... @abstractmethod def __init__(self, vstring: Optional[Text] = ...) -> None: ... @abstractmethod def parse(self: _T, vstring: Text) -> _T: ... @abstractmethod def __str__(self) -> str: ... if sys.version_info >= (3,): @abstractmethod def _cmp(self: _T, other: Union[_T, str]) -> bool: ... else: @abstractmethod def __cmp__(self: _T, other: Union[_T, str]) -> bool: ... class StrictVersion(Version): version_re: Pattern[str] version: Tuple[int, int, int] prerelease: Optional[Tuple[Text, int]] def __init__(self, vstring: Optional[Text] = ...) -> None: ... def parse(self: _T, vstring: Text) -> _T: ... def __str__(self) -> str: ... if sys.version_info >= (3,): def _cmp(self: _T, other: Union[_T, str]) -> bool: ... else: def __cmp__(self: _T, other: Union[_T, str]) -> bool: ... class LooseVersion(Version): component_re: Pattern[str] vstring: Text version: Tuple[Union[Text, int], ...] def __init__(self, vstring: Optional[Text] = ...) -> None: ... def parse(self: _T, vstring: Text) -> _T: ... def __str__(self) -> str: ... if sys.version_info >= (3,): def _cmp(self: _T, other: Union[_T, str]) -> bool: ... else: def __cmp__(self: _T, other: Union[_T, str]) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/dir_util.pyi0000664000175000017500000000117613577124116026253 0ustar davedave00000000000000# Stubs for distutils.dir_util from typing import List def mkpath(name: str, mode: int = ..., verbose: int = ..., dry_run: int = ...) -> List[str]: ... def create_tree(base_dir: str, files: List[str], mode: int = ..., verbose: int = ..., dry_run: int = ...) -> None: ... def copy_tree(src: str, dst: str, preserve_mode: int = ..., preserve_times: int = ..., preserve_symlinks: int = ..., update: int = ..., verbose: int = ..., dry_run: int = ...) -> List[str]: ... def remove_tree(directory: str, verbose: int = ..., dry_run: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/extension.pyi0000664000175000017500000000326113577124116026451 0ustar davedave00000000000000# Stubs for distutils.extension from typing import List, Optional, Tuple import sys class Extension: if sys.version_info >= (3,): def __init__(self, name: str, sources: List[str], include_dirs: List[str] = ..., define_macros: List[Tuple[str, Optional[str]]] = ..., undef_macros: List[str] = ..., library_dirs: List[str] = ..., libraries: List[str] = ..., runtime_library_dirs: List[str] = ..., extra_objects: List[str] = ..., extra_compile_args: List[str] = ..., extra_link_args: List[str] = ..., export_symbols: List[str] = ..., depends: List[str] = ..., language: str = ..., optional: bool = ...) -> None: ... else: def __init__(self, name: str, sources: List[str], include_dirs: List[str] = ..., define_macros: List[Tuple[str, Optional[str]]] = ..., undef_macros: List[str] = ..., library_dirs: List[str] = ..., libraries: List[str] = ..., runtime_library_dirs: List[str] = ..., extra_objects: List[str] = ..., extra_compile_args: List[str] = ..., extra_link_args: List[str] = ..., export_symbols: List[str] = ..., depends: List[str] = ..., language: str = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/fancy_getopt.pyi0000664000175000017500000000170213577124116027115 0ustar davedave00000000000000# Stubs for distutils.fancy_getopt from typing import ( Any, List, Mapping, Optional, Tuple, Union, TypeVar, overload, ) _Option = Tuple[str, Optional[str], str] _GR = Tuple[List[str], OptionDummy] def fancy_getopt(options: List[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: Optional[List[str]]) -> Union[List[str], _GR]: ... def wrap_text(text: str, width: int) -> List[str]: ... class FancyGetopt: def __init__(self, option_table: Optional[List[_Option]] = ...) -> None: ... # TODO kinda wrong, `getopt(object=object())` is invalid @overload def getopt(self, args: Optional[List[str]] = ...) -> _GR: ... @overload def getopt(self, args: Optional[List[str]], object: Any) -> List[str]: ... def get_option_order(self) -> List[Tuple[str, str]]: ... def generate_help(self, header: Optional[str] = ...) -> List[str]: ... class OptionDummy: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/file_util.pyi0000664000175000017500000000075613577124116026417 0ustar davedave00000000000000# Stubs for distutils.file_util from typing import Optional, Sequence, Tuple def copy_file(src: str, dst: str, preserve_mode: bool = ..., preserve_times: bool = ..., update: bool = ..., link: Optional[str] = ..., verbose: bool = ..., dry_run: bool = ...) -> Tuple[str, str]: ... def move_file(src: str, dst: str, verbose: bool = ..., dry_run: bool = ...) -> str: ... def write_file(filename: str, contents: Sequence[str]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/dist.pyi0000664000175000017500000000075413577124116025404 0ustar davedave00000000000000# Stubs for distutils.dist from distutils.cmd import Command from typing import Any, Mapping, Optional, Dict, Tuple, Iterable, Text class Distribution: def __init__(self, attrs: Optional[Mapping[str, Any]] = ...) -> None: ... def get_option_dict(self, command: str) -> Dict[str, Tuple[str, Text]]: ... def parse_config_files(self, filenames: Optional[Iterable[Text]] = ...) -> None: ... def get_command_obj(self, command: str, create: bool = ...) -> Optional[Command]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/util.pyi0000664000175000017500000000157413577124116025417 0ustar davedave00000000000000# Stubs for distutils.util from typing import Any, Callable, List, Mapping, Optional, Tuple def get_platform() -> str: ... def convert_path(pathname: str) -> str: ... def change_root(new_root: str, pathname: str) -> str: ... def check_environ() -> None: ... def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ... def split_quoted(s: str) -> List[str]: ... def execute(func: Callable[..., None], args: Tuple[Any, ...], msg: Optional[str] = ..., verbose: bool = ..., dry_run: bool = ...) -> None: ... def strtobool(val: str) -> bool: ... def byte_compile(py_files: List[str], optimize: int = ..., force: bool = ..., prefix: Optional[str] = ..., base_dir: Optional[str] = ..., verbose: bool = ..., dry_run: bool = ..., direct: Optional[bool] = ...) -> None: ... def rfc822_escape(header: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/ccompiler.pyi0000664000175000017500000001546113577124116026417 0ustar davedave00000000000000# Stubs for distutils.ccompiler from typing import Any, Callable, List, Optional, Tuple, Union _Macro = Union[Tuple[str], Tuple[str, str]] def gen_lib_options(compiler: CCompiler, library_dirs: List[str], runtime_library_dirs: List[str], libraries: List[str]) -> List[str]: ... def gen_preprocess_options(macros: List[_Macro], include_dirs: List[str]) -> List[str]: ... def get_default_compiler(osname: Optional[str] = ..., platform: Optional[str] = ...) -> str: ... def new_compiler(plat: Optional[str] = ..., compiler: Optional[str] = ..., verbose: int = ..., dry_run: int = ..., force: int = ...) -> CCompiler: ... def show_compilers() -> None: ... class CCompiler: def __init__(self, verbose: int = ..., dry_run: int = ..., force: int = ...) -> None: ... def add_include_dir(self, dir: str) -> None: ... def set_include_dirs(self, dirs: List[str]) -> None: ... def add_library(self, libname: str) -> None: ... def set_libraries(self, libnames: List[str]) -> None: ... def add_library_dir(self, dir: str) -> None: ... def set_library_dirs(self, dirs: List[str]) -> None: ... def add_runtime_library_dir(self, dir: str) -> None: ... def set_runtime_library_dirs(self, dirs: List[str]) -> None: ... def define_macro(self, name: str, value: Optional[str] = ...) -> None: ... def undefine_macro(self, name: str) -> None: ... def add_link_object(self, object: str) -> None: ... def set_link_objects(self, objects: List[str]) -> None: ... def detect_language(self, sources: Union[str, List[str]]) -> Optional[str]: ... def find_library_file(self, dirs: List[str], lib: str, debug: bool = ...) -> Optional[str]: ... def has_function(self, funcname: str, includes: Optional[List[str]] = ..., include_dirs: Optional[List[str]] = ..., libraries: Optional[List[str]] = ..., library_dirs: Optional[List[str]] = ...) -> bool: ... def library_dir_option(self, dir: str) -> str: ... def library_option(self, lib: str) -> str: ... def runtime_library_dir_option(self, dir: str) -> str: ... def set_executables(self, **args: str) -> None: ... def compile(self, sources: List[str], output_dir: Optional[str] = ..., macros: Optional[_Macro] = ..., include_dirs: Optional[List[str]] = ..., debug: bool = ..., extra_preargs: Optional[List[str]] = ..., extra_postargs: Optional[List[str]] = ..., depends: Optional[List[str]] = ...) -> List[str]: ... def create_static_lib(self, objects: List[str], output_libname: str, output_dir: Optional[str] = ..., debug: bool = ..., target_lang: Optional[str] = ...) -> None: ... def link(self, target_desc: str, objects: List[str], output_filename: str, output_dir: Optional[str] = ..., libraries: Optional[List[str]] = ..., library_dirs: Optional[List[str]] = ..., runtime_library_dirs: Optional[List[str]] = ..., export_symbols: Optional[List[str]] = ..., debug: bool = ..., extra_preargs: Optional[List[str]] = ..., extra_postargs: Optional[List[str]] = ..., build_temp: Optional[str] = ..., target_lang: Optional[str] = ...) -> None: ... def link_executable(self, objects: List[str], output_progname: str, output_dir: Optional[str] = ..., libraries: Optional[List[str]] = ..., library_dirs: Optional[List[str]] = ..., runtime_library_dirs: Optional[List[str]] = ..., debug: bool = ..., extra_preargs: Optional[List[str]] = ..., extra_postargs: Optional[List[str]] = ..., target_lang: Optional[str] = ...) -> None: ... def link_shared_lib(self, objects: List[str], output_libname: str, output_dir: Optional[str] = ..., libraries: Optional[List[str]] = ..., library_dirs: Optional[List[str]] = ..., runtime_library_dirs: Optional[List[str]] = ..., export_symbols: Optional[List[str]] = ..., debug: bool = ..., extra_preargs: Optional[List[str]] = ..., extra_postargs: Optional[List[str]] = ..., build_temp: Optional[str] = ..., target_lang: Optional[str] = ...) -> None: ... def link_shared_object(self, objects: List[str], output_filename: str, output_dir: Optional[str] = ..., libraries: Optional[List[str]] = ..., library_dirs: Optional[List[str]] = ..., runtime_library_dirs: Optional[List[str]] = ..., export_symbols: Optional[List[str]] = ..., debug: bool = ..., extra_preargs: Optional[List[str]] = ..., extra_postargs: Optional[List[str]] = ..., build_temp: Optional[str] = ..., target_lang: Optional[str] = ...) -> None: ... def preprocess(self, source: str, output_file: Optional[str] = ..., macros: Optional[List[_Macro]] = ..., include_dirs: Optional[List[str]] = ..., extra_preargs: Optional[List[str]] = ..., extra_postargs: Optional[List[str]] = ...) -> None: ... def executable_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ... def library_filename(self, libname: str, lib_type: str = ..., strip_dir: int = ..., output_dir: str = ...) -> str: ... def object_filenames(self, source_filenames: List[str], strip_dir: int = ..., output_dir: str = ...) -> List[str]: ... def shared_object_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ... def execute(self, func: Callable[..., None], args: Tuple[Any, ...], msg: Optional[str] = ..., level: int = ...) -> None: ... def spawn(self, cmd: List[str]) -> None: ... def mkpath(self, name: str, mode: int = ...) -> None: ... def move_file(self, src: str, dst: str) -> str: ... def announce(self, msg: str, level: int = ...) -> None: ... def warn(self, msg: str) -> None: ... def debug_print(self, msg: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/debug.pyi0000664000175000017500000000005113577124116025515 0ustar davedave00000000000000# Stubs for distutils.debug DEBUG: bool jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/cmd.pyi0000664000175000017500000000503613577124116025202 0ustar davedave00000000000000# Stubs for distutils.cmd from typing import Callable, List, Tuple, Union, Optional, Iterable, Any, Text from abc import abstractmethod from distutils.dist import Distribution class Command: sub_commands: List[Tuple[str, Union[Callable[[], bool], str, None]]] def __init__(self, dist: Distribution) -> None: ... @abstractmethod def initialize_options(self) -> None: ... @abstractmethod def finalize_options(self) -> None: ... @abstractmethod def run(self) -> None: ... def announce(self, msg: Text, level: int = ...) -> None: ... def debug_print(self, msg: Text) -> None: ... def ensure_string(self, option: str, default: Optional[str] = ...) -> None: ... def ensure_string_list(self, option: Union[str, List[str]]) -> None: ... def ensure_filename(self, option: str) -> None: ... def ensure_dirname(self, option: str) -> None: ... def get_command_name(self) -> str: ... def set_undefined_options(self, src_cmd: Text, *option_pairs: Tuple[str, str]) -> None: ... def get_finalized_command(self, command: Text, create: int = ...) -> Command: ... def reinitialize_command(self, command: Union[Command, Text], reinit_subcommands: int = ...) -> Command: ... def run_command(self, command: Text) -> None: ... def get_sub_commands(self) -> List[str]: ... def warn(self, msg: Text) -> None: ... def execute(self, func: Callable[..., Any], args: Iterable[Any], msg: Optional[Text] = ..., level: int = ...) -> None: ... def mkpath(self, name: str, mode: int = ...) -> None: ... def copy_file(self, infile: str, outfile: str, preserve_mode: int = ..., preserve_times: int = ..., link: Optional[str] = ..., level: Any = ...) -> Tuple[str, bool]: ... # level is not used def copy_tree(self, infile: str, outfile: str, preserve_mode: int = ..., preserve_times: int = ..., preserve_symlinks: int = ..., level: Any = ...) -> List[str]: ... # level is not used def move_file(self, src: str, dest: str, level: Any = ...) -> str: ... # level is not used def spawn(self, cmd: Iterable[str], search_path: int = ..., level: Any = ...) -> None: ... # level is not used def make_archive(self, base_name: str, format: str, root_dir: Optional[str] = ..., base_dir: Optional[str] = ..., owner: Optional[str] = ..., group: Optional[str] = ...) -> str: ... def make_file(self, infiles: Union[str, List[str], Tuple[str]], outfile: str, func: Callable[..., Any], args: List[Any], exec_msg: Optional[str] = ..., skip_msg: Optional[str] = ..., level: Any = ...) -> None: ... # level is not used jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/bcppcompiler.pyi0000664000175000017500000000016313577124116027112 0ustar davedave00000000000000# Stubs for distutils.bcppcompiler from distutils.ccompiler import CCompiler class BCPPCompiler(CCompiler): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/spawn.pyi0000664000175000017500000000043613577124116025566 0ustar davedave00000000000000# Stubs for distutils.spawn from typing import List, Optional def spawn(cmd: List[str], search_path: bool = ..., verbose: bool = ..., dry_run: bool = ...) -> None: ... def find_executable(executable: str, path: Optional[str] = ...) -> Optional[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/errors.pyi0000664000175000017500000000152413577124116025751 0ustar davedave00000000000000class DistutilsError(Exception): ... class DistutilsModuleError(DistutilsError): ... class DistutilsClassError(DistutilsError): ... class DistutilsGetoptError(DistutilsError): ... class DistutilsArgError(DistutilsError): ... class DistutilsFileError(DistutilsError): ... class DistutilsOptionError(DistutilsError): ... class DistutilsSetupError(DistutilsError): ... class DistutilsPlatformError(DistutilsError): ... class DistutilsExecError(DistutilsError): ... class DistutilsInternalError(DistutilsError): ... class DistutilsTemplateError(DistutilsError): ... class DistutilsByteCompileError(DistutilsError): ... class CCompilerError(Exception): ... class PreprocessError(CCompilerError): ... class CompileError(CCompilerError): ... class LibError(CCompilerError): ... class LinkError(CCompilerError): ... class UnknownFileError(CCompilerError): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/text_file.pyi0000664000175000017500000000137013577124116026417 0ustar davedave00000000000000# Stubs for distutils.text_file from typing import IO, List, Optional, Tuple, Union class TextFile: def __init__(self, filename: Optional[str] = ..., file: Optional[IO[str]] = ..., *, strip_comments: bool = ..., lstrip_ws: bool = ..., rstrip_ws: bool = ..., skip_blanks: bool = ..., join_lines: bool = ..., collapse_join: bool = ...) -> None: ... def open(self, filename: str) -> None: ... def close(self) -> None: ... def warn(self, msg: str, line: Union[List[int], Tuple[int, int], int] = ...) -> None: ... def readline(self) -> Optional[str]: ... def readlines(self) -> List[str]: ... def unreadline(self, line: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/distutils/sysconfig.pyi0000664000175000017500000000126413577124116026442 0ustar davedave00000000000000# Stubs for distutils.sysconfig from typing import Mapping, Optional, Union from distutils.ccompiler import CCompiler PREFIX: str EXEC_PREFIX: str def get_config_var(name: str) -> Union[int, str, None]: ... def get_config_vars(*args: str) -> Mapping[str, Union[int, str]]: ... def get_config_h_filename() -> str: ... def get_makefile_filename() -> str: ... def get_python_inc(plat_specific: bool = ..., prefix: Optional[str] = ...) -> str: ... def get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: Optional[str] = ...) -> str: ... def customize_compiler(compiler: CCompiler) -> None: ... def set_python_build() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/modulefinder.pyi0000664000175000017500000000560613577124116025073 0ustar davedave00000000000000 from typing import Optional, Container, Dict, Sequence, Tuple, List, Any, Iterator, IO, Iterable from types import CodeType LOAD_CONST: int # undocumented IMPORT_NAME: int # undocumented STORE_NAME: int # undocumented STORE_GLOBAL: int # undocumented STORE_OPS: Tuple[int, int] # undocumented EXTENDED_ARG: int # undocumented packagePathMap: Dict[str, List[str]] # undocumented def AddPackagePath(packagename: str, path: str) -> None: ... replacePackageMap: Dict[str, str] # undocumented def ReplacePackage(oldname: str, newname: str) -> None: ... class Module: # undocumented def __init__(self, name: str, file: Optional[str] = ..., path: Optional[str] = ...) -> None: ... def __repr__(self) -> str: ... class ModuleFinder: modules: Dict[str, Module] def __init__(self, path: Optional[List[str]] = ..., debug: int = ..., excludes: Container[str] = ..., replace_paths: Sequence[Tuple[str, str]] = ...) -> None: ... def msg(self, level: int, str: str, *args: Any) -> None: ... # undocumented def msgin(self, *args: Any) -> None: ... # undocumented def msgout(self, *args: Any) -> None: ... # undocumented def run_script(self, pathname: str) -> None: ... def load_file(self, pathname: str) -> None: ... # undocumented def import_hook(self, name: str, caller: Optional[Module] = ..., fromlist: Optional[List[str]] = ..., level: int = ...) -> Optional[Module]: ... # undocumented def determine_parent(self, caller: Optional[Module], level: int = ...) -> Optional[Module]: ... # undocumented def find_head_package(self, parent: Module, name: str) -> Tuple[Module, str]: ... # undocumented def load_tail(self, q: Module, tail: str) -> Module: ... # undocumented def ensure_fromlist(self, m: Module, fromlist: Iterable[str], recursive: int = ...) -> None: ... # undocumented def find_all_submodules(self, m: Module) -> Iterable[str]: ... # undocumented def import_module(self, partname: str, fqname: str, parent: Module) -> Optional[Module]: ... # undocumented def load_module(self, fqname: str, fp: IO[str], pathname: str, file_info: Tuple[str, str, str]) -> Module: ... # undocumented def scan_opcodes(self, co: CodeType) -> Iterator[Tuple[str, Tuple[Any, ...]]]: ... # undocumented def scan_code(self, co: CodeType, m: Module) -> None: ... # undocumented def load_package(self, fqname: str, pathname: str) -> Module: ... # undocumented def add_module(self, fqname: str) -> Module: ... # undocumented def find_module(self, name: str, path: Optional[str], parent: Optional[Module] = ...) -> Tuple[Optional[IO[Any]], Optional[str], Tuple[str, str, int]]: ... # undocumented def report(self) -> None: ... def any_missing(self) -> List[str]: ... # undocumented def any_missing_maybe(self) -> Tuple[List[str], List[str]]: ... # undocumented def replace_paths_in_code(self, co: CodeType) -> CodeType: ... # undocumented jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/bdb.pyi0000664000175000017500000001057213577124116023143 0ustar davedave00000000000000 from typing import Set, Dict, Iterable, Any, Callable, Tuple, Type, SupportsInt, List, Union, TypeVar, Optional, IO from types import FrameType, TracebackType, CodeType _T = TypeVar("_T") _TraceDispatch = Callable[[FrameType, str, Any], Any] # TODO: Recursive type _ExcInfo = Tuple[Type[BaseException], BaseException, FrameType] GENERATOR_AND_COROUTINE_FLAGS: int = ... class BdbQuit(Exception): ... class Bdb: skip: Optional[Set[str]] breaks: Dict[str, List[int]] fncache: Dict[str, str] frame_returning: Optional[FrameType] botframe: Optional[FrameType] quitting: bool stopframe: Optional[FrameType] returnframe: Optional[FrameType] stoplineno: int def __init__(self, skip: Iterable[str] = ...) -> None: ... def canonic(self, filename: str) -> str: ... def reset(self) -> None: ... def trace_dispatch(self, frame: FrameType, event: str, arg: Any) -> _TraceDispatch: ... def dispatch_line(self, frame: FrameType) -> _TraceDispatch: ... def dispatch_call(self, frame: FrameType, arg: None) -> _TraceDispatch: ... def dispatch_return(self, frame: FrameType, arg: Any) -> _TraceDispatch: ... def dispatch_exception(self, frame: FrameType, arg: _ExcInfo) -> _TraceDispatch: ... def is_skipped_module(self, module_name: str) -> bool: ... def stop_here(self, frame: FrameType) -> bool: ... def break_here(self, frame: FrameType) -> bool: ... def do_clear(self, arg: Any) -> None: ... def break_anywhere(self, frame: FrameType) -> bool: ... def user_call(self, frame: FrameType, argument_list: None) -> None: ... def user_line(self, frame: FrameType) -> None: ... def user_return(self, frame: FrameType, return_value: Any) -> None: ... def user_exception(self, frame: FrameType, exc_info: _ExcInfo) -> None: ... def set_until(self, frame: FrameType, lineno: Optional[int] = ...) -> None: ... def set_step(self) -> None: ... def set_next(self, frame: FrameType) -> None: ... def set_return(self, frame: FrameType) -> None: ... def set_trace(self, frame: Optional[FrameType] = ...) -> None: ... def set_continue(self) -> None: ... def set_quit(self) -> None: ... def set_break(self, filename: str, lineno: int, temporary: bool = ..., cond: Optional[str] = ..., funcname: Optional[str] = ...) -> None: ... def clear_break(self, filename: str, lineno: int) -> None: ... def clear_bpbynumber(self, arg: SupportsInt) -> None: ... def clear_all_file_breaks(self, filename: str) -> None: ... def clear_all_breaks(self) -> None: ... def get_bpbynumber(self, arg: SupportsInt) -> Breakpoint: ... def get_break(self, filename: str, lineno: int) -> bool: ... def get_breaks(self, filename: str, lineno: int) -> List[Breakpoint]: ... def get_file_breaks(self, filename: str) -> List[Breakpoint]: ... def get_all_breaks(self) -> List[Breakpoint]: ... def get_stack(self, f: FrameType, t: TracebackType) -> Tuple[List[Tuple[FrameType, int]], int]: ... def format_stack_entry(self, frame_lineno: int, lprefix: str = ...) -> str: ... def run(self, cmd: Union[str, CodeType], globals: Dict[str, Any] = ..., locals: Dict[str, Any] = ...) -> None: ... def runeval(self, expr: str, globals: Dict[str, Any] = ..., locals: Dict[str, Any] = ...) -> None: ... def runctx(self, cmd: Union[str, CodeType], globals: Dict[str, Any], locals: Dict[str, Any]) -> None: ... def runcall(self, func: Callable[[Any], _T], *args: Any, **kwds: Any) -> Optional[_T]: ... class Breakpoint: next: int = ... bplist: Dict[Tuple[str, int], List[Breakpoint]] = ... bpbynumber: List[Optional[Breakpoint]] = ... funcname: Optional[str] func_first_executable_line: Optional[int] file: str line: int temporary: bool cond: Optional[str] enabled: bool ignore: int hits: int number: int def __init__(self, file: str, line: int, temporary: bool = ..., cond: Optional[str] = ..., funcname: Optional[str] = ...) -> None: ... def deleteMe(self) -> None: ... def enable(self) -> None: ... def disable(self) -> None: ... def bpprint(self, out: Optional[IO[str]] = ...) -> None: ... def bpformat(self) -> str: ... def __str__(self) -> str: ... def checkfuncname(b: Breakpoint, frame: FrameType) -> bool: ... def effective(file: str, line: int, frame: FrameType) -> Union[Tuple[Breakpoint, bool], Tuple[None, None]]: ... def set_trace() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/asyncore.pyi0000664000175000017500000001277313577124116024244 0ustar davedave00000000000000from typing import Tuple, Union, Optional, Any, Dict, overload import os import select import sys import time import warnings from socket import SocketType from typing import Optional from errno import (EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED, EPIPE, EAGAIN, errorcode) # cyclic dependence with asynchat _maptype = Dict[int, Any] socket_map: _maptype = ... # Undocumented class ExitNow(Exception): ... def read(obj: Any) -> None: ... def write(obj: Any) -> None: ... def readwrite(obj: Any, flags: int) -> None: ... def poll(timeout: float = ..., map: _maptype = ...) -> None: ... def poll2(timeout: float = ..., map: _maptype = ...) -> None: ... poll3 = poll2 def loop(timeout: float = ..., use_poll: bool = ..., map: _maptype = ..., count: Optional[int] = ...) -> None: ... # Not really subclass of socket.socket; it's only delegation. # It is not covariant to it. class dispatcher: debug: bool connected: bool accepting: bool connecting: bool closing: bool ignore_log_types: frozenset[str] socket: Optional[SocketType] def __init__(self, sock: Optional[SocketType] = ..., map: _maptype = ...) -> None: ... def add_channel(self, map: _maptype = ...) -> None: ... def del_channel(self, map: _maptype = ...) -> None: ... def create_socket(self, family: int, type: int) -> None: ... def set_socket(self, sock: SocketType, map: _maptype = ...) -> None: ... def set_reuse_addr(self) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def listen(self, backlog: int) -> None: ... def bind(self, address: Union[Tuple[Any, ...], str]) -> None: ... def connect(self, address: Union[Tuple[Any, ...], str]) -> None: ... def accept(self) -> Optional[Tuple[SocketType, Any]]: ... def send(self, data: bytes) -> int: ... def recv(self, buffer_size: int) -> bytes: ... def close(self) -> None: ... def log(self, message: Any) -> None: ... def log_info(self, message: Any, type: str = ...) -> None: ... def handle_read_event(self) -> None: ... def handle_connect_event(self) -> None: ... def handle_write_event(self) -> None: ... def handle_expt_event(self) -> None: ... def handle_error(self) -> None: ... def handle_expt(self) -> None: ... def handle_read(self) -> None: ... def handle_write(self) -> None: ... def handle_connect(self) -> None: ... def handle_accept(self) -> None: ... def handle_close(self) -> None: ... if sys.version_info < (3, 5): # Historically, some methods were "imported" from `self.socket` by # means of `__getattr__`. This was long deprecated, and as of Python # 3.5 has been removed; simply call the relevant methods directly on # self.socket if necessary. def detach(self) -> int: ... def fileno(self) -> int: ... # return value is an address def getpeername(self) -> Any: ... def getsockname(self) -> Any: ... @overload def getsockopt(self, level: int, optname: int) -> int: ... @overload def getsockopt(self, level: int, optname: int, buflen: int) -> bytes: ... def gettimeout(self) -> float: ... def ioctl(self, control: object, option: Tuple[int, int, int]) -> None: ... # TODO the return value may be BinaryIO or TextIO, depending on mode def makefile(self, mode: str = ..., buffering: int = ..., encoding: str = ..., errors: str = ..., newline: str = ...) -> Any: ... # return type is an address def recvfrom(self, bufsize: int, flags: int = ...) -> Any: ... def recvfrom_into(self, buffer: bytes, nbytes: int, flags: int = ...) -> Any: ... def recv_into(self, buffer: bytes, nbytes: int, flags: int = ...) -> Any: ... def sendall(self, data: bytes, flags: int = ...) -> None: ... def sendto(self, data: bytes, address: Union[Tuple[str, int], str], flags: int = ...) -> int: ... def setblocking(self, flag: bool) -> None: ... def settimeout(self, value: Union[float, None]) -> None: ... def setsockopt(self, level: int, optname: int, value: Union[int, bytes]) -> None: ... def shutdown(self, how: int) -> None: ... class dispatcher_with_send(dispatcher): def __init__(self, sock: SocketType = ..., map: _maptype = ...) -> None: ... def initiate_send(self) -> None: ... def handle_write(self) -> None: ... # incompatible signature: # def send(self, data: bytes) -> Optional[int]: ... def compact_traceback() -> Tuple[Tuple[str, str, str], type, type, str]: ... def close_all(map: _maptype = ..., ignore_all: bool = ...) -> None: ... # if os.name == 'posix': # import fcntl class file_wrapper: fd: int def __init__(self, fd: int) -> None: ... def recv(self, bufsize: int, flags: int = ...) -> bytes: ... def send(self, data: bytes, flags: int = ...) -> int: ... @overload def getsockopt(self, level: int, optname: int) -> int: ... @overload def getsockopt(self, level: int, optname: int, buflen: int) -> bytes: ... def read(self, bufsize: int, flags: int = ...) -> bytes: ... def write(self, data: bytes, flags: int = ...) -> int: ... def close(self) -> None: ... def fileno(self) -> int: ... class file_dispatcher(dispatcher): def __init__(self, fd: int, map: _maptype = ...) -> None: ... def set_file(self, fd: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pdb.pyi0000664000175000017500000000451713577124116023163 0ustar davedave00000000000000# NOTE: This stub is incomplete - only contains some global functions from cmd import Cmd import sys from types import FrameType from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar _T = TypeVar('_T') class Restart(Exception): ... def run(statement: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Dict[str, Any]] = ...) -> None: ... def runeval(expression: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Dict[str, Any]] = ...) -> Any: ... def runctx(statement: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> None: ... def runcall(*args: Any, **kwds: Any) -> Any: ... if sys.version_info >= (3, 7): def set_trace(*, header: Optional[str] = ...) -> None: ... else: def set_trace() -> None: ... def post_mortem(t: Optional[Any] = ...) -> None: ... def pm() -> None: ... class Pdb(Cmd): if sys.version_info >= (3, 6): def __init__( self, completekey: str = ..., stdin: Optional[IO[str]] = ..., stdout: Optional[IO[str]] = ..., skip: Optional[Iterable[str]] = ..., nosigint: bool = ..., readrc: bool = ..., ) -> None: ... elif sys.version_info >= (3, 2): def __init__( self, completekey: str = ..., stdin: Optional[IO[str]] = ..., stdout: Optional[IO[str]] = ..., skip: Optional[Iterable[str]] = ..., nosigint: bool = ..., ) -> None: ... else: def __init__( self, completekey: str = ..., stdin: Optional[IO[str]] = ..., stdout: Optional[IO[str]] = ..., skip: Optional[Iterable[str]] = ..., ) -> None: ... # TODO: The run* and set_trace() methods are actually defined on bdb.Bdb, from which Pdb inherits. # Move these methods there once we have a bdb stub. def run(self, statement: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Dict[str, Any]] = ...) -> None: ... def runeval(self, expression: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Dict[str, Any]] = ...) -> Any: ... def runcall(self, func: Callable[..., _T], *args: Any, **kwds: Any) -> Optional[_T]: ... def set_trace(self, frame: Optional[FrameType] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/hmac.pyi0000664000175000017500000000206313577124116023320 0ustar davedave00000000000000# Stubs for hmac from typing import Any, Callable, Optional, Union, overload, AnyStr from types import ModuleType import sys _B = Union[bytes, bytearray] # TODO more precise type for object of hashlib _Hash = Any digest_size: None if sys.version_info >= (3, 4): def new(key: _B, msg: Optional[_B] = ..., digestmod: Optional[Union[str, Callable[[], _Hash], ModuleType]] = ...) -> HMAC: ... else: def new(key: _B, msg: Optional[_B] = ..., digestmod: Optional[Union[Callable[[], _Hash], ModuleType]] = ...) -> HMAC: ... class HMAC: if sys.version_info >= (3,): digest_size: int if sys.version_info >= (3, 4): block_size: int name: str def update(self, msg: _B) -> None: ... def digest(self) -> bytes: ... def hexdigest(self) -> str: ... def copy(self) -> HMAC: ... @overload def compare_digest(a: bytearray, b: bytearray) -> bool: ... @overload def compare_digest(a: AnyStr, b: AnyStr) -> bool: ... if sys.version_info >= (3, 7): def digest(key: _B, msg: _B, digest: str) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/tarfile.pyi0000664000175000017500000001526313577124116024044 0ustar davedave00000000000000# Stubs for tarfile from typing import ( Callable, IO, Iterable, Iterator, List, Mapping, Optional, Type, Union, ) import os import sys from types import TracebackType if sys.version_info >= (3, 6): _Path = Union[bytes, str, os.PathLike] elif sys.version_info >= (3,): _Path = Union[bytes, str] else: _Path = Union[str, unicode] ENCODING: str USTAR_FORMAT: int GNU_FORMAT: int PAX_FORMAT: int DEFAULT_FORMAT: int REGTYPE: bytes AREGTYPE: bytes LNKTYPE: bytes SYMTYPE: bytes DIRTYPE: bytes FIFOTYPE: bytes CONTTYPE: bytes CHRTYPE: bytes BLKTYPE: bytes GNUTYPE_SPARSE: bytes if sys.version_info < (3,): TAR_PLAIN: int TAR_GZIPPED: int def open(name: Optional[_Path] = ..., mode: str = ..., fileobj: Optional[IO[bytes]] = ..., bufsize: int = ..., *, format: Optional[int] = ..., tarinfo: Optional[TarInfo] = ..., dereference: Optional[bool] = ..., ignore_zeros: Optional[bool] = ..., encoding: Optional[str] = ..., errors: str = ..., pax_headers: Optional[Mapping[str, str]] = ..., debug: Optional[int] = ..., errorlevel: Optional[int] = ..., compresslevel: Optional[int] = ...) -> TarFile: ... class TarFile(Iterable[TarInfo]): name: Optional[_Path] mode: str fileobj: Optional[IO[bytes]] format: Optional[int] tarinfo: Optional[TarInfo] dereference: Optional[bool] ignore_zeros: Optional[bool] encoding: Optional[str] errors: str pax_headers: Optional[Mapping[str, str]] debug: Optional[int] errorlevel: Optional[int] if sys.version_info < (3,): posix: bool def __init__(self, name: Optional[_Path] = ..., mode: str = ..., fileobj: Optional[IO[bytes]] = ..., format: Optional[int] = ..., tarinfo: Optional[TarInfo] = ..., dereference: Optional[bool] = ..., ignore_zeros: Optional[bool] = ..., encoding: Optional[str] = ..., errors: str = ..., pax_headers: Optional[Mapping[str, str]] = ..., debug: Optional[int] = ..., errorlevel: Optional[int] = ..., compresslevel: Optional[int] = ...) -> None: ... def __enter__(self) -> TarFile: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ... def __iter__(self) -> Iterator[TarInfo]: ... @classmethod def open(cls, name: Optional[_Path] = ..., mode: str = ..., fileobj: Optional[IO[bytes]] = ..., bufsize: int = ..., *, format: Optional[int] = ..., tarinfo: Optional[TarInfo] = ..., dereference: Optional[bool] = ..., ignore_zeros: Optional[bool] = ..., encoding: Optional[str] = ..., errors: str = ..., pax_headers: Optional[Mapping[str, str]] = ..., debug: Optional[int] = ..., errorlevel: Optional[int] = ...) -> TarFile: ... def getmember(self, name: str) -> TarInfo: ... def getmembers(self) -> List[TarInfo]: ... def getnames(self) -> List[str]: ... if sys.version_info >= (3, 5): def list(self, verbose: bool = ..., *, members: Optional[List[TarInfo]] = ...) -> None: ... else: def list(self, verbose: bool = ...) -> None: ... def next(self) -> Optional[TarInfo]: ... if sys.version_info >= (3, 5): def extractall(self, path: _Path = ..., members: Optional[List[TarInfo]] = ..., *, numeric_owner: bool = ...) -> None: ... else: def extractall(self, path: _Path = ..., members: Optional[List[TarInfo]] = ...) -> None: ... if sys.version_info >= (3, 5): def extract(self, member: Union[str, TarInfo], path: _Path = ..., set_attrs: bool = ..., *, numeric_owner: bool = ...) -> None: ... else: def extract(self, member: Union[str, TarInfo], path: _Path = ...) -> None: ... def extractfile(self, member: Union[str, TarInfo]) -> Optional[IO[bytes]]: ... if sys.version_info >= (3, 7): def add(self, name: str, arcname: Optional[str] = ..., recursive: bool = ..., *, filter: Optional[Callable[[TarInfo], Optional[TarInfo]]] = ...) -> None: ... elif sys.version_info >= (3,): def add(self, name: str, arcname: Optional[str] = ..., recursive: bool = ..., exclude: Optional[Callable[[str], bool]] = ..., *, filter: Optional[Callable[[TarInfo], Optional[TarInfo]]] = ...) -> None: ... else: def add(self, name: str, arcname: Optional[str] = ..., recursive: bool = ..., exclude: Optional[Callable[[str], bool]] = ..., filter: Optional[Callable[[TarInfo], Optional[TarInfo]]] = ...) -> None: ... def addfile(self, tarinfo: TarInfo, fileobj: Optional[IO[bytes]] = ...) -> None: ... def gettarinfo(self, name: Optional[str] = ..., arcname: Optional[str] = ..., fileobj: Optional[IO[bytes]] = ...) -> TarInfo: ... def close(self) -> None: ... def is_tarfile(name: str) -> bool: ... if sys.version_info < (3, 8): def filemode(mode: int) -> str: ... # undocumented if sys.version_info < (3,): class TarFileCompat: def __init__(self, filename: str, mode: str = ..., compression: int = ...) -> None: ... class TarError(Exception): ... class ReadError(TarError): ... class CompressionError(TarError): ... class StreamError(TarError): ... class ExtractError(TarError): ... class HeaderError(TarError): ... class TarInfo: name: str size: int mtime: int mode: int type: bytes linkname: str uid: int gid: int uname: str gname: str pax_headers: Mapping[str, str] def __init__(self, name: str = ...) -> None: ... if sys.version_info >= (3,): @classmethod def frombuf(cls, buf: bytes, encoding: str, errors: str) -> TarInfo: ... else: @classmethod def frombuf(cls, buf: bytes) -> TarInfo: ... @classmethod def fromtarfile(cls, tarfile: TarFile) -> TarInfo: ... def tobuf(self, format: Optional[int] = ..., encoding: Optional[str] = ..., errors: str = ...) -> bytes: ... def isfile(self) -> bool: ... def isreg(self) -> bool: ... def isdir(self) -> bool: ... def issym(self) -> bool: ... def islnk(self) -> bool: ... def ischr(self) -> bool: ... def isblk(self) -> bool: ... def isfifo(self) -> bool: ... def isdev(self) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_weakref.pyi0000664000175000017500000000200413577124116024166 0ustar davedave00000000000000import sys from typing import Any, Callable, Generic, Optional, TypeVar, overload _C = TypeVar('_C', bound=Callable[..., Any]) _T = TypeVar('_T') class CallableProxyType(object): # "weakcallableproxy" def __getattr__(self, attr: str) -> Any: ... class ProxyType(object): # "weakproxy" def __getattr__(self, attr: str) -> Any: ... class ReferenceType(Generic[_T]): if sys.version_info >= (3, 4): __callback__: Callable[[ReferenceType[_T]], Any] def __init__(self, o: _T, callback: Optional[Callable[[ReferenceType[_T]], Any]] = ...) -> None: ... def __call__(self) -> Optional[_T]: ... def __hash__(self) -> int: ... ref = ReferenceType def getweakrefcount(object: Any) -> int: ... def getweakrefs(object: Any) -> int: ... @overload def proxy(object: _C, callback: Optional[Callable[[_C], Any]] = ...) -> CallableProxyType: ... # Return CallableProxyType if object is callable, ProxyType otherwise @overload def proxy(object: _T, callback: Optional[Callable[[_T], Any]] = ...) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/posixpath.pyi0000664000175000017500000001412413577124116024430 0ustar davedave00000000000000# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! # Stubs for os.path # Ron Murawski import os import sys from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional _T = TypeVar('_T') if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] _StrPath = Union[Text, _PathLike[Text]] _BytesPath = Union[bytes, _PathLike[bytes]] else: _PathType = Union[bytes, Text] _StrPath = Text _BytesPath = bytes # ----- os.path variables ----- supports_unicode_filenames: bool # aliases (also in os) curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str devnull: str # ----- os.path function stubs ----- if sys.version_info >= (3, 6): # Overloads are necessary to work around python/mypy#3644. @overload def abspath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def basename(path: AnyStr) -> AnyStr: ... @overload def dirname(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(path: AnyStr) -> AnyStr: ... @overload def expanduser(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expanduser(path: AnyStr) -> AnyStr: ... @overload def expandvars(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normcase(path: AnyStr) -> AnyStr: ... @overload def normpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': @overload def realpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(path: AnyStr) -> AnyStr: ... else: @overload def realpath(filename: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(filename: AnyStr) -> AnyStr: ... else: def abspath(path: AnyStr) -> AnyStr: ... def basename(path: AnyStr) -> AnyStr: ... def dirname(path: AnyStr) -> AnyStr: ... def expanduser(path: AnyStr) -> AnyStr: ... def expandvars(path: AnyStr) -> AnyStr: ... def normcase(path: AnyStr) -> AnyStr: ... def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': def realpath(path: AnyStr) -> AnyStr: ... else: def realpath(filename: AnyStr) -> AnyStr: ... if sys.version_info >= (3, 6): # In reality it returns str for sequences of _StrPath and bytes for sequences # of _BytesPath, but mypy does not accept such a signature. def commonpath(paths: Sequence[_PathType]) -> Any: ... elif sys.version_info >= (3, 5): def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ... # NOTE: Empty lists results in '' (str) regardless of contained type. # Also, in Python 2 mixed sequences of Text and bytes results in either Text or bytes # So, fall back to Any def commonprefix(list: Sequence[_PathType]) -> Any: ... if sys.version_info >= (3, 3): def exists(path: Union[_PathType, int]) -> bool: ... else: def exists(path: _PathType) -> bool: ... def lexists(path: _PathType) -> bool: ... # These return float if os.stat_float_times() == True, # but int is a subclass of float. def getatime(path: _PathType) -> float: ... def getmtime(path: _PathType) -> float: ... def getctime(path: _PathType) -> float: ... def getsize(path: _PathType) -> int: ... def isabs(path: _PathType) -> bool: ... def isfile(path: _PathType) -> bool: ... def isdir(path: _PathType) -> bool: ... def islink(path: _PathType) -> bool: ... def ismount(path: _PathType) -> bool: ... if sys.version_info < (3, 0): # Make sure signatures are disjunct, and allow combinations of bytes and unicode. # (Since Python 2 allows that, too) # Note that e.g. os.path.join("a", "b", "c", "d", u"e") will still result in # a type error. @overload def join(__p1: bytes, *p: bytes) -> bytes: ... @overload def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ... @overload def join(__p1: Text, *p: _PathType) -> Text: ... elif sys.version_info >= (3, 6): # Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway. @overload def join(path: _StrPath, *paths: _StrPath) -> Text: ... @overload def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ... else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... def samefile(path1: _PathType, path2: _PathType) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ... if sys.version_info >= (3, 6): @overload def split(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... else: def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... if sys.platform == 'win32': def splitunc(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # deprecated if sys.version_info < (3,): def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/copy.pyi0000664000175000017500000000052713577124116023365 0ustar davedave00000000000000# Stubs for copy from typing import TypeVar, Optional, Dict, Any _T = TypeVar('_T') # None in CPython but non-None in Jython PyStringMap: Any # Note: memo and _nil are internal kwargs. def deepcopy(x: _T, memo: Optional[Dict[int, _T]] = ..., _nil: Any = ...) -> _T: ... def copy(x: _T) -> _T: ... class Error(Exception): ... error = Error jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/bisect.pyi0000664000175000017500000000113613577124116023661 0ustar davedave00000000000000# Stubs for bisect from typing import Any, Sequence, MutableSequence, TypeVar _T = TypeVar('_T') def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def bisect(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def insort_left(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def insort_right(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def insort(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/aifc.pyi0000664000175000017500000000636513577124116023323 0ustar davedave00000000000000from typing import Union, IO, Optional, Type, NamedTuple, List, Tuple, Any, Text, overload from typing_extensions import Literal from types import TracebackType import sys class Error(Exception): ... class _aifc_params(NamedTuple): nchannels: int sampwidth: int framerate: int nframes: int comptype: bytes compname: bytes _File = Union[Text, IO[bytes]] _Marker = Tuple[int, int, bytes] class Aifc_read: def __init__(self, f: _File) -> None: ... if sys.version_info >= (3, 4): def __enter__(self) -> Aifc_read: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ... def initfp(self, file: IO[bytes]) -> None: ... def getfp(self) -> IO[bytes]: ... def rewind(self) -> None: ... def close(self) -> None: ... def tell(self) -> int: ... def getnchannels(self) -> int: ... def getnframes(self) -> int: ... def getsampwidth(self) -> int: ... def getframerate(self) -> int: ... def getcomptype(self) -> bytes: ... def getcompname(self) -> bytes: ... def getparams(self) -> _aifc_params: ... def getmarkers(self) -> Optional[List[_Marker]]: ... def getmark(self, id: int) -> _Marker: ... def setpos(self, pos: int) -> None: ... def readframes(self, nframes: int) -> bytes: ... class Aifc_write: def __init__(self, f: _File) -> None: ... def __del__(self) -> None: ... if sys.version_info >= (3, 4): def __enter__(self) -> Aifc_write: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ... def initfp(self, file: IO[bytes]) -> None: ... def aiff(self) -> None: ... def aifc(self) -> None: ... def setnchannels(self, nchannels: int) -> None: ... def getnchannels(self) -> int: ... def setsampwidth(self, sampwidth: int) -> None: ... def getsampwidth(self) -> int: ... def setframerate(self, framerate: int) -> None: ... def getframerate(self) -> int: ... def setnframes(self, nframes: int) -> None: ... def getnframes(self) -> int: ... def setcomptype(self, comptype: bytes, compname: bytes) -> None: ... def getcomptype(self) -> bytes: ... def getcompname(self) -> bytes: ... def setparams(self, params: Tuple[int, int, int, int, bytes, bytes]) -> None: ... def getparams(self) -> _aifc_params: ... def setmark(self, id: int, pos: int, name: bytes) -> None: ... def getmark(self, id: int) -> _Marker: ... def getmarkers(self) -> Optional[List[_Marker]]: ... def tell(self) -> int: ... def writeframesraw(self, data: Any) -> None: ... # Actual type for data is Buffer Protocol def writeframes(self, data: Any) -> None: ... def close(self) -> None: ... @overload def open(f: _File, mode: Literal["r", "rb"] = ...) -> Aifc_read: ... @overload def open(f: _File, mode: Literal["w", "wb"]) -> Aifc_write: ... @overload def open(f: _File, mode: str) -> Any: ... @overload def openfp(f: _File, mode: Literal["r", "rb"] = ...) -> Aifc_read: ... @overload def openfp(f: _File, mode: Literal["w", "wb"]) -> Aifc_write: ... @overload def openfp(f: _File, mode: str) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/termios.pyi0000664000175000017500000000651313577124116024076 0ustar davedave00000000000000# Stubs for termios from typing import IO, List, Union _FD = Union[int, IO[str]] _Attr = List[Union[int, List[bytes]]] # TODO constants not really documented B0: int B1000000: int B110: int B115200: int B1152000: int B1200: int B134: int B150: int B1500000: int B1800: int B19200: int B200: int B2000000: int B230400: int B2400: int B2500000: int B300: int B3000000: int B3500000: int B38400: int B4000000: int B460800: int B4800: int B50: int B500000: int B57600: int B576000: int B600: int B75: int B921600: int B9600: int BRKINT: int BS0: int BS1: int BSDLY: int CBAUD: int CBAUDEX: int CDSUSP: int CEOF: int CEOL: int CEOT: int CERASE: int CFLUSH: int CIBAUD: int CINTR: int CKILL: int CLNEXT: int CLOCAL: int CQUIT: int CR0: int CR1: int CR2: int CR3: int CRDLY: int CREAD: int CRPRNT: int CRTSCTS: int CS5: int CS6: int CS7: int CS8: int CSIZE: int CSTART: int CSTOP: int CSTOPB: int CSUSP: int CWERASE: int ECHO: int ECHOCTL: int ECHOE: int ECHOK: int ECHOKE: int ECHONL: int ECHOPRT: int EXTA: int EXTB: int FF0: int FF1: int FFDLY: int FIOASYNC: int FIOCLEX: int FIONBIO: int FIONCLEX: int FIONREAD: int FLUSHO: int HUPCL: int ICANON: int ICRNL: int IEXTEN: int IGNBRK: int IGNCR: int IGNPAR: int IMAXBEL: int INLCR: int INPCK: int IOCSIZE_MASK: int IOCSIZE_SHIFT: int ISIG: int ISTRIP: int IUCLC: int IXANY: int IXOFF: int IXON: int NCC: int NCCS: int NL0: int NL1: int NLDLY: int NOFLSH: int N_MOUSE: int N_PPP: int N_SLIP: int N_STRIP: int N_TTY: int OCRNL: int OFDEL: int OFILL: int OLCUC: int ONLCR: int ONLRET: int ONOCR: int OPOST: int PARENB: int PARMRK: int PARODD: int PENDIN: int TAB0: int TAB1: int TAB2: int TAB3: int TABDLY: int TCFLSH: int TCGETA: int TCGETS: int TCIFLUSH: int TCIOFF: int TCIOFLUSH: int TCION: int TCOFLUSH: int TCOOFF: int TCOON: int TCSADRAIN: int TCSAFLUSH: int TCSANOW: int TCSBRK: int TCSBRKP: int TCSETA: int TCSETAF: int TCSETAW: int TCSETS: int TCSETSF: int TCSETSW: int TCXONC: int TIOCCONS: int TIOCEXCL: int TIOCGETD: int TIOCGICOUNT: int TIOCGLCKTRMIOS: int TIOCGPGRP: int TIOCGSERIAL: int TIOCGSOFTCAR: int TIOCGWINSZ: int TIOCINQ: int TIOCLINUX: int TIOCMBIC: int TIOCMBIS: int TIOCMGET: int TIOCMIWAIT: int TIOCMSET: int TIOCM_CAR: int TIOCM_CD: int TIOCM_CTS: int TIOCM_DSR: int TIOCM_DTR: int TIOCM_LE: int TIOCM_RI: int TIOCM_RNG: int TIOCM_RTS: int TIOCM_SR: int TIOCM_ST: int TIOCNOTTY: int TIOCNXCL: int TIOCOUTQ: int TIOCPKT: int TIOCPKT_DATA: int TIOCPKT_DOSTOP: int TIOCPKT_FLUSHREAD: int TIOCPKT_FLUSHWRITE: int TIOCPKT_NOSTOP: int TIOCPKT_START: int TIOCPKT_STOP: int TIOCSCTTY: int TIOCSERCONFIG: int TIOCSERGETLSR: int TIOCSERGETMULTI: int TIOCSERGSTRUCT: int TIOCSERGWILD: int TIOCSERSETMULTI: int TIOCSERSWILD: int TIOCSER_TEMT: int TIOCSETD: int TIOCSLCKTRMIOS: int TIOCSPGRP: int TIOCSSERIAL: int TIOCSSOFTCAR: int TIOCSTI: int TIOCSWINSZ: int TOSTOP: int VDISCARD: int VEOF: int VEOL: int VEOL2: int VERASE: int VINTR: int VKILL: int VLNEXT: int VMIN: int VQUIT: int VREPRINT: int VSTART: int VSTOP: int VSUSP: int VSWTC: int VSWTCH: int VT0: int VT1: int VTDLY: int VTIME: int VWERASE: int XCASE: int XTABS: int def tcgetattr(fd: _FD) -> _Attr: ... def tcsetattr(fd: _FD, when: int, attributes: _Attr) -> None: ... def tcsendbreak(fd: _FD, duration: int) -> None: ... def tcdrain(fd: _FD) -> None: ... def tcflush(fd: _FD, queue: int) -> None: ... def tcflow(fd: _FD, action: int) -> None: ... class error(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/binascii.pyi0000664000175000017500000000266213577124116024176 0ustar davedave00000000000000# Stubs for binascii # Based on http://docs.python.org/3.2/library/binascii.html import sys from typing import Union, Text if sys.version_info < (3,): # Python 2 accepts unicode ascii pretty much everywhere. _Bytes = Text _Ascii = Text else: # But since Python 3.3 ASCII-only unicode strings are accepted by the # a2b_* functions. _Bytes = bytes _Ascii = Union[bytes, str] def a2b_uu(string: _Ascii) -> bytes: ... if sys.version_info >= (3, 7): def b2a_uu(data: _Bytes, *, backtick: bool = ...) -> bytes: ... else: def b2a_uu(data: _Bytes) -> bytes: ... def a2b_base64(string: _Ascii) -> bytes: ... if sys.version_info >= (3, 6): def b2a_base64(data: _Bytes, *, newline: bool = ...) -> bytes: ... else: def b2a_base64(data: _Bytes) -> bytes: ... def a2b_qp(string: _Ascii, header: bool = ...) -> bytes: ... def b2a_qp(data: _Bytes, quotetabs: bool = ..., istext: bool = ..., header: bool = ...) -> bytes: ... def a2b_hqx(string: _Ascii) -> bytes: ... def rledecode_hqx(data: _Bytes) -> bytes: ... def rlecode_hqx(data: _Bytes) -> bytes: ... def b2a_hqx(data: _Bytes) -> bytes: ... def crc_hqx(data: _Bytes, crc: int) -> int: ... def crc32(data: _Bytes, crc: int = ...) -> int: ... def b2a_hex(data: _Bytes) -> bytes: ... def hexlify(data: _Bytes) -> bytes: ... def a2b_hex(hexstr: _Ascii) -> bytes: ... def unhexlify(hexlify: _Ascii) -> bytes: ... class Error(Exception): ... class Incomplete(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/cProfile.pyi0000664000175000017500000000240413577124116024152 0ustar davedave00000000000000import os import sys from typing import Any, Callable, Dict, Optional, Text, TypeVar, Union def run(statement: str, filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ... def runctx(statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ... _SelfT = TypeVar('_SelfT', bound=Profile) _T = TypeVar('_T') if sys.version_info >= (3, 6): _Path = Union[bytes, Text, os.PathLike[Any]] else: _Path = Union[bytes, Text] class Profile: def __init__(self, custom_timer: Callable[[], float] = ..., time_unit: float = ..., subcalls: bool = ..., builtins: bool = ...) -> None: ... def enable(self) -> None: ... def disable(self) -> None: ... def print_stats(self, sort: Union[str, int] = ...) -> None: ... def dump_stats(self, file: _Path) -> None: ... def create_stats(self) -> None: ... def run(self: _SelfT, cmd: str) -> _SelfT: ... def runctx(self: _SelfT, cmd: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> _SelfT: ... def runcall(self, func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ... if sys.version_info >= (3, 8): def __enter__(self: _SelfT) -> _SelfT: ... def __exit__(self, *exc_info: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/webbrowser.pyi0000664000175000017500000000612613577124116024575 0ustar davedave00000000000000import sys from typing import Any, Optional, Callable, List, Text, Union, Sequence class Error(Exception): ... if sys.version_info >= (3, 7): def register(name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: BaseBrowser = ..., *, preferred: bool = ...) -> None: ... else: def register(name: Text, klass: Optional[Callable[[], BaseBrowser]], instance: BaseBrowser = ..., update_tryorder: int = ...) -> None: ... def get(using: Optional[Text] = ...) -> BaseBrowser: ... def open(url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... def open_new(url: Text) -> bool: ... def open_new_tab(url: Text) -> bool: ... class BaseBrowser: args: List[str] name: str basename: str def __init__(self, name: Text = ...) -> None: ... def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... def open_new(self, url: Text) -> bool: ... def open_new_tab(self, url: Text) -> bool: ... class GenericBrowser(BaseBrowser): args: List[str] name: str basename: str def __init__(self, name: Union[Text, Sequence[Text]]) -> None: ... def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class BackgroundBrowser(GenericBrowser): def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class UnixBrowser(BaseBrowser): raise_opts: List[str] background: bool redirect_stdout: bool remote_args: List[str] remote_action: str remote_action_newwin: str remote_action_newtab: str def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class Mozilla(UnixBrowser): raise_opts: List[str] remote_args: List[str] remote_action: str remote_action_newwin: str remote_action_newtab: str background: bool class Galeon(UnixBrowser): raise_opts: List[str] remote_args: List[str] remote_action: str remote_action_newwin: str background: bool class Chrome(UnixBrowser): remote_args: List[str] remote_action: str remote_action_newwin: str remote_action_newtab: str background: bool class Opera(UnixBrowser): raise_opts: List[str] remote_args: List[str] remote_action: str remote_action_newwin: str remote_action_newtab: str background: bool class Elinks(UnixBrowser): remote_args: List[str] remote_action: str remote_action_newwin: str remote_action_newtab: str background: bool redirect_stdout: bool class Konqueror(BaseBrowser): def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class Grail(BaseBrowser): def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class WindowsDefault(BaseBrowser): def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class MacOSX(BaseBrowser): name: str def __init__(self, name: Text) -> None: ... def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... class MacOSXOSAScript(BaseBrowser): def __init__(self, name: Text) -> None: ... def open(self, url: Text, new: int = ..., autoraise: bool = ...) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ftplib.pyi0000664000175000017500000001354113577124116023673 0ustar davedave00000000000000import sys from typing import ( Any, BinaryIO, Callable, Dict, Generic, Iterable, Iterator, List, Optional, Protocol, Text, TextIO, Tuple, Type, TypeVar, Union, ) from types import TracebackType from socket import socket from ssl import SSLContext _T = TypeVar("_T") _IntOrStr = Union[int, Text] MSG_OOB: int FTP_PORT: int MAXLINE: int CRLF: str if sys.version_info >= (3,): B_CRLF: bytes class Error(Exception): ... class error_reply(Error): ... class error_temp(Error): ... class error_perm(Error): ... class error_proto(Error): ... all_errors = Tuple[Exception, ...] class _Readable(Protocol): def read(self, __length: int) -> bytes: ... class _ReadLineable(Protocol): def readline(self, _length: int) -> bytes: ... class FTP: debugging: int # Note: This is technically the type that's passed in as the host argument. But to make it easier in Python 2 we # accept Text but return str. host: str port: int maxline: int sock: Optional[socket] welcome: Optional[str] passiveserver: int timeout: int af: int lastresp: str if sys.version_info >= (3,): file: Optional[TextIO] encoding: str def __enter__(self: _T) -> _T: ... def __exit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] ) -> None: ... else: file: Optional[BinaryIO] if sys.version_info >= (3, 3): source_address: Optional[Tuple[str, int]] def __init__( self, host: Text = ..., user: Text = ..., passwd: Text = ..., acct: Text = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ..., ) -> None: ... def connect( self, host: Text = ..., port: int = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ... ) -> str: ... else: def __init__( self, host: Text = ..., user: Text = ..., passwd: Text = ..., acct: Text = ..., timeout: float = ... ) -> None: ... def connect(self, host: Text = ..., port: int = ..., timeout: float = ...) -> str: ... def getwelcome(self) -> str: ... def set_debuglevel(self, level: int) -> None: ... def debug(self, level: int) -> None: ... def set_pasv(self, val: Union[bool, int]) -> None: ... def sanitize(self, s: Text) -> str: ... def putline(self, line: Text) -> None: ... def putcmd(self, line: Text) -> None: ... def getline(self) -> str: ... def getmultiline(self) -> str: ... def getresp(self) -> str: ... def voidresp(self) -> str: ... def abort(self) -> str: ... def sendcmd(self, cmd: Text) -> str: ... def voidcmd(self, cmd: Text) -> str: ... def sendport(self, host: Text, port: int) -> str: ... def sendeprt(self, host: Text, port: int) -> str: ... def makeport(self) -> socket: ... def makepasv(self) -> Tuple[str, int]: ... def login(self, user: Text = ..., passwd: Text = ..., acct: Text = ...) -> str: ... # In practice, `rest` rest can actually be anything whose str() is an integer sequence, so to make it simple we allow integers. def ntransfercmd(self, cmd: Text, rest: Optional[_IntOrStr] = ...) -> Tuple[socket, int]: ... def transfercmd(self, cmd: Text, rest: Optional[_IntOrStr] = ...) -> socket: ... def retrbinary( self, cmd: Text, callback: Callable[[bytes], Any], blocksize: int = ..., rest: Optional[_IntOrStr] = ... ) -> str: ... def storbinary( self, cmd: Text, fp: _Readable, blocksize: int = ..., callback: Optional[Callable[[bytes], Any]] = ..., rest: Optional[_IntOrStr] = ..., ) -> str: ... def retrlines(self, cmd: Text, callback: Optional[Callable[[str], Any]] = ...) -> str: ... def storlines(self, cmd: Text, fp: _ReadLineable, callback: Optional[Callable[[bytes], Any]] = ...) -> str: ... def acct(self, password: Text) -> str: ... def nlst(self, *args: Text) -> List[str]: ... # Technically only the last arg can be a Callable but ... def dir(self, *args: Union[str, Callable[[str], None]]) -> None: ... if sys.version_info >= (3, 3): def mlsd(self, path: Text = ..., facts: Iterable[str] = ...) -> Iterator[Tuple[str, Dict[str, str]]]: ... def rename(self, fromname: Text, toname: Text) -> str: ... def delete(self, filename: Text) -> str: ... def cwd(self, dirname: Text) -> str: ... def size(self, filename: Text) -> str: ... def mkd(self, dirname: Text) -> str: ... def rmd(self, dirname: Text) -> str: ... def pwd(self) -> str: ... def quit(self) -> str: ... def close(self) -> None: ... class FTP_TLS(FTP): def __init__( self, host: Text = ..., user: Text = ..., passwd: Text = ..., acct: Text = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., context: Optional[SSLContext] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ..., ) -> None: ... ssl_version: int keyfile: Optional[str] certfile: Optional[str] context: SSLContext def login(self, user: Text = ..., passwd: Text = ..., acct: Text = ..., secure: bool = ...) -> str: ... def auth(self) -> str: ... def prot_p(self) -> str: ... def prot_c(self) -> str: ... if sys.version_info >= (3, 3): def ccc(self) -> str: ... if sys.version_info < (3,): class Netrc: def __init__(self, filename: Optional[Text] = ...) -> None: ... def get_hosts(self) -> List[str]: ... def get_account(self, host: Text) -> Tuple[Optional[str], Optional[str], Optional[str]]: ... def get_macros(self) -> List[str]: ... def get_macro(self, macro: Text) -> Tuple[str, ...]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/socket.pyi0000664000175000017500000005227713577124116023714 0ustar davedave00000000000000"""Stub for the socket module This file is organized to mirror the module's documentation, with a very small number of exceptions. To avoid requiring tests on all platforms, platform checks are included only where the documentation notes platform availability (as opposed to following actual availability), with one or two exceptions. Module documentation: https://docs.python.org/3/library/socket.html CPython module source: https://github.com/python/cpython/blob/master/Lib/socket.py CPython C source: https://github.com/python/cpython/blob/master/Modules/socketmodule.c """ # Authorship from original mypy stubs (not in typeshed git history): # Ron Murawski # adapted for Python 2.7 by Michal Pokorny import sys from typing import Any, BinaryIO, Iterable, List, Optional, Text, TextIO, Tuple, TypeVar, Union, overload if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal # ----- Constants ----- # Some socket families are listed in the "Socket families" section of the docs, # but not the "Constants" section. These are listed at the end of the list of # constants. # # Besides those and the first few constants listed, the constants are listed in # documentation order. # Constants defined by Python (i.e. not OS constants re-exported from C) has_ipv6: bool SocketType: Any if sys.version_info >= (3,): SocketIO: Any # Re-exported errno EAGAIN: int EBADF: int EINTR: int EWOULDBLOCK: int # Constants re-exported from C # Per socketmodule.c, only these three families are portable AF_UNIX: AddressFamily AF_INET: AddressFamily AF_INET6: AddressFamily SOCK_STREAM: SocketKind SOCK_DGRAM: SocketKind SOCK_RAW: SocketKind SOCK_RDM: SocketKind SOCK_SEQPACKET: SocketKind if sys.platform == 'linux' and sys.version_info >= (3,): SOCK_CLOEXEC: SocketKind SOCK_NONBLOCK: SocketKind # Address families not mentioned in the docs AF_AAL5: AddressFamily AF_APPLETALK: AddressFamily AF_ASH: AddressFamily AF_ATMPVC: AddressFamily AF_ATMSVC: AddressFamily AF_AX25: AddressFamily AF_BRIDGE: AddressFamily AF_DECnet: AddressFamily AF_ECONET: AddressFamily AF_IPX: AddressFamily AF_IRDA: AddressFamily AF_KEY: AddressFamily AF_LLC: AddressFamily AF_NETBEUI: AddressFamily AF_NETROM: AddressFamily AF_PPPOX: AddressFamily AF_ROSE: AddressFamily AF_ROUTE: AddressFamily AF_SECURITY: AddressFamily AF_SNA: AddressFamily AF_SYSTEM: AddressFamily AF_UNSPEC: AddressFamily AF_WANPIPE: AddressFamily AF_X25: AddressFamily # The "many constants" referenced by the docs SOMAXCONN: int AI_ADDRCONFIG: AddressInfo AI_ALL: AddressInfo AI_CANONNAME: AddressInfo AI_DEFAULT: AddressInfo AI_MASK: AddressInfo AI_NUMERICHOST: AddressInfo AI_NUMERICSERV: AddressInfo AI_PASSIVE: AddressInfo AI_V4MAPPED: AddressInfo AI_V4MAPPED_CFG: AddressInfo EAIEAI_ADDRFAMILY: int EAI_AGAIN: int EAI_BADFLAGS: int EAI_BADHINTS: int EAI_FAIL: int EAI_FAMILY: int EAI_MAX: int EAI_MEMORY: int EAI_NODATA: int EAI_NONAME: int EAI_OVERFLOW: int EAI_PROTOCOL: int EAI_SERVICE: int EAI_SOCKTYPE: int EAI_SYSTEM: int INADDR_ALLHOSTS_GROUP: int INADDR_ANY: int INADDR_BROADCAST: int INADDR_LOOPBACK: int INADDR_MAX_LOCAL_GROUP: int INADDR_NONE: int INADDR_UNSPEC_GROUP: int IPPORT_RESERVED: int IPPORT_USERRESERVED: int IPPROTO_AH: int IPPROTO_BIP: int IPPROTO_DSTOPTS: int IPPROTO_EGP: int IPPROTO_EON: int IPPROTO_ESP: int IPPROTO_FRAGMENT: int IPPROTO_GGP: int IPPROTO_GRE: int IPPROTO_HELLO: int IPPROTO_HOPOPTS: int IPPROTO_ICMP: int IPPROTO_ICMPV6: int IPPROTO_IDP: int IPPROTO_IGMP: int IPPROTO_IP: int IPPROTO_IPCOMP: int IPPROTO_IPIP: int IPPROTO_IPV4: int IPPROTO_IPV6: int IPPROTO_MAX: int IPPROTO_MOBILE: int IPPROTO_ND: int IPPROTO_NONE: int IPPROTO_PIM: int IPPROTO_PUP: int IPPROTO_RAW: int IPPROTO_ROUTING: int IPPROTO_RSVP: int IPPROTO_SCTP: int IPPROTO_TCP: int IPPROTO_TP: int IPPROTO_UDP: int IPPROTO_VRRP: int IPPROTO_XTP: int IPV6_CHECKSUM: int IPV6_DONTFRAG: int IPV6_DSTOPTS: int IPV6_HOPLIMIT: int IPV6_HOPOPTS: int IPV6_JOIN_GROUP: int IPV6_LEAVE_GROUP: int IPV6_MULTICAST_HOPS: int IPV6_MULTICAST_IF: int IPV6_MULTICAST_LOOP: int IPV6_NEXTHOP: int IPV6_PATHMTU: int IPV6_PKTINFO: int IPV6_RECVDSTOPTS: int IPV6_RECVHOPLIMIT: int IPV6_RECVHOPOPTS: int IPV6_RECVPATHMTU: int IPV6_RECVPKTINFO: int IPV6_RECVRTHDR: int IPV6_RECVTCLASS: int IPV6_RTHDR: int IPV6_RTHDRDSTOPTS: int IPV6_RTHDR_TYPE_0: int IPV6_TCLASS: int IPV6_UNICAST_HOPS: int IPV6_USE_MIN_MTU: int IPV6_V6ONLY: int IPX_TYPE: int IP_ADD_MEMBERSHIP: int IP_DEFAULT_MULTICAST_LOOP: int IP_DEFAULT_MULTICAST_TTL: int IP_DROP_MEMBERSHIP: int IP_HDRINCL: int IP_MAX_MEMBERSHIPS: int IP_MULTICAST_IF: int IP_MULTICAST_LOOP: int IP_MULTICAST_TTL: int IP_OPTIONS: int IP_RECVDSTADDR: int IP_RECVOPTS: int IP_RECVRETOPTS: int IP_RETOPTS: int IP_TOS: int IP_TRANSPARENT: int IP_TTL: int LOCAL_PEERCRED: int MSG_BCAST: MsgFlag MSG_BTAG: MsgFlag MSG_CMSG_CLOEXEC: MsgFlag MSG_CONFIRM: MsgFlag MSG_CTRUNC: MsgFlag MSG_DONTROUTE: MsgFlag MSG_DONTWAIT: MsgFlag MSG_EOF: MsgFlag MSG_EOR: MsgFlag MSG_ERRQUEUE: MsgFlag MSG_ETAG: MsgFlag MSG_FASTOPEN: MsgFlag MSG_MCAST: MsgFlag MSG_MORE: MsgFlag MSG_NOSIGNAL: MsgFlag MSG_NOTIFICATION: MsgFlag MSG_OOB: MsgFlag MSG_PEEK: MsgFlag MSG_TRUNC: MsgFlag MSG_WAITALL: MsgFlag NI_DGRAM: int NI_MAXHOST: int NI_MAXSERV: int NI_NAMEREQD: int NI_NOFQDN: int NI_NUMERICHOST: int NI_NUMERICSERV: int SCM_CREDENTIALS: int SCM_CREDS: int SCM_RIGHTS: int SHUT_RD: int SHUT_RDWR: int SHUT_WR: int SOL_ATALK: int SOL_AX25: int SOL_HCI: int SOL_IP: int SOL_IPX: int SOL_NETROM: int SOL_ROSE: int SOL_SOCKET: int SOL_TCP: int SOL_UDP: int SO_ACCEPTCONN: int SO_BINDTODEVICE: int SO_BROADCAST: int SO_DEBUG: int SO_DONTROUTE: int SO_ERROR: int SO_EXCLUSIVEADDRUSE: int SO_KEEPALIVE: int SO_LINGER: int SO_MARK: int SO_OOBINLINE: int SO_PASSCRED: int SO_PEERCRED: int SO_PRIORITY: int SO_RCVBUF: int SO_RCVLOWAT: int SO_RCVTIMEO: int SO_REUSEADDR: int SO_REUSEPORT: int SO_SETFIB: int SO_SNDBUF: int SO_SNDLOWAT: int SO_SNDTIMEO: int SO_TYPE: int SO_USELOOPBACK: int TCP_CORK: int TCP_DEFER_ACCEPT: int TCP_FASTOPEN: int TCP_INFO: int TCP_KEEPCNT: int TCP_KEEPIDLE: int TCP_KEEPINTVL: int TCP_LINGER2: int TCP_MAXSEG: int TCP_NODELAY: int TCP_QUICKACK: int TCP_SYNCNT: int TCP_WINDOW_CLAMP: int if sys.version_info >= (3, 7): TCP_NOTSENT_LOWAT: int # Specifically-documented constants if sys.platform == 'linux' and sys.version_info >= (3,): AF_CAN: AddressFamily PF_CAN: int SOL_CAN_BASE: int SOL_CAN_RAW: int CAN_EFF_FLAG: int CAN_EFF_MASK: int CAN_ERR_FLAG: int CAN_ERR_MASK: int CAN_RAW: int CAN_RAW_ERR_FILTER: int CAN_RAW_FILTER: int CAN_RAW_LOOPBACK: int CAN_RAW_RECV_OWN_MSGS: int CAN_RTR_FLAG: int CAN_SFF_MASK: int CAN_BCM: int CAN_BCM_TX_SETUP: int CAN_BCM_TX_DELETE: int CAN_BCM_TX_READ: int CAN_BCM_TX_SEND: int CAN_BCM_RX_SETUP: int CAN_BCM_RX_DELETE: int CAN_BCM_RX_READ: int CAN_BCM_TX_STATUS: int CAN_BCM_TX_EXPIRED: int CAN_BCM_RX_STATUS: int CAN_BCM_RX_TIMEOUT: int CAN_BCM_RX_CHANGED: int CAN_RAW_FD_FRAMES: int if sys.platform == 'linux' and sys.version_info >= (3, 7): CAN_ISOTP: int if sys.platform == 'linux': AF_PACKET: AddressFamily PF_PACKET: int PACKET_BROADCAST: int PACKET_FASTROUTE: int PACKET_HOST: int PACKET_LOOPBACK: int PACKET_MULTICAST: int PACKET_OTHERHOST: int PACKET_OUTGOING: int if sys.platform == 'linux' and sys.version_info >= (3,): AF_RDS: AddressFamily PF_RDS: int SOL_RDS: int RDS_CANCEL_SENT_TO: int RDS_CMSG_RDMA_ARGS: int RDS_CMSG_RDMA_DEST: int RDS_CMSG_RDMA_MAP: int RDS_CMSG_RDMA_STATUS: int RDS_CMSG_RDMA_UPDATE: int RDS_CONG_MONITOR: int RDS_FREE_MR: int RDS_GET_MR: int RDS_GET_MR_FOR_DEST: int RDS_RDMA_DONTWAIT: int RDS_RDMA_FENCE: int RDS_RDMA_INVALIDATE: int RDS_RDMA_NOTIFY_ME: int RDS_RDMA_READWRITE: int RDS_RDMA_SILENT: int RDS_RDMA_USE_ONCE: int RDS_RECVERR: int if sys.platform == 'win32': SIO_RCVALL: int SIO_KEEPALIVE_VALS: int if sys.version_info >= (3, 6): SIO_LOOPBACK_FAST_PATH: int RCVALL_IPLEVEL: int RCVALL_MAX: int RCVALL_OFF: int RCVALL_ON: int RCVALL_SOCKETLEVELONLY: int if sys.platform == 'linux': AF_TIPC: AddressFamily SOL_TIPC: int TIPC_ADDR_ID: int TIPC_ADDR_NAME: int TIPC_ADDR_NAMESEQ: int TIPC_CFG_SRV: int TIPC_CLUSTER_SCOPE: int TIPC_CONN_TIMEOUT: int TIPC_CRITICAL_IMPORTANCE: int TIPC_DEST_DROPPABLE: int TIPC_HIGH_IMPORTANCE: int TIPC_IMPORTANCE: int TIPC_LOW_IMPORTANCE: int TIPC_MEDIUM_IMPORTANCE: int TIPC_NODE_SCOPE: int TIPC_PUBLISHED: int TIPC_SRC_DROPPABLE: int TIPC_SUBSCR_TIMEOUT: int TIPC_SUB_CANCEL: int TIPC_SUB_PORTS: int TIPC_SUB_SERVICE: int TIPC_TOP_SRV: int TIPC_WAIT_FOREVER: int TIPC_WITHDRAWN: int TIPC_ZONE_SCOPE: int if sys.platform == 'linux' and sys.version_info >= (3, 6): AF_ALG: AddressFamily SOL_ALG: int ALG_OP_DECRYPT: int ALG_OP_ENCRYPT: int ALG_OP_SIGN: int ALG_OP_VERIFY: int ALG_SET_AEAD_ASSOCLEN: int ALG_SET_AEAD_AUTHSIZE: int ALG_SET_IV: int ALG_SET_KEY: int ALG_SET_OP: int ALG_SET_PUBKEY: int if sys.platform == 'linux' and sys.version_info >= (3, 7): AF_VSOCK: AddressFamily IOCTL_VM_SOCKETS_GET_LOCAL_CID: int VMADDR_CID_ANY: int VMADDR_CID_HOST: int VMADDR_PORT_ANY: int SO_VM_SOCKETS_BUFFER_MAX_SIZE: int SO_VM_SOCKETS_BUFFER_SIZE: int SO_VM_SOCKETS_BUFFER_MIN_SIZE: int VM_SOCKETS_INVALID_VERSION: int AF_LINK: AddressFamily # Availability: BSD, macOS # BDADDR_* and HCI_* listed with other bluetooth constants below if sys.version_info >= (3, 6): SO_DOMAIN: int SO_PASSSEC: int SO_PEERSEC: int SO_PROTOCOL: int TCP_CONGESTION: int TCP_USER_TIMEOUT: int if sys.platform == 'linux' and sys.version_info >= (3, 8): AF_QIPCRTR: AddressFamily # Semi-documented constants # (Listed under "Socket families" in the docs, but not "Constants") if sys.platform == 'linux': # Netlink is defined by Linux AF_NETLINK: AddressFamily NETLINK_ARPD: int NETLINK_CRYPTO: int NETLINK_DNRTMSG: int NETLINK_FIREWALL: int NETLINK_IP6_FW: int NETLINK_NFLOG: int NETLINK_ROUTE6: int NETLINK_ROUTE: int NETLINK_SKIP: int NETLINK_TAPBASE: int NETLINK_TCPDIAG: int NETLINK_USERSOCK: int NETLINK_W1: int NETLINK_XFRM: int if sys.platform != 'win32' and sys.platform != 'darwin': # Linux and some BSD support is explicit in the docs # Windows and macOS do not support in practice AF_BLUETOOTH: AddressFamily BTPROTO_HCI: int BTPROTO_L2CAP: int BTPROTO_RFCOMM: int BTPROTO_SCO: int # not in FreeBSD BDADDR_ANY: str BDADDR_LOCAL: str HCI_FILTER: int # not in NetBSD or DragonFlyBSD # not in FreeBSD, NetBSD, or DragonFlyBSD HCI_TIME_STAMP: int HCI_DATA_DIR: int if sys.platform == 'darwin': # PF_SYSTEM is defined by macOS PF_SYSTEM: int SYSPROTO_CONTROL: int # enum versions of above flags if sys.version_info >= (3, 4): from enum import IntEnum class AddressFamily(IntEnum): AF_UNIX: int AF_INET: int AF_INET6: int AF_AAL5: int AF_ALG: int AF_APPLETALK: int AF_ASH: int AF_ATMPVC: int AF_ATMSVC: int AF_AX25: int AF_BLUETOOTH: int AF_BRIDGE: int AF_CAN: int AF_DECnet: int AF_ECONET: int AF_IPX: int AF_IRDA: int AF_KEY: int AF_LINK: int AF_LLC: int AF_NETBEUI: int AF_NETLINK: int AF_NETROM: int AF_PACKET: int AF_PPPOX: int AF_QIPCRTR: int AF_RDS: int AF_ROSE: int AF_ROUTE: int AF_SECURITY: int AF_SNA: int AF_SYSTEM: int AF_TIPC: int AF_UNSPEC: int AF_VSOCK: int AF_WANPIPE: int AF_X25: int class SocketKind(IntEnum): SOCK_STREAM: int SOCK_DGRAM: int SOCK_RAW: int SOCK_RDM: int SOCK_SEQPACKET: int SOCK_CLOEXEC: int SOCK_NONBLOCK: int else: AddressFamily = int SocketKind = int if sys.version_info >= (3, 6): from enum import IntFlag class AddressInfo(IntFlag): AI_ADDRCONFIG: int AI_ALL: int AI_CANONNAME: int AI_NUMERICHOST: int AI_NUMERICSERV: int AI_PASSIVE: int AI_V4MAPPED: int class MsgFlag(IntFlag): MSG_CTRUNC: int MSG_DONTROUTE: int MSG_DONTWAIT: int MSG_EOR: int MSG_OOB: int MSG_PEEK: int MSG_TRUNC: int MSG_WAITALL: int else: AddressInfo = int MsgFlag = int # ----- Exceptions ----- if sys.version_info < (3,): class error(IOError): ... else: error = OSError class herror(error): def __init__(self, herror: int = ..., string: str = ...) -> None: ... class gaierror(error): def __init__(self, error: int = ..., string: str = ...) -> None: ... class timeout(error): def __init__(self, error: int = ..., string: str = ...) -> None: ... # ----- Classes ----- # Addresses can be either tuples of varying lengths (AF_INET, AF_INET6, # AF_NETLINK, AF_TIPC) or strings (AF_UNIX). _Address = Union[tuple, str] _RetAddress = Any # TODO Most methods allow bytes as address objects _WriteBuffer = Union[bytearray, memoryview] _CMSG = Tuple[int, int, bytes] _SelfT = TypeVar('_SelfT', bound=socket) class socket: family: int type: int proto: int if sys.version_info < (3,): def __init__(self, family: int = ..., type: int = ..., proto: int = ...) -> None: ... else: def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: Optional[int] = ...) -> None: ... def __enter__(self: _SelfT) -> _SelfT: ... def __exit__(self, *args: Any) -> None: ... # --- methods --- def accept(self) -> Tuple[socket, _RetAddress]: ... def bind(self, address: Union[_Address, bytes]) -> None: ... def close(self) -> None: ... def connect(self, address: Union[_Address, bytes]) -> None: ... def connect_ex(self, address: Union[_Address, bytes]) -> int: ... def detach(self) -> int: ... def dup(self) -> socket: ... def fileno(self) -> int: ... if sys.version_info >= (3, 4): def get_inheritable(self) -> bool: ... def getpeername(self) -> _RetAddress: ... def getsockname(self) -> _RetAddress: ... @overload def getsockopt(self, level: int, optname: int) -> int: ... @overload def getsockopt(self, level: int, optname: int, buflen: int) -> bytes: ... if sys.version_info >= (3, 7): def getblocking(self) -> bool: ... def gettimeout(self) -> Optional[float]: ... if sys.platform == 'win32': def ioctl(self, control: object, option: Tuple[int, int, int]) -> None: ... if sys.version_info >= (3, 5): def listen(self, __backlog: int = ...) -> None: ... else: def listen(self, __backlog: int) -> None: ... # Note that the makefile's documented windows-specific behavior is not represented if sys.version_info < (3,): def makefile(self, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ... else: # mode strings with duplicates are intentionally excluded @overload def makefile(self, mode: Literal['r', 'w', 'rw', 'wr', ''], buffering: Optional[int] = ..., *, encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> TextIO: ... @overload def makefile(self, mode: Literal['b', 'rb', 'br', 'wb', 'bw', 'rwb', 'rbw', 'wrb', 'wbr', 'brw', 'bwr'] = ..., buffering: Optional[int] = ..., *, encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> BinaryIO: ... def recv(self, bufsize: int, flags: int = ...) -> bytes: ... def recvfrom(self, bufsize: int, flags: int = ...) -> Tuple[bytes, _RetAddress]: ... if sys.version_info >= (3, 3): def recvmsg(self, __bufsize: int, __ancbufsize: int = ..., __flags: int = ...) -> Tuple[bytes, List[_CMSG], int, Any]: ... def recvmsg_into(self, __buffers: Iterable[_WriteBuffer], __ancbufsize: int = ..., __flags: int = ...) -> Tuple[int, List[_CMSG], int, Any]: ... def recvfrom_into(self, buffer: _WriteBuffer, nbytes: int = ..., flags: int = ...) -> Tuple[int, _RetAddress]: ... def recv_into(self, buffer: _WriteBuffer, nbytes: int = ..., flags: int = ...) -> int: ... def send(self, data: bytes, flags: int = ...) -> int: ... def sendall(self, data: bytes, flags: int = ...) -> None: ... # return type: None on success @overload def sendto(self, data: bytes, address: _Address) -> int: ... @overload def sendto(self, data: bytes, flags: int, address: _Address) -> int: ... if sys.version_info >= (3, 3): def sendmsg(self, __buffers: Iterable[bytes], __ancdata: Iterable[_CMSG] = ..., __flags: int = ..., __address: _Address = ...) -> int: ... if sys.platform == 'linux' and sys.version_info >= (3, 6): # TODO add the parameter types for sendmsg_afalg def sendmsg_afalg(self, msg=..., *, op, iv=..., assoclen=..., flags=...) -> int: ... if sys.version_info >= (3,): # TODO determine legal types for file parameter def sendfile(self, file, offset: int = ..., count: Optional[int] = ...) -> int: ... def set_inheritable(self, inheritable: bool) -> None: ... def setblocking(self, flag: bool) -> None: ... def settimeout(self, value: Optional[float]) -> None: ... if sys.version_info < (3, 6): def setsockopt(self, level: int, optname: int, value: Union[int, bytes]) -> None: ... else: @overload def setsockopt(self, level: int, optname: int, value: Union[int, bytes]) -> None: ... @overload def setsockopt(self, level: int, optname: int, value: None, optlen: int) -> None: ... if sys.platform == 'win32': def share(self, process_id: int) -> bytes: ... def shutdown(self, how: int) -> None: ... # ----- Functions ----- if sys.version_info >= (3, 7): def close(fd: int) -> None: ... def create_connection(address: Tuple[Optional[str], int], timeout: Optional[float] = ..., source_address: Tuple[Union[bytearray, bytes, Text], int] = ...) -> socket: ... if sys.version_info >= (3, 8): def create_server(address: _Address, *, family: int = ..., backlog: Optional[int] = ..., reuse_port: bool = ..., dualstack_ipv6: bool = ...) -> socket: ... def has_dualstack_ipv6() -> bool: ... def fromfd(fd: int, family: int, type: int, proto: int = ...) -> socket: ... if sys.platform == 'win32' and sys.version_info >= (3, 3): def fromshare(data: bytes) -> socket: ... # the 5th tuple item is an address # TODO the "Tuple[Any, ...]" should be "Union[Tuple[str, int], Tuple[str, int, int, int]]" but that triggers # https://github.com/python/mypy/issues/2509 def getaddrinfo(host: Optional[Union[bytearray, bytes, Text]], port: Union[str, int, None], family: int = ..., socktype: int = ..., proto: int = ..., flags: int = ...) -> List[Tuple[AddressFamily, SocketKind, int, str, Tuple[Any, ...]]]: ... def getfqdn(name: str = ...) -> str: ... def gethostbyname(hostname: str) -> str: ... def gethostbyname_ex(hostname: str) -> Tuple[str, List[str], List[str]]: ... def gethostname() -> str: ... def gethostbyaddr(ip_address: str) -> Tuple[str, List[str], List[str]]: ... def getnameinfo(sockaddr: Union[Tuple[str, int], Tuple[str, int, int, int]], flags: int) -> Tuple[str, int]: ... def getprotobyname(protocolname: str) -> int: ... def getservbyname(servicename: str, protocolname: str = ...) -> int: ... def getservbyport(port: int, protocolname: str = ...) -> str: ... def socketpair(family: int = ..., type: int = ..., proto: int = ...) -> Tuple[socket, socket]: ... def ntohl(x: int) -> int: ... # param & ret val are 32-bit ints def ntohs(x: int) -> int: ... # param & ret val are 16-bit ints def htonl(x: int) -> int: ... # param & ret val are 32-bit ints def htons(x: int) -> int: ... # param & ret val are 16-bit ints def inet_aton(ip_string: str) -> bytes: ... # ret val 4 bytes in length def inet_ntoa(packed_ip: bytes) -> str: ... def inet_pton(address_family: int, ip_string: str) -> bytes: ... def inet_ntop(address_family: int, packed_ip: bytes) -> str: ... if sys.version_info >= (3, 3): def CMSG_LEN(length: int) -> int: ... def CMSG_SPACE(length: int) -> int: ... def getdefaulttimeout() -> Optional[float]: ... def setdefaulttimeout(timeout: Optional[float]) -> None: ... if sys.version_info >= (3, 3): def sethostname(name: str) -> None: ... def if_nameindex() -> List[Tuple[int, str]]: ... def if_nametoindex(name: str) -> int: ... def if_indextoname(index: int) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/readline.pyi0000664000175000017500000000276513577124116024204 0ustar davedave00000000000000# Stubs for readline from typing import Callable, Optional, Sequence import sys _CompleterT = Optional[Callable[[str, int], Optional[str]]] _CompDispT = Optional[Callable[[str, Sequence[str], int], None]] def parse_and_bind(string: str) -> None: ... def read_init_file(filename: str = ...) -> None: ... def get_line_buffer() -> str: ... def insert_text(string: str) -> None: ... def redisplay() -> None: ... def read_history_file(filename: str = ...) -> None: ... def write_history_file(filename: str = ...) -> None: ... if sys.version_info >= (3, 5): def append_history_file(nelements: int, filename: str = ...) -> None: ... def get_history_length() -> int: ... def set_history_length(length: int) -> None: ... def clear_history() -> None: ... def get_current_history_length() -> int: ... def get_history_item(index: int) -> str: ... def remove_history_item(pos: int) -> None: ... def replace_history_item(pos: int, line: str) -> None: ... def add_history(string: str) -> None: ... def set_startup_hook(function: Optional[Callable[[], None]] = ...) -> None: ... def set_pre_input_hook(function: Optional[Callable[[], None]] = ...) -> None: ... def set_completer(function: _CompleterT = ...) -> None: ... def get_completer() -> _CompleterT: ... def get_completion_type() -> int: ... def get_begidx() -> int: ... def get_endidx() -> int: ... def set_completer_delims(string: str) -> None: ... def get_completer_delims() -> str: ... def set_completion_display_matches_hook(function: _CompDispT = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_curses.pyi0000664000175000017500000003176213577124116024063 0ustar davedave00000000000000import sys from typing import Any, BinaryIO, IO, NamedTuple, Optional, Tuple, Union, overload _chtype = Union[str, bytes, int] ALL_MOUSE_EVENTS: int A_ALTCHARSET: int A_ATTRIBUTES: int A_BLINK: int A_BOLD: int A_CHARTEXT: int A_COLOR: int A_DIM: int A_HORIZONTAL: int A_INVIS: int if sys.version_info >= (3, 7): A_ITALIC: int A_LEFT: int A_LOW: int A_NORMAL: int A_PROTECT: int A_REVERSE: int A_RIGHT: int A_STANDOUT: int A_TOP: int A_UNDERLINE: int A_VERTICAL: int BUTTON1_CLICKED: int BUTTON1_DOUBLE_CLICKED: int BUTTON1_PRESSED: int BUTTON1_RELEASED: int BUTTON1_TRIPLE_CLICKED: int BUTTON2_CLICKED: int BUTTON2_DOUBLE_CLICKED: int BUTTON2_PRESSED: int BUTTON2_RELEASED: int BUTTON2_TRIPLE_CLICKED: int BUTTON3_CLICKED: int BUTTON3_DOUBLE_CLICKED: int BUTTON3_PRESSED: int BUTTON3_RELEASED: int BUTTON3_TRIPLE_CLICKED: int BUTTON4_CLICKED: int BUTTON4_DOUBLE_CLICKED: int BUTTON4_PRESSED: int BUTTON4_RELEASED: int BUTTON4_TRIPLE_CLICKED: int BUTTON_ALT: int BUTTON_CTRL: int BUTTON_SHIFT: int COLOR_BLACK: int COLOR_BLUE: int COLOR_CYAN: int COLOR_GREEN: int COLOR_MAGENTA: int COLOR_RED: int COLOR_WHITE: int COLOR_YELLOW: int ERR: int KEY_A1: int KEY_A3: int KEY_B2: int KEY_BACKSPACE: int KEY_BEG: int KEY_BREAK: int KEY_BTAB: int KEY_C1: int KEY_C3: int KEY_CANCEL: int KEY_CATAB: int KEY_CLEAR: int KEY_CLOSE: int KEY_COMMAND: int KEY_COPY: int KEY_CREATE: int KEY_CTAB: int KEY_DC: int KEY_DL: int KEY_DOWN: int KEY_EIC: int KEY_END: int KEY_ENTER: int KEY_EOL: int KEY_EOS: int KEY_EXIT: int KEY_F0: int KEY_F1: int KEY_F10: int KEY_F11: int KEY_F12: int KEY_F13: int KEY_F14: int KEY_F15: int KEY_F16: int KEY_F17: int KEY_F18: int KEY_F19: int KEY_F2: int KEY_F20: int KEY_F21: int KEY_F22: int KEY_F23: int KEY_F24: int KEY_F25: int KEY_F26: int KEY_F27: int KEY_F28: int KEY_F29: int KEY_F3: int KEY_F30: int KEY_F31: int KEY_F32: int KEY_F33: int KEY_F34: int KEY_F35: int KEY_F36: int KEY_F37: int KEY_F38: int KEY_F39: int KEY_F4: int KEY_F40: int KEY_F41: int KEY_F42: int KEY_F43: int KEY_F44: int KEY_F45: int KEY_F46: int KEY_F47: int KEY_F48: int KEY_F49: int KEY_F5: int KEY_F50: int KEY_F51: int KEY_F52: int KEY_F53: int KEY_F54: int KEY_F55: int KEY_F56: int KEY_F57: int KEY_F58: int KEY_F59: int KEY_F6: int KEY_F60: int KEY_F61: int KEY_F62: int KEY_F63: int KEY_F7: int KEY_F8: int KEY_F9: int KEY_FIND: int KEY_HELP: int KEY_HOME: int KEY_IC: int KEY_IL: int KEY_LEFT: int KEY_LL: int KEY_MARK: int KEY_MAX: int KEY_MESSAGE: int KEY_MIN: int KEY_MOUSE: int KEY_MOVE: int KEY_NEXT: int KEY_NPAGE: int KEY_OPEN: int KEY_OPTIONS: int KEY_PPAGE: int KEY_PREVIOUS: int KEY_PRINT: int KEY_REDO: int KEY_REFERENCE: int KEY_REFRESH: int KEY_REPLACE: int KEY_RESET: int KEY_RESIZE: int KEY_RESTART: int KEY_RESUME: int KEY_RIGHT: int KEY_SAVE: int KEY_SBEG: int KEY_SCANCEL: int KEY_SCOMMAND: int KEY_SCOPY: int KEY_SCREATE: int KEY_SDC: int KEY_SDL: int KEY_SELECT: int KEY_SEND: int KEY_SEOL: int KEY_SEXIT: int KEY_SF: int KEY_SFIND: int KEY_SHELP: int KEY_SHOME: int KEY_SIC: int KEY_SLEFT: int KEY_SMESSAGE: int KEY_SMOVE: int KEY_SNEXT: int KEY_SOPTIONS: int KEY_SPREVIOUS: int KEY_SPRINT: int KEY_SR: int KEY_SREDO: int KEY_SREPLACE: int KEY_SRESET: int KEY_SRIGHT: int KEY_SRSUME: int KEY_SSAVE: int KEY_SSUSPEND: int KEY_STAB: int KEY_SUNDO: int KEY_SUSPEND: int KEY_UNDO: int KEY_UP: int OK: int REPORT_MOUSE_POSITION: int _C_API: Any version: bytes def baudrate() -> int: ... def beep() -> None: ... def can_change_color() -> bool: ... def cbreak(flag: bool = ...) -> None: ... def color_content(color_number: int) -> Tuple[int, int, int]: ... def color_pair(color_number: int) -> int: ... def curs_set(visibility: int) -> int: ... def def_prog_mode() -> None: ... def def_shell_mode() -> None: ... def delay_output(ms: int) -> None: ... def doupdate() -> None: ... def echo(flag: bool = ...) -> None: ... def endwin() -> None: ... def erasechar() -> bytes: ... def filter() -> None: ... def flash() -> None: ... def flushinp() -> None: ... def getmouse() -> Tuple[int, int, int, int, int]: ... def getsyx() -> Tuple[int, int]: ... def getwin(f: BinaryIO) -> _CursesWindow: ... def halfdelay(tenths: int) -> None: ... def has_colors() -> bool: ... def has_ic() -> bool: ... def has_il() -> bool: ... def has_key(ch: int) -> bool: ... def init_color(color_number: int, r: int, g: int, b: int) -> None: ... def init_pair(pair_number: int, fg: int, bg: int) -> None: ... def initscr() -> _CursesWindow: ... def intrflush(ch: bool) -> None: ... def is_term_resized(nlines: int, ncols: int) -> bool: ... def isendwin() -> bool: ... def keyname(k: int) -> bytes: ... def killchar() -> bytes: ... def longname() -> bytes: ... def meta(yes: bool) -> None: ... def mouseinterval(interval: int) -> None: ... def mousemask(mousemask: int) -> Tuple[int, int]: ... def napms(ms: int) -> int: ... def newpad(nlines: int, ncols: int) -> _CursesWindow: ... def newwin(nlines: int, ncols: int, begin_y: int = ..., begin_x: int = ...) -> _CursesWindow: ... def nl(flag: bool = ...) -> None: ... def nocbreak() -> None: ... def noecho() -> None: ... def nonl() -> None: ... def noqiflush() -> None: ... def noraw() -> None: ... def pair_content(pair_number: int) -> Tuple[int, int]: ... def pair_number(attr: int) -> int: ... def putp(string: bytes) -> None: ... def qiflush(flag: bool = ...) -> None: ... def raw(flag: bool = ...) -> None: ... def reset_prog_mode() -> None: ... def reset_shell_mode() -> None: ... def resetty() -> None: ... def resize_term(nlines: int, ncols: int) -> None: ... def resizeterm(nlines: int, ncols: int) -> None: ... def savetty() -> None: ... def setsyx(y: int, x: int) -> None: ... def setupterm(termstr: str = ..., fd: int = ...) -> None: ... def start_color() -> None: ... def termattrs() -> int: ... def termname() -> bytes: ... def tigetflag(capname: str) -> int: ... def tigetnum(capname: str) -> int: ... def tigetstr(capname: str) -> bytes: ... def tparm(fmt: bytes, i1: int = ..., i2: int = ..., i3: int = ..., i4: int = ..., i5: int = ..., i6: int = ..., i7: int = ..., i8: int = ..., i9: int = ...) -> bytes: ... def typeahead(fd: int) -> None: ... def unctrl(ch: _chtype) -> bytes: ... if sys.version_info >= (3, 3): def unget_wch(ch: Union[int, str]) -> None: ... def ungetch(ch: _chtype) -> None: ... def ungetmouse(id: int, x: int, y: int, z: int, bstate: int) -> None: ... if sys.version_info >= (3, 5): def update_lines_cols() -> int: ... def use_default_colors() -> None: ... def use_env(flag: bool) -> None: ... class error(Exception): ... class _CursesWindow: if sys.version_info >= (3, 3): encoding: str @overload def addch(self, ch: _chtype, attr: int = ...) -> None: ... @overload def addch(self, y: int, x: int, ch: _chtype, attr: int = ...) -> None: ... @overload def addnstr(self, str: str, n: int, attr: int = ...) -> None: ... @overload def addnstr(self, y: int, x: int, str: str, n: int, attr: int = ...) -> None: ... @overload def addstr(self, str: str, attr: int = ...) -> None: ... @overload def addstr(self, y: int, x: int, str: str, attr: int = ...) -> None: ... def attroff(self, attr: int) -> None: ... def attron(self, attr: int) -> None: ... def attrset(self, attr: int) -> None: ... def bkgd(self, ch: _chtype, attr: int = ...) -> None: ... def bkgset(self, ch: _chtype, attr: int = ...) -> None: ... def border(self, ls: _chtype = ..., rs: _chtype = ..., ts: _chtype = ..., bs: _chtype = ..., tl: _chtype = ..., tr: _chtype = ..., bl: _chtype = ..., br: _chtype = ...) -> None: ... @overload def box(self) -> None: ... @overload def box(self, vertch: _chtype = ..., horch: _chtype = ...) -> None: ... @overload def chgat(self, attr: int) -> None: ... @overload def chgat(self, num: int, attr: int) -> None: ... @overload def chgat(self, y: int, x: int, attr: int) -> None: ... @overload def chgat(self, y: int, x: int, num: int, attr: int) -> None: ... def clear(self) -> None: ... def clearok(self, yes: int) -> None: ... def clrtobot(self) -> None: ... def clrtoeol(self) -> None: ... def cursyncup(self) -> None: ... @overload def delch(self) -> None: ... @overload def delch(self, y: int, x: int) -> None: ... def deleteln(self) -> None: ... @overload def derwin(self, begin_y: int, begin_x: int) -> _CursesWindow: ... @overload def derwin(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> _CursesWindow: ... def echochar(self, ch: _chtype, attr: int = ...) -> None: ... def enclose(self, y: int, x: int) -> bool: ... def erase(self) -> None: ... def getbegyx(self) -> Tuple[int, int]: ... def getbkgd(self) -> Tuple[int, int]: ... @overload def getch(self) -> int: ... @overload def getch(self, y: int, x: int) -> int: ... if sys.version_info >= (3, 3): @overload def get_wch(self) -> Union[int, str]: ... @overload def get_wch(self, y: int, x: int) -> Union[int, str]: ... @overload def getkey(self) -> str: ... @overload def getkey(self, y: int, x: int) -> str: ... def getmaxyx(self) -> Tuple[int, int]: ... def getparyx(self) -> Tuple[int, int]: ... @overload def getstr(self) -> _chtype: ... @overload def getstr(self, n: int) -> _chtype: ... @overload def getstr(self, y: int, x: int) -> _chtype: ... @overload def getstr(self, y: int, x: int, n: int) -> _chtype: ... def getyx(self) -> Tuple[int, int]: ... @overload def hline(self, ch: _chtype, n: int) -> None: ... @overload def hline(self, y: int, x: int, ch: _chtype, n: int) -> None: ... def idcok(self, flag: bool) -> None: ... def idlok(self, yes: bool) -> None: ... def immedok(self, flag: bool) -> None: ... @overload def inch(self) -> _chtype: ... @overload def inch(self, y: int, x: int) -> _chtype: ... @overload def insch(self, ch: _chtype, attr: int = ...) -> None: ... @overload def insch(self, y: int, x: int, ch: _chtype, attr: int = ...) -> None: ... def insdelln(self, nlines: int) -> None: ... def insertln(self) -> None: ... @overload def insnstr(self, str: str, n: int, attr: int = ...) -> None: ... @overload def insnstr(self, y: int, x: int, str: str, n: int, attr: int = ...) -> None: ... @overload def insstr(self, str: str, attr: int = ...) -> None: ... @overload def insstr(self, y: int, x: int, str: str, attr: int = ...) -> None: ... @overload def instr(self, n: int = ...) -> _chtype: ... @overload def instr(self, y: int, x: int, n: int = ...) -> _chtype: ... def is_linetouched(self, line: int) -> bool: ... def is_wintouched(self) -> bool: ... def keypad(self, yes: bool) -> None: ... def leaveok(self, yes: bool) -> None: ... def move(self, new_y: int, new_x: int) -> None: ... def mvderwin(self, y: int, x: int) -> None: ... def mvwin(self, new_y: int, new_x: int) -> None: ... def nodelay(self, yes: bool) -> None: ... def notimeout(self, yes: bool) -> None: ... def noutrefresh(self) -> None: ... @overload def overlay(self, destwin: _CursesWindow) -> None: ... @overload def overlay(self, destwin: _CursesWindow, sminrow: int, smincol: int, dminrow: int, dmincol: int, dmaxrow: int, dmaxcol: int) -> None: ... @overload def overwrite(self, destwin: _CursesWindow) -> None: ... @overload def overwrite(self, destwin: _CursesWindow, sminrow: int, smincol: int, dminrow: int, dmincol: int, dmaxrow: int, dmaxcol: int) -> None: ... def putwin(self, file: IO[Any]) -> None: ... def redrawln(self, beg: int, num: int) -> None: ... def redrawwin(self) -> None: ... @overload def refresh(self) -> None: ... @overload def refresh(self, pminrow: int, pmincol: int, sminrow: int, smincol: int, smaxrow: int, smaxcol: int) -> None: ... def resize(self, nlines: int, ncols: int) -> None: ... def scroll(self, lines: int = ...) -> None: ... def scrollok(self, flag: bool) -> None: ... def setscrreg(self, top: int, bottom: int) -> None: ... def standend(self) -> None: ... def standout(self) -> None: ... @overload def subpad(self, begin_y: int, begin_x: int) -> _CursesWindow: ... @overload def subpad(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> _CursesWindow: ... @overload def subwin(self, begin_y: int, begin_x: int) -> _CursesWindow: ... @overload def subwin(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> _CursesWindow: ... def syncdown(self) -> None: ... def syncok(self, flag: bool) -> None: ... def syncup(self) -> None: ... def timeout(self, delay: int) -> None: ... def touchline(self, start: int, count: int, changed: bool = ...) -> None: ... def touchwin(self) -> None: ... def untouchwin(self) -> None: ... @overload def vline(self, ch: _chtype, n: int) -> None: ... @overload def vline(self, y: int, x: int, ch: _chtype, n: int) -> None: ... if sys.version_info >= (3, 8): class _ncurses_version(NamedTuple): major: int minor: int patch: int ncurses_version: _ncurses_version jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/math.pyi0000664000175000017500000000631013577124116023340 0ustar davedave00000000000000# Stubs for math # See: http://docs.python.org/2/library/math.html from typing import Tuple, Iterable, SupportsFloat, SupportsInt, overload import sys e: float pi: float if sys.version_info >= (3, 5): inf: float nan: float if sys.version_info >= (3, 6): tau: float def acos(x: SupportsFloat) -> float: ... def acosh(x: SupportsFloat) -> float: ... def asin(x: SupportsFloat) -> float: ... def asinh(x: SupportsFloat) -> float: ... def atan(x: SupportsFloat) -> float: ... def atan2(y: SupportsFloat, x: SupportsFloat) -> float: ... def atanh(x: SupportsFloat) -> float: ... if sys.version_info >= (3,): def ceil(x: SupportsFloat) -> int: ... else: def ceil(x: SupportsFloat) -> float: ... def copysign(x: SupportsFloat, y: SupportsFloat) -> float: ... def cos(x: SupportsFloat) -> float: ... def cosh(x: SupportsFloat) -> float: ... def degrees(x: SupportsFloat) -> float: ... if sys.version_info >= (3, 8): def dist(__p: Iterable[SupportsFloat], __q: Iterable[SupportsFloat]) -> float: ... def erf(x: SupportsFloat) -> float: ... def erfc(x: SupportsFloat) -> float: ... def exp(x: SupportsFloat) -> float: ... def expm1(x: SupportsFloat) -> float: ... def fabs(x: SupportsFloat) -> float: ... def factorial(x: SupportsInt) -> int: ... if sys.version_info >= (3,): def floor(x: SupportsFloat) -> int: ... else: def floor(x: SupportsFloat) -> float: ... def fmod(x: SupportsFloat, y: SupportsFloat) -> float: ... def frexp(x: SupportsFloat) -> Tuple[float, int]: ... def fsum(iterable: Iterable[float]) -> float: ... def gamma(x: SupportsFloat) -> float: ... if sys.version_info >= (3, 5): def gcd(a: int, b: int) -> int: ... if sys.version_info >= (3, 8): def hypot(*coordinates: SupportsFloat) -> float: ... else: def hypot(__x: SupportsFloat, __y: SupportsFloat) -> float: ... if sys.version_info >= (3, 5): def isclose(a: SupportsFloat, b: SupportsFloat, rel_tol: SupportsFloat = ..., abs_tol: SupportsFloat = ...) -> bool: ... def isinf(x: SupportsFloat) -> bool: ... if sys.version_info >= (3,): def isfinite(x: SupportsFloat) -> bool: ... def isnan(x: SupportsFloat) -> bool: ... if sys.version_info >= (3, 8): def isqrt(__n: int) -> int: ... def ldexp(x: SupportsFloat, i: int) -> float: ... def lgamma(x: SupportsFloat) -> float: ... def log(x: SupportsFloat, base: SupportsFloat = ...) -> float: ... def log10(x: SupportsFloat) -> float: ... def log1p(x: SupportsFloat) -> float: ... if sys.version_info >= (3, 3): def log2(x: SupportsFloat) -> float: ... def modf(x: SupportsFloat) -> Tuple[float, float]: ... def pow(x: SupportsFloat, y: SupportsFloat) -> float: ... if sys.version_info >= (3, 8): @overload def prod(__iterable: Iterable[int], *, start: int = ...) -> int: ... # type: ignore @overload def prod(__iterable: Iterable[SupportsFloat], *, start: SupportsFloat = ...) -> float: ... def radians(x: SupportsFloat) -> float: ... if sys.version_info >= (3, 7): def remainder(x: SupportsFloat, y: SupportsFloat) -> float: ... def sin(x: SupportsFloat) -> float: ... def sinh(x: SupportsFloat) -> float: ... def sqrt(x: SupportsFloat) -> float: ... def tan(x: SupportsFloat) -> float: ... def tanh(x: SupportsFloat) -> float: ... def trunc(x: SupportsFloat) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/zlib.pyi0000664000175000017500000000316613577124116023355 0ustar davedave00000000000000# Stubs for zlib import sys DEFLATED: int DEF_MEM_LEVEL: int MAX_WBITS: int ZLIB_VERSION: str Z_BEST_COMPRESSION: int Z_BEST_SPEED: int Z_DEFAULT_COMPRESSION: int Z_DEFAULT_STRATEGY: int Z_FILTERED: int Z_FINISH: int Z_FULL_FLUSH: int Z_HUFFMAN_ONLY: int Z_NO_FLUSH: int Z_SYNC_FLUSH: int if sys.version_info >= (3,): DEF_BUF_SIZE: int ZLIB_RUNTIME_VERSION: str class error(Exception): ... class _Compress: def compress(self, data: bytes) -> bytes: ... def flush(self, mode: int = ...) -> bytes: ... def copy(self) -> _Compress: ... class _Decompress: unused_data: bytes unconsumed_tail: bytes if sys.version_info >= (3,): eof: bool def decompress(self, data: bytes, max_length: int = ...) -> bytes: ... def flush(self, length: int = ...) -> bytes: ... def copy(self) -> _Decompress: ... def adler32(data: bytes, value: int = ...) -> int: ... def compress(data: bytes, level: int = ...) -> bytes: ... if sys.version_info >= (3,): def compressobj(level: int = ..., method: int = ..., wbits: int = ..., memLevel: int = ..., strategy: int = ..., zdict: bytes = ...) -> _Compress: ... else: def compressobj(level: int = ..., method: int = ..., wbits: int = ..., memlevel: int = ..., strategy: int = ...) -> _Compress: ... def crc32(data: bytes, value: int = ...) -> int: ... def decompress(data: bytes, wbits: int = ..., bufsize: int = ...) -> bytes: ... if sys.version_info >= (3,): def decompressobj(wbits: int = ..., zdict: bytes = ...) -> _Decompress: ... else: def decompressobj(wbits: int = ...) -> _Decompress: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sqlite3/0000775000175000017500000000000013577125145023253 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sqlite3/__init__.pyi0000664000175000017500000000005313577124116025530 0ustar davedave00000000000000from sqlite3.dbapi2 import * # noqa: F403 jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sqlite3/dbapi2.pyi0000664000175000017500000002501013577124116025132 0ustar davedave00000000000000# Filip Hron # based heavily on Andrey Vlasovskikh's python-skeletons https://github.com/JetBrains/python-skeletons/blob/master/sqlite3.py import os import sys from typing import Any, Callable, Iterable, Iterator, List, Optional, Text, Tuple, Type, TypeVar, Union from datetime import date, time, datetime _T = TypeVar('_T') paramstyle: str threadsafety: int apilevel: str Date = date Time = time Timestamp = datetime def DateFromTicks(ticks): ... def TimeFromTicks(ticks): ... def TimestampFromTicks(ticks): ... version_info: str sqlite_version_info: Tuple[int, int, int] if sys.version_info >= (3,): Binary = memoryview else: Binary = buffer def register_adapters_and_converters(): ... # The remaining definitions are imported from _sqlite3. PARSE_COLNAMES: int PARSE_DECLTYPES: int SQLITE_ALTER_TABLE: int SQLITE_ANALYZE: int SQLITE_ATTACH: int SQLITE_CREATE_INDEX: int SQLITE_CREATE_TABLE: int SQLITE_CREATE_TEMP_INDEX: int SQLITE_CREATE_TEMP_TABLE: int SQLITE_CREATE_TEMP_TRIGGER: int SQLITE_CREATE_TEMP_VIEW: int SQLITE_CREATE_TRIGGER: int SQLITE_CREATE_VIEW: int SQLITE_DELETE: int SQLITE_DENY: int SQLITE_DETACH: int SQLITE_DROP_INDEX: int SQLITE_DROP_TABLE: int SQLITE_DROP_TEMP_INDEX: int SQLITE_DROP_TEMP_TABLE: int SQLITE_DROP_TEMP_TRIGGER: int SQLITE_DROP_TEMP_VIEW: int SQLITE_DROP_TRIGGER: int SQLITE_DROP_VIEW: int SQLITE_IGNORE: int SQLITE_INSERT: int SQLITE_OK: int SQLITE_PRAGMA: int SQLITE_READ: int SQLITE_REINDEX: int SQLITE_SELECT: int SQLITE_TRANSACTION: int SQLITE_UPDATE: int adapters: Any converters: Any sqlite_version: str version: str # TODO: adapt needs to get probed def adapt(obj, protocol, alternate): ... def complete_statement(sql: str) -> bool: ... if sys.version_info >= (3, 7): def connect(database: Union[bytes, Text, os.PathLike[Text]], timeout: float = ..., detect_types: int = ..., isolation_level: Optional[str] = ..., check_same_thread: bool = ..., factory: Optional[Type[Connection]] = ..., cached_statements: int = ..., uri: bool = ...) -> Connection: ... elif sys.version_info >= (3, 4): def connect(database: Union[bytes, Text], timeout: float = ..., detect_types: int = ..., isolation_level: Optional[str] = ..., check_same_thread: bool = ..., factory: Optional[Type[Connection]] = ..., cached_statements: int = ..., uri: bool = ...) -> Connection: ... else: def connect(database: Union[bytes, Text], timeout: float = ..., detect_types: int = ..., isolation_level: Optional[str] = ..., check_same_thread: bool = ..., factory: Optional[Type[Connection]] = ..., cached_statements: int = ...) -> Connection: ... def enable_callback_tracebacks(flag: bool) -> None: ... def enable_shared_cache(do_enable: int) -> None: ... def register_adapter(type: Type[_T], callable: Callable[[_T], Union[int, float, str, bytes]]) -> None: ... def register_converter(typename: str, callable: Callable[[bytes], Any]) -> None: ... if sys.version_info < (3, 8): class Cache(object): def __init__(self, *args, **kwargs) -> None: ... def display(self, *args, **kwargs) -> None: ... def get(self, *args, **kwargs) -> None: ... class Connection(object): DataError: Any DatabaseError: Any Error: Any IntegrityError: Any InterfaceError: Any InternalError: Any NotSupportedError: Any OperationalError: Any ProgrammingError: Any Warning: Any in_transaction: Any isolation_level: Any row_factory: Any text_factory: Any total_changes: Any def __init__(self, *args, **kwargs): ... def close(self) -> None: ... def commit(self) -> None: ... def create_aggregate(self, name: str, num_params: int, aggregate_class: type) -> None: ... def create_collation(self, name: str, callable: Any) -> None: ... def create_function(self, name: str, num_params: int, func: Any) -> None: ... def cursor(self, cursorClass: Optional[type] = ...) -> Cursor: ... def execute(self, sql: str, parameters: Iterable[Any] = ...) -> Cursor: ... # TODO: please check in executemany() if seq_of_parameters type is possible like this def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable[Any]]) -> Cursor: ... def executescript(self, sql_script: Union[bytes, Text]) -> Cursor: ... def interrupt(self, *args, **kwargs) -> None: ... def iterdump(self, *args, **kwargs) -> None: ... def rollback(self, *args, **kwargs) -> None: ... # TODO: set_authorizer(authorzer_callback) # see https://docs.python.org/2/library/sqlite3.html#sqlite3.Connection.set_authorizer # returns [SQLITE_OK, SQLITE_DENY, SQLITE_IGNORE] so perhaps int def set_authorizer(self, *args, **kwargs) -> None: ... # set_progress_handler(handler, n) -> see https://docs.python.org/2/library/sqlite3.html#sqlite3.Connection.set_progress_handler def set_progress_handler(self, *args, **kwargs) -> None: ... def set_trace_callback(self, *args, **kwargs): ... # enable_load_extension and load_extension is not available on python distributions compiled # without sqlite3 loadable extension support. see footnotes https://docs.python.org/3/library/sqlite3.html#f1 def enable_load_extension(self, enabled: bool) -> None: ... def load_extension(self, path: str) -> None: ... if sys.version_info >= (3, 7): def backup(self, target: Connection, *, pages: int = ..., progress: Optional[Callable[[int, int, int], object]] = ..., name: str = ..., sleep: float = ...) -> None: ... def __call__(self, *args, **kwargs): ... def __enter__(self, *args, **kwargs) -> Connection: ... def __exit__(self, *args, **kwargs): ... class Cursor(Iterator[Any]): arraysize: Any connection: Any description: Any lastrowid: Any row_factory: Any rowcount: Any # TODO: Cursor class accepts exactly 1 argument # required type is sqlite3.Connection (which is imported as _Connection) # however, the name of the __init__ variable is unknown def __init__(self, *args, **kwargs) -> None: ... def close(self, *args, **kwargs) -> None: ... def execute(self, sql: str, parameters: Iterable[Any] = ...) -> Cursor: ... def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable[Any]]) -> Cursor: ... def executescript(self, sql_script: Union[bytes, Text]) -> Cursor: ... def fetchall(self) -> List[Any]: ... def fetchmany(self, size: Optional[int] = ...) -> List[Any]: ... def fetchone(self) -> Any: ... def setinputsizes(self, *args, **kwargs) -> None: ... def setoutputsize(self, *args, **kwargs) -> None: ... def __iter__(self) -> Cursor: ... if sys.version_info >= (3, 0): def __next__(self) -> Any: ... else: def next(self) -> Any: ... class DataError(DatabaseError): ... class DatabaseError(Error): ... class Error(Exception): ... class IntegrityError(DatabaseError): ... class InterfaceError(Error): ... class InternalError(DatabaseError): ... class NotSupportedError(DatabaseError): ... class OperationalError(DatabaseError): ... class OptimizedUnicode(object): maketrans: Any def __init__(self, *args, **kwargs): ... def capitalize(self, *args, **kwargs): ... def casefold(self, *args, **kwargs): ... def center(self, *args, **kwargs): ... def count(self, *args, **kwargs): ... def encode(self, *args, **kwargs): ... def endswith(self, *args, **kwargs): ... def expandtabs(self, *args, **kwargs): ... def find(self, *args, **kwargs): ... def format(self, *args, **kwargs): ... def format_map(self, *args, **kwargs): ... def index(self, *args, **kwargs): ... def isalnum(self, *args, **kwargs): ... def isalpha(self, *args, **kwargs): ... def isdecimal(self, *args, **kwargs): ... def isdigit(self, *args, **kwargs): ... def isidentifier(self, *args, **kwargs): ... def islower(self, *args, **kwargs): ... def isnumeric(self, *args, **kwargs): ... def isprintable(self, *args, **kwargs): ... def isspace(self, *args, **kwargs): ... def istitle(self, *args, **kwargs): ... def isupper(self, *args, **kwargs): ... def join(self, *args, **kwargs): ... def ljust(self, *args, **kwargs): ... def lower(self, *args, **kwargs): ... def lstrip(self, *args, **kwargs): ... def partition(self, *args, **kwargs): ... def replace(self, *args, **kwargs): ... def rfind(self, *args, **kwargs): ... def rindex(self, *args, **kwargs): ... def rjust(self, *args, **kwargs): ... def rpartition(self, *args, **kwargs): ... def rsplit(self, *args, **kwargs): ... def rstrip(self, *args, **kwargs): ... def split(self, *args, **kwargs): ... def splitlines(self, *args, **kwargs): ... def startswith(self, *args, **kwargs): ... def strip(self, *args, **kwargs): ... def swapcase(self, *args, **kwargs): ... def title(self, *args, **kwargs): ... def translate(self, *args, **kwargs): ... def upper(self, *args, **kwargs): ... def zfill(self, *args, **kwargs): ... def __add__(self, other): ... def __contains__(self, *args, **kwargs): ... def __eq__(self, other): ... def __format__(self, *args, **kwargs): ... def __ge__(self, other): ... def __getitem__(self, index): ... def __getnewargs__(self, *args, **kwargs): ... def __gt__(self, other): ... def __hash__(self): ... def __iter__(self): ... def __le__(self, other): ... def __len__(self, *args, **kwargs): ... def __lt__(self, other): ... def __mod__(self, other): ... def __mul__(self, other): ... def __ne__(self, other): ... def __rmod__(self, other): ... def __rmul__(self, other): ... class PrepareProtocol(object): def __init__(self, *args, **kwargs): ... class ProgrammingError(DatabaseError): ... class Row(object): def __init__(self, *args, **kwargs): ... def keys(self, *args, **kwargs): ... def __eq__(self, other): ... def __ge__(self, other): ... def __getitem__(self, index): ... def __gt__(self, other): ... def __hash__(self): ... def __iter__(self): ... def __le__(self, other): ... def __len__(self, *args, **kwargs): ... def __lt__(self, other): ... def __ne__(self, other): ... if sys.version_info < (3, 8): class Statement(object): def __init__(self, *args, **kwargs): ... class Warning(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ntpath.pyi0000664000175000017500000001412413577124116023707 0ustar davedave00000000000000# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! # Stubs for os.path # Ron Murawski import os import sys from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional _T = TypeVar('_T') if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] _StrPath = Union[Text, _PathLike[Text]] _BytesPath = Union[bytes, _PathLike[bytes]] else: _PathType = Union[bytes, Text] _StrPath = Text _BytesPath = bytes # ----- os.path variables ----- supports_unicode_filenames: bool # aliases (also in os) curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str devnull: str # ----- os.path function stubs ----- if sys.version_info >= (3, 6): # Overloads are necessary to work around python/mypy#3644. @overload def abspath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def basename(path: AnyStr) -> AnyStr: ... @overload def dirname(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(path: AnyStr) -> AnyStr: ... @overload def expanduser(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expanduser(path: AnyStr) -> AnyStr: ... @overload def expandvars(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normcase(path: AnyStr) -> AnyStr: ... @overload def normpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': @overload def realpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(path: AnyStr) -> AnyStr: ... else: @overload def realpath(filename: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(filename: AnyStr) -> AnyStr: ... else: def abspath(path: AnyStr) -> AnyStr: ... def basename(path: AnyStr) -> AnyStr: ... def dirname(path: AnyStr) -> AnyStr: ... def expanduser(path: AnyStr) -> AnyStr: ... def expandvars(path: AnyStr) -> AnyStr: ... def normcase(path: AnyStr) -> AnyStr: ... def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': def realpath(path: AnyStr) -> AnyStr: ... else: def realpath(filename: AnyStr) -> AnyStr: ... if sys.version_info >= (3, 6): # In reality it returns str for sequences of _StrPath and bytes for sequences # of _BytesPath, but mypy does not accept such a signature. def commonpath(paths: Sequence[_PathType]) -> Any: ... elif sys.version_info >= (3, 5): def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ... # NOTE: Empty lists results in '' (str) regardless of contained type. # Also, in Python 2 mixed sequences of Text and bytes results in either Text or bytes # So, fall back to Any def commonprefix(list: Sequence[_PathType]) -> Any: ... if sys.version_info >= (3, 3): def exists(path: Union[_PathType, int]) -> bool: ... else: def exists(path: _PathType) -> bool: ... def lexists(path: _PathType) -> bool: ... # These return float if os.stat_float_times() == True, # but int is a subclass of float. def getatime(path: _PathType) -> float: ... def getmtime(path: _PathType) -> float: ... def getctime(path: _PathType) -> float: ... def getsize(path: _PathType) -> int: ... def isabs(path: _PathType) -> bool: ... def isfile(path: _PathType) -> bool: ... def isdir(path: _PathType) -> bool: ... def islink(path: _PathType) -> bool: ... def ismount(path: _PathType) -> bool: ... if sys.version_info < (3, 0): # Make sure signatures are disjunct, and allow combinations of bytes and unicode. # (Since Python 2 allows that, too) # Note that e.g. os.path.join("a", "b", "c", "d", u"e") will still result in # a type error. @overload def join(__p1: bytes, *p: bytes) -> bytes: ... @overload def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ... @overload def join(__p1: Text, *p: _PathType) -> Text: ... elif sys.version_info >= (3, 6): # Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway. @overload def join(path: _StrPath, *paths: _StrPath) -> Text: ... @overload def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ... else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... def samefile(path1: _PathType, path2: _PathType) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ... if sys.version_info >= (3, 6): @overload def split(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... else: def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... if sys.platform == 'win32': def splitunc(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # deprecated if sys.version_info < (3,): def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/weakref.pyi0000664000175000017500000001030013577124116024025 0ustar davedave00000000000000import sys import types from typing import ( TypeVar, Generic, Any, Callable, overload, Mapping, Iterator, Tuple, Iterable, Optional, Type, MutableMapping, Union, List, Dict ) from _weakref import ( getweakrefcount as getweakrefcount, getweakrefs as getweakrefs, ref as ref, proxy as proxy, CallableProxyType as CallableProxyType, ProxyType as ProxyType, ReferenceType as ReferenceType) from _weakrefset import WeakSet as WeakSet if sys.version_info < (3, 0): from exceptions import ReferenceError as ReferenceError _S = TypeVar('_S') _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') ProxyTypes: Tuple[Type[Any], ...] if sys.version_info >= (3, 4): class WeakMethod(ref[types.MethodType]): def __new__(cls, meth: types.MethodType, callback: Optional[Callable[[types.MethodType], Any]] = ...) -> WeakMethod: ... def __call__(self) -> Optional[types.MethodType]: ... class WeakValueDictionary(MutableMapping[_KT, _VT]): @overload def __init__(self) -> None: ... @overload def __init__(self, __map: Union[Mapping[_KT, _VT], Iterable[Tuple[_KT, _VT]]], **kwargs: _VT) -> None: ... def __len__(self) -> int: ... def __getitem__(self, k: _KT) -> _VT: ... def __setitem__(self, k: _KT, v: _VT) -> None: ... def __delitem__(self, v: _KT) -> None: ... if sys.version_info < (3, 0): def has_key(self, key: object) -> bool: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_KT]: ... def __str__(self) -> str: ... def copy(self) -> WeakValueDictionary[_KT, _VT]: ... if sys.version_info < (3, 0): def keys(self) -> List[_KT]: ... def values(self) -> List[_VT]: ... def items(self) -> List[Tuple[_KT, _VT]]: ... def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT]: ... def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... else: # These are incompatible with Mapping def keys(self) -> Iterator[_KT]: ... # type: ignore def values(self) -> Iterator[_VT]: ... # type: ignore def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore def itervaluerefs(self) -> Iterator[KeyedRef[_KT, _VT]]: ... def valuerefs(self) -> List[KeyedRef[_KT, _VT]]: ... class KeyedRef(ref[_T], Generic[_KT, _T]): key: _KT def __init__(self, ob: _T, callback: Callable[[_T], Any], key: _KT) -> None: ... class WeakKeyDictionary(MutableMapping[_KT, _VT]): @overload def __init__(self) -> None: ... @overload def __init__(self, __map: Union[Mapping[_KT, _VT], Iterable[Tuple[_KT, _VT]]], **kwargs: _VT) -> None: ... def __len__(self) -> int: ... def __getitem__(self, k: _KT) -> _VT: ... def __setitem__(self, k: _KT, v: _VT) -> None: ... def __delitem__(self, v: _KT) -> None: ... if sys.version_info < (3, 0): def has_key(self, key: object) -> bool: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_KT]: ... def __str__(self) -> str: ... def copy(self) -> WeakKeyDictionary[_KT, _VT]: ... if sys.version_info < (3, 0): def keys(self) -> List[_KT]: ... def values(self) -> List[_VT]: ... def items(self) -> List[Tuple[_KT, _VT]]: ... def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT]: ... def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... def iterkeyrefs(self) -> Iterator[ref[_KT]]: ... else: # These are incompatible with Mapping def keys(self) -> Iterator[_KT]: ... # type: ignore def values(self) -> Iterator[_VT]: ... # type: ignore def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore def keyrefs(self) -> List[ref[_KT]]: ... if sys.version_info >= (3, 4): class finalize: def __init__(self, obj: _S, func: Callable[..., _T], *args: Any, **kwargs: Any) -> None: ... def __call__(self, _: Any = ...) -> Optional[_T]: ... def detach(self) -> Optional[Tuple[_S, _T, Tuple[Any, ...], Dict[str, Any]]]: ... def peek(self) -> Optional[Tuple[_S, _T, Tuple[Any, ...], Dict[str, Any]]]: ... alive: bool atexit: bool jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/uuid.pyi0000664000175000017500000000541613577124116023363 0ustar davedave00000000000000# Stubs for uuid import sys from typing import Tuple, Optional, Any, Text # Because UUID has properties called int and bytes we need to rename these temporarily. _Int = int _Bytes = bytes _FieldsType = Tuple[int, int, int, int, int, int] class UUID: def __init__(self, hex: Optional[Text] = ..., bytes: Optional[_Bytes] = ..., bytes_le: Optional[_Bytes] = ..., fields: Optional[_FieldsType] = ..., int: Optional[_Int] = ..., version: Optional[_Int] = ...) -> None: ... @property def bytes(self) -> _Bytes: ... @property def bytes_le(self) -> _Bytes: ... @property def clock_seq(self) -> _Int: ... @property def clock_seq_hi_variant(self) -> _Int: ... @property def clock_seq_low(self) -> _Int: ... @property def fields(self) -> _FieldsType: ... @property def hex(self) -> str: ... @property def int(self) -> _Int: ... @property def node(self) -> _Int: ... @property def time(self) -> _Int: ... @property def time_hi_version(self) -> _Int: ... @property def time_low(self) -> _Int: ... @property def time_mid(self) -> _Int: ... @property def urn(self) -> str: ... @property def variant(self) -> str: ... @property def version(self) -> Optional[_Int]: ... def __int__(self) -> _Int: ... if sys.version_info >= (3,): def __eq__(self, other: Any) -> bool: ... def __lt__(self, other: Any) -> bool: ... def __le__(self, other: Any) -> bool: ... def __gt__(self, other: Any) -> bool: ... def __ge__(self, other: Any) -> bool: ... else: def get_bytes(self) -> _Bytes: ... def get_bytes_le(self) -> _Bytes: ... def get_clock_seq(self) -> _Int: ... def get_clock_seq_hi_variant(self) -> _Int: ... def get_clock_seq_low(self) -> _Int: ... def get_fields(self) -> _FieldsType: ... def get_hex(self) -> str: ... def get_node(self) -> _Int: ... def get_time(self) -> _Int: ... def get_time_hi_version(self) -> _Int: ... def get_time_low(self) -> _Int: ... def get_time_mid(self) -> _Int: ... def get_urn(self) -> str: ... def get_variant(self) -> str: ... def get_version(self) -> Optional[_Int]: ... def __cmp__(self, other: Any) -> _Int: ... def getnode() -> int: ... def uuid1(node: Optional[_Int] = ..., clock_seq: Optional[_Int] = ...) -> UUID: ... def uuid3(namespace: UUID, name: str) -> UUID: ... def uuid4() -> UUID: ... def uuid5(namespace: UUID, name: str) -> UUID: ... NAMESPACE_DNS: UUID NAMESPACE_URL: UUID NAMESPACE_OID: UUID NAMESPACE_X500: UUID RESERVED_NCS: str RFC_4122: str RESERVED_MICROSOFT: str RESERVED_FUTURE: str jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/netrc.pyi0000664000175000017500000000072213577124116023523 0ustar davedave00000000000000from typing import AnyStr, Dict, List, Optional, Tuple, overload class NetrcParseError(Exception): filename: Optional[str] lineno: Optional[int] msg: str # (login, account, password) tuple _NetrcTuple = Tuple[str, Optional[str], Optional[str]] class netrc: hosts: Dict[str, _NetrcTuple] macros: Dict[str, List[str]] def __init__(self, file: str = ...) -> None: ... def authenticators(self, host: str) -> Optional[_NetrcTuple]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/fileinput.pyi0000664000175000017500000000516013577124116024410 0ustar davedave00000000000000from typing import Iterable, Callable, IO, AnyStr, Generic, Any, Text, Union, Iterator, Optional import os import sys if sys.version_info >= (3, 6): _Path = Union[Text, bytes, os.PathLike[Any]] else: _Path = Union[Text, bytes] if sys.version_info >= (3, 8): def input( files: Union[_Path, Iterable[_Path], None] = ..., inplace: bool = ..., backup: str = ..., *, mode: str = ..., openhook: Callable[[_Path, str], IO[AnyStr]] = ..., ) -> FileInput[AnyStr]: ... else: def input( files: Union[_Path, Iterable[_Path], None] = ..., inplace: bool = ..., backup: str = ..., bufsize: int = ..., mode: str = ..., openhook: Callable[[_Path, str], IO[AnyStr]] = ..., ) -> FileInput[AnyStr]: ... def close() -> None: ... def nextfile() -> None: ... def filename() -> str: ... def lineno() -> int: ... def filelineno() -> int: ... def fileno() -> int: ... def isfirstline() -> bool: ... def isstdin() -> bool: ... class FileInput(Iterable[AnyStr], Generic[AnyStr]): if sys.version_info >= (3, 8): def __init__( self, files: Union[None, _Path, Iterable[_Path]] = ..., inplace: bool = ..., backup: str = ..., *, mode: str = ..., openhook: Callable[[_Path, str], IO[AnyStr]] = ... ) -> None: ... else: def __init__( self, files: Union[None, _Path, Iterable[_Path]] = ..., inplace: bool = ..., backup: str = ..., bufsize: int = ..., mode: str = ..., openhook: Callable[[_Path, str], IO[AnyStr]] = ... ) -> None: ... def __del__(self) -> None: ... def close(self) -> None: ... if sys.version_info >= (3, 2): def __enter__(self) -> FileInput[AnyStr]: ... def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ... def __iter__(self) -> Iterator[AnyStr]: ... def __next__(self) -> AnyStr: ... def __getitem__(self, i: int) -> AnyStr: ... def nextfile(self) -> None: ... def readline(self) -> AnyStr: ... def filename(self) -> str: ... def lineno(self) -> int: ... def filelineno(self) -> int: ... def fileno(self) -> int: ... def isfirstline(self) -> bool: ... def isstdin(self) -> bool: ... def hook_compressed(filename: _Path, mode: str) -> IO[Any]: ... if sys.version_info >= (3, 6): def hook_encoded(encoding: str, errors: Optional[str] = ...) -> Callable[[_Path, str], IO[Any]]: ... else: def hook_encoded(encoding: str) -> Callable[[_Path, str], IO[Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/calendar.pyi0000664000175000017500000001321413577124116024161 0ustar davedave00000000000000import datetime import sys from time import struct_time from typing import Any, Iterable, List, Optional, Sequence, Tuple, Union _LocaleType = Tuple[Optional[str], Optional[str]] class IllegalMonthError(ValueError): def __init__(self, month: int) -> None: ... def __str__(self) -> str: ... class IllegalWeekdayError(ValueError): def __init__(self, weekday: int) -> None: ... def __str__(self) -> str: ... def isleap(year: int) -> bool: ... def leapdays(y1: int, y2: int) -> int: ... def weekday(year: int, month: int, day: int) -> int: ... def monthrange(year: int, month: int) -> Tuple[int, int]: ... class Calendar: def __init__(self, firstweekday: int = ...) -> None: ... def getfirstweekday(self) -> int: ... def setfirstweekday(self, firstweekday: int) -> None: ... def iterweekdays(self) -> Iterable[int]: ... def itermonthdates(self, year: int, month: int) -> Iterable[datetime.date]: ... def itermonthdays2(self, year: int, month: int) -> Iterable[Tuple[int, int]]: ... def itermonthdays(self, year: int, month: int) -> Iterable[int]: ... def monthdatescalendar(self, year: int, month: int) -> List[List[datetime.date]]: ... def monthdays2calendar(self, year: int, month: int) -> List[List[Tuple[int, int]]]: ... def monthdayscalendar(self, year: int, month: int) -> List[List[int]]: ... def yeardatescalendar(self, year: int, width: int = ...) -> List[List[int]]: ... def yeardays2calendar(self, year: int, width: int = ...) -> List[List[Tuple[int, int]]]: ... def yeardayscalendar(self, year: int, width: int = ...) -> List[List[int]]: ... if sys.version_info >= (3, 7): def itermonthdays3(self, year: int, month: int) -> Iterable[Tuple[int, int, int]]: ... def itermonthdays4(self, year: int, month: int) -> Iterable[Tuple[int, int, int, int]]: ... class TextCalendar(Calendar): def prweek(self, theweek: int, width: int) -> None: ... def formatday(self, day: int, weekday: int, width: int) -> str: ... def formatweek(self, theweek: int, width: int) -> str: ... def formatweekday(self, day: int, width: int) -> str: ... def formatweekheader(self, width: int) -> str: ... def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = ...) -> str: ... def prmonth(self, theyear: int, themonth: int, w: int = ..., l: int = ...) -> None: ... def formatmonth(self, theyear: int, themonth: int, w: int = ..., l: int = ...) -> str: ... def formatyear(self, theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> str: ... def pryear(self, theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> None: ... def firstweekday() -> int: ... def monthcalendar(year: int, month: int) -> List[List[int]]: ... def prweek(theweek: int, width: int) -> None: ... def week(theweek: int, width: int) -> str: ... def weekheader(width: int) -> str: ... def prmonth(theyear: int, themonth: int, w: int = ..., l: int = ...) -> None: ... def month(theyear: int, themonth: int, w: int = ..., l: int = ...) -> str: ... def calendar(theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> str: ... def prcal(theyear: int, w: int = ..., l: int = ..., c: int = ..., m: int = ...) -> None: ... class HTMLCalendar(Calendar): def formatday(self, day: int, weekday: int) -> str: ... def formatweek(self, theweek: int) -> str: ... def formatweekday(self, day: int) -> str: ... def formatweekheader(self) -> str: ... def formatmonthname(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ... def formatmonth(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ... def formatyear(self, theyear: int, width: int = ...) -> str: ... def formatyearpage(self, theyear: int, width: int = ..., css: Optional[str] = ..., encoding: Optional[str] = ...) -> str: ... if sys.version_info >= (3, 7): cssclasses: List[str] cssclass_noday: str cssclasses_weekday_head: List[str] cssclass_month_head: str cssclass_month: str cssclass_year: str cssclass_year_head: str if sys.version_info < (3, 0): class TimeEncoding: def __init__(self, locale: _LocaleType) -> None: ... def __enter__(self) -> _LocaleType: ... def __exit__(self, *args: Any) -> None: ... else: class different_locale: def __init__(self, locale: _LocaleType) -> None: ... def __enter__(self) -> _LocaleType: ... def __exit__(self, *args: Any) -> None: ... class LocaleTextCalendar(TextCalendar): def __init__(self, firstweekday: int = ..., locale: Optional[_LocaleType] = ...) -> None: ... def formatweekday(self, day: int, width: int) -> str: ... def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = ...) -> str: ... class LocaleHTMLCalendar(HTMLCalendar): def __init__(self, firstweekday: int = ..., locale: Optional[_LocaleType] = ...) -> None: ... def formatweekday(self, day: int) -> str: ... def formatmonthname(self, theyear: int, themonth: int, withyear: bool = ...) -> str: ... c: TextCalendar def setfirstweekday(firstweekday: int) -> None: ... def format(cols: int, colwidth: int = ..., spacing: int = ...) -> str: ... def formatstring(cols: int, colwidth: int = ..., spacing: int = ...) -> str: ... def timegm(tuple: Union[Tuple[int, ...], struct_time]) -> int: ... # Data attributes day_name: Sequence[str] day_abbr: Sequence[str] month_name: Sequence[str] month_abbr: Sequence[str] # Below constants are not in docs or __all__, but enough people have used them # they are now effectively public. MONDAY: int TUESDAY: int WEDNESDAY: int THURSDAY: int FRIDAY: int SATURDAY: int SUNDAY: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pwd.pyi0000664000175000017500000000053613577124116023205 0ustar davedave00000000000000from typing import List, Tuple class struct_passwd(Tuple[str, str, int, int, str, str, str]): pw_name: str pw_passwd: str pw_uid: int pw_gid: int pw_gecos: str pw_dir: str pw_shell: str def getpwall() -> List[struct_passwd]: ... def getpwuid(uid: int) -> struct_passwd: ... def getpwnam(name: str) -> struct_passwd: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ssl.pyi0000664000175000017500000002664213577124116023222 0ustar davedave00000000000000# Stubs for ssl from typing import ( Any, Callable, ClassVar, Dict, List, NamedTuple, Optional, Set, Text, Type, Tuple, Union, ) import enum import socket import sys import os _PCTRTT = Tuple[Tuple[str, str], ...] _PCTRTTT = Tuple[_PCTRTT, ...] _PeerCertRetDictType = Dict[str, Union[str, _PCTRTTT, _PCTRTT]] _PeerCertRetType = Union[_PeerCertRetDictType, bytes, None] _EnumRetType = List[Tuple[bytes, str, Union[Set[str], bool]]] _PasswordType = Union[Callable[[], Union[str, bytes]], str, bytes] if sys.version_info < (3, 6): _Path = Text else: _Path = Union[str, os.PathLike[Any]] if sys.version_info >= (3, 5): _SC1ArgT = Union[SSLSocket, SSLObject] else: _SC1ArgT = SSLSocket _SrvnmeCbType = Callable[[_SC1ArgT, Optional[str], SSLSocket], Optional[int]] class SSLError(OSError): library: str reason: str class SSLZeroReturnError(SSLError): ... class SSLWantReadError(SSLError): ... class SSLWantWriteError(SSLError): ... class SSLSyscallError(SSLError): ... class SSLEOFError(SSLError): ... if sys.version_info >= (3, 7): class SSLCertVerificationError(SSLError, ValueError): verify_code: int verify_message: str CertificateError = SSLCertVerificationError else: class CertificateError(ValueError): ... def wrap_socket(sock: socket.socket, keyfile: Optional[str] = ..., certfile: Optional[str] = ..., server_side: bool = ..., cert_reqs: int = ..., ssl_version: int = ..., ca_certs: Optional[str] = ..., do_handshake_on_connect: bool = ..., suppress_ragged_eofs: bool = ..., ciphers: Optional[str] = ...) -> SSLSocket: ... def create_default_context( purpose: Any = ..., *, cafile: Optional[str] = ..., capath: Optional[str] = ..., cadata: Union[Text, bytes, None] = ..., ) -> SSLContext: ... def _create_unverified_context(protocol: int = ..., *, cert_reqs: int = ..., check_hostname: bool = ..., purpose: Any = ..., certfile: Optional[str] = ..., keyfile: Optional[str] = ..., cafile: Optional[str] = ..., capath: Optional[str] = ..., cadata: Union[Text, bytes, None] = ...) -> SSLContext: ... _create_default_https_context: Callable[..., SSLContext] if sys.version_info >= (3, 3): def RAND_bytes(num: int) -> bytes: ... def RAND_pseudo_bytes(num: int) -> Tuple[bytes, bool]: ... def RAND_status() -> bool: ... def RAND_egd(path: str) -> None: ... def RAND_add(bytes: bytes, entropy: float) -> None: ... def match_hostname(cert: _PeerCertRetType, hostname: str) -> None: ... def cert_time_to_seconds(cert_time: str) -> int: ... def get_server_certificate(addr: Tuple[str, int], ssl_version: int = ..., ca_certs: Optional[str] = ...) -> str: ... def DER_cert_to_PEM_cert(der_cert_bytes: bytes) -> str: ... def PEM_cert_to_DER_cert(pem_cert_string: str) -> bytes: ... class DefaultVerifyPaths(NamedTuple): cafile: str capath: str openssl_cafile_env: str openssl_cafile: str openssl_capath_env: str openssl_capath: str def get_default_verify_paths() -> DefaultVerifyPaths: ... if sys.platform == 'win32': def enum_certificates(store_name: str) -> _EnumRetType: ... def enum_crls(store_name: str) -> _EnumRetType: ... CERT_NONE: int CERT_OPTIONAL: int CERT_REQUIRED: int VERIFY_DEFAULT: int VERIFY_CRL_CHECK_LEAF: int VERIFY_CRL_CHECK_CHAIN: int VERIFY_X509_STRICT: int VERIFY_X509_TRUSTED_FIRST: int PROTOCOL_SSLv23: int PROTOCOL_SSLv2: int PROTOCOL_SSLv3: int PROTOCOL_TLSv1: int PROTOCOL_TLSv1_1: int PROTOCOL_TLSv1_2: int if sys.version_info >= (3, 5): PROTOCOL_TLS: int if sys.version_info >= (3, 6): PROTOCOL_TLS_CLIENT: int PROTOCOL_TLS_SERVER: int OP_ALL: int OP_NO_SSLv2: int OP_NO_SSLv3: int OP_NO_TLSv1: int OP_NO_TLSv1_1: int OP_NO_TLSv1_2: int OP_CIPHER_SERVER_PREFERENCE: int OP_SINGLE_DH_USE: int OP_SINGLE_ECDH_USE: int OP_NO_COMPRESSION: int if sys.version_info >= (3, 6): OP_NO_TICKET: int HAS_ALPN: int HAS_ECDH: bool HAS_SNI: bool HAS_NPN: bool CHANNEL_BINDING_TYPES: List[str] OPENSSL_VERSION: str OPENSSL_VERSION_INFO: Tuple[int, int, int, int, int] OPENSSL_VERSION_NUMBER: int ALERT_DESCRIPTION_HANDSHAKE_FAILURE: int ALERT_DESCRIPTION_INTERNAL_ERROR: int ALERT_DESCRIPTION_ACCESS_DENIED: int ALERT_DESCRIPTION_BAD_CERTIFICATE: int ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE: int ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE: int ALERT_DESCRIPTION_BAD_RECORD_MAC: int ALERT_DESCRIPTION_CERTIFICATE_EXPIRED: int ALERT_DESCRIPTION_CERTIFICATE_REVOKED: int ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN: int ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE: int ALERT_DESCRIPTION_CLOSE_NOTIFY: int ALERT_DESCRIPTION_DECODE_ERROR: int ALERT_DESCRIPTION_DECOMPRESSION_FAILURE: int ALERT_DESCRIPTION_DECRYPT_ERROR: int ALERT_DESCRIPTION_ILLEGAL_PARAMETER: int ALERT_DESCRIPTION_INSUFFICIENT_SECURITY: int ALERT_DESCRIPTION_NO_RENEGOTIATION: int ALERT_DESCRIPTION_PROTOCOL_VERSION: int ALERT_DESCRIPTION_RECORD_OVERFLOW: int ALERT_DESCRIPTION_UNEXPECTED_MESSAGE: int ALERT_DESCRIPTION_UNKNOWN_CA: int ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY: int ALERT_DESCRIPTION_UNRECOGNIZED_NAME: int ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE: int ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION: int ALERT_DESCRIPTION_USER_CANCELLED: int class _ASN1Object(NamedTuple): nid: int shortname: str longname: str oid: str if sys.version_info < (3,): class Purpose(_ASN1Object): SERVER_AUTH: ClassVar[Purpose] CLIENT_AUTH: ClassVar[Purpose] else: class Purpose(_ASN1Object, enum.Enum): SERVER_AUTH: _ASN1Object CLIENT_AUTH: _ASN1Object class SSLSocket(socket.socket): context: SSLContext server_side: bool server_hostname: Optional[str] if sys.version_info >= (3, 6): session: Optional[SSLSession] session_reused: Optional[bool] def read(self, len: int = ..., buffer: Optional[bytearray] = ...) -> bytes: ... def write(self, buf: bytes) -> int: ... def do_handshake(self) -> None: ... def getpeercert(self, binary_form: bool = ...) -> _PeerCertRetType: ... def cipher(self) -> Tuple[str, int, int]: ... if sys.version_info >= (3, 5): def shared_cipher(self) -> Optional[List[Tuple[str, int, int]]]: ... def compression(self) -> Optional[str]: ... def get_channel_binding(self, cb_type: str = ...) -> Optional[bytes]: ... def selected_alpn_protocol(self) -> Optional[str]: ... def selected_npn_protocol(self) -> Optional[str]: ... def unwrap(self) -> socket.socket: ... def version(self) -> Optional[str]: ... def pending(self) -> int: ... if sys.version_info >= (3, 8): def verify_client_post_handshake(self) -> None: ... if sys.version_info >= (3, 7): class TLSVersion(enum.IntEnum): MINIMUM_SUPPORTED: int MAXIMUM_SUPPORTED: int SSLv3: int TLSv1: int TLSv1_1: int TLSv1_2: int TLSv1_3: int class SSLContext: check_hostname: bool options: int if sys.version_info >= (3, 8): post_handshake_auth: bool @property def protocol(self) -> int: ... verify_flags: int verify_mode: int if sys.version_info >= (3, 5): def __init__(self, protocol: int = ...) -> None: ... else: def __init__(self, protocol: int) -> None: ... def cert_store_stats(self) -> Dict[str, int]: ... def load_cert_chain(self, certfile: _Path, keyfile: Optional[_Path] = ..., password: _PasswordType = ...) -> None: ... def load_default_certs(self, purpose: Purpose = ...) -> None: ... def load_verify_locations( self, cafile: Optional[str] = ..., capath: Optional[str] = ..., cadata: Union[Text, bytes, None] = ..., ) -> None: ... def get_ca_certs(self, binary_form: bool = ...) -> Union[List[_PeerCertRetDictType], List[bytes]]: ... def set_default_verify_paths(self) -> None: ... def set_ciphers(self, ciphers: str) -> None: ... def set_alpn_protocols(self, protocols: List[str]) -> None: ... if sys.version_info >= (3, 7): sni_callback: Optional[Callable[[SSLObject, str, SSLContext], Union[None, int]]] sslobject_class: Type[SSLObject] def set_npn_protocols(self, protocols: List[str]) -> None: ... def set_servername_callback(self, server_name_callback: Optional[_SrvnmeCbType]) -> None: ... def load_dh_params(self, dhfile: str) -> None: ... def set_ecdh_curve(self, curve_name: str) -> None: ... def wrap_socket(self, sock: socket.socket, server_side: bool = ..., do_handshake_on_connect: bool = ..., suppress_ragged_eofs: bool = ..., server_hostname: Optional[str] = ...) -> SSLSocket: ... if sys.version_info >= (3, 5): def wrap_bio(self, incoming: MemoryBIO, outgoing: MemoryBIO, server_side: bool = ..., server_hostname: Optional[str] = ...) -> SSLObject: ... def session_stats(self) -> Dict[str, int]: ... if sys.version_info >= (3, 7): maximum_version: TLSVersion minimum_version: TLSVersion if sys.version_info >= (3, 5): class SSLObject: context: SSLContext server_side: bool server_hostname: Optional[str] if sys.version_info >= (3, 6): session: Optional[SSLSession] session_reused: bool def read(self, len: int = ..., buffer: Optional[bytearray] = ...) -> bytes: ... def write(self, buf: bytes) -> int: ... def getpeercert(self, binary_form: bool = ...) -> _PeerCertRetType: ... def selected_npn_protocol(self) -> Optional[str]: ... def cipher(self) -> Tuple[str, int, int]: ... def shared_cipher(self) -> Optional[List[Tuple[str, int, int]]]: ... def compression(self) -> Optional[str]: ... def pending(self) -> int: ... def do_handshake(self) -> None: ... def unwrap(self) -> None: ... def get_channel_binding(self, cb_type: str = ...) -> Optional[bytes]: ... if sys.version_info >= (3, 8): def verify_client_post_handshake(self) -> None: ... class MemoryBIO: pending: int eof: bool def read(self, n: int = ...) -> bytes: ... def write(self, buf: bytes) -> int: ... def write_eof(self) -> None: ... if sys.version_info >= (3, 6): class SSLSession: id: bytes time: int timeout: int ticket_lifetime_hint: int has_ticket: bool class VerifyFlags(enum.IntFlag): VERIFY_DEFAULT: int VERIFY_CRL_CHECK_LEAF: int VERIFY_CRL_CHECK_CHAIN: int VERIFY_X509_STRICT: int VERIFY_X509_TRUSTED_FIRST: int class VerifyMode(enum.IntEnum): CERT_NONE: int CERT_OPTIONAL: int CERT_REQUIRED: int # TODO below documented in cpython but not in docs.python.org # taken from python 3.4 SSL_ERROR_EOF: int SSL_ERROR_INVALID_ERROR_CODE: int SSL_ERROR_SSL: int SSL_ERROR_SYSCALL: int SSL_ERROR_WANT_CONNECT: int SSL_ERROR_WANT_READ: int SSL_ERROR_WANT_WRITE: int SSL_ERROR_WANT_X509_LOOKUP: int SSL_ERROR_ZERO_RETURN: int def get_protocol_name(protocol_code: int) -> str: ... AF_INET: int PEM_FOOTER: str PEM_HEADER: str SOCK_STREAM: int SOL_SOCKET: int SO_TYPE: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/unicodedata.pyi0000664000175000017500000000355413577124116024676 0ustar davedave00000000000000import sys from typing import Any, Text, TypeVar, Union ucd_3_2_0: UCD ucnhash_CAPI: Any unidata_version: str _default = TypeVar('_default') def bidirectional(__chr: Text) -> Text: ... def category(__chr: Text) -> Text: ... def combining(__chr: Text) -> int: ... def decimal(__chr: Text, __default: _default = ...) -> Union[int, _default]: ... def decomposition(__chr: Text) -> Text: ... def digit(__chr: Text, __default: _default = ...) -> Union[int, _default]: ... def east_asian_width(__chr: Text) -> Text: ... if sys.version_info >= (3, 8): def is_normalized(__form: str, __unistr: str) -> bool: ... def lookup(__name: Union[Text, bytes]) -> Text: ... def mirrored(__chr: Text) -> int: ... def name(__chr: Text, __default: _default = ...) -> Union[Text, _default]: ... def normalize(__form: Text, __unistr: Text) -> Text: ... def numeric(__chr: Text, __default: _default = ...) -> Union[float, _default]: ... class UCD(object): # The methods below are constructed from the same array in C # (unicodedata_functions) and hence identical to the methods above. unidata_version: str def bidirectional(self, __chr: Text) -> str: ... def category(self, __chr: Text) -> str: ... def combining(self, __chr: Text) -> int: ... def decimal(self, __chr: Text, __default: _default = ...) -> Union[int, _default]: ... def decomposition(self, __chr: Text) -> str: ... def digit(self, __chr: Text, __default: _default = ...) -> Union[int, _default]: ... def east_asian_width(self, __chr: Text) -> str: ... def lookup(self, __name: Union[Text, bytes]) -> Text: ... def mirrored(self, __chr: Text) -> int: ... def name(self, __chr: Text, __default: _default = ...) -> Union[Text, _default]: ... def normalize(self, __form: Text, __unistr: Text) -> Text: ... def numeric(self, __chr: Text, __default: _default = ...) -> Union[float, _default]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/chunk.pyi0000664000175000017500000000136313577124116023522 0ustar davedave00000000000000# Source(py2): https://hg.python.org/cpython/file/2.7/Lib/chunk.py # Source(py3): https://github.com/python/cpython/blob/master/Lib/chunk.py from typing import IO class Chunk: closed: bool align: bool file: IO[bytes] chunkname: bytes chunksize: int size_read: int offset: int seekable: bool def __init__(self, file: IO[bytes], align: bool = ..., bigendian: bool = ..., inclheader: bool = ...) -> None: ... def getname(self) -> bytes: ... def getsize(self) -> int: ... def close(self) -> None: ... def isatty(self) -> bool: ... def seek(self, pos: int, whence: int = ...) -> None: ... def tell(self) -> int: ... def read(self, size: int = ...) -> bytes: ... def skip(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/threading.pyi0000664000175000017500000001525513577124116024364 0ustar davedave00000000000000# Stubs for threading from typing import ( Any, Callable, Iterable, List, Mapping, Optional, Tuple, Type, Union, TypeVar, ) from types import FrameType, TracebackType import sys # TODO recursive type _TF = Callable[[FrameType, str, Any], Optional[Callable[..., Any]]] _PF = Callable[[FrameType, str, Any], None] _T = TypeVar('_T') def active_count() -> int: ... if sys.version_info < (3,): def activeCount() -> int: ... def current_thread() -> Thread: ... def currentThread() -> Thread: ... if sys.version_info >= (3,): def get_ident() -> int: ... def enumerate() -> List[Thread]: ... if sys.version_info >= (3, 4): def main_thread() -> Thread: ... if sys.version_info >= (3, 8): from _thread import get_native_id as get_native_id def settrace(func: _TF) -> None: ... def setprofile(func: Optional[_PF]) -> None: ... def stack_size(size: int = ...) -> int: ... if sys.version_info >= (3,): TIMEOUT_MAX: float class ThreadError(Exception): ... class local(object): def __getattribute__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __delattr__(self, name: str) -> None: ... class Thread: name: str ident: Optional[int] daemon: bool if sys.version_info >= (3,): def __init__(self, group: None = ..., target: Optional[Callable[..., Any]] = ..., name: Optional[str] = ..., args: Iterable[Any] = ..., kwargs: Mapping[str, Any] = ..., *, daemon: Optional[bool] = ...) -> None: ... else: def __init__(self, group: None = ..., target: Optional[Callable[..., Any]] = ..., name: Optional[str] = ..., args: Iterable[Any] = ..., kwargs: Mapping[str, Any] = ...) -> None: ... def start(self) -> None: ... def run(self) -> None: ... def join(self, timeout: Optional[float] = ...) -> None: ... def getName(self) -> str: ... def setName(self, name: str) -> None: ... if sys.version_info >= (3, 8): @property def native_id(self) -> Optional[int]: ... # only available on some platforms def is_alive(self) -> bool: ... def isAlive(self) -> bool: ... def isDaemon(self) -> bool: ... def setDaemon(self, daemonic: bool) -> None: ... class _DummyThread(Thread): ... class Lock: def __init__(self) -> None: ... def __enter__(self) -> bool: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... if sys.version_info >= (3,): def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... else: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... def locked(self) -> bool: ... class _RLock: def __init__(self) -> None: ... def __enter__(self) -> bool: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... if sys.version_info >= (3,): def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... else: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... RLock = _RLock class Condition: def __init__(self, lock: Union[Lock, _RLock, None] = ...) -> None: ... def __enter__(self) -> bool: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... if sys.version_info >= (3,): def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... else: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... def wait(self, timeout: Optional[float] = ...) -> bool: ... if sys.version_info >= (3,): def wait_for(self, predicate: Callable[[], _T], timeout: Optional[float] = ...) -> _T: ... def notify(self, n: int = ...) -> None: ... def notify_all(self) -> None: ... def notifyAll(self) -> None: ... class Semaphore: def __init__(self, value: int = ...) -> None: ... def __enter__(self) -> bool: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... if sys.version_info >= (3,): def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... else: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... class BoundedSemaphore: def __init__(self, value: int = ...) -> None: ... def __enter__(self) -> bool: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... if sys.version_info >= (3,): def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... else: def acquire(self, blocking: bool = ...) -> bool: ... def release(self) -> None: ... class Event: def __init__(self) -> None: ... def is_set(self) -> bool: ... if sys.version_info < (3,): def isSet(self) -> bool: ... def set(self) -> None: ... def clear(self) -> None: ... def wait(self, timeout: Optional[float] = ...) -> bool: ... if sys.version_info >= (3, 8): from _thread import _ExceptHookArgs as ExceptHookArgs, ExceptHookArgs as _ExceptHookArgs # don't ask excepthook: Callable[[_ExceptHookArgs], Any] class Timer(Thread): if sys.version_info >= (3,): def __init__(self, interval: float, function: Callable[..., None], args: Optional[Iterable[Any]] = ..., kwargs: Optional[Mapping[str, Any]] = ...) -> None: ... else: def __init__(self, interval: float, function: Callable[..., None], args: Iterable[Any] = ..., kwargs: Mapping[str, Any] = ...) -> None: ... def cancel(self) -> None: ... if sys.version_info >= (3,): class Barrier: parties: int n_waiting: int broken: bool def __init__(self, parties: int, action: Optional[Callable[[], None]] = ..., timeout: Optional[float] = ...) -> None: ... def wait(self, timeout: Optional[float] = ...) -> int: ... def reset(self) -> None: ... def abort(self) -> None: ... class BrokenBarrierError(RuntimeError): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/operator.pyi0000664000175000017500000001456713577124116024257 0ustar davedave00000000000000# Stubs for operator from typing import ( Any, Callable, Container, Mapping, MutableMapping, MutableSequence, Sequence, SupportsAbs, Tuple, TypeVar, overload, ) import sys _T = TypeVar('_T') _K = TypeVar('_K') _V = TypeVar('_V') def lt(a: Any, b: Any) -> Any: ... def le(a: Any, b: Any) -> Any: ... def eq(a: Any, b: Any) -> Any: ... def ne(a: Any, b: Any) -> Any: ... def ge(a: Any, b: Any) -> Any: ... def gt(a: Any, b: Any) -> Any: ... def __lt__(a: Any, b: Any) -> Any: ... def __le__(a: Any, b: Any) -> Any: ... def __eq__(a: Any, b: Any) -> Any: ... def __ne__(a: Any, b: Any) -> Any: ... def __ge__(a: Any, b: Any) -> Any: ... def __gt__(a: Any, b: Any) -> Any: ... def not_(obj: Any) -> bool: ... def __not__(obj: Any) -> bool: ... def truth(x: Any) -> bool: ... def is_(a: Any, b: Any) -> bool: ... def is_not(a: Any, b: Any) -> bool: ... def abs(x: SupportsAbs[_T]) -> _T: ... def __abs__(a: SupportsAbs[_T]) -> _T: ... def add(a: Any, b: Any) -> Any: ... def __add__(a: Any, b: Any) -> Any: ... def and_(a: Any, b: Any) -> Any: ... def __and__(a: Any, b: Any) -> Any: ... if sys.version_info < (3, ): def div(a: Any, b: Any) -> Any: ... def __div__(a: Any, b: Any) -> Any: ... def floordiv(a: Any, b: Any) -> Any: ... def __floordiv__(a: Any, b: Any) -> Any: ... def index(a: Any) -> int: ... def __index__(a: Any) -> int: ... def inv(obj: Any) -> Any: ... def invert(obj: Any) -> Any: ... def __inv__(obj: Any) -> Any: ... def __invert__(obj: Any) -> Any: ... def lshift(a: Any, b: Any) -> Any: ... def __lshift__(a: Any, b: Any) -> Any: ... def mod(a: Any, b: Any) -> Any: ... def __mod__(a: Any, b: Any) -> Any: ... def mul(a: Any, b: Any) -> Any: ... def __mul__(a: Any, b: Any) -> Any: ... if sys.version_info >= (3, 5): def matmul(a: Any, b: Any) -> Any: ... def __matmul__(a: Any, b: Any) -> Any: ... def neg(obj: Any) -> Any: ... def __neg__(obj: Any) -> Any: ... def or_(a: Any, b: Any) -> Any: ... def __or__(a: Any, b: Any) -> Any: ... def pos(obj: Any) -> Any: ... def __pos__(obj: Any) -> Any: ... def pow(a: Any, b: Any) -> Any: ... def __pow__(a: Any, b: Any) -> Any: ... def rshift(a: Any, b: Any) -> Any: ... def __rshift__(a: Any, b: Any) -> Any: ... def sub(a: Any, b: Any) -> Any: ... def __sub__(a: Any, b: Any) -> Any: ... def truediv(a: Any, b: Any) -> Any: ... def __truediv__(a: Any, b: Any) -> Any: ... def xor(a: Any, b: Any) -> Any: ... def __xor__(a: Any, b: Any) -> Any: ... def concat(a: Sequence[_T], b: Sequence[_T]) -> Sequence[_T]: ... def __concat__(a: Sequence[_T], b: Sequence[_T]) -> Sequence[_T]: ... def contains(a: Container[Any], b: Any) -> bool: ... def __contains__(a: Container[Any], b: Any) -> bool: ... def countOf(a: Container[Any], b: Any) -> int: ... @overload def delitem(a: MutableSequence[_T], b: int) -> None: ... @overload def delitem(a: MutableMapping[_K, _V], b: _K) -> None: ... @overload def __delitem__(a: MutableSequence[_T], b: int) -> None: ... @overload def __delitem__(a: MutableMapping[_K, _V], b: _K) -> None: ... if sys.version_info < (3, ): def delslice(a: MutableSequence[Any], b: int, c: int) -> None: ... def __delslice__(a: MutableSequence[Any], b: int, c: int) -> None: ... @overload def getitem(a: Sequence[_T], b: int) -> _T: ... @overload def getitem(a: Mapping[_K, _V], b: _K) -> _V: ... @overload def __getitem__(a: Sequence[_T], b: int) -> _T: ... @overload def __getitem__(a: Mapping[_K, _V], b: _K) -> _V: ... if sys.version_info < (3, ): def getslice(a: Sequence[_T], b: int, c: int) -> Sequence[_T]: ... def __getslice__(a: Sequence[_T], b: int, c: int) -> Sequence[_T]: ... def indexOf(a: Sequence[_T], b: _T) -> int: ... if sys.version_info < (3, ): def repeat(a: Any, b: int) -> Any: ... def __repeat__(a: Any, b: int) -> Any: ... if sys.version_info < (3, ): def sequenceIncludes(a: Container[Any], b: Any) -> bool: ... @overload def setitem(a: MutableSequence[_T], b: int, c: _T) -> None: ... @overload def setitem(a: MutableMapping[_K, _V], b: _K, c: _V) -> None: ... @overload def __setitem__(a: MutableSequence[_T], b: int, c: _T) -> None: ... @overload def __setitem__(a: MutableMapping[_K, _V], b: _K, c: _V) -> None: ... if sys.version_info < (3, ): def setslice(a: MutableSequence[_T], b: int, c: int, v: Sequence[_T]) -> None: ... def __setslice__(a: MutableSequence[_T], b: int, c: int, v: Sequence[_T]) -> None: ... if sys.version_info >= (3, 4): def length_hint(obj: Any, default: int = ...) -> int: ... @overload def attrgetter(attr: str) -> Callable[[Any], Any]: ... @overload def attrgetter(*attrs: str) -> Callable[[Any], Tuple[Any, ...]]: ... @overload def itemgetter(item: Any) -> Callable[[Any], Any]: ... @overload def itemgetter(*items: Any) -> Callable[[Any], Tuple[Any, ...]]: ... def methodcaller(name: str, *args: Any, **kwargs: Any) -> Callable[..., Any]: ... def iadd(a: Any, b: Any) -> Any: ... def __iadd__(a: Any, b: Any) -> Any: ... def iand(a: Any, b: Any) -> Any: ... def __iand__(a: Any, b: Any) -> Any: ... def iconcat(a: Any, b: Any) -> Any: ... def __iconcat__(a: Any, b: Any) -> Any: ... if sys.version_info < (3, ): def idiv(a: Any, b: Any) -> Any: ... def __idiv__(a: Any, b: Any) -> Any: ... def ifloordiv(a: Any, b: Any) -> Any: ... def __ifloordiv__(a: Any, b: Any) -> Any: ... def ilshift(a: Any, b: Any) -> Any: ... def __ilshift__(a: Any, b: Any) -> Any: ... def imod(a: Any, b: Any) -> Any: ... def __imod__(a: Any, b: Any) -> Any: ... def imul(a: Any, b: Any) -> Any: ... def __imul__(a: Any, b: Any) -> Any: ... if sys.version_info >= (3, 5): def imatmul(a: Any, b: Any) -> Any: ... def __imatmul__(a: Any, b: Any) -> Any: ... def ior(a: Any, b: Any) -> Any: ... def __ior__(a: Any, b: Any) -> Any: ... def ipow(a: Any, b: Any) -> Any: ... def __ipow__(a: Any, b: Any) -> Any: ... if sys.version_info < (3, ): def irepeat(a: Any, b: int) -> Any: ... def __irepeat__(a: Any, b: int) -> Any: ... def irshift(a: Any, b: Any) -> Any: ... def __irshift__(a: Any, b: Any) -> Any: ... def isub(a: Any, b: Any) -> Any: ... def __isub__(a: Any, b: Any) -> Any: ... def itruediv(a: Any, b: Any) -> Any: ... def __itruediv__(a: Any, b: Any) -> Any: ... def ixor(a: Any, b: Any) -> Any: ... def __ixor__(a: Any, b: Any) -> Any: ... if sys.version_info < (3, ): def isCallable(x: Any) -> bool: ... def isMappingType(x: Any) -> bool: ... def isNumberType(x: Any) -> bool: ... def isSequenceType(x: Any) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/contextlib.pyi0000664000175000017500000001130613577124116024563 0ustar davedave00000000000000# Stubs for contextlib from typing import ( Any, Callable, Generator, IO, Iterable, Iterator, Optional, Type, Generic, TypeVar, overload ) from types import TracebackType import sys # Aliased here for backwards compatibility; TODO eventually remove this from typing import ContextManager as ContextManager if sys.version_info >= (3, 5): from typing import AsyncContextManager, AsyncIterator if sys.version_info >= (3, 6): from typing import ContextManager as AbstractContextManager if sys.version_info >= (3, 7): from typing import AsyncContextManager as AbstractAsyncContextManager _T = TypeVar('_T') _F = TypeVar('_F', bound=Callable[..., Any]) _ExitFunc = Callable[[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]], bool] _CM_EF = TypeVar('_CM_EF', ContextManager[Any], _ExitFunc) if sys.version_info >= (3, 2): class _GeneratorContextManager(ContextManager[_T], Generic[_T]): def __call__(self, func: _F) -> _F: ... def contextmanager(func: Callable[..., Iterator[_T]]) -> Callable[..., _GeneratorContextManager[_T]]: ... else: class GeneratorContextManager(ContextManager[_T], Generic[_T]): def __call__(self, func: _F) -> _F: ... def contextmanager(func: Callable[..., Iterator[_T]]) -> Callable[..., ContextManager[_T]]: ... if sys.version_info >= (3, 7): def asynccontextmanager(func: Callable[..., AsyncIterator[_T]]) -> Callable[..., AsyncContextManager[_T]]: ... if sys.version_info < (3,): def nested(*mgr: ContextManager[Any]) -> ContextManager[Iterable[Any]]: ... class closing(ContextManager[_T], Generic[_T]): def __init__(self, thing: _T) -> None: ... if sys.version_info >= (3, 4): class suppress(ContextManager[None]): def __init__(self, *exceptions: Type[BaseException]) -> None: ... def __exit__(self, exctype: Optional[Type[BaseException]], excinst: Optional[BaseException], exctb: Optional[TracebackType]) -> bool: ... class redirect_stdout(ContextManager[None]): def __init__(self, new_target: Optional[IO[str]]) -> None: ... if sys.version_info >= (3, 5): class redirect_stderr(ContextManager[None]): def __init__(self, new_target: Optional[IO[str]]) -> None: ... if sys.version_info >= (3,): class ContextDecorator: def __call__(self, func: Callable[..., None]) -> Callable[..., ContextManager[None]]: ... _U = TypeVar('_U', bound=ExitStack) class ExitStack(ContextManager[ExitStack]): def __init__(self) -> None: ... def enter_context(self, cm: ContextManager[_T]) -> _T: ... def push(self, exit: _CM_EF) -> _CM_EF: ... def callback(self, callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ... def pop_all(self: _U) -> _U: ... def close(self) -> None: ... def __enter__(self: _U) -> _U: ... def __exit__(self, __exc_type: Optional[Type[BaseException]], __exc_value: Optional[BaseException], __traceback: Optional[TracebackType]) -> bool: ... if sys.version_info >= (3, 7): from typing import Awaitable _S = TypeVar('_S', bound=AsyncExitStack) _ExitCoroFunc = Callable[[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]], Awaitable[bool]] _CallbackCoroFunc = Callable[..., Awaitable[Any]] _ACM_EF = TypeVar('_ACM_EF', AsyncContextManager[Any], _ExitCoroFunc) class AsyncExitStack(AsyncContextManager[AsyncExitStack]): def __init__(self) -> None: ... def enter_context(self, cm: ContextManager[_T]) -> _T: ... def enter_async_context(self, cm: AsyncContextManager[_T]) -> Awaitable[_T]: ... def push(self, exit: _CM_EF) -> _CM_EF: ... def push_async_exit(self, exit: _ACM_EF) -> _ACM_EF: ... def callback(self, callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ... def push_async_callback(self, callback: _CallbackCoroFunc, *args: Any, **kwds: Any) -> _CallbackCoroFunc: ... def pop_all(self: _S) -> _S: ... def aclose(self) -> Awaitable[None]: ... def __aenter__(self: _S) -> Awaitable[_S]: ... def __aexit__(self, __exc_type: Optional[Type[BaseException]], __exc_value: Optional[BaseException], __traceback: Optional[TracebackType]) -> Awaitable[bool]: ... if sys.version_info >= (3, 7): @overload def nullcontext(enter_result: _T) -> ContextManager[_T]: ... @overload def nullcontext() -> ContextManager[None]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/numbers.pyi0000664000175000017500000000774113577124116024073 0ustar davedave00000000000000# Stubs for numbers (Python 3.5) # See https://docs.python.org/2.7/library/numbers.html # and https://docs.python.org/3/library/numbers.html # # Note: these stubs are incomplete. The more complex type # signatures are currently omitted. from typing import Any, Optional, SupportsFloat, overload from abc import ABCMeta, abstractmethod import sys class Number(metaclass=ABCMeta): @abstractmethod def __hash__(self) -> int: ... class Complex(Number): @abstractmethod def __complex__(self) -> complex: ... if sys.version_info >= (3, 0): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... @property @abstractmethod def real(self): ... @property @abstractmethod def imag(self): ... @abstractmethod def __add__(self, other): ... @abstractmethod def __radd__(self, other): ... @abstractmethod def __neg__(self): ... @abstractmethod def __pos__(self): ... def __sub__(self, other): ... def __rsub__(self, other): ... @abstractmethod def __mul__(self, other): ... @abstractmethod def __rmul__(self, other): ... if sys.version_info < (3, 0): @abstractmethod def __div__(self, other): ... @abstractmethod def __rdiv__(self, other): ... @abstractmethod def __truediv__(self, other): ... @abstractmethod def __rtruediv__(self, other): ... @abstractmethod def __pow__(self, exponent): ... @abstractmethod def __rpow__(self, base): ... def __abs__(self): ... def conjugate(self): ... def __eq__(self, other: object) -> bool: ... if sys.version_info < (3, 0): def __ne__(self, other: object) -> bool: ... class Real(Complex, SupportsFloat): @abstractmethod def __float__(self) -> float: ... @abstractmethod def __trunc__(self) -> int: ... if sys.version_info >= (3, 0): @abstractmethod def __floor__(self) -> int: ... @abstractmethod def __ceil__(self) -> int: ... @abstractmethod @overload def __round__(self, ndigits: None = ...): ... @abstractmethod @overload def __round__(self, ndigits: int): ... def __divmod__(self, other): ... def __rdivmod__(self, other): ... @abstractmethod def __floordiv__(self, other): ... @abstractmethod def __rfloordiv__(self, other): ... @abstractmethod def __mod__(self, other): ... @abstractmethod def __rmod__(self, other): ... @abstractmethod def __lt__(self, other) -> bool: ... @abstractmethod def __le__(self, other) -> bool: ... def __complex__(self) -> complex: ... @property def real(self): ... @property def imag(self): ... def conjugate(self): ... class Rational(Real): @property @abstractmethod def numerator(self) -> int: ... @property @abstractmethod def denominator(self) -> int: ... def __float__(self) -> float: ... class Integral(Rational): if sys.version_info >= (3, 0): @abstractmethod def __int__(self) -> int: ... else: @abstractmethod def __long__(self) -> long: ... def __index__(self) -> int: ... @abstractmethod def __pow__(self, exponent, modulus: Optional[Any] = ...): ... @abstractmethod def __lshift__(self, other): ... @abstractmethod def __rlshift__(self, other): ... @abstractmethod def __rshift__(self, other): ... @abstractmethod def __rrshift__(self, other): ... @abstractmethod def __and__(self, other): ... @abstractmethod def __rand__(self, other): ... @abstractmethod def __xor__(self, other): ... @abstractmethod def __rxor__(self, other): ... @abstractmethod def __or__(self, other): ... @abstractmethod def __ror__(self, other): ... @abstractmethod def __invert__(self): ... def __float__(self) -> float: ... @property def numerator(self) -> int: ... @property def denominator(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/filecmp.pyi0000664000175000017500000000312513577124116024027 0ustar davedave00000000000000# Stubs for filecmp (Python 2/3) import sys from typing import AnyStr, Callable, Dict, Generic, Iterable, List, Optional, Sequence, Tuple, Union, Text DEFAULT_IGNORES: List[str] def cmp(f1: Union[bytes, Text], f2: Union[bytes, Text], shallow: Union[int, bool] = ...) -> bool: ... def cmpfiles(a: AnyStr, b: AnyStr, common: Iterable[AnyStr], shallow: Union[int, bool] = ...) -> Tuple[List[AnyStr], List[AnyStr], List[AnyStr]]: ... class dircmp(Generic[AnyStr]): def __init__(self, a: AnyStr, b: AnyStr, ignore: Optional[Sequence[AnyStr]] = ..., hide: Optional[Sequence[AnyStr]] = ...) -> None: ... left: AnyStr right: AnyStr hide: Sequence[AnyStr] ignore: Sequence[AnyStr] # These properties are created at runtime by __getattr__ subdirs: Dict[AnyStr, dircmp[AnyStr]] same_files: List[AnyStr] diff_files: List[AnyStr] funny_files: List[AnyStr] common_dirs: List[AnyStr] common_files: List[AnyStr] common_funny: List[AnyStr] common: List[AnyStr] left_only: List[AnyStr] right_only: List[AnyStr] left_list: List[AnyStr] right_list: List[AnyStr] def report(self) -> None: ... def report_partial_closure(self) -> None: ... def report_full_closure(self) -> None: ... methodmap: Dict[str, Callable[[], None]] def phase0(self) -> None: ... def phase1(self) -> None: ... def phase2(self) -> None: ... def phase3(self) -> None: ... def phase4(self) -> None: ... def phase4_closure(self) -> None: ... if sys.version_info >= (3,): def clear_cache() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/struct.pyi0000664000175000017500000000321413577124116023733 0ustar davedave00000000000000# Stubs for struct # Based on http://docs.python.org/3.2/library/struct.html # Based on http://docs.python.org/2/library/struct.html import sys from typing import Any, Tuple, Text, Union, Iterator from array import array from mmap import mmap class error(Exception): ... _FmtType = Union[bytes, Text] if sys.version_info >= (3,): _BufferType = Union[array[int], bytes, bytearray, memoryview, mmap] _WriteBufferType = Union[array, bytearray, memoryview, mmap] else: _BufferType = Union[array[int], bytes, bytearray, buffer, memoryview, mmap] _WriteBufferType = Union[array[Any], bytearray, buffer, memoryview, mmap] def pack(fmt: _FmtType, *v: Any) -> bytes: ... def pack_into(fmt: _FmtType, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ... def unpack(fmt: _FmtType, buffer: _BufferType) -> Tuple[Any, ...]: ... def unpack_from(fmt: _FmtType, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ... if sys.version_info >= (3, 4): def iter_unpack(fmt: _FmtType, buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ... def calcsize(fmt: _FmtType) -> int: ... class Struct: if sys.version_info >= (3, 7): format: str else: format: bytes size: int def __init__(self, format: _FmtType) -> None: ... def pack(self, *v: Any) -> bytes: ... def pack_into(self, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ... def unpack(self, buffer: _BufferType) -> Tuple[Any, ...]: ... def unpack_from(self, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ... if sys.version_info >= (3, 4): def iter_unpack(self, buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/datetime.pyi0000664000175000017500000002734613577124116024217 0ustar davedave00000000000000import sys from time import struct_time from typing import AnyStr, Optional, SupportsAbs, Tuple, Union, overload, ClassVar, Type, TypeVar _S = TypeVar("_S") if sys.version_info >= (3,): _Text = str else: _Text = Union[str, unicode] MINYEAR: int MAXYEAR: int class tzinfo: def tzname(self, dt: Optional[datetime]) -> Optional[str]: ... def utcoffset(self, dt: Optional[datetime]) -> Optional[timedelta]: ... def dst(self, dt: Optional[datetime]) -> Optional[timedelta]: ... def fromutc(self, dt: datetime) -> datetime: ... if sys.version_info >= (3, 2): class timezone(tzinfo): utc: ClassVar[timezone] min: ClassVar[timezone] max: ClassVar[timezone] def __init__(self, offset: timedelta, name: str = ...) -> None: ... def __hash__(self) -> int: ... _tzinfo = tzinfo class date: min: ClassVar[date] max: ClassVar[date] resolution: ClassVar[timedelta] def __init__(self, year: int, month: int, day: int) -> None: ... @classmethod def fromtimestamp(cls: Type[_S], t: float) -> _S: ... @classmethod def today(cls: Type[_S]) -> _S: ... @classmethod def fromordinal(cls: Type[_S], n: int) -> _S: ... if sys.version_info >= (3, 7): @classmethod def fromisoformat(cls: Type[_S], date_string: str) -> _S: ... if sys.version_info >= (3, 8): @classmethod def fromisocalendar(cls: Type[_S], year: int, week: int, day: int) -> _S: ... @property def year(self) -> int: ... @property def month(self) -> int: ... @property def day(self) -> int: ... def ctime(self) -> str: ... def strftime(self, fmt: _Text) -> str: ... if sys.version_info >= (3,): def __format__(self, fmt: str) -> str: ... else: def __format__(self, fmt: AnyStr) -> AnyStr: ... def isoformat(self) -> str: ... def timetuple(self) -> struct_time: ... def toordinal(self) -> int: ... def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ... def __le__(self, other: date) -> bool: ... def __lt__(self, other: date) -> bool: ... def __ge__(self, other: date) -> bool: ... def __gt__(self, other: date) -> bool: ... if sys.version_info >= (3, 8): def __add__(self: _S, other: timedelta) -> _S: ... def __radd__(self: _S, other: timedelta) -> _S: ... else: def __add__(self, other: timedelta) -> date: ... def __radd__(self, other: timedelta) -> date: ... @overload def __sub__(self, other: timedelta) -> date: ... @overload def __sub__(self, other: date) -> timedelta: ... def __hash__(self) -> int: ... def weekday(self) -> int: ... def isoweekday(self) -> int: ... def isocalendar(self) -> Tuple[int, int, int]: ... class time: min: ClassVar[time] max: ClassVar[time] resolution: ClassVar[timedelta] if sys.version_info >= (3, 6): def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ..., *, fold: int = ...) -> None: ... else: def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> None: ... @property def hour(self) -> int: ... @property def minute(self) -> int: ... @property def second(self) -> int: ... @property def microsecond(self) -> int: ... @property def tzinfo(self) -> Optional[_tzinfo]: ... if sys.version_info >= (3, 6): @property def fold(self) -> int: ... def __le__(self, other: time) -> bool: ... def __lt__(self, other: time) -> bool: ... def __ge__(self, other: time) -> bool: ... def __gt__(self, other: time) -> bool: ... def __hash__(self) -> int: ... if sys.version_info >= (3, 6): def isoformat(self, timespec: str = ...) -> str: ... else: def isoformat(self) -> str: ... if sys.version_info >= (3, 7): @classmethod def fromisoformat(cls: Type[_S], time_string: str) -> _S: ... def strftime(self, fmt: _Text) -> str: ... if sys.version_info >= (3,): def __format__(self, fmt: str) -> str: ... else: def __format__(self, fmt: AnyStr) -> AnyStr: ... def utcoffset(self) -> Optional[timedelta]: ... def tzname(self) -> Optional[str]: ... def dst(self) -> Optional[int]: ... if sys.version_info >= (3, 6): def replace(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ..., *, fold: int = ...) -> time: ... else: def replace(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> time: ... _date = date _time = time class timedelta(SupportsAbs[timedelta]): min: ClassVar[timedelta] max: ClassVar[timedelta] resolution: ClassVar[timedelta] if sys.version_info >= (3, 6): def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ..., milliseconds: float = ..., minutes: float = ..., hours: float = ..., weeks: float = ..., *, fold: int = ...) -> None: ... else: def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ..., milliseconds: float = ..., minutes: float = ..., hours: float = ..., weeks: float = ...) -> None: ... @property def days(self) -> int: ... @property def seconds(self) -> int: ... @property def microseconds(self) -> int: ... def total_seconds(self) -> float: ... def __add__(self, other: timedelta) -> timedelta: ... def __radd__(self, other: timedelta) -> timedelta: ... def __sub__(self, other: timedelta) -> timedelta: ... def __rsub__(self, other: timedelta) -> timedelta: ... def __neg__(self) -> timedelta: ... def __pos__(self) -> timedelta: ... def __abs__(self) -> timedelta: ... def __mul__(self, other: float) -> timedelta: ... def __rmul__(self, other: float) -> timedelta: ... @overload def __floordiv__(self, other: timedelta) -> int: ... @overload def __floordiv__(self, other: int) -> timedelta: ... if sys.version_info >= (3,): @overload def __truediv__(self, other: timedelta) -> float: ... @overload def __truediv__(self, other: float) -> timedelta: ... def __mod__(self, other: timedelta) -> timedelta: ... def __divmod__(self, other: timedelta) -> Tuple[int, timedelta]: ... else: @overload def __div__(self, other: timedelta) -> float: ... @overload def __div__(self, other: float) -> timedelta: ... def __le__(self, other: timedelta) -> bool: ... def __lt__(self, other: timedelta) -> bool: ... def __ge__(self, other: timedelta) -> bool: ... def __gt__(self, other: timedelta) -> bool: ... def __hash__(self) -> int: ... class datetime(date): min: ClassVar[datetime] max: ClassVar[datetime] resolution: ClassVar[timedelta] if sys.version_info >= (3, 6): def __init__(self, year: int, month: int, day: int, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ..., *, fold: int = ...) -> None: ... else: def __init__(self, year: int, month: int, day: int, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> None: ... @property def year(self) -> int: ... @property def month(self) -> int: ... @property def day(self) -> int: ... @property def hour(self) -> int: ... @property def minute(self) -> int: ... @property def second(self) -> int: ... @property def microsecond(self) -> int: ... @property def tzinfo(self) -> Optional[_tzinfo]: ... if sys.version_info >= (3, 6): @property def fold(self) -> int: ... @classmethod def fromtimestamp(cls: Type[_S], t: float, tz: Optional[_tzinfo] = ...) -> _S: ... @classmethod def utcfromtimestamp(cls: Type[_S], t: float) -> _S: ... @classmethod def today(cls: Type[_S]) -> _S: ... @classmethod def fromordinal(cls: Type[_S], n: int) -> _S: ... if sys.version_info >= (3, 8): @classmethod def now(cls: Type[_S], tz: Optional[_tzinfo] = ...) -> _S: ... else: @overload @classmethod def now(cls: Type[_S], tz: None = ...) -> _S: ... @overload @classmethod def now(cls, tz: _tzinfo) -> datetime: ... @classmethod def utcnow(cls: Type[_S]) -> _S: ... if sys.version_info >= (3, 6): @classmethod def combine(cls, date: _date, time: _time, tzinfo: Optional[_tzinfo] = ...) -> datetime: ... else: @classmethod def combine(cls, date: _date, time: _time) -> datetime: ... if sys.version_info >= (3, 7): @classmethod def fromisoformat(cls: Type[_S], date_string: str) -> _S: ... def strftime(self, fmt: _Text) -> str: ... if sys.version_info >= (3,): def __format__(self, fmt: str) -> str: ... else: def __format__(self, fmt: AnyStr) -> AnyStr: ... def toordinal(self) -> int: ... def timetuple(self) -> struct_time: ... if sys.version_info >= (3, 3): def timestamp(self) -> float: ... def utctimetuple(self) -> struct_time: ... def date(self) -> _date: ... def time(self) -> _time: ... def timetz(self) -> _time: ... if sys.version_info >= (3, 6): def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ..., *, fold: int = ...) -> datetime: ... else: def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> datetime: ... if sys.version_info >= (3, 8): def astimezone(self: _S, tz: Optional[_tzinfo] = ...) -> _S: ... elif sys.version_info >= (3, 3): def astimezone(self, tz: Optional[_tzinfo] = ...) -> datetime: ... else: def astimezone(self, tz: _tzinfo) -> datetime: ... def ctime(self) -> str: ... if sys.version_info >= (3, 6): def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ... else: def isoformat(self, sep: str = ...) -> str: ... @classmethod def strptime(cls, date_string: _Text, format: _Text) -> datetime: ... def utcoffset(self) -> Optional[timedelta]: ... def tzname(self) -> Optional[str]: ... def dst(self) -> Optional[timedelta]: ... def __le__(self, other: datetime) -> bool: ... # type: ignore def __lt__(self, other: datetime) -> bool: ... # type: ignore def __ge__(self, other: datetime) -> bool: ... # type: ignore def __gt__(self, other: datetime) -> bool: ... # type: ignore if sys.version_info >= (3, 8): def __add__(self: _S, other: timedelta) -> _S: ... def __radd__(self: _S, other: timedelta) -> _S: ... else: def __add__(self, other: timedelta) -> datetime: ... def __radd__(self, other: timedelta) -> datetime: ... @overload # type: ignore def __sub__(self, other: datetime) -> timedelta: ... @overload def __sub__(self, other: timedelta) -> datetime: ... def __hash__(self) -> int: ... def weekday(self) -> int: ... def isoweekday(self) -> int: ... def isocalendar(self) -> Tuple[int, int, int]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/mmap.pyi0000664000175000017500000000714613577124116023351 0ustar davedave00000000000000import sys from typing import (Optional, Sequence, Union, Generic, overload, Iterable, Iterator, Sized, ContextManager, AnyStr) ACCESS_DEFAULT: int ACCESS_READ: int ACCESS_WRITE: int ACCESS_COPY: int ALLOCATIONGRANULARITY: int if sys.platform != 'win32': MAP_ANON: int MAP_ANONYMOUS: int MAP_DENYWRITE: int MAP_EXECUTABLE: int MAP_PRIVATE: int MAP_SHARED: int PROT_EXEC: int PROT_READ: int PROT_WRITE: int PAGESIZE: int class _mmap(Generic[AnyStr]): if sys.platform == 'win32': def __init__(self, fileno: int, length: int, tagname: Optional[str] = ..., access: int = ..., offset: int = ...) -> None: ... else: def __init__(self, fileno: int, length: int, flags: int = ..., prot: int = ..., access: int = ..., offset: int = ...) -> None: ... def close(self) -> None: ... def find(self, sub: AnyStr, start: int = ..., end: int = ...) -> int: ... if sys.version_info >= (3, 8): def flush(self, offset: int = ..., size: int = ...) -> None: ... else: def flush(self, offset: int = ..., size: int = ...) -> int: ... def move(self, dest: int, src: int, count: int) -> None: ... def read(self, n: int = ...) -> AnyStr: ... def read_byte(self) -> AnyStr: ... def readline(self) -> AnyStr: ... def resize(self, newsize: int) -> None: ... def seek(self, pos: int, whence: int = ...) -> None: ... def size(self) -> int: ... def tell(self) -> int: ... def write(self, bytes: AnyStr) -> None: ... def write_byte(self, byte: AnyStr) -> None: ... def __len__(self) -> int: ... if sys.version_info >= (3,): class mmap(_mmap[bytes], ContextManager[mmap], Iterable[bytes], Sized): closed: bool if sys.version_info >= (3, 8): def madvise(self, option: int, start: int = ..., length: int = ...) -> None: ... def rfind(self, sub: bytes, start: int = ..., stop: int = ...) -> int: ... @overload def __getitem__(self, index: int) -> int: ... @overload def __getitem__(self, index: slice) -> bytes: ... def __delitem__(self, index: Union[int, slice]) -> None: ... @overload def __setitem__(self, index: int, object: int) -> None: ... @overload def __setitem__(self, index: slice, object: bytes) -> None: ... # Doesn't actually exist, but the object is actually iterable because it has __getitem__ and # __len__, so we claim that there is also an __iter__ to help type checkers. def __iter__(self) -> Iterator[bytes]: ... else: class mmap(_mmap[bytes], Sequence[bytes]): def rfind(self, string: bytes, start: int = ..., stop: int = ...) -> int: ... def __getitem__(self, index: Union[int, slice]) -> bytes: ... def __getslice__(self, i: Optional[int], j: Optional[int]) -> bytes: ... def __delitem__(self, index: Union[int, slice]) -> None: ... def __setitem__(self, index: Union[int, slice], object: bytes) -> None: ... if sys.version_info >= (3, 8): MADV_NORMAL: int MADV_RANDOM: int MADV_SEQUENTIAL: int MADV_WILLNEED: int MADV_DONTNEED: int MADV_REMOVE: int MADV_DONTFORK: int MADV_DOFORK: int MADV_HWPOISON: int MADV_MERGEABLE: int MADV_UNMERGEABLE: int MADV_SOFT_OFFLINE: int MADV_HUGEPAGE: int MADV_NOHUGEPAGE: int MADV_DONTDUMP: int MADV_DODUMP: int MADV_FREE: int MADV_NOSYNC: int MADV_AUTOSYNC: int MADV_NOCORE: int MADV_CORE: int MADV_PROTECT: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/tabnanny.pyi0000664000175000017500000000112113577124116024214 0ustar davedave00000000000000# Stubs for tabnanny (Python 2 and 3) import os import sys from typing import Iterable, Tuple, Union if sys.version_info >= (3, 6): _Path = Union[str, bytes, os.PathLike] else: _Path = Union[str, bytes] verbose: int filename_only: int class NannyNag(Exception): def __init__(self, lineno: int, msg: str, line: str) -> None: ... def get_lineno(self) -> int: ... def get_msg(self) -> str: ... def get_line(self) -> str: ... def check(file: _Path) -> None: ... def process_tokens(tokens: Iterable[Tuple[int, str, Tuple[int, int], Tuple[int, int], str]]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/optparse.pyi0000664000175000017500000002344013577124116024247 0ustar davedave00000000000000# Generated by pytype, with only minor tweaks. Might be incomplete. import sys from typing import Any, AnyStr, Callable, Dict, IO, Iterable, List, Mapping, Optional, Sequence, Tuple, Union # See https://groups.google.com/forum/#!topic/python-ideas/gA1gdj3RZ5g if sys.version_info >= (3,): _Text = str else: _Text = Union[str, unicode] NO_DEFAULT: Tuple[_Text, ...] SUPPRESS_HELP: _Text SUPPRESS_USAGE: _Text def check_builtin(option: Option, opt: Any, value: _Text) -> Any: ... def check_choice(option: Option, opt: Any, value: _Text) -> Any: ... if sys.version_info < (3,): def isbasestring(x: Any) -> bool: ... class OptParseError(Exception): msg: _Text def __init__(self, msg: _Text) -> None: ... class BadOptionError(OptParseError): opt_str: _Text def __init__(self, opt_str: _Text) -> None: ... class AmbiguousOptionError(BadOptionError): possibilities: Iterable[_Text] def __init__(self, opt_str: _Text, possibilities: Sequence[_Text]) -> None: ... class OptionError(OptParseError): msg: _Text option_id: _Text def __init__(self, msg: _Text, option: Option) -> None: ... class OptionConflictError(OptionError): ... class OptionValueError(OptParseError): ... class HelpFormatter: NO_DEFAULT_VALUE: _Text _long_opt_fmt: _Text _short_opt_fmt: _Text current_indent: int default_tag: _Text help_position: Any help_width: Any indent_increment: int level: int max_help_position: int option_strings: Dict[Option, _Text] parser: OptionParser short_first: Any width: int def __init__(self, indent_increment: int, max_help_position: int, width: Optional[int], short_first: int) -> None: ... def _format__Text(self, _Text: _Text) -> _Text: ... def dedent(self) -> None: ... def expand_default(self, option: Option) -> _Text: ... def format_description(self, description: _Text) -> _Text: ... def format_epilog(self, epilog) -> _Text: ... def format_heading(self, heading: Any) -> _Text: ... def format_option(self, option: OptionParser) -> _Text: ... def format_option_strings(self, option: OptionParser) -> Any: ... def format_usage(self, usage: Any) -> _Text: ... def indent(self) -> None: ... def set_long_opt_delimiter(self, delim: _Text) -> None: ... def set_parser(self, parser: OptionParser) -> None: ... def set_short_opt_delimiter(self, delim: _Text) -> None: ... def store_option_strings(self, parser: OptionParser) -> None: ... class IndentedHelpFormatter(HelpFormatter): def __init__(self, indent_increment: int = ..., max_help_position: int = ..., width: Optional[int] = ..., short_first: int = ...) -> None: ... def format_heading(self, heading: _Text) -> _Text: ... def format_usage(self, usage: _Text) -> _Text: ... class TitledHelpFormatter(HelpFormatter): def __init__(self, indent_increment: int = ..., max_help_position: int = ..., width: Optional[int] = ..., short_first: int = ...) -> None: ... def format_heading(self, heading: _Text) -> _Text: ... def format_usage(self, usage: _Text) -> _Text: ... class Option: ACTIONS: Tuple[_Text, ...] ALWAYS_TYPED_ACTIONS: Tuple[_Text, ...] ATTRS: List[_Text] CHECK_METHODS: Optional[List[Callable[..., Any]]] CONST_ACTIONS: Tuple[_Text, ...] STORE_ACTIONS: Tuple[_Text, ...] TYPED_ACTIONS: Tuple[_Text, ...] TYPES: Tuple[_Text, ...] TYPE_CHECKER: Dict[_Text, Callable[..., Any]] _long_opts: List[_Text] _short_opts: List[_Text] action: _Text dest: Optional[_Text] nargs: int type: Any def __init__(self, *opts, **attrs) -> None: ... def _check_action(self) -> None: ... def _check_callback(self) -> None: ... def _check_choice(self) -> None: ... def _check_const(self) -> None: ... def _check_dest(self) -> None: ... def _check_nargs(self) -> None: ... def _check_opt_strings(self, opts: Optional[_Text]) -> Any: ... def _check_type(self) -> None: ... def _set_attrs(self, attrs: Dict[_Text, Any]) -> None: ... def _set_opt_strings(self, opts: _Text) -> None: ... def check_value(self, opt: Any, value: Any) -> Any: ... def convert_value(self, opt: Any, value: Any) -> Any: ... def get_opt_string(self) -> _Text: ... def process(self, opt: Any, value: Any, values: Any, parser: OptionParser) -> int: ... def take_action(self, action: _Text, dest: _Text, opt: Any, value: Any, values: Any, parser: OptionParser) -> int: ... def takes_value(self) -> bool: ... make_option = Option class OptionContainer: _long_opt: Dict[_Text, Option] _short_opt: Dict[_Text, Option] conflict_handler: _Text defaults: Dict[_Text, Any] description: Any option_class: Any def __init__(self, option_class: Option, conflict_handler: Any, description: Any) -> None: ... def _check_conflict(self, option: Any) -> None: ... def _create_option_mappings(self) -> None: ... def _share_option_mappings(self, parser: OptionParser) -> None: ... def add_option(self, *args, **kwargs) -> Any: ... def add_options(self, option_list: Iterable[Option]) -> None: ... def destroy(self) -> None: ... def format_description(self, formatter: Optional[HelpFormatter]) -> Any: ... def format_help(self, formatter: Optional[HelpFormatter]) -> _Text: ... def format_option_help(self, formatter: Optional[HelpFormatter]) -> _Text: ... def get_description(self) -> Any: ... def get_option(self, opt_str: _Text) -> Optional[Option]: ... def has_option(self, opt_str: _Text) -> bool: ... def remove_option(self, opt_str: _Text) -> None: ... def set_conflict_handler(self, handler: Any) -> None: ... def set_description(self, description: Any) -> None: ... class OptionGroup(OptionContainer): option_list: List[Option] parser: OptionParser title: _Text def __init__(self, parser: OptionParser, title: _Text, description: Optional[_Text] = ...) -> None: ... def _create_option_list(self) -> None: ... def set_title(self, title: _Text) -> None: ... class Values: def __init__(self, defaults: Optional[Mapping[str, Any]] = ...) -> None: ... def _update(self, dict: Mapping[_Text, Any], mode: Any) -> None: ... def _update_careful(self, dict: Mapping[_Text, Any]) -> None: ... def _update_loose(self, dict: Mapping[_Text, Any]) -> None: ... def ensure_value(self, attr: _Text, value: Any) -> Any: ... def read_file(self, filename: _Text, mode: _Text) -> None: ... def read_module(self, modname: _Text, mode: _Text) -> None: ... def __getattr__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... class OptionParser(OptionContainer): allow_interspersed_args: bool epilog: Optional[_Text] formatter: HelpFormatter largs: Optional[List[_Text]] option_groups: List[OptionParser] option_list: List[Option] process_default_values: Any prog: Optional[_Text] rargs: Optional[List[Any]] standard_option_list: List[Option] usage: Optional[_Text] values: Optional[Values] version: _Text def __init__(self, usage: Optional[_Text] = ..., option_list: Iterable[Option] = ..., option_class: Option = ..., version: Optional[_Text] = ..., conflict_handler: _Text = ..., description: Optional[_Text] = ..., formatter: Optional[HelpFormatter] = ..., add_help_option: bool = ..., prog: Optional[_Text] = ..., epilog: Optional[_Text] = ...) -> None: ... def _add_help_option(self) -> None: ... def _add_version_option(self) -> None: ... def _create_option_list(self) -> None: ... def _get_all_options(self) -> List[Option]: ... def _get_args(self, args: Iterable[Any]) -> List[Any]: ... def _init_parsing_state(self) -> None: ... def _match_long_opt(self, opt: _Text) -> _Text: ... def _populate_option_list(self, option_list: Iterable[Option], add_help: bool = ...) -> None: ... def _process_args(self, largs: List[Any], rargs: List[Any], values: Values) -> None: ... def _process_long_opt(self, rargs: List[Any], values: Any) -> None: ... def _process_short_opts(self, rargs: List[Any], values: Any) -> None: ... def add_option_group(self, *args, **kwargs) -> OptionParser: ... def check_values(self, values: Values, args: List[_Text]) -> Tuple[Values, List[_Text]]: ... def disable_interspersed_args(self) -> None: ... def enable_interspersed_args(self) -> None: ... def error(self, msg: _Text) -> None: ... def exit(self, status: int = ..., msg: Optional[str] = ...) -> None: ... def expand_prog_name(self, s: Optional[_Text]) -> Any: ... def format_epilog(self, formatter: HelpFormatter) -> Any: ... def format_help(self, formatter: Optional[HelpFormatter] = ...) -> _Text: ... def format_option_help(self, formatter: Optional[HelpFormatter] = ...) -> _Text: ... def get_default_values(self) -> Values: ... def get_option_group(self, opt_str: _Text) -> Any: ... def get_prog_name(self) -> _Text: ... def get_usage(self) -> _Text: ... def get_version(self) -> _Text: ... def parse_args(self, args: Optional[Sequence[AnyStr]] = ..., values: Optional[Values] = ...) -> Tuple[Values, List[AnyStr]]: ... def print_usage(self, file: Optional[IO[str]] = ...) -> None: ... def print_help(self, file: Optional[IO[str]] = ...) -> None: ... def print_version(self, file: Optional[IO[str]] = ...) -> None: ... def set_default(self, dest: Any, value: Any) -> None: ... def set_defaults(self, **kwargs) -> None: ... def set_process_default_values(self, process: Any) -> None: ... def set_usage(self, usage: _Text) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/crypt.pyi0000664000175000017500000000121013577124116023542 0ustar davedave00000000000000import sys from typing import List, Optional, Union if sys.version_info >= (3, 3): class _Method: ... METHOD_CRYPT: _Method METHOD_MD5: _Method METHOD_SHA256: _Method METHOD_SHA512: _Method if sys.version_info >= (3, 7): METHOD_BLOWFISH: _Method methods: List[_Method] if sys.version_info >= (3, 7): def mksalt(method: Optional[_Method] = ..., *, rounds: Optional[int] = ...) -> str: ... else: def mksalt(method: Optional[_Method] = ...) -> str: ... def crypt(word: str, salt: Optional[Union[str, _Method]] = ...) -> str: ... else: def crypt(word: str, salt: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_heapq.pyi0000664000175000017500000000103513577124116023643 0ustar davedave00000000000000"""Stub file for the '_heapq' module.""" from typing import TypeVar, List, Iterable, Any, Callable, Optional import sys _T = TypeVar("_T") def heapify(heap: List[_T]) -> None: ... def heappop(heap: List[_T]) -> _T: ... def heappush(heap: List[_T], item: _T) -> None: ... def heappushpop(heap: List[_T], item: _T) -> _T: ... def heapreplace(heap: List[_T], item: _T) -> _T: ... if sys.version_info < (3,): def nlargest(n: int, iterable: Iterable[_T]) -> List[_T]: ... def nsmallest(n: int, iterable: Iterable[_T]) -> List[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/quopri.pyi0000664000175000017500000000057413577124116023734 0ustar davedave00000000000000# Stubs for quopri (Python 2 and 3) from typing import BinaryIO def encode(input: BinaryIO, output: BinaryIO, quotetabs: int, header: int = ...) -> None: ... def encodestring(s: bytes, quotetabs: int = ..., header: int = ...) -> bytes: ... def decode(input: BinaryIO, output: BinaryIO, header: int = ...) -> None: ... def decodestring(s: bytes, header: int = ...) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/turtle.pyi0000664000175000017500000004362013577124116023733 0ustar davedave00000000000000from typing import Tuple, overload, Optional, Union, Dict, Any, Sequence, TypeVar, List, Callable, Text import sys if sys.version_info >= (3,): from tkinter import Canvas, PhotoImage else: # TODO: Replace these aliases once we have Python 2 stubs for the Tkinter module. Canvas = Any PhotoImage = Any # Note: '_Color' is the alias we use for arguments and _AnyColor is the # alias we use for return types. Really, these two aliases should be the # same, but as per the "no union returns" typeshed policy, we'll return # Any instead. _Color = Union[Text, Tuple[float, float, float]] _AnyColor = Any # TODO: Replace this with a TypedDict once it becomes standardized. _PenState = Dict[str, Any] _Speed = Union[str, float] _PolygonCoords = Sequence[Tuple[float, float]] # TODO: Type this more accurately # Vec2D is actually a custom subclass of 'tuple'. Vec2D = Tuple[float, float] class TurtleScreenBase(object): cv: Canvas = ... canvwidth: int = ... canvheight: int = ... xscale: float = ... yscale: float = ... def __init__(self, cv: Canvas) -> None: ... if sys.version_info >= (3,): def mainloop(self) -> None: ... def textinput(self, title: str, prompt: str) -> Optional[str]: ... def numinput(self, title: str, prompt: str, default: Optional[float] = ..., minval: Optional[float] = ..., maxval: Optional[float] = ...) -> Optional[float]: ... class Terminator(Exception): ... class TurtleGraphicsError(Exception): ... class Shape(object): def __init__(self, type_: str, data: Union[_PolygonCoords, PhotoImage, None] = ...) -> None: ... def addcomponent(self, poly: _PolygonCoords, fill: _Color, outline: Optional[_Color] = ...) -> None: ... class TurtleScreen(TurtleScreenBase): def __init__(self, cv: Canvas, mode: str = ..., colormode: float = ..., delay: int = ...) -> None: ... def clear(self) -> None: ... @overload def mode(self) -> str: ... @overload def mode(self, mode: str) -> None: ... def setworldcoordinates(self, llx: float, lly: float, urx: float, ury: float) -> None: ... def register_shape(self, name: str, shape: Union[_PolygonCoords, Shape, None] = ...) -> None: ... @overload def colormode(self) -> float: ... @overload def colormode(self, cmode: float) -> None: ... def reset(self) -> None: ... def turtles(self) -> List[Turtle]: ... @overload def bgcolor(self) -> _AnyColor: ... @overload def bgcolor(self, color: _Color) -> None: ... @overload def bgcolor(self, r: float, g: float, b: float) -> None: ... @overload def tracer(self) -> int: ... @overload def tracer(self, n: int, delay: Optional[int] = ...) -> None: ... @overload def delay(self) -> int: ... @overload def delay(self, delay: int) -> None: ... def update(self) -> None: ... def window_width(self) -> int: ... def window_height(self) -> int: ... def getcanvas(self) -> Canvas: ... def getshapes(self) -> List[str]: ... def onclick(self, fun: Callable[[float, float], Any], btn: int = ..., add: Optional[Any] = ...) -> None: ... def onkey(self, fun: Callable[[], Any], key: str) -> None: ... def listen(self, xdummy: Optional[float] = ..., ydummy: Optional[float] = ...) -> None: ... def ontimer(self, fun: Callable[[], Any], t: int = ...) -> None: ... @overload def bgpic(self) -> str: ... @overload def bgpic(self, picname: str) -> None: ... @overload def screensize(self) -> Tuple[int, int]: ... @overload def screensize(self, canvwidth: int, canvheight: int, bg: Optional[_Color] = ...) -> None: ... onscreenclick = onclick resetscreen = reset clearscreen = clear addshape = register_shape if sys.version_info >= (3,): def onkeypress(self, fun: Callable[[], Any], key: Optional[str] = ...) -> None: ... onkeyrelease = onkey class TNavigator(object): START_ORIENTATION: Dict[str, Vec2D] = ... DEFAULT_MODE: str = ... DEFAULT_ANGLEOFFSET: int = ... DEFAULT_ANGLEORIENT: int = ... def __init__(self, mode: str = ...) -> None: ... def reset(self) -> None: ... def degrees(self, fullcircle: float = ...) -> None: ... def radians(self) -> None: ... def forward(self, distance: float) -> None: ... def back(self, distance: float) -> None: ... def right(self, angle: float) -> None: ... def left(self, angle: float) -> None: ... def pos(self) -> Vec2D: ... def xcor(self) -> float: ... def ycor(self) -> float: ... @overload def goto(self, x: Tuple[float, float]) -> None: ... @overload def goto(self, x: float, y: float) -> None: ... def home(self) -> None: ... def setx(self, x: float) -> None: ... def sety(self, y: float) -> None: ... @overload def distance(self, x: Union[TNavigator, Tuple[float, float]]) -> float: ... @overload def distance(self, x: float, y: float) -> float: ... @overload def towards(self, x: Union[TNavigator, Tuple[float, float]]) -> float: ... @overload def towards(self, x: float, y: float) -> float: ... def heading(self) -> float: ... def setheading(self, to_angle: float) -> None: ... def circle(self, radius: float, extent: Optional[float] = ..., steps: Optional[int] = ...) -> None: ... fd = forward bk = back backward = back rt = right lt = left position = pos setpos = goto setposition = goto seth = setheading class TPen(object): def __init__(self, resizemode: str = ...) -> None: ... @overload def resizemode(self) -> str: ... @overload def resizemode(self, rmode: str) -> None: ... @overload def pensize(self) -> int: ... @overload def pensize(self, width: int) -> None: ... def penup(self) -> None: ... def pendown(self) -> None: ... def isdown(self) -> bool: ... @overload def speed(self) -> int: ... @overload def speed(self, speed: _Speed) -> None: ... @overload def pencolor(self) -> _AnyColor: ... @overload def pencolor(self, color: _Color) -> None: ... @overload def pencolor(self, r: float, g: float, b: float) -> None: ... @overload def fillcolor(self) -> _AnyColor: ... @overload def fillcolor(self, color: _Color) -> None: ... @overload def fillcolor(self, r: float, g: float, b: float) -> None: ... @overload def color(self) -> Tuple[_AnyColor, _AnyColor]: ... @overload def color(self, color: _Color) -> None: ... @overload def color(self, r: float, g: float, b: float) -> None: ... @overload def color(self, color1: _Color, color2: _Color) -> None: ... def showturtle(self) -> None: ... def hideturtle(self) -> None: ... def isvisible(self) -> bool: ... # Note: signatures 1 and 2 overlap unsafely when no arguments are provided @overload def pen(self) -> _PenState: ... # type: ignore @overload def pen(self, pen: Optional[_PenState] = ..., *, shown: bool = ..., pendown: bool = ..., pencolor: _Color = ..., fillcolor: _Color = ..., pensize: int = ..., speed: int = ..., resizemode: str = ..., stretchfactor: Tuple[float, float] = ..., outline: int = ..., tilt: float = ...) -> None: ... width = pensize up = penup pu = penup pd = pendown down = pendown st = showturtle ht = hideturtle _T = TypeVar('_T') class RawTurtle(TPen, TNavigator): def __init__(self, canvas: Union[Canvas, TurtleScreen, None] = ..., shape: str = ..., undobuffersize: int = ..., visible: bool = ...) -> None: ... def reset(self) -> None: ... def setundobuffer(self, size: Optional[int]) -> None: ... def undobufferentries(self) -> int: ... def clear(self) -> None: ... def clone(self: _T) -> _T: ... @overload def shape(self) -> str: ... @overload def shape(self, name: str) -> None: ... # Unsafely overlaps when no arguments are provided @overload def shapesize(self) -> Tuple[float, float, float]: ... # type: ignore @overload def shapesize(self, stretch_wid: Optional[float] = ..., stretch_len: Optional[float] = ..., outline: Optional[float] = ...) -> None: ... if sys.version_info >= (3,): @overload def shearfactor(self) -> float: ... @overload def shearfactor(self, shear: float) -> None: ... # Unsafely overlaps when no arguments are provided @overload def shapetransform(self) -> Tuple[float, float, float, float]: ... # type: ignore @overload def shapetransform(self, t11: Optional[float] = ..., t12: Optional[float] = ..., t21: Optional[float] = ..., t22: Optional[float] = ...) -> None: ... def get_shapepoly(self) -> Optional[_PolygonCoords]: ... def settiltangle(self, angle: float) -> None: ... @overload def tiltangle(self) -> float: ... @overload def tiltangle(self, angle: float) -> None: ... def tilt(self, angle: float) -> None: ... # Can return either 'int' or Tuple[int, ...] based on if the stamp is # a compound stamp or not. So, as per the "no Union return" policy, # we return Any. def stamp(self) -> Any: ... def clearstamp(self, stampid: Union[int, Tuple[int, ...]]) -> None: ... def clearstamps(self, n: Optional[int] = ...) -> None: ... def filling(self) -> bool: ... def begin_fill(self) -> None: ... def end_fill(self) -> None: ... def dot(self, size: Optional[int] = ..., *color: _Color) -> None: ... def write(self, arg: object, move: bool = ..., align: str = ..., font: Tuple[str, int, str] = ...) -> None: ... def begin_poly(self) -> None: ... def end_poly(self) -> None: ... def get_poly(self) -> Optional[_PolygonCoords]: ... def getscreen(self) -> TurtleScreen: ... def getturtle(self: _T) -> _T: ... getpen = getturtle def onclick(self, fun: Callable[[float, float], Any], btn: int = ..., add: Optional[bool] = ...) -> None: ... def onrelease(self, fun: Callable[[float, float], Any], btn: int = ..., add: Optional[bool] = ...) -> None: ... def ondrag(self, fun: Callable[[float, float], Any], btn: int = ..., add: Optional[bool] = ...) -> None: ... def undo(self) -> None: ... turtlesize = shapesize class _Screen(TurtleScreen): def __init__(self) -> None: ... def setup(self, width: int = ..., height: int = ..., startx: int = ..., starty: int = ...) -> None: ... def title(self, titlestring: str) -> None: ... def bye(self) -> None: ... def exitonclick(self) -> None: ... def Screen() -> _Screen: ... class Turtle(RawTurtle): def __init__(self, shape: str = ..., undobuffersize: int = ..., visible: bool = ...) -> None: ... RawPen = RawTurtle Pen = Turtle def write_docstringdict(filename: str) -> None: ... # Note: it's somewhat unfortunate that we have to copy the function signatures. # It would be nice if we could partially reduce the redundancy by doing something # like the following: # # _screen: Screen # clear = _screen.clear # # However, it seems pytype does not support this type of syntax in pyi files. # Functions copied from TurtleScreenBase: # Note: mainloop() was always present in the global scope, but was added to # TurtleScreenBase in Python 3.0 def mainloop() -> None: ... if sys.version_info >= (3,): def textinput(title: str, prompt: str) -> Optional[str]: ... def numinput(title: str, prompt: str, default: Optional[float] = ..., minval: Optional[float] = ..., maxval: Optional[float] = ...) -> Optional[float]: ... # Functions copied from TurtleScreen: def clear() -> None: ... @overload def mode() -> str: ... @overload def mode(mode: str) -> None: ... def setworldcoordinates(llx: float, lly: float, urx: float, ury: float) -> None: ... def register_shape(name: str, shape: Union[_PolygonCoords, Shape, None] = ...) -> None: ... @overload def colormode() -> float: ... @overload def colormode(cmode: float) -> None: ... def reset() -> None: ... def turtles() -> List[Turtle]: ... @overload def bgcolor() -> _AnyColor: ... @overload def bgcolor(color: _Color) -> None: ... @overload def bgcolor(r: float, g: float, b: float) -> None: ... @overload def tracer() -> int: ... @overload def tracer(n: int, delay: Optional[int] = ...) -> None: ... @overload def delay() -> int: ... @overload def delay(delay: int) -> None: ... def update() -> None: ... def window_width() -> int: ... def window_height() -> int: ... def getcanvas() -> Canvas: ... def getshapes() -> List[str]: ... def onclick(fun: Callable[[float, float], Any], btn: int = ..., add: Optional[Any] = ...) -> None: ... def onkey(fun: Callable[[], Any], key: str) -> None: ... def listen(xdummy: Optional[float] = ..., ydummy: Optional[float] = ...) -> None: ... def ontimer(fun: Callable[[], Any], t: int = ...) -> None: ... @overload def bgpic() -> str: ... @overload def bgpic(picname: str) -> None: ... @overload def screensize() -> Tuple[int, int]: ... @overload def screensize(canvwidth: int, canvheight: int, bg: Optional[_Color] = ...) -> None: ... onscreenclick = onclick resetscreen = reset clearscreen = clear addshape = register_shape if sys.version_info >= (3,): def onkeypress(fun: Callable[[], Any], key: Optional[str] = ...) -> None: ... onkeyrelease = onkey # Functions copied from TNavigator: def degrees(fullcircle: float = ...) -> None: ... def radians() -> None: ... def forward(distance: float) -> None: ... def back(distance: float) -> None: ... def right(angle: float) -> None: ... def left(angle: float) -> None: ... def pos() -> Vec2D: ... def xcor() -> float: ... def ycor() -> float: ... @overload def goto(x: Tuple[float, float]) -> None: ... @overload def goto(x: float, y: float) -> None: ... def home() -> None: ... def setx(x: float) -> None: ... def sety(y: float) -> None: ... @overload def distance(x: Union[TNavigator, Tuple[float, float]]) -> float: ... @overload def distance(x: float, y: float) -> float: ... @overload def towards(x: Union[TNavigator, Tuple[float, float]]) -> float: ... @overload def towards(x: float, y: float) -> float: ... def heading() -> float: ... def setheading(to_angle: float) -> None: ... def circle(radius: float, extent: Optional[float] = ..., steps: Optional[int] = ...) -> None: ... fd = forward bk = back backward = back rt = right lt = left position = pos setpos = goto setposition = goto seth = setheading # Functions copied from TPen: @overload def resizemode() -> str: ... @overload def resizemode(rmode: str) -> None: ... @overload def pensize() -> int: ... @overload def pensize(width: int) -> None: ... def penup() -> None: ... def pendown() -> None: ... def isdown() -> bool: ... @overload def speed() -> int: ... @overload def speed(speed: _Speed) -> None: ... @overload def pencolor() -> _AnyColor: ... @overload def pencolor(color: _Color) -> None: ... @overload def pencolor(r: float, g: float, b: float) -> None: ... @overload def fillcolor() -> _AnyColor: ... @overload def fillcolor(color: _Color) -> None: ... @overload def fillcolor(r: float, g: float, b: float) -> None: ... @overload def color() -> Tuple[_AnyColor, _AnyColor]: ... @overload def color(color: _Color) -> None: ... @overload def color(r: float, g: float, b: float) -> None: ... @overload def color(color1: _Color, color2: _Color) -> None: ... def showturtle() -> None: ... def hideturtle() -> None: ... def isvisible() -> bool: ... # Note: signatures 1 and 2 overlap unsafely when no arguments are provided @overload def pen() -> _PenState: ... # type: ignore @overload def pen(pen: Optional[_PenState] = ..., *, shown: bool = ..., pendown: bool = ..., pencolor: _Color = ..., fillcolor: _Color = ..., pensize: int = ..., speed: int = ..., resizemode: str = ..., stretchfactor: Tuple[float, float] = ..., outline: int = ..., tilt: float = ...) -> None: ... width = pensize up = penup pu = penup pd = pendown down = pendown st = showturtle ht = hideturtle # Functions copied from RawTurtle: def setundobuffer(size: Optional[int]) -> None: ... def undobufferentries() -> int: ... @overload def shape() -> str: ... @overload def shape(name: str) -> None: ... # Unsafely overlaps when no arguments are provided @overload def shapesize() -> Tuple[float, float, float]: ... # type: ignore @overload def shapesize(stretch_wid: Optional[float] = ..., stretch_len: Optional[float] = ..., outline: Optional[float] = ...) -> None: ... if sys.version_info >= (3,): @overload def shearfactor() -> float: ... @overload def shearfactor(shear: float) -> None: ... # Unsafely overlaps when no arguments are provided @overload def shapetransform() -> Tuple[float, float, float, float]: ... # type: ignore @overload def shapetransform(t11: Optional[float] = ..., t12: Optional[float] = ..., t21: Optional[float] = ..., t22: Optional[float] = ...) -> None: ... def get_shapepoly() -> Optional[_PolygonCoords]: ... def settiltangle(angle: float) -> None: ... @overload def tiltangle() -> float: ... @overload def tiltangle(angle: float) -> None: ... def tilt(angle: float) -> None: ... # Can return either 'int' or Tuple[int, ...] based on if the stamp is # a compound stamp or not. So, as per the "no Union return" policy, # we return Any. def stamp() -> Any: ... def clearstamp(stampid: Union[int, Tuple[int, ...]]) -> None: ... def clearstamps(n: Optional[int] = ...) -> None: ... def filling() -> bool: ... def begin_fill() -> None: ... def end_fill() -> None: ... def dot(size: Optional[int] = ..., *color: _Color) -> None: ... def write(arg: object, move: bool = ..., align: str = ..., font: Tuple[str, int, str] = ...) -> None: ... def begin_poly() -> None: ... def end_poly() -> None: ... def get_poly() -> Optional[_PolygonCoords]: ... def getscreen() -> TurtleScreen: ... def getturtle() -> Turtle: ... getpen = getturtle def onrelease(fun: Callable[[float, float], Any], btn: int = ..., add: Optional[Any] = ...) -> None: ... def ondrag(fun: Callable[[float, float], Any], btn: int = ..., add: Optional[Any] = ...) -> None: ... def undo() -> None: ... turtlesize = shapesize # Functions copied from RawTurtle with a few tweaks: def clone() -> Turtle: ... # Extra functions present only in the global scope: done = mainloop jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/0000775000175000017500000000000013577125145023145 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/__init__.pyi0000664000175000017500000000004113577124116025417 0ustar davedave00000000000000# Stubs for lib2to3 (Python 3.6) jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pygram.pyi0000664000175000017500000000434013577124116025165 0ustar davedave00000000000000# Stubs for lib2to3.pygram (Python 3.6) from typing import Any from lib2to3.pgen2.grammar import Grammar class Symbols: def __init__(self, grammar: Grammar) -> None: ... class python_symbols(Symbols): and_expr: int and_test: int annassign: int arglist: int argument: int arith_expr: int assert_stmt: int async_funcdef: int async_stmt: int atom: int augassign: int break_stmt: int classdef: int comp_for: int comp_if: int comp_iter: int comp_op: int comparison: int compound_stmt: int continue_stmt: int decorated: int decorator: int decorators: int del_stmt: int dictsetmaker: int dotted_as_name: int dotted_as_names: int dotted_name: int encoding_decl: int eval_input: int except_clause: int exec_stmt: int expr: int expr_stmt: int exprlist: int factor: int file_input: int flow_stmt: int for_stmt: int funcdef: int global_stmt: int if_stmt: int import_as_name: int import_as_names: int import_from: int import_name: int import_stmt: int lambdef: int listmaker: int not_test: int old_lambdef: int old_test: int or_test: int parameters: int pass_stmt: int power: int print_stmt: int raise_stmt: int return_stmt: int shift_expr: int simple_stmt: int single_input: int sliceop: int small_stmt: int star_expr: int stmt: int subscript: int subscriptlist: int suite: int term: int test: int testlist: int testlist1: int testlist_gexp: int testlist_safe: int testlist_star_expr: int tfpdef: int tfplist: int tname: int trailer: int try_stmt: int typedargslist: int varargslist: int vfpdef: int vfplist: int vname: int while_stmt: int with_item: int with_stmt: int with_var: int xor_expr: int yield_arg: int yield_expr: int yield_stmt: int class pattern_symbols(Symbols): Alternative: int Alternatives: int Details: int Matcher: int NegatedUnit: int Repeater: int Unit: int python_grammar: Grammar python_grammar_no_print_statement: Grammar pattern_grammar: Grammar jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/0000775000175000017500000000000013577125145024160 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/__init__.pyi0000664000175000017500000000027013577124116026436 0ustar davedave00000000000000# Stubs for lib2to3.pgen2 (Python 3.6) import os import sys from typing import Text, Union if sys.version_info >= (3, 6): _Path = Union[Text, os.PathLike] else: _Path = Text jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/parse.pyi0000664000175000017500000000221013577124116026005 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.parse (Python 3.6) from typing import Any, Dict, List, Optional, Sequence, Set, Text, Tuple from lib2to3.pgen2.grammar import Grammar, _DFAS from lib2to3.pytree import _NL, _Convert, _RawNode _Context = Sequence[Any] class ParseError(Exception): msg: Text type: int value: Optional[Text] context: _Context def __init__(self, msg: Text, type: int, value: Optional[Text], context: _Context) -> None: ... class Parser: grammar: Grammar convert: _Convert stack: List[Tuple[_DFAS, int, _RawNode]] rootnode: Optional[_NL] used_names: Set[Text] def __init__(self, grammar: Grammar, convert: Optional[_Convert] = ...) -> None: ... def setup(self, start: Optional[int] = ...) -> None: ... def addtoken(self, type: int, value: Optional[Text], context: _Context) -> bool: ... def classify(self, type: int, value: Optional[Text], context: _Context) -> int: ... def shift(self, type: int, value: Optional[Text], newstate: int, context: _Context) -> None: ... def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ... def pop(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/literals.pyi0000664000175000017500000000033513577124116026520 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.literals (Python 3.6) from typing import Dict, Match, Text simple_escapes: Dict[Text, Text] def escape(m: Match[str]) -> Text: ... def evalString(s: Text) -> Text: ... def test() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/driver.pyi0000664000175000017500000000203213577124116026170 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.driver (Python 3.6) import os import sys from typing import Any, Callable, IO, Iterable, List, Optional, Text, Tuple, Union from logging import Logger from lib2to3.pytree import _Convert, _NL from lib2to3.pgen2 import _Path from lib2to3.pgen2.grammar import Grammar class Driver: grammar: Grammar logger: Logger convert: _Convert def __init__(self, grammar: Grammar, convert: Optional[_Convert] = ..., logger: Optional[Logger] = ...) -> None: ... def parse_tokens(self, tokens: Iterable[Any], debug: bool = ...) -> _NL: ... def parse_stream_raw(self, stream: IO[Text], debug: bool = ...) -> _NL: ... def parse_stream(self, stream: IO[Text], debug: bool = ...) -> _NL: ... def parse_file(self, filename: _Path, encoding: Optional[Text] = ..., debug: bool = ...) -> _NL: ... def parse_string(self, text: Text, debug: bool = ...) -> _NL: ... def load_grammar(gt: Text = ..., gp: Optional[Text] = ..., save: bool = ..., force: bool = ..., logger: Optional[Logger] = ...) -> Grammar: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/token.pyi0000664000175000017500000000212713577124116026022 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.token (Python 3.6) import sys from typing import Dict, Text ENDMARKER: int NAME: int NUMBER: int STRING: int NEWLINE: int INDENT: int DEDENT: int LPAR: int RPAR: int LSQB: int RSQB: int COLON: int COMMA: int SEMI: int PLUS: int MINUS: int STAR: int SLASH: int VBAR: int AMPER: int LESS: int GREATER: int EQUAL: int DOT: int PERCENT: int BACKQUOTE: int LBRACE: int RBRACE: int EQEQUAL: int NOTEQUAL: int LESSEQUAL: int GREATEREQUAL: int TILDE: int CIRCUMFLEX: int LEFTSHIFT: int RIGHTSHIFT: int DOUBLESTAR: int PLUSEQUAL: int MINEQUAL: int STAREQUAL: int SLASHEQUAL: int PERCENTEQUAL: int AMPEREQUAL: int VBAREQUAL: int CIRCUMFLEXEQUAL: int LEFTSHIFTEQUAL: int RIGHTSHIFTEQUAL: int DOUBLESTAREQUAL: int DOUBLESLASH: int DOUBLESLASHEQUAL: int OP: int COMMENT: int NL: int if sys.version_info >= (3,): RARROW: int if sys.version_info >= (3, 5): AT: int ATEQUAL: int AWAIT: int ASYNC: int ERRORTOKEN: int N_TOKENS: int NT_OFFSET: int tok_name: Dict[int, Text] def ISTERMINAL(x: int) -> bool: ... def ISNONTERMINAL(x: int) -> bool: ... def ISEOF(x: int) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/grammar.pyi0000664000175000017500000000142113577124116026324 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.grammar (Python 3.6) from lib2to3.pgen2 import _Path from typing import Any, Dict, List, Optional, Text, Tuple, TypeVar _P = TypeVar('_P') _Label = Tuple[int, Optional[Text]] _DFA = List[List[Tuple[int, int]]] _DFAS = Tuple[_DFA, Dict[int, int]] class Grammar: symbol2number: Dict[Text, int] number2symbol: Dict[int, Text] states: List[_DFA] dfas: Dict[int, _DFAS] labels: List[_Label] keywords: Dict[Text, int] tokens: Dict[int, int] symbol2label: Dict[Text, int] start: int def __init__(self) -> None: ... def dump(self, filename: _Path) -> None: ... def load(self, filename: _Path) -> None: ... def copy(self: _P) -> _P: ... def report(self) -> None: ... opmap_raw: Text opmap: Dict[Text, Text] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/tokenize.pyi0000664000175000017500000000173413577124116026535 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.tokenize (Python 3.6) # NOTE: Only elements from __all__ are present. from typing import Callable, Iterable, Iterator, List, Text, Tuple from lib2to3.pgen2.token import * # noqa _Coord = Tuple[int, int] _TokenEater = Callable[[int, Text, _Coord, _Coord, Text], None] _TokenInfo = Tuple[int, Text, _Coord, _Coord, Text] class TokenError(Exception): ... class StopTokenizing(Exception): ... def tokenize(readline: Callable[[], Text], tokeneater: _TokenEater = ...) -> None: ... class Untokenizer: tokens: List[Text] prev_row: int prev_col: int def __init__(self) -> None: ... def add_whitespace(self, start: _Coord) -> None: ... def untokenize(self, iterable: Iterable[_TokenInfo]) -> Text: ... def compat(self, token: Tuple[int, Text], iterable: Iterable[_TokenInfo]) -> None: ... def untokenize(iterable: Iterable[_TokenInfo]) -> Text: ... def generate_tokens( readline: Callable[[], Text] ) -> Iterator[_TokenInfo]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pgen2/pgen.pyi0000664000175000017500000000416513577124116025637 0ustar davedave00000000000000# Stubs for lib2to3.pgen2.pgen (Python 3.6) from typing import ( Any, Dict, IO, Iterable, Iterator, List, NoReturn, Optional, Text, Tuple ) from lib2to3.pgen2 import _Path, grammar from lib2to3.pgen2.tokenize import _TokenInfo class PgenGrammar(grammar.Grammar): ... class ParserGenerator: filename: _Path stream: IO[Text] generator: Iterator[_TokenInfo] first: Dict[Text, Dict[Text, int]] def __init__(self, filename: _Path, stream: Optional[IO[Text]] = ...) -> None: ... def make_grammar(self) -> PgenGrammar: ... def make_first(self, c: PgenGrammar, name: Text) -> Dict[int, int]: ... def make_label(self, c: PgenGrammar, label: Text) -> int: ... def addfirstsets(self) -> None: ... def calcfirst(self, name: Text) -> None: ... def parse(self) -> Tuple[Dict[Text, List[DFAState]], Text]: ... def make_dfa(self, start: NFAState, finish: NFAState) -> List[DFAState]: ... def dump_nfa(self, name: Text, start: NFAState, finish: NFAState) -> List[DFAState]: ... def dump_dfa(self, name: Text, dfa: Iterable[DFAState]) -> None: ... def simplify_dfa(self, dfa: List[DFAState]) -> None: ... def parse_rhs(self) -> Tuple[NFAState, NFAState]: ... def parse_alt(self) -> Tuple[NFAState, NFAState]: ... def parse_item(self) -> Tuple[NFAState, NFAState]: ... def parse_atom(self) -> Tuple[NFAState, NFAState]: ... def expect(self, type: int, value: Optional[Any] = ...) -> Text: ... def gettoken(self) -> None: ... def raise_error(self, msg: str, *args: Any) -> NoReturn: ... class NFAState: arcs: List[Tuple[Optional[Text], NFAState]] def __init__(self) -> None: ... def addarc(self, next: NFAState, label: Optional[Text] = ...) -> None: ... class DFAState: nfaset: Dict[NFAState, Any] isfinal: bool arcs: Dict[Text, DFAState] def __init__(self, nfaset: Dict[NFAState, Any], final: NFAState) -> None: ... def addarc(self, next: DFAState, label: Text) -> None: ... def unifystate(self, old: DFAState, new: DFAState) -> None: ... def __eq__(self, other: Any) -> bool: ... def generate_grammar(filename: _Path = ...) -> PgenGrammar: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/lib2to3/pytree.pyi0000664000175000017500000000626613577124116025207 0ustar davedave00000000000000# Stubs for lib2to3.pytree (Python 3.6) import sys from typing import Any, Callable, Dict, Iterator, List, Optional, Text, Tuple, TypeVar, Union from lib2to3.pgen2.grammar import Grammar _P = TypeVar('_P') _NL = Union[Node, Leaf] _Context = Tuple[Text, int, int] _Results = Dict[Text, _NL] _RawNode = Tuple[int, Text, _Context, Optional[List[_NL]]] _Convert = Callable[[Grammar, _RawNode], Any] HUGE: int def type_repr(type_num: int) -> Text: ... class Base: type: int parent: Optional[Node] prefix: Text children: List[_NL] was_changed: bool was_checked: bool def __eq__(self, other: Any) -> bool: ... def _eq(self: _P, other: _P) -> bool: ... def clone(self: _P) -> _P: ... def post_order(self) -> Iterator[_NL]: ... def pre_order(self) -> Iterator[_NL]: ... def replace(self, new: Union[_NL, List[_NL]]) -> None: ... def get_lineno(self) -> int: ... def changed(self) -> None: ... def remove(self) -> Optional[int]: ... @property def next_sibling(self) -> Optional[_NL]: ... @property def prev_sibling(self) -> Optional[_NL]: ... def leaves(self) -> Iterator[Leaf]: ... def depth(self) -> int: ... def get_suffix(self) -> Text: ... if sys.version_info < (3,): def get_prefix(self) -> Text: ... def set_prefix(self, prefix: Text) -> None: ... class Node(Base): fixers_applied: List[Any] def __init__(self, type: int, children: List[_NL], context: Optional[Any] = ..., prefix: Optional[Text] = ..., fixers_applied: Optional[List[Any]] = ...) -> None: ... def set_child(self, i: int, child: _NL) -> None: ... def insert_child(self, i: int, child: _NL) -> None: ... def append_child(self, child: _NL) -> None: ... class Leaf(Base): lineno: int column: int value: Text fixers_applied: List[Any] def __init__(self, type: int, value: Text, context: Optional[_Context] = ..., prefix: Optional[Text] = ..., fixers_applied: List[Any] = ...) -> None: ... def convert(gr: Grammar, raw_node: _RawNode) -> _NL: ... class BasePattern: type: int content: Optional[Text] name: Optional[Text] def optimize(self) -> BasePattern: ... # sic, subclasses are free to optimize themselves into different patterns def match(self, node: _NL, results: Optional[_Results] = ...) -> bool: ... def match_seq(self, nodes: List[_NL], results: Optional[_Results] = ...) -> bool: ... def generate_matches(self, nodes: List[_NL]) -> Iterator[Tuple[int, _Results]]: ... class LeafPattern(BasePattern): def __init__(self, type: Optional[int] = ..., content: Optional[Text] = ..., name: Optional[Text] = ...) -> None: ... class NodePattern(BasePattern): wildcards: bool def __init__(self, type: Optional[int] = ..., content: Optional[Text] = ..., name: Optional[Text] = ...) -> None: ... class WildcardPattern(BasePattern): min: int max: int def __init__(self, content: Optional[Text] = ..., min: int = ..., max: int = ..., name: Optional[Text] = ...) -> None: ... class NegatedPattern(BasePattern): def __init__(self, content: Optional[Text] = ...) -> None: ... def generate_matches(patterns: List[BasePattern], nodes: List[_NL]) -> Iterator[Tuple[int, _Results]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/fractions.pyi0000664000175000017500000000631413577124116024403 0ustar davedave00000000000000# Stubs for fractions # See https://docs.python.org/3/library/fractions.html # # Note: these stubs are incomplete. The more complex type # signatures are currently omitted. Also see numbers.pyi. from typing import Optional, TypeVar, Union, overload, Any, Tuple from numbers import Real, Integral, Rational from decimal import Decimal import sys _ComparableNum = Union[int, float, Decimal, Real] @overload def gcd(a: int, b: int) -> int: ... @overload def gcd(a: Integral, b: int) -> Integral: ... @overload def gcd(a: int, b: Integral) -> Integral: ... @overload def gcd(a: Integral, b: Integral) -> Integral: ... class Fraction(Rational): @overload def __init__(self, numerator: Union[int, Rational] = ..., denominator: Optional[Union[int, Rational]] = ..., *, _normalize: bool = ...) -> None: ... @overload def __init__(self, value: float, *, _normalize: bool = ...) -> None: ... @overload def __init__(self, value: Decimal, *, _normalize: bool = ...) -> None: ... @overload def __init__(self, value: str, *, _normalize: bool = ...) -> None: ... @classmethod def from_float(cls, f: float) -> Fraction: ... @classmethod def from_decimal(cls, dec: Decimal) -> Fraction: ... def limit_denominator(self, max_denominator: int = ...) -> Fraction: ... if sys.version_info >= (3, 8): def as_integer_ratio(self) -> Tuple[int, int]: ... @property def numerator(self) -> int: ... @property def denominator(self) -> int: ... def __add__(self, other): ... def __radd__(self, other): ... def __sub__(self, other): ... def __rsub__(self, other): ... def __mul__(self, other): ... def __rmul__(self, other): ... def __truediv__(self, other): ... def __rtruediv__(self, other): ... if sys.version_info < (3, 0): def __div__(self, other): ... def __rdiv__(self, other): ... def __floordiv__(self, other) -> int: ... def __rfloordiv__(self, other) -> int: ... def __mod__(self, other): ... def __rmod__(self, other): ... def __divmod__(self, other): ... def __rdivmod__(self, other): ... def __pow__(self, other): ... def __rpow__(self, other): ... def __pos__(self) -> Fraction: ... def __neg__(self) -> Fraction: ... def __abs__(self) -> Fraction: ... def __trunc__(self) -> int: ... if sys.version_info >= (3, 0): def __floor__(self) -> int: ... def __ceil__(self) -> int: ... def __round__(self, ndigits: Optional[Any] = ...): ... def __hash__(self) -> int: ... def __eq__(self, other: object) -> bool: ... def __lt__(self, other: _ComparableNum) -> bool: ... def __gt__(self, other: _ComparableNum) -> bool: ... def __le__(self, other: _ComparableNum) -> bool: ... def __ge__(self, other: _ComparableNum) -> bool: ... if sys.version_info >= (3, 0): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... # Not actually defined within fractions.py, but provides more useful # overrides @property def real(self) -> Fraction: ... @property def imag(self) -> Fraction: ... def conjugate(self) -> Fraction: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/audioop.pyi0000664000175000017500000000370713577124116024056 0ustar davedave00000000000000from typing import Any, Optional, Tuple AdpcmState = Tuple[int, int] RatecvState = Tuple[int, Tuple[Tuple[int, int], ...]] class error(Exception): ... def add(fragment1: bytes, fragment2: bytes, width: int) -> bytes: ... def adpcm2lin(adpcmfragment: bytes, width: int, state: Optional[AdpcmState]) -> Tuple[bytes, AdpcmState]: ... def alaw2lin(fragment: bytes, width: int) -> bytes: ... def avg(fragment: bytes, width: int) -> int: ... def avgpp(fragment: bytes, width: int) -> int: ... def bias(fragment: bytes, width: int, bias: int) -> bytes: ... def byteswap(fragment: bytes, width: int) -> bytes: ... def cross(fragment: bytes, width: int) -> int: ... def findfactor(fragment: bytes, reference: bytes) -> float: ... def findfit(fragment: bytes, reference: bytes) -> Tuple[int, float]: ... def findmax(fragment: bytes, length: int) -> int: ... def getsample(fragment: bytes, width: int, index: int) -> int: ... def lin2adpcm(fragment: bytes, width: int, state: Optional[AdpcmState]) -> Tuple[bytes, AdpcmState]: ... def lin2alaw(fragment: bytes, width: int) -> bytes: ... def lin2lin(fragment: bytes, width: int, newwidth: int) -> bytes: ... def lin2ulaw(fragment: bytes, width: int) -> bytes: ... def max(fragment: bytes, width: int) -> int: ... def maxpp(fragment: bytes, width: int) -> int: ... def minmax(fragment: bytes, width: int) -> Tuple[int, int]: ... def mul(fragment: bytes, width: int, factor: float) -> bytes: ... def ratecv( fragment: bytes, width: int, nchannels: int, inrate: int, outrate: int, state: Optional[RatecvState], weightA: int = ..., weightB: int = ..., ) -> Tuple[bytes, RatecvState]: ... def reverse(fragment: bytes, width: int) -> bytes: ... def rms(fragment: bytes, width: int) -> int: ... def tomono(fragment: bytes, width: int, lfactor: float, rfactor: float) -> bytes: ... def tostereo(fragment: bytes, width: int, lfactor: float, rfactor: float) -> bytes: ... def ulaw2lin(fragment: bytes, width: int) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_codecs.pyi0000664000175000017500000001163213577124116024011 0ustar davedave00000000000000"""Stub file for the '_codecs' module.""" import sys from typing import Any, Callable, Tuple, Optional, Dict, Text, Union import codecs # For convenience: _Handler = Callable[[Exception], Tuple[Text, int]] _String = Union[bytes, str] _Errors = Union[str, Text, None] if sys.version_info < (3, 0): _Decodable = Union[bytes, Text] _Encodable = Union[bytes, Text] else: _Decodable = bytes _Encodable = str # This type is not exposed; it is defined in unicodeobject.c class _EncodingMap(object): def size(self) -> int: ... _MapT = Union[Dict[int, int], _EncodingMap] def register(search_function: Callable[[str], Any]) -> None: ... def register_error(errors: Union[str, Text], handler: _Handler) -> None: ... def lookup(encoding: Union[str, Text]) -> codecs.CodecInfo: ... def lookup_error(name: Union[str, Text]) -> _Handler: ... def decode(obj: Any, encoding: Union[str, Text] = ..., errors: _Errors = ...) -> Any: ... def encode(obj: Any, encoding: Union[str, Text] = ..., errors: _Errors = ...) -> Any: ... def charmap_build(map: Text) -> _MapT: ... def ascii_decode(data: _Decodable, errors: _Errors = ...) -> Tuple[Text, int]: ... def ascii_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def charbuffer_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def charmap_decode(data: _Decodable, errors: _Errors = ..., mapping: Optional[_MapT] = ...) -> Tuple[Text, int]: ... def charmap_encode(data: _Encodable, errors: _Errors, mapping: Optional[_MapT] = ...) -> Tuple[bytes, int]: ... def escape_decode(data: _String, errors: _Errors = ...) -> Tuple[str, int]: ... def escape_encode(data: bytes, errors: _Errors = ...) -> Tuple[bytes, int]: ... def latin_1_decode(data: _Decodable, errors: _Errors = ...) -> Tuple[Text, int]: ... def latin_1_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def raw_unicode_escape_decode(data: _String, errors: _Errors = ...) -> Tuple[Text, int]: ... def raw_unicode_escape_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def readbuffer_encode(data: _String, errors: _Errors = ...) -> Tuple[bytes, int]: ... def unicode_escape_decode(data: _String, errors: _Errors = ...) -> Tuple[Text, int]: ... def unicode_escape_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... if sys.version_info < (3, 8): def unicode_internal_decode(data: _String, errors: _Errors = ...) -> Tuple[Text, int]: ... def unicode_internal_encode(data: _String, errors: _Errors = ...) -> Tuple[bytes, int]: ... def utf_16_be_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_16_be_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def utf_16_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_16_encode(data: _Encodable, errors: _Errors = ..., byteorder: int = ...) -> Tuple[bytes, int]: ... def utf_16_ex_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int, int]: ... def utf_16_le_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_16_le_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def utf_32_be_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_32_be_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def utf_32_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_32_encode(data: _Encodable, errors: _Errors = ..., byteorder: int = ...) -> Tuple[bytes, int]: ... def utf_32_ex_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int, int]: ... def utf_32_le_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_32_le_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def utf_7_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_7_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... def utf_8_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def utf_8_encode(data: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... if sys.platform == 'win32': def mbcs_decode(data: _Decodable, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def mbcs_encode(str: _Encodable, errors: _Errors = ...) -> Tuple[bytes, int]: ... if sys.version_info >= (3, 0): def oem_decode(data: bytes, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def code_page_decode(codepage: int, data: bytes, errors: _Errors = ..., final: int = ...) -> Tuple[Text, int]: ... def oem_encode(str: Text, errors: _Errors = ...) -> Tuple[bytes, int]: ... def code_page_encode(code_page: int, str: Text, errors: _Errors = ...) -> Tuple[bytes, int]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/locale.pyi0000664000175000017500000000504413577124116023651 0ustar davedave00000000000000# Stubs for locale from decimal import Decimal from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union import sys # workaround for mypy#2010 if sys.version_info < (3,): from __builtin__ import str as _str else: from builtins import str as _str CODESET: int D_T_FMT: int D_FMT: int T_FMT: int T_FMT_AMPM: int DAY_1: int DAY_2: int DAY_3: int DAY_4: int DAY_5: int DAY_6: int DAY_7: int ABDAY_1: int ABDAY_2: int ABDAY_3: int ABDAY_4: int ABDAY_5: int ABDAY_6: int ABDAY_7: int MON_1: int MON_2: int MON_3: int MON_4: int MON_5: int MON_6: int MON_7: int MON_8: int MON_9: int MON_10: int MON_11: int MON_12: int ABMON_1: int ABMON_2: int ABMON_3: int ABMON_4: int ABMON_5: int ABMON_6: int ABMON_7: int ABMON_8: int ABMON_9: int ABMON_10: int ABMON_11: int ABMON_12: int RADIXCHAR: int THOUSEP: int YESEXPR: int NOEXPR: int CRNCYSTR: int ERA: int ERA_D_T_FMT: int ERA_D_FMT: int ERA_T_FMT: int ALT_DIGITS: int LC_CTYPE: int LC_COLLATE: int LC_TIME: int LC_MONETARY: int LC_MESSAGES: int LC_NUMERIC: int LC_ALL: int CHAR_MAX: int class Error(Exception): ... def setlocale(category: int, locale: Union[_str, Iterable[_str], None] = ...) -> _str: ... def localeconv() -> Mapping[_str, Union[int, _str, List[int]]]: ... def nl_langinfo(option: int) -> _str: ... def getdefaultlocale(envvars: Tuple[_str, ...] = ...) -> Tuple[Optional[_str], Optional[_str]]: ... def getlocale(category: int = ...) -> Sequence[_str]: ... def getpreferredencoding(do_setlocale: bool = ...) -> _str: ... def normalize(localename: _str) -> _str: ... def resetlocale(category: int = ...) -> None: ... def strcoll(string1: _str, string2: _str) -> int: ... def strxfrm(string: _str) -> _str: ... def format(format: _str, val: Union[float, Decimal], grouping: bool = ..., monetary: bool = ...) -> _str: ... if sys.version_info >= (3, 7): def format_string(format: _str, val: Any, grouping: bool = ..., monetary: bool = ...) -> _str: ... else: def format_string(format: _str, val: Any, grouping: bool = ...) -> _str: ... def currency(val: Union[int, float, Decimal], symbol: bool = ..., grouping: bool = ..., international: bool = ...) -> _str: ... if sys.version_info >= (3, 5): def delocalize(string: _str) -> None: ... def atof(string: _str) -> float: ... def atoi(string: _str) -> int: ... def str(float: float) -> _str: ... locale_alias: Dict[_str, _str] # undocumented locale_encoding_alias: Dict[_str, _str] # undocumented windows_locale: Dict[int, _str] # undocumented jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/array.pyi0000664000175000017500000000545513577124116023536 0ustar davedave00000000000000# Stubs for array # Based on http://docs.python.org/3.6/library/array.html import sys from typing import (Any, BinaryIO, Generic, Iterable, Iterator, List, MutableSequence, overload, Text, Tuple, TypeVar, Union) _T = TypeVar('_T', int, float, Text) if sys.version_info >= (3,): typecodes: str class array(MutableSequence[_T], Generic[_T]): typecode: str itemsize: int def __init__(self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ... def append(self, x: _T) -> None: ... def buffer_info(self) -> Tuple[int, int]: ... def byteswap(self) -> None: ... def count(self, x: Any) -> int: ... def extend(self, iterable: Iterable[_T]) -> None: ... if sys.version_info >= (3, 2): def frombytes(self, s: bytes) -> None: ... def fromfile(self, f: BinaryIO, n: int) -> None: ... def fromlist(self, list: List[_T]) -> None: ... def fromstring(self, s: bytes) -> None: ... def fromunicode(self, s: str) -> None: ... def index(self, x: _T) -> int: ... # type: ignore # Overrides Sequence def insert(self, i: int, x: _T) -> None: ... def pop(self, i: int = ...) -> _T: ... if sys.version_info < (3,): def read(self, f: BinaryIO, n: int) -> None: ... def remove(self, x: Any) -> None: ... def reverse(self) -> None: ... if sys.version_info >= (3, 2): def tobytes(self) -> bytes: ... def tofile(self, f: BinaryIO) -> None: ... def tolist(self) -> List[_T]: ... def tostring(self) -> bytes: ... def tounicode(self) -> str: ... if sys.version_info < (3,): def write(self, f: BinaryIO) -> None: ... def __len__(self) -> int: ... @overload def __getitem__(self, i: int) -> _T: ... @overload def __getitem__(self, s: slice) -> array[_T]: ... @overload # type: ignore # Overrides MutableSequence def __setitem__(self, i: int, o: _T) -> None: ... @overload def __setitem__(self, s: slice, o: array[_T]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... def __add__(self, x: array[_T]) -> array[_T]: ... def __ge__(self, other: array[_T]) -> bool: ... def __gt__(self, other: array[_T]) -> bool: ... def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence def __imul__(self, n: int) -> array[_T]: ... def __le__(self, other: array[_T]) -> bool: ... def __lt__(self, other: array[_T]) -> bool: ... def __mul__(self, n: int) -> array[_T]: ... def __rmul__(self, n: int) -> array[_T]: ... if sys.version_info < (3,): def __delslice__(self, i: int, j: int) -> None: ... def __getslice__(self, i: int, j: int) -> array[_T]: ... def __setslice__(self, i: int, j: int, y: array[_T]) -> None: ... ArrayType = array jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/code.pyi0000664000175000017500000000315613577124116023326 0ustar davedave00000000000000# Stubs for code import sys from typing import Any, Callable, Mapping, Optional from types import CodeType class InteractiveInterpreter: def __init__(self, locals: Optional[Mapping[str, Any]] = ...) -> None: ... def runsource(self, source: str, filename: str = ..., symbol: str = ...) -> bool: ... def runcode(self, code: CodeType) -> None: ... def showsyntaxerror(self, filename: Optional[str] = ...) -> None: ... def showtraceback(self) -> None: ... def write(self, data: str) -> None: ... class InteractiveConsole(InteractiveInterpreter): def __init__(self, locals: Optional[Mapping[str, Any]] = ..., filename: str = ...) -> None: ... if sys.version_info >= (3, 6): def interact(self, banner: Optional[str] = ..., exitmsg: Optional[str] = ...) -> None: ... else: def interact(self, banner: Optional[str] = ...) -> None: ... def push(self, line: str) -> bool: ... def resetbuffer(self) -> None: ... def raw_input(self, prompt: str = ...) -> str: ... if sys.version_info >= (3, 6): def interact(banner: Optional[str] = ..., readfunc: Optional[Callable[[str], str]] = ..., local: Optional[Mapping[str, Any]] = ..., exitmsg: Optional[str] = ...) -> None: ... else: def interact(banner: Optional[str] = ..., readfunc: Optional[Callable[[str], str]] = ..., local: Optional[Mapping[str, Any]] = ...) -> None: ... def compile_command(source: str, filename: str = ..., symbol: str = ...) -> Optional[CodeType]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/keyword.pyi0000664000175000017500000000020713577124116024072 0ustar davedave00000000000000# Stubs for keyword from typing import Sequence, Text, Union def iskeyword(s: Union[Text, bytes]) -> bool: ... kwlist: Sequence[str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/mailbox.pyi0000664000175000017500000001726613577124116024056 0ustar davedave00000000000000 from typing import Optional, Union, Text, AnyStr, Callable, IO, Any, Iterator, List, Tuple, TypeVar, Protocol, Dict, Sequence, Iterable, Generic, Type, Mapping, overload from types import TracebackType import sys import email if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] else: _PathType = Union[bytes, Text] _T = TypeVar("_T") _MessageType = TypeVar("_MessageType", bound=Message) _MessageData = Union[email.message.Message, bytes, str, IO[str], IO[bytes]] class _HasIteritems(Protocol): def iteritems(self) -> Iterator[Tuple[str, _MessageData]]: ... class _HasItems(Protocol): def items(self) -> Iterator[Tuple[str, _MessageData]]: ... linesep: bytes class Mailbox(Generic[_MessageType]): _path: Union[bytes, str] # undocumented _factory: Optional[Callable[[IO[Any]], _MessageType]] # undocumented def __init__(self, path: _PathType, factory: Optional[Callable[[IO[Any]], _MessageType]] = ..., create: bool = ...) -> None: ... def add(self, message: _MessageData) -> str: ... def remove(self, key: str) -> None: ... def __delitem__(self, key: str) -> None: ... def discard(self, key: str) -> None: ... def __setitem__(self, key: str, message: _MessageData) -> None: ... @overload def get(self, key: str, default: None = ...) -> Optional[_MessageType]: ... @overload def get(self, key: str, default: _T) -> Union[_MessageType, _T]: ... def __getitem__(self, key: str) -> _MessageType: ... def get_message(self, key: str) -> _MessageType: ... def get_string(self, key: str) -> str: ... def get_bytes(self, key: str) -> bytes: ... # As '_ProxyFile' doesn't implement the full IO spec, and BytesIO is incompatible with it, get_file return is Any here def get_file(self, key: str) -> Any: ... def iterkeys(self) -> Iterator[str]: ... def keys(self) -> List[str]: ... def itervalues(self) -> Iterator[_MessageType]: ... def __iter__(self) -> Iterator[_MessageType]: ... def values(self) -> List[_MessageType]: ... def iteritems(self) -> Iterator[Tuple[str, _MessageType]]: ... def items(self) -> List[Tuple[str, _MessageType]]: ... def __contains__(self, key: str) -> bool: ... def __len__(self) -> int: ... def clear(self) -> None: ... @overload def pop(self, key: str, default: None = ...) -> Optional[_MessageType]: ... @overload def pop(self, key: str, default: _T = ...) -> Union[_MessageType, _T]: ... def popitem(self) -> Tuple[str, _MessageType]: ... def update(self, arg: Optional[Union[_HasIteritems, _HasItems, Iterable[Tuple[str, _MessageData]]]] = ...) -> None: ... def flush(self) -> None: ... def lock(self) -> None: ... def unlock(self) -> None: ... def close(self) -> None: ... class Maildir(Mailbox[MaildirMessage]): colon: str def __init__(self, dirname: _PathType, factory: Optional[Callable[[IO[Any]], MaildirMessage]] = ..., create: bool = ...) -> None: ... def get_file(self, key: str) -> _ProxyFile[bytes]: ... def list_folders(self) -> List[str]: ... def get_folder(self, folder: Text) -> Maildir: ... def add_folder(self, folder: Text) -> Maildir: ... def remove_folder(self, folder: Text) -> None: ... def clean(self) -> None: ... def next(self) -> Optional[str]: ... class _singlefileMailbox(Mailbox[_MessageType]): ... class _mboxMMDF(_singlefileMailbox[_MessageType]): def get_file(self, key: str) -> _PartialFile[bytes]: ... class mbox(_mboxMMDF[mboxMessage]): def __init__(self, dirname: _PathType, factory: Optional[Callable[[IO[Any]], mboxMessage]] = ..., create: bool = ...) -> None: ... class MMDF(_mboxMMDF[MMDFMessage]): def __init__(self, dirname: _PathType, factory: Optional[Callable[[IO[Any]], MMDFMessage]] = ..., create: bool = ...) -> None: ... class MH(Mailbox[MHMessage]): def __init__(self, dirname: _PathType, factory: Optional[Callable[[IO[Any]], MHMessage]] = ..., create: bool = ...) -> None: ... def get_file(self, key: str) -> _ProxyFile[bytes]: ... def list_folders(self) -> List[str]: ... def get_folder(self, folder: _PathType) -> MH: ... def add_folder(self, folder: _PathType) -> MH: ... def remove_folder(self, folder: _PathType) -> None: ... def get_sequences(self) -> Dict[str, List[int]]: ... def set_sequences(self, sequences: Mapping[str, Sequence[int]]) -> None: ... def pack(self) -> None: ... class Babyl(_singlefileMailbox[BabylMessage]): def __init__(self, dirname: _PathType, factory: Optional[Callable[[IO[Any]], BabylMessage]] = ..., create: bool = ...) -> None: ... def get_file(self, key: str) -> IO[bytes]: ... def get_labels(self) -> List[str]: ... class Message(email.message.Message): def __init__(self, message: Optional[_MessageData] = ...) -> None: ... class MaildirMessage(Message): def get_subdir(self) -> str: ... def set_subdir(self, subdir: Literal["new", "cur"]) -> None: ... def get_flags(self) -> str: ... def set_flags(self, flags: Iterable[str]) -> None: ... def add_flag(self, flag: str) -> None: ... def remove_flag(self, flag: str) -> None: ... def get_date(self) -> int: ... def set_date(self, date: int) -> None: ... def get_info(self) -> str: ... def set_info(self, info: str) -> None: ... class _mboxMMDFMessage(Message): def get_from(self) -> str: ... def set_from(self, from_: str, time_: Optional[Union[bool, Tuple[int, int, int, int, int, int, int, int, int]]] = ...) -> None: ... def get_flags(self) -> str: ... def set_flags(self, flags: Iterable[str]) -> None: ... def add_flag(self, flag: str) -> None: ... def remove_flag(self, flag: str) -> None: ... class mboxMessage(_mboxMMDFMessage): ... class MHMessage(Message): def get_sequences(self) -> List[str]: ... def set_sequences(self, sequences: Iterable[str]) -> None: ... def add_sequence(self, sequence: str) -> None: ... def remove_sequence(self, sequence: str) -> None: ... class BabylMessage(Message): def get_labels(self) -> List[str]: ... def set_labels(self, labels: Iterable[str]) -> None: ... def add_label(self, label: str) -> None: ... def remove_label(self, label: str) -> None: ... def get_visible(self) -> Message: ... def set_visible(self, visible: _MessageData) -> None: ... def update_visible(self) -> None: ... class MMDFMessage(_mboxMMDFMessage): ... class _ProxyFile(Generic[AnyStr]): def __init__(self, f: IO[AnyStr], pos: Optional[int] = ...) -> None: ... def read(self, size: Optional[int] = ...) -> AnyStr: ... def read1(self, size: Optional[int] = ...) -> AnyStr: ... def readline(self, size: Optional[int] = ...) -> AnyStr: ... def readlines(self, sizehint: Optional[int] = ...) -> List[AnyStr]: ... def __iter__(self) -> Iterator[AnyStr]: ... def tell(self) -> int: ... def seek(self, offset: int, whence: int = ...) -> None: ... def close(self) -> None: ... def __enter__(self) -> _ProxyFile[AnyStr]: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[TracebackType]) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def seekable(self) -> bool: ... def flush(self) -> None: ... @property def closed(self) -> bool: ... class _PartialFile(_ProxyFile[AnyStr]): def __init__(self, f: IO[AnyStr], start: Optional[int] = ..., stop: Optional[int] = ...) -> None: ... class Error(Exception): ... class NoSuchMailboxError(Error): ... class NotEmptyError(Error): ... class ExternalClashError(Error): ... class FormatError(Error): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pty.pyi0000664000175000017500000000115713577124116023227 0ustar davedave00000000000000# Stubs for pty (Python 2 and 3) import sys from typing import Callable, Iterable, Tuple, Union _Reader = Callable[[int], bytes] STDIN_FILENO: int STDOUT_FILENO: int STDERR_FILENO: int CHILD: int def openpty() -> Tuple[int, int]: ... def master_open() -> Tuple[int, str]: ... def slave_open(tty_name: str) -> int: ... def fork() -> Tuple[int, int]: ... if sys.version_info >= (3, 4): def spawn(argv: Union[str, Iterable[str]], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ... else: def spawn(argv: Union[str, Iterable[str]], master_read: _Reader = ..., stdin_read: _Reader = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/genericpath.pyi0000664000175000017500000000121513577124116024677 0ustar davedave00000000000000from typing import Sequence, AnyStr, Text import sys if sys.version_info >= (3, 0): def commonprefix(m: Sequence[str]) -> str: ... else: def commonprefix(m: Sequence[AnyStr]) -> AnyStr: ... def exists(path: Text) -> bool: ... def isfile(path: Text) -> bool: ... def isdir(s: Text) -> bool: ... def getsize(filename: Text) -> int: ... def getmtime(filename: Text) -> float: ... def getatime(filename: Text) -> float: ... def getctime(filename: Text) -> float: ... if sys.version_info >= (3, 4): def samestat(s1: str, s2: str) -> int: ... def samefile(f1: str, f2: str) -> int: ... def sameopenfile(fp1: str, fp2: str) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/syslog.pyi0000664000175000017500000000146613577124116023736 0ustar davedave00000000000000from typing import overload LOG_ALERT: int LOG_AUTH: int LOG_CONS: int LOG_CRIT: int LOG_CRON: int LOG_DAEMON: int LOG_DEBUG: int LOG_EMERG: int LOG_ERR: int LOG_INFO: int LOG_KERN: int LOG_LOCAL0: int LOG_LOCAL1: int LOG_LOCAL2: int LOG_LOCAL3: int LOG_LOCAL4: int LOG_LOCAL5: int LOG_LOCAL6: int LOG_LOCAL7: int LOG_LPR: int LOG_MAIL: int LOG_NDELAY: int LOG_NEWS: int LOG_NOTICE: int LOG_NOWAIT: int LOG_PERROR: int LOG_PID: int LOG_SYSLOG: int LOG_USER: int LOG_UUCP: int LOG_WARNING: int def LOG_MASK(a: int) -> int: ... def LOG_UPTO(a: int) -> int: ... def closelog() -> None: ... def openlog(ident: str = ..., logoption: int = ..., facility: int = ...) -> None: ... def setlogmask(x: int) -> int: ... @overload def syslog(priority: int, message: str) -> None: ... @overload def syslog(message: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/trace.pyi0000664000175000017500000000400013577124116023477 0ustar davedave00000000000000# Stubs for trace (Python 2 and 3) import os import sys import types from typing import Any, Callable, Mapping, Optional, Sequence, Text, Tuple, TypeVar, Union _T = TypeVar('_T') _localtrace = Callable[[types.FrameType, str, Any], Callable[..., Any]] if sys.version_info >= (3, 6): _Path = Union[Text, os.PathLike] else: _Path = Text class CoverageResults: def update(self, other: CoverageResults) -> None: ... def write_results(self, show_missing: bool = ..., summary: bool = ..., coverdir: Optional[_Path] = ...) -> None: ... def write_results_file(self, path: _Path, lines: Sequence[str], lnotab: Any, lines_hit: Mapping[int, int], encoding: Optional[str] = ...) -> Tuple[int, int]: ... class Trace: def __init__(self, count: int = ..., trace: int = ..., countfuncs: int = ..., countcallers: int = ..., ignoremods: Sequence[str] = ..., ignoredirs: Sequence[str] = ..., infile: Optional[_Path] = ..., outfile: Optional[_Path] = ..., timing: bool = ...) -> None: ... def run(self, cmd: Union[str, types.CodeType]) -> None: ... def runctx(self, cmd: Union[str, types.CodeType], globals: Optional[Mapping[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> None: ... def runfunc(self, func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ... def file_module_function_of(self, frame: types.FrameType) -> Tuple[str, Optional[str], str]: ... def globaltrace_trackcallers(self, frame: types.FrameType, why: str, arg: Any) -> None: ... def globaltrace_countfuncs(self, frame: types.FrameType, why: str, arg: Any) -> None: ... def globaltrace_lt(self, frame: types.FrameType, why: str, arg: Any) -> None: ... def localtrace_trace_and_count(self, frame: types.FrameType, why: str, arg: Any) -> _localtrace: ... def localtrace_trace(self, frame: types.FrameType, why: str, arg: Any) -> _localtrace: ... def localtrace_count(self, frame: types.FrameType, why: str, arg: Any) -> _localtrace: ... def results(self) -> CoverageResults: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/time.pyi0000664000175000017500000000746113577124116023355 0ustar davedave00000000000000"""Stub file for the 'time' module.""" # See https://docs.python.org/3/library/time.html import sys from typing import Any, NamedTuple, Tuple, Union, Optional if sys.version_info >= (3, 3): from types import SimpleNamespace _TimeTuple = Tuple[int, int, int, int, int, int, int, int, int] if sys.version_info < (3, 3): accept2dyear: bool altzone: int daylight: int timezone: int tzname: Tuple[str, str] if sys.version_info >= (3, 7) and sys.platform != 'win32': CLOCK_BOOTTIME: int # Linux CLOCK_PROF: int # FreeBSD, NetBSD, OpenBSD CLOCK_UPTIME: int # FreeBSD, OpenBSD if sys.version_info >= (3, 3) and sys.platform != 'win32': CLOCK_HIGHRES: int # Solaris only CLOCK_MONOTONIC: int # Unix only CLOCK_MONOTONIC_RAW: int # Linux 2.6.28 or later CLOCK_PROCESS_CPUTIME_ID: int # Unix only CLOCK_REALTIME: int # Unix only CLOCK_THREAD_CPUTIME_ID: int # Unix only if sys.version_info >= (3, 8) and sys.platform == "darwin": CLOCK_UPTIME_RAW: int if sys.version_info >= (3, 3): class _struct_time(NamedTuple): tm_year: int tm_mon: int tm_mday: int tm_hour: int tm_min: int tm_sec: int tm_wday: int tm_yday: int tm_isdst: int tm_zone: str tm_gmtoff: int class struct_time(_struct_time): def __init__( self, o: Union[ Tuple[int, int, int, int, int, int, int, int, int], Tuple[int, int, int, int, int, int, int, int, int, str], Tuple[int, int, int, int, int, int, int, int, int, str, int] ], _arg: Any = ..., ) -> None: ... def __new__( cls, o: Union[ Tuple[int, int, int, int, int, int, int, int, int], Tuple[int, int, int, int, int, int, int, int, int, str], Tuple[int, int, int, int, int, int, int, int, int, str, int] ], _arg: Any = ..., ) -> struct_time: ... else: class _struct_time(NamedTuple): tm_year: int tm_mon: int tm_mday: int tm_hour: int tm_min: int tm_sec: int tm_wday: int tm_yday: int tm_isdst: int class struct_time(_struct_time): def __init__(self, o: _TimeTuple, _arg: Any = ...) -> None: ... def __new__(cls, o: _TimeTuple, _arg: Any = ...) -> struct_time: ... def asctime(t: Union[_TimeTuple, struct_time] = ...) -> str: ... if sys.version_info < (3, 8): def clock() -> float: ... def ctime(secs: Optional[float] = ...) -> str: ... def gmtime(secs: Optional[float] = ...) -> struct_time: ... def localtime(secs: Optional[float] = ...) -> struct_time: ... def mktime(t: Union[_TimeTuple, struct_time]) -> float: ... def sleep(secs: float) -> None: ... def strftime(format: str, t: Union[_TimeTuple, struct_time] = ...) -> str: ... def strptime(string: str, format: str = ...) -> struct_time: ... def time() -> float: ... if sys.platform != 'win32': def tzset() -> None: ... # Unix only if sys.version_info >= (3, 3): def get_clock_info(name: str) -> SimpleNamespace: ... def monotonic() -> float: ... def perf_counter() -> float: ... def process_time() -> float: ... if sys.platform != 'win32': def clock_getres(clk_id: int) -> float: ... # Unix only def clock_gettime(clk_id: int) -> float: ... # Unix only def clock_settime(clk_id: int, time: float) -> None: ... # Unix only if sys.version_info >= (3, 7): def clock_gettime_ns(clock_id: int) -> int: ... def clock_settime_ns(clock_id: int, time: int) -> int: ... def monotonic_ns() -> int: ... def perf_counter_ns() -> int: ... def process_time_ns() -> int: ... def time_ns() -> int: ... def thread_time() -> float: ... def thread_time_ns() -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/errno.pyi0000664000175000017500000000377113577124116023544 0ustar davedave00000000000000# Stubs for errno from typing import Mapping import sys errorcode: Mapping[int, str] EPERM: int ENOENT: int ESRCH: int EINTR: int EIO: int ENXIO: int E2BIG: int ENOEXEC: int EBADF: int ECHILD: int EAGAIN: int ENOMEM: int EACCES: int EFAULT: int ENOTBLK: int EBUSY: int EEXIST: int EXDEV: int ENODEV: int ENOTDIR: int EISDIR: int EINVAL: int ENFILE: int EMFILE: int ENOTTY: int ETXTBSY: int EFBIG: int ENOSPC: int ESPIPE: int EROFS: int EMLINK: int EPIPE: int EDOM: int ERANGE: int EDEADLCK: int ENAMETOOLONG: int ENOLCK: int ENOSYS: int ENOTEMPTY: int ELOOP: int EWOULDBLOCK: int ENOMSG: int EIDRM: int ECHRNG: int EL2NSYNC: int EL3HLT: int EL3RST: int ELNRNG: int EUNATCH: int ENOCSI: int EL2HLT: int EBADE: int EBADR: int EXFULL: int ENOANO: int EBADRQC: int EBADSLT: int EDEADLOCK: int EBFONT: int ENOSTR: int ENODATA: int ETIME: int ENOSR: int ENONET: int ENOPKG: int EREMOTE: int ENOLINK: int EADV: int ESRMNT: int ECOMM: int EPROTO: int EMULTIHOP: int EDOTDOT: int EBADMSG: int EOVERFLOW: int ENOTUNIQ: int EBADFD: int EREMCHG: int ELIBACC: int ELIBBAD: int ELIBSCN: int ELIBMAX: int ELIBEXEC: int EILSEQ: int ERESTART: int ESTRPIPE: int EUSERS: int ENOTSOCK: int EDESTADDRREQ: int EMSGSIZE: int EPROTOTYPE: int ENOPROTOOPT: int EPROTONOSUPPORT: int ESOCKTNOSUPPORT: int ENOTSUP: int EOPNOTSUPP: int EPFNOSUPPORT: int EAFNOSUPPORT: int EADDRINUSE: int EADDRNOTAVAIL: int ENETDOWN: int ENETUNREACH: int ENETRESET: int ECONNABORTED: int ECONNRESET: int ENOBUFS: int EISCONN: int ENOTCONN: int ESHUTDOWN: int ETOOMANYREFS: int ETIMEDOUT: int ECONNREFUSED: int EHOSTDOWN: int EHOSTUNREACH: int EALREADY: int EINPROGRESS: int ESTALE: int EUCLEAN: int ENOTNAM: int ENAVAIL: int EISNAM: int EREMOTEIO: int EDQUOT: int ECANCELED: int # undocumented EKEYEXPIRED: int # undocumented EKEYREJECTED: int # undocumented EKEYREVOKED: int # undocumented EMEDIUMTYPE: int # undocumented ENOKEY: int # undocumented ENOMEDIUM: int # undocumented ENOTRECOVERABLE: int # undocumented EOWNERDEAD: int # undocumented ERFKILL: int # undocumented jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pstats.pyi0000664000175000017500000000365413577124116023735 0ustar davedave00000000000000from profile import Profile from cProfile import Profile as _cProfile import os import sys from typing import Any, Dict, IO, Iterable, List, Text, Tuple, TypeVar, Union, overload _Selector = Union[str, float, int] _T = TypeVar('_T', bound=Stats) if sys.version_info >= (3, 6): _Path = Union[bytes, Text, os.PathLike[Any]] else: _Path = Union[bytes, Text] class Stats: def __init__(self: _T, __arg: Union[None, str, Text, Profile, _cProfile] = ..., *args: Union[None, str, Text, Profile, _cProfile, _T], stream: IO[Any] = ...) -> None: ... def init(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ... def load_stats(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ... def get_top_level_stats(self) -> None: ... def add(self: _T, *arg_list: Union[None, str, Text, Profile, _cProfile, _T]) -> _T: ... def dump_stats(self, filename: _Path) -> None: ... def get_sort_arg_defs(self) -> Dict[str, Tuple[Tuple[Tuple[int, int], ...], str]]: ... @overload def sort_stats(self: _T, field: int) -> _T: ... @overload def sort_stats(self: _T, *field: str) -> _T: ... def reverse_order(self: _T) -> _T: ... def strip_dirs(self: _T) -> _T: ... def calc_callees(self) -> None: ... def eval_print_amount(self, sel: _Selector, list: List[str], msg: str) -> Tuple[List[str], str]: ... def get_print_list(self, sel_list: Iterable[_Selector]) -> Tuple[int, List[str]]: ... def print_stats(self: _T, *amount: _Selector) -> _T: ... def print_callees(self: _T, *amount: _Selector) -> _T: ... def print_callers(self: _T, *amount: _Selector) -> _T: ... def print_call_heading(self, name_size: int, column_title: str) -> None: ... def print_call_line(self, name_size: int, source: str, call_dict: Dict[str, Any], arrow: str = ...) -> None: ... def print_title(self) -> None: ... def print_line(self, func: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/doctest.pyi0000664000175000017500000001530413577124116024057 0ustar davedave00000000000000from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple, Type, Union import sys import types import unittest class TestResults(NamedTuple): failed: int attempted: int OPTIONFLAGS_BY_NAME: Dict[str, int] def register_optionflag(name: str) -> int: ... DONT_ACCEPT_TRUE_FOR_1: int DONT_ACCEPT_BLANKLINE: int NORMALIZE_WHITESPACE: int ELLIPSIS: int SKIP: int IGNORE_EXCEPTION_DETAIL: int COMPARISON_FLAGS: int REPORT_UDIFF: int REPORT_CDIFF: int REPORT_NDIFF: int REPORT_ONLY_FIRST_FAILURE: int if sys.version_info >= (3, 4): FAIL_FAST: int REPORTING_FLAGS: int BLANKLINE_MARKER: str ELLIPSIS_MARKER: str class Example: source: str want: str exc_msg: Optional[str] lineno: int indent: int options: Dict[int, bool] def __init__(self, source: str, want: str, exc_msg: Optional[str] = ..., lineno: int = ..., indent: int = ..., options: Optional[Dict[int, bool]] = ...) -> None: ... def __hash__(self) -> int: ... class DocTest: examples: List[Example] globs: Dict[str, Any] name: str filename: Optional[str] lineno: Optional[int] docstring: Optional[str] def __init__(self, examples: List[Example], globs: Dict[str, Any], name: str, filename: Optional[str], lineno: Optional[int], docstring: Optional[str]) -> None: ... def __hash__(self) -> int: ... def __lt__(self, other: DocTest) -> bool: ... class DocTestParser: def parse(self, string: str, name: str = ...) -> List[Union[str, Example]]: ... def get_doctest(self, string: str, globs: Dict[str, Any], name: str, filename: Optional[str], lineno: Optional[int]) -> DocTest: ... def get_examples(self, string: str, name: str = ...) -> List[Example]: ... class DocTestFinder: def __init__(self, verbose: bool = ..., parser: DocTestParser = ..., recurse: bool = ..., exclude_empty: bool = ...) -> None: ... def find(self, obj: object, name: Optional[str] = ..., module: Union[None, bool, types.ModuleType] = ..., globs: Optional[Dict[str, Any]] = ..., extraglobs: Optional[Dict[str, Any]] = ...) -> List[DocTest]: ... _Out = Callable[[str], Any] _ExcInfo = Tuple[Type[BaseException], BaseException, types.TracebackType] class DocTestRunner: DIVIDER: str optionflags: int original_optionflags: int tries: int failures: int test: DocTest def __init__(self, checker: Optional[OutputChecker] = ..., verbose: Optional[bool] = ..., optionflags: int = ...) -> None: ... def report_start(self, out: _Out, test: DocTest, example: Example) -> None: ... def report_success(self, out: _Out, test: DocTest, example: Example, got: str) -> None: ... def report_failure(self, out: _Out, test: DocTest, example: Example, got: str) -> None: ... def report_unexpected_exception(self, out: _Out, test: DocTest, example: Example, exc_info: _ExcInfo) -> None: ... def run(self, test: DocTest, compileflags: Optional[int] = ..., out: Optional[_Out] = ..., clear_globs: bool = ...) -> TestResults: ... def summarize(self, verbose: Optional[bool] = ...) -> TestResults: ... def merge(self, other: DocTestRunner) -> None: ... class OutputChecker: def check_output(self, want: str, got: str, optionflags: int) -> bool: ... def output_difference(self, example: Example, got: str, optionflags: int) -> str: ... class DocTestFailure(Exception): test: DocTest example: Example got: str def __init__(self, test: DocTest, example: Example, got: str) -> None: ... class UnexpectedException(Exception): test: DocTest example: Example exc_info: _ExcInfo def __init__(self, test: DocTest, example: Example, exc_info: _ExcInfo) -> None: ... class DebugRunner(DocTestRunner): ... master: Optional[DocTestRunner] def testmod(m: Optional[types.ModuleType] = ..., name: Optional[str] = ..., globs: Dict[str, Any] = ..., verbose: Optional[bool] = ..., report: bool = ..., optionflags: int = ..., extraglobs: Dict[str, Any] = ..., raise_on_error: bool = ..., exclude_empty: bool = ...) -> TestResults: ... def testfile(filename: str, module_relative: bool = ..., name: Optional[str] = ..., package: Union[None, str, types.ModuleType] = ..., globs: Optional[Dict[str, Any]] = ..., verbose: Optional[bool] = ..., report: bool = ..., optionflags: int = ..., extraglobs: Optional[Dict[str, Any]] = ..., raise_on_error: bool = ..., parser: DocTestParser = ..., encoding: Optional[str] = ...) -> TestResults: ... def run_docstring_examples(f: object, globs: Dict[str, Any], verbose: bool = ..., name: str = ..., compileflags: Optional[int] = ..., optionflags: int = ...) -> None: ... def set_unittest_reportflags(flags: int) -> int: ... class DocTestCase(unittest.TestCase): def __init__(self, test: DocTest, optionflags: int = ..., setUp: Optional[Callable[[DocTest], Any]] = ..., tearDown: Optional[Callable[[DocTest], Any]] = ..., checker: Optional[OutputChecker] = ...) -> None: ... def setUp(self) -> None: ... def tearDown(self) -> None: ... def runTest(self) -> None: ... def format_failure(self, err: str) -> str: ... def debug(self) -> None: ... def id(self) -> str: ... def __hash__(self) -> int: ... def shortDescription(self) -> str: ... class SkipDocTestCase(DocTestCase): def __init__(self, module: types.ModuleType) -> None: ... def setUp(self) -> None: ... def test_skip(self) -> None: ... def shortDescription(self) -> str: ... if sys.version_info >= (3, 4): class _DocTestSuite(unittest.TestSuite): ... else: _DocTestSuite = unittest.TestSuite def DocTestSuite(module: Union[None, str, types.ModuleType] = ..., globs: Optional[Dict[str, Any]] = ..., extraglobs: Optional[Dict[str, Any]] = ..., test_finder: Optional[DocTestFinder] = ..., **options: Any) -> _DocTestSuite: ... class DocFileCase(DocTestCase): def id(self) -> str: ... def format_failure(self, err: str) -> str: ... def DocFileTest(path: str, module_relative: bool = ..., package: Union[None, str, types.ModuleType] = ..., globs: Optional[Dict[str, Any]] = ..., parser: DocTestParser = ..., encoding: Optional[str] = ..., **options: Any) -> DocFileCase: ... def DocFileSuite(*paths: str, **kw: Any) -> _DocTestSuite: ... def script_from_examples(s: str) -> str: ... def testsource(module: Union[None, str, types.ModuleType], name: str) -> str: ... def debug_src(src: str, pm: bool = ..., globs: Optional[Dict[str, Any]] = ...) -> None: ... def debug_script(src: str, pm: bool = ..., globs: Optional[Dict[str, Any]] = ...) -> None: ... def debug(module: Union[None, str, types.ModuleType], name: str, pm: bool = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/cmath.pyi0000664000175000017500000000226713577124116023512 0ustar davedave00000000000000"""Stub file for the 'cmath' module.""" import sys from typing import SupportsComplex, SupportsFloat, Tuple, Union e: float pi: float if sys.version_info >= (3, 6): inf: float infj: complex nan: float nanj: complex tau: float _C = Union[SupportsFloat, SupportsComplex] def acos(x: _C) -> complex: ... def acosh(x: _C) -> complex: ... def asin(x: _C) -> complex: ... def asinh(x: _C) -> complex: ... def atan(x: _C) -> complex: ... def atanh(x: _C) -> complex: ... def cos(x: _C) -> complex: ... def cosh(x: _C) -> complex: ... def exp(x: _C) -> complex: ... if sys.version_info >= (3, 5): def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = ..., abs_tol: SupportsFloat = ...) -> bool: ... def isinf(z: _C) -> bool: ... def isnan(z: _C) -> bool: ... def log(x: _C, base: _C = ...) -> complex: ... def log10(x: _C) -> complex: ... def phase(z: _C) -> float: ... def polar(z: _C) -> Tuple[float, float]: ... def rect(r: float, phi: float) -> complex: ... def sin(x: _C) -> complex: ... def sinh(x: _C) -> complex: ... def sqrt(x: _C) -> complex: ... def tan(x: _C) -> complex: ... def tanh(x: _C) -> complex: ... if sys.version_info >= (3,): def isfinite(z: _C) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/curses/0000775000175000017500000000000013577125145023173 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/curses/__init__.pyi0000664000175000017500000000056013577124116025453 0ustar davedave00000000000000from _curses import * # noqa: F403 from _curses import _CursesWindow as _CursesWindow from typing import TypeVar, Callable, Any _T = TypeVar('_T') # available after calling `curses.initscr()` LINES: int COLS: int # available after calling `curses.start_color()` COLORS: int COLOR_PAIRS: int def wrapper(func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/curses/panel.pyi0000664000175000017500000000143713577124116025017 0ustar davedave00000000000000from _curses import _CursesWindow class _Curses_Panel: # type is (note the space in the class name) def above(self) -> _Curses_Panel: ... def below(self) -> _Curses_Panel: ... def bottom(self) -> None: ... def hidden(self) -> bool: ... def hide(self) -> None: ... def move(self, y: int, x: int) -> None: ... def replace(self, win: _CursesWindow) -> None: ... def set_userptr(self, obj: object) -> None: ... def show(self) -> None: ... def top(self) -> None: ... def userptr(self) -> object: ... def window(self) -> _CursesWindow: ... def bottom_panel() -> _Curses_Panel: ... def new_panel(win: _CursesWindow) -> _Curses_Panel: ... def top_panel() -> _Curses_Panel: ... def update_panels() -> _Curses_Panel: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/curses/ascii.pyi0000664000175000017500000000230613577124116025004 0ustar davedave00000000000000from typing import List, Union, overload, TypeVar _Ch = TypeVar('_Ch', str, int) NUL: int SOH: int STX: int ETX: int EOT: int ENQ: int ACK: int BEL: int BS: int TAB: int HT: int LF: int NL: int VT: int FF: int CR: int SO: int SI: int DLE: int DC1: int DC2: int DC3: int DC4: int NAK: int SYN: int ETB: int CAN: int EM: int SUB: int ESC: int FS: int GS: int RS: int US: int SP: int DEL: int controlnames: List[int] def isalnum(c: Union[str, int]) -> bool: ... def isalpha(c: Union[str, int]) -> bool: ... def isascii(c: Union[str, int]) -> bool: ... def isblank(c: Union[str, int]) -> bool: ... def iscntrl(c: Union[str, int]) -> bool: ... def isdigit(c: Union[str, int]) -> bool: ... def isgraph(c: Union[str, int]) -> bool: ... def islower(c: Union[str, int]) -> bool: ... def isprint(c: Union[str, int]) -> bool: ... def ispunct(c: Union[str, int]) -> bool: ... def isspace(c: Union[str, int]) -> bool: ... def isupper(c: Union[str, int]) -> bool: ... def isxdigit(c: Union[str, int]) -> bool: ... def isctrl(c: Union[str, int]) -> bool: ... def ismeta(c: Union[str, int]) -> bool: ... def ascii(c: _Ch) -> _Ch: ... def ctrl(c: _Ch) -> _Ch: ... def alt(c: _Ch) -> _Ch: ... def unctrl(c: Union[str, int]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/curses/textpad.pyi0000664000175000017500000000065513577124116025372 0ustar davedave00000000000000from _curses import _CursesWindow from typing import Callable, Union def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> None: ... class Textbox: stripspaces: bool def __init__(self, w: _CursesWindow, insert_mode: bool = ...) -> None: ... def edit(self, validate: Callable[[int], int]) -> str: ... def do_command(self, ch: Union[str, int]) -> None: ... def gather(self) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/macpath.pyi0000664000175000017500000001474713577124116024041 0ustar davedave00000000000000# Stubs for os.path # Ron Murawski import os import sys from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional if sys.version_info < (3, 8): _T = TypeVar('_T') if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] _StrPath = Union[Text, _PathLike[Text]] _BytesPath = Union[bytes, _PathLike[bytes]] else: _PathType = Union[bytes, Text] _StrPath = Text _BytesPath = bytes # ----- os.path variables ----- supports_unicode_filenames: bool # aliases (also in os) curdir: str pardir: str sep: str altsep: Optional[str] extsep: str pathsep: str defpath: str devnull: str # ----- os.path function stubs ----- if sys.version_info >= (3, 6): # Overloads are necessary to work around python/mypy#3644. @overload def abspath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def basename(path: AnyStr) -> AnyStr: ... @overload def dirname(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(path: AnyStr) -> AnyStr: ... @overload def expanduser(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expanduser(path: AnyStr) -> AnyStr: ... @overload def expandvars(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normcase(path: AnyStr) -> AnyStr: ... @overload def normpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': @overload def realpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(path: AnyStr) -> AnyStr: ... else: @overload def realpath(filename: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(filename: AnyStr) -> AnyStr: ... else: def abspath(path: AnyStr) -> AnyStr: ... def basename(path: AnyStr) -> AnyStr: ... def dirname(path: AnyStr) -> AnyStr: ... def expanduser(path: AnyStr) -> AnyStr: ... def expandvars(path: AnyStr) -> AnyStr: ... def normcase(path: AnyStr) -> AnyStr: ... def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': def realpath(path: AnyStr) -> AnyStr: ... else: def realpath(filename: AnyStr) -> AnyStr: ... if sys.version_info >= (3, 6): # In reality it returns str for sequences of _StrPath and bytes for sequences # of _BytesPath, but mypy does not accept such a signature. def commonpath(paths: Sequence[_PathType]) -> Any: ... elif sys.version_info >= (3, 5): def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ... # NOTE: Empty lists results in '' (str) regardless of contained type. # Also, in Python 2 mixed sequences of Text and bytes results in either Text or bytes # So, fall back to Any def commonprefix(list: Sequence[_PathType]) -> Any: ... if sys.version_info >= (3, 3): def exists(path: Union[_PathType, int]) -> bool: ... else: def exists(path: _PathType) -> bool: ... def lexists(path: _PathType) -> bool: ... # These return float if os.stat_float_times() == True, # but int is a subclass of float. def getatime(path: _PathType) -> float: ... def getmtime(path: _PathType) -> float: ... def getctime(path: _PathType) -> float: ... def getsize(path: _PathType) -> int: ... def isabs(path: _PathType) -> bool: ... def isfile(path: _PathType) -> bool: ... def isdir(path: _PathType) -> bool: ... def islink(path: _PathType) -> bool: ... def ismount(path: _PathType) -> bool: ... if sys.version_info < (3, 0): # Make sure signatures are disjunct, and allow combinations of bytes and unicode. # (Since Python 2 allows that, too) # Note that e.g. os.path.join("a", "b", "c", "d", u"e") will still result in # a type error. @overload def join(__p1: bytes, *p: bytes) -> bytes: ... @overload def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ... @overload def join(__p1: Text, *p: _PathType) -> Text: ... elif sys.version_info >= (3, 6): # Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway. @overload def join(path: _StrPath, *paths: _StrPath) -> Text: ... @overload def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ... else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... def samefile(path1: _PathType, path2: _PathType) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ... if sys.version_info >= (3, 6): @overload def split(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... else: def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... if sys.version_info < (3,): def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/cgitb.pyi0000664000175000017500000000300013577124116023470 0ustar davedave00000000000000 from typing import Dict, Any, List, Tuple, Optional, Callable, Type, Union, IO, AnyStr, TypeVar from types import FrameType, TracebackType import sys _T = TypeVar("_T") _ExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] if sys.version_info >= (3, 6): from os import PathLike _Path = Union[_T, PathLike[_T]] else: _Path = Union[_T] def reset() -> str: ... # undocumented def small(text: str) -> str: ... # undocumented def strong(text: str) -> str: ... # undocumented def grey(text: str) -> str: ... # undocumented def lookup(name: str, frame: FrameType, locals: Dict[str, Any]) -> Tuple[Optional[str], Any]: ... # undocumented def scanvars(reader: Callable[[], bytes], frame: FrameType, locals: Dict[str, Any]) -> List[Tuple[str, Optional[str], Any]]: ... # undocumented def html(einfo: _ExcInfo, context: int = ...) -> str: ... def text(einfo: _ExcInfo, context: int = ...) -> str: ... class Hook: # undocumented def __init__(self, display: int = ..., logdir: Optional[_Path[AnyStr]] = ..., context: int = ..., file: Optional[IO[str]] = ..., format: str = ...) -> None: ... def __call__(self, etype: Optional[Type[BaseException]], evalue: Optional[BaseException], etb: Optional[TracebackType]) -> None: ... def handle(self, info: Optional[_ExcInfo] = ...) -> None: ... def handler(info: Optional[_ExcInfo] = ...) -> None: ... def enable(display: int = ..., logdir: Optional[_Path[AnyStr]] = ..., context: int = ..., format: str = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/profile.pyi0000664000175000017500000000241113577124116024045 0ustar davedave00000000000000import os import sys from typing import Any, Callable, Dict, Optional, Text, TypeVar, Union def run(statement: str, filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ... def runctx(statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: Optional[str] = ..., sort: Union[str, int] = ...) -> None: ... _SelfT = TypeVar('_SelfT', bound=Profile) _T = TypeVar('_T') if sys.version_info >= (3, 6): _Path = Union[bytes, Text, os.PathLike[Any]] else: _Path = Union[bytes, Text] class Profile: def __init__(self, timer: Optional[Callable[[], float]] = ..., bias: Optional[int] = ...) -> None: ... def set_cmd(self, cmd: str) -> None: ... def simulate_call(self, name: str) -> None: ... def simulate_cmd_complete(self) -> None: ... def print_stats(self, sort: Union[str, int] = ...) -> None: ... def dump_stats(self, file: _Path) -> None: ... def create_stats(self) -> None: ... def snapshot_stats(self) -> None: ... def run(self: _SelfT, cmd: str) -> _SelfT: ... def runctx(self: _SelfT, cmd: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> _SelfT: ... def runcall(self, func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ... def calibrate(self, m: int, verbose: int = ...) -> float: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/formatter.pyi0000664000175000017500000001105713577124116024416 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/formatter.py # and https://github.com/python/cpython/blob/master/Lib/formatter.py from typing import Any, IO, List, Optional, Tuple AS_IS: None _FontType = Tuple[str, bool, bool, bool] _StylesType = Tuple[Any, ...] class NullFormatter: writer: Optional[NullWriter] def __init__(self, writer: Optional[NullWriter] = ...) -> None: ... def end_paragraph(self, blankline: int) -> None: ... def add_line_break(self) -> None: ... def add_hor_rule(self, *args, **kw) -> None: ... def add_label_data(self, format, counter: int, blankline: Optional[int] = ...) -> None: ... def add_flowing_data(self, data: str) -> None: ... def add_literal_data(self, data: str) -> None: ... def flush_softspace(self) -> None: ... def push_alignment(self, align: Optional[str]) -> None: ... def pop_alignment(self) -> None: ... def push_font(self, x: _FontType) -> None: ... def pop_font(self) -> None: ... def push_margin(self, margin: int) -> None: ... def pop_margin(self) -> None: ... def set_spacing(self, spacing: Optional[str]) -> None: ... def push_style(self, *styles: _StylesType) -> None: ... def pop_style(self, n: int = ...) -> None: ... def assert_line_data(self, flag: int = ...) -> None: ... class AbstractFormatter: writer: NullWriter align: Optional[str] align_stack: List[Optional[str]] font_stack: List[_FontType] margin_stack: List[int] spacing: Optional[str] style_stack: Any nospace: int softspace: int para_end: int parskip: int hard_break: int have_label: int def __init__(self, writer: NullWriter) -> None: ... def end_paragraph(self, blankline: int) -> None: ... def add_line_break(self) -> None: ... def add_hor_rule(self, *args, **kw) -> None: ... def add_label_data(self, format, counter: int, blankline: Optional[int] = ...) -> None: ... def format_counter(self, format, counter: int) -> str: ... def format_letter(self, case: str, counter: int) -> str: ... def format_roman(self, case: str, counter: int) -> str: ... def add_flowing_data(self, data: str) -> None: ... def add_literal_data(self, data: str) -> None: ... def flush_softspace(self) -> None: ... def push_alignment(self, align: Optional[str]) -> None: ... def pop_alignment(self) -> None: ... def push_font(self, font: _FontType) -> None: ... def pop_font(self) -> None: ... def push_margin(self, margin: int) -> None: ... def pop_margin(self) -> None: ... def set_spacing(self, spacing: Optional[str]) -> None: ... def push_style(self, *styles: _StylesType) -> None: ... def pop_style(self, n: int = ...) -> None: ... def assert_line_data(self, flag: int = ...) -> None: ... class NullWriter: def __init__(self) -> None: ... def flush(self) -> None: ... def new_alignment(self, align: Optional[str]) -> None: ... def new_font(self, font: _FontType) -> None: ... def new_margin(self, margin: int, level: int) -> None: ... def new_spacing(self, spacing: Optional[str]) -> None: ... def new_styles(self, styles) -> None: ... def send_paragraph(self, blankline: int) -> None: ... def send_line_break(self) -> None: ... def send_hor_rule(self, *args, **kw) -> None: ... def send_label_data(self, data: str) -> None: ... def send_flowing_data(self, data: str) -> None: ... def send_literal_data(self, data: str) -> None: ... class AbstractWriter(NullWriter): def new_alignment(self, align: Optional[str]) -> None: ... def new_font(self, font: _FontType) -> None: ... def new_margin(self, margin: int, level: int) -> None: ... def new_spacing(self, spacing: Optional[str]) -> None: ... def new_styles(self, styles) -> None: ... def send_paragraph(self, blankline: int) -> None: ... def send_line_break(self) -> None: ... def send_hor_rule(self, *args, **kw) -> None: ... def send_label_data(self, data: str) -> None: ... def send_flowing_data(self, data: str) -> None: ... def send_literal_data(self, data: str) -> None: ... class DumbWriter(NullWriter): file: IO[str] maxcol: int def __init__(self, file: Optional[IO[str]] = ..., maxcol: int = ...) -> None: ... def reset(self) -> None: ... def send_paragraph(self, blankline: int) -> None: ... def send_line_break(self) -> None: ... def send_hor_rule(self, *args, **kw) -> None: ... def send_literal_data(self, data: str) -> None: ... def send_flowing_data(self, data: str) -> None: ... def test(file: Optional[str] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/nis.pyi0000664000175000017500000000050313577124116023176 0ustar davedave00000000000000import sys from typing import Dict, List if sys.platform != 'win32': def cat(map: str, domain: str = ...) -> Dict[str, str]: ... def get_default_domain() -> str: ... def maps(domain: str = ...) -> List[str]: ... def match(key: str, map: str, domain: str = ...) -> str: ... class error(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sunau.pyi0000664000175000017500000000601613577124116023545 0ustar davedave00000000000000# Stubs for sunau (Python 2 and 3) import sys from typing import Any, NamedTuple, NoReturn, Optional, Text, IO, Union, Tuple _File = Union[Text, IO[bytes]] class Error(Exception): ... AUDIO_FILE_MAGIC: int AUDIO_FILE_ENCODING_MULAW_8: int AUDIO_FILE_ENCODING_LINEAR_8: int AUDIO_FILE_ENCODING_LINEAR_16: int AUDIO_FILE_ENCODING_LINEAR_24: int AUDIO_FILE_ENCODING_LINEAR_32: int AUDIO_FILE_ENCODING_FLOAT: int AUDIO_FILE_ENCODING_DOUBLE: int AUDIO_FILE_ENCODING_ADPCM_G721: int AUDIO_FILE_ENCODING_ADPCM_G722: int AUDIO_FILE_ENCODING_ADPCM_G723_3: int AUDIO_FILE_ENCODING_ADPCM_G723_5: int AUDIO_FILE_ENCODING_ALAW_8: int AUDIO_UNKNOWN_SIZE: int if sys.version_info < (3, 0): _sunau_params = Tuple[int, int, int, int, str, str] else: class _sunau_params(NamedTuple): nchannels: int sampwidth: int framerate: int nframes: int comptype: str compname: str class Au_read: def __init__(self, f: _File) -> None: ... if sys.version_info >= (3, 3): def __enter__(self) -> Au_read: ... def __exit__(self, *args: Any) -> None: ... def getfp(self) -> Optional[IO[bytes]]: ... def rewind(self) -> None: ... def close(self) -> None: ... def tell(self) -> int: ... def getnchannels(self) -> int: ... def getnframes(self) -> int: ... def getsampwidth(self) -> int: ... def getframerate(self) -> int: ... def getcomptype(self) -> str: ... def getcompname(self) -> str: ... def getparams(self) -> _sunau_params: ... def getmarkers(self) -> None: ... def getmark(self, id: Any) -> NoReturn: ... def setpos(self, pos: int) -> None: ... def readframes(self, nframes: int) -> Optional[bytes]: ... class Au_write: def __init__(self, f: _File) -> None: ... if sys.version_info >= (3, 3): def __enter__(self) -> Au_write: ... def __exit__(self, *args: Any) -> None: ... def setnchannels(self, nchannels: int) -> None: ... def getnchannels(self) -> int: ... def setsampwidth(self, sampwidth: int) -> None: ... def getsampwidth(self) -> int: ... def setframerate(self, framerate: float) -> None: ... def getframerate(self) -> int: ... def setnframes(self, nframes: int) -> None: ... def getnframes(self) -> int: ... def setcomptype(self, comptype: str, compname: str) -> None: ... def getcomptype(self) -> str: ... def getcompname(self) -> str: ... def setparams(self, params: _sunau_params) -> None: ... def getparams(self) -> _sunau_params: ... def setmark(self, id: Any, pos: Any, name: Any) -> NoReturn: ... def getmark(self, id: Any) -> NoReturn: ... def getmarkers(self) -> None: ... def tell(self) -> int: ... # should be any bytes-like object after 3.4, but we don't have a type for that def writeframesraw(self, data: bytes) -> None: ... def writeframes(self, data: bytes) -> None: ... def close(self) -> None: ... # Returns a Au_read if mode is rb and Au_write if mode is wb def open(f: _File, mode: Optional[str] = ...) -> Any: ... openfp = open jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/0000775000175000017500000000000013577125145023335 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/__init__.pyi0000664000175000017500000000000013577124116025602 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/handlers.pyi0000664000175000017500000000603413577124116025660 0ustar davedave00000000000000import sys from abc import abstractmethod from types import TracebackType from typing import Optional, Dict, MutableMapping, Type, Text, Callable, List, Tuple, IO from .headers import Headers from .types import WSGIApplication, WSGIEnvironment, StartResponse, InputStream, ErrorStream from .util import FileWrapper, guess_scheme _exc_info = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] def format_date_time(timestamp: Optional[float]) -> str: ... # undocumented if sys.version_info >= (3, 2): def read_environ() -> Dict[str, str]: ... class BaseHandler: wsgi_version: Tuple[int, int] # undocumented wsgi_multithread: bool wsgi_multiprocess: bool wsgi_run_once: bool origin_server: bool http_version: str server_software: Optional[str] os_environ: MutableMapping[str, str] wsgi_file_wrapper: Optional[Type[FileWrapper]] headers_class: Type[Headers] # undocumented traceback_limit: Optional[int] error_status: str error_headers: List[Tuple[Text, Text]] error_body: bytes def run(self, application: WSGIApplication) -> None: ... def setup_environ(self) -> None: ... def finish_response(self) -> None: ... def get_scheme(self) -> str: ... def set_content_length(self) -> None: ... def cleanup_headers(self) -> None: ... def start_response(self, status: Text, headers: List[Tuple[Text, Text]], exc_info: Optional[_exc_info] = ...) -> Callable[[bytes], None]: ... def send_preamble(self) -> None: ... def write(self, data: bytes) -> None: ... def sendfile(self) -> bool: ... def finish_content(self) -> None: ... def close(self) -> None: ... def send_headers(self) -> None: ... def result_is_file(self) -> bool: ... def client_is_modern(self) -> bool: ... def log_exception(self, exc_info: _exc_info) -> None: ... def handle_error(self) -> None: ... def error_output(self, environ: WSGIEnvironment, start_response: StartResponse) -> List[bytes]: ... @abstractmethod def _write(self, data: bytes) -> None: ... @abstractmethod def _flush(self) -> None: ... @abstractmethod def get_stdin(self) -> InputStream: ... @abstractmethod def get_stderr(self) -> ErrorStream: ... @abstractmethod def add_cgi_vars(self) -> None: ... class SimpleHandler(BaseHandler): stdin: InputStream stdout: IO[bytes] stderr: ErrorStream base_env: MutableMapping[str, str] def __init__(self, stdin: InputStream, stdout: IO[bytes], stderr: ErrorStream, environ: MutableMapping[str, str], multithread: bool = ..., multiprocess: bool = ...) -> None: ... def get_stdin(self) -> InputStream: ... def get_stderr(self) -> ErrorStream: ... def add_cgi_vars(self) -> None: ... def _write(self, data: bytes) -> None: ... def _flush(self) -> None: ... class BaseCGIHandler(SimpleHandler): ... class CGIHandler(BaseCGIHandler): def __init__(self) -> None: ... class IISCGIHandler(BaseCGIHandler): def __init__(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/simple_server.pyi0000664000175000017500000000276313577124116026744 0ustar davedave00000000000000import sys from typing import Optional, List, Type, TypeVar, overload from .handlers import SimpleHandler from .types import WSGIApplication, WSGIEnvironment, StartResponse, ErrorStream if sys.version_info < (3,): from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer else: from http.server import HTTPServer, BaseHTTPRequestHandler server_version: str # undocumented sys_version: str # undocumented software_version: str # undocumented class ServerHandler(SimpleHandler): # undocumented server_software: str def close(self) -> None: ... class WSGIServer(HTTPServer): application: Optional[WSGIApplication] base_environ: WSGIEnvironment # only available after call to setup_environ() def setup_environ(self) -> None: ... def get_app(self) -> Optional[WSGIApplication]: ... def set_app(self, application: Optional[WSGIApplication]) -> None: ... class WSGIRequestHandler(BaseHTTPRequestHandler): server_version: str def get_environ(self) -> WSGIEnvironment: ... def get_stderr(self) -> ErrorStream: ... def handle(self) -> None: ... def demo_app(environ: WSGIEnvironment, start_response: StartResponse) -> List[bytes]: ... _S = TypeVar("_S", bound=WSGIServer) @overload def make_server(host: str, port: int, app: WSGIApplication, *, handler_class: Type[WSGIRequestHandler] = ...) -> WSGIServer: ... @overload def make_server(host: str, port: int, app: WSGIApplication, server_class: Type[_S], handler_class: Type[WSGIRequestHandler] = ...) -> _S: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/validate.pyi0000664000175000017500000000350513577124116025651 0ustar davedave00000000000000import sys from typing import Any, Iterable, Iterator, Optional, NoReturn, Callable from wsgiref.types import WSGIApplication, InputStream, ErrorStream class WSGIWarning(Warning): ... def validator(application: WSGIApplication) -> WSGIApplication: ... class InputWrapper: input: InputStream def __init__(self, wsgi_input: InputStream) -> None: ... if sys.version_info < (3,): def read(self, size: int = ...) -> bytes: ... def readline(self) -> bytes: ... else: def read(self, size: int) -> bytes: ... def readline(self, size: int = ...) -> bytes: ... def readlines(self, hint: int = ...) -> bytes: ... def __iter__(self) -> Iterable[bytes]: ... def close(self) -> NoReturn: ... class ErrorWrapper: errors: ErrorStream def __init__(self, wsgi_errors: ErrorStream) -> None: ... def write(self, s: str) -> None: ... def flush(self) -> None: ... def writelines(self, seq: Iterable[str]) -> None: ... def close(self) -> NoReturn: ... class WriteWrapper: writer: Callable[[bytes], Any] def __init__(self, wsgi_writer: Callable[[bytes], Any]) -> None: ... def __call__(self, s: bytes) -> None: ... class PartialIteratorWrapper: iterator: Iterator[bytes] def __init__(self, wsgi_iterator: Iterator[bytes]) -> None: ... def __iter__(self) -> IteratorWrapper: ... class IteratorWrapper: original_iterator: Iterator[bytes] iterator: Iterator[bytes] closed: bool check_start_response: Optional[bool] def __init__(self, wsgi_iterator: Iterator[bytes], check_start_response: Optional[bool]) -> None: ... def __iter__(self) -> IteratorWrapper: ... if sys.version_info < (3,): def next(self) -> bytes: ... else: def __next__(self) -> bytes: ... def close(self) -> None: ... def __del__(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/util.pyi0000664000175000017500000000156613577124116025042 0ustar davedave00000000000000import sys from typing import IO, Any, Optional from .types import WSGIEnvironment class FileWrapper: filelike: IO[bytes] blksize: int def __init__(self, filelike: IO[bytes], bklsize: int = ...) -> None: ... def __getitem__(self, key: Any) -> bytes: ... def __iter__(self) -> FileWrapper: ... if sys.version_info < (3,): def next(self) -> bytes: ... else: def __next__(self) -> bytes: ... def close(self) -> None: ... # only exists if filelike.close exists def guess_scheme(environ: WSGIEnvironment) -> str: ... def application_uri(environ: WSGIEnvironment) -> str: ... def request_uri(environ: WSGIEnvironment, include_query: bool = ...) -> str: ... def shift_path_info(environ: WSGIEnvironment) -> Optional[str]: ... def setup_testing_defaults(environ: WSGIEnvironment) -> None: ... def is_hop_by_hop(header_name: str) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/headers.pyi0000664000175000017500000000234213577124116025471 0ustar davedave00000000000000import sys from typing import overload, Pattern, Optional, List, Tuple _HeaderList = List[Tuple[str, str]] tspecials: Pattern[str] # undocumented class Headers: if sys.version_info < (3, 5): def __init__(self, headers: _HeaderList) -> None: ... else: def __init__(self, headers: Optional[_HeaderList] = ...) -> None: ... def __len__(self) -> int: ... def __setitem__(self, name: str, val: str) -> None: ... def __delitem__(self, name: str) -> None: ... def __getitem__(self, name: str) -> Optional[str]: ... if sys.version_info < (3,): def has_key(self, name: str) -> bool: ... def __contains__(self, name: str) -> bool: ... def get_all(self, name: str) -> List[str]: ... @overload def get(self, name: str, default: str) -> str: ... @overload def get(self, name: str, default: Optional[str] = ...) -> Optional[str]: ... def keys(self) -> List[str]: ... def values(self) -> List[str]: ... def items(self) -> _HeaderList: ... if sys.version_info >= (3,): def __bytes__(self) -> bytes: ... def setdefault(self, name: str, value: str) -> str: ... def add_header(self, _name: str, _value: Optional[str], **_params: Optional[str]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wsgiref/types.pyi0000664000175000017500000000331613577124116025224 0ustar davedave00000000000000# Type declaration for a WSGI Function # # wsgiref/types.py doesn't exist and neither do the types defined in this # file. They are provided for type checking purposes. # # This means you cannot simply import wsgiref.types in your code. Instead, # use the `TYPE_CHECKING` flag from the typing module: # # from typing import TYPE_CHECKING # # if TYPE_CHECKING: # from wsgiref.types import WSGIApplication # # This import is now only taken into account by the type checker. Consequently, # you need to use 'WSGIApplication' and not simply WSGIApplication when type # hinting your code. Otherwise Python will raise NameErrors. from sys import _OptExcInfo from typing import Callable, Dict, Iterable, List, Any, Text, Protocol, Tuple, Optional class StartResponse(Protocol): def __call__(self, status: str, headers: List[Tuple[str, str]], exc_info: Optional[_OptExcInfo] = ...) -> Callable[[bytes], Any]: ... WSGIEnvironment = Dict[Text, Any] WSGIApplication = Callable[[WSGIEnvironment, StartResponse], Iterable[bytes]] # WSGI input streams per PEP 3333 class InputStream(Protocol): def read(self, size: int = ...) -> bytes: ... def readline(self, size: int = ...) -> bytes: ... def readlines(self, hint: int = ...) -> List[bytes]: ... def __iter__(self) -> Iterable[bytes]: ... # WSGI error streams per PEP 3333 class ErrorStream(Protocol): def flush(self) -> None: ... def write(self, s: str) -> None: ... def writelines(self, seq: List[str]) -> None: ... class _Readable(Protocol): def read(self, size: int = ...) -> bytes: ... # Optional file wrapper in wsgi.file_wrapper class FileWrapper(Protocol): def __call__(self, file: _Readable, block_size: int = ...) -> Iterable[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/telnetlib.pyi0000664000175000017500000000524313577124116024375 0ustar davedave00000000000000# Stubs for telnetlib (Python 2 and 3) import socket import sys from typing import Any, Callable, Match, Optional, Pattern, Sequence, Tuple, Union DEBUGLEVEL: int TELNET_PORT: int IAC: bytes DONT: bytes DO: bytes WONT: bytes WILL: bytes theNULL: bytes SE: bytes NOP: bytes DM: bytes BRK: bytes IP: bytes AO: bytes AYT: bytes EC: bytes EL: bytes GA: bytes SB: bytes BINARY: bytes ECHO: bytes RCP: bytes SGA: bytes NAMS: bytes STATUS: bytes TM: bytes RCTE: bytes NAOL: bytes NAOP: bytes NAOCRD: bytes NAOHTS: bytes NAOHTD: bytes NAOFFD: bytes NAOVTS: bytes NAOVTD: bytes NAOLFD: bytes XASCII: bytes LOGOUT: bytes BM: bytes DET: bytes SUPDUP: bytes SUPDUPOUTPUT: bytes SNDLOC: bytes TTYPE: bytes EOR: bytes TUID: bytes OUTMRK: bytes TTYLOC: bytes VT3270REGIME: bytes X3PAD: bytes NAWS: bytes TSPEED: bytes LFLOW: bytes LINEMODE: bytes XDISPLOC: bytes OLD_ENVIRON: bytes AUTHENTICATION: bytes ENCRYPT: bytes NEW_ENVIRON: bytes TN3270E: bytes XAUTH: bytes CHARSET: bytes RSP: bytes COM_PORT_OPTION: bytes SUPPRESS_LOCAL_ECHO: bytes TLS: bytes KERMIT: bytes SEND_URL: bytes FORWARD_X: bytes PRAGMA_LOGON: bytes SSPI_LOGON: bytes PRAGMA_HEARTBEAT: bytes EXOPL: bytes NOOPT: bytes class Telnet: def __init__(self, host: Optional[str] = ..., port: int = ..., timeout: int = ...) -> None: ... def open(self, host: str, port: int = ..., timeout: int = ...) -> None: ... def msg(self, msg: str, *args: Any) -> None: ... def set_debuglevel(self, debuglevel: int) -> None: ... def close(self) -> None: ... def get_socket(self) -> socket.socket: ... def fileno(self) -> int: ... def write(self, buffer: bytes) -> None: ... def read_until(self, match: bytes, timeout: Optional[int] = ...) -> bytes: ... def read_all(self) -> bytes: ... def read_some(self) -> bytes: ... def read_very_eager(self) -> bytes: ... def read_eager(self) -> bytes: ... def read_lazy(self) -> bytes: ... def read_very_lazy(self) -> bytes: ... def read_sb_data(self) -> bytes: ... def set_option_negotiation_callback(self, callback: Optional[Callable[[socket.socket, bytes, bytes], Any]]) -> None: ... def process_rawq(self) -> None: ... def rawq_getchar(self) -> bytes: ... def fill_rawq(self) -> None: ... def sock_avail(self) -> bool: ... def interact(self) -> None: ... def mt_interact(self) -> None: ... def listener(self) -> None: ... def expect(self, list: Sequence[Union[Pattern[bytes], bytes]], timeout: Optional[int] = ...) -> Tuple[int, Optional[Match[bytes]], bytes]: ... if sys.version_info >= (3, 6): def __enter__(self) -> Telnet: ... def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/symtable.pyi0000664000175000017500000000315513577124116024233 0ustar davedave00000000000000import sys from typing import List, Sequence, Tuple, Text def symtable(code: Text, filename: Text, compile_type: Text) -> SymbolTable: ... class SymbolTable(object): def get_type(self) -> str: ... def get_id(self) -> int: ... def get_name(self) -> str: ... def get_lineno(self) -> int: ... def is_optimized(self) -> bool: ... def is_nested(self) -> bool: ... def has_children(self) -> bool: ... def has_exec(self) -> bool: ... if sys.version_info < (3, 0): def has_import_star(self) -> bool: ... def get_identifiers(self) -> Sequence[str]: ... def lookup(self, name: str) -> Symbol: ... def get_symbols(self) -> List[Symbol]: ... def get_children(self) -> List[SymbolTable]: ... class Function(SymbolTable): def get_parameters(self) -> Tuple[str, ...]: ... def get_locals(self) -> Tuple[str, ...]: ... def get_globals(self) -> Tuple[str, ...]: ... def get_frees(self) -> Tuple[str, ...]: ... class Class(SymbolTable): def get_methods(self) -> Tuple[str, ...]: ... class Symbol(object): def get_name(self) -> str: ... def is_referenced(self) -> bool: ... def is_parameter(self) -> bool: ... def is_global(self) -> bool: ... def is_declared_global(self) -> bool: ... def is_local(self) -> bool: ... if sys.version_info >= (3, 6): def is_annotated(self) -> bool: ... def is_free(self) -> bool: ... def is_imported(self) -> bool: ... def is_assigned(self) -> bool: ... def is_namespace(self) -> bool: ... def get_namespaces(self) -> Sequence[SymbolTable]: ... def get_namespace(self) -> SymbolTable: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/bz2.pyi0000664000175000017500000000307013577124116023104 0ustar davedave00000000000000import io import sys from typing import Any, IO, Optional, Union if sys.version_info >= (3, 6): from os import PathLike _PathOrFile = Union[str, bytes, IO[Any], PathLike[Any]] elif sys.version_info >= (3, 3): _PathOrFile = Union[str, bytes, IO[Any]] else: _PathOrFile = str def compress(data: bytes, compresslevel: int = ...) -> bytes: ... def decompress(data: bytes) -> bytes: ... if sys.version_info >= (3, 3): def open(filename: _PathOrFile, mode: str = ..., compresslevel: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... class BZ2File(io.BufferedIOBase, IO[bytes]): # type: ignore # python/mypy#5027 def __init__(self, filename: _PathOrFile, mode: str = ..., buffering: Optional[Any] = ..., compresslevel: int = ...) -> None: ... class BZ2Compressor(object): def __init__(self, compresslevel: int = ...) -> None: ... def compress(self, data: bytes) -> bytes: ... def flush(self) -> bytes: ... class BZ2Decompressor(object): if sys.version_info >= (3, 5): def decompress(self, data: bytes, max_length: int = ...) -> bytes: ... else: def decompress(self, data: bytes) -> bytes: ... if sys.version_info >= (3, 3): @property def eof(self) -> bool: ... if sys.version_info >= (3, 5): @property def needs_input(self) -> bool: ... @property def unused_data(self) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/py_compile.pyi0000664000175000017500000000232413577124116024550 0ustar davedave00000000000000# Stubs for py_compile (Python 2 and 3) import enum import sys from typing import Optional, List, Text, AnyStr, Union, Type _EitherStr = Union[bytes, Text] class PyCompileError(Exception): exc_type_name: str exc_value: BaseException file: str msg: str def __init__(self, exc_type: Type[BaseException], exc_value: BaseException, file: str, msg: str = ...) -> None: ... if sys.version_info >= (3, 7): class PycInvalidationMode(enum.Enum): TIMESTAMP: int = ... CHECKED_HASH: int = ... UNCHECKED_HASH: int = ... def _get_default_invalidation_mode() -> PycInvalidationMode: ... def compile(file: AnyStr, cfile: Optional[AnyStr] = ..., dfile: Optional[AnyStr] = ..., doraise: bool = ..., optimize: int = ..., invalidation_mode: Optional[PycInvalidationMode] = ...) -> Optional[AnyStr]: ... elif sys.version_info >= (3, 2): def compile(file: AnyStr, cfile: Optional[AnyStr] = ..., dfile: Optional[AnyStr] = ..., doraise: bool = ..., optimize: int = ...) -> Optional[AnyStr]: ... else: def compile(file: _EitherStr, cfile: Optional[_EitherStr] = ..., dfile: Optional[_EitherStr] = ..., doraise: bool = ...) -> None: ... def main(args: Optional[List[Text]] = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/base64.pyi0000664000175000017500000000306213577124116023474 0ustar davedave00000000000000# Stubs for base64 from typing import IO, Union, Text import sys if sys.version_info < (3,): _encodable = Union[bytes, unicode] _decodable = Union[bytes, unicode] else: _encodable = bytes _decodable = Union[bytes, str] def b64encode(s: _encodable, altchars: bytes = ...) -> bytes: ... def b64decode(s: _decodable, altchars: bytes = ..., validate: bool = ...) -> bytes: ... def standard_b64encode(s: _encodable) -> bytes: ... def standard_b64decode(s: _decodable) -> bytes: ... def urlsafe_b64encode(s: _encodable) -> bytes: ... def urlsafe_b64decode(s: _decodable) -> bytes: ... def b32encode(s: _encodable) -> bytes: ... def b32decode(s: _decodable, casefold: bool = ..., map01: bytes = ...) -> bytes: ... def b16encode(s: _encodable) -> bytes: ... def b16decode(s: _decodable, casefold: bool = ...) -> bytes: ... if sys.version_info >= (3, 4): def a85encode(b: _encodable, *, foldspaces: bool = ..., wrapcol: int = ..., pad: bool = ..., adobe: bool = ...) -> bytes: ... def a85decode(b: _decodable, *, foldspaces: bool = ..., adobe: bool = ..., ignorechars: Union[str, bytes] = ...) -> bytes: ... def b85encode(b: _encodable, pad: bool = ...) -> bytes: ... def b85decode(b: _decodable) -> bytes: ... def decode(input: IO[bytes], output: IO[bytes]) -> None: ... def decodebytes(s: bytes) -> bytes: ... def decodestring(s: bytes) -> bytes: ... def encode(input: IO[bytes], output: IO[bytes]) -> None: ... def encodebytes(s: bytes) -> bytes: ... def encodestring(s: bytes) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_bisect.pyi0000664000175000017500000000116113577124116024016 0ustar davedave00000000000000"""Stub file for the '_bisect' module.""" from typing import Sequence, MutableSequence, TypeVar _T = TypeVar('_T') def bisect(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def insort(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> None: ... def insort_left(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> None: ... def insort_right(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pickletools.pyi0000664000175000017500000001045313577124116024742 0ustar davedave00000000000000# Stubs for pickletools (Python 2 and 3) import sys from typing import Any, Callable, IO, Iterator, List, MutableMapping, Optional, Text, Tuple, Type, Union _Reader = Callable[[IO[bytes]], Any] if sys.version_info >= (3, 0): bytes_types: Tuple[Type[Any], ...] UP_TO_NEWLINE: int TAKEN_FROM_ARGUMENT1: int TAKEN_FROM_ARGUMENT4: int if sys.version_info >= (3, 3): TAKEN_FROM_ARGUMENT4U: int if sys.version_info >= (3, 4): TAKEN_FROM_ARGUMENT8U: int class ArgumentDescriptor(object): name: str n: int reader: _Reader doc: str def __init__(self, name: str, n: int, reader: _Reader, doc: str) -> None: ... def read_uint1(f: IO[bytes]) -> int: ... uint1: ArgumentDescriptor def read_uint2(f: IO[bytes]) -> int: ... uint2: ArgumentDescriptor def read_int4(f: IO[bytes]) -> int: ... int4: ArgumentDescriptor if sys.version_info >= (3, 3): def read_uint4(f: IO[bytes]) -> int: ... uint4: ArgumentDescriptor if sys.version_info >= (3, 5): def read_uint8(f: IO[bytes]) -> int: ... uint8: ArgumentDescriptor def read_stringnl(f: IO[bytes], decode: bool = ..., stripquotes: bool = ...) -> Union[bytes, Text]: ... stringnl: ArgumentDescriptor def read_stringnl_noescape(f: IO[bytes]) -> str: ... stringnl_noescape: ArgumentDescriptor def read_stringnl_noescape_pair(f: IO[bytes]) -> Text: ... stringnl_noescape_pair: ArgumentDescriptor def read_string1(f: IO[bytes]) -> str: ... string1: ArgumentDescriptor def read_string4(f: IO[bytes]) -> str: ... string4: ArgumentDescriptor if sys.version_info >= (3, 3): def read_bytes1(f: IO[bytes]) -> bytes: ... bytes1: ArgumentDescriptor def read_bytes4(f: IO[bytes]) -> bytes: ... bytes4: ArgumentDescriptor if sys.version_info >= (3, 4): def read_bytes8(f: IO[bytes]) -> bytes: ... bytes8: ArgumentDescriptor def read_unicodestringnl(f: IO[bytes]) -> Text: ... unicodestringnl: ArgumentDescriptor if sys.version_info >= (3, 4): def read_unicodestring1(f: IO[bytes]) -> Text: ... unicodestring1: ArgumentDescriptor def read_unicodestring4(f: IO[bytes]) -> Text: ... unicodestring4: ArgumentDescriptor if sys.version_info >= (3, 4): def read_unicodestring8(f: IO[bytes]) -> Text: ... unicodestring8: ArgumentDescriptor def read_decimalnl_short(f: IO[bytes]) -> int: ... def read_decimalnl_long(f: IO[bytes]) -> int: ... decimalnl_short: ArgumentDescriptor decimalnl_long: ArgumentDescriptor def read_floatnl(f: IO[bytes]) -> float: ... floatnl: ArgumentDescriptor def read_float8(f: IO[bytes]) -> float: ... float8: ArgumentDescriptor def read_long1(f: IO[bytes]) -> int: ... long1: ArgumentDescriptor def read_long4(f: IO[bytes]) -> int: ... long4: ArgumentDescriptor class StackObject(object): name: str obtype: Union[Type[Any], Tuple[Type[Any], ...]] doc: str def __init__(self, name: str, obtype: Union[Type[Any], Tuple[Type[Any], ...]], doc: str) -> None: ... pyint: StackObject pylong: StackObject pyinteger_or_bool: StackObject pybool: StackObject pyfloat: StackObject if sys.version_info >= (3, 4): pybytes_or_str: StackObject pystring: StackObject if sys.version_info >= (3, 0): pybytes: StackObject pyunicode: StackObject pynone: StackObject pytuple: StackObject pylist: StackObject pydict: StackObject if sys.version_info >= (3, 4): pyset: StackObject pyfrozenset: StackObject anyobject: StackObject markobject: StackObject stackslice: StackObject class OpcodeInfo(object): name: str code: str arg: Optional[ArgumentDescriptor] stack_before: List[StackObject] stack_after: List[StackObject] proto: int doc: str def __init__(self, name: str, code: str, arg: Optional[ArgumentDescriptor], stack_before: List[StackObject], stack_after: List[StackObject], proto: int, doc: str) -> None: ... opcodes: List[OpcodeInfo] def genops(pickle: Union[bytes, IO[bytes]]) -> Iterator[Tuple[OpcodeInfo, Optional[Any], Optional[int]]]: ... def optimize(p: Union[bytes, IO[bytes]]) -> bytes: ... if sys.version_info >= (3, 2): def dis(pickle: Union[bytes, IO[bytes]], out: Optional[IO[str]] = ..., memo: Optional[MutableMapping[int, Any]] = ..., indentlevel: int = ..., annotate: int = ...) -> None: ... else: def dis(pickle: Union[bytes, IO[bytes]], out: Optional[IO[str]] = ..., memo: Optional[MutableMapping[int, Any]] = ..., indentlevel: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/codecs.pyi0000664000175000017500000002547713577124116023666 0ustar davedave00000000000000import sys from typing import Any, BinaryIO, Callable, Generator, IO, Iterable, Iterator, List, Optional, Protocol, Text, TextIO, Tuple, Type, TypeVar, Union from abc import abstractmethod import types # TODO: this only satisfies the most common interface, where # bytes (py2 str) is the raw form and str (py2 unicode) is the cooked form. # In the long run, both should become template parameters maybe? # There *are* bytes->bytes and str->str encodings in the standard library. # They are much more common in Python 2 than in Python 3. _Decoded = Text _Encoded = bytes class _Encoder(Protocol): def __call__(self, input: _Decoded, errors: str = ...) -> Tuple[_Encoded, int]: ... # signature of Codec().encode class _Decoder(Protocol): def __call__(self, input: _Encoded, errors: str = ...) -> Tuple[_Decoded, int]: ... # signature of Codec().decode class _StreamReader(Protocol): def __call__(self, stream: IO[_Encoded], errors: str = ...) -> StreamReader: ... class _StreamWriter(Protocol): def __call__(self, stream: IO[_Encoded], errors: str = ...) -> StreamWriter: ... class _IncrementalEncoder(Protocol): def __call__(self, errors: str = ...) -> IncrementalEncoder: ... class _IncrementalDecoder(Protocol): def __call__(self, errors: str = ...) -> IncrementalDecoder: ... def encode(obj: _Decoded, encoding: str = ..., errors: str = ...) -> _Encoded: ... def decode(obj: _Encoded, encoding: str = ..., errors: str = ...) -> _Decoded: ... def lookup(encoding: str) -> CodecInfo: ... def utf_16_be_decode(__obj: _Encoded, __errors: str = ..., __final: bool = ...) -> Tuple[_Decoded, int]: ... # undocumented def utf_16_be_encode(__obj: _Decoded, __errors: str = ...) -> Tuple[_Encoded, int]: ... # undocumented class CodecInfo(Tuple[_Encoder, _Decoder, _StreamReader, _StreamWriter]): @property def encode(self) -> _Encoder: ... @property def decode(self) -> _Decoder: ... @property def streamreader(self) -> _StreamReader: ... @property def streamwriter(self) -> _StreamWriter: ... @property def incrementalencoder(self) -> _IncrementalEncoder: ... @property def incrementaldecoder(self) -> _IncrementalDecoder: ... name: str def __init__( self, encode: _Encoder, decode: _Decoder, streamreader: _StreamReader = ..., streamwriter: _StreamWriter = ..., incrementalencoder: _IncrementalEncoder = ..., incrementaldecoder: _IncrementalDecoder = ..., name: str = ..., ) -> None: ... def getencoder(encoding: str) -> _Encoder: ... def getdecoder(encoding: str) -> _Decoder: ... def getincrementalencoder(encoding: str) -> _IncrementalEncoder: ... def getincrementaldecoder(encoding: str) -> _IncrementalDecoder: ... def getreader(encoding: str) -> _StreamReader: ... def getwriter(encoding: str) -> _StreamWriter: ... def register(search_function: Callable[[str], Optional[CodecInfo]]) -> None: ... def open(filename: str, mode: str = ..., encoding: str = ..., errors: str = ..., buffering: int = ...) -> StreamReaderWriter: ... def EncodedFile(file: IO[_Encoded], data_encoding: str, file_encoding: str = ..., errors: str = ...) -> StreamRecoder: ... def iterencode(iterator: Iterable[_Decoded], encoding: str, errors: str = ...) -> Generator[_Encoded, None, None]: ... def iterdecode(iterator: Iterable[_Encoded], encoding: str, errors: str = ...) -> Generator[_Decoded, None, None]: ... BOM: bytes BOM_BE: bytes BOM_LE: bytes BOM_UTF8: bytes BOM_UTF16: bytes BOM_UTF16_BE: bytes BOM_UTF16_LE: bytes BOM_UTF32: bytes BOM_UTF32_BE: bytes BOM_UTF32_LE: bytes # It is expected that different actions be taken depending on which of the # three subclasses of `UnicodeError` is actually ...ed. However, the Union # is still needed for at least one of the cases. def register_error(name: str, error_handler: Callable[[UnicodeError], Tuple[Union[str, bytes], int]]) -> None: ... def lookup_error(name: str) -> Callable[[UnicodeError], Tuple[Union[str, bytes], int]]: ... def strict_errors(exception: UnicodeError) -> Tuple[Union[str, bytes], int]: ... def replace_errors(exception: UnicodeError) -> Tuple[Union[str, bytes], int]: ... def ignore_errors(exception: UnicodeError) -> Tuple[Union[str, bytes], int]: ... def xmlcharrefreplace_errors(exception: UnicodeError) -> Tuple[Union[str, bytes], int]: ... def backslashreplace_errors(exception: UnicodeError) -> Tuple[Union[str, bytes], int]: ... class Codec: # These are sort of @abstractmethod but sort of not. # The StreamReader and StreamWriter subclasses only implement one. def encode(self, input: _Decoded, errors: str = ...) -> Tuple[_Encoded, int]: ... def decode(self, input: _Encoded, errors: str = ...) -> Tuple[_Decoded, int]: ... class IncrementalEncoder: errors: str def __init__(self, errors: str = ...) -> None: ... @abstractmethod def encode(self, object: _Decoded, final: bool = ...) -> _Encoded: ... def reset(self) -> None: ... # documentation says int but str is needed for the subclass. def getstate(self) -> Union[int, _Decoded]: ... def setstate(self, state: Union[int, _Decoded]) -> None: ... class IncrementalDecoder: errors: str def __init__(self, errors: str = ...) -> None: ... @abstractmethod def decode(self, object: _Encoded, final: bool = ...) -> _Decoded: ... def reset(self) -> None: ... def getstate(self) -> Tuple[_Encoded, int]: ... def setstate(self, state: Tuple[_Encoded, int]) -> None: ... # These are not documented but used in encodings/*.py implementations. class BufferedIncrementalEncoder(IncrementalEncoder): buffer: str def __init__(self, errors: str = ...) -> None: ... @abstractmethod def _buffer_encode(self, input: _Decoded, errors: str, final: bool) -> _Encoded: ... def encode(self, input: _Decoded, final: bool = ...) -> _Encoded: ... class BufferedIncrementalDecoder(IncrementalDecoder): buffer: bytes def __init__(self, errors: str = ...) -> None: ... @abstractmethod def _buffer_decode(self, input: _Encoded, errors: str, final: bool) -> Tuple[_Decoded, int]: ... def decode(self, object: _Encoded, final: bool = ...) -> _Decoded: ... _SW = TypeVar("_SW", bound=StreamWriter) # TODO: it is not possible to specify the requirement that all other # attributes and methods are passed-through from the stream. class StreamWriter(Codec): errors: str def __init__(self, stream: IO[_Encoded], errors: str = ...) -> None: ... def write(self, obj: _Decoded) -> None: ... def writelines(self, list: Iterable[_Decoded]) -> None: ... def reset(self) -> None: ... def __enter__(self: _SW) -> _SW: ... def __exit__( self, typ: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[types.TracebackType] ) -> None: ... def __getattr__(self, name: str) -> Any: ... _SR = TypeVar("_SR", bound=StreamReader) class StreamReader(Codec): errors: str def __init__(self, stream: IO[_Encoded], errors: str = ...) -> None: ... def read(self, size: int = ..., chars: int = ..., firstline: bool = ...) -> _Decoded: ... def readline(self, size: int = ..., keepends: bool = ...) -> _Decoded: ... def readlines(self, sizehint: int = ..., keepends: bool = ...) -> List[_Decoded]: ... def reset(self) -> None: ... def __enter__(self: _SR) -> _SR: ... def __exit__( self, typ: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[types.TracebackType] ) -> None: ... def __iter__(self) -> Iterator[_Decoded]: ... def __getattr__(self, name: str) -> Any: ... _T = TypeVar("_T", bound=StreamReaderWriter) # Doesn't actually inherit from TextIO, but wraps a BinaryIO to provide text reading and writing # and delegates attributes to the underlying binary stream with __getattr__. class StreamReaderWriter(TextIO): def __init__(self, stream: IO[_Encoded], Reader: _StreamReader, Writer: _StreamWriter, errors: str = ...) -> None: ... def read(self, size: int = ...) -> _Decoded: ... def readline(self, size: Optional[int] = ...) -> _Decoded: ... def readlines(self, sizehint: Optional[int] = ...) -> List[_Decoded]: ... if sys.version_info >= (3,): def __next__(self) -> Text: ... else: def next(self) -> Text: ... def __iter__(self: _T) -> _T: ... # This actually returns None, but that's incompatible with the supertype def write(self, data: _Decoded) -> int: ... def writelines(self, list: Iterable[_Decoded]) -> None: ... def reset(self) -> None: ... # Same as write() def seek(self, offset: int, whence: int = ...) -> int: ... def __enter__(self: _T) -> _T: ... def __exit__( self, typ: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[types.TracebackType] ) -> None: ... def __getattr__(self, name: str) -> Any: ... # These methods don't actually exist directly, but they are needed to satisfy the TextIO # interface. At runtime, they are delegated through __getattr__. def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def readable(self) -> bool: ... def truncate(self, size: Optional[int] = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def writable(self) -> bool: ... _SRT = TypeVar("_SRT", bound=StreamRecoder) class StreamRecoder(BinaryIO): def __init__( self, stream: IO[_Encoded], encode: _Encoder, decode: _Decoder, Reader: _StreamReader, Writer: _StreamWriter, errors: str = ..., ) -> None: ... def read(self, size: int = ...) -> bytes: ... def readline(self, size: Optional[int] = ...) -> bytes: ... def readlines(self, sizehint: Optional[int] = ...) -> List[bytes]: ... if sys.version_info >= (3,): def __next__(self) -> bytes: ... else: def next(self) -> bytes: ... def __iter__(self: _SRT) -> _SRT: ... def write(self, data: bytes) -> int: ... def writelines(self, list: Iterable[bytes]) -> int: ... # type: ignore # it's supposed to return None def reset(self) -> None: ... def __getattr__(self, name: str) -> Any: ... def __enter__(self: _SRT) -> _SRT: ... def __exit__( self, type: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] ) -> None: ... # These methods don't actually exist directly, but they are needed to satisfy the BinaryIO # interface. At runtime, they are delegated through __getattr__. def seek(self, offset: int, whence: int = ...) -> int: ... def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def readable(self) -> bool: ... def truncate(self, size: Optional[int] = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def writable(self) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ctypes/0000775000175000017500000000000013577125145023176 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ctypes/__init__.pyi0000664000175000017500000002676113577124116025471 0ustar davedave00000000000000# Stubs for ctypes from array import array from typing import ( Any, Callable, ClassVar, Iterator, Iterable, List, Mapping, Optional, Sequence, Sized, Text, Tuple, Type, Generic, TypeVar, overload, ) from typing import Union as _UnionT import sys _T = TypeVar('_T') _DLLT = TypeVar('_DLLT', bound=CDLL) _CT = TypeVar('_CT', bound=_CData) RTLD_GLOBAL: int = ... RTLD_LOCAL: int = ... DEFAULT_MODE: int = ... class CDLL(object): _func_flags_: ClassVar[int] = ... _func_restype_: ClassVar[_CData] = ... _name: str = ... _handle: int = ... _FuncPtr: Type[_FuncPointer] = ... def __init__( self, name: str, mode: int = ..., handle: Optional[int] = ..., use_errno: bool = ..., use_last_error: bool = ..., winmode: Optional[int] = ..., ) -> None: ... def __getattr__(self, name: str) -> _FuncPointer: ... def __getitem__(self, name: str) -> _FuncPointer: ... if sys.platform == 'win32': class OleDLL(CDLL): ... class WinDLL(CDLL): ... class PyDLL(CDLL): ... class LibraryLoader(Generic[_DLLT]): def __init__(self, dlltype: Type[_DLLT]) -> None: ... def __getattr__(self, name: str) -> _DLLT: ... def __getitem__(self, name: str) -> _DLLT: ... def LoadLibrary(self, name: str) -> _DLLT: ... cdll: LibraryLoader[CDLL] = ... if sys.platform == 'win32': windll: LibraryLoader[WinDLL] = ... oledll: LibraryLoader[OleDLL] = ... pydll: LibraryLoader[PyDLL] = ... pythonapi: PyDLL = ... # Anything that implements the read-write buffer interface. # The buffer interface is defined purely on the C level, so we cannot define a normal Protocol # for it. Instead we have to list the most common stdlib buffer classes in a Union. _WritableBuffer = _UnionT[bytearray, memoryview, array, _CData] # Same as _WritableBuffer, but also includes read-only buffer types (like bytes). _ReadOnlyBuffer = _UnionT[_WritableBuffer, bytes] class _CDataMeta(type): # By default mypy complains about the following two methods, because strictly speaking cls # might not be a Type[_CT]. However this can never actually happen, because the only class that # uses _CDataMeta as its metaclass is _CData. So it's safe to ignore the errors here. def __mul__(cls: Type[_CT], other: int) -> Type[Array[_CT]]: ... # type: ignore def __rmul__(cls: Type[_CT], other: int) -> Type[Array[_CT]]: ... # type: ignore class _CData(metaclass=_CDataMeta): _b_base: int = ... _b_needsfree_: bool = ... _objects: Optional[Mapping[Any, int]] = ... @classmethod def from_buffer(cls: Type[_CT], source: _WritableBuffer, offset: int = ...) -> _CT: ... @classmethod def from_buffer_copy(cls: Type[_CT], source: _ReadOnlyBuffer, offset: int = ...) -> _CT: ... @classmethod def from_address(cls: Type[_CT], address: int) -> _CT: ... @classmethod def from_param(cls: Type[_CT], obj: Any) -> _UnionT[_CT, _CArgObject]: ... @classmethod def in_dll(cls: Type[_CT], library: CDLL, name: str) -> _CT: ... class _PointerLike(_CData): ... _ECT = Callable[[Optional[Type[_CData]], _FuncPointer, Tuple[_CData, ...]], _CData] _PF = _UnionT[ Tuple[int], Tuple[int, str], Tuple[int, str, Any] ] class _FuncPointer(_PointerLike, _CData): restype: _UnionT[Type[_CData], Callable[[int], None], None] = ... argtypes: Sequence[Type[_CData]] = ... errcheck: _ECT = ... @overload def __init__(self, address: int) -> None: ... @overload def __init__(self, callable: Callable[..., Any]) -> None: ... @overload def __init__(self, func_spec: Tuple[_UnionT[str, int], CDLL], paramflags: Tuple[_PF, ...] = ...) -> None: ... @overload def __init__(self, vtlb_index: int, name: str, paramflags: Tuple[_PF, ...] = ..., iid: pointer[c_int] = ...) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class ArgumentError(Exception): ... def CFUNCTYPE(restype: Optional[Type[_CData]], *argtypes: Type[_CData], use_errno: bool = ..., use_last_error: bool = ...) -> Type[_FuncPointer]: ... if sys.platform == 'win32': def WINFUNCTYPE(restype: Optional[Type[_CData]], *argtypes: Type[_CData], use_errno: bool = ..., use_last_error: bool = ...) -> Type[_FuncPointer]: ... def PYFUNCTYPE(restype: Optional[Type[_CData]], *argtypes: Type[_CData]) -> Type[_FuncPointer]: ... class _CArgObject: ... # Any type that can be implicitly converted to c_void_p when passed as a C function argument. # (bytes is not included here, see below.) _CVoidPLike = _UnionT[_PointerLike, Array[Any], _CArgObject, int] # Same as above, but including types known to be read-only (i. e. bytes). # This distinction is not strictly necessary (ctypes doesn't differentiate between const # and non-const pointers), but it catches errors like memmove(b'foo', buf, 4) # when memmove(buf, b'foo', 4) was intended. _CVoidConstPLike = _UnionT[_CVoidPLike, bytes] def addressof(obj: _CData) -> int: ... def alignment(obj_or_type: _UnionT[_CData, Type[_CData]]) -> int: ... def byref(obj: _CData, offset: int = ...) -> _CArgObject: ... _PT = TypeVar('_PT', bound=_PointerLike) def cast(obj: _UnionT[_CData, _CArgObject], type: Type[_PT]) -> _PT: ... def create_string_buffer(init_or_size: _UnionT[int, bytes], size: Optional[int] = ...) -> Array[c_char]: ... c_buffer = create_string_buffer def create_unicode_buffer(init_or_size: _UnionT[int, Text], size: Optional[int] = ...) -> Array[c_wchar]: ... if sys.platform == 'win32': def DllCanUnloadNow() -> int: ... def DllGetClassObject(rclsid: Any, riid: Any, ppv: Any) -> int: ... # TODO not documented def FormatError(code: int) -> str: ... def GetLastError() -> int: ... def get_errno() -> int: ... if sys.platform == 'win32': def get_last_error() -> int: ... def memmove(dst: _CVoidPLike, src: _CVoidConstPLike, count: int) -> None: ... def memset(dst: _CVoidPLike, c: int, count: int) -> None: ... def POINTER(type: Type[_CT]) -> Type[pointer[_CT]]: ... # The real ctypes.pointer is a function, not a class. The stub version of pointer behaves like # ctypes._Pointer in that it is the base class for all pointer types. Unlike the real _Pointer, # it can be instantiated directly (to mimic the behavior of the real pointer function). class pointer(Generic[_CT], _PointerLike, _CData): _type_: ClassVar[Type[_CT]] = ... contents: _CT = ... def __init__(self, arg: _CT = ...) -> None: ... @overload def __getitem__(self, i: int) -> _CT: ... @overload def __getitem__(self, s: slice) -> List[_CT]: ... @overload def __setitem__(self, i: int, o: _CT) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[_CT]) -> None: ... def resize(obj: _CData, size: int) -> None: ... if sys.version_info < (3,): def set_conversion_mode(encoding: str, errors: str) -> Tuple[str, str]: ... def set_errno(value: int) -> int: ... if sys.platform == 'win32': def set_last_error(value: int) -> int: ... def sizeof(obj_or_type: _UnionT[_CData, Type[_CData]]) -> int: ... def string_at(address: _CVoidConstPLike, size: int = ...) -> bytes: ... if sys.platform == 'win32': def WinError(code: Optional[int] = ..., desc: Optional[str] = ...) -> WindowsError: ... def wstring_at(address: _CVoidConstPLike, size: int = ...) -> str: ... class _SimpleCData(Generic[_T], _CData): value: _T = ... def __init__(self, value: _T = ...) -> None: ... class c_byte(_SimpleCData[int]): ... class c_char(_SimpleCData[bytes]): def __init__(self, value: _UnionT[int, bytes] = ...) -> None: ... class c_char_p(_PointerLike, _SimpleCData[Optional[bytes]]): def __init__(self, value: Optional[_UnionT[int, bytes]] = ...) -> None: ... class c_double(_SimpleCData[float]): ... class c_longdouble(_SimpleCData[float]): ... class c_float(_SimpleCData[float]): ... class c_int(_SimpleCData[int]): ... class c_int8(_SimpleCData[int]): ... class c_int16(_SimpleCData[int]): ... class c_int32(_SimpleCData[int]): ... class c_int64(_SimpleCData[int]): ... class c_long(_SimpleCData[int]): ... class c_longlong(_SimpleCData[int]): ... class c_short(_SimpleCData[int]): ... class c_size_t(_SimpleCData[int]): ... class c_ssize_t(_SimpleCData[int]): ... class c_ubyte(_SimpleCData[int]): ... class c_uint(_SimpleCData[int]): ... class c_uint8(_SimpleCData[int]): ... class c_uint16(_SimpleCData[int]): ... class c_uint32(_SimpleCData[int]): ... class c_uint64(_SimpleCData[int]): ... class c_ulong(_SimpleCData[int]): ... class c_ulonglong(_SimpleCData[int]): ... class c_ushort(_SimpleCData[int]): ... class c_void_p(_PointerLike, _SimpleCData[Optional[int]]): ... class c_wchar(_SimpleCData[Text]): ... class c_wchar_p(_PointerLike, _SimpleCData[Optional[Text]]): def __init__(self, value: Optional[_UnionT[int, Text]] = ...) -> None: ... class c_bool(_SimpleCData[bool]): def __init__(self, value: bool = ...) -> None: ... if sys.platform == 'win32': class HRESULT(_SimpleCData[int]): ... # TODO undocumented class py_object(_SimpleCData[_T]): ... class _CField: offset: int = ... size: int = ... class _StructUnionMeta(_CDataMeta): _fields_: Sequence[_UnionT[Tuple[str, Type[_CData]], Tuple[str, Type[_CData], int]]] = ... _pack_: int = ... _anonymous_: Sequence[str] = ... def __getattr__(self, name: str) -> _CField: ... class _StructUnionBase(_CData, metaclass=_StructUnionMeta): def __init__(self, *args: Any, **kw: Any) -> None: ... def __getattr__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... class Union(_StructUnionBase): ... class Structure(_StructUnionBase): ... class BigEndianStructure(Structure): ... class LittleEndianStructure(Structure): ... class Array(Generic[_CT], _CData): _length_: ClassVar[int] = ... _type_: ClassVar[Type[_CT]] = ... raw: bytes = ... # Note: only available if _CT == c_char value: Any = ... # Note: bytes if _CT == c_char, Text if _CT == c_wchar, unavailable otherwise # TODO These methods cannot be annotated correctly at the moment. # All of these "Any"s stand for the array's element type, but it's not possible to use _CT # here, because of a special feature of ctypes. # By default, when accessing an element of an Array[_CT], the returned object has type _CT. # However, when _CT is a "simple type" like c_int, ctypes automatically "unboxes" the object # and converts it to the corresponding Python primitive. For example, when accessing an element # of an Array[c_int], a Python int object is returned, not a c_int. # This behavior does *not* apply to subclasses of "simple types". # If MyInt is a subclass of c_int, then accessing an element of an Array[MyInt] returns # a MyInt, not an int. # This special behavior is not easy to model in a stub, so for now all places where # the array element type would belong are annotated with Any instead. def __init__(self, *args: Any) -> None: ... @overload def __getitem__(self, i: int) -> Any: ... @overload def __getitem__(self, s: slice) -> List[Any]: ... @overload def __setitem__(self, i: int, o: Any) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[Any]) -> None: ... def __iter__(self) -> Iterator[Any]: ... # Can't inherit from Sized because the metaclass conflict between # Sized and _CData prevents using _CDataMeta. def __len__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ctypes/wintypes.pyi0000664000175000017500000001072613577124116025606 0ustar davedave00000000000000from ctypes import ( _SimpleCData, Array, Structure, c_byte, c_char, c_char_p, c_double, c_float, c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void_p, c_wchar, c_wchar_p, pointer, ) BYTE = c_byte WORD = c_ushort DWORD = c_ulong CHAR = c_char WCHAR = c_wchar UINT = c_uint INT = c_int DOUBLE = c_double FLOAT = c_float BOOLEAN = BYTE BOOL = c_long class VARIANT_BOOL(_SimpleCData[bool]): ... ULONG = c_ulong LONG = c_long USHORT = c_ushort SHORT = c_short LARGE_INTEGER = c_longlong _LARGE_INTEGER = c_longlong ULARGE_INTEGER = c_ulonglong _ULARGE_INTEGER = c_ulonglong OLESTR = c_wchar_p LPOLESTR = c_wchar_p LPCOLESTR = c_wchar_p LPWSTR = c_wchar_p LPCWSTR = c_wchar_p LPSTR = c_char_p LPCSTR = c_char_p LPVOID = c_void_p LPCVOID = c_void_p # These two types are pointer-sized unsigned and signed ints, respectively. # At runtime, they are either c_[u]long or c_[u]longlong, depending on the host's pointer size # (they are not really separate classes). class WPARAM(_SimpleCData[int]): ... class LPARAM(_SimpleCData[int]): ... ATOM = WORD LANGID = WORD COLORREF = DWORD LGRPID = DWORD LCTYPE = DWORD LCID = DWORD HANDLE = c_void_p HACCEL = HANDLE HBITMAP = HANDLE HBRUSH = HANDLE HCOLORSPACE = HANDLE HDC = HANDLE HDESK = HANDLE HDWP = HANDLE HENHMETAFILE = HANDLE HFONT = HANDLE HGDIOBJ = HANDLE HGLOBAL = HANDLE HHOOK = HANDLE HICON = HANDLE HINSTANCE = HANDLE HKEY = HANDLE HKL = HANDLE HLOCAL = HANDLE HMENU = HANDLE HMETAFILE = HANDLE HMODULE = HANDLE HMONITOR = HANDLE HPALETTE = HANDLE HPEN = HANDLE HRGN = HANDLE HRSRC = HANDLE HSTR = HANDLE HTASK = HANDLE HWINSTA = HANDLE HWND = HANDLE SC_HANDLE = HANDLE SERVICE_STATUS_HANDLE = HANDLE class RECT(Structure): left: LONG top: LONG right: LONG bottom: LONG RECTL = RECT _RECTL = RECT tagRECT = RECT class _SMALL_RECT(Structure): Left: SHORT Top: SHORT Right: SHORT Bottom: SHORT SMALL_RECT = _SMALL_RECT class _COORD(Structure): X: SHORT Y: SHORT class POINT(Structure): x: LONG y: LONG POINTL = POINT _POINTL = POINT tagPOINT = POINT class SIZE(Structure): cx: LONG cy: LONG SIZEL = SIZE tagSIZE = SIZE def RGB(red: int, green: int, blue: int) -> int: ... class FILETIME(Structure): dwLowDateTime: DWORD dwHighDateTime: DWORD _FILETIME = FILETIME class MSG(Structure): hWnd: HWND message: UINT wParam: WPARAM lParam: LPARAM time: DWORD pt: POINT tagMSG = MSG MAX_PATH: int class WIN32_FIND_DATAA(Structure): dwFileAttributes: DWORD ftCreationTime: FILETIME ftLastAccessTime: FILETIME ftLastWriteTime: FILETIME nFileSizeHigh: DWORD nFileSizeLow: DWORD dwReserved0: DWORD dwReserved1: DWORD cFileName: Array[CHAR] cAlternateFileName: Array[CHAR] class WIN32_FIND_DATAW(Structure): dwFileAttributes: DWORD ftCreationTime: FILETIME ftLastAccessTime: FILETIME ftLastWriteTime: FILETIME nFileSizeHigh: DWORD nFileSizeLow: DWORD dwReserved0: DWORD dwReserved1: DWORD cFileName: Array[WCHAR] cAlternateFileName: Array[WCHAR] # These pointer type definitions use pointer[...] instead of POINTER(...), to allow them # to be used in type annotations. PBOOL = pointer[BOOL] LPBOOL = pointer[BOOL] PBOOLEAN = pointer[BOOLEAN] PBYTE = pointer[BYTE] LPBYTE = pointer[BYTE] PCHAR = pointer[CHAR] LPCOLORREF = pointer[COLORREF] PDWORD = pointer[DWORD] LPDWORD = pointer[DWORD] PFILETIME = pointer[FILETIME] LPFILETIME = pointer[FILETIME] PFLOAT = pointer[FLOAT] PHANDLE = pointer[HANDLE] LPHANDLE = pointer[HANDLE] PHKEY = pointer[HKEY] LPHKL = pointer[HKL] PINT = pointer[INT] LPINT = pointer[INT] PLARGE_INTEGER = pointer[LARGE_INTEGER] PLCID = pointer[LCID] PLONG = pointer[LONG] LPLONG = pointer[LONG] PMSG = pointer[MSG] LPMSG = pointer[MSG] PPOINT = pointer[POINT] LPPOINT = pointer[POINT] PPOINTL = pointer[POINTL] PRECT = pointer[RECT] LPRECT = pointer[RECT] PRECTL = pointer[RECTL] LPRECTL = pointer[RECTL] LPSC_HANDLE = pointer[SC_HANDLE] PSHORT = pointer[SHORT] PSIZE = pointer[SIZE] LPSIZE = pointer[SIZE] PSIZEL = pointer[SIZEL] LPSIZEL = pointer[SIZEL] PSMALL_RECT = pointer[SMALL_RECT] PUINT = pointer[UINT] LPUINT = pointer[UINT] PULARGE_INTEGER = pointer[ULARGE_INTEGER] PULONG = pointer[ULONG] PUSHORT = pointer[USHORT] PWCHAR = pointer[WCHAR] PWIN32_FIND_DATAA = pointer[WIN32_FIND_DATAA] LPWIN32_FIND_DATAA = pointer[WIN32_FIND_DATAA] PWIN32_FIND_DATAW = pointer[WIN32_FIND_DATAW] LPWIN32_FIND_DATAW = pointer[WIN32_FIND_DATAW] PWORD = pointer[WORD] LPWORD = pointer[WORD] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ctypes/util.pyi0000664000175000017500000000027313577124116024675 0ustar davedave00000000000000# Stubs for ctypes.util from typing import Optional import sys def find_library(name: str) -> Optional[str]: ... if sys.platform == 'win32': def find_msvcrt() -> Optional[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/poplib.pyi0000664000175000017500000000467413577124116023707 0ustar davedave00000000000000# Stubs for poplib (Python 2 and 3) import socket import ssl import sys from typing import ( Any, BinaryIO, Dict, List, NoReturn, Optional, overload, Pattern, Text, Tuple, ) _LongResp = Tuple[bytes, List[bytes], int] class error_proto(Exception): ... POP3_PORT: int POP3_SSL_PORT: int CR: bytes LF: bytes CRLF: bytes class POP3: if sys.version_info >= (3, 0): encoding: Text host: Text port: int sock: socket.socket file: BinaryIO welcome: bytes def __init__(self, host: Text, port: int = ..., timeout: float = ...) -> None: ... def getwelcome(self) -> bytes: ... def set_debuglevel(self, level: int) -> None: ... def user(self, user: Text) -> bytes: ... def pass_(self, pswd: Text) -> bytes: ... def stat(self) -> Tuple[int, int]: ... def list(self, which: Optional[Any] = ...) -> _LongResp: ... def retr(self, which: Any) -> _LongResp: ... def dele(self, which: Any) -> bytes: ... def noop(self) -> bytes: ... def rset(self) -> bytes: ... def quit(self) -> bytes: ... def close(self) -> None: ... def rpop(self, user: Text) -> bytes: ... timestamp: Pattern[Text] if sys.version_info < (3, 0): def apop(self, user: Text, secret: Text) -> bytes: ... else: def apop(self, user: Text, password: Text) -> bytes: ... def top(self, which: Any, howmuch: int) -> _LongResp: ... @overload def uidl(self) -> _LongResp: ... @overload def uidl(self, which: Any) -> bytes: ... if sys.version_info >= (3, 5): def utf8(self) -> bytes: ... if sys.version_info >= (3, 4): def capa(self) -> Dict[Text, List[Text]]: ... def stls(self, context: Optional[ssl.SSLContext] = ...) -> bytes: ... class POP3_SSL(POP3): if sys.version_info >= (3, 0): def __init__(self, host: Text, port: int = ..., keyfile: Optional[Text] = ..., certfile: Optional[Text] = ..., timeout: float = ..., context: Optional[ssl.SSLContext] = ...) -> None: ... else: def __init__(self, host: Text, port: int = ..., keyfile: Optional[Text] = ..., certfile: Optional[Text] = ..., timeout: float = ...) -> None: ... if sys.version_info >= (3, 4): # "context" is actually the last argument, but that breaks LSP and it doesn't really matter because all the arguments are ignored def stls(self, context: Any = ..., keyfile: Any = ..., certfile: Any = ...) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/shutil.pyi0000664000175000017500000001406313577124116023723 0ustar davedave00000000000000import os import sys # 'bytes' paths are not properly supported: they don't work with all functions, # sometimes they only work partially (broken exception messages), and the test # cases don't use them. from typing import ( List, Iterable, Callable, Any, Tuple, Sequence, NamedTuple, IO, AnyStr, Optional, Union, Set, TypeVar, overload, Type, Protocol, Text ) if sys.version_info >= (3, 6): _Path = Union[str, os.PathLike[str]] _AnyStr = str _AnyPath = TypeVar("_AnyPath", str, os.PathLike[str]) # Return value of some functions that may either return a path-like object that was passed in or # a string _PathReturn = Any elif sys.version_info >= (3,): _Path = str _AnyStr = str _AnyPath = str _PathReturn = str else: _Path = Text _AnyStr = TypeVar("_AnyStr", str, unicode) _AnyPath = TypeVar("_AnyPath", str, unicode) _PathReturn = Type[None] if sys.version_info >= (3,): class Error(OSError): ... class SameFileError(Error): ... class SpecialFileError(OSError): ... class ExecError(OSError): ... class ReadError(OSError): ... class RegistryError(Exception): ... else: class Error(EnvironmentError): ... class SpecialFileError(EnvironmentError): ... class ExecError(EnvironmentError): ... _S_co = TypeVar("_S_co", covariant=True) _S_contra = TypeVar("_S_contra", contravariant=True) class _Reader(Protocol[_S_co]): def read(self, length: int) -> _S_co: ... class _Writer(Protocol[_S_contra]): def write(self, data: _S_contra) -> Any: ... def copyfileobj(fsrc: _Reader[AnyStr], fdst: _Writer[AnyStr], length: int = ...) -> None: ... if sys.version_info >= (3,): def copyfile(src: _Path, dst: _AnyPath, *, follow_symlinks: bool = ...) -> _AnyPath: ... def copymode(src: _Path, dst: _Path, *, follow_symlinks: bool = ...) -> None: ... def copystat(src: _Path, dst: _Path, *, follow_symlinks: bool = ...) -> None: ... def copy(src: _Path, dst: _Path, *, follow_symlinks: bool = ...) -> _PathReturn: ... def copy2(src: _Path, dst: _Path, *, follow_symlinks: bool = ...) -> _PathReturn: ... else: def copyfile(src: _Path, dst: _Path) -> None: ... def copymode(src: _Path, dst: _Path) -> None: ... def copystat(src: _Path, dst: _Path) -> None: ... def copy(src: _Path, dst: _Path) -> _PathReturn: ... def copy2(src: _Path, dst: _Path) -> _PathReturn: ... def ignore_patterns(*patterns: _Path) -> Callable[[Any, List[_AnyStr]], Set[_AnyStr]]: ... if sys.version_info >= (3, 8): def copytree( src: _Path, dst: _Path, symlinks: bool = ..., ignore: Union[None, Callable[[str, List[str]], Iterable[str]], Callable[[_Path, List[str]], Iterable[str]]] = ..., copy_function: Callable[[str, str], None] = ..., ignore_dangling_symlinks: bool = ..., dirs_exist_ok: bool = ..., ) -> _PathReturn: ... elif sys.version_info >= (3,): def copytree(src: _Path, dst: _Path, symlinks: bool = ..., ignore: Union[None, Callable[[str, List[str]], Iterable[str]], Callable[[_Path, List[str]], Iterable[str]]] = ..., copy_function: Callable[[str, str], None] = ..., ignore_dangling_symlinks: bool = ...) -> _PathReturn: ... else: def copytree(src: AnyStr, dst: AnyStr, symlinks: bool = ..., ignore: Union[None, Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]]] = ...) -> _PathReturn: ... if sys.version_info >= (3,): @overload def rmtree(path: bytes, ignore_errors: bool = ..., onerror: Optional[Callable[[Any, str, Any], Any]] = ...) -> None: ... @overload def rmtree(path: _AnyPath, ignore_errors: bool = ..., onerror: Optional[Callable[[Any, _AnyPath, Any], Any]] = ...) -> None: ... else: def rmtree(path: _AnyPath, ignore_errors: bool = ..., onerror: Optional[Callable[[Any, _AnyPath, Any], Any]] = ...) -> None: ... if sys.version_info >= (3, 5): _CopyFn = Union[Callable[[str, str], None], Callable[[_Path, _Path], None]] def move(src: _Path, dst: _Path, copy_function: _CopyFn = ...) -> _PathReturn: ... else: def move(src: _Path, dst: _Path) -> _PathReturn: ... if sys.version_info >= (3,): class _ntuple_diskusage(NamedTuple): total: int used: int free: int def disk_usage(path: _Path) -> _ntuple_diskusage: ... def chown(path: _Path, user: Optional[str] = ..., group: Optional[str] = ...) -> None: ... def which(cmd: _Path, mode: int = ..., path: Optional[_Path] = ...) -> Optional[str]: ... def make_archive(base_name: _AnyStr, format: str, root_dir: Optional[_Path] = ..., base_dir: Optional[_Path] = ..., verbose: bool = ..., dry_run: bool = ..., owner: Optional[str] = ..., group: Optional[str] = ..., logger: Optional[Any] = ...) -> _AnyStr: ... def get_archive_formats() -> List[Tuple[str, str]]: ... def register_archive_format(name: str, function: Callable[..., Any], extra_args: Optional[Sequence[Union[Tuple[str, Any], List[Any]]]] = ..., description: str = ...) -> None: ... def unregister_archive_format(name: str) -> None: ... if sys.version_info >= (3,): # Should be _Path once http://bugs.python.org/issue30218 is fixed def unpack_archive(filename: str, extract_dir: Optional[_Path] = ..., format: Optional[str] = ...) -> None: ... def register_unpack_format(name: str, extensions: List[str], function: Any, extra_args: Sequence[Tuple[str, Any]] = ..., description: str = ...) -> None: ... def unregister_unpack_format(name: str) -> None: ... def get_unpack_formats() -> List[Tuple[str, List[str], str]]: ... def get_terminal_size(fallback: Tuple[int, int] = ...) -> os.terminal_size: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/csv.pyi0000664000175000017500000000537513577124116023214 0ustar davedave00000000000000import sys from _csv import ( QUOTE_ALL as QUOTE_ALL, QUOTE_MINIMAL as QUOTE_MINIMAL, QUOTE_NONE as QUOTE_NONE, QUOTE_NONNUMERIC as QUOTE_NONNUMERIC, Error as Error, _reader, _writer, field_size_limit as field_size_limit, get_dialect as get_dialect, list_dialects as list_dialects, reader as reader, register_dialect as register_dialect, unregister_dialect as unregister_dialect, writer as writer, ) from collections import OrderedDict from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Text, Type, Union _Dialect = Union[str, Dialect, Type[Dialect]] _DictRow = Mapping[str, Any] class Dialect(object): delimiter: str quotechar: Optional[str] escapechar: Optional[str] doublequote: bool skipinitialspace: bool lineterminator: str quoting: int def __init__(self) -> None: ... class excel(Dialect): delimiter: str quotechar: str doublequote: bool skipinitialspace: bool lineterminator: str quoting: int class excel_tab(excel): delimiter: str if sys.version_info >= (3,): class unix_dialect(Dialect): delimiter: str quotechar: str doublequote: bool skipinitialspace: bool lineterminator: str quoting: int if sys.version_info >= (3, 6): _DRMapping = OrderedDict[str, str] else: _DRMapping = Dict[str, str] class DictReader(Iterator[_DRMapping]): restkey: Optional[str] restval: Optional[str] reader: _reader dialect: _Dialect line_num: int fieldnames: Sequence[str] def __init__( self, f: Iterable[Text], fieldnames: Optional[Sequence[str]] = ..., restkey: Optional[str] = ..., restval: Optional[str] = ..., dialect: _Dialect = ..., *args: Any, **kwds: Any, ) -> None: ... def __iter__(self) -> DictReader: ... if sys.version_info >= (3,): def __next__(self) -> _DRMapping: ... else: def next(self) -> _DRMapping: ... class DictWriter(object): fieldnames: Sequence[str] restval: Optional[Any] extrasaction: str writer: _writer def __init__( self, f: Any, fieldnames: Iterable[str], restval: Optional[Any] = ..., extrasaction: str = ..., dialect: _Dialect = ..., *args: Any, **kwds: Any, ) -> None: ... def writeheader(self) -> None: ... def writerow(self, rowdict: _DictRow) -> None: ... def writerows(self, rowdicts: Iterable[_DictRow]) -> None: ... class Sniffer(object): preferred: List[str] def __init__(self) -> None: ... def sniff(self, sample: str, delimiters: Optional[str] = ...) -> Type[Dialect]: ... def has_header(self, sample: str) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/__future__.pyi0000664000175000017500000000111313577124116024511 0ustar davedave00000000000000import sys from typing import List class _Feature: def getOptionalRelease(self) -> sys._version_info: ... def getMandatoryRelease(self) -> sys._version_info: ... compiler_flag: int absolute_import: _Feature division: _Feature generators: _Feature nested_scopes: _Feature print_function: _Feature unicode_literals: _Feature with_statement: _Feature if sys.version_info >= (3, 0): barry_as_FLUFL: _Feature if sys.version_info >= (3, 5): generator_stop: _Feature if sys.version_info >= (3, 7): annotations: _Feature all_feature_names: List[str] # undocumented jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/argparse.pyi0000664000175000017500000004213513577124116024220 0ustar davedave00000000000000from typing import ( Any, Callable, Dict, Generator, Iterable, List, IO, NoReturn, Optional, Pattern, Sequence, Text, Tuple, Type, Union, TypeVar, overload ) import sys _T = TypeVar('_T') _ActionT = TypeVar('_ActionT', bound=Action) _N = TypeVar('_N') if sys.version_info >= (3,): _Text = str else: _Text = Union[str, unicode] ONE_OR_MORE: str OPTIONAL: str PARSER: str REMAINDER: str SUPPRESS: str ZERO_OR_MORE: str _UNRECOGNIZED_ARGS_ATTR: str # undocumented class ArgumentError(Exception): ... # undocumented class _AttributeHolder: def _get_kwargs(self) -> List[Tuple[str, Any]]: ... def _get_args(self) -> List[Any]: ... # undocumented class _ActionsContainer: description: Optional[_Text] prefix_chars: _Text argument_default: Optional[_Text] conflict_handler: _Text _registries: Dict[_Text, Dict[Any, Any]] _actions: List[Action] _option_string_actions: Dict[_Text, Action] _action_groups: List[_ArgumentGroup] _mutually_exclusive_groups: List[_MutuallyExclusiveGroup] _defaults: Dict[str, Any] _negative_number_matcher: Pattern[str] _has_negative_number_optionals: List[bool] def __init__(self, description: Optional[Text], prefix_chars: Text, argument_default: Optional[Text], conflict_handler: Text) -> None: ... def register(self, registry_name: Text, value: Any, object: Any) -> None: ... def _registry_get(self, registry_name: Text, value: Any, default: Any = ...) -> Any: ... def set_defaults(self, **kwargs: Any) -> None: ... def get_default(self, dest: Text) -> Any: ... def add_argument(self, *name_or_flags: Text, action: Union[Text, Type[Action]] = ..., nargs: Union[int, Text] = ..., const: Any = ..., default: Any = ..., type: Union[Callable[[Text], _T], Callable[[str], _T], FileType] = ..., choices: Iterable[_T] = ..., required: bool = ..., help: Optional[Text] = ..., metavar: Optional[Union[Text, Tuple[Text, ...]]] = ..., dest: Optional[Text] = ..., version: Text = ..., **kwargs: Any) -> Action: ... def add_argument_group(self, *args: Any, **kwargs: Any) -> _ArgumentGroup: ... def add_mutually_exclusive_group(self, **kwargs: Any) -> _MutuallyExclusiveGroup: ... def _add_action(self, action: _ActionT) -> _ActionT: ... def _remove_action(self, action: Action) -> None: ... def _add_container_actions(self, container: _ActionsContainer) -> None: ... def _get_positional_kwargs(self, dest: Text, **kwargs: Any) -> Dict[str, Any]: ... def _get_optional_kwargs(self, *args: Any, **kwargs: Any) -> Dict[str, Any]: ... def _pop_action_class(self, kwargs: Any, default: Optional[Type[Action]] = ...) -> Type[Action]: ... def _get_handler(self) -> Callable[[Action, Iterable[Tuple[Text, Action]]], Any]: ... def _check_conflict(self, action: Action) -> None: ... def _handle_conflict_error(self, action: Action, conflicting_actions: Iterable[Tuple[Text, Action]]) -> NoReturn: ... def _handle_conflict_resolve(self, action: Action, conflicting_actions: Iterable[Tuple[Text, Action]]) -> None: ... class ArgumentParser(_AttributeHolder, _ActionsContainer): prog: _Text usage: Optional[_Text] epilog: Optional[_Text] formatter_class: Type[HelpFormatter] fromfile_prefix_chars: Optional[_Text] add_help: bool if sys.version_info >= (3, 5): allow_abbrev: bool # undocumented _positionals: _ArgumentGroup _optionals: _ArgumentGroup _subparsers: Optional[_ArgumentGroup] if sys.version_info >= (3, 5): def __init__(self, prog: Optional[str] = ..., usage: Optional[str] = ..., description: Optional[str] = ..., epilog: Optional[str] = ..., parents: Sequence[ArgumentParser] = ..., formatter_class: Type[HelpFormatter] = ..., prefix_chars: str = ..., fromfile_prefix_chars: Optional[str] = ..., argument_default: Optional[str] = ..., conflict_handler: str = ..., add_help: bool = ..., allow_abbrev: bool = ...) -> None: ... else: def __init__(self, prog: Optional[Text] = ..., usage: Optional[Text] = ..., description: Optional[Text] = ..., epilog: Optional[Text] = ..., parents: Sequence[ArgumentParser] = ..., formatter_class: Type[HelpFormatter] = ..., prefix_chars: Text = ..., fromfile_prefix_chars: Optional[Text] = ..., argument_default: Optional[Text] = ..., conflict_handler: Text = ..., add_help: bool = ...) -> None: ... # The type-ignores in these overloads should be temporary. See: # https://github.com/python/typeshed/pull/2643#issuecomment-442280277 @overload def parse_args(self, args: Optional[Sequence[Text]] = ...) -> Namespace: ... @overload def parse_args(self, args: Optional[Sequence[Text]], namespace: None) -> Namespace: ... # type: ignore @overload def parse_args(self, args: Optional[Sequence[Text]], namespace: _N) -> _N: ... @overload def parse_args(self, *, namespace: None) -> Namespace: ... # type: ignore @overload def parse_args(self, *, namespace: _N) -> _N: ... if sys.version_info >= (3, 7): def add_subparsers(self, title: str = ..., description: Optional[str] = ..., prog: str = ..., parser_class: Type[ArgumentParser] = ..., action: Type[Action] = ..., option_string: str = ..., dest: Optional[str] = ..., required: bool = ..., help: Optional[str] = ..., metavar: Optional[str] = ...) -> _SubParsersAction: ... else: def add_subparsers(self, title: Text = ..., description: Optional[Text] = ..., prog: Text = ..., parser_class: Type[ArgumentParser] = ..., action: Type[Action] = ..., option_string: Text = ..., dest: Optional[Text] = ..., help: Optional[Text] = ..., metavar: Optional[Text] = ...) -> _SubParsersAction: ... def print_usage(self, file: Optional[IO[str]] = ...) -> None: ... def print_help(self, file: Optional[IO[str]] = ...) -> None: ... def format_usage(self) -> str: ... def format_help(self) -> str: ... def parse_known_args(self, args: Optional[Sequence[Text]] = ..., namespace: Optional[Namespace] = ...) -> Tuple[Namespace, List[str]]: ... def convert_arg_line_to_args(self, arg_line: Text) -> List[str]: ... def exit(self, status: int = ..., message: Optional[Text] = ...) -> NoReturn: ... def error(self, message: Text) -> NoReturn: ... if sys.version_info >= (3, 7): def parse_intermixed_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> Namespace: ... def parse_known_intermixed_args(self, args: Optional[Sequence[str]] = ..., namespace: Optional[Namespace] = ...) -> Tuple[Namespace, List[str]]: ... # undocumented def _get_optional_actions(self) -> List[Action]: ... def _get_positional_actions(self) -> List[Action]: ... def _parse_known_args(self, arg_strings: List[Text], namespace: Namespace) -> Tuple[Namespace, List[str]]: ... def _read_args_from_files(self, arg_strings: List[Text]) -> List[Text]: ... def _match_argument(self, action: Action, arg_strings_pattern: Text) -> int: ... def _match_arguments_partial(self, actions: Sequence[Action], arg_strings_pattern: Text) -> List[int]: ... def _parse_optional(self, arg_string: Text) -> Optional[Tuple[Optional[Action], Text, Optional[Text]]]: ... def _get_option_tuples(self, option_string: Text) -> List[Tuple[Action, Text, Optional[Text]]]: ... def _get_nargs_pattern(self, action: Action) -> _Text: ... def _get_values(self, action: Action, arg_strings: List[Text]) -> Any: ... def _get_value(self, action: Action, arg_string: Text) -> Any: ... def _check_value(self, action: Action, value: Any) -> None: ... def _get_formatter(self) -> HelpFormatter: ... def _print_message(self, message: str, file: Optional[IO[str]] = ...) -> None: ... class HelpFormatter: # undocumented _prog: _Text _indent_increment: int _max_help_position: int _width: int _current_indent: int _level: int _action_max_length: int _root_section: Any _current_section: Any _whitespace_matcher: Pattern[str] _long_break_matcher: Pattern[str] _Section: Type[Any] # Nested class def __init__(self, prog: Text, indent_increment: int = ..., max_help_position: int = ..., width: Optional[int] = ...) -> None: ... def _indent(self) -> None: ... def _dedent(self) -> None: ... def _add_item(self, func: Callable[..., _Text], args: Iterable[Any]) -> None: ... def start_section(self, heading: Optional[Text]) -> None: ... def end_section(self) -> None: ... def add_text(self, text: Optional[Text]) -> None: ... def add_usage(self, usage: Text, actions: Iterable[Action], groups: Iterable[_ArgumentGroup], prefix: Optional[Text] = ...) -> None: ... def add_argument(self, action: Action) -> None: ... def add_arguments(self, actions: Iterable[Action]) -> None: ... def format_help(self) -> _Text: ... def _join_parts(self, part_strings: Iterable[Text]) -> _Text: ... def _format_usage(self, usage: Text, actions: Iterable[Action], groups: Iterable[_ArgumentGroup], prefix: Optional[Text]) -> _Text: ... def _format_actions_usage(self, actions: Iterable[Action], groups: Iterable[_ArgumentGroup]) -> _Text: ... def _format_text(self, text: Text) -> _Text: ... def _format_action(self, action: Action) -> _Text: ... def _format_action_invocation(self, action: Action) -> _Text: ... def _metavar_formatter(self, action: Action, default_metavar: Text) -> Callable[[int], Tuple[_Text, ...]]: ... def _format_args(self, action: Action, default_metavar: Text) -> _Text: ... def _expand_help(self, action: Action) -> _Text: ... def _iter_indented_subactions(self, action: Action) -> Generator[Action, None, None]: ... def _split_lines(self, text: Text, width: int) -> List[_Text]: ... def _fill_text(self, text: Text, width: int, indent: Text) -> _Text: ... def _get_help_string(self, action: Action) -> Optional[_Text]: ... def _get_default_metavar_for_optional(self, action: Action) -> _Text: ... def _get_default_metavar_for_positional(self, action: Action) -> _Text: ... class RawDescriptionHelpFormatter(HelpFormatter): ... class RawTextHelpFormatter(HelpFormatter): ... class ArgumentDefaultsHelpFormatter(HelpFormatter): ... if sys.version_info >= (3,): class MetavarTypeHelpFormatter(HelpFormatter): ... class Action(_AttributeHolder): option_strings: Sequence[_Text] dest: _Text nargs: Optional[Union[int, _Text]] const: Any default: Any type: Union[Callable[[str], Any], FileType, None] choices: Optional[Iterable[Any]] required: bool help: Optional[_Text] metavar: Optional[Union[_Text, Tuple[_Text, ...]]] def __init__(self, option_strings: Sequence[Text], dest: Text, nargs: Optional[Union[int, Text]] = ..., const: Any = ..., default: Any = ..., type: Optional[Union[Callable[[Text], _T], Callable[[str], _T], FileType]] = ..., choices: Optional[Iterable[_T]] = ..., required: bool = ..., help: Optional[Text] = ..., metavar: Optional[Union[Text, Tuple[Text, ...]]] = ...) -> None: ... def __call__(self, parser: ArgumentParser, namespace: Namespace, values: Union[Text, Sequence[Any], None], option_string: Optional[Text] = ...) -> None: ... class Namespace(_AttributeHolder): def __init__(self, **kwargs: Any) -> None: ... def __getattr__(self, name: Text) -> Any: ... def __setattr__(self, name: Text, value: Any) -> None: ... def __contains__(self, key: str) -> bool: ... class FileType: # undocumented _mode: _Text _bufsize: int if sys.version_info >= (3,): _encoding: Optional[str] _errors: Optional[str] def __init__(self, mode: str = ..., bufsize: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ...) -> None: ... else: def __init__(self, mode: Text = ..., bufsize: Optional[int] = ...) -> None: ... def __call__(self, string: Text) -> IO[Any]: ... # undocumented class _ArgumentGroup(_ActionsContainer): title: Optional[_Text] _group_actions: List[Action] def __init__(self, container: _ActionsContainer, title: Optional[Text] = ..., description: Optional[Text] = ..., **kwargs: Any) -> None: ... # undocumented class _MutuallyExclusiveGroup(_ArgumentGroup): required: bool _container: _ActionsContainer def __init__(self, container: _ActionsContainer, required: bool = ...) -> None: ... # undocumented class _StoreAction(Action): ... # undocumented class _StoreConstAction(Action): def __init__(self, option_strings: Sequence[Text], dest: Text, const: Any, default: Any = ..., required: bool = ..., help: Optional[Text] = ..., metavar: Optional[Union[Text, Tuple[Text, ...]]] = ...) -> None: ... # undocumented class _StoreTrueAction(_StoreConstAction): def __init__(self, option_strings: Sequence[Text], dest: Text, default: bool = ..., required: bool = ..., help: Optional[Text] = ...) -> None: ... # undocumented class _StoreFalseAction(_StoreConstAction): def __init__(self, option_strings: Sequence[Text], dest: Text, default: bool = ..., required: bool = ..., help: Optional[Text] = ...) -> None: ... # undocumented class _AppendAction(Action): ... # undocumented class _AppendConstAction(Action): def __init__(self, option_strings: Sequence[Text], dest: Text, const: Any, default: Any = ..., required: bool = ..., help: Optional[Text] = ..., metavar: Optional[Union[Text, Tuple[Text, ...]]] = ...) -> None: ... # undocumented class _CountAction(Action): def __init__(self, option_strings: Sequence[Text], dest: Text, default: Any = ..., required: bool = ..., help: Optional[Text] = ...) -> None: ... # undocumented class _HelpAction(Action): def __init__(self, option_strings: Sequence[Text], dest: Text = ..., default: Text = ..., help: Optional[Text] = ...) -> None: ... # undocumented class _VersionAction(Action): version: Optional[_Text] def __init__(self, option_strings: Sequence[Text], version: Optional[Text] = ..., dest: Text = ..., default: Text = ..., help: Text = ...) -> None: ... # undocumented class _SubParsersAction(Action): _ChoicesPseudoAction: Type[Any] # nested class _prog_prefix: _Text _parser_class: Type[ArgumentParser] _name_parser_map: Dict[_Text, ArgumentParser] choices: Dict[_Text, ArgumentParser] _choices_actions: List[Action] def __init__(self, option_strings: Sequence[Text], prog: Text, parser_class: Type[ArgumentParser], dest: Text = ..., required: bool = ..., help: Optional[Text] = ..., metavar: Optional[Union[Text, Tuple[Text, ...]]] = ...) -> None: ... # TODO: Type keyword args properly. def add_parser(self, name: Text, **kwargs: Any) -> ArgumentParser: ... def _get_subactions(self) -> List[Action]: ... # undocumented class ArgumentTypeError(Exception): ... if sys.version_info < (3, 7): # undocumented def _ensure_value(namespace: Namespace, name: Text, value: Any) -> Any: ... # undocumented def _get_action_name(argument: Optional[Action]) -> Optional[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pydoc.pyi0000664000175000017500000002307213577124116023531 0ustar davedave00000000000000import sys from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, NoReturn, Optional, Text, Tuple, Type, Union from types import FunctionType, MethodType, ModuleType, TracebackType if sys.version_info >= (3,): from reprlib import Repr else: from repr import Repr # the return type of sys.exc_info(), used by ErrorDuringImport.__init__ _Exc_Info = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] __author__: str __date__: str __version__: str __credits__: str def pathdirs() -> List[str]: ... def getdoc(object: object) -> Text: ... def splitdoc(doc: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def classname(object: object, modname: str) -> str: ... def isdata(object: object) -> bool: ... def replace(text: AnyStr, *pairs: AnyStr) -> AnyStr: ... def cram(text: str, maxlen: int) -> str: ... def stripid(text: str) -> str: ... def allmethods(cl: type) -> MutableMapping[str, MethodType]: ... def visiblename(name: str, all: Optional[Container[str]] = ..., obj: Optional[object] = ...) -> bool: ... def classify_class_attrs(object: object) -> List[Tuple[str, str, type, str]]: ... def ispackage(path: str) -> bool: ... def source_synopsis(file: IO[AnyStr]) -> Optional[AnyStr]: ... def synopsis(filename: str, cache: MutableMapping[str, Tuple[int, str]] = ...) -> Optional[str]: ... class ErrorDuringImport(Exception): filename: str exc: Optional[Type[BaseException]] value: Optional[BaseException] tb: Optional[TracebackType] def __init__(self, filename: str, exc_info: _Exc_Info) -> None: ... def importfile(path: str) -> ModuleType: ... def safeimport(path: str, forceload: bool = ..., cache: MutableMapping[str, ModuleType] = ...) -> ModuleType: ... class Doc: def document(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def fail(self, object: object, name: Optional[str] = ..., *args: Any) -> NoReturn: ... def docmodule(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def docclass(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def docroutine(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def docother(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def docproperty(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def docdata(self, object: object, name: Optional[str] = ..., *args: Any) -> str: ... def getdocloc(self, object: object) -> Optional[str]: ... class HTMLRepr(Repr): maxlist: int maxtuple: int maxdict: int maxstring: int maxother: int def __init__(self) -> None: ... def escape(self, text: str) -> str: ... def repr(self, object: object) -> str: ... def repr1(self, x: object, level: complex) -> str: ... def repr_string(self, x: Text, level: complex) -> str: ... def repr_str(self, x: Text, level: complex) -> str: ... def repr_instance(self, x: object, level: complex) -> str: ... def repr_unicode(self, x: AnyStr, level: complex) -> str: ... class HTMLDoc(Doc): def repr(self, object: object) -> str: ... def escape(self, test: str) -> str: ... def page(self, title: str, contents: str) -> str: ... def heading(self, title: str, fgcol: str, bgcol: str, extras: str = ...) -> str: ... def section(self, title: str, fgcol: str, bgcol: str, contents: str, width: int = ..., prelude: str = ..., marginalia: Optional[str] = ..., gap: str = ...) -> str: ... def bigsection(self, title: str, *args) -> str: ... def preformat(self, text: str) -> str: ... def multicolumn(self, list: List[Any], format: Callable[[Any], str], cols: int = ...) -> str: ... def grey(self, text: str) -> str: ... def namelink(self, name: str, *dicts: MutableMapping[str, str]) -> str: ... def classlink(self, object: object, modname: str) -> str: ... def modulelink(self, object: object) -> str: ... def modpkglink(self, data: Tuple[str, str, bool, bool]) -> str: ... def markup(self, text: str, escape: Optional[Callable[[str], str]] = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., methods: Mapping[str, str] = ...) -> str: ... def formattree(self, tree: List[Union[Tuple[type, Tuple[type, ...]], List[Any]]], modname: str, parent: Optional[type] = ...) -> str: ... def docmodule(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., *ignored) -> str: ... def docclass(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., *ignored) -> str: ... def formatvalue(self, object: object) -> str: ... def docroutine(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., funcs: Mapping[str, str] = ..., classes: Mapping[str, str] = ..., methods: Mapping[str, str] = ..., cl: Optional[type] = ..., *ignored) -> str: ... def docproperty(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored) -> str: ... def docother(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., *ignored) -> str: ... def docdata(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., cl: Optional[Any] = ..., *ignored) -> str: ... def index(self, dir: str, shadowed: Optional[MutableMapping[str, bool]] = ...) -> str: ... class TextRepr(Repr): maxlist: int maxtuple: int maxdict: int maxstring: int maxother: int def __init__(self) -> None: ... def repr1(self, x: object, level: complex) -> str: ... def repr_string(self, x: str, level: complex) -> str: ... def repr_str(self, x: str, level: complex) -> str: ... def repr_instance(self, x: object, level: complex) -> str: ... class TextDoc(Doc): def repr(self, object: object) -> str: ... def bold(self, text: str) -> str: ... def indent(self, text: str, prefix: str = ...) -> str: ... def section(self, title: str, contents: str) -> str: ... def formattree(self, tree: List[Union[Tuple[type, Tuple[type, ...]], List[Any]]], modname: str, parent: Optional[type] = ..., prefix: str = ...) -> str: ... def docmodule(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., *ignored) -> str: ... def docclass(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., *ignored) -> str: ... def formatvalue(self, object: object) -> str: ... def docroutine(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored) -> str: ... def docproperty(self, object: object, name: Optional[str] = ..., mod: Optional[Any] = ..., cl: Optional[Any] = ..., *ignored) -> str: ... def docdata(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., cl: Optional[Any] = ..., *ignored) -> str: ... def docother(self, object: object, name: Optional[str] = ..., mod: Optional[str] = ..., parent: Optional[str] = ..., maxlen: Optional[int] = ..., doc: Optional[Any] = ..., *ignored) -> str: ... def pager(text: str) -> None: ... def getpager() -> Callable[[str], None]: ... def plain(text: str) -> str: ... def pipepager(text: str, cmd: str) -> None: ... def tempfilepager(text: str, cmd: str) -> None: ... def ttypager(text: str) -> None: ... def plainpager(text: str) -> None: ... def describe(thing: Any) -> str: ... def locate(path: str, forceload: bool = ...) -> object: ... text: TextDoc html: HTMLDoc class _OldStyleClass: ... def resolve(thing: Union[str, object], forceload: bool = ...) -> Optional[Tuple[object, str]]: ... def render_doc(thing: Union[str, object], title: str = ..., forceload: bool = ...) -> str: ... def doc(thing: Union[str, object], title: str = ..., forceload: bool = ...) -> None: ... def writedoc(thing: Union[str, object], forceload: bool = ...) -> None: ... def writedocs(dir: str, pkgpath: str = ..., done: Optional[Any] = ...) -> None: ... class Helper: keywords: Dict[str, Union[str, Tuple[str, str]]] symbols: Dict[str, str] topics: Dict[str, Union[str, Tuple[str, ...]]] def __init__(self, input: Optional[IO[str]] = ..., output: Optional[IO[str]] = ...) -> None: ... input: IO[str] output: IO[str] def __call__(self, request: Union[str, Helper, object] = ...) -> None: ... def interact(self) -> None: ... def getline(self, prompt: str) -> str: ... def help(self, request: Any) -> None: ... def intro(self) -> None: ... def list(self, items: List[str], columns: int = ..., width: int = ...) -> None: ... def listkeywords(self) -> None: ... def listsymbols(self) -> None: ... def listtopics(self) -> None: ... def showtopic(self, topic: str, more_xrefs: str = ...) -> None: ... def showsymbol(self, symbol: str) -> None: ... def listmodules(self, key: str = ...) -> None: ... help: Helper # See Python issue #11182: "remove the unused and undocumented pydoc.Scanner class" # class Scanner: # roots = ... # type: Any # state = ... # type: Any # children = ... # type: Any # descendp = ... # type: Any # def __init__(self, roots, children, descendp) -> None: ... # def next(self): ... class ModuleScanner: quit: bool def run(self, callback: Callable[[Optional[str], str, str], None], key: Optional[Any] = ..., completer: Optional[Callable[[], None]] = ..., onerror: Optional[Callable[[str], None]] = ...) -> None: ... def apropos(key: str) -> None: ... def serve(port: int, callback: Optional[Callable[[Any], None]] = ..., completer: Optional[Callable[[], None]] = ...) -> None: ... def gui() -> None: ... def ispath(x: Any) -> bool: ... def cli() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/decimal.pyi0000664000175000017500000003724513577124116024020 0ustar davedave00000000000000import numbers import sys from types import TracebackType from typing import ( Any, Container, Dict, List, NamedTuple, Optional, overload, Sequence, Text, Tuple, Type, TypeVar, Union, ) _Decimal = Union[Decimal, int] _DecimalNew = Union[Decimal, float, Text, Tuple[int, Sequence[int], int]] if sys.version_info >= (3,): _ComparableNum = Union[Decimal, float, numbers.Rational] else: _ComparableNum = Union[Decimal, float] _DecimalT = TypeVar('_DecimalT', bound=Decimal) class DecimalTuple(NamedTuple): sign: int digits: Tuple[int, ...] exponent: int ROUND_DOWN: str ROUND_HALF_UP: str ROUND_HALF_EVEN: str ROUND_CEILING: str ROUND_FLOOR: str ROUND_UP: str ROUND_HALF_DOWN: str ROUND_05UP: str if sys.version_info >= (3,): HAVE_THREADS: bool MAX_EMAX: int MAX_PREC: int MIN_EMIN: int MIN_ETINY: int class DecimalException(ArithmeticError): def handle(self, context: Context, *args: Any) -> Optional[Decimal]: ... class Clamped(DecimalException): ... class InvalidOperation(DecimalException): ... class ConversionSyntax(InvalidOperation): ... class DivisionByZero(DecimalException, ZeroDivisionError): ... class DivisionImpossible(InvalidOperation): ... class DivisionUndefined(InvalidOperation, ZeroDivisionError): ... class Inexact(DecimalException): ... class InvalidContext(InvalidOperation): ... class Rounded(DecimalException): ... class Subnormal(DecimalException): ... class Overflow(Inexact, Rounded): ... class Underflow(Inexact, Rounded, Subnormal): ... if sys.version_info >= (3,): class FloatOperation(DecimalException, TypeError): ... def setcontext(context: Context) -> None: ... def getcontext() -> Context: ... def localcontext(ctx: Optional[Context] = ...) -> _ContextManager: ... class Decimal(object): def __new__(cls: Type[_DecimalT], value: _DecimalNew = ..., context: Optional[Context] = ...) -> _DecimalT: ... @classmethod def from_float(cls, f: float) -> Decimal: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... def __eq__(self, other: object, context: Optional[Context] = ...) -> bool: ... if sys.version_info < (3,): def __ne__(self, other: object, context: Optional[Context] = ...) -> bool: ... def __lt__(self, other: _ComparableNum, context: Optional[Context] = ...) -> bool: ... def __le__(self, other: _ComparableNum, context: Optional[Context] = ...) -> bool: ... def __gt__(self, other: _ComparableNum, context: Optional[Context] = ...) -> bool: ... def __ge__(self, other: _ComparableNum, context: Optional[Context] = ...) -> bool: ... def compare(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __hash__(self) -> int: ... def as_tuple(self) -> DecimalTuple: ... if sys.version_info >= (3,): def as_integer_ratio(self) -> Tuple[int, int]: ... def __str__(self, eng: bool = ..., context: Optional[Context] = ...) -> str: ... def to_eng_string(self, context: Optional[Context] = ...) -> str: ... def __neg__(self, context: Optional[Context] = ...) -> Decimal: ... def __pos__(self, context: Optional[Context] = ...) -> Decimal: ... def __abs__(self, round: bool = ..., context: Optional[Context] = ...) -> Decimal: ... def __add__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __radd__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __sub__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __rsub__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __mul__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __rmul__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __truediv__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __rtruediv__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... if sys.version_info < (3,): def __div__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __rdiv__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __divmod__(self, other: _Decimal, context: Optional[Context] = ...) -> Tuple[Decimal, Decimal]: ... def __rdivmod__(self, other: _Decimal, context: Optional[Context] = ...) -> Tuple[Decimal, Decimal]: ... def __mod__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __rmod__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def remainder_near(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __floordiv__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __rfloordiv__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __float__(self) -> float: ... def __int__(self) -> int: ... def __trunc__(self) -> int: ... @property def real(self) -> Decimal: ... @property def imag(self) -> Decimal: ... def conjugate(self) -> Decimal: ... def __complex__(self) -> complex: ... if sys.version_info >= (3,): @overload def __round__(self) -> int: ... @overload def __round__(self, ndigits: int) -> Decimal: ... def __floor__(self) -> int: ... def __ceil__(self) -> int: ... else: def __long__(self) -> long: ... def fma(self, other: _Decimal, third: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __pow__(self, other: _Decimal, modulo: Optional[_Decimal] = ..., context: Optional[Context] = ...) -> Decimal: ... def __rpow__(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def normalize(self, context: Optional[Context] = ...) -> Decimal: ... if sys.version_info >= (3,): def quantize(self, exp: _Decimal, rounding: Optional[str] = ..., context: Optional[Context] = ...) -> Decimal: ... def same_quantum(self, other: _Decimal, context: Optional[Context] = ...) -> bool: ... else: def quantize(self, exp: _Decimal, rounding: Optional[str] = ..., context: Optional[Context] = ..., watchexp: bool = ...) -> Decimal: ... def same_quantum(self, other: _Decimal) -> bool: ... def to_integral_exact(self, rounding: Optional[str] = ..., context: Optional[Context] = ...) -> Decimal: ... def to_integral_value(self, rounding: Optional[str] = ..., context: Optional[Context] = ...) -> Decimal: ... def to_integral(self, rounding: Optional[str] = ..., context: Optional[Context] = ...) -> Decimal: ... def sqrt(self, context: Optional[Context] = ...) -> Decimal: ... def max(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def min(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def adjusted(self) -> int: ... if sys.version_info >= (3,): def canonical(self) -> Decimal: ... else: def canonical(self, context: Optional[Context] = ...) -> Decimal: ... def compare_signal(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... if sys.version_info >= (3,): def compare_total(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def compare_total_mag(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... else: def compare_total(self, other: _Decimal) -> Decimal: ... def compare_total_mag(self, other: _Decimal) -> Decimal: ... def copy_abs(self) -> Decimal: ... def copy_negate(self) -> Decimal: ... if sys.version_info >= (3,): def copy_sign(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... else: def copy_sign(self, other: _Decimal) -> Decimal: ... def exp(self, context: Optional[Context] = ...) -> Decimal: ... def is_canonical(self) -> bool: ... def is_finite(self) -> bool: ... def is_infinite(self) -> bool: ... def is_nan(self) -> bool: ... def is_normal(self, context: Optional[Context] = ...) -> bool: ... def is_qnan(self) -> bool: ... def is_signed(self) -> bool: ... def is_snan(self) -> bool: ... def is_subnormal(self, context: Optional[Context] = ...) -> bool: ... def is_zero(self) -> bool: ... def ln(self, context: Optional[Context] = ...) -> Decimal: ... def log10(self, context: Optional[Context] = ...) -> Decimal: ... def logb(self, context: Optional[Context] = ...) -> Decimal: ... def logical_and(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def logical_invert(self, context: Optional[Context] = ...) -> Decimal: ... def logical_or(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def logical_xor(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def max_mag(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def min_mag(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def next_minus(self, context: Optional[Context] = ...) -> Decimal: ... def next_plus(self, context: Optional[Context] = ...) -> Decimal: ... def next_toward(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def number_class(self, context: Optional[Context] = ...) -> str: ... def radix(self) -> Decimal: ... def rotate(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def scaleb(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def shift(self, other: _Decimal, context: Optional[Context] = ...) -> Decimal: ... def __reduce__(self) -> Tuple[Type[Decimal], Tuple[str]]: ... def __copy__(self) -> Decimal: ... def __deepcopy__(self, memo: Any) -> Decimal: ... def __format__(self, specifier: str, context: Optional[Context] = ...) -> str: ... class _ContextManager(object): new_context: Context saved_context: Context def __init__(self, new_context: Context) -> None: ... def __enter__(self) -> Context: ... def __exit__(self, t: Optional[Type[BaseException]], v: Optional[BaseException], tb: Optional[TracebackType]) -> None: ... _TrapType = Type[DecimalException] class Context(object): prec: int rounding: str Emin: int Emax: int capitals: int if sys.version_info >= (3,): clamp: int else: _clamp: int traps: Dict[_TrapType, bool] flags: Dict[_TrapType, bool] if sys.version_info >= (3,): def __init__(self, prec: Optional[int] = ..., rounding: Optional[str] = ..., Emin: Optional[int] = ..., Emax: Optional[int] = ..., capitals: Optional[int] = ..., clamp: Optional[int] = ..., flags: Union[None, Dict[_TrapType, bool], Container[_TrapType]] = ..., traps: Union[None, Dict[_TrapType, bool], Container[_TrapType]] = ..., _ignored_flags: Optional[List[_TrapType]] = ...) -> None: ... else: def __init__(self, prec: Optional[int] = ..., rounding: Optional[str] = ..., traps: Union[None, Dict[_TrapType, bool], Container[_TrapType]] = ..., flags: Union[None, Dict[_TrapType, bool], Container[_TrapType]] = ..., Emin: Optional[int] = ..., Emax: Optional[int] = ..., capitals: Optional[int] = ..., _clamp: Optional[int] = ..., _ignored_flags: Optional[List[_TrapType]] = ...) -> None: ... if sys.version_info >= (3,): # __setattr__() only allows to set a specific set of attributes, # already defined above. def __delattr__(self, name: str) -> None: ... def __reduce__(self) -> Tuple[Type[Context], Tuple[Any, ...]]: ... def clear_flags(self) -> None: ... if sys.version_info >= (3,): def clear_traps(self) -> None: ... def copy(self) -> Context: ... def __copy__(self) -> Context: ... __hash__: Any = ... def Etiny(self) -> int: ... def Etop(self) -> int: ... def create_decimal(self, num: _DecimalNew = ...) -> Decimal: ... def create_decimal_from_float(self, f: float) -> Decimal: ... def abs(self, a: _Decimal) -> Decimal: ... def add(self, a: _Decimal, b: _Decimal) -> Decimal: ... def canonical(self, a: Decimal) -> Decimal: ... def compare(self, a: _Decimal, b: _Decimal) -> Decimal: ... def compare_signal(self, a: _Decimal, b: _Decimal) -> Decimal: ... def compare_total(self, a: _Decimal, b: _Decimal) -> Decimal: ... def compare_total_mag(self, a: _Decimal, b: _Decimal) -> Decimal: ... def copy_abs(self, a: _Decimal) -> Decimal: ... def copy_decimal(self, a: _Decimal) -> Decimal: ... def copy_negate(self, a: _Decimal) -> Decimal: ... def copy_sign(self, a: _Decimal, b: _Decimal) -> Decimal: ... def divide(self, a: _Decimal, b: _Decimal) -> Decimal: ... def divide_int(self, a: _Decimal, b: _Decimal) -> Decimal: ... def divmod(self, a: _Decimal, b: _Decimal) -> Tuple[Decimal, Decimal]: ... def exp(self, a: _Decimal) -> Decimal: ... def fma(self, a: _Decimal, b: _Decimal, c: _Decimal) -> Decimal: ... def is_canonical(self, a: _Decimal) -> bool: ... def is_finite(self, a: _Decimal) -> bool: ... def is_infinite(self, a: _Decimal) -> bool: ... def is_nan(self, a: _Decimal) -> bool: ... def is_normal(self, a: _Decimal) -> bool: ... def is_qnan(self, a: _Decimal) -> bool: ... def is_signed(self, a: _Decimal) -> bool: ... def is_snan(self, a: _Decimal) -> bool: ... def is_subnormal(self, a: _Decimal) -> bool: ... def is_zero(self, a: _Decimal) -> bool: ... def ln(self, a: _Decimal) -> Decimal: ... def log10(self, a: _Decimal) -> Decimal: ... def logb(self, a: _Decimal) -> Decimal: ... def logical_and(self, a: _Decimal, b: _Decimal) -> Decimal: ... def logical_invert(self, a: _Decimal) -> Decimal: ... def logical_or(self, a: _Decimal, b: _Decimal) -> Decimal: ... def logical_xor(self, a: _Decimal, b: _Decimal) -> Decimal: ... def max(self, a: _Decimal, b: _Decimal) -> Decimal: ... def max_mag(self, a: _Decimal, b: _Decimal) -> Decimal: ... def min(self, a: _Decimal, b: _Decimal) -> Decimal: ... def min_mag(self, a: _Decimal, b: _Decimal) -> Decimal: ... def minus(self, a: _Decimal) -> Decimal: ... def multiply(self, a: _Decimal, b: _Decimal) -> Decimal: ... def next_minus(self, a: _Decimal) -> Decimal: ... def next_plus(self, a: _Decimal) -> Decimal: ... def next_toward(self, a: _Decimal, b: _Decimal) -> Decimal: ... def normalize(self, a: _Decimal) -> Decimal: ... def number_class(self, a: _Decimal) -> str: ... def plus(self, a: _Decimal) -> Decimal: ... def power(self, a: _Decimal, b: _Decimal, modulo: Optional[_Decimal] = ...) -> Decimal: ... def quantize(self, a: _Decimal, b: _Decimal) -> Decimal: ... def radix(self) -> Decimal: ... def remainder(self, a: _Decimal, b: _Decimal) -> Decimal: ... def remainder_near(self, a: _Decimal, b: _Decimal) -> Decimal: ... def rotate(self, a: _Decimal, b: _Decimal) -> Decimal: ... def same_quantum(self, a: _Decimal, b: _Decimal) -> bool: ... def scaleb(self, a: _Decimal, b: _Decimal) -> Decimal: ... def shift(self, a: _Decimal, b: _Decimal) -> Decimal: ... def sqrt(self, a: _Decimal) -> Decimal: ... def subtract(self, a: _Decimal, b: _Decimal) -> Decimal: ... def to_eng_string(self, a: _Decimal) -> str: ... def to_sci_string(self, a: _Decimal) -> str: ... def to_integral_exact(self, a: _Decimal) -> Decimal: ... def to_integral_value(self, a: _Decimal) -> Decimal: ... def to_integral(self, a: _Decimal) -> Decimal: ... DefaultContext: Context BasicContext: Context ExtendedContext: Context jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/zipfile.pyi0000664000175000017500000001141213577124116024050 0ustar davedave00000000000000# Stubs for zipfile from typing import Callable, Dict, IO, Iterable, List, Optional, Text, Tuple, Type, Union, Sequence, Pattern from types import TracebackType import io import os import sys if sys.version_info >= (3, 6): _Path = Union[os.PathLike[str], str] else: _Path = Text _SZI = Union[Text, ZipInfo] _DT = Tuple[int, int, int, int, int, int] if sys.version_info >= (3,): class BadZipFile(Exception): ... BadZipfile = BadZipFile else: class BadZipfile(Exception): ... error = BadZipfile class LargeZipFile(Exception): ... class ZipExtFile(io.BufferedIOBase): MAX_N: int = ... MIN_READ_SIZE: int = ... if sys.version_info < (3, 6): PATTERN: Pattern[str] = ... if sys.version_info >= (3, 7): MAX_SEEK_READ: int = ... newlines: Optional[List[bytes]] mode: str name: str def __init__( self, fileobj: IO[bytes], mode: str, zipinfo: ZipInfo, decrypter: Optional[Callable[[Sequence[int]], bytes]] = ..., close_fileobj: bool = ..., ) -> None: ... def __repr__(self) -> str: ... def peek(self, n: int = ...) -> bytes: ... def read1(self, n: Optional[int]) -> bytes: ... # type: ignore class ZipFile: filename: Optional[Text] debug: int comment: bytes filelist: List[ZipInfo] fp: IO[bytes] NameToInfo: Dict[Text, ZipInfo] start_dir: int # undocumented if sys.version_info >= (3, 8): def __init__( self, file: Union[_Path, IO[bytes]], mode: Text = ..., compression: int = ..., allowZip64: bool = ..., compresslevel: Optional[int] = ..., *, strict_timestamps: bool = ..., ) -> None: ... elif sys.version_info >= (3, 7): def __init__( self, file: Union[_Path, IO[bytes]], mode: Text = ..., compression: int = ..., allowZip64: bool = ..., compresslevel: Optional[int] = ..., ) -> None: ... else: def __init__( self, file: Union[_Path, IO[bytes]], mode: Text = ..., compression: int = ..., allowZip64: bool = ... ) -> None: ... def __enter__(self) -> ZipFile: ... def __exit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] ) -> None: ... def close(self) -> None: ... def getinfo(self, name: Text) -> ZipInfo: ... def infolist(self) -> List[ZipInfo]: ... def namelist(self) -> List[Text]: ... def open(self, name: _SZI, mode: Text = ..., pwd: Optional[bytes] = ...) -> IO[bytes]: ... def extract(self, member: _SZI, path: Optional[_SZI] = ..., pwd: bytes = ...) -> str: ... def extractall( self, path: Optional[_Path] = ..., members: Optional[Iterable[Text]] = ..., pwd: Optional[bytes] = ... ) -> None: ... def printdir(self) -> None: ... def setpassword(self, pwd: bytes) -> None: ... def read(self, name: _SZI, pwd: Optional[bytes] = ...) -> bytes: ... def testzip(self) -> Optional[str]: ... def write(self, filename: _Path, arcname: Optional[_Path] = ..., compress_type: Optional[int] = ...) -> None: ... if sys.version_info >= (3,): def writestr(self, zinfo_or_arcname: _SZI, data: Union[bytes, str], compress_type: Optional[int] = ...) -> None: ... else: def writestr(self, zinfo_or_arcname: _SZI, bytes: bytes, compress_type: Optional[int] = ...) -> None: ... class PyZipFile(ZipFile): if sys.version_info >= (3,): def __init__( self, file: Union[str, IO[bytes]], mode: str = ..., compression: int = ..., allowZip64: bool = ..., opimize: int = ... ) -> None: ... def writepy(self, pathname: str, basename: str = ..., filterfunc: Optional[Callable[[str], bool]] = ...) -> None: ... else: def writepy(self, pathname: Text, basename: Text = ...) -> None: ... class ZipInfo: filename: Text date_time: _DT compress_type: int comment: bytes extra: bytes create_system: int create_version: int extract_version: int reserved: int flag_bits: int volume: int internal_attr: int external_attr: int header_offset: int CRC: int compress_size: int file_size: int def __init__(self, filename: Optional[Text] = ..., date_time: Optional[_DT] = ...) -> None: ... if sys.version_info >= (3, 6): def is_dir(self) -> bool: ... @classmethod def from_file(cls, filename: _Path, arcname: Optional[_Path] = ...) -> ZipInfo: ... def FileHeader(self, zip64: Optional[bool] = ...) -> bytes: ... def is_zipfile(filename: Union[_Path, IO[bytes]]) -> bool: ... ZIP_STORED: int ZIP_DEFLATED: int if sys.version_info >= (3, 3): ZIP_BZIP2: int ZIP_LZMA: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_warnings.pyi0000664000175000017500000000204713577124116024401 0ustar davedave00000000000000import sys from typing import Any, Dict, List, Optional, Tuple, Type, Union, overload if sys.version_info >= (3, 0): _defaultaction: str _onceregistry: Dict[Any, Any] else: default_action: str once_registry: Dict[Any, Any] filters: List[Tuple[Any, ...]] @overload def warn(message: str, category: Optional[Type[Warning]] = ..., stacklevel: int = ...) -> None: ... @overload def warn(message: Warning, category: Any = ..., stacklevel: int = ...) -> None: ... @overload def warn_explicit( message: str, category: Type[Warning], filename: str, lineno: int, module: Optional[str] = ..., registry: Optional[Dict[Union[str, Tuple[str, Type[Warning], int]], int]] = ..., module_globals: Optional[Dict[str, Any]] = ..., ) -> None: ... @overload def warn_explicit( message: Warning, category: Any, filename: str, lineno: int, module: Optional[str] = ..., registry: Optional[Dict[Union[str, Tuple[str, Type[Warning], int]], int]] = ..., module_globals: Optional[Dict[str, Any]] = ..., ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/wave.pyi0000664000175000017500000000513613577124116023356 0ustar davedave00000000000000# Stubs for wave (Python 2 and 3) import sys from typing import ( Any, NamedTuple, NoReturn, Optional, Text, BinaryIO, Union, Tuple ) _File = Union[Text, BinaryIO] class Error(Exception): ... WAVE_FORMAT_PCM: int if sys.version_info < (3, 0): _wave_params = Tuple[int, int, int, int, str, str] else: class _wave_params(NamedTuple): nchannels: int sampwidth: int framerate: int nframes: int comptype: str compname: str class Wave_read: def __init__(self, f: _File) -> None: ... if sys.version_info >= (3, 0): def __enter__(self) -> Wave_read: ... def __exit__(self, *args: Any) -> None: ... def getfp(self) -> Optional[BinaryIO]: ... def rewind(self) -> None: ... def close(self) -> None: ... def tell(self) -> int: ... def getnchannels(self) -> int: ... def getnframes(self) -> int: ... def getsampwidth(self) -> int: ... def getframerate(self) -> int: ... def getcomptype(self) -> str: ... def getcompname(self) -> str: ... def getparams(self) -> _wave_params: ... def getmarkers(self) -> None: ... def getmark(self, id: Any) -> NoReturn: ... def setpos(self, pos: int) -> None: ... def readframes(self, nframes: int) -> bytes: ... class Wave_write: def __init__(self, f: _File) -> None: ... if sys.version_info >= (3, 0): def __enter__(self) -> Wave_write: ... def __exit__(self, *args: Any) -> None: ... def setnchannels(self, nchannels: int) -> None: ... def getnchannels(self) -> int: ... def setsampwidth(self, sampwidth: int) -> None: ... def getsampwidth(self) -> int: ... def setframerate(self, framerate: float) -> None: ... def getframerate(self) -> int: ... def setnframes(self, nframes: int) -> None: ... def getnframes(self) -> int: ... def setcomptype(self, comptype: str, compname: str) -> None: ... def getcomptype(self) -> str: ... def getcompname(self) -> str: ... def setparams(self, params: _wave_params) -> None: ... def getparams(self) -> _wave_params: ... def setmark(self, id: Any, pos: Any, name: Any) -> NoReturn: ... def getmark(self, id: Any) -> NoReturn: ... def getmarkers(self) -> None: ... def tell(self) -> int: ... # should be any bytes-like object after 3.4, but we don't have a type for that def writeframesraw(self, data: bytes) -> None: ... def writeframes(self, data: bytes) -> None: ... def close(self) -> None: ... # Returns a Wave_read if mode is rb and Wave_write if mode is wb def open(f: _File, mode: Optional[str] = ...) -> Any: ... openfp = open jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/grp.pyi0000664000175000017500000000044713577124116023204 0ustar davedave00000000000000from typing import List, NamedTuple, Optional class struct_group(NamedTuple): gr_name: str gr_passwd: Optional[str] gr_gid: int gr_mem: List[str] def getgrall() -> List[struct_group]: ... def getgrgid(gid: int) -> struct_group: ... def getgrnam(name: str) -> struct_group: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/codeop.pyi0000664000175000017500000000117113577124116023660 0ustar davedave00000000000000# Source(py2): https://hg.python.org/cpython/file/2.7/Lib/codeop.py # Source(py3): https://github.com/python/cpython/blob/master/Lib/codeop.py from types import CodeType from typing import Optional def compile_command(source: str, filename: str = ..., symbol: str = ...) -> Optional[CodeType]: ... class Compile: flags: int def __init__(self) -> None: ... def __call__(self, source: str, filename: str, symbol: str) -> CodeType: ... class CommandCompiler: compiler: Compile def __init__(self) -> None: ... def __call__(self, source: str, filename: str = ..., symbol: str = ...) -> Optional[CodeType]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/warnings.pyi0000664000175000017500000000337213577124116024244 0ustar davedave00000000000000from typing import List, NamedTuple, Optional, overload, TextIO, Type from types import ModuleType, TracebackType from typing_extensions import Literal from _warnings import warn as warn, warn_explicit as warn_explicit def showwarning( message: str, category: Type[Warning], filename: str, lineno: int, file: Optional[TextIO] = ..., line: Optional[str] = ... ) -> None: ... def formatwarning(message: str, category: Type[Warning], filename: str, lineno: int, line: Optional[str] = ...) -> str: ... def filterwarnings( action: str, message: str = ..., category: Type[Warning] = ..., module: str = ..., lineno: int = ..., append: bool = ... ) -> None: ... def simplefilter(action: str, category: Type[Warning] = ..., lineno: int = ..., append: bool = ...) -> None: ... def resetwarnings() -> None: ... class _Record(NamedTuple): message: str category: Type[Warning] filename: str lineno: int file: Optional[TextIO] line: Optional[str] class catch_warnings: @overload def __new__(cls, *, record: Literal[False] = ..., module: Optional[ModuleType] = ...) -> _catch_warnings_without_records: ... @overload def __new__(cls, *, record: Literal[True], module: Optional[ModuleType] = ...) -> _catch_warnings_with_records: ... @overload def __new__(cls, *, record: bool, module: Optional[ModuleType] = ...) -> catch_warnings: ... def __enter__(self) -> Optional[List[_Record]]: ... def __exit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] ) -> None: ... class _catch_warnings_without_records(catch_warnings): def __enter__(self) -> None: ... class _catch_warnings_with_records(catch_warnings): def __enter__(self) -> List[_Record]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/cmd.pyi0000664000175000017500000000323613577124116023156 0ustar davedave00000000000000# Stubs for cmd (Python 2/3) from typing import Any, Optional, Text, IO, List, Callable, Tuple class Cmd: prompt: str identchars: str ruler: str lastcmd: str intro: Optional[Any] doc_leader: str doc_header: str misc_header: str undoc_header: str nohelp: str use_rawinput: bool stdin: IO[str] stdout: IO[str] cmdqueue: List[str] completekey: str def __init__(self, completekey: str = ..., stdin: Optional[IO[str]] = ..., stdout: Optional[IO[str]] = ...) -> None: ... old_completer: Optional[Callable[[str, int], Optional[str]]] def cmdloop(self, intro: Optional[Any] = ...) -> None: ... def precmd(self, line: str) -> str: ... def postcmd(self, stop: bool, line: str) -> bool: ... def preloop(self) -> None: ... def postloop(self) -> None: ... def parseline(self, line: str) -> Tuple[Optional[str], Optional[str], str]: ... def onecmd(self, line: str) -> bool: ... def emptyline(self) -> bool: ... def default(self, line: str) -> bool: ... def completedefault(self, *ignored: Any) -> List[str]: ... def completenames(self, text: str, *ignored: Any) -> List[str]: ... completion_matches: Optional[List[str]] def complete(self, text: str, state: int) -> Optional[List[str]]: ... def get_names(self) -> List[str]: ... # Only the first element of args matters. def complete_help(self, *args: Any) -> List[str]: ... def do_help(self, arg: Optional[str]) -> None: ... def print_topics(self, header: str, cmds: Optional[List[str]], cmdlen: Any, maxcol: int) -> None: ... def columnize(self, list: Optional[List[str]], displaywidth: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/imghdr.pyi0000664000175000017500000000062313577124116023662 0ustar davedave00000000000000from typing import overload, Union, Text, BinaryIO, Optional, Any, List, Callable import sys import os if sys.version_info >= (3, 6): _File = Union[Text, os.PathLike[Text], BinaryIO] else: _File = Union[Text, BinaryIO] @overload def what(file: _File) -> Optional[str]: ... @overload def what(file: Any, h: bytes) -> Optional[str]: ... tests: List[Callable[[bytes, BinaryIO], Optional[str]]] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/token.pyi0000664000175000017500000000221113577124116023523 0ustar davedave00000000000000import sys from typing import Dict ENDMARKER: int NAME: int NUMBER: int STRING: int NEWLINE: int INDENT: int DEDENT: int LPAR: int RPAR: int LSQB: int RSQB: int COLON: int COMMA: int SEMI: int PLUS: int MINUS: int STAR: int SLASH: int VBAR: int AMPER: int LESS: int GREATER: int EQUAL: int DOT: int PERCENT: int if sys.version_info < (3,): BACKQUOTE: int LBRACE: int RBRACE: int EQEQUAL: int NOTEQUAL: int LESSEQUAL: int GREATEREQUAL: int TILDE: int CIRCUMFLEX: int LEFTSHIFT: int RIGHTSHIFT: int DOUBLESTAR: int PLUSEQUAL: int MINEQUAL: int STAREQUAL: int SLASHEQUAL: int PERCENTEQUAL: int AMPEREQUAL: int VBAREQUAL: int CIRCUMFLEXEQUAL: int LEFTSHIFTEQUAL: int RIGHTSHIFTEQUAL: int DOUBLESTAREQUAL: int DOUBLESLASH: int DOUBLESLASHEQUAL: int AT: int if sys.version_info >= (3,): RARROW: int ELLIPSIS: int if sys.version_info >= (3, 5): ATEQUAL: int AWAIT: int ASYNC: int OP: int ERRORTOKEN: int N_TOKENS: int NT_OFFSET: int tok_name: Dict[int, str] if sys.version_info >= (3, 7): COMMENT: int NL: int ENCODING: int def ISTERMINAL(x: int) -> bool: ... def ISNONTERMINAL(x: int) -> bool: ... def ISEOF(x: int) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/imaplib.pyi0000664000175000017500000001440713577124116024032 0ustar davedave00000000000000# Stubs for imaplib (Python 2) import imaplib import subprocess import sys import time from socket import socket as _socket from ssl import SSLSocket, SSLContext from typing import Any, Callable, Dict, IO, List, Optional, Pattern, Text, Tuple, Type, Union CommandResults = Tuple[str, List[Any]] class IMAP4: error: Type[Exception] = ... abort: Type[Exception] = ... readonly: Type[Exception] = ... mustquote: Pattern[Text] = ... debug: int = ... state: str = ... literal: Optional[Text] = ... tagged_commands: Dict[str, str] = ... untagged_responses: Dict[str, str] = ... continuation_response: str = ... is_readonly: bool = ... tagnum: int = ... tagpre: str = ... tagre: Pattern[Text] = ... welcome: bytes = ... capabilities: Tuple[str] = ... PROTOCOL_VERSION: str = ... def __init__(self, host: str = ..., port: int = ...) -> None: ... def __getattr__(self, attr: str) -> Any: ... host: str = ... port: int = ... sock: _socket = ... file: Union[IO[Text], IO[bytes]] = ... def open(self, host: str = ..., port: int = ...) -> None: ... def read(self, size: int) -> bytes: ... def readline(self) -> bytes: ... def send(self, data: bytes) -> None: ... def shutdown(self) -> None: ... def socket(self) -> _socket: ... def recent(self) -> CommandResults: ... def response(self, code: str) -> CommandResults: ... def append(self, mailbox: str, flags: str, date_time: str, message: str) -> str: ... def authenticate(self, mechanism: str, authobject: Callable[[bytes], Optional[bytes]]) -> Tuple[str, str]: ... def capability(self) -> CommandResults: ... def check(self) -> CommandResults: ... def close(self) -> CommandResults: ... def copy(self, message_set: str, new_mailbox: str) -> CommandResults: ... def create(self, mailbox: str) -> CommandResults: ... def delete(self, mailbox: str) -> CommandResults: ... def deleteacl(self, mailbox: str, who: str) -> CommandResults: ... if sys.version_info >= (3, 5): def enable(self, capability: str) -> CommandResults: ... def __enter__(self) -> IMAP4: ... def __exit__(self, *args) -> None: ... def expunge(self) -> CommandResults: ... def fetch(self, message_set: str, message_parts: str) -> CommandResults: ... def getacl(self, mailbox: str) -> CommandResults: ... def getannotation(self, mailbox: str, entry: str, attribute: str) -> CommandResults: ... def getquota(self, root: str) -> CommandResults: ... def getquotaroot(self, mailbox: str) -> CommandResults: ... def list(self, directory: str = ..., pattern: str = ...) -> CommandResults: ... def login(self, user: str, password: str) -> CommandResults: ... def login_cram_md5(self, user: str, password: str) -> CommandResults: ... def logout(self) -> CommandResults: ... def lsub(self, directory: str = ..., pattern: str = ...) -> CommandResults: ... def myrights(self, mailbox: str) -> CommandResults: ... def namespace(self) -> CommandResults: ... def noop(self) -> CommandResults: ... def partial(self, message_num: str, message_part: str, start: str, length: str) -> CommandResults: ... def proxyauth(self, user: str) -> CommandResults: ... def rename(self, oldmailbox: str, newmailbox: str) -> CommandResults: ... def search(self, charset: Optional[str], *criteria: str) -> CommandResults: ... def select(self, mailbox: str = ..., readonly: bool = ...) -> CommandResults: ... def setacl(self, mailbox: str, who: str, what: str) -> CommandResults: ... def setannotation(self, *args: str) -> CommandResults: ... def setquota(self, root: str, limits: str) -> CommandResults: ... def sort(self, sort_criteria: str, charset: str, *search_criteria: str) -> CommandResults: ... if sys.version_info >= (3,): def starttls(self, ssl_context: Optional[Any] = ...) -> CommandResults: ... def status(self, mailbox: str, names: str) -> CommandResults: ... def store(self, message_set: str, command: str, flags: str) -> CommandResults: ... def subscribe(self, mailbox: str) -> CommandResults: ... def thread(self, threading_algorithm: str, charset: str, *search_criteria: str) -> CommandResults: ... def uid(self, command: str, *args: str) -> CommandResults: ... def unsubscribe(self, mailbox: str) -> CommandResults: ... def xatom(self, name: str, *args: str) -> CommandResults: ... def print_log(self) -> None: ... class IMAP4_SSL(IMAP4): keyfile: str = ... certfile: str = ... if sys.version_info >= (3, 3): def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., ssl_context: Optional[SSLContext] = ...) -> None: ... else: def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...) -> None: ... host: str = ... port: int = ... sock: _socket = ... sslobj: SSLSocket = ... file: IO[Any] = ... def open(self, host: str = ..., port: Optional[int] = ...) -> None: ... def read(self, size: int) -> bytes: ... def readline(self) -> bytes: ... def send(self, data: bytes) -> None: ... def shutdown(self) -> None: ... def socket(self) -> _socket: ... def ssl(self) -> SSLSocket: ... class IMAP4_stream(IMAP4): command: str = ... def __init__(self, command: str) -> None: ... host: str = ... port: int = ... sock: _socket = ... file: IO[Any] = ... process: subprocess.Popen[bytes] = ... writefile: IO[Any] = ... readfile: IO[Any] = ... def open(self, host: str = ..., port: Optional[int] = ...) -> None: ... def read(self, size: int) -> bytes: ... def readline(self) -> bytes: ... def send(self, data: bytes) -> None: ... def shutdown(self) -> None: ... class _Authenticator: mech: Callable[[bytes], bytes] = ... def __init__(self, mechinst: Callable[[bytes], bytes]) -> None: ... def process(self, data: str) -> str: ... def encode(self, inp: bytes) -> str: ... def decode(self, inp: str) -> bytes: ... def Internaldate2tuple(resp: str) -> time.struct_time: ... def Int2AP(num: int) -> str: ... def ParseFlags(resp: str) -> Tuple[str]: ... def Time2Internaldate(date_time: Union[float, time.struct_time, str]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/zipimport.pyi0000664000175000017500000000126113577124116024444 0ustar davedave00000000000000"""Stub file for the 'zipimport' module.""" from typing import Optional from types import CodeType, ModuleType class ZipImportError(ImportError): ... class zipimporter(object): archive: str prefix: str def __init__(self, archivepath: str) -> None: ... def find_module(self, fullname: str, path: str = ...) -> Optional[zipimporter]: ... def get_code(self, fullname: str) -> CodeType: ... def get_data(self, pathname: str) -> str: ... def get_filename(self, fullname: str) -> str: ... def get_source(self, fullname: str) -> Optional[str]: ... def is_package(self, fullname: str) -> bool: ... def load_module(self, fullname: str) -> ModuleType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/difflib.pyi0000664000175000017500000000741513577124116024015 0ustar davedave00000000000000# Based on https://docs.python.org/2.7/library/difflib.html and https://docs.python.org/3.2/library/difflib.html import sys from typing import ( TypeVar, Callable, Iterable, Iterator, List, NamedTuple, Sequence, Tuple, Generic, Optional, Text, Union, AnyStr ) _T = TypeVar('_T') if sys.version_info >= (3,): _StrType = Text else: # Aliases can't point to type vars, so we need to redeclare AnyStr _StrType = TypeVar('_StrType', Text, bytes) _JunkCallback = Union[Callable[[Text], bool], Callable[[str], bool]] class Match(NamedTuple): a: int b: int size: int class SequenceMatcher(Generic[_T]): def __init__(self, isjunk: Optional[Callable[[_T], bool]] = ..., a: Sequence[_T] = ..., b: Sequence[_T] = ..., autojunk: bool = ...) -> None: ... def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ... def set_seq1(self, a: Sequence[_T]) -> None: ... def set_seq2(self, b: Sequence[_T]) -> None: ... def find_longest_match(self, alo: int, ahi: int, blo: int, bhi: int) -> Match: ... def get_matching_blocks(self) -> List[Match]: ... def get_opcodes(self) -> List[Tuple[str, int, int, int, int]]: ... def get_grouped_opcodes(self, n: int = ... ) -> Iterable[List[Tuple[str, int, int, int, int]]]: ... def ratio(self) -> float: ... def quick_ratio(self) -> float: ... def real_quick_ratio(self) -> float: ... def get_close_matches(word: Sequence[_T], possibilities: Iterable[Sequence[_T]], n: int = ..., cutoff: float = ...) -> List[Sequence[_T]]: ... class Differ: def __init__(self, linejunk: _JunkCallback = ..., charjunk: _JunkCallback = ...) -> None: ... def compare(self, a: Sequence[_StrType], b: Sequence[_StrType]) -> Iterator[_StrType]: ... def IS_LINE_JUNK(line: _StrType) -> bool: ... def IS_CHARACTER_JUNK(line: _StrType) -> bool: ... def unified_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType = ..., tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ..., n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ... def context_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType = ..., tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ..., n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ... def ndiff(a: Sequence[_StrType], b: Sequence[_StrType], linejunk: _JunkCallback = ..., charjunk: _JunkCallback = ... ) -> Iterator[_StrType]: ... class HtmlDiff(object): def __init__(self, tabsize: int = ..., wrapcolumn: int = ..., linejunk: _JunkCallback = ..., charjunk: _JunkCallback = ... ) -> None: ... def make_file(self, fromlines: Sequence[_StrType], tolines: Sequence[_StrType], fromdesc: _StrType = ..., todesc: _StrType = ..., context: bool = ..., numlines: int = ...) -> _StrType: ... def make_table(self, fromlines: Sequence[_StrType], tolines: Sequence[_StrType], fromdesc: _StrType = ..., todesc: _StrType = ..., context: bool = ..., numlines: int = ...) -> _StrType: ... def restore(delta: Iterable[_StrType], which: int) -> Iterator[_StrType]: ... if sys.version_info >= (3, 5): def diff_bytes( dfunc: Callable[[Sequence[str], Sequence[str], str, str, str, str, int, str], Iterator[str]], a: Sequence[bytes], b: Sequence[bytes], fromfile: bytes = ..., tofile: bytes = ..., fromfiledate: bytes = ..., tofiledate: bytes = ..., n: int = ..., lineterm: bytes = ... ) -> Iterator[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/colorsys.pyi0000664000175000017500000000113013577124116024257 0ustar davedave00000000000000# Stubs for colorsys from typing import Tuple def rgb_to_yiq(r: float, g: float, b: float) -> Tuple[float, float, float]: ... def yiq_to_rgb(y: float, i: float, q: float) -> Tuple[float, float, float]: ... def rgb_to_hls(r: float, g: float, b: float) -> Tuple[float, float, float]: ... def hls_to_rgb(h: float, l: float, s: float) -> Tuple[float, float, float]: ... def rgb_to_hsv(r: float, g: float, b: float) -> Tuple[float, float, float]: ... def hsv_to_rgb(h: float, s: float, v: float) -> Tuple[float, float, float]: ... # TODO undocumented ONE_SIXTH: float ONE_THIRD: float TWO_THIRD: float jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/builtins.pyi0000664000175000017500000021176113577124116024250 0ustar davedave00000000000000# True and False are deliberately omitted because they are keywords in # Python 3, and stub files conform to Python 3 syntax. from typing import ( TypeVar, Iterator, Iterable, NoReturn, overload, Container, Sequence, MutableSequence, Mapping, MutableMapping, Tuple, List, Any, Dict, Callable, Generic, Set, AbstractSet, FrozenSet, MutableSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs, SupportsComplex, IO, BinaryIO, Union, ItemsView, KeysView, ValuesView, ByteString, Optional, AnyStr, Type, Text, Protocol, ) from abc import abstractmethod, ABCMeta from ast import mod, AST from types import TracebackType, CodeType import sys if sys.version_info >= (3,): from typing import SupportsBytes, SupportsRound if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal _T = TypeVar('_T') _T_co = TypeVar('_T_co', covariant=True) _KT = TypeVar('_KT') _VT = TypeVar('_VT') _S = TypeVar('_S') _T1 = TypeVar('_T1') _T2 = TypeVar('_T2') _T3 = TypeVar('_T3') _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _TT = TypeVar('_TT', bound='type') class _SupportsIndex(Protocol): def __index__(self) -> int: ... class object: __doc__: Optional[str] __dict__: Dict[str, Any] __slots__: Union[Text, Iterable[Text]] __module__: str if sys.version_info >= (3, 6): __annotations__: Dict[str, Any] @property def __class__(self: _T) -> Type[_T]: ... @__class__.setter def __class__(self, __type: Type[object]) -> None: ... def __init__(self) -> None: ... def __new__(cls) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __eq__(self, o: object) -> bool: ... def __ne__(self, o: object) -> bool: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __hash__(self) -> int: ... def __format__(self, format_spec: str) -> str: ... def __getattribute__(self, name: str) -> Any: ... def __delattr__(self, name: str) -> None: ... def __sizeof__(self) -> int: ... def __reduce__(self) -> Union[str, Tuple[Any, ...]]: ... def __reduce_ex__(self, protocol: int) -> Union[str, Tuple[Any, ...]]: ... if sys.version_info >= (3,): def __dir__(self) -> Iterable[str]: ... if sys.version_info >= (3, 6): def __init_subclass__(cls) -> None: ... class staticmethod(object): # Special, only valid as a decorator. __func__: Callable[..., Any] if sys.version_info >= (3,): __isabstractmethod__: bool def __init__(self, f: Callable[..., Any]) -> None: ... def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable[..., Any]: ... class classmethod(object): # Special, only valid as a decorator. __func__: Callable[..., Any] if sys.version_info >= (3,): __isabstractmethod__: bool def __init__(self, f: Callable[..., Any]) -> None: ... def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable[..., Any]: ... class type(object): __base__: type __bases__: Tuple[type, ...] __basicsize__: int __dict__: Dict[str, Any] __dictoffset__: int __flags__: int __itemsize__: int __module__: str __mro__: Tuple[type, ...] __name__: str if sys.version_info >= (3,): __qualname__: str __text_signature__: Optional[str] __weakrefoffset__: int @overload def __init__(self, o: object) -> None: ... @overload def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ... @overload def __new__(cls, o: object) -> type: ... @overload def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ... def __call__(self, *args: Any, **kwds: Any) -> Any: ... def __subclasses__(self: _TT) -> List[_TT]: ... # Note: the documentation doesnt specify what the return type is, the standard # implementation seems to be returning a list. def mro(self) -> List[type]: ... def __instancecheck__(self, instance: Any) -> bool: ... def __subclasscheck__(self, subclass: type) -> bool: ... if sys.version_info >= (3,): @classmethod def __prepare__(metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any) -> Mapping[str, Any]: ... class super(object): if sys.version_info >= (3,): @overload def __init__(self, t: Any, obj: Any) -> None: ... @overload def __init__(self, t: Any) -> None: ... @overload def __init__(self) -> None: ... else: @overload def __init__(self, t: Any, obj: Any) -> None: ... @overload def __init__(self, t: Any) -> None: ... class int: @overload def __init__(self, x: Union[Text, bytes, SupportsInt, _SupportsIndex] = ...) -> None: ... @overload def __init__(self, x: Union[Text, bytes, bytearray], base: int) -> None: ... if sys.version_info >= (3, 8): def as_integer_ratio(self) -> Tuple[int, Literal[1]]: ... @property def real(self) -> int: ... @property def imag(self) -> int: ... @property def numerator(self) -> int: ... @property def denominator(self) -> int: ... def conjugate(self) -> int: ... def bit_length(self) -> int: ... if sys.version_info >= (3,): def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ... @classmethod def from_bytes(cls, bytes: Sequence[int], byteorder: str, *, signed: bool = ...) -> int: ... # TODO buffer object argument def __add__(self, x: int) -> int: ... def __sub__(self, x: int) -> int: ... def __mul__(self, x: int) -> int: ... def __floordiv__(self, x: int) -> int: ... if sys.version_info < (3,): def __div__(self, x: int) -> int: ... def __truediv__(self, x: int) -> float: ... def __mod__(self, x: int) -> int: ... def __divmod__(self, x: int) -> Tuple[int, int]: ... def __radd__(self, x: int) -> int: ... def __rsub__(self, x: int) -> int: ... def __rmul__(self, x: int) -> int: ... def __rfloordiv__(self, x: int) -> int: ... if sys.version_info < (3,): def __rdiv__(self, x: int) -> int: ... def __rtruediv__(self, x: int) -> float: ... def __rmod__(self, x: int) -> int: ... def __rdivmod__(self, x: int) -> Tuple[int, int]: ... def __pow__(self, __x: int, __modulo: Optional[int] = ...) -> Any: ... # Return type can be int or float, depending on x. def __rpow__(self, x: int) -> Any: ... def __and__(self, n: int) -> int: ... def __or__(self, n: int) -> int: ... def __xor__(self, n: int) -> int: ... def __lshift__(self, n: int) -> int: ... def __rshift__(self, n: int) -> int: ... def __rand__(self, n: int) -> int: ... def __ror__(self, n: int) -> int: ... def __rxor__(self, n: int) -> int: ... def __rlshift__(self, n: int) -> int: ... def __rrshift__(self, n: int) -> int: ... def __neg__(self) -> int: ... def __pos__(self) -> int: ... def __invert__(self) -> int: ... def __trunc__(self) -> int: ... if sys.version_info >= (3,): def __ceil__(self) -> int: ... def __floor__(self) -> int: ... def __round__(self, ndigits: Optional[int] = ...) -> int: ... def __getnewargs__(self) -> Tuple[int]: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: int) -> bool: ... def __le__(self, x: int) -> bool: ... def __gt__(self, x: int) -> bool: ... def __ge__(self, x: int) -> bool: ... def __str__(self) -> str: ... def __float__(self) -> float: ... def __int__(self) -> int: ... def __abs__(self) -> int: ... def __hash__(self) -> int: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... def __index__(self) -> int: ... class float: def __init__(self, x: Union[SupportsFloat, _SupportsIndex, Text, bytes, bytearray] = ...) -> None: ... def as_integer_ratio(self) -> Tuple[int, int]: ... def hex(self) -> str: ... def is_integer(self) -> bool: ... @classmethod def fromhex(cls, s: str) -> float: ... @property def real(self) -> float: ... @property def imag(self) -> float: ... def conjugate(self) -> float: ... def __add__(self, x: float) -> float: ... def __sub__(self, x: float) -> float: ... def __mul__(self, x: float) -> float: ... def __floordiv__(self, x: float) -> float: ... if sys.version_info < (3,): def __div__(self, x: float) -> float: ... def __truediv__(self, x: float) -> float: ... def __mod__(self, x: float) -> float: ... def __divmod__(self, x: float) -> Tuple[float, float]: ... def __pow__(self, x: float) -> float: ... # In Python 3, returns complex if self is negative and x is not whole def __radd__(self, x: float) -> float: ... def __rsub__(self, x: float) -> float: ... def __rmul__(self, x: float) -> float: ... def __rfloordiv__(self, x: float) -> float: ... if sys.version_info < (3,): def __rdiv__(self, x: float) -> float: ... def __rtruediv__(self, x: float) -> float: ... def __rmod__(self, x: float) -> float: ... def __rdivmod__(self, x: float) -> Tuple[float, float]: ... def __rpow__(self, x: float) -> float: ... def __getnewargs__(self) -> Tuple[float]: ... def __trunc__(self) -> int: ... if sys.version_info >= (3,): @overload def __round__(self, ndigits: None = ...) -> int: ... @overload def __round__(self, ndigits: int) -> float: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: float) -> bool: ... def __le__(self, x: float) -> bool: ... def __gt__(self, x: float) -> bool: ... def __ge__(self, x: float) -> bool: ... def __neg__(self) -> float: ... def __pos__(self) -> float: ... def __str__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... class complex: @overload def __init__(self, real: float = ..., imag: float = ...) -> None: ... @overload def __init__(self, real: Union[str, SupportsComplex, _SupportsIndex]) -> None: ... @property def real(self) -> float: ... @property def imag(self) -> float: ... def conjugate(self) -> complex: ... def __add__(self, x: complex) -> complex: ... def __sub__(self, x: complex) -> complex: ... def __mul__(self, x: complex) -> complex: ... def __pow__(self, x: complex) -> complex: ... if sys.version_info < (3,): def __div__(self, x: complex) -> complex: ... def __truediv__(self, x: complex) -> complex: ... def __radd__(self, x: complex) -> complex: ... def __rsub__(self, x: complex) -> complex: ... def __rmul__(self, x: complex) -> complex: ... def __rpow__(self, x: complex) -> complex: ... if sys.version_info < (3,): def __rdiv__(self, x: complex) -> complex: ... def __rtruediv__(self, x: complex) -> complex: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __neg__(self) -> complex: ... def __pos__(self) -> complex: ... def __str__(self) -> str: ... def __complex__(self) -> complex: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... if sys.version_info >= (3,): _str_base = object else: class basestring(metaclass=ABCMeta): ... class unicode(basestring, Sequence[unicode]): @overload def __init__(self) -> None: ... @overload def __init__(self, o: object) -> None: ... @overload def __init__(self, o: str, encoding: unicode = ..., errors: unicode = ...) -> None: ... def capitalize(self) -> unicode: ... def center(self, width: int, fillchar: unicode = ...) -> unicode: ... def count(self, x: unicode) -> int: ... def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ... def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ... def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = ..., end: int = ...) -> bool: ... def expandtabs(self, tabsize: int = ...) -> unicode: ... def find(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def format(self, *args: object, **kwargs: object) -> unicode: ... def index(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... def isdecimal(self) -> bool: ... def isdigit(self) -> bool: ... def isidentifier(self) -> bool: ... def islower(self) -> bool: ... def isnumeric(self) -> bool: ... def isprintable(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... def join(self, iterable: Iterable[unicode]) -> unicode: ... def ljust(self, width: int, fillchar: unicode = ...) -> unicode: ... def lower(self) -> unicode: ... def lstrip(self, chars: unicode = ...) -> unicode: ... def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def replace(self, old: unicode, new: unicode, count: int = ...) -> unicode: ... def rfind(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rindex(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rjust(self, width: int, fillchar: unicode = ...) -> unicode: ... def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def rsplit(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ... def rstrip(self, chars: unicode = ...) -> unicode: ... def split(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ... def splitlines(self, keepends: bool = ...) -> List[unicode]: ... def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = ..., end: int = ...) -> bool: ... def strip(self, chars: unicode = ...) -> unicode: ... def swapcase(self) -> unicode: ... def title(self) -> unicode: ... def translate(self, table: Union[Dict[int, Any], unicode]) -> unicode: ... def upper(self) -> unicode: ... def zfill(self, width: int) -> unicode: ... @overload def __getitem__(self, i: int) -> unicode: ... @overload def __getitem__(self, s: slice) -> unicode: ... def __getslice__(self, start: int, stop: int) -> unicode: ... def __add__(self, s: unicode) -> unicode: ... def __mul__(self, n: int) -> unicode: ... def __rmul__(self, n: int) -> unicode: ... def __mod__(self, x: Any) -> unicode: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: unicode) -> bool: ... def __le__(self, x: unicode) -> bool: ... def __gt__(self, x: unicode) -> bool: ... def __ge__(self, x: unicode) -> bool: ... def __len__(self) -> int: ... # The argument type is incompatible with Sequence def __contains__(self, s: Union[unicode, bytes]) -> bool: ... # type: ignore def __iter__(self) -> Iterator[unicode]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __hash__(self) -> int: ... def __getnewargs__(self) -> Tuple[unicode]: ... _str_base = basestring class str(Sequence[str], _str_base): if sys.version_info >= (3,): @overload def __init__(self, o: object = ...) -> None: ... @overload def __init__(self, o: bytes, encoding: str = ..., errors: str = ...) -> None: ... else: def __init__(self, o: object = ...) -> None: ... def capitalize(self) -> str: ... if sys.version_info >= (3, 3): def casefold(self) -> str: ... def center(self, width: int, fillchar: str = ...) -> str: ... def count(self, x: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... if sys.version_info < (3,): def decode(self, encoding: Text = ..., errors: Text = ...) -> unicode: ... def encode(self, encoding: Text = ..., errors: Text = ...) -> bytes: ... if sys.version_info >= (3,): def endswith(self, suffix: Union[Text, Tuple[Text, ...]], start: Optional[int] = ..., end: Optional[int] = ...) -> bool: ... else: def endswith(self, suffix: Union[Text, Tuple[Text, ...]]) -> bool: ... def expandtabs(self, tabsize: int = ...) -> str: ... def find(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def format(self, *args: object, **kwargs: object) -> str: ... if sys.version_info >= (3,): def format_map(self, map: Mapping[str, Any]) -> str: ... def index(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... if sys.version_info >= (3, 7): def isascii(self) -> bool: ... if sys.version_info >= (3,): def isdecimal(self) -> bool: ... def isdigit(self) -> bool: ... if sys.version_info >= (3,): def isidentifier(self) -> bool: ... def islower(self) -> bool: ... if sys.version_info >= (3,): def isnumeric(self) -> bool: ... def isprintable(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... if sys.version_info >= (3,): def join(self, iterable: Iterable[str]) -> str: ... else: def join(self, iterable: Iterable[AnyStr]) -> AnyStr: ... def ljust(self, width: int, fillchar: str = ...) -> str: ... def lower(self) -> str: ... if sys.version_info >= (3,): def lstrip(self, chars: Optional[str] = ...) -> str: ... def partition(self, sep: str) -> Tuple[str, str, str]: ... def replace(self, old: str, new: str, count: int = ...) -> str: ... else: @overload def lstrip(self, chars: str = ...) -> str: ... @overload def lstrip(self, chars: unicode) -> unicode: ... @overload def partition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... @overload def partition(self, sep: str) -> Tuple[str, str, str]: ... @overload def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def replace(self, old: AnyStr, new: AnyStr, count: int = ...) -> AnyStr: ... def rfind(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def rindex(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def rjust(self, width: int, fillchar: str = ...) -> str: ... if sys.version_info >= (3,): def rpartition(self, sep: str) -> Tuple[str, str, str]: ... def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... def rstrip(self, chars: Optional[str] = ...) -> str: ... def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... else: @overload def rpartition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... @overload def rpartition(self, sep: str) -> Tuple[str, str, str]: ... @overload def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... @overload def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... @overload def rsplit(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... @overload def rstrip(self, chars: str = ...) -> str: ... @overload def rstrip(self, chars: unicode) -> unicode: ... @overload def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... @overload def split(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... def splitlines(self, keepends: bool = ...) -> List[str]: ... if sys.version_info >= (3,): def startswith(self, prefix: Union[Text, Tuple[Text, ...]], start: Optional[int] = ..., end: Optional[int] = ...) -> bool: ... def strip(self, chars: Optional[str] = ...) -> str: ... else: def startswith(self, prefix: Union[Text, Tuple[Text, ...]]) -> bool: ... @overload def strip(self, chars: str = ...) -> str: ... @overload def strip(self, chars: unicode) -> unicode: ... def swapcase(self) -> str: ... def title(self) -> str: ... if sys.version_info >= (3,): def translate(self, table: Union[Mapping[int, Union[int, str, None]], Sequence[Union[int, str, None]]]) -> str: ... else: def translate(self, table: Optional[AnyStr], deletechars: AnyStr = ...) -> AnyStr: ... def upper(self) -> str: ... def zfill(self, width: int) -> str: ... if sys.version_info >= (3,): @staticmethod @overload def maketrans(x: Union[Dict[int, _T], Dict[str, _T], Dict[Union[str, int], _T]]) -> Dict[int, _T]: ... @staticmethod @overload def maketrans(x: str, y: str, z: str = ...) -> Dict[int, Union[int, None]]: ... if sys.version_info >= (3,): def __add__(self, s: str) -> str: ... else: def __add__(self, s: AnyStr) -> AnyStr: ... # Incompatible with Sequence.__contains__ def __contains__(self, o: Union[str, Text]) -> bool: ... # type: ignore def __eq__(self, x: object) -> bool: ... def __ge__(self, x: Text) -> bool: ... def __getitem__(self, i: Union[int, slice]) -> str: ... def __gt__(self, x: Text) -> bool: ... def __hash__(self) -> int: ... def __iter__(self) -> Iterator[str]: ... def __le__(self, x: Text) -> bool: ... def __len__(self) -> int: ... def __lt__(self, x: Text) -> bool: ... def __mod__(self, x: Any) -> str: ... def __mul__(self, n: int) -> str: ... def __ne__(self, x: object) -> bool: ... def __repr__(self) -> str: ... def __rmul__(self, n: int) -> str: ... def __str__(self) -> str: ... def __getnewargs__(self) -> Tuple[str]: ... if sys.version_info < (3,): def __getslice__(self, start: int, stop: int) -> str: ... def __float__(self) -> float: ... def __int__(self) -> int: ... if sys.version_info >= (3,): class bytes(ByteString): @overload def __init__(self, ints: Iterable[int]) -> None: ... @overload def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ... @overload def __init__(self, length: int) -> None: ... @overload def __init__(self) -> None: ... @overload def __init__(self, o: SupportsBytes) -> None: ... def capitalize(self) -> bytes: ... def center(self, width: int, fillchar: bytes = ...) -> bytes: ... def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def decode(self, encoding: str = ..., errors: str = ...) -> str: ... def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... def expandtabs(self, tabsize: int = ...) -> bytes: ... def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... if sys.version_info >= (3, 5): def hex(self) -> str: ... def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... if sys.version_info >= (3, 7): def isascii(self) -> bool: ... def isdigit(self) -> bool: ... def islower(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... def join(self, iterable: Iterable[Union[ByteString, memoryview]]) -> bytes: ... def ljust(self, width: int, fillchar: bytes = ...) -> bytes: ... def lower(self) -> bytes: ... def lstrip(self, chars: Optional[bytes] = ...) -> bytes: ... def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ... def replace(self, old: bytes, new: bytes, count: int = ...) -> bytes: ... def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def rjust(self, width: int, fillchar: bytes = ...) -> bytes: ... def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ... def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ... def rstrip(self, chars: Optional[bytes] = ...) -> bytes: ... def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ... def splitlines(self, keepends: bool = ...) -> List[bytes]: ... def startswith( self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ..., end: Optional[int] = ..., ) -> bool: ... def strip(self, chars: Optional[bytes] = ...) -> bytes: ... def swapcase(self) -> bytes: ... def title(self) -> bytes: ... def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytes: ... def upper(self) -> bytes: ... def zfill(self, width: int) -> bytes: ... @classmethod def fromhex(cls, s: str) -> bytes: ... @classmethod def maketrans(cls, frm: bytes, to: bytes) -> bytes: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[int]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __hash__(self) -> int: ... @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> bytes: ... def __add__(self, s: bytes) -> bytes: ... def __mul__(self, n: int) -> bytes: ... def __rmul__(self, n: int) -> bytes: ... if sys.version_info >= (3, 5): def __mod__(self, value: Any) -> bytes: ... # Incompatible with Sequence.__contains__ def __contains__(self, o: Union[int, bytes]) -> bool: ... # type: ignore def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: bytes) -> bool: ... def __le__(self, x: bytes) -> bool: ... def __gt__(self, x: bytes) -> bool: ... def __ge__(self, x: bytes) -> bool: ... def __getnewargs__(self) -> Tuple[bytes]: ... else: bytes = str class bytearray(MutableSequence[int], ByteString): if sys.version_info >= (3,): @overload def __init__(self) -> None: ... @overload def __init__(self, ints: Iterable[int]) -> None: ... @overload def __init__(self, string: Text, encoding: Text, errors: Text = ...) -> None: ... @overload def __init__(self, length: int) -> None: ... else: @overload def __init__(self) -> None: ... @overload def __init__(self, ints: Iterable[int]) -> None: ... @overload def __init__(self, string: str) -> None: ... @overload def __init__(self, string: Text, encoding: Text, errors: Text = ...) -> None: ... @overload def __init__(self, length: int) -> None: ... def capitalize(self) -> bytearray: ... def center(self, width: int, fillchar: bytes = ...) -> bytearray: ... if sys.version_info >= (3,): def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def copy(self) -> bytearray: ... else: def count(self, x: str) -> int: ... def decode(self, encoding: Text = ..., errors: Text = ...) -> str: ... def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... def expandtabs(self, tabsize: int = ...) -> bytearray: ... if sys.version_info < (3,): def extend(self, iterable: Union[str, Iterable[int]]) -> None: ... if sys.version_info >= (3,): def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... if sys.version_info >= (3, 5): def hex(self) -> str: ... def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... else: def find(self, sub: str, start: int = ..., end: int = ...) -> int: ... def index(self, sub: str, start: int = ..., end: int = ...) -> int: ... def insert(self, index: int, object: int) -> None: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... if sys.version_info >= (3, 7): def isascii(self) -> bool: ... def isdigit(self) -> bool: ... def islower(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... if sys.version_info >= (3,): def join(self, iterable: Iterable[Union[ByteString, memoryview]]) -> bytearray: ... def ljust(self, width: int, fillchar: bytes = ...) -> bytearray: ... else: def join(self, iterable: Iterable[str]) -> bytearray: ... def ljust(self, width: int, fillchar: str = ...) -> bytearray: ... def lower(self) -> bytearray: ... def lstrip(self, chars: Optional[bytes] = ...) -> bytearray: ... def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ... def replace(self, old: bytes, new: bytes, count: int = ...) -> bytearray: ... if sys.version_info >= (3,): def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... else: def rfind(self, sub: bytes, start: int = ..., end: int = ...) -> int: ... def rindex(self, sub: bytes, start: int = ..., end: int = ...) -> int: ... def rjust(self, width: int, fillchar: bytes = ...) -> bytearray: ... def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ... def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ... def rstrip(self, chars: Optional[bytes] = ...) -> bytearray: ... def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ... def splitlines(self, keepends: bool = ...) -> List[bytearray]: ... def startswith( self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ..., end: Optional[int] = ..., ) -> bool: ... def strip(self, chars: Optional[bytes] = ...) -> bytearray: ... def swapcase(self) -> bytearray: ... def title(self) -> bytearray: ... if sys.version_info >= (3,): def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytearray: ... else: def translate(self, table: str) -> bytearray: ... def upper(self) -> bytearray: ... def zfill(self, width: int) -> bytearray: ... @staticmethod def fromhex(s: str) -> bytearray: ... if sys.version_info >= (3,): @classmethod def maketrans(cls, frm: bytes, to: bytes) -> bytes: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[int]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... __hash__: None # type: ignore @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> bytearray: ... @overload def __setitem__(self, i: int, x: int) -> None: ... @overload def __setitem__(self, s: slice, x: Union[Iterable[int], bytes]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... if sys.version_info < (3,): def __getslice__(self, start: int, stop: int) -> bytearray: ... def __setslice__(self, start: int, stop: int, x: Union[Sequence[int], str]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __add__(self, s: bytes) -> bytearray: ... if sys.version_info >= (3,): def __iadd__(self, s: Iterable[int]) -> bytearray: ... def __mul__(self, n: int) -> bytearray: ... if sys.version_info >= (3,): def __rmul__(self, n: int) -> bytearray: ... def __imul__(self, n: int) -> bytearray: ... if sys.version_info >= (3, 5): def __mod__(self, value: Any) -> bytes: ... # Incompatible with Sequence.__contains__ def __contains__(self, o: Union[int, bytes]) -> bool: ... # type: ignore def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: bytes) -> bool: ... def __le__(self, x: bytes) -> bool: ... def __gt__(self, x: bytes) -> bool: ... def __ge__(self, x: bytes) -> bool: ... if sys.version_info >= (3,): _mv_container_type = int else: _mv_container_type = str class memoryview(Sized, Container[_mv_container_type]): format: str itemsize: int shape: Optional[Tuple[int, ...]] strides: Optional[Tuple[int, ...]] suboffsets: Optional[Tuple[int, ...]] readonly: bool ndim: int if sys.version_info >= (3,): c_contiguous: bool f_contiguous: bool contiguous: bool nbytes: int def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ... def __enter__(self) -> memoryview: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ... else: def __init__(self, obj: Union[bytes, bytearray, buffer, memoryview]) -> None: ... @overload def __getitem__(self, i: int) -> _mv_container_type: ... @overload def __getitem__(self, s: slice) -> memoryview: ... def __contains__(self, x: object) -> bool: ... def __iter__(self) -> Iterator[_mv_container_type]: ... def __len__(self) -> int: ... @overload def __setitem__(self, s: slice, o: memoryview) -> None: ... @overload def __setitem__(self, i: int, o: bytes) -> None: ... @overload def __setitem__(self, s: slice, o: Sequence[bytes]) -> None: ... def tobytes(self) -> bytes: ... def tolist(self) -> List[int]: ... if sys.version_info >= (3, 2): def release(self) -> None: ... if sys.version_info >= (3, 5): def hex(self) -> str: ... class bool(int): def __init__(self, o: object = ...) -> None: ... @overload def __and__(self, x: bool) -> bool: ... @overload def __and__(self, x: int) -> int: ... @overload def __or__(self, x: bool) -> bool: ... @overload def __or__(self, x: int) -> int: ... @overload def __xor__(self, x: bool) -> bool: ... @overload def __xor__(self, x: int) -> int: ... @overload def __rand__(self, x: bool) -> bool: ... @overload def __rand__(self, x: int) -> int: ... @overload def __ror__(self, x: bool) -> bool: ... @overload def __ror__(self, x: int) -> int: ... @overload def __rxor__(self, x: bool) -> bool: ... @overload def __rxor__(self, x: int) -> int: ... def __getnewargs__(self) -> Tuple[int]: ... class slice(object): start: Any step: Any stop: Any @overload def __init__(self, stop: Any) -> None: ... @overload def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ... __hash__: None # type: ignore def indices(self, len: int) -> Tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]): def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... def __init__(self, iterable: Iterable[_T_co] = ...): ... def __len__(self) -> int: ... def __contains__(self, x: object) -> bool: ... @overload def __getitem__(self, x: int) -> _T_co: ... @overload def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ... def __iter__(self) -> Iterator[_T_co]: ... def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ... def __le__(self, x: Tuple[_T_co, ...]) -> bool: ... def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ... def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ... @overload def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ... @overload def __add__(self, x: Tuple[Any, ...]) -> Tuple[Any, ...]: ... def __mul__(self, n: int) -> Tuple[_T_co, ...]: ... def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ... def count(self, x: Any) -> int: ... if sys.version_info >= (3, 5): def index(self, x: Any, start: int = ..., end: int = ...) -> int: ... else: def index(self, x: Any) -> int: ... class list(MutableSequence[_T], Generic[_T]): @overload def __init__(self) -> None: ... @overload def __init__(self, iterable: Iterable[_T]) -> None: ... if sys.version_info >= (3,): def clear(self) -> None: ... def copy(self) -> List[_T]: ... def append(self, object: _T) -> None: ... def extend(self, iterable: Iterable[_T]) -> None: ... def pop(self, index: int = ...) -> _T: ... def index(self, object: _T, start: int = ..., stop: int = ...) -> int: ... def count(self, object: _T) -> int: ... def insert(self, index: int, object: _T) -> None: ... def remove(self, object: _T) -> None: ... def reverse(self) -> None: ... if sys.version_info >= (3,): def sort(self, *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> None: ... else: def sort(self, cmp: Callable[[_T, _T], Any] = ..., key: Callable[[_T], Any] = ..., reverse: bool = ...) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... __hash__: None # type: ignore @overload def __getitem__(self, i: int) -> _T: ... @overload def __getitem__(self, s: slice) -> List[_T]: ... @overload def __setitem__(self, i: int, o: _T) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... if sys.version_info < (3,): def __getslice__(self, start: int, stop: int) -> List[_T]: ... def __setslice__(self, start: int, stop: int, o: Sequence[_T]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __add__(self, x: List[_T]) -> List[_T]: ... def __iadd__(self: _S, x: Iterable[_T]) -> _S: ... def __mul__(self, n: int) -> List[_T]: ... def __rmul__(self, n: int) -> List[_T]: ... if sys.version_info >= (3,): def __imul__(self: _S, n: int) -> _S: ... def __contains__(self, o: object) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... def __gt__(self, x: List[_T]) -> bool: ... def __ge__(self, x: List[_T]) -> bool: ... def __lt__(self, x: List[_T]) -> bool: ... def __le__(self, x: List[_T]) -> bool: ... class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): # NOTE: Keyword arguments are special. If they are used, _KT must include # str, but we have no way of enforcing it here. @overload def __init__(self, **kwargs: _VT) -> None: ... @overload def __init__(self, map: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def __init__(self, iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ... if sys.version_info < (3,): def has_key(self, k: _KT) -> bool: ... def clear(self) -> None: ... def copy(self) -> Dict[_KT, _VT]: ... def popitem(self) -> Tuple[_KT, _VT]: ... def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... @overload def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... @overload def update(self, **kwargs: _VT) -> None: ... if sys.version_info >= (3,): def keys(self) -> KeysView[_KT]: ... def values(self) -> ValuesView[_VT]: ... def items(self) -> ItemsView[_KT, _VT]: ... else: def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT]: ... def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... def viewkeys(self) -> KeysView[_KT]: ... def viewvalues(self) -> ValuesView[_VT]: ... def viewitems(self) -> ItemsView[_KT, _VT]: ... @staticmethod @overload def fromkeys(seq: Iterable[_T]) -> Dict[_T, Any]: ... # TODO: Actually a class method (mypy/issues#328) @staticmethod @overload def fromkeys(seq: Iterable[_T], value: _S) -> Dict[_T, _S]: ... def __len__(self) -> int: ... def __getitem__(self, k: _KT) -> _VT: ... def __setitem__(self, k: _KT, v: _VT) -> None: ... def __delitem__(self, v: _KT) -> None: ... def __iter__(self) -> Iterator[_KT]: ... if sys.version_info >= (3, 8): def __reversed__(self) -> Iterator[_KT]: ... def __str__(self) -> str: ... __hash__: None # type: ignore class set(MutableSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... def add(self, element: _T) -> None: ... def clear(self) -> None: ... def copy(self) -> Set[_T]: ... def difference(self, *s: Iterable[Any]) -> Set[_T]: ... def difference_update(self, *s: Iterable[Any]) -> None: ... def discard(self, element: _T) -> None: ... def intersection(self, *s: Iterable[Any]) -> Set[_T]: ... def intersection_update(self, *s: Iterable[Any]) -> None: ... def isdisjoint(self, s: Iterable[Any]) -> bool: ... def issubset(self, s: Iterable[Any]) -> bool: ... def issuperset(self, s: Iterable[Any]) -> bool: ... def pop(self) -> _T: ... def remove(self, element: _T) -> None: ... def symmetric_difference(self, s: Iterable[_T]) -> Set[_T]: ... def symmetric_difference_update(self, s: Iterable[_T]) -> None: ... def union(self, *s: Iterable[_T]) -> Set[_T]: ... def update(self, *s: Iterable[_T]) -> None: ... def __len__(self) -> int: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... def __and__(self, s: AbstractSet[object]) -> Set[_T]: ... def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ... def __or__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __ior__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __sub__(self, s: AbstractSet[object]) -> Set[_T]: ... def __isub__(self, s: AbstractSet[object]) -> Set[_T]: ... def __xor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __ixor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __le__(self, s: AbstractSet[object]) -> bool: ... def __lt__(self, s: AbstractSet[object]) -> bool: ... def __ge__(self, s: AbstractSet[object]) -> bool: ... def __gt__(self, s: AbstractSet[object]) -> bool: ... __hash__: None # type: ignore class frozenset(AbstractSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... def copy(self) -> FrozenSet[_T]: ... def difference(self, *s: Iterable[object]) -> FrozenSet[_T]: ... def intersection(self, *s: Iterable[object]) -> FrozenSet[_T]: ... def isdisjoint(self, s: Iterable[_T]) -> bool: ... def issubset(self, s: Iterable[object]) -> bool: ... def issuperset(self, s: Iterable[object]) -> bool: ... def symmetric_difference(self, s: Iterable[_T]) -> FrozenSet[_T]: ... def union(self, *s: Iterable[_T]) -> FrozenSet[_T]: ... def __len__(self) -> int: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... def __and__(self, s: AbstractSet[_T]) -> FrozenSet[_T]: ... def __or__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ... def __sub__(self, s: AbstractSet[_T]) -> FrozenSet[_T]: ... def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ... def __le__(self, s: AbstractSet[object]) -> bool: ... def __lt__(self, s: AbstractSet[object]) -> bool: ... def __ge__(self, s: AbstractSet[object]) -> bool: ... def __gt__(self, s: AbstractSet[object]) -> bool: ... class enumerate(Iterator[Tuple[int, _T]], Generic[_T]): def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ... def __iter__(self) -> Iterator[Tuple[int, _T]]: ... if sys.version_info >= (3,): def __next__(self) -> Tuple[int, _T]: ... else: def next(self) -> Tuple[int, _T]: ... if sys.version_info >= (3,): class range(Sequence[int]): start: int stop: int step: int @overload def __init__(self, stop: int) -> None: ... @overload def __init__(self, start: int, stop: int, step: int = ...) -> None: ... def count(self, value: int) -> int: ... def index(self, value: int, start: int = ..., stop: Optional[int] = ...) -> int: ... def __len__(self) -> int: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[int]: ... @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> range: ... def __repr__(self) -> str: ... def __reversed__(self) -> Iterator[int]: ... else: class xrange(Sized, Iterable[int], Reversible[int]): @overload def __init__(self, stop: int) -> None: ... @overload def __init__(self, start: int, stop: int, step: int = ...) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[int]: ... def __getitem__(self, i: int) -> int: ... def __reversed__(self) -> Iterator[int]: ... class property(object): def __init__(self, fget: Optional[Callable[[Any], Any]] = ..., fset: Optional[Callable[[Any, Any], None]] = ..., fdel: Optional[Callable[[Any], None]] = ..., doc: Optional[str] = ...) -> None: ... def getter(self, fget: Callable[[Any], Any]) -> property: ... def setter(self, fset: Callable[[Any, Any], None]) -> property: ... def deleter(self, fdel: Callable[[Any], None]) -> property: ... def __get__(self, obj: Any, type: Optional[type] = ...) -> Any: ... def __set__(self, obj: Any, value: Any) -> None: ... def __delete__(self, obj: Any) -> None: ... def fget(self) -> Any: ... def fset(self, value: Any) -> None: ... def fdel(self) -> None: ... if sys.version_info < (3,): long = int NotImplemented: Any def abs(__n: SupportsAbs[_T]) -> _T: ... def all(__i: Iterable[object]) -> bool: ... def any(__i: Iterable[object]) -> bool: ... if sys.version_info < (3,): def apply(__func: Callable[..., _T], __args: Optional[Sequence[Any]] = ..., __kwds: Optional[Mapping[str, Any]] = ...) -> _T: ... if sys.version_info >= (3,): def ascii(__o: object) -> str: ... def bin(__number: Union[int, _SupportsIndex]) -> str: ... if sys.version_info >= (3, 7): def breakpoint(*args: Any, **kws: Any) -> None: ... def callable(__o: object) -> bool: ... def chr(__code: int) -> str: ... if sys.version_info < (3,): def cmp(__x: Any, __y: Any) -> int: ... _N1 = TypeVar('_N1', bool, int, float, complex) def coerce(__x: _N1, __y: _N1) -> Tuple[_N1, _N1]: ... if sys.version_info >= (3, 6): # This class is to be exported as PathLike from os, # but we define it here as _PathLike to avoid import cycle issues. # See https://github.com/python/typeshed/pull/991#issuecomment-288160993 class _PathLike(Generic[AnyStr]): def __fspath__(self) -> AnyStr: ... def compile(source: Union[str, bytes, mod, AST], filename: Union[str, bytes, _PathLike[Any]], mode: str, flags: int = ..., dont_inherit: int = ..., optimize: int = ...) -> Any: ... elif sys.version_info >= (3,): def compile(source: Union[str, bytes, mod, AST], filename: Union[str, bytes], mode: str, flags: int = ..., dont_inherit: int = ..., optimize: int = ...) -> Any: ... else: def compile(source: Union[Text, mod], filename: Text, mode: Text, flags: int = ..., dont_inherit: int = ...) -> Any: ... if sys.version_info >= (3,): def copyright() -> None: ... def credits() -> None: ... def delattr(__o: Any, __name: Text) -> None: ... def dir(__o: object = ...) -> List[str]: ... _N2 = TypeVar('_N2', int, float) def divmod(__a: _N2, __b: _N2) -> Tuple[_N2, _N2]: ... def eval(__source: Union[Text, bytes, CodeType], __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Mapping[str, Any]] = ...) -> Any: ... if sys.version_info >= (3,): def exec(__object: Union[str, bytes, CodeType], __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Mapping[str, Any]] = ...) -> Any: ... else: def execfile(__filename: str, __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Dict[str, Any]] = ...) -> None: ... def exit(code: object = ...) -> NoReturn: ... if sys.version_info >= (3,): @overload def filter(__function: None, __iterable: Iterable[Optional[_T]]) -> Iterator[_T]: ... @overload def filter(__function: Callable[[_T], Any], __iterable: Iterable[_T]) -> Iterator[_T]: ... else: @overload def filter(__function: Callable[[AnyStr], Any], __iterable: AnyStr) -> AnyStr: ... # type: ignore @overload def filter(__function: None, __iterable: Tuple[Optional[_T], ...]) -> Tuple[_T, ...]: ... # type: ignore @overload def filter(__function: Callable[[_T], Any], __iterable: Tuple[_T, ...]) -> Tuple[_T, ...]: ... # type: ignore @overload def filter(__function: None, __iterable: Iterable[Optional[_T]]) -> List[_T]: ... @overload def filter(__function: Callable[[_T], Any], __iterable: Iterable[_T]) -> List[_T]: ... def format(__o: object, __format_spec: str = ...) -> str: ... # TODO unicode def getattr(__o: Any, name: Text, __default: Any = ...) -> Any: ... def globals() -> Dict[str, Any]: ... def hasattr(__o: Any, __name: Text) -> bool: ... def hash(__o: object) -> int: ... if sys.version_info >= (3,): def help(*args: Any, **kwds: Any) -> None: ... def hex(__i: Union[int, _SupportsIndex]) -> str: ... def id(__o: object) -> int: ... if sys.version_info >= (3,): def input(__prompt: Any = ...) -> str: ... else: def input(__prompt: Any = ...) -> Any: ... def intern(__string: str) -> str: ... @overload def iter(__iterable: Iterable[_T]) -> Iterator[_T]: ... @overload def iter(__function: Callable[[], Optional[_T]], __sentinel: None) -> Iterator[_T]: ... @overload def iter(__function: Callable[[], _T], __sentinel: Any) -> Iterator[_T]: ... def isinstance(__o: object, __t: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ... def issubclass(__cls: type, __classinfo: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ... def len(__o: Sized) -> int: ... if sys.version_info >= (3,): def license() -> None: ... def locals() -> Dict[str, Any]: ... if sys.version_info >= (3,): @overload def map(__func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> Iterator[_S]: ... @overload def map(__func: Callable[..., _S], __iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[_S]: ... else: @overload def map(__func: None, __iter1: Iterable[_T1]) -> List[_T1]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> List[Tuple[_T1, _T2]]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def map(__func: None, __iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> List[Tuple[Any, ...]]: ... @overload def map(__func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> List[_S]: ... @overload def map(__func: Callable[..., _S], __iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> List[_S]: ... if sys.version_info >= (3,): @overload def max(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def max(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... @overload def max(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ..., default: _VT) -> Union[_T, _VT]: ... else: @overload def max(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def max(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... if sys.version_info >= (3,): @overload def min(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def min(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... @overload def min(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ..., default: _VT) -> Union[_T, _VT]: ... else: @overload def min(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def min(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... @overload def next(__i: Iterator[_T]) -> _T: ... @overload def next(__i: Iterator[_T], default: _VT) -> Union[_T, _VT]: ... def oct(__i: Union[int, _SupportsIndex]) -> str: ... if sys.version_info >= (3, 6): def open(file: Union[str, bytes, int, _PathLike[Any]], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]: ... elif sys.version_info >= (3,): def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]: ... else: def open(name: Union[unicode, int], mode: unicode = ..., buffering: int = ...) -> BinaryIO: ... def ord(__c: Union[Text, bytes]) -> int: ... if sys.version_info >= (3,): class _Writer(Protocol): def write(self, __s: str) -> Any: ... def print( *values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ..., flush: bool = ... ) -> None: ... else: class _Writer(Protocol): def write(self, __s: Any) -> Any: ... # This is only available after from __future__ import print_function. def print(*values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ...) -> None: ... @overload def pow(__x: int, __y: int) -> Any: ... # The return type can be int or float, depending on y @overload def pow(__x: int, __y: int, __z: int) -> Any: ... @overload def pow(__x: float, __y: float) -> float: ... @overload def pow(__x: float, __y: float, __z: float) -> float: ... def quit(code: object = ...) -> NoReturn: ... if sys.version_info < (3,): def range(__x: int, __y: int = ..., __step: int = ...) -> List[int]: ... def raw_input(__prompt: Any = ...) -> str: ... @overload def reduce(__function: Callable[[_T, _S], _T], __iterable: Iterable[_S], __initializer: _T) -> _T: ... @overload def reduce(__function: Callable[[_T, _T], _T], __iterable: Iterable[_T]) -> _T: ... def reload(__module: Any) -> Any: ... @overload def reversed(__object: Sequence[_T]) -> Iterator[_T]: ... @overload def reversed(__object: Reversible[_T]) -> Iterator[_T]: ... def repr(__o: object) -> str: ... if sys.version_info >= (3,): @overload def round(number: float) -> int: ... @overload def round(number: float, ndigits: None) -> int: ... @overload def round(number: float, ndigits: int) -> float: ... @overload def round(number: SupportsRound[_T]) -> int: ... @overload def round(number: SupportsRound[_T], ndigits: None) -> int: ... @overload def round(number: SupportsRound[_T], ndigits: int) -> _T: ... else: @overload def round(number: float) -> float: ... @overload def round(number: float, ndigits: int) -> float: ... @overload def round(number: SupportsFloat) -> float: ... @overload def round(number: SupportsFloat, ndigits: int) -> float: ... def setattr(__object: Any, __name: Text, __value: Any) -> None: ... if sys.version_info >= (3,): def sorted(__iterable: Iterable[_T], *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> List[_T]: ... else: def sorted(__iterable: Iterable[_T], *, cmp: Callable[[_T, _T], int] = ..., key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> List[_T]: ... @overload def sum(__iterable: Iterable[_T]) -> Union[_T, int]: ... @overload def sum(__iterable: Iterable[_T], __start: _S) -> Union[_T, _S]: ... if sys.version_info < (3,): def unichr(__i: int) -> unicode: ... def vars(__object: Any = ...) -> Dict[str, Any]: ... if sys.version_info >= (3,): @overload def zip(__iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def zip(__iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[Tuple[Any, ...]]: ... else: @overload def zip(__iter1: Iterable[_T1]) -> List[Tuple[_T1]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> List[Tuple[_T1, _T2]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def zip(__iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> List[Tuple[Any, ...]]: ... def __import__(name: Text, globals: Optional[Mapping[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ..., fromlist: Sequence[str] = ..., level: int = ...) -> Any: ... # Actually the type of Ellipsis is , but since it's # not exposed anywhere under that name, we make it private here. class ellipsis: ... Ellipsis: ellipsis if sys.version_info < (3,): # TODO: buffer support is incomplete; e.g. some_string.startswith(some_buffer) doesn't type check. _AnyBuffer = TypeVar('_AnyBuffer', str, unicode, bytearray, buffer) class buffer(Sized): def __init__(self, object: _AnyBuffer, offset: int = ..., size: int = ...) -> None: ... def __add__(self, other: _AnyBuffer) -> str: ... def __cmp__(self, other: _AnyBuffer) -> bool: ... def __getitem__(self, key: Union[int, slice]) -> str: ... def __getslice__(self, i: int, j: int) -> str: ... def __len__(self) -> int: ... def __mul__(self, x: int) -> str: ... class BaseException(object): args: Tuple[Any, ...] if sys.version_info < (3,): message: Any if sys.version_info >= (3,): __cause__: Optional[BaseException] __context__: Optional[BaseException] __suppress_context__: bool __traceback__: Optional[TracebackType] def __init__(self, *args: object) -> None: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... if sys.version_info < (3,): def __getitem__(self, i: int) -> Any: ... def __getslice__(self, start: int, stop: int) -> Tuple[Any, ...]: ... if sys.version_info >= (3,): def with_traceback(self, tb: Optional[TracebackType]) -> BaseException: ... class GeneratorExit(BaseException): ... class KeyboardInterrupt(BaseException): ... class SystemExit(BaseException): code: int class Exception(BaseException): ... class StopIteration(Exception): if sys.version_info >= (3,): value: Any if sys.version_info >= (3,): _StandardError = Exception class OSError(Exception): errno: int strerror: str # filename, filename2 are actually Union[str, bytes, None] filename: Any filename2: Any EnvironmentError = OSError IOError = OSError else: class StandardError(Exception): ... _StandardError = StandardError class EnvironmentError(StandardError): errno: int strerror: str # TODO can this be unicode? filename: str class OSError(EnvironmentError): ... class IOError(EnvironmentError): ... class ArithmeticError(_StandardError): ... class AssertionError(_StandardError): ... class AttributeError(_StandardError): ... class BufferError(_StandardError): ... class EOFError(_StandardError): ... class ImportError(_StandardError): if sys.version_info >= (3, 3): def __init__(self, *args, name: Optional[str] = ..., path: Optional[str] = ...) -> None: ... name: Optional[str] path: Optional[str] class LookupError(_StandardError): ... class MemoryError(_StandardError): ... class NameError(_StandardError): ... class ReferenceError(_StandardError): ... class RuntimeError(_StandardError): ... if sys.version_info >= (3, 5): class StopAsyncIteration(Exception): value: Any class SyntaxError(_StandardError): msg: str lineno: int offset: Optional[int] text: Optional[str] filename: str class SystemError(_StandardError): ... class TypeError(_StandardError): ... class ValueError(_StandardError): ... class FloatingPointError(ArithmeticError): ... class OverflowError(ArithmeticError): ... class ZeroDivisionError(ArithmeticError): ... if sys.version_info >= (3, 6): class ModuleNotFoundError(ImportError): ... class IndexError(LookupError): ... class KeyError(LookupError): ... class UnboundLocalError(NameError): ... class WindowsError(OSError): winerror: int if sys.version_info >= (3,): class BlockingIOError(OSError): characters_written: int class ChildProcessError(OSError): ... class ConnectionError(OSError): ... class BrokenPipeError(ConnectionError): ... class ConnectionAbortedError(ConnectionError): ... class ConnectionRefusedError(ConnectionError): ... class ConnectionResetError(ConnectionError): ... class FileExistsError(OSError): ... class FileNotFoundError(OSError): ... class InterruptedError(OSError): ... class IsADirectoryError(OSError): ... class NotADirectoryError(OSError): ... class PermissionError(OSError): ... class ProcessLookupError(OSError): ... class TimeoutError(OSError): ... class NotImplementedError(RuntimeError): ... if sys.version_info >= (3, 5): class RecursionError(RuntimeError): ... class IndentationError(SyntaxError): ... class TabError(IndentationError): ... class UnicodeError(ValueError): ... class UnicodeDecodeError(UnicodeError): encoding: str object: bytes start: int end: int reason: str def __init__(self, __encoding: str, __object: bytes, __start: int, __end: int, __reason: str) -> None: ... class UnicodeEncodeError(UnicodeError): encoding: str object: Text start: int end: int reason: str def __init__(self, __encoding: str, __object: Text, __start: int, __end: int, __reason: str) -> None: ... class UnicodeTranslateError(UnicodeError): ... class Warning(Exception): ... class UserWarning(Warning): ... class DeprecationWarning(Warning): ... class SyntaxWarning(Warning): ... class RuntimeWarning(Warning): ... class FutureWarning(Warning): ... class PendingDeprecationWarning(Warning): ... class ImportWarning(Warning): ... class UnicodeWarning(Warning): ... class BytesWarning(Warning): ... if sys.version_info >= (3, 2): class ResourceWarning(Warning): ... if sys.version_info < (3,): class file(BinaryIO): @overload def __init__(self, file: str, mode: str = ..., buffering: int = ...) -> None: ... @overload def __init__(self, file: unicode, mode: str = ..., buffering: int = ...) -> None: ... @overload def __init__(self, file: int, mode: str = ..., buffering: int = ...) -> None: ... def __iter__(self) -> Iterator[str]: ... def next(self) -> str: ... def read(self, n: int = ...) -> str: ... def __enter__(self) -> BinaryIO: ... def __exit__(self, t: Optional[type] = ..., exc: Optional[BaseException] = ..., tb: Optional[Any] = ...) -> Optional[bool]: ... def flush(self) -> None: ... def fileno(self) -> int: ... def isatty(self) -> bool: ... def close(self) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def seekable(self) -> bool: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... def readline(self, limit: int = ...) -> str: ... def readlines(self, hint: int = ...) -> List[str]: ... def write(self, data: str) -> int: ... def writelines(self, data: Iterable[str]) -> None: ... def truncate(self, pos: Optional[int] = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pyexpat/0000775000175000017500000000000013577125145023361 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pyexpat/__init__.pyi0000664000175000017500000000636313577124116025650 0ustar davedave00000000000000from typing import List, Tuple, Optional, Callable, Any, Protocol, Union, Dict, Text import pyexpat.errors as errors import pyexpat.model as model EXPAT_VERSION: str # undocumented version_info: Tuple[int, int, int] # undocumented native_encoding: str # undocumented features: List[Tuple[str, int]] # undocumented class ExpatError(Exception): code: int lineno: int offset: int error = ExpatError class _Reader(Protocol): def read(self, length: int) -> bytes: ... XML_PARAM_ENTITY_PARSING_NEVER: int XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: int XML_PARAM_ENTITY_PARSING_ALWAYS: int _Model = Tuple[int, int, Optional[str], tuple] class XMLParserType(object): def Parse(self, data: Union[Text, bytes], isfinal: bool = ...) -> int: ... def ParseFile(self, file: _Reader) -> int: ... def SetBase(self, base: Text) -> None: ... def GetBase(self) -> Optional[str]: ... def GetInputContext(self) -> Optional[bytes]: ... def ExternalEntityParserCreate(self, context: Optional[Text], encoding: Text = ...) -> XMLParserType: ... def SetParamEntityParsing(self, flag: int) -> int: ... def UseForeignDTD(self, flag: bool = ...) -> None: ... buffer_size: int buffer_text: bool buffer_used: int namespace_prefixes: bool # undocumented ordered_attributes: bool specified_attributes: bool ErrorByteIndex: int ErrorCode: int ErrorColumnNumber: int ErrorLineNumber: int CurrentByteIndex: int CurrentColumnNumber: int CurrentLineNumber: int XmlDeclHandler: Optional[Callable[[str, Optional[str], int], Any]] StartDoctypeDeclHandler: Optional[Callable[[str, Optional[str], Optional[str], bool], Any]] EndDoctypeDeclHandler: Optional[Callable[[], Any]] ElementDeclHandler: Optional[Callable[[str, _Model], Any]] AttlistDeclHandler: Optional[Callable[[str, str, str, Optional[str], bool], Any]] StartElementHandler: Optional[Union[ Callable[[str, Dict[str, str]], Any], Callable[[str, List[str]], Any], Callable[[str, Union[Dict[str, str]], List[str]], Any]]] EndElementHandler: Optional[Callable[[str], Any]] ProcessingInstructionHandler: Optional[Callable[[str, str], Any]] CharacterDataHandler: Optional[Callable[[str], Any]] UnparsedEntityDeclHandler: Optional[Callable[[str, Optional[str], str, Optional[str], str], Any]] EntityDeclHandler: Optional[Callable[[str, bool, Optional[str], Optional[str], str, Optional[str], Optional[str]], Any]] NotationDeclHandler: Optional[Callable[[str, Optional[str], str, Optional[str]], Any]] StartNamespaceDeclHandler: Optional[Callable[[str, str], Any]] EndNamespaceDeclHandler: Optional[Callable[[str], Any]] CommentHandler: Optional[Callable[[str], Any]] StartCdataSectionHandler: Optional[Callable[[], Any]] EndCdataSectionHandler: Optional[Callable[[], Any]] DefaultHandler: Optional[Callable[[str], Any]] DefaultHandlerExpand: Optional[Callable[[str], Any]] NotStandaloneHandler: Optional[Callable[[], int]] ExternalEntityRefHandler: Optional[Callable[[str, Optional[str], Optional[str], Optional[str]], int]] def ErrorString(errno: int) -> str: ... def ParserCreate(encoding: Optional[Text] = ..., namespace_separator: Optional[Text] = ...) -> XMLParserType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pyexpat/model.pyi0000664000175000017500000000031513577124116025200 0ustar davedave00000000000000XML_CTYPE_ANY: int XML_CTYPE_CHOICE: int XML_CTYPE_EMPTY: int XML_CTYPE_MIXED: int XML_CTYPE_NAME: int XML_CTYPE_SEQ: int XML_CQUANT_NONE: int XML_CQUANT_OPT: int XML_CQUANT_PLUS: int XML_CQUANT_REP: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pyexpat/errors.pyi0000664000175000017500000000237313577124116025422 0ustar davedave00000000000000import sys from typing import Dict if sys.version_info >= (3, 2): codes: Dict[str, int] messages: Dict[int, str] XML_ERROR_ABORTED: str XML_ERROR_ASYNC_ENTITY: str XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF: str XML_ERROR_BAD_CHAR_REF: str XML_ERROR_BINARY_ENTITY_REF: str XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING: str XML_ERROR_DUPLICATE_ATTRIBUTE: str XML_ERROR_ENTITY_DECLARED_IN_PE: str XML_ERROR_EXTERNAL_ENTITY_HANDLING: str XML_ERROR_FEATURE_REQUIRES_XML_DTD: str XML_ERROR_FINISHED: str XML_ERROR_INCOMPLETE_PE: str XML_ERROR_INCORRECT_ENCODING: str XML_ERROR_INVALID_TOKEN: str XML_ERROR_JUNK_AFTER_DOC_ELEMENT: str XML_ERROR_MISPLACED_XML_PI: str XML_ERROR_NOT_STANDALONE: str XML_ERROR_NOT_SUSPENDED: str XML_ERROR_NO_ELEMENTS: str XML_ERROR_NO_MEMORY: str XML_ERROR_PARAM_ENTITY_REF: str XML_ERROR_PARTIAL_CHAR: str XML_ERROR_PUBLICID: str XML_ERROR_RECURSIVE_ENTITY_REF: str XML_ERROR_SUSPENDED: str XML_ERROR_SUSPEND_PE: str XML_ERROR_SYNTAX: str XML_ERROR_TAG_MISMATCH: str XML_ERROR_TEXT_DECL: str XML_ERROR_UNBOUND_PREFIX: str XML_ERROR_UNCLOSED_CDATA_SECTION: str XML_ERROR_UNCLOSED_TOKEN: str XML_ERROR_UNDECLARING_PREFIX: str XML_ERROR_UNDEFINED_ENTITY: str XML_ERROR_UNEXPECTED_STATE: str XML_ERROR_UNKNOWN_ENCODING: str XML_ERROR_XML_DECL: str jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/mailcap.pyi0000664000175000017500000000050513577124116024015 0ustar davedave00000000000000 from typing import Sequence, Dict, List, Union, Tuple, Optional, Mapping _Cap = Dict[str, Union[str, int]] def findmatch(caps: Mapping[str, List[_Cap]], MIMEtype: str, key: str = ..., filename: str = ..., plist: Sequence[str] = ...) -> Tuple[Optional[str], Optional[_Cap]]: ... def getcaps() -> Dict[str, List[_Cap]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/traceback.pyi0000664000175000017500000001333413577124116024332 0ustar davedave00000000000000# Stubs for traceback from typing import Any, Dict, Generator, IO, Iterator, List, Mapping, Optional, Protocol, Tuple, Type, Iterable from types import FrameType, TracebackType import sys _PT = Tuple[str, int, str, Optional[str]] def print_tb(tb: Optional[TracebackType], limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... if sys.version_info >= (3,): def print_exception(etype: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[TracebackType], limit: Optional[int] = ..., file: Optional[IO[str]] = ..., chain: bool = ...) -> None: ... def print_exc(limit: Optional[int] = ..., file: Optional[IO[str]] = ..., chain: bool = ...) -> None: ... def print_last(limit: Optional[int] = ..., file: Optional[IO[str]] = ..., chain: bool = ...) -> None: ... else: def print_exception(etype: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[TracebackType], limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... def print_exc(limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... def print_last(limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... def print_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ..., file: Optional[IO[str]] = ...) -> None: ... if sys.version_info >= (3, 5): def extract_tb(tb: Optional[TracebackType], limit: Optional[int] = ...) -> StackSummary: ... def extract_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ...) -> StackSummary: ... def format_list(extracted_list: List[FrameSummary]) -> List[str]: ... class _Writer(Protocol): def write(self, s: str) -> Any: ... # undocumented def print_list(extracted_list: List[FrameSummary], file: Optional[_Writer] = ...) -> None: ... else: def extract_tb(tb: Optional[TracebackType], limit: Optional[int] = ...) -> List[_PT]: ... def extract_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ...) -> List[_PT]: ... def format_list(extracted_list: List[_PT]) -> List[str]: ... def format_exception_only(etype: Optional[Type[BaseException]], value: Optional[BaseException]) -> List[str]: ... if sys.version_info >= (3,): def format_exception(etype: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[TracebackType], limit: Optional[int] = ..., chain: bool = ...) -> List[str]: ... def format_exc(limit: Optional[int] = ..., chain: bool = ...) -> str: ... else: def format_exception(etype: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[TracebackType], limit: Optional[int] = ...) -> List[str]: ... def format_exc(limit: Optional[int] = ...) -> str: ... def format_tb(tb: Optional[TracebackType], limit: Optional[int] = ...) -> List[str]: ... def format_stack(f: Optional[FrameType] = ..., limit: Optional[int] = ...) -> List[str]: ... if sys.version_info >= (3, 4): def clear_frames(tb: TracebackType) -> None: ... if sys.version_info >= (3, 5): def walk_stack(f: Optional[FrameType]) -> Iterator[Tuple[FrameType, int]]: ... def walk_tb(tb: Optional[TracebackType]) -> Iterator[Tuple[FrameType, int]]: ... if sys.version_info < (3,): def tb_lineno(tb: TracebackType) -> int: ... if sys.version_info >= (3, 5): class TracebackException: __cause__: TracebackException __context__: TracebackException __suppress_context__: bool stack: StackSummary exc_type: Type[BaseException] filename: str lineno: int text: str offset: int msg: str def __init__(self, exc_type: Type[BaseException], exc_value: BaseException, exc_traceback: TracebackType, *, limit: Optional[int] = ..., lookup_lines: bool = ..., capture_locals: bool = ...) -> None: ... @classmethod def from_exception(cls, exc: BaseException, *, limit: Optional[int] = ..., lookup_lines: bool = ..., capture_locals: bool = ...) -> TracebackException: ... def format(self, *, chain: bool = ...) -> Generator[str, None, None]: ... def format_exception_only(self) -> Generator[str, None, None]: ... class FrameSummary(Iterable[Any]): filename: str lineno: int name: str line: str locals: Optional[Dict[str, str]] def __init__(self, filename: str, lineno: int, name: str, lookup_line: bool = ..., locals: Optional[Mapping[str, str]] = ..., line: Optional[str] = ...) -> None: ... # TODO: more precise typing for __getitem__ and __iter__, # for a namedtuple-like view on (filename, lineno, name, str). def __getitem__(self, i: int) -> Any: ... def __iter__(self) -> Iterator[Any]: ... class StackSummary(List[FrameSummary]): @classmethod def extract(cls, frame_gen: Generator[Tuple[FrameType, int], None, None], *, limit: Optional[int] = ..., lookup_lines: bool = ..., capture_locals: bool = ...) -> StackSummary: ... @classmethod def from_list(cls, a_list: List[_PT]) -> StackSummary: ... def format(self) -> List[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/rlcompleter.pyi0000664000175000017500000000051613577124116024741 0ustar davedave00000000000000# Stubs for rlcompleter from typing import Any, Dict, Optional, Union import sys if sys.version_info >= (3,): _Text = str else: _Text = Union[str, unicode] class Completer: def __init__(self, namespace: Optional[Dict[str, Any]] = ...) -> None: ... def complete(self, text: _Text, state: int) -> Optional[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/stringprep.pyi0000664000175000017500000000153213577124116024605 0ustar davedave00000000000000# Stubs for stringprep (Python 2 and 3) from typing import Text def in_table_a1(code: Text) -> bool: ... def in_table_b1(code: Text) -> bool: ... def map_table_b3(code: Text) -> Text: ... def map_table_b2(a: Text) -> Text: ... def in_table_c11(code: Text) -> bool: ... def in_table_c12(code: Text) -> bool: ... def in_table_c11_c12(code: Text) -> bool: ... def in_table_c21(code: Text) -> bool: ... def in_table_c22(code: Text) -> bool: ... def in_table_c21_c22(code: Text) -> bool: ... def in_table_c3(code: Text) -> bool: ... def in_table_c4(code: Text) -> bool: ... def in_table_c5(code: Text) -> bool: ... def in_table_c6(code: Text) -> bool: ... def in_table_c7(code: Text) -> bool: ... def in_table_c8(code: Text) -> bool: ... def in_table_c9(code: Text) -> bool: ... def in_table_d1(code: Text) -> bool: ... def in_table_d2(code: Text) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_weakrefset.pyi0000664000175000017500000000427713577124116024720 0ustar davedave00000000000000from typing import Iterator, Any, Iterable, MutableSet, Optional, TypeVar, Generic, Union _S = TypeVar('_S') _T = TypeVar('_T') _SelfT = TypeVar('_SelfT', bound=WeakSet[Any]) class WeakSet(MutableSet[_T], Generic[_T]): def __init__(self, data: Optional[Iterable[_T]] = ...) -> None: ... def add(self, item: _T) -> None: ... def clear(self) -> None: ... def discard(self, item: _T) -> None: ... def copy(self: _SelfT) -> _SelfT: ... def pop(self) -> _T: ... def remove(self, item: _T) -> None: ... def update(self, other: Iterable[_T]) -> None: ... def __contains__(self, item: object) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __ior__(self, other: Iterable[_S]) -> WeakSet[Union[_S, _T]]: ... def difference(self: _SelfT, other: Iterable[_T]) -> _SelfT: ... def __sub__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ... def difference_update(self: _SelfT, other: Iterable[_T]) -> None: ... def __isub__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ... def intersection(self: _SelfT, other: Iterable[_T]) -> _SelfT: ... def __and__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ... def intersection_update(self, other: Iterable[_T]) -> None: ... def __iand__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ... def issubset(self, other: Iterable[_T]) -> bool: ... def __le__(self, other: Iterable[_T]) -> bool: ... def __lt__(self, other: Iterable[_T]) -> bool: ... def issuperset(self, other: Iterable[_T]) -> bool: ... def __ge__(self, other: Iterable[_T]) -> bool: ... def __gt__(self, other: Iterable[_T]) -> bool: ... def __eq__(self, other: object) -> bool: ... def symmetric_difference(self, other: Iterable[_S]) -> WeakSet[Union[_S, _T]]: ... def __xor__(self, other: Iterable[_S]) -> WeakSet[Union[_S, _T]]: ... def symmetric_difference_update(self, other: Iterable[_S]) -> None: ... def __ixor__(self, other: Iterable[_S]) -> WeakSet[Union[_S, _T]]: ... def union(self, other: Iterable[_S]) -> WeakSet[Union[_S, _T]]: ... def __or__(self, other: Iterable[_S]) -> WeakSet[Union[_S, _T]]: ... def isdisjoint(self, other: Iterable[_T]) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/uu.pyi0000664000175000017500000000106213577124116023037 0ustar davedave00000000000000# Stubs for uu (Python 2 and 3) import sys from typing import BinaryIO, Union, Optional, Text _File = Union[Text, BinaryIO] class Error(Exception): ... if sys.version_info >= (3, 7): def encode(in_file: _File, out_file: _File, name: Optional[str] = ..., mode: Optional[int] = ..., backtick: bool = ...) -> None: ... else: def encode(in_file: _File, out_file: _File, name: Optional[str] = ..., mode: Optional[int] = ...) -> None: ... def decode(in_file: _File, out_file: Optional[_File] = ..., mode: Optional[int] = ..., quiet: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/logging/0000775000175000017500000000000013577125145023315 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/logging/__init__.pyi0000664000175000017500000004401313577124116025576 0ustar davedave00000000000000# Stubs for logging (Python 3.7) from typing import ( Any, Callable, Dict, Iterable, List, Mapping, MutableMapping, Optional, IO, Tuple, Text, Union, overload, ) from string import Template from time import struct_time from types import TracebackType, FrameType import sys import threading _SysExcInfoType = Union[Tuple[type, BaseException, Optional[TracebackType]], Tuple[None, None, None]] if sys.version_info >= (3, 5): _ExcInfoType = Union[None, bool, _SysExcInfoType, BaseException] else: _ExcInfoType = Union[None, bool, _SysExcInfoType] _ArgsType = Union[Tuple[Any, ...], Mapping[str, Any]] _FilterType = Union[Filter, Callable[[LogRecord], int]] _Level = Union[int, Text] if sys.version_info >= (3, 6): from os import PathLike _Path = Union[str, PathLike[str]] else: _Path = str raiseExceptions: bool logThreads: bool logMultiprocessing: bool logProcesses: bool def currentframe() -> FrameType: ... if sys.version_info >= (3,): _levelToName: Dict[int, str] _nameToLevel: Dict[str, int] else: _levelNames: Dict[Union[int, str], Union[str, int]] # Union[int:str, str:int] class Filterer(object): filters: List[Filter] def __init__(self) -> None: ... def addFilter(self, filter: Filter) -> None: ... def removeFilter(self, filter: Filter) -> None: ... def filter(self, record: LogRecord) -> bool: ... class Logger(Filterer): name: str level: int parent: Union[Logger, PlaceHolder] propagate: bool handlers: List[Handler] disabled: int def __init__(self, name: str, level: _Level = ...) -> None: ... def setLevel(self, level: _Level) -> None: ... def isEnabledFor(self, level: int) -> bool: ... def getEffectiveLevel(self) -> int: ... def getChild(self, suffix: str) -> Logger: ... if sys.version_info >= (3,): def debug(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def info(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warning(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warn(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def error(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def critical(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... fatal = critical def log(self, level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def exception(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... else: def debug(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def info(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warning(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... warn = warning def error(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def critical(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... fatal = critical def log(self, level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def exception(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def addFilter(self, filt: _FilterType) -> None: ... def removeFilter(self, filt: _FilterType) -> None: ... def filter(self, record: LogRecord) -> bool: ... def addHandler(self, hdlr: Handler) -> None: ... def removeHandler(self, hdlr: Handler) -> None: ... if sys.version_info >= (3,): def findCaller(self, stack_info: bool = ...) -> Tuple[str, int, str, Optional[str]]: ... else: def findCaller(self) -> Tuple[str, int, str]: ... def handle(self, record: LogRecord) -> None: ... if sys.version_info >= (3,): def makeRecord(self, name: str, level: int, fn: str, lno: int, msg: Any, args: _ArgsType, exc_info: Optional[_SysExcInfoType], func: Optional[str] = ..., extra: Optional[Mapping[str, Any]] = ..., sinfo: Optional[str] = ...) -> LogRecord: ... else: def makeRecord(self, name: str, level: int, fn: str, lno: int, msg: Any, args: _ArgsType, exc_info: Optional[_SysExcInfoType], func: Optional[str] = ..., extra: Optional[Mapping[str, Any]] = ...) -> LogRecord: ... if sys.version_info >= (3,): def hasHandlers(self) -> bool: ... CRITICAL: int FATAL: int ERROR: int WARNING: int WARN: int INFO: int DEBUG: int NOTSET: int class Handler(Filterer): level: int # undocumented formatter: Optional[Formatter] # undocumented lock: Optional[threading.Lock] # undocumented name: Optional[str] # undocumented def __init__(self, level: _Level = ...) -> None: ... def createLock(self) -> None: ... def acquire(self) -> None: ... def release(self) -> None: ... def setLevel(self, level: _Level) -> None: ... def setFormatter(self, fmt: Formatter) -> None: ... def addFilter(self, filt: _FilterType) -> None: ... def removeFilter(self, filt: _FilterType) -> None: ... def filter(self, record: LogRecord) -> bool: ... def flush(self) -> None: ... def close(self) -> None: ... def handle(self, record: LogRecord) -> None: ... def handleError(self, record: LogRecord) -> None: ... def format(self, record: LogRecord) -> str: ... def emit(self, record: LogRecord) -> None: ... class Formatter: converter: Callable[[Optional[float]], struct_time] _fmt: Optional[str] datefmt: Optional[str] if sys.version_info >= (3,): _style: PercentStyle default_time_format: str default_msec_format: str if sys.version_info >= (3,): def __init__(self, fmt: Optional[str] = ..., datefmt: Optional[str] = ..., style: str = ...) -> None: ... else: def __init__(self, fmt: Optional[str] = ..., datefmt: Optional[str] = ...) -> None: ... def format(self, record: LogRecord) -> str: ... def formatTime(self, record: LogRecord, datefmt: Optional[str] = ...) -> str: ... def formatException(self, exc_info: _SysExcInfoType) -> str: ... if sys.version_info >= (3,): def formatMessage(self, record: LogRecord) -> str: ... # undocumented def formatStack(self, stack_info: str) -> str: ... class Filter: def __init__(self, name: str = ...) -> None: ... def filter(self, record: LogRecord) -> int: ... class LogRecord: args: _ArgsType asctime: str created: int exc_info: Optional[_SysExcInfoType] exc_text: Optional[str] filename: str funcName: str levelname: str levelno: int lineno: int module: str msecs: int message: str msg: str name: str pathname: str process: int processName: str relativeCreated: int if sys.version_info >= (3,): stack_info: Optional[str] thread: int threadName: str if sys.version_info >= (3,): def __init__(self, name: str, level: int, pathname: str, lineno: int, msg: Any, args: _ArgsType, exc_info: Optional[_SysExcInfoType], func: Optional[str] = ..., sinfo: Optional[str] = ...) -> None: ... else: def __init__(self, name: str, level: int, pathname: str, lineno: int, msg: Any, args: _ArgsType, exc_info: Optional[_SysExcInfoType], func: Optional[str] = ...) -> None: ... def getMessage(self) -> str: ... class LoggerAdapter: logger: Logger extra: Mapping[str, Any] def __init__(self, logger: Logger, extra: Mapping[str, Any]) -> None: ... def process(self, msg: Any, kwargs: MutableMapping[str, Any]) -> Tuple[Any, MutableMapping[str, Any]]: ... if sys.version_info >= (3,): def debug(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def info(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warning(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warn(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def error(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def exception(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def critical(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def log(self, level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... else: def debug(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def info(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warning(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def error(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def exception(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def critical(self, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def log(self, level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def isEnabledFor(self, lvl: int) -> bool: ... if sys.version_info >= (3,): def getEffectiveLevel(self) -> int: ... def setLevel(self, lvl: Union[int, str]) -> None: ... def hasHandlers(self) -> bool: ... if sys.version_info >= (3,): def getLogger(name: Optional[str] = ...) -> Logger: ... else: @overload def getLogger() -> Logger: ... @overload def getLogger(name: Union[Text, str]) -> Logger: ... def getLoggerClass() -> type: ... if sys.version_info >= (3,): def getLogRecordFactory() -> Callable[..., LogRecord]: ... if sys.version_info >= (3,): def debug(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def info(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warning(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warn(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def error(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def critical(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def exception(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def log(level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., stack_info: bool = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... else: def debug(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def info(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def warning(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... warn = warning def error(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def critical(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def exception(msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... def log(level: int, msg: Any, *args: Any, exc_info: _ExcInfoType = ..., extra: Optional[Dict[str, Any]] = ..., **kwargs: Any) -> None: ... fatal = critical def disable(lvl: int) -> None: ... def addLevelName(lvl: int, levelName: str) -> None: ... def getLevelName(lvl: Union[int, str]) -> Any: ... def makeLogRecord(attrdict: Mapping[str, Any]) -> LogRecord: ... if sys.version_info >= (3,): def basicConfig(*, filename: Optional[_Path] = ..., filemode: str = ..., format: str = ..., datefmt: Optional[str] = ..., style: str = ..., level: Optional[_Level] = ..., stream: Optional[IO[str]] = ..., handlers: Optional[Iterable[Handler]] = ...) -> None: ... else: @overload def basicConfig() -> None: ... @overload def basicConfig(*, filename: Optional[str] = ..., filemode: str = ..., format: str = ..., datefmt: Optional[str] = ..., level: Optional[_Level] = ..., stream: IO[str] = ...) -> None: ... def shutdown() -> None: ... def setLoggerClass(klass: type) -> None: ... def captureWarnings(capture: bool) -> None: ... if sys.version_info >= (3,): def setLogRecordFactory(factory: Callable[..., LogRecord]) -> None: ... if sys.version_info >= (3,): lastResort: Optional[StreamHandler] class StreamHandler(Handler): stream: IO[str] # undocumented if sys.version_info >= (3, 2): terminator: str def __init__(self, stream: Optional[IO[str]] = ...) -> None: ... if sys.version_info >= (3, 7): def setStream(self, stream: IO[str]) -> Optional[IO[str]]: ... class FileHandler(StreamHandler): baseFilename: str # undocumented mode: str # undocumented encoding: Optional[str] # undocumented delay: bool # undocumented def __init__(self, filename: _Path, mode: str = ..., encoding: Optional[str] = ..., delay: bool = ...) -> None: ... class NullHandler(Handler): ... class PlaceHolder: def __init__(self, alogger: Logger) -> None: ... def append(self, alogger: Logger) -> None: ... # Below aren't in module docs but still visible class RootLogger(Logger): ... root: RootLogger if sys.version_info >= (3,): class PercentStyle(object): default_format: str asctime_format: str asctime_search: str _fmt: str def __init__(self, fmt: str) -> None: ... def usesTime(self) -> bool: ... def format(self, record: Any) -> str: ... class StrFormatStyle(PercentStyle): ... class StringTemplateStyle(PercentStyle): _tpl: Template _STYLES: Dict[str, Tuple[PercentStyle, str]] BASIC_FORMAT: str jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/logging/handlers.pyi0000664000175000017500000001753713577124116025652 0ustar davedave00000000000000# Stubs for logging.handlers (Python 2.4) import datetime from logging import Handler, FileHandler, LogRecord from socket import SocketType import ssl import sys from typing import Any, Callable, Dict, List, Optional, Tuple, Union, overload if sys.version_info >= (3, 7): from queue import SimpleQueue, Queue elif sys.version_info >= (3,): from queue import Queue else: from Queue import Queue # TODO update socket stubs to add SocketKind _SocketKind = int if sys.version_info >= (3, 6): from os import PathLike _Path = Union[str, PathLike[str]] else: _Path = str DEFAULT_TCP_LOGGING_PORT: int DEFAULT_UDP_LOGGING_PORT: int DEFAULT_HTTP_LOGGING_PORT: int DEFAULT_SOAP_LOGGING_PORT: int SYSLOG_UDP_PORT: int SYSLOG_TCP_PORT: int class WatchedFileHandler(FileHandler): def __init__(self, filename: _Path, mode: str = ..., encoding: Optional[str] = ..., delay: bool = ...) -> None: ... if sys.version_info >= (3,): class BaseRotatingHandler(FileHandler): terminator: str namer: Optional[Callable[[str], str]] rotator: Optional[Callable[[str, str], None]] def __init__(self, filename: _Path, mode: str, encoding: Optional[str] = ..., delay: bool = ...) -> None: ... def rotation_filename(self, default_name: str) -> None: ... def rotate(self, source: str, dest: str) -> None: ... if sys.version_info >= (3,): class RotatingFileHandler(BaseRotatingHandler): def __init__(self, filename: _Path, mode: str = ..., maxBytes: int = ..., backupCount: int = ..., encoding: Optional[str] = ..., delay: bool = ...) -> None: ... def doRollover(self) -> None: ... else: class RotatingFileHandler(Handler): def __init__(self, filename: str, mode: str = ..., maxBytes: int = ..., backupCount: int = ..., encoding: Optional[str] = ..., delay: bool = ...) -> None: ... def doRollover(self) -> None: ... if sys.version_info >= (3,): class TimedRotatingFileHandler(BaseRotatingHandler): if sys.version_info >= (3, 4): def __init__(self, filename: _Path, when: str = ..., interval: int = ..., backupCount: int = ..., encoding: Optional[str] = ..., delay: bool = ..., utc: bool = ..., atTime: Optional[datetime.datetime] = ...) -> None: ... else: def __init__(self, filename: str, when: str = ..., interval: int = ..., backupCount: int = ..., encoding: Optional[str] = ..., delay: bool = ..., utc: bool = ...) -> None: ... def doRollover(self) -> None: ... else: class TimedRotatingFileHandler(Handler): def __init__(self, filename: str, when: str = ..., interval: int = ..., backupCount: int = ..., encoding: Optional[str] = ..., delay: bool = ..., utc: bool = ...) -> None: ... def doRollover(self) -> None: ... class SocketHandler(Handler): retryStart: float retryFactor: float retryMax: float if sys.version_info >= (3, 4): def __init__(self, host: str, port: Optional[int]) -> None: ... else: def __init__(self, host: str, port: int) -> None: ... def makeSocket(self) -> SocketType: ... def makePickle(self, record: LogRecord) -> bytes: ... def send(self, packet: bytes) -> None: ... def createSocket(self) -> None: ... class DatagramHandler(SocketHandler): ... class SysLogHandler(Handler): LOG_ALERT: int LOG_CRIT: int LOG_DEBUG: int LOG_EMERG: int LOG_ERR: int LOG_INFO: int LOG_NOTICE: int LOG_WARNING: int LOG_AUTH: int LOG_AUTHPRIV: int LOG_CRON: int LOG_DAEMON: int LOG_FTP: int LOG_KERN: int LOG_LPR: int LOG_MAIL: int LOG_NEWS: int LOG_SYSLOG: int LOG_USER: int LOG_UUCP: int LOG_LOCAL0: int LOG_LOCAL1: int LOG_LOCAL2: int LOG_LOCAL3: int LOG_LOCAL4: int LOG_LOCAL5: int LOG_LOCAL6: int LOG_LOCAL7: int def __init__(self, address: Union[Tuple[str, int], str] = ..., facility: int = ..., socktype: _SocketKind = ...) -> None: ... def encodePriority(self, facility: Union[int, str], priority: Union[int, str]) -> int: ... def mapPriority(self, levelName: str) -> str: ... class NTEventLogHandler(Handler): def __init__(self, appname: str, dllname: str = ..., logtype: str = ...) -> None: ... def getEventCategory(self, record: LogRecord) -> int: ... # TODO correct return value? def getEventType(self, record: LogRecord) -> int: ... def getMessageID(self, record: LogRecord) -> int: ... class SMTPHandler(Handler): # TODO `secure` can also be an empty tuple if sys.version_info >= (3,): def __init__(self, mailhost: Union[str, Tuple[str, int]], fromaddr: str, toaddrs: List[str], subject: str, credentials: Optional[Tuple[str, str]] = ..., secure: Union[Tuple[str], Tuple[str, str], None] = ..., timeout: float = ...) -> None: ... else: def __init__(self, mailhost: Union[str, Tuple[str, int]], fromaddr: str, toaddrs: List[str], subject: str, credentials: Optional[Tuple[str, str]] = ..., secure: Union[Tuple[str], Tuple[str, str], None] = ...) -> None: ... def getSubject(self, record: LogRecord) -> str: ... class BufferingHandler(Handler): buffer: List[LogRecord] def __init__(self, capacity: int) -> None: ... def shouldFlush(self, record: LogRecord) -> bool: ... class MemoryHandler(BufferingHandler): def __init__(self, capacity: int, flushLevel: int = ..., target: Optional[Handler] = ...) -> None: ... def setTarget(self, target: Handler) -> None: ... class HTTPHandler(Handler): if sys.version_info >= (3, 5): def __init__(self, host: str, url: str, method: str = ..., secure: bool = ..., credentials: Optional[Tuple[str, str]] = ..., context: Optional[ssl.SSLContext] = ...) -> None: ... elif sys.version_info >= (3,): def __init__(self, host: str, url: str, method: str = ..., secure: bool = ..., credentials: Optional[Tuple[str, str]] = ...) -> None: ... else: def __init__(self, host: str, url: str, method: str = ...) -> None: ... def mapLogRecord(self, record: LogRecord) -> Dict[str, Any]: ... if sys.version_info >= (3,): class QueueHandler(Handler): if sys.version_info >= (3, 7): def __init__(self, queue: Union[SimpleQueue[Any], Queue[Any]]) -> None: ... else: def __init__(self, queue: Queue[Any]) -> None: ... def prepare(self, record: LogRecord) -> Any: ... def enqueue(self, record: LogRecord) -> None: ... class QueueListener: if sys.version_info >= (3, 7): def __init__(self, queue: Union[SimpleQueue[Any], Queue[Any]], *handlers: Handler, respect_handler_level: bool = ...) -> None: ... elif sys.version_info >= (3, 5): def __init__(self, queue: Queue[Any], *handlers: Handler, respect_handler_level: bool = ...) -> None: ... else: def __init__(self, queue: Queue, *handlers: Handler) -> None: ... def dequeue(self, block: bool) -> LogRecord: ... def prepare(self, record: LogRecord) -> Any: ... def start(self) -> None: ... def stop(self) -> None: ... def enqueue_sentinel(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/logging/config.pyi0000664000175000017500000000221313577124116025300 0ustar davedave00000000000000# Stubs for logging.config (Python 3.4) from typing import Any, Callable, Dict, Optional, IO, Union from threading import Thread import sys if sys.version_info >= (3,): from configparser import RawConfigParser else: from ConfigParser import RawConfigParser if sys.version_info >= (3, 6): from os import PathLike if sys.version_info >= (3, 7): _Path = Union[str, bytes, PathLike[str]] elif sys.version_info >= (3, 6): _Path = Union[str, PathLike[str]] else: _Path = str def dictConfig(config: Dict[str, Any]) -> None: ... if sys.version_info >= (3, 4): def fileConfig(fname: Union[_Path, IO[str], RawConfigParser], defaults: Optional[Dict[str, str]] = ..., disable_existing_loggers: bool = ...) -> None: ... def listen(port: int = ..., verify: Optional[Callable[[bytes], Optional[bytes]]] = ...) -> Thread: ... else: def fileConfig(fname: Union[str, IO[str]], defaults: Optional[Dict[str, str]] = ..., disable_existing_loggers: bool = ...) -> None: ... def listen(port: int = ...) -> Thread: ... def stopListening() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xdrlib.pyi0000664000175000017500000000446113577124116023700 0ustar davedave00000000000000# Structs for xdrlib (Python 2 and 3) from typing import Callable, List, Sequence, TypeVar _T = TypeVar('_T') class Error(Exception): msg: str def __init__(self, msg: str) -> None: ... class ConversionError(Error): ... class Packer: def __init__(self) -> None: ... def reset(self) -> None: ... def get_buffer(self) -> bytes: ... def get_buf(self) -> bytes: ... def pack_uint(self, x: int) -> None: ... def pack_int(self, x: int) -> None: ... def pack_enum(self, x: int) -> None: ... def pack_bool(self, x: bool) -> None: ... def pack_uhyper(self, x: int) -> None: ... def pack_hyper(self, x: int) -> None: ... def pack_float(self, x: float) -> None: ... def pack_double(self, x: float) -> None: ... def pack_fstring(self, n: int, s: bytes) -> None: ... def pack_fopaque(self, n: int, s: bytes) -> None: ... def pack_string(self, s: bytes) -> None: ... def pack_opaque(self, s: bytes) -> None: ... def pack_bytes(self, s: bytes) -> None: ... def pack_list(self, list: Sequence[_T], pack_item: Callable[[_T], None]) -> None: ... def pack_farray(self, n: int, list: Sequence[_T], pack_item: Callable[[_T], None]) -> None: ... def pack_array(self, list: Sequence[_T], pack_item: Callable[[_T], None]) -> None: ... class Unpacker: def __init__(self, data: bytes) -> None: ... def reset(self, data: bytes) -> None: ... def get_position(self) -> int: ... def set_position(self, position: int) -> None: ... def get_buffer(self) -> bytes: ... def done(self) -> None: ... def unpack_uint(self) -> int: ... def unpack_int(self) -> int: ... def unpack_enum(self) -> int: ... def unpack_bool(self) -> bool: ... def unpack_uhyper(self) -> int: ... def unpack_hyper(self) -> int: ... def unpack_float(self) -> float: ... def unpack_double(self) -> float: ... def unpack_fstring(self, n: int) -> bytes: ... def unpack_fopaque(self, n: int) -> bytes: ... def unpack_string(self) -> bytes: ... def unpack_opaque(self) -> bytes: ... def unpack_bytes(self) -> bytes: ... def unpack_list(self, unpack_item: Callable[[], _T]) -> List[_T]: ... def unpack_farray(self, n: int, unpack_item: Callable[[], _T]) -> List[_T]: ... def unpack_array(self, unpack_item: Callable[[], _T]) -> List[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/timeit.pyi0000664000175000017500000000314213577124116023702 0ustar davedave00000000000000# Stubs for timeit (Python 2 and 3) import sys from typing import Any, Callable, Dict, IO, List, Optional, Sequence, Text, Tuple, Union _str = Union[str, Text] _Timer = Callable[[], float] _stmt = Union[_str, Callable[[], Any]] default_timer: _Timer class Timer: if sys.version_info >= (3, 5): def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., globals: Optional[Dict[str, Any]] = ...) -> None: ... else: def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...) -> None: ... def print_exc(self, file: Optional[IO[str]] = ...) -> None: ... def timeit(self, number: int = ...) -> float: ... def repeat(self, repeat: int = ..., number: int = ...) -> List[float]: ... if sys.version_info >= (3, 6): def autorange(self, callback: Optional[Callable[[int, float], Any]] = ...) -> Tuple[int, float]: ... if sys.version_info >= (3, 5): def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., number: int = ..., globals: Optional[Dict[str, Any]] = ...) -> float: ... def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., repeat: int = ..., number: int = ..., globals: Optional[Dict[str, Any]] = ...) -> List[float]: ... else: def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., number: int = ...) -> float: ... def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., repeat: int = ..., number: int = ...) -> List[float]: ... def main(args: Optional[Sequence[str]]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pickle.pyi0000664000175000017500000000716113577124116023663 0ustar davedave00000000000000import sys from typing import Any, IO, Mapping, Union, Tuple, Callable, Optional, Iterator HIGHEST_PROTOCOL: int if sys.version_info >= (3, 0): DEFAULT_PROTOCOL: int if sys.version_info >= (3, 0): def dump(obj: Any, file: IO[bytes], protocol: Optional[int] = ..., *, fix_imports: bool = ...) -> None: ... def dumps(obj: Any, protocol: Optional[int] = ..., *, fix_imports: bool = ...) -> bytes: ... def loads(bytes_object: bytes, *, fix_imports: bool = ..., encoding: str = ..., errors: str = ...) -> Any: ... def load(file: IO[bytes], *, fix_imports: bool = ..., encoding: str = ..., errors: str = ...) -> Any: ... else: def dump(obj: Any, file: IO[bytes], protocol: Optional[int] = ...) -> None: ... def dumps(obj: Any, protocol: Optional[int] = ...) -> bytes: ... def load(file: IO[bytes]) -> Any: ... def loads(string: bytes) -> Any: ... class PickleError(Exception): ... class PicklingError(PickleError): ... class UnpicklingError(PickleError): ... _reducedtype = Union[str, Tuple[Callable[..., Any], Tuple[Any, ...]], Tuple[Callable[..., Any], Tuple[Any, ...], Any], Tuple[Callable[..., Any], Tuple[Any, ...], Any, Optional[Iterator]], Tuple[Callable[..., Any], Tuple[Any, ...], Any, Optional[Iterator], Optional[Iterator]]] class Pickler: fast: bool if sys.version_info >= (3, 3): dispatch_table: Mapping[type, Callable[[Any], _reducedtype]] if sys.version_info >= (3, 0): def __init__(self, file: IO[bytes], protocol: Optional[int] = ..., *, fix_imports: bool = ...) -> None: ... else: def __init__(self, file: IO[bytes], protocol: Optional[int] = ...) -> None: ... def dump(self, obj: Any) -> None: ... def clear_memo(self) -> None: ... def persistent_id(self, obj: Any) -> Any: ... if sys.version_info >= (3, 8): def reducer_override(self, obj: Any) -> Any: ... class Unpickler: if sys.version_info >= (3, 0): def __init__(self, file: IO[bytes], *, fix_imports: bool = ..., encoding: str = ..., errors: str = ...) -> None: ... else: def __init__(self, file: IO[bytes]) -> None: ... def load(self) -> Any: ... def find_class(self, module: str, name: str) -> Any: ... if sys.version_info >= (3, 0): def persistent_load(self, pid: Any) -> Any: ... MARK: bytes STOP: bytes POP: bytes POP_MARK: bytes DUP: bytes FLOAT: bytes INT: bytes BININT: bytes BININT1: bytes LONG: bytes BININT2: bytes NONE: bytes PERSID: bytes BINPERSID: bytes REDUCE: bytes STRING: bytes BINSTRING: bytes SHORT_BINSTRING: bytes UNICODE: bytes BINUNICODE: bytes APPEND: bytes BUILD: bytes GLOBAL: bytes DICT: bytes EMPTY_DICT: bytes APPENDS: bytes GET: bytes BINGET: bytes INST: bytes LONG_BINGET: bytes LIST: bytes EMPTY_LIST: bytes OBJ: bytes PUT: bytes BINPUT: bytes LONG_BINPUT: bytes SETITEM: bytes TUPLE: bytes EMPTY_TUPLE: bytes SETITEMS: bytes BINFLOAT: bytes TRUE: bytes FALSE: bytes # protocol 2 PROTO: bytes NEWOBJ: bytes EXT1: bytes EXT2: bytes EXT4: bytes TUPLE1: bytes TUPLE2: bytes TUPLE3: bytes NEWTRUE: bytes NEWFALSE: bytes LONG1: bytes LONG4: bytes if sys.version_info >= (3, 0): # protocol 3 BINBYTES: bytes SHORT_BINBYTES: bytes if sys.version_info >= (3, 4): # protocol 4 SHORT_BINUNICODE: bytes BINUNICODE8: bytes BINBYTES8: bytes EMPTY_SET: bytes ADDITEMS: bytes FROZENSET: bytes NEWOBJ_EX: bytes STACK_GLOBAL: bytes MEMOIZE: bytes FRAME: bytes jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sndhdr.pyi0000664000175000017500000000117313577124116023673 0ustar davedave00000000000000# Stubs for sndhdr (Python 2 and 3) import os import sys from typing import Any, NamedTuple, Optional, Tuple, Union if sys.version_info >= (3, 5): class SndHeaders(NamedTuple): filetype: str framerate: int nchannels: int nframes: int sampwidth: Union[int, str] _SndHeaders = SndHeaders else: _SndHeaders = Tuple[str, int, int, int, Union[int, str]] if sys.version_info >= (3, 6): _Path = Union[str, bytes, os.PathLike[Any]] else: _Path = Union[str, bytes] def what(filename: _Path) -> Optional[_SndHeaders]: ... def whathdr(filename: _Path) -> Optional[_SndHeaders]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/tty.pyi0000664000175000017500000000046113577124116023230 0ustar davedave00000000000000# Stubs for tty (Python 3.6) from typing import IO, Union _FD = Union[int, IO[str]] # XXX: Undocumented integer constants IFLAG: int OFLAG: int CFLAG: int LFLAG: int ISPEED: int OSPEED: int CC: int def setraw(fd: _FD, when: int = ...) -> None: ... def setcbreak(fd: _FD, when: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pkgutil.pyi0000664000175000017500000000253113577124116024067 0ustar davedave00000000000000# Stubs for pkgutil from typing import Any, Callable, Generator, IO, Iterable, Optional, Tuple, NamedTuple import sys if sys.version_info >= (3,): from importlib.abc import Loader else: Loader = Any if sys.version_info >= (3, 6): class ModuleInfo(NamedTuple): module_finder: Any name: str ispkg: bool _YMFNI = Generator[ModuleInfo, None, None] else: _YMFNI = Generator[Tuple[Any, str, bool], None, None] def extend_path(path: Iterable[str], name: str) -> Iterable[str]: ... class ImpImporter: def __init__(self, dirname: Optional[str] = ...) -> None: ... class ImpLoader: def __init__(self, fullname: str, file: IO[str], filename: str, etc: Tuple[str, str, int]) -> None: ... def find_loader(fullname: str) -> Optional[Loader]: ... def get_importer(path_item: str) -> Any: ... # TODO precise type def get_loader(module_or_name: str) -> Loader: ... def iter_importers(fullname: str = ...) -> Generator[Any, None, None]: ... # TODO precise type def iter_modules(path: Optional[Iterable[str]] = ..., prefix: str = ...) -> _YMFNI: ... # TODO precise type def walk_packages(path: Optional[Iterable[str]] = ..., prefix: str = ..., onerror: Optional[Callable[[str], None]] = ...) -> _YMFNI: ... def get_data(package: str, resource: str) -> Optional[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ensurepip/0000775000175000017500000000000013577125145023701 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/ensurepip/__init__.pyi0000664000175000017500000000067413577124116026167 0ustar davedave00000000000000 from typing import Optional import sys def version() -> str: ... if sys.version_info >= (3, 0): def bootstrap(*, root: Optional[str] = ..., upgrade: bool = ..., user: bool = ..., altinstall: bool = ..., default_pip: bool = ..., verbosity: int = ...) -> None: ... else: def bootstrap(root: Optional[str] = ..., upgrade: bool = ..., user: bool = ..., altinstall: bool = ..., default_pip: bool = ..., verbosity: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/linecache.pyi0000664000175000017500000000111613577124116024321 0ustar davedave00000000000000import sys from typing import Any, Dict, List, Optional, Text _ModuleGlobals = Dict[str, Any] def getline(filename: Text, lineno: int, module_globals: Optional[_ModuleGlobals] = ...) -> str: ... def clearcache() -> None: ... def getlines(filename: Text, module_globals: Optional[_ModuleGlobals] = ...) -> List[str]: ... def checkcache(filename: Optional[Text] = ...) -> None: ... def updatecache(filename: Text, module_globals: Optional[_ModuleGlobals] = ...) -> List[str]: ... if sys.version_info >= (3, 5): def lazycache(filename: Text, module_globals: _ModuleGlobals) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/asynchat.pyi0000664000175000017500000000302513577124116024221 0ustar davedave00000000000000from abc import abstractmethod import asyncore import socket import sys from typing import Optional, Sequence, Tuple, Union class simple_producer: def __init__(self, data: bytes, buffer_size: int = ...) -> None: ... def more(self) -> bytes: ... class async_chat(asyncore.dispatcher): ac_in_buffer_size: int ac_out_buffer_size: int def __init__(self, sock: Optional[socket.socket] = ..., map: Optional[asyncore._maptype] = ...) -> None: ... @abstractmethod def collect_incoming_data(self, data: bytes) -> None: ... @abstractmethod def found_terminator(self) -> None: ... def set_terminator(self, term: Union[bytes, int, None]) -> None: ... def get_terminator(self) -> Union[bytes, int, None]: ... def handle_read(self) -> None: ... def handle_write(self) -> None: ... def handle_close(self) -> None: ... def push(self, data: bytes) -> None: ... def push_with_producer(self, producer: simple_producer) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def close_when_done(self) -> None: ... def initiate_send(self) -> None: ... def discard_buffers(self) -> None: ... if sys.version_info < (3, 0): class fifo: def __init__(self, list: Sequence[Union[bytes, simple_producer]] = ...) -> None: ... def __len__(self) -> int: ... def is_empty(self) -> bool: ... def first(self) -> bytes: ... def push(self, data: Union[bytes, simple_producer]) -> None: ... def pop(self) -> Tuple[int, bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/pprint.pyi0000664000175000017500000000324313577124116023725 0ustar davedave00000000000000# Stubs for pprint # Based on http://docs.python.org/2/library/pprint.html # Based on http://docs.python.org/3/library/pprint.html import sys from typing import Any, Dict, Tuple, IO, Optional if sys.version_info >= (3, 4): def pformat(o: object, indent: int = ..., width: int = ..., depth: Optional[int] = ..., compact: bool = ...) -> str: ... else: def pformat(o: object, indent: int = ..., width: int = ..., depth: Optional[int] = ...) -> str: ... if sys.version_info >= (3, 4): def pprint(o: object, stream: Optional[IO[str]] = ..., indent: int = ..., width: int = ..., depth: Optional[int] = ..., compact: bool = ...) -> None: ... else: def pprint(o: object, stream: Optional[IO[str]] = ..., indent: int = ..., width: int = ..., depth: Optional[int] = ...) -> None: ... def isreadable(o: object) -> bool: ... def isrecursive(o: object) -> bool: ... def saferepr(o: object) -> str: ... class PrettyPrinter: if sys.version_info >= (3, 4): def __init__(self, indent: int = ..., width: int = ..., depth: Optional[int] = ..., stream: Optional[IO[str]] = ..., compact: bool = ...) -> None: ... else: def __init__(self, indent: int = ..., width: int = ..., depth: Optional[int] = ..., stream: Optional[IO[str]] = ...) -> None: ... def pformat(self, o: object) -> str: ... def pprint(self, o: object) -> None: ... def isreadable(self, o: object) -> bool: ... def isrecursive(self, o: object) -> bool: ... def format(self, o: object, context: Dict[int, Any], maxlevels: int, level: int) -> Tuple[str, bool, bool]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/smtpd.pyi0000664000175000017500000000545013577124116023542 0ustar davedave00000000000000# Stubs for smtpd (Python 2 and 3) import sys import socket import asyncore import asynchat from typing import Any, DefaultDict, List, Optional, Text, Tuple, Type _Address = Tuple[str, int] # (host, port) class SMTPChannel(asynchat.async_chat): COMMAND: int DATA: int if sys.version_info >= (3,): command_size_limits: DefaultDict[str, int] smtp_server: SMTPServer conn: socket.socket addr: Any received_lines: List[Text] smtp_state: int seen_greeting: str mailfrom: str rcpttos: List[str] received_data: str fqdn: str peer: str command_size_limit: int data_size_limit: int enable_SMTPUTF8: bool @property def max_command_size_limit(self) -> int: ... if sys.version_info >= (3,): def __init__(self, server: SMTPServer, conn: socket.socket, addr: Any, data_size_limit: int = ..., map: Optional[asyncore._maptype] = ..., enable_SMTPUTF8: bool = ..., decode_data: bool = ...) -> None: ... else: def __init__(self, server: SMTPServer, conn: socket.socket, addr: Any, data_size_limit: int = ...) -> None: ... # base asynchat.async_chat.push() accepts bytes def push(self, msg: Text) -> None: ... # type: ignore def collect_incoming_data(self, data: bytes) -> None: ... def found_terminator(self) -> None: ... def smtp_HELO(self, arg: str) -> None: ... def smtp_NOOP(self, arg: str) -> None: ... def smtp_QUIT(self, arg: str) -> None: ... def smtp_MAIL(self, arg: str) -> None: ... def smtp_RCPT(self, arg: str) -> None: ... def smtp_RSET(self, arg: str) -> None: ... def smtp_DATA(self, arg: str) -> None: ... if sys.version_info >= (3, 3): def smtp_EHLO(self, arg: str) -> None: ... def smtp_HELP(self, arg: str) -> None: ... def smtp_VRFY(self, arg: str) -> None: ... def smtp_EXPN(self, arg: str) -> None: ... class SMTPServer(asyncore.dispatcher): channel_class: Type[SMTPChannel] data_size_limit: int enable_SMTPUTF8: bool if sys.version_info >= (3,): def __init__(self, localaddr: _Address, remoteaddr: _Address, data_size_limit: int = ..., map: Optional[asyncore._maptype] = ..., enable_SMTPUTF8: bool = ..., decode_data: bool = ...) -> None: ... else: def __init__(self, localaddr: _Address, remoteaddr: _Address, data_size_limit: int = ...) -> None: ... def handle_accepted(self, conn: socket.socket, addr: Any) -> None: ... def process_message(self, peer: _Address, mailfrom: str, rcpttos: List[Text], data: str, **kwargs: Any) -> Optional[str]: ... class DebuggingServer(SMTPServer): ... class PureProxy(SMTPServer): ... class MailmanProxy(PureProxy): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/select.pyi0000664000175000017500000000754013577124116023674 0ustar davedave00000000000000import sys from typing import Any, Iterable, List, Optional, Protocol, Tuple, Union class _HasFileno(Protocol): def fileno(self) -> int: ... _FileDescriptor = Union[int, _HasFileno] EPOLLERR: int EPOLLET: int EPOLLHUP: int EPOLLIN: int EPOLLMSG: int EPOLLONESHOT: int EPOLLOUT: int EPOLLPRI: int EPOLLRDBAND: int EPOLLRDNORM: int EPOLLWRBAND: int EPOLLWRNORM: int EPOLL_RDHUP: int KQ_EV_ADD: int KQ_EV_CLEAR: int KQ_EV_DELETE: int KQ_EV_DISABLE: int KQ_EV_ENABLE: int KQ_EV_EOF: int KQ_EV_ERROR: int KQ_EV_FLAG1: int KQ_EV_ONESHOT: int KQ_EV_SYSFLAGS: int KQ_FILTER_AIO: int KQ_FILTER_NETDEV: int KQ_FILTER_PROC: int KQ_FILTER_READ: int KQ_FILTER_SIGNAL: int KQ_FILTER_TIMER: int KQ_FILTER_VNODE: int KQ_FILTER_WRITE: int KQ_NOTE_ATTRIB: int KQ_NOTE_CHILD: int KQ_NOTE_DELETE: int KQ_NOTE_EXEC: int KQ_NOTE_EXIT: int KQ_NOTE_EXTEND: int KQ_NOTE_FORK: int KQ_NOTE_LINK: int KQ_NOTE_LINKDOWN: int KQ_NOTE_LINKINV: int KQ_NOTE_LINKUP: int KQ_NOTE_LOWAT: int KQ_NOTE_PCTRLMASK: int KQ_NOTE_PDATAMASK: int KQ_NOTE_RENAME: int KQ_NOTE_REVOKE: int KQ_NOTE_TRACK: int KQ_NOTE_TRACKERR: int KQ_NOTE_WRITE: int PIPE_BUF: int POLLERR: int POLLHUP: int POLLIN: int POLLMSG: int POLLNVAL: int POLLOUT: int POLLPRI: int POLLRDBAND: int POLLRDNORM: int POLLWRBAND: int POLLWRNORM: int class poll: def __init__(self) -> None: ... def register(self, fd: _FileDescriptor, eventmask: int = ...) -> None: ... def modify(self, fd: _FileDescriptor, eventmask: int) -> None: ... def unregister(self, fd: _FileDescriptor) -> None: ... def poll(self, timeout: Optional[float] = ...) -> List[Tuple[int, int]]: ... def select(rlist: Iterable[Any], wlist: Iterable[Any], xlist: Iterable[Any], timeout: Optional[float] = ...) -> Tuple[List[Any], List[Any], List[Any]]: ... if sys.version_info >= (3, 3): error = OSError else: class error(Exception): ... # BSD only class kevent(object): data: Any fflags: int filter: int flags: int ident: int udata: Any def __init__(self, ident: _FileDescriptor, filter: int = ..., flags: int = ..., fflags: int = ..., data: Any = ..., udata: Any = ...) -> None: ... # BSD only class kqueue(object): closed: bool def __init__(self) -> None: ... def close(self) -> None: ... def control(self, changelist: Optional[Iterable[kevent]], max_events: int, timeout: float = ...) -> List[kevent]: ... def fileno(self) -> int: ... @classmethod def fromfd(cls, fd: _FileDescriptor) -> kqueue: ... # Linux only class epoll(object): if sys.version_info >= (3, 3): def __init__(self, sizehint: int = ..., flags: int = ...) -> None: ... else: def __init__(self, sizehint: int = ...) -> None: ... if sys.version_info >= (3, 4): def __enter__(self) -> epoll: ... def __exit__(self, *args: Any) -> None: ... def close(self) -> None: ... closed: bool def fileno(self) -> int: ... def register(self, fd: _FileDescriptor, eventmask: int = ...) -> None: ... def modify(self, fd: _FileDescriptor, eventmask: int) -> None: ... def unregister(self, fd: _FileDescriptor) -> None: ... def poll(self, timeout: float = ..., maxevents: int = ...) -> List[Tuple[int, int]]: ... @classmethod def fromfd(cls, fd: _FileDescriptor) -> epoll: ... if sys.version_info >= (3, 3): # Solaris only class devpoll: if sys.version_info >= (3, 4): def close(self) -> None: ... closed: bool def fileno(self) -> int: ... def register(self, fd: _FileDescriptor, eventmask: int = ...) -> None: ... def modify(self, fd: _FileDescriptor, eventmask: int = ...) -> None: ... def unregister(self, fd: _FileDescriptor) -> None: ... def poll(self, timeout: Optional[float] = ...) -> List[Tuple[int, int]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/cgi.pyi0000664000175000017500000001160613577124116023155 0ustar davedave00000000000000import sys from typing import Any, AnyStr, Dict, IO, Iterable, List, Mapping, Optional, Tuple, TypeVar, Union _T = TypeVar('_T', bound=FieldStorage) def parse(fp: IO[Any] = ..., environ: Mapping[str, str] = ..., keep_blank_values: bool = ..., strict_parsing: bool = ...) -> Dict[str, List[str]]: ... if sys.version_info < (3, 8): def parse_qs(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> Dict[str, List[str]]: ... def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> Dict[str, List[str]]: ... if sys.version_info >= (3, 7): def parse_multipart(fp: IO[Any], pdict: Mapping[str, bytes], encoding: str = ..., errors: str = ...) -> Dict[str, List[Any]]: ... else: def parse_multipart(fp: IO[Any], pdict: Mapping[str, bytes]) -> Dict[str, List[bytes]]: ... def parse_header(s: str) -> Tuple[str, Dict[str, str]]: ... def test(environ: Mapping[str, str] = ...) -> None: ... def print_environ(environ: Mapping[str, str] = ...) -> None: ... def print_form(form: Dict[str, Any]) -> None: ... def print_directory() -> None: ... def print_environ_usage() -> None: ... if sys.version_info < (3,): def escape(s: AnyStr, quote: bool = ...) -> AnyStr: ... elif sys.version_info < (3, 8): def escape(s: str, quote: bool = ...) -> str: ... class MiniFieldStorage: # The first five "Any" attributes here are always None, but mypy doesn't support that filename: Any list: Any type: Any file: Optional[IO[bytes]] type_options: Dict[Any, Any] disposition: Any disposition_options: Dict[Any, Any] headers: Dict[Any, Any] name: Any value: Any def __init__(self, name: Any, value: Any) -> None: ... def __repr__(self) -> str: ... class FieldStorage(object): FieldStorageClass: Optional[type] keep_blank_values: int strict_parsing: int qs_on_post: Optional[str] headers: Mapping[str, str] fp: IO[bytes] encoding: str errors: str outerboundary: bytes bytes_read: int limit: Optional[int] disposition: str disposition_options: Dict[str, str] filename: Optional[str] file: Optional[IO[bytes]] type: str type_options: Dict[str, str] innerboundary: bytes length: int done: int list: Optional[List[Any]] value: Union[None, bytes, List[Any]] if sys.version_info >= (3, 0): def __init__(self, fp: IO[Any] = ..., headers: Mapping[str, str] = ..., outerboundary: bytes = ..., environ: Mapping[str, str] = ..., keep_blank_values: int = ..., strict_parsing: int = ..., limit: int = ..., encoding: str = ..., errors: str = ...) -> None: ... else: def __init__(self, fp: IO[Any] = ..., headers: Mapping[str, str] = ..., outerboundary: bytes = ..., environ: Mapping[str, str] = ..., keep_blank_values: int = ..., strict_parsing: int = ...) -> None: ... if sys.version_info >= (3, 0): def __enter__(self: _T) -> _T: ... def __exit__(self, *args: Any) -> None: ... def __repr__(self) -> str: ... def __iter__(self) -> Iterable[str]: ... def __getitem__(self, key: str) -> Any: ... def getvalue(self, key: str, default: Any = ...) -> Any: ... def getfirst(self, key: str, default: Any = ...) -> Any: ... def getlist(self, key: str) -> List[Any]: ... def keys(self) -> List[str]: ... if sys.version_info < (3, 0): def has_key(self, key: str) -> bool: ... def __contains__(self, key: str) -> bool: ... def __len__(self) -> int: ... if sys.version_info >= (3, 0): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... if sys.version_info >= (3, 0): # In Python 3 it returns bytes or str IO depending on an internal flag def make_file(self) -> IO[Any]: ... else: # In Python 2 it always returns bytes and ignores the "binary" flag def make_file(self, binary: Any = ...) -> IO[bytes]: ... if sys.version_info < (3, 0): from UserDict import UserDict class FormContentDict(UserDict[str, List[str]]): query_string: str def __init__(self, environ: Mapping[str, str] = ..., keep_blank_values: int = ..., strict_parsing: int = ...) -> None: ... class SvFormContentDict(FormContentDict): def getlist(self, key: Any) -> Any: ... class InterpFormContentDict(SvFormContentDict): ... class FormContent(FormContentDict): # TODO this should have # def values(self, key: Any) -> Any: ... # but this is incompatible with the supertype, and adding '# type: ignore' triggers # a parse error in pytype (https://github.com/google/pytype/issues/53) def indexed_value(self, key: Any, location: int) -> Any: ... def value(self, key: Any) -> Any: ... def length(self, key: Any) -> int: ... def stripped(self, key: Any) -> Any: ... def pars(self) -> Dict[Any, Any]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/marshal.pyi0000664000175000017500000000036013577124116024035 0ustar davedave00000000000000from typing import Any, IO version: int def dump(value: Any, file: IO[Any], version: int = ...) -> None: ... def load(file: IO[Any]) -> Any: ... def dumps(value: Any, version: int = ...) -> bytes: ... def loads(string: bytes) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/_random.pyi0000664000175000017500000000075513577124116024035 0ustar davedave00000000000000# Stubs for _random import sys from typing import Tuple # Actually Tuple[(int,) * 625] _State = Tuple[int, ...] class Random(object): def __init__(self, seed: object = ...) -> None: ... def seed(self, x: object = ...) -> None: ... def getstate(self) -> _State: ... def setstate(self, state: _State) -> None: ... def random(self) -> float: ... def getrandbits(self, k: int) -> int: ... if sys.version_info < (3,): def jumpahead(self, i: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/mimetypes.pyi0000664000175000017500000000304713577124116024427 0ustar davedave00000000000000# Stubs for mimetypes from typing import Dict, IO, List, Optional, Sequence, Text, Tuple import sys def guess_type(url: Text, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ... def guess_all_extensions(type: str, strict: bool = ...) -> List[str]: ... def guess_extension(type: str, strict: bool = ...) -> Optional[str]: ... def init(files: Optional[Sequence[str]] = ...) -> None: ... def read_mime_types(filename: str) -> Optional[Dict[str, str]]: ... def add_type(type: str, ext: str, strict: bool = ...) -> None: ... inited: bool knownfiles: List[str] suffix_map: Dict[str, str] encodings_map: Dict[str, str] types_map: Dict[str, str] common_types: Dict[str, str] class MimeTypes: suffix_map: Dict[str, str] encodings_map: Dict[str, str] types_map: Tuple[Dict[str, str], Dict[str, str]] types_map_inv: Tuple[Dict[str, str], Dict[str, str]] def __init__(self, filenames: Tuple[str, ...] = ..., strict: bool = ...) -> None: ... def guess_extension(self, type: str, strict: bool = ...) -> Optional[str]: ... def guess_type(self, url: str, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ... def guess_all_extensions(self, type: str, strict: bool = ...) -> List[str]: ... def read(self, filename: str, strict: bool = ...) -> None: ... def readfp(self, fp: IO[str], strict: bool = ...) -> None: ... if sys.platform == 'win32': def read_windows_registry(self, strict: bool = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/dis.pyi0000664000175000017500000000551613577124116023175 0ustar davedave00000000000000from typing import Callable, List, Union, Iterator, Tuple, Optional, Any, IO, NamedTuple, Dict import sys import types from opcode import (hasconst as hasconst, hasname as hasname, hasjrel as hasjrel, hasjabs as hasjabs, haslocal as haslocal, hascompare as hascompare, hasfree as hasfree, cmp_op as cmp_op, opname as opname, opmap as opmap, HAVE_ARGUMENT as HAVE_ARGUMENT, EXTENDED_ARG as EXTENDED_ARG) if sys.version_info >= (3, 4): from opcode import stack_effect as stack_effect if sys.version_info >= (3, 6): from opcode import hasnargs as hasnargs # Strictly this should not have to include Callable, but mypy doesn't use FunctionType # for functions (python/mypy#3171) _have_code = Union[types.MethodType, types.FunctionType, types.CodeType, type, Callable[..., Any]] _have_code_or_string = Union[_have_code, str, bytes] if sys.version_info >= (3, 4): class Instruction(NamedTuple): opname: str opcode: int arg: Optional[int] argval: Any argrepr: str offset: int starts_line: Optional[int] is_jump_target: bool class Bytecode: codeobj: types.CodeType first_line: int def __init__(self, x: _have_code_or_string, *, first_line: Optional[int] = ..., current_offset: Optional[int] = ...) -> None: ... def __iter__(self) -> Iterator[Instruction]: ... def __repr__(self) -> str: ... def info(self) -> str: ... def dis(self) -> str: ... @classmethod def from_traceback(cls, tb: types.TracebackType) -> Bytecode: ... COMPILER_FLAG_NAMES: Dict[int, str] def findlabels(code: _have_code) -> List[int]: ... def findlinestarts(code: _have_code) -> Iterator[Tuple[int, int]]: ... if sys.version_info >= (3, 0): def pretty_flags(flags: int) -> str: ... def code_info(x: _have_code_or_string) -> str: ... if sys.version_info >= (3, 4): def dis(x: _have_code_or_string = ..., *, file: Optional[IO[str]] = ...) -> None: ... def distb(tb: Optional[types.TracebackType] = ..., *, file: Optional[IO[str]] = ...) -> None: ... def disassemble(co: _have_code, lasti: int = ..., *, file: Optional[IO[str]] = ...) -> None: ... def disco(co: _have_code, lasti: int = ..., *, file: Optional[IO[str]] = ...) -> None: ... def show_code(co: _have_code, *, file: Optional[IO[str]] = ...) -> None: ... def get_instructions(x: _have_code, *, first_line: Optional[int] = ...) -> Iterator[Instruction]: ... else: def dis(x: _have_code_or_string = ...) -> None: ... def distb(tb: types.TracebackType = ...) -> None: ... def disassemble(co: _have_code, lasti: int = ...) -> None: ... def disco(co: _have_code, lasti: int = ...) -> None: ... if sys.version_info >= (3, 0): def show_code(co: _have_code) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sched.pyi0000664000175000017500000000246413577124116023503 0ustar davedave00000000000000import sys from typing import Any, Callable, Dict, List, NamedTuple, Optional, Text, Tuple class Event(NamedTuple): time: float priority: Any action: Callable[..., Any] argument: Tuple[Any, ...] kwargs: Dict[Text, Any] class scheduler: if sys.version_info >= (3, 3): def __init__(self, timefunc: Callable[[], float] = ..., delayfunc: Callable[[float], None] = ...) -> None: ... def enterabs(self, time: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...] = ..., kwargs: Dict[str, Any] = ...) -> Event: ... def enter(self, delay: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...] = ..., kwargs: Dict[str, Any] = ...) -> Event: ... def run(self, blocking: bool = ...) -> Optional[float]: ... else: def __init__(self, timefunc: Callable[[], float], delayfunc: Callable[[float], None]) -> None: ... def enterabs(self, time: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...]) -> Event: ... def enter(self, delay: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...]) -> Event: ... def run(self) -> None: ... def cancel(self, event: Event) -> None: ... def empty(self) -> bool: ... @property def queue(self) -> List[Event]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/opcode.pyi0000664000175000017500000000071713577124116023665 0ustar davedave00000000000000from typing import List, Dict, Optional, Sequence import sys cmp_op: Sequence[str] hasconst: List[int] hasname: List[int] hasjrel: List[int] hasjabs: List[int] haslocal: List[int] hascompare: List[int] hasfree: List[int] opname: List[str] opmap: Dict[str, int] HAVE_ARGUMENT: int EXTENDED_ARG: int if sys.version_info >= (3, 4): def stack_effect(opcode: int, oparg: Optional[int] = ...) -> int: ... if sys.version_info >= (3, 6): hasnargs: List[int] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/0000775000175000017500000000000013577125145022467 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/__init__.pyi0000664000175000017500000000003613577124116024745 0ustar davedave00000000000000import xml.parsers as parsers jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/etree/0000775000175000017500000000000013577125145023573 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/etree/__init__.pyi0000664000175000017500000000000013577124116026040 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/etree/ElementInclude.pyi0000664000175000017500000000123113577124116027205 0ustar davedave00000000000000# Stubs for xml.etree.ElementInclude (Python 3.4) from typing import Union, Optional, Callable from xml.etree.ElementTree import Element XINCLUDE: str XINCLUDE_INCLUDE: str XINCLUDE_FALLBACK: str class FatalIncludeError(SyntaxError): ... def default_loader(href: Union[str, bytes, int], parse: str, encoding: Optional[str] = ...) -> Union[str, Element]: ... # TODO: loader is of type default_loader ie it takes a callable that has the # same signature as default_loader. But default_loader has a keyword argument # Which can't be represented using Callable... def include(elem: Element, loader: Optional[Callable[..., Union[str, Element]]] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/etree/ElementTree.pyi0000664000175000017500000003045513577124116026533 0ustar davedave00000000000000# Stubs for xml.etree.ElementTree from typing import ( Any, Callable, Dict, Generator, IO, ItemsView, Iterable, Iterator, KeysView, List, MutableSequence, Optional, Protocol, Sequence, Text, Tuple, TypeVar, Union, overload, ) import io import sys if sys.version_info < (3,) or sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal VERSION: str class ParseError(SyntaxError): code: int position: Tuple[int, int] def iselement(element: object) -> bool: ... _T = TypeVar('_T') # Type for parser inputs. Parser will accept any unicode/str/bytes and coerce, # and this is true in py2 and py3 (even fromstringlist() in python3 can be # called with a heterogeneous list) _parser_input_type = Union[bytes, Text] # Type for individual tag/attr/ns/text values in args to most functions. # In py2, the library accepts str or unicode everywhere and coerces # aggressively. # In py3, bytes is not coerced to str and so use of bytes is probably an error, # so we exclude it. (why? the parser never produces bytes when it parses XML, # so e.g., element.get(b'name') will always return None for parsed XML, even if # there is a 'name' attribute.) _str_argument_type = Union[str, Text] # Type for return values from individual tag/attr/text values if sys.version_info >= (3,): # note: in python3, everything comes out as str, yay: _str_result_type = str else: # in python2, if the tag/attribute/text wasn't decode-able as ascii, it # comes out as a unicode string; otherwise it comes out as str. (see # _fixtext function in the source). Client code knows best: _str_result_type = Any _file_or_filename = Union[str, bytes, int, IO[Any]] if sys.version_info >= (3, 8): class _Writeable(Protocol): def write(self, __s: str) -> Any: ... @overload def canonicalize( xml_data: Optional[_parser_input_type] = ..., *, out: None = ..., from_file: Optional[_file_or_filename] = ..., with_comments: bool = ..., strip_text: bool = ..., rewrite_prefixes: bool = ..., qname_aware_tags: Optional[Iterable[str]] = ..., qname_aware_attrs: Optional[Iterable[str]] = ..., exclude_attrs: Optional[Iterable[str]] = ..., exclude_tags: Optional[Iterable[str]] = ..., ) -> str: ... @overload def canonicalize( xml_data: Optional[_parser_input_type] = ..., *, out: _Writeable, from_file: Optional[_file_or_filename] = ..., with_comments: bool = ..., strip_text: bool = ..., rewrite_prefixes: bool = ..., qname_aware_tags: Optional[Iterable[str]] = ..., qname_aware_attrs: Optional[Iterable[str]] = ..., exclude_attrs: Optional[Iterable[str]] = ..., exclude_tags: Optional[Iterable[str]] = ..., ) -> None: ... class Element(MutableSequence[Element]): tag: _str_result_type attrib: Dict[_str_result_type, _str_result_type] text: Optional[_str_result_type] tail: Optional[_str_result_type] def __init__(self, tag: Union[_str_argument_type, Callable[..., Element]], attrib: Dict[_str_argument_type, _str_argument_type] = ..., **extra: _str_argument_type) -> None: ... def append(self, subelement: Element) -> None: ... def clear(self) -> None: ... def copy(self) -> Element: ... def extend(self, elements: Iterable[Element]) -> None: ... def find(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[Element]: ... def findall(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ... @overload def findtext(self, path: _str_argument_type, *, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[_str_result_type]: ... @overload def findtext(self, path: _str_argument_type, default: _T, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Union[_T, _str_result_type]: ... @overload def get(self, key: _str_argument_type) -> Optional[_str_result_type]: ... @overload def get(self, key: _str_argument_type, default: _T) -> Union[_str_result_type, _T]: ... def getchildren(self) -> List[Element]: ... def getiterator(self, tag: Optional[_str_argument_type] = ...) -> List[Element]: ... if sys.version_info >= (3, 2): def insert(self, index: int, subelement: Element) -> None: ... else: def insert(self, index: int, element: Element) -> None: ... def items(self) -> ItemsView[_str_result_type, _str_result_type]: ... def iter(self, tag: Optional[_str_argument_type] = ...) -> Generator[Element, None, None]: ... def iterfind(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ... def itertext(self) -> Generator[_str_result_type, None, None]: ... def keys(self) -> KeysView[_str_result_type]: ... def makeelement(self, tag: _str_argument_type, attrib: Dict[_str_argument_type, _str_argument_type]) -> Element: ... def remove(self, subelement: Element) -> None: ... def set(self, key: _str_argument_type, value: _str_argument_type) -> None: ... def __bool__(self) -> bool: ... def __delitem__(self, i: Union[int, slice]) -> None: ... @overload def __getitem__(self, i: int) -> Element: ... @overload def __getitem__(self, s: slice) -> MutableSequence[Element]: ... def __len__(self) -> int: ... @overload def __setitem__(self, i: int, o: Element) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[Element]) -> None: ... def SubElement(parent: Element, tag: _str_argument_type, attrib: Dict[_str_argument_type, _str_argument_type] = ..., **extra: _str_argument_type) -> Element: ... def Comment(text: Optional[_str_argument_type] = ...) -> Element: ... def ProcessingInstruction(target: _str_argument_type, text: Optional[_str_argument_type] = ...) -> Element: ... PI: Callable[..., Element] class QName: text: str def __init__(self, text_or_uri: _str_argument_type, tag: Optional[_str_argument_type] = ...) -> None: ... class ElementTree: def __init__(self, element: Optional[Element] = ..., file: Optional[_file_or_filename] = ...) -> None: ... def getroot(self) -> Element: ... def parse(self, source: _file_or_filename, parser: Optional[XMLParser] = ...) -> Element: ... def iter(self, tag: Optional[_str_argument_type] = ...) -> Generator[Element, None, None]: ... def getiterator(self, tag: Optional[_str_argument_type] = ...) -> List[Element]: ... def find(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[Element]: ... @overload def findtext(self, path: _str_argument_type, *, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Optional[_str_result_type]: ... @overload def findtext(self, path: _str_argument_type, default: _T, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> Union[_T, _str_result_type]: ... def findall(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ... def iterfind(self, path: _str_argument_type, namespaces: Optional[Dict[_str_argument_type, _str_argument_type]] = ...) -> List[Element]: ... if sys.version_info >= (3, 4): def write(self, file_or_filename: _file_or_filename, encoding: Optional[str] = ..., xml_declaration: Optional[bool] = ..., default_namespace: Optional[_str_argument_type] = ..., method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> None: ... else: def write(self, file_or_filename: _file_or_filename, encoding: Optional[str] = ..., xml_declaration: Optional[bool] = ..., default_namespace: Optional[_str_argument_type] = ..., method: Optional[str] = ...) -> None: ... def write_c14n(self, file: _file_or_filename) -> None: ... def register_namespace(prefix: _str_argument_type, uri: _str_argument_type) -> None: ... if sys.version_info >= (3,): @overload def tostring(element: Element, encoding: None = ..., method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> bytes: ... @overload def tostring(element: Element, encoding: Literal["unicode"], method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> str: ... @overload def tostring(element: Element, encoding: str, method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> Any: ... @overload def tostringlist(element: Element, encoding: None = ..., method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> List[bytes]: ... @overload def tostringlist(element: Element, encoding: Literal["unicode"], method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> List[str]: ... @overload def tostringlist(element: Element, encoding: str, method: Optional[str] = ..., *, short_empty_elements: bool = ...) -> List[Any]: ... else: def tostring(element: Element, encoding: Optional[str] = ..., method: Optional[str] = ...) -> bytes: ... def tostringlist(element: Element, encoding: Optional[str] = ..., method: Optional[str] = ...) -> List[bytes]: ... def dump(elem: Element) -> None: ... def parse(source: _file_or_filename, parser: Optional[XMLParser] = ...) -> ElementTree: ... def iterparse(source: _file_or_filename, events: Optional[Sequence[str]] = ..., parser: Optional[XMLParser] = ...) -> Iterator[Tuple[str, Any]]: ... if sys.version_info >= (3, 4): class XMLPullParser: def __init__(self, events: Optional[Sequence[str]] = ..., *, _parser: Optional[XMLParser] = ...) -> None: ... def feed(self, data: bytes) -> None: ... def close(self) -> None: ... def read_events(self) -> Iterator[Tuple[str, Element]]: ... def XML(text: _parser_input_type, parser: Optional[XMLParser] = ...) -> Element: ... def XMLID(text: _parser_input_type, parser: Optional[XMLParser] = ...) -> Tuple[Element, Dict[_str_result_type, Element]]: ... # This is aliased to XML in the source. fromstring = XML def fromstringlist(sequence: Sequence[_parser_input_type], parser: Optional[XMLParser] = ...) -> Element: ... # This type is both not precise enough and too precise. The TreeBuilder # requires the elementfactory to accept tag and attrs in its args and produce # some kind of object that has .text and .tail properties. # I've chosen to constrain the ElementFactory to always produce an Element # because that is how almost everyone will use it. # Unfortunately, the type of the factory arguments is dependent on how # TreeBuilder is called by client code (they could pass strs, bytes or whatever); # but we don't want to use a too-broad type, or it would be too hard to write # elementfactories. _ElementFactory = Callable[[Any, Dict[Any, Any]], Element] class TreeBuilder: def __init__(self, element_factory: Optional[_ElementFactory] = ...) -> None: ... def close(self) -> Element: ... def data(self, data: _parser_input_type) -> None: ... def start(self, tag: _parser_input_type, attrs: Dict[_parser_input_type, _parser_input_type]) -> Element: ... def end(self, tag: _parser_input_type) -> Element: ... if sys.version_info >= (3, 8): class C14NWriterTarget: def __init__( self, write: Callable[[str], Any], *, with_comments: bool = ..., strip_text: bool = ..., rewrite_prefixes: bool = ..., qname_aware_tags: Optional[Iterable[str]] = ..., qname_aware_attrs: Optional[Iterable[str]] = ..., exclude_attrs: Optional[Iterable[str]] = ..., exclude_tags: Optional[Iterable[str]] = ..., ) -> None: ... class XMLParser: parser: Any target: TreeBuilder # TODO-what is entity used for??? entity: Any version: str if sys.version_info >= (3, 8): def __init__(self, *, target: Optional[TreeBuilder] = ..., encoding: Optional[str] = ...) -> None: ... else: def __init__(self, html: int = ..., target: Optional[TreeBuilder] = ..., encoding: Optional[str] = ...) -> None: ... def doctype(self, name: str, pubid: str, system: str) -> None: ... def close(self) -> Element: ... def feed(self, data: _parser_input_type) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/etree/ElementPath.pyi0000664000175000017500000000310313577124116026516 0ustar davedave00000000000000# Stubs for xml.etree.ElementPath (Python 3.4) from typing import Pattern, Dict, Generator, Tuple, List, Union, TypeVar, Callable, Optional from xml.etree.ElementTree import Element xpath_tokenizer_re: Pattern[str] _token = Tuple[str, str] _next = Callable[[], _token] _callback = Callable[[_SelectorContext, List[Element]], Generator[Element, None, None]] def xpath_tokenizer(pattern: str, namespaces: Optional[Dict[str, str]] = ...) -> Generator[_token, None, None]: ... def get_parent_map(context: _SelectorContext) -> Dict[Element, Element]: ... def prepare_child(next: _next, token: _token) -> _callback: ... def prepare_star(next: _next, token: _token) -> _callback: ... def prepare_self(next: _next, token: _token) -> _callback: ... def prepare_descendant(next: _next, token: _token) -> _callback: ... def prepare_parent(next: _next, token: _token) -> _callback: ... def prepare_predicate(next: _next, token: _token) -> _callback: ... ops: Dict[str, Callable[[_next, _token], _callback]] class _SelectorContext: parent_map: Dict[Element, Element] root: Element def __init__(self, root: Element) -> None: ... _T = TypeVar('_T') def iterfind(elem: Element, path: str, namespaces: Optional[Dict[str, str]] = ...) -> List[Element]: ... def find(elem: Element, path: str, namespaces: Optional[Dict[str, str]] = ...) -> Optional[Element]: ... def findall(elem: Element, path: str, namespaces: Optional[Dict[str, str]] = ...) -> List[Element]: ... def findtext(elem: Element, path: str, default: Optional[_T] = ..., namespaces: Optional[Dict[str, str]] = ...) -> Union[_T, str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/etree/cElementTree.pyi0000664000175000017500000000014313577124116026665 0ustar davedave00000000000000# Stubs for xml.etree.cElementTree (Python 3.4) from xml.etree.ElementTree import * # noqa: F403 jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/sax/0000775000175000017500000000000013577125145023262 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/sax/__init__.pyi0000664000175000017500000000255513577124116025550 0ustar davedave00000000000000from typing import Any, List, NoReturn, Optional, Text, Union, IO import xml.sax from xml.sax.xmlreader import InputSource, Locator from xml.sax.handler import ContentHandler, ErrorHandler class SAXException(Exception): def __init__(self, msg: str, exception: Optional[Exception] = ...) -> None: ... def getMessage(self) -> str: ... def getException(self) -> Exception: ... def __getitem__(self, ix: Any) -> NoReturn: ... class SAXParseException(SAXException): def __init__(self, msg: str, exception: Exception, locator: Locator) -> None: ... def getColumnNumber(self) -> int: ... def getLineNumber(self) -> int: ... def getPublicId(self): ... def getSystemId(self): ... class SAXNotRecognizedException(SAXException): ... class SAXNotSupportedException(SAXException): ... class SAXReaderNotAvailable(SAXNotSupportedException): ... default_parser_list: List[str] def make_parser(parser_list: List[str] = ...) -> xml.sax.xmlreader.XMLReader: ... def parse(source: Union[str, IO[str]], handler: xml.sax.handler.ContentHandler, errorHandler: xml.sax.handler.ErrorHandler = ...) -> None: ... def parseString(string: Union[bytes, Text], handler: xml.sax.handler.ContentHandler, errorHandler: Optional[xml.sax.handler.ErrorHandler] = ...) -> None: ... def _create_parser(parser_name: str) -> xml.sax.xmlreader.XMLReader: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/sax/saxutils.pyi0000664000175000017500000000446513577124116025667 0ustar davedave00000000000000import sys from typing import Mapping, Text from xml.sax import handler from xml.sax import xmlreader def escape(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ... def unescape(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ... def quoteattr(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ... class XMLGenerator(handler.ContentHandler): if sys.version_info >= (3, 0): def __init__(self, out=..., encoding=..., short_empty_elements: bool = ...) -> None: ... else: def __init__(self, out=..., encoding=...) -> None: ... def startDocument(self): ... def endDocument(self): ... def startPrefixMapping(self, prefix, uri): ... def endPrefixMapping(self, prefix): ... def startElement(self, name, attrs): ... def endElement(self, name): ... def startElementNS(self, name, qname, attrs): ... def endElementNS(self, name, qname): ... def characters(self, content): ... def ignorableWhitespace(self, content): ... def processingInstruction(self, target, data): ... class XMLFilterBase(xmlreader.XMLReader): def __init__(self, parent=...) -> None: ... def error(self, exception): ... def fatalError(self, exception): ... def warning(self, exception): ... def setDocumentLocator(self, locator): ... def startDocument(self): ... def endDocument(self): ... def startPrefixMapping(self, prefix, uri): ... def endPrefixMapping(self, prefix): ... def startElement(self, name, attrs): ... def endElement(self, name): ... def startElementNS(self, name, qname, attrs): ... def endElementNS(self, name, qname): ... def characters(self, content): ... def ignorableWhitespace(self, chars): ... def processingInstruction(self, target, data): ... def skippedEntity(self, name): ... def notationDecl(self, name, publicId, systemId): ... def unparsedEntityDecl(self, name, publicId, systemId, ndata): ... def resolveEntity(self, publicId, systemId): ... def parse(self, source): ... def setLocale(self, locale): ... def getFeature(self, name): ... def setFeature(self, name, state): ... def getProperty(self, name): ... def setProperty(self, name, value): ... def getParent(self): ... def setParent(self, parent): ... def prepare_input_source(source, base=...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/sax/handler.pyi0000664000175000017500000000255713577124116025430 0ustar davedave00000000000000from typing import Any version: Any class ErrorHandler: def error(self, exception): ... def fatalError(self, exception): ... def warning(self, exception): ... class ContentHandler: def __init__(self) -> None: ... def setDocumentLocator(self, locator): ... def startDocument(self): ... def endDocument(self): ... def startPrefixMapping(self, prefix, uri): ... def endPrefixMapping(self, prefix): ... def startElement(self, name, attrs): ... def endElement(self, name): ... def startElementNS(self, name, qname, attrs): ... def endElementNS(self, name, qname): ... def characters(self, content): ... def ignorableWhitespace(self, whitespace): ... def processingInstruction(self, target, data): ... def skippedEntity(self, name): ... class DTDHandler: def notationDecl(self, name, publicId, systemId): ... def unparsedEntityDecl(self, name, publicId, systemId, ndata): ... class EntityResolver: def resolveEntity(self, publicId, systemId): ... feature_namespaces: Any feature_namespace_prefixes: Any feature_string_interning: Any feature_validation: Any feature_external_ges: Any feature_external_pes: Any all_features: Any property_lexical_handler: Any property_declaration_handler: Any property_dom_node: Any property_xml_string: Any property_encoding: Any property_interning_dict: Any all_properties: Any jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/sax/xmlreader.pyi0000664000175000017500000000442713577124116025774 0ustar davedave00000000000000class XMLReader: def __init__(self) -> None: ... def parse(self, source): ... def getContentHandler(self): ... def setContentHandler(self, handler): ... def getDTDHandler(self): ... def setDTDHandler(self, handler): ... def getEntityResolver(self): ... def setEntityResolver(self, resolver): ... def getErrorHandler(self): ... def setErrorHandler(self, handler): ... def setLocale(self, locale): ... def getFeature(self, name): ... def setFeature(self, name, state): ... def getProperty(self, name): ... def setProperty(self, name, value): ... class IncrementalParser(XMLReader): def __init__(self, bufsize=...) -> None: ... def parse(self, source): ... def feed(self, data): ... def prepareParser(self, source): ... def close(self): ... def reset(self): ... class Locator: def getColumnNumber(self): ... def getLineNumber(self): ... def getPublicId(self): ... def getSystemId(self): ... class InputSource: def __init__(self, system_id=...) -> None: ... def setPublicId(self, public_id): ... def getPublicId(self): ... def setSystemId(self, system_id): ... def getSystemId(self): ... def setEncoding(self, encoding): ... def getEncoding(self): ... def setByteStream(self, bytefile): ... def getByteStream(self): ... def setCharacterStream(self, charfile): ... def getCharacterStream(self): ... class AttributesImpl: def __init__(self, attrs) -> None: ... def getLength(self): ... def getType(self, name): ... def getValue(self, name): ... def getValueByQName(self, name): ... def getNameByQName(self, name): ... def getQNameByName(self, name): ... def getNames(self): ... def getQNames(self): ... def __len__(self): ... def __getitem__(self, name): ... def keys(self): ... def has_key(self, name): ... def __contains__(self, name): ... def get(self, name, alternative=...): ... def copy(self): ... def items(self): ... def values(self): ... class AttributesNSImpl(AttributesImpl): def __init__(self, attrs, qnames) -> None: ... def getValueByQName(self, name): ... def getNameByQName(self, name): ... def getQNameByName(self, name): ... def getQNames(self): ... def copy(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/parsers/0000775000175000017500000000000013577125145024146 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/parsers/__init__.pyi0000664000175000017500000000004213577124116026421 0ustar davedave00000000000000import xml.parsers.expat as expat jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/0000775000175000017500000000000013577125145025267 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/__init__.pyi0000664000175000017500000000002613577124116027544 0ustar davedave00000000000000from pyexpat import * jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/model.pyi0000664000175000017500000000003413577124116027104 0ustar davedave00000000000000from pyexpat.model import * jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/xml/parsers/expat/errors.pyi0000664000175000017500000000003513577124116027321 0ustar davedave00000000000000from pyexpat.errors import * jedi-0.15.2/jedi/third_party/typeshed/stdlib/2and3/sysconfig.pyi0000664000175000017500000000155113577124116024415 0ustar davedave00000000000000# Stubs for sysconfig from typing import overload, Any, Dict, IO, List, Optional, Tuple, Union @overload def get_config_vars() -> Dict[str, Any]: ... @overload def get_config_vars(arg: str, *args: str) -> List[Any]: ... def get_config_var(name: str) -> Optional[str]: ... def get_scheme_names() -> Tuple[str, ...]: ... def get_path_names() -> Tuple[str, ...]: ... def get_path(name: str, scheme: str = ..., vars: Optional[Dict[str, Any]] = ..., expand: bool = ...) -> Optional[str]: ... def get_paths(scheme: str = ..., vars: Optional[Dict[str, Any]] = ..., expand: bool = ...) -> Dict[str, str]: ... def get_python_version() -> str: ... def get_platform() -> str: ... def is_python_build() -> bool: ... def parse_config_h(fp: IO[Any], vars: Optional[Dict[str, Any]]) -> Dict[str, Any]: ... def get_config_h_filename() -> str: ... def get_makefile_filename() -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3.7/0000775000175000017500000000000013577125145021267 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3.7/contextvars.pyi0000664000175000017500000000214313577124116024367 0ustar davedave00000000000000from typing import Any, Callable, ClassVar, Generic, Iterator, Mapping, TypeVar _T = TypeVar('_T') class ContextVar(Generic[_T]): def __init__(self, name: str, *, default: _T = ...) -> None: ... @property def name(self) -> str: ... def get(self, default: _T = ...) -> _T: ... def set(self, value: _T) -> Token[_T]: ... def reset(self, token: Token[_T]) -> None: ... class Token(Generic[_T]): @property def var(self) -> ContextVar[_T]: ... @property def old_value(self) -> Any: ... # returns either _T or MISSING, but that's hard to express MISSING: ClassVar[object] def copy_context() -> Context: ... # It doesn't make sense to make this generic, because for most Contexts each ContextVar will have # a different value. class Context(Mapping[ContextVar[Any], Any]): def __init__(self) -> None: ... def run(self, callable: Callable[..., _T], *args: Any, **kwargs: Any) -> _T: ... def copy(self) -> Context: ... def __getitem__(self, key: ContextVar[Any]) -> Any: ... def __iter__(self) -> Iterator[ContextVar[Any]]: ... def __len__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3.7/dataclasses.pyi0000664000175000017500000000450313577124116024300 0ustar davedave00000000000000from typing import overload, Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union _T = TypeVar('_T') class _MISSING_TYPE: ... MISSING: _MISSING_TYPE @overload def asdict(obj: Any) -> Dict[str, Any]: ... @overload def asdict(obj: Any, *, dict_factory: Callable[[List[Tuple[str, Any]]], _T]) -> _T: ... @overload def astuple(obj: Any) -> Tuple[Any, ...]: ... @overload def astuple(obj: Any, *, tuple_factory: Callable[[List[Any]], _T]) -> _T: ... @overload def dataclass(_cls: Type[_T]) -> Type[_T]: ... @overload def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ... class Field(Generic[_T]): name: str type: Type[_T] default: _T default_factory: Callable[[], _T] repr: bool hash: Optional[bool] init: bool compare: bool metadata: Mapping[str, Any] # NOTE: Actual return type is 'Field[_T]', but we want to help type checkers # to understand the magic that happens at runtime. @overload # `default` and `default_factory` are optional and mutually exclusive. def field(*, default: _T, init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ..., metadata: Optional[Mapping[str, Any]] = ...) -> _T: ... @overload def field(*, default_factory: Callable[[], _T], init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ..., metadata: Optional[Mapping[str, Any]] = ...) -> _T: ... @overload def field(*, init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ..., metadata: Optional[Mapping[str, Any]] = ...) -> Any: ... def fields(class_or_instance: Any) -> Tuple[Field[Any], ...]: ... def is_dataclass(obj: Any) -> bool: ... class FrozenInstanceError(AttributeError): ... class InitVar(Generic[_T]): ... def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *, bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ..., init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ..., frozen: bool = ...): ... def replace(obj: _T, **changes: Any) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/0000775000175000017500000000000013577125145021121 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/UserList.pyi0000664000175000017500000000116613577124116023417 0ustar davedave00000000000000from typing import Iterable, MutableSequence, TypeVar, Union, overload, List _T = TypeVar("_T") _S = TypeVar("_S") class UserList(MutableSequence[_T]): data: List[_T] def insert(self, index: int, object: _T) -> None: ... @overload def __setitem__(self, i: int, o: _T) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... def __len__(self) -> int: ... @overload def __getitem__(self, i: int) -> _T: ... @overload def __getitem__(self: _S, s: slice) -> _S: ... def sort(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/urllib.pyi0000664000175000017500000001123613577124116023135 0ustar davedave00000000000000from typing import Any, AnyStr, IO, List, Mapping, Sequence, Text, Tuple, TypeVar, Union def url2pathname(pathname: AnyStr) -> AnyStr: ... def pathname2url(pathname: AnyStr) -> AnyStr: ... def urlopen(url: str, data=..., proxies: Mapping[str, str] = ..., context=...) -> IO[Any]: ... def urlretrieve(url, filename=..., reporthook=..., data=..., context=...): ... def urlcleanup() -> None: ... class ContentTooShortError(IOError): content: Any def __init__(self, message, content) -> None: ... class URLopener: version: Any proxies: Any key_file: Any cert_file: Any context: Any addheaders: Any tempcache: Any ftpcache: Any def __init__(self, proxies: Mapping[str, str] = ..., context=..., **x509) -> None: ... def __del__(self): ... def close(self): ... def cleanup(self): ... def addheader(self, *args): ... type: Any def open(self, fullurl: str, data=...): ... def open_unknown(self, fullurl, data=...): ... def open_unknown_proxy(self, proxy, fullurl, data=...): ... def retrieve(self, url, filename=..., reporthook=..., data=...): ... def open_http(self, url, data=...): ... def http_error(self, url, fp, errcode, errmsg, headers, data=...): ... def http_error_default(self, url, fp, errcode, errmsg, headers): ... def open_https(self, url, data=...): ... def open_file(self, url): ... def open_local_file(self, url): ... def open_ftp(self, url): ... def open_data(self, url, data=...): ... class FancyURLopener(URLopener): auth_cache: Any tries: Any maxtries: Any def __init__(self, *args, **kwargs) -> None: ... def http_error_default(self, url, fp, errcode, errmsg, headers): ... def http_error_302(self, url, fp, errcode, errmsg, headers, data=...): ... def redirect_internal(self, url, fp, errcode, errmsg, headers, data): ... def http_error_301(self, url, fp, errcode, errmsg, headers, data=...): ... def http_error_303(self, url, fp, errcode, errmsg, headers, data=...): ... def http_error_307(self, url, fp, errcode, errmsg, headers, data=...): ... def http_error_401(self, url, fp, errcode, errmsg, headers, data=...): ... def http_error_407(self, url, fp, errcode, errmsg, headers, data=...): ... def retry_proxy_http_basic_auth(self, url, realm, data=...): ... def retry_proxy_https_basic_auth(self, url, realm, data=...): ... def retry_http_basic_auth(self, url, realm, data=...): ... def retry_https_basic_auth(self, url, realm, data=...): ... def get_user_passwd(self, host, realm, clear_cache=...): ... def prompt_user_passwd(self, host, realm): ... class ftpwrapper: user: Any passwd: Any host: Any port: Any dirs: Any timeout: Any refcount: Any keepalive: Any def __init__(self, user, passwd, host, port, dirs, timeout=..., persistent=...) -> None: ... busy: Any ftp: Any def init(self): ... def retrfile(self, file, type): ... def endtransfer(self): ... def close(self): ... def file_close(self): ... def real_close(self): ... _AIUT = TypeVar("_AIUT", bound=addbase) class addbase: fp: Any def read(self, n: int = ...) -> bytes: ... def readline(self, limit: int = ...) -> bytes: ... def readlines(self, hint: int = ...) -> List[bytes]: ... def fileno(self) -> int: ... # Optional[int], but that is rare def __iter__(self: _AIUT) -> _AIUT: ... def next(self) -> bytes: ... def __init__(self, fp) -> None: ... def close(self) -> None: ... class addclosehook(addbase): closehook: Any hookargs: Any def __init__(self, fp, closehook, *hookargs) -> None: ... def close(self): ... class addinfo(addbase): headers: Any def __init__(self, fp, headers) -> None: ... def info(self): ... class addinfourl(addbase): headers: Any url: Any code: Any def __init__(self, fp, headers, url, code=...) -> None: ... def info(self): ... def getcode(self): ... def geturl(self): ... def unwrap(url): ... def splittype(url): ... def splithost(url): ... def splituser(host): ... def splitpasswd(user): ... def splitport(host): ... def splitnport(host, defport=...): ... def splitquery(url): ... def splittag(url): ... def splitattr(url): ... def splitvalue(attr): ... def unquote(s: AnyStr) -> AnyStr: ... def unquote_plus(s: AnyStr) -> AnyStr: ... def quote(s: AnyStr, safe: Text = ...) -> AnyStr: ... def quote_plus(s: AnyStr, safe: Text = ...) -> AnyStr: ... def urlencode(query: Union[Sequence[Tuple[Any, Any]], Mapping[Any, Any]], doseq=...) -> str: ... def getproxies() -> Mapping[str, str]: ... def proxy_bypass(host: str) -> Any: ... # Undocumented # Names in __all__ with no definition: # basejoin jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_socket.pyi0000664000175000017500000001424513577124116023276 0ustar davedave00000000000000from typing import Tuple, Union, IO, Any, Optional, overload AF_APPLETALK: int AF_ASH: int AF_ATMPVC: int AF_ATMSVC: int AF_AX25: int AF_BLUETOOTH: int AF_BRIDGE: int AF_DECnet: int AF_ECONET: int AF_INET: int AF_INET6: int AF_IPX: int AF_IRDA: int AF_KEY: int AF_LLC: int AF_NETBEUI: int AF_NETLINK: int AF_NETROM: int AF_PACKET: int AF_PPPOX: int AF_ROSE: int AF_ROUTE: int AF_SECURITY: int AF_SNA: int AF_TIPC: int AF_UNIX: int AF_UNSPEC: int AF_WANPIPE: int AF_X25: int AI_ADDRCONFIG: int AI_ALL: int AI_CANONNAME: int AI_NUMERICHOST: int AI_NUMERICSERV: int AI_PASSIVE: int AI_V4MAPPED: int BDADDR_ANY: str BDADDR_LOCAL: str BTPROTO_HCI: int BTPROTO_L2CAP: int BTPROTO_RFCOMM: int BTPROTO_SCO: int EAI_ADDRFAMILY: int EAI_AGAIN: int EAI_BADFLAGS: int EAI_FAIL: int EAI_FAMILY: int EAI_MEMORY: int EAI_NODATA: int EAI_NONAME: int EAI_OVERFLOW: int EAI_SERVICE: int EAI_SOCKTYPE: int EAI_SYSTEM: int EBADF: int EINTR: int HCI_DATA_DIR: int HCI_FILTER: int HCI_TIME_STAMP: int INADDR_ALLHOSTS_GROUP: int INADDR_ANY: int INADDR_BROADCAST: int INADDR_LOOPBACK: int INADDR_MAX_LOCAL_GROUP: int INADDR_NONE: int INADDR_UNSPEC_GROUP: int IPPORT_RESERVED: int IPPORT_USERRESERVED: int IPPROTO_AH: int IPPROTO_DSTOPTS: int IPPROTO_EGP: int IPPROTO_ESP: int IPPROTO_FRAGMENT: int IPPROTO_GRE: int IPPROTO_HOPOPTS: int IPPROTO_ICMP: int IPPROTO_ICMPV6: int IPPROTO_IDP: int IPPROTO_IGMP: int IPPROTO_IP: int IPPROTO_IPIP: int IPPROTO_IPV6: int IPPROTO_NONE: int IPPROTO_PIM: int IPPROTO_PUP: int IPPROTO_RAW: int IPPROTO_ROUTING: int IPPROTO_RSVP: int IPPROTO_TCP: int IPPROTO_TP: int IPPROTO_UDP: int IPV6_CHECKSUM: int IPV6_DSTOPTS: int IPV6_HOPLIMIT: int IPV6_HOPOPTS: int IPV6_JOIN_GROUP: int IPV6_LEAVE_GROUP: int IPV6_MULTICAST_HOPS: int IPV6_MULTICAST_IF: int IPV6_MULTICAST_LOOP: int IPV6_NEXTHOP: int IPV6_PKTINFO: int IPV6_RECVDSTOPTS: int IPV6_RECVHOPLIMIT: int IPV6_RECVHOPOPTS: int IPV6_RECVPKTINFO: int IPV6_RECVRTHDR: int IPV6_RECVTCLASS: int IPV6_RTHDR: int IPV6_RTHDRDSTOPTS: int IPV6_RTHDR_TYPE_0: int IPV6_TCLASS: int IPV6_UNICAST_HOPS: int IPV6_V6ONLY: int IP_ADD_MEMBERSHIP: int IP_DEFAULT_MULTICAST_LOOP: int IP_DEFAULT_MULTICAST_TTL: int IP_DROP_MEMBERSHIP: int IP_HDRINCL: int IP_MAX_MEMBERSHIPS: int IP_MULTICAST_IF: int IP_MULTICAST_LOOP: int IP_MULTICAST_TTL: int IP_OPTIONS: int IP_RECVOPTS: int IP_RECVRETOPTS: int IP_RETOPTS: int IP_TOS: int IP_TTL: int MSG_CTRUNC: int MSG_DONTROUTE: int MSG_DONTWAIT: int MSG_EOR: int MSG_OOB: int MSG_PEEK: int MSG_TRUNC: int MSG_WAITALL: int MethodType: type NETLINK_DNRTMSG: int NETLINK_FIREWALL: int NETLINK_IP6_FW: int NETLINK_NFLOG: int NETLINK_ROUTE: int NETLINK_USERSOCK: int NETLINK_XFRM: int NI_DGRAM: int NI_MAXHOST: int NI_MAXSERV: int NI_NAMEREQD: int NI_NOFQDN: int NI_NUMERICHOST: int NI_NUMERICSERV: int PACKET_BROADCAST: int PACKET_FASTROUTE: int PACKET_HOST: int PACKET_LOOPBACK: int PACKET_MULTICAST: int PACKET_OTHERHOST: int PACKET_OUTGOING: int PF_PACKET: int SHUT_RD: int SHUT_RDWR: int SHUT_WR: int SOCK_DGRAM: int SOCK_RAW: int SOCK_RDM: int SOCK_SEQPACKET: int SOCK_STREAM: int SOL_HCI: int SOL_IP: int SOL_SOCKET: int SOL_TCP: int SOL_TIPC: int SOL_UDP: int SOMAXCONN: int SO_ACCEPTCONN: int SO_BROADCAST: int SO_DEBUG: int SO_DONTROUTE: int SO_ERROR: int SO_KEEPALIVE: int SO_LINGER: int SO_OOBINLINE: int SO_RCVBUF: int SO_RCVLOWAT: int SO_RCVTIMEO: int SO_REUSEADDR: int SO_REUSEPORT: int SO_SNDBUF: int SO_SNDLOWAT: int SO_SNDTIMEO: int SO_TYPE: int SSL_ERROR_EOF: int SSL_ERROR_INVALID_ERROR_CODE: int SSL_ERROR_SSL: int SSL_ERROR_SYSCALL: int SSL_ERROR_WANT_CONNECT: int SSL_ERROR_WANT_READ: int SSL_ERROR_WANT_WRITE: int SSL_ERROR_WANT_X509_LOOKUP: int SSL_ERROR_ZERO_RETURN: int TCP_CORK: int TCP_DEFER_ACCEPT: int TCP_INFO: int TCP_KEEPCNT: int TCP_KEEPIDLE: int TCP_KEEPINTVL: int TCP_LINGER2: int TCP_MAXSEG: int TCP_NODELAY: int TCP_QUICKACK: int TCP_SYNCNT: int TCP_WINDOW_CLAMP: int TIPC_ADDR_ID: int TIPC_ADDR_NAME: int TIPC_ADDR_NAMESEQ: int TIPC_CFG_SRV: int TIPC_CLUSTER_SCOPE: int TIPC_CONN_TIMEOUT: int TIPC_CRITICAL_IMPORTANCE: int TIPC_DEST_DROPPABLE: int TIPC_HIGH_IMPORTANCE: int TIPC_IMPORTANCE: int TIPC_LOW_IMPORTANCE: int TIPC_MEDIUM_IMPORTANCE: int TIPC_NODE_SCOPE: int TIPC_PUBLISHED: int TIPC_SRC_DROPPABLE: int TIPC_SUBSCR_TIMEOUT: int TIPC_SUB_CANCEL: int TIPC_SUB_PORTS: int TIPC_SUB_SERVICE: int TIPC_TOP_SRV: int TIPC_WAIT_FOREVER: int TIPC_WITHDRAWN: int TIPC_ZONE_SCOPE: int # PyCapsule CAPI: Any has_ipv6: bool class error(IOError): ... class gaierror(error): ... class timeout(error): ... class SocketType(object): family: int type: int proto: int timeout: float def __init__(self, family: int = ..., type: int = ..., proto: int = ...) -> None: ... def accept(self) -> Tuple[SocketType, Tuple[Any, ...]]: ... def bind(self, address: Tuple[Any, ...]) -> None: ... def close(self) -> None: ... def connect(self, address: Tuple[Any, ...]) -> None: ... def connect_ex(self, address: Tuple[Any, ...]) -> int: ... def dup(self) -> SocketType: ... def fileno(self) -> int: ... def getpeername(self) -> Tuple[Any, ...]: ... def getsockname(self) -> Tuple[Any, ...]: ... def getsockopt(self, level: int, option: int, buffersize: int = ...) -> str: ... def gettimeout(self) -> float: ... def listen(self, backlog: int) -> None: ... def makefile(self, mode: str = ..., buffersize: int = ...) -> IO[Any]: ... def recv(self, buffersize: int, flags: int = ...) -> str: ... def recv_into(self, buffer: bytearray, nbytes: int = ..., flags: int = ...) -> int: ... def recvfrom(self, buffersize: int, flags: int = ...) -> Tuple[Any, ...]: ... def recvfrom_into(self, buffer: bytearray, nbytes: int = ..., flags: int = ...) -> int: ... def send(self, data: str, flags: int = ...) -> int: ... def sendall(self, data: str, flags: int = ...) -> None: ... @overload def sendto(self, data: str, address: Tuple[Any, ...]) -> int: ... @overload def sendto(self, data: str, flags: int, address: Tuple[Any, ...]) -> int: ... def setblocking(self, flag: bool) -> None: ... def setsockopt(self, level: int, option: int, value: Union[int, str]) -> None: ... def settimeout(self, value: Optional[float]) -> None: ... def shutdown(self, flag: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/tempfile.pyi0000664000175000017500000000725613577124116023460 0ustar davedave00000000000000from typing import Any, AnyStr, IO, Iterable, Iterator, List, Optional, overload, Text, Tuple, Union from thread import LockType from random import Random TMP_MAX: int tempdir: str template: str _name_sequence: Optional[_RandomNameSequence] class _RandomNameSequence: characters: str = ... mutex: LockType @property def rng(self) -> Random: ... def __iter__(self) -> _RandomNameSequence: ... def next(self) -> str: ... # from os.path: def normcase(self, path: AnyStr) -> AnyStr: ... class _TemporaryFileWrapper(IO[str]): delete: bool file: IO[str] name: Any def __init__(self, file: IO[str], name: Any, delete: bool = ...) -> None: ... def __del__(self) -> None: ... def __enter__(self) -> _TemporaryFileWrapper: ... def __exit__(self, exc, value, tb) -> Optional[bool]: ... def __getattr__(self, name: unicode) -> Any: ... def close(self) -> None: ... def unlink(self, path: unicode) -> None: ... # These methods don't exist directly on this object, but # are delegated to the underlying IO object through __getattr__. # We need to add them here so that this class is concrete. def __iter__(self) -> Iterator[str]: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def next(self) -> str: ... def read(self, n: int = ...) -> str: ... def readable(self) -> bool: ... def readline(self, limit: int = ...) -> str: ... def readlines(self, hint: int = ...) -> List[str]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... def write(self, s: Text) -> int: ... def writelines(self, lines: Iterable[str]) -> None: ... # TODO text files def TemporaryFile( mode: Union[bytes, unicode] = ..., bufsize: int = ..., suffix: Union[bytes, unicode] = ..., prefix: Union[bytes, unicode] = ..., dir: Union[bytes, unicode] = ... ) -> _TemporaryFileWrapper: ... def NamedTemporaryFile( mode: Union[bytes, unicode] = ..., bufsize: int = ..., suffix: Union[bytes, unicode] = ..., prefix: Union[bytes, unicode] = ..., dir: Union[bytes, unicode] = ..., delete: bool = ... ) -> _TemporaryFileWrapper: ... def SpooledTemporaryFile( max_size: int = ..., mode: Union[bytes, unicode] = ..., buffering: int = ..., suffix: Union[bytes, unicode] = ..., prefix: Union[bytes, unicode] = ..., dir: Union[bytes, unicode] = ... ) -> _TemporaryFileWrapper: ... class TemporaryDirectory: name: Any def __init__(self, suffix: Union[bytes, unicode] = ..., prefix: Union[bytes, unicode] = ..., dir: Union[bytes, unicode] = ...) -> None: ... def cleanup(self) -> None: ... def __enter__(self) -> Any: ... # Can be str or unicode def __exit__(self, type, value, traceback) -> None: ... @overload def mkstemp() -> Tuple[int, str]: ... @overload def mkstemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: Optional[AnyStr] = ..., text: bool = ...) -> Tuple[int, AnyStr]: ... @overload def mkdtemp() -> str: ... @overload def mkdtemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: Optional[AnyStr] = ...) -> AnyStr: ... @overload def mktemp() -> str: ... @overload def mktemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: Optional[AnyStr] = ...) -> AnyStr: ... def gettempdir() -> str: ... def gettempprefix() -> str: ... def _candidate_tempdir_list() -> List[str]: ... def _get_candidate_names() -> Optional[_RandomNameSequence]: ... def _get_default_tempdir() -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/cookielib.pyi0000664000175000017500000001065113577124116023604 0ustar davedave00000000000000from typing import Any, Optional class Cookie: version: Any name: Any value: Any port: Any port_specified: Any domain: Any domain_specified: Any domain_initial_dot: Any path: Any path_specified: Any secure: Any expires: Any discard: Any comment: Any comment_url: Any rfc2109: Any def __init__(self, version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109: bool = ...): ... def has_nonstandard_attr(self, name): ... def get_nonstandard_attr(self, name, default: Optional[Any] = ...): ... def set_nonstandard_attr(self, name, value): ... def is_expired(self, now: Optional[Any] = ...): ... class CookiePolicy: def set_ok(self, cookie, request): ... def return_ok(self, cookie, request): ... def domain_return_ok(self, domain, request): ... def path_return_ok(self, path, request): ... class DefaultCookiePolicy(CookiePolicy): DomainStrictNoDots: Any DomainStrictNonDomain: Any DomainRFC2965Match: Any DomainLiberal: Any DomainStrict: Any netscape: Any rfc2965: Any rfc2109_as_netscape: Any hide_cookie2: Any strict_domain: Any strict_rfc2965_unverifiable: Any strict_ns_unverifiable: Any strict_ns_domain: Any strict_ns_set_initial_dollar: Any strict_ns_set_path: Any def __init__(self, blocked_domains: Optional[Any] = ..., allowed_domains: Optional[Any] = ..., netscape: bool = ..., rfc2965: bool = ..., rfc2109_as_netscape: Optional[Any] = ..., hide_cookie2: bool = ..., strict_domain: bool = ..., strict_rfc2965_unverifiable: bool = ..., strict_ns_unverifiable: bool = ..., strict_ns_domain=..., strict_ns_set_initial_dollar: bool = ..., strict_ns_set_path: bool = ...): ... def blocked_domains(self): ... def set_blocked_domains(self, blocked_domains): ... def is_blocked(self, domain): ... def allowed_domains(self): ... def set_allowed_domains(self, allowed_domains): ... def is_not_allowed(self, domain): ... def set_ok(self, cookie, request): ... def set_ok_version(self, cookie, request): ... def set_ok_verifiability(self, cookie, request): ... def set_ok_name(self, cookie, request): ... def set_ok_path(self, cookie, request): ... def set_ok_domain(self, cookie, request): ... def set_ok_port(self, cookie, request): ... def return_ok(self, cookie, request): ... def return_ok_version(self, cookie, request): ... def return_ok_verifiability(self, cookie, request): ... def return_ok_secure(self, cookie, request): ... def return_ok_expires(self, cookie, request): ... def return_ok_port(self, cookie, request): ... def return_ok_domain(self, cookie, request): ... def domain_return_ok(self, domain, request): ... def path_return_ok(self, path, request): ... class Absent: ... class CookieJar: non_word_re: Any quote_re: Any strict_domain_re: Any domain_re: Any dots_re: Any magic_re: Any def __init__(self, policy: Optional[Any] = ...): ... def set_policy(self, policy): ... def add_cookie_header(self, request): ... def make_cookies(self, response, request): ... def set_cookie_if_ok(self, cookie, request): ... def set_cookie(self, cookie): ... def extract_cookies(self, response, request): ... def clear(self, domain: Optional[Any] = ..., path: Optional[Any] = ..., name: Optional[Any] = ...): ... def clear_session_cookies(self): ... def clear_expired_cookies(self): ... def __iter__(self): ... def __len__(self): ... class LoadError(IOError): ... class FileCookieJar(CookieJar): filename: Any delayload: Any def __init__(self, filename: Optional[Any] = ..., delayload: bool = ..., policy: Optional[Any] = ...): ... def save(self, filename: Optional[Any] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...): ... def load(self, filename: Optional[Any] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...): ... def revert(self, filename: Optional[Any] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...): ... class LWPCookieJar(FileCookieJar): def as_lwp_str(self, ignore_discard: bool = ..., ignore_expires: bool = ...) -> str: ... # undocumented MozillaCookieJar = FileCookieJar def lwp_cookie_str(cookie: Cookie) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/encodings/0000775000175000017500000000000013577125145023072 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/encodings/__init__.pyi0000664000175000017500000000013613577124116025351 0ustar davedave00000000000000import codecs import typing def search_function(encoding: str) -> codecs.CodecInfo: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/encodings/utf_8.pyi0000664000175000017500000000107513577124116024642 0ustar davedave00000000000000import codecs from typing import Text, Tuple class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input: Text, final: bool = ...) -> bytes: ... class IncrementalDecoder(codecs.BufferedIncrementalDecoder): def _buffer_decode(self, input: bytes, errors: str, final: bool) -> Tuple[Text, int]: ... class StreamWriter(codecs.StreamWriter): ... class StreamReader(codecs.StreamReader): ... def getregentry() -> codecs.CodecInfo: ... def encode(input: Text, errors: Text = ...) -> bytes: ... def decode(input: bytes, errors: Text = ...) -> Text: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/ConfigParser.pyi0000664000175000017500000000745213577124116024233 0ustar davedave00000000000000from typing import Any, IO, Sequence, Tuple, Union, List, Dict, Protocol, Optional DEFAULTSECT: str MAX_INTERPOLATION_DEPTH: int class Error(Exception): message: Any def __init__(self, msg: str = ...) -> None: ... def _get_message(self) -> None: ... def _set_message(self, value: str) -> None: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... class NoSectionError(Error): section: str def __init__(self, section: str) -> None: ... class DuplicateSectionError(Error): section: str def __init__(self, section: str) -> None: ... class NoOptionError(Error): section: str option: str def __init__(self, option: str, section: str) -> None: ... class InterpolationError(Error): section: str option: str msg: str def __init__(self, option: str, section: str, msg: str) -> None: ... class InterpolationMissingOptionError(InterpolationError): reference: str def __init__(self, option: str, section: str, rawval: str, reference: str) -> None: ... class InterpolationSyntaxError(InterpolationError): ... class InterpolationDepthError(InterpolationError): def __init__(self, option: str, section: str, rawval: str) -> None: ... class ParsingError(Error): filename: str errors: List[Tuple[Any, Any]] def __init__(self, filename: str) -> None: ... def append(self, lineno: Any, line: Any) -> None: ... class MissingSectionHeaderError(ParsingError): lineno: Any line: Any def __init__(self, filename: str, lineno: Any, line: Any) -> None: ... class _Readable(Protocol): def readline(self) -> str: ... class RawConfigParser: _dict: Any _sections: Dict[Any, Any] _defaults: Dict[Any, Any] _optcre: Any SECTCRE: Any OPTCRE: Any OPTCRE_NV: Any def __init__(self, defaults: Dict[Any, Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ... def defaults(self) -> Dict[Any, Any]: ... def sections(self) -> List[str]: ... def add_section(self, section: str) -> None: ... def has_section(self, section: str) -> bool: ... def options(self, section: str) -> List[str]: ... def read(self, filenames: Union[str, Sequence[str]]) -> List[str]: ... def readfp(self, fp: _Readable, filename: str = ...) -> None: ... def get(self, section: str, option: str) -> str: ... def items(self, section: str) -> List[Tuple[Any, Any]]: ... def _get(self, section: str, conv: type, option: str) -> Any: ... def getint(self, section: str, option: str) -> int: ... def getfloat(self, section: str, option: str) -> float: ... _boolean_states: Dict[str, bool] def getboolean(self, section: str, option: str) -> bool: ... def optionxform(self, optionstr: str) -> str: ... def has_option(self, section: str, option: str) -> bool: ... def set(self, section: str, option: str, value: Any = ...) -> None: ... def write(self, fp: IO[str]) -> None: ... def remove_option(self, section: str, option: Any) -> bool: ... def remove_section(self, section: str) -> bool: ... def _read(self, fp: IO[str], fpname: str) -> None: ... class ConfigParser(RawConfigParser): _KEYCRE: Any def get(self, section: str, option: str, raw: bool = ..., vars: Optional[Dict[Any, Any]] = ...) -> Any: ... def items(self, section: str, raw: bool = ..., vars: Optional[Dict[Any, Any]] = ...) -> List[Tuple[str, Any]]: ... def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ... def _interpolation_replace(self, match: Any) -> str: ... class SafeConfigParser(ConfigParser): _interpvar_re: Any def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ... def _interpolate_some( self, option: str, accum: List[Any], rest: str, section: str, map: Dict[Any, Any], depth: int, ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/rfc822.pyi0000664000175000017500000000427213577124116022654 0ustar davedave00000000000000# Stubs for rfc822 (Python 2) # # Based on stub generated by stubgen. from typing import Any, Optional class Message: fp: Any seekable: Any startofheaders: Any startofbody: Any def __init__(self, fp, seekable: int = ...): ... def rewindbody(self): ... dict: Any unixfrom: Any headers: Any status: Any def readheaders(self): ... def isheader(self, line): ... def islast(self, line): ... def iscomment(self, line): ... def getallmatchingheaders(self, name): ... def getfirstmatchingheader(self, name): ... def getrawheader(self, name): ... def getheader(self, name, default: Optional[Any] = ...): ... get: Any def getheaders(self, name): ... def getaddr(self, name): ... def getaddrlist(self, name): ... def getdate(self, name): ... def getdate_tz(self, name): ... def __len__(self): ... def __getitem__(self, name): ... def __setitem__(self, name, value): ... def __delitem__(self, name): ... def setdefault(self, name, default=...): ... def has_key(self, name): ... def __contains__(self, name): ... def __iter__(self): ... def keys(self): ... def values(self): ... def items(self): ... class AddrlistClass: specials: Any pos: Any LWS: Any CR: Any atomends: Any phraseends: Any field: Any commentlist: Any def __init__(self, field): ... def gotonext(self): ... def getaddrlist(self): ... def getaddress(self): ... def getrouteaddr(self): ... def getaddrspec(self): ... def getdomain(self): ... def getdelimited(self, beginchar, endchars, allowcomments: int = ...): ... def getquote(self): ... def getcomment(self): ... def getdomainliteral(self): ... def getatom(self, atomends: Optional[Any] = ...): ... def getphraselist(self): ... class AddressList(AddrlistClass): addresslist: Any def __init__(self, field): ... def __len__(self): ... def __add__(self, other): ... def __iadd__(self, other): ... def __sub__(self, other): ... def __isub__(self, other): ... def __getitem__(self, index): ... def parsedate_tz(data): ... def parsedate(data): ... def mktime_tz(data): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/collections.pyi0000664000175000017500000001157213577124116024165 0ustar davedave00000000000000# These are not exported. from typing import Any, Dict, Generic, TypeVar, Tuple, overload, Type, Optional, List, Union, Reversible # These are exported. from typing import ( Callable as Callable, Container as Container, Hashable as Hashable, ItemsView as ItemsView, Iterable as Iterable, Iterator as Iterator, KeysView as KeysView, Mapping as Mapping, MappingView as MappingView, MutableMapping as MutableMapping, MutableSequence as MutableSequence, MutableSet as MutableSet, Sequence as Sequence, AbstractSet as Set, Sized as Sized, ValuesView as ValuesView, ) _S = TypeVar('_S') _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') # namedtuple is special-cased in the type checker; the initializer is ignored. def namedtuple(typename: Union[str, unicode], field_names: Union[str, unicode, Iterable[Union[str, unicode]]], verbose: bool = ..., rename: bool = ...) -> Type[Tuple[Any, ...]]: ... class deque(Sized, Iterable[_T], Reversible[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ..., maxlen: int = ...) -> None: ... @property def maxlen(self) -> Optional[int]: ... def append(self, x: _T) -> None: ... def appendleft(self, x: _T) -> None: ... def clear(self) -> None: ... def count(self, x: _T) -> int: ... def extend(self, iterable: Iterable[_T]) -> None: ... def extendleft(self, iterable: Iterable[_T]) -> None: ... def pop(self) -> _T: ... def popleft(self) -> _T: ... def remove(self, value: _T) -> None: ... def reverse(self) -> None: ... def rotate(self, n: int) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... def __hash__(self) -> int: ... def __getitem__(self, i: int) -> _T: ... def __setitem__(self, i: int, x: _T) -> None: ... def __contains__(self, o: _T) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... def __iadd__(self: _S, iterable: Iterable[_T]) -> _S: ... class Counter(Dict[_T, int], Generic[_T]): @overload def __init__(self, **kwargs: int) -> None: ... @overload def __init__(self, mapping: Mapping[_T, int]) -> None: ... @overload def __init__(self, iterable: Iterable[_T]) -> None: ... def copy(self: _S) -> _S: ... def elements(self) -> Iterator[_T]: ... def most_common(self, n: Optional[int] = ...) -> List[Tuple[_T, int]]: ... @overload def subtract(self, __mapping: Mapping[_T, int]) -> None: ... @overload def subtract(self, iterable: Iterable[_T]) -> None: ... # The Iterable[Tuple[...]] argument type is not actually desirable # (the tuples will be added as keys, breaking type safety) but # it's included so that the signature is compatible with # Dict.update. Not sure if we should use '# type: ignore' instead # and omit the type from the union. @overload def update(self, __m: Mapping[_T, int], **kwargs: int) -> None: ... @overload def update(self, __m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: int) -> None: ... @overload def update(self, **kwargs: int) -> None: ... def __add__(self, other: Counter[_T]) -> Counter[_T]: ... def __sub__(self, other: Counter[_T]) -> Counter[_T]: ... def __and__(self, other: Counter[_T]) -> Counter[_T]: ... def __or__(self, other: Counter[_T]) -> Counter[_T]: ... def __iadd__(self, other: Counter[_T]) -> Counter[_T]: ... def __isub__(self, other: Counter[_T]) -> Counter[_T]: ... def __iand__(self, other: Counter[_T]) -> Counter[_T]: ... def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]): def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ... def copy(self: _S) -> _S: ... def __reversed__(self) -> Iterator[_KT]: ... class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]): default_factory: Callable[[], _VT] @overload def __init__(self, **kwargs: _VT) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]]) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], **kwargs: _VT) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], map: Mapping[_KT, _VT]) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], map: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... def __missing__(self, key: _KT) -> _VT: ... def copy(self: _S) -> _S: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/HTMLParser.pyi0000664000175000017500000000205313577124116023562 0ustar davedave00000000000000from typing import List, Tuple, AnyStr from markupbase import ParserBase class HTMLParser(ParserBase): def __init__(self) -> None: ... def feed(self, feed: AnyStr) -> None: ... def close(self) -> None: ... def reset(self) -> None: ... def get_starttag_text(self) -> AnyStr: ... def set_cdata_mode(self, AnyStr) -> None: ... def clear_cdata_mode(self) -> None: ... def handle_startendtag(self, tag: AnyStr, attrs: List[Tuple[AnyStr, AnyStr]]): ... def handle_starttag(self, tag: AnyStr, attrs: List[Tuple[AnyStr, AnyStr]]): ... def handle_endtag(self, tag: AnyStr): ... def handle_charref(self, name: AnyStr): ... def handle_entityref(self, name: AnyStr): ... def handle_data(self, data: AnyStr): ... def handle_comment(self, data: AnyStr): ... def handle_decl(self, decl: AnyStr): ... def handle_pi(self, data: AnyStr): ... def unknown_decl(self, data: AnyStr): ... def unescape(self, s: AnyStr) -> AnyStr: ... class HTMLParseError(Exception): msg: str lineno: int offset: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/distutils/0000775000175000017500000000000013577125145023145 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/distutils/__init__.pyi0000664000175000017500000000000013577124116025412 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/distutils/emxccompiler.pyi0000664000175000017500000000016413577124116026355 0ustar davedave00000000000000# Stubs for emxccompiler from distutils.unixccompiler import UnixCCompiler class EMXCCompiler(UnixCCompiler): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/textwrap.pyi0000664000175000017500000000367013577124116023525 0ustar davedave00000000000000from typing import AnyStr, List, Dict, Pattern class TextWrapper(object): width: int = ... initial_indent: str = ... subsequent_indent: str = ... expand_tabs: bool = ... replace_whitespace: bool = ... fix_sentence_endings: bool = ... drop_whitespace: bool = ... break_long_words: bool = ... break_on_hyphens: bool = ... # Attributes not present in documentation sentence_end_re: Pattern[str] = ... wordsep_re: Pattern[str] = ... wordsep_simple_re: Pattern[str] = ... whitespace_trans: str = ... unicode_whitespace_trans: Dict[int, int] = ... uspace: int = ... x: int = ... def __init__( self, width: int = ..., initial_indent: str = ..., subsequent_indent: str = ..., expand_tabs: bool = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., drop_whitespace: bool = ..., break_on_hyphens: bool = ...) -> None: ... def wrap(self, text: AnyStr) -> List[AnyStr]: ... def fill(self, text: AnyStr) -> AnyStr: ... def wrap(text: AnyStr, width: int = ..., initial_indent: AnyStr = ..., subsequent_indent: AnyStr = ..., expand_tabs: bool = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., drop_whitespace: bool = ..., break_on_hyphens: bool = ...) -> List[AnyStr]: ... def fill(text: AnyStr, width: int = ..., initial_indent: AnyStr = ..., subsequent_indent: AnyStr = ..., expand_tabs: bool = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., drop_whitespace: bool = ..., break_on_hyphens: bool = ...) -> AnyStr: ... def dedent(text: AnyStr) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_sha256.pyi0000664000175000017500000000117013577124116023007 0ustar davedave00000000000000from typing import Optional class sha224(object): name: str block_size: int digest_size: int digestsize: int def __init__(self, init: Optional[str]) -> None: ... def copy(self) -> sha224: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def update(self, arg: str) -> None: ... class sha256(object): name: str block_size: int digest_size: int digestsize: int def __init__(self, init: Optional[str]) -> None: ... def copy(self) -> sha256: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def update(self, arg: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/cStringIO.pyi0000664000175000017500000000376113577124116023511 0ustar davedave00000000000000# Stubs for cStringIO (Python 2.7) # See https://docs.python.org/2/library/stringio.html from abc import ABCMeta from typing import overload, IO, List, Iterable, Iterator, Optional, Union from types import TracebackType # TODO the typing.IO[] generics should be split into input and output. # This class isn't actually abstract, but you can't instantiate it # directly, so we might as well treat it as abstract in the stub. class InputType(IO[str], Iterator[str], metaclass=ABCMeta): def getvalue(self) -> str: ... def close(self) -> None: ... @property def closed(self) -> bool: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def read(self, size: int = ...) -> str: ... def readline(self, size: int = ...) -> str: ... def readlines(self, hint: int = ...) -> List[str]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def __iter__(self) -> InputType: ... def next(self) -> str: ... def reset(self) -> None: ... class OutputType(IO[str], Iterator[str], metaclass=ABCMeta): @property def softspace(self) -> int: ... def getvalue(self) -> str: ... def close(self) -> None: ... @property def closed(self) -> bool: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def read(self, size: int = ...) -> str: ... def readline(self, size: int = ...) -> str: ... def readlines(self, hint: int = ...) -> List[str]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def __iter__(self) -> OutputType: ... def next(self) -> str: ... def reset(self) -> None: ... def write(self, b: Union[str, unicode]) -> int: ... def writelines(self, lines: Iterable[Union[str, unicode]]) -> None: ... @overload def StringIO() -> OutputType: ... @overload def StringIO(s: str) -> InputType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/typing.pyi0000664000175000017500000004161613577124116023163 0ustar davedave00000000000000# Stubs for typing (Python 2.7) from abc import abstractmethod, ABCMeta from types import CodeType, FrameType, TracebackType import collections # Needed by aliases like DefaultDict, see mypy issue 2986 # Definitions of special type checking related constructs. Their definitions # are not used, so their value does not matter. overload = object() Any = object() TypeVar = object() _promote = object() class _SpecialForm(object): def __getitem__(self, typeargs: Any) -> object: ... Tuple: _SpecialForm = ... Generic: _SpecialForm = ... Protocol: _SpecialForm = ... Callable: _SpecialForm = ... Type: _SpecialForm = ... ClassVar: _SpecialForm = ... Final: _SpecialForm = ... _F = TypeVar('_F', bound=Callable[..., Any]) def final(f: _F) -> _F: ... Literal: _SpecialForm = ... # TypedDict is a (non-subscriptable) special form. TypedDict: object = ... class GenericMeta(type): ... # Return type that indicates a function does not return. # This type is equivalent to the None type, but the no-op Union is necessary to # distinguish the None type from the None value. NoReturn = Union[None] # These type variables are used by the container types. _T = TypeVar('_T') _S = TypeVar('_S') _KT = TypeVar('_KT') # Key type. _VT = TypeVar('_VT') # Value type. _T_co = TypeVar('_T_co', covariant=True) # Any type covariant containers. _V_co = TypeVar('_V_co', covariant=True) # Any type covariant containers. _KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers. _VT_co = TypeVar('_VT_co', covariant=True) # Value type covariant containers. _T_contra = TypeVar('_T_contra', contravariant=True) # Ditto contravariant. _TC = TypeVar('_TC', bound=Type[object]) _C = TypeVar("_C", bound=Callable[..., Any]) no_type_check = object() def no_type_check_decorator(decorator: _C) -> _C: ... # Type aliases and type constructors class TypeAlias: # Class for defining generic aliases for library types. def __init__(self, target_type: type) -> None: ... def __getitem__(self, typeargs: Any) -> Any: ... Union = TypeAlias(object) Optional = TypeAlias(object) List = TypeAlias(object) Dict = TypeAlias(object) DefaultDict = TypeAlias(object) Set = TypeAlias(object) FrozenSet = TypeAlias(object) Counter = TypeAlias(object) Deque = TypeAlias(object) # Predefined type variables. AnyStr = TypeVar('AnyStr', str, unicode) # Abstract base classes. def runtime_checkable(cls: _TC) -> _TC: ... @runtime_checkable class SupportsInt(Protocol, metaclass=ABCMeta): @abstractmethod def __int__(self) -> int: ... @runtime_checkable class SupportsFloat(Protocol, metaclass=ABCMeta): @abstractmethod def __float__(self) -> float: ... @runtime_checkable class SupportsComplex(Protocol, metaclass=ABCMeta): @abstractmethod def __complex__(self) -> complex: ... @runtime_checkable class SupportsAbs(Protocol[_T_co]): @abstractmethod def __abs__(self) -> _T_co: ... @runtime_checkable class Reversible(Protocol[_T_co]): @abstractmethod def __reversed__(self) -> Iterator[_T_co]: ... @runtime_checkable class Sized(Protocol, metaclass=ABCMeta): @abstractmethod def __len__(self) -> int: ... @runtime_checkable class Hashable(Protocol, metaclass=ABCMeta): # TODO: This is special, in that a subclass of a hashable class may not be hashable # (for example, list vs. object). It's not obvious how to represent this. This class # is currently mostly useless for static checking. @abstractmethod def __hash__(self) -> int: ... @runtime_checkable class Iterable(Protocol[_T_co]): @abstractmethod def __iter__(self) -> Iterator[_T_co]: ... @runtime_checkable class Iterator(Iterable[_T_co], Protocol[_T_co]): @abstractmethod def next(self) -> _T_co: ... def __iter__(self) -> Iterator[_T_co]: ... class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]): @abstractmethod def next(self) -> _T_co: ... @abstractmethod def send(self, value: _T_contra) -> _T_co: ... @abstractmethod def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ..., tb: TracebackType = ...) -> _T_co: ... @abstractmethod def close(self) -> None: ... @property def gi_code(self) -> CodeType: ... @property def gi_frame(self) -> FrameType: ... @property def gi_running(self) -> bool: ... @runtime_checkable class Container(Protocol[_T_co]): @abstractmethod def __contains__(self, x: object) -> bool: ... class Sequence(Iterable[_T_co], Container[_T_co], Reversible[_T_co], Generic[_T_co]): @overload @abstractmethod def __getitem__(self, i: int) -> _T_co: ... @overload @abstractmethod def __getitem__(self, s: slice) -> Sequence[_T_co]: ... # Mixin methods def index(self, x: Any) -> int: ... def count(self, x: Any) -> int: ... def __contains__(self, x: object) -> bool: ... def __iter__(self) -> Iterator[_T_co]: ... def __reversed__(self) -> Iterator[_T_co]: ... # Implement Sized (but don't have it as a base class). @abstractmethod def __len__(self) -> int: ... class MutableSequence(Sequence[_T], Generic[_T]): @abstractmethod def insert(self, index: int, object: _T) -> None: ... @overload @abstractmethod def __getitem__(self, i: int) -> _T: ... @overload @abstractmethod def __getitem__(self, s: slice) -> MutableSequence[_T]: ... @overload @abstractmethod def __setitem__(self, i: int, o: _T) -> None: ... @overload @abstractmethod def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... @overload @abstractmethod def __delitem__(self, i: int) -> None: ... @overload @abstractmethod def __delitem__(self, i: slice) -> None: ... # Mixin methods def append(self, object: _T) -> None: ... def extend(self, iterable: Iterable[_T]) -> None: ... def reverse(self) -> None: ... def pop(self, index: int = ...) -> _T: ... def remove(self, object: _T) -> None: ... def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ... class AbstractSet(Iterable[_T_co], Container[_T_co], Generic[_T_co]): @abstractmethod def __contains__(self, x: object) -> bool: ... # Mixin methods def __le__(self, s: AbstractSet[Any]) -> bool: ... def __lt__(self, s: AbstractSet[Any]) -> bool: ... def __gt__(self, s: AbstractSet[Any]) -> bool: ... def __ge__(self, s: AbstractSet[Any]) -> bool: ... def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... # TODO: argument can be any container? def isdisjoint(self, s: AbstractSet[Any]) -> bool: ... # Implement Sized (but don't have it as a base class). @abstractmethod def __len__(self) -> int: ... class MutableSet(AbstractSet[_T], Generic[_T]): @abstractmethod def add(self, x: _T) -> None: ... @abstractmethod def discard(self, x: _T) -> None: ... # Mixin methods def clear(self) -> None: ... def pop(self) -> _T: ... def remove(self, element: _T) -> None: ... def __ior__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... def __iand__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... def __ixor__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... def __isub__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... class MappingView(object): def __len__(self) -> int: ... class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_KT_co]: ... class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_VT_co]: ... @runtime_checkable class ContextManager(Protocol[_T_co]): def __enter__(self) -> _T_co: ... def __exit__(self, __exc_type: Optional[Type[BaseException]], __exc_value: Optional[BaseException], __traceback: Optional[TracebackType]) -> Optional[bool]: ... class Mapping(Iterable[_KT], Container[_KT], Generic[_KT, _VT_co]): # TODO: We wish the key type could also be covariant, but that doesn't work, # see discussion in https: //github.com/python/typing/pull/273. @abstractmethod def __getitem__(self, k: _KT) -> _VT_co: ... # Mixin methods @overload def get(self, k: _KT) -> Optional[_VT_co]: ... @overload def get(self, k: _KT, default: Union[_VT_co, _T]) -> Union[_VT_co, _T]: ... def keys(self) -> list[_KT]: ... def values(self) -> list[_VT_co]: ... def items(self) -> list[Tuple[_KT, _VT_co]]: ... def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT_co]: ... def iteritems(self) -> Iterator[Tuple[_KT, _VT_co]]: ... def __contains__(self, o: object) -> bool: ... # Implement Sized (but don't have it as a base class). @abstractmethod def __len__(self) -> int: ... class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): @abstractmethod def __setitem__(self, k: _KT, v: _VT) -> None: ... @abstractmethod def __delitem__(self, v: _KT) -> None: ... def clear(self) -> None: ... @overload def pop(self, k: _KT) -> _VT: ... @overload def pop(self, k: _KT, default: Union[_VT, _T] = ...) -> Union[_VT, _T]: ... def popitem(self) -> Tuple[_KT, _VT]: ... def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... @overload def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... @overload def update(self, **kwargs: _VT) -> None: ... Text = unicode TYPE_CHECKING = True class IO(Iterator[AnyStr], Generic[AnyStr]): # TODO detach # TODO use abstract properties @property def mode(self) -> str: ... @property def name(self) -> str: ... @abstractmethod def close(self) -> None: ... @property def closed(self) -> bool: ... @abstractmethod def fileno(self) -> int: ... @abstractmethod def flush(self) -> None: ... @abstractmethod def isatty(self) -> bool: ... # TODO what if n is None? @abstractmethod def read(self, n: int = ...) -> AnyStr: ... @abstractmethod def readable(self) -> bool: ... @abstractmethod def readline(self, limit: int = ...) -> AnyStr: ... @abstractmethod def readlines(self, hint: int = ...) -> list[AnyStr]: ... @abstractmethod def seek(self, offset: int, whence: int = ...) -> int: ... @abstractmethod def seekable(self) -> bool: ... @abstractmethod def tell(self) -> int: ... @abstractmethod def truncate(self, size: Optional[int] = ...) -> int: ... @abstractmethod def writable(self) -> bool: ... # TODO buffer objects @abstractmethod def write(self, s: AnyStr) -> int: ... @abstractmethod def writelines(self, lines: Iterable[AnyStr]) -> None: ... @abstractmethod def next(self) -> AnyStr: ... @abstractmethod def __iter__(self) -> Iterator[AnyStr]: ... @abstractmethod def __enter__(self) -> IO[AnyStr]: ... @abstractmethod def __exit__(self, t: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> Optional[bool]: ... class BinaryIO(IO[str]): # TODO readinto # TODO read1? # TODO peek? @abstractmethod def __enter__(self) -> BinaryIO: ... class TextIO(IO[unicode]): # TODO use abstractproperty @property def buffer(self) -> BinaryIO: ... @property def encoding(self) -> str: ... @property def errors(self) -> Optional[str]: ... @property def line_buffering(self) -> bool: ... @property def newlines(self) -> Any: ... # None, str or tuple @abstractmethod def __enter__(self) -> TextIO: ... class ByteString(Sequence[int], metaclass=ABCMeta): ... class Match(Generic[AnyStr]): pos: int endpos: int lastindex: Optional[int] string: AnyStr # The regular expression object whose match() or search() method produced # this match instance. This should not be Pattern[AnyStr] because the type # of the pattern is independent of the type of the matched string in # Python 2. Strictly speaking Match should be generic over AnyStr twice: # once for the type of the pattern and once for the type of the matched # string. re: Pattern[Any] # Can be None if there are no groups or if the last group was unnamed; # otherwise matches the type of the pattern. lastgroup: Optional[Any] def expand(self, template: Union[str, Text]) -> Any: ... @overload def group(self, group1: int = ...) -> AnyStr: ... @overload def group(self, group1: str) -> AnyStr: ... @overload def group(self, group1: int, group2: int, *groups: int) -> Tuple[AnyStr, ...]: ... @overload def group(self, group1: str, group2: str, *groups: str) -> Tuple[AnyStr, ...]: ... def groups(self, default: AnyStr = ...) -> Tuple[AnyStr, ...]: ... def groupdict(self, default: AnyStr = ...) -> Dict[str, AnyStr]: ... def start(self, group: Union[int, str] = ...) -> int: ... def end(self, group: Union[int, str] = ...) -> int: ... def span(self, group: Union[int, str] = ...) -> Tuple[int, int]: ... @property def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented # We need a second TypeVar with the same definition as AnyStr, because # Pattern is generic over AnyStr (determining the type of its .pattern # attribute), but at the same time its methods take either bytes or # Text and return the same type, regardless of the type of the pattern. _AnyStr2 = TypeVar('_AnyStr2', bytes, Text) class Pattern(Generic[AnyStr]): flags: int groupindex: Dict[AnyStr, int] groups: int pattern: AnyStr def search(self, string: _AnyStr2, pos: int = ..., endpos: int = ...) -> Optional[Match[_AnyStr2]]: ... def match(self, string: _AnyStr2, pos: int = ..., endpos: int = ...) -> Optional[Match[_AnyStr2]]: ... def split(self, string: _AnyStr2, maxsplit: int = ...) -> List[_AnyStr2]: ... # Returns either a list of _AnyStr2 or a list of tuples, depending on # whether there are groups in the pattern. def findall(self, string: Union[bytes, Text], pos: int = ..., endpos: int = ...) -> List[Any]: ... def finditer(self, string: _AnyStr2, pos: int = ..., endpos: int = ...) -> Iterator[Match[_AnyStr2]]: ... @overload def sub(self, repl: _AnyStr2, string: _AnyStr2, count: int = ...) -> _AnyStr2: ... @overload def sub(self, repl: Callable[[Match[_AnyStr2]], _AnyStr2], string: _AnyStr2, count: int = ...) -> _AnyStr2: ... @overload def subn(self, repl: _AnyStr2, string: _AnyStr2, count: int = ...) -> Tuple[_AnyStr2, int]: ... @overload def subn(self, repl: Callable[[Match[_AnyStr2]], _AnyStr2], string: _AnyStr2, count: int = ...) -> Tuple[_AnyStr2, int]: ... # Functions def get_type_hints( obj: Callable[..., Any], globalns: Optional[Dict[Text, Any]] = ..., localns: Optional[Dict[Text, Any]] = ..., ) -> None: ... @overload def cast(tp: Type[_T], obj: Any) -> _T: ... @overload def cast(tp: str, obj: Any) -> Any: ... # Type constructors # NamedTuple is special-cased in the type checker class NamedTuple(Tuple[Any, ...]): _fields: Tuple[str, ...] def __init__(self, typename: Text, fields: Iterable[Tuple[Text, Any]] = ..., **kwargs: Any) -> None: ... @classmethod def _make(cls: Type[_T], iterable: Iterable[Any]) -> _T: ... def _asdict(self) -> Dict[str, Any]: ... def _replace(self: _T, **kwargs: Any) -> _T: ... # Internal mypy fallback type for all typed dicts (does not exist at runtime) class _TypedDict(Mapping[str, object], metaclass=ABCMeta): def copy(self: _T) -> _T: ... # Using NoReturn so that only calls using mypy plugin hook that specialize the signature # can go through. def setdefault(self, k: NoReturn, default: object) -> object: ... # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. def pop(self, k: NoReturn, default: _T = ...) -> object: ... def update(self: _T, __m: _T) -> None: ... def has_key(self, k: str) -> bool: ... def viewitems(self) -> ItemsView[str, object]: ... def viewkeys(self) -> KeysView[str]: ... def viewvalues(self) -> ValuesView[object]: ... def __delitem__(self, k: NoReturn) -> None: ... def NewType(name: str, tp: Type[_T]) -> Type[_T]: ... # This itself is only available during type checking def type_check_only(func_or_cls: _C) -> _C: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_sre.pyi0000664000175000017500000000367013577124116022577 0ustar davedave00000000000000"""Stub file for the '_sre' module.""" from typing import Any, Union, Iterable, Optional, Mapping, Sequence, Dict, List, Tuple, overload CODESIZE: int MAGIC: int MAXREPEAT: long copyright: str class SRE_Match(object): def start(self, group: int = ...) -> int: ... def end(self, group: int = ...) -> int: ... def expand(self, s: str) -> Any: ... @overload def group(self) -> str: ... @overload def group(self, group: int = ...) -> Optional[str]: ... def groupdict(self) -> Dict[int, Optional[str]]: ... def groups(self) -> Tuple[Optional[str], ...]: ... def span(self) -> Tuple[int, int]: ... @property def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented class SRE_Scanner(object): pattern: str def match(self) -> SRE_Match: ... def search(self) -> SRE_Match: ... class SRE_Pattern(object): pattern: str flags: int groups: int groupindex: Mapping[str, int] indexgroup: Sequence[int] def findall(self, source: str, pos: int = ..., endpos: int = ...) -> List[Union[Tuple[Any, ...], str]]: ... def finditer(self, source: str, pos: int = ..., endpos: int = ...) -> Iterable[Union[Tuple[Any, ...], str]]: ... def match(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ... def scanner(self, s: str, start: int = ..., end: int = ...) -> SRE_Scanner: ... def search(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ... def split(self, source: str, maxsplit: int = ...) -> List[Optional[str]]: ... def sub(self, repl: str, string: str, count: int = ...) -> Tuple[Any, ...]: ... def subn(self, repl: str, string: str, count: int = ...) -> Tuple[Any, ...]: ... def compile( pattern: str, flags: int, code: List[int], groups: int = ..., groupindex: Mapping[str, int] = ..., indexgroup: Sequence[int] = ..., ) -> SRE_Pattern: ... def getcodesize() -> int: ... def getlower(a: int, b: int) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/os/0000775000175000017500000000000013577125145021542 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/os/__init__.pyi0000664000175000017500000003212713577124116024026 0ustar davedave00000000000000# Stubs for os # Ron Murawski from builtins import OSError as error from io import TextIOWrapper as _TextIOWrapper from posix import listdir as listdir, stat_result as stat_result # TODO: use this, see https://github.com/python/mypy/issues/3078 import sys from typing import ( Mapping, MutableMapping, Dict, List, Any, Tuple, Iterator, overload, Union, AnyStr, Optional, Generic, Set, Callable, Text, Sequence, IO, NamedTuple, NoReturn, TypeVar ) from . import path as path _T = TypeVar('_T') # ----- os variables ----- if sys.version_info >= (3, 2): supports_bytes_environ: bool if sys.version_info >= (3, 3): supports_dir_fd: Set[Callable[..., Any]] supports_fd: Set[Callable[..., Any]] supports_effective_ids: Set[Callable[..., Any]] supports_follow_symlinks: Set[Callable[..., Any]] SEEK_SET: int SEEK_CUR: int SEEK_END: int O_RDONLY: int O_WRONLY: int O_RDWR: int O_APPEND: int O_CREAT: int O_EXCL: int O_TRUNC: int # We don't use sys.platform for O_* flags to denote platform-dependent APIs because some codes, # including tests for mypy, use a more finer way than sys.platform before using these APIs # See https://github.com/python/typeshed/pull/2286 for discussions O_DSYNC: int # Unix only O_RSYNC: int # Unix only O_SYNC: int # Unix only O_NDELAY: int # Unix only O_NONBLOCK: int # Unix only O_NOCTTY: int # Unix only O_SHLOCK: int # Unix only O_EXLOCK: int # Unix only O_BINARY: int # Windows only O_NOINHERIT: int # Windows only O_SHORT_LIVED: int # Windows only O_TEMPORARY: int # Windows only O_RANDOM: int # Windows only O_SEQUENTIAL: int # Windows only O_TEXT: int # Windows only O_ASYNC: int # Gnu extension if in C library O_DIRECT: int # Gnu extension if in C library O_DIRECTORY: int # Gnu extension if in C library O_NOFOLLOW: int # Gnu extension if in C library O_NOATIME: int # Gnu extension if in C library O_LARGEFILE: int # Gnu extension if in C library curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str linesep: str devnull: str name: str F_OK: int R_OK: int W_OK: int X_OK: int class _Environ(MutableMapping[AnyStr, AnyStr], Generic[AnyStr]): def copy(self) -> Dict[AnyStr, AnyStr]: ... def __delitem__(self, key: AnyStr) -> None: ... def __getitem__(self, key: AnyStr) -> AnyStr: ... def __setitem__(self, key: AnyStr, value: AnyStr) -> None: ... def __iter__(self) -> Iterator[AnyStr]: ... def __len__(self) -> int: ... environ: _Environ[str] if sys.version_info >= (3, 2): environb: _Environ[bytes] if sys.platform != 'win32': # Unix only confstr_names: Dict[str, int] pathconf_names: Dict[str, int] sysconf_names: Dict[str, int] EX_OK: int EX_USAGE: int EX_DATAERR: int EX_NOINPUT: int EX_NOUSER: int EX_NOHOST: int EX_UNAVAILABLE: int EX_SOFTWARE: int EX_OSERR: int EX_OSFILE: int EX_CANTCREAT: int EX_IOERR: int EX_TEMPFAIL: int EX_PROTOCOL: int EX_NOPERM: int EX_CONFIG: int EX_NOTFOUND: int P_NOWAIT: int P_NOWAITO: int P_WAIT: int if sys.platform == 'win32': P_DETACH: int P_OVERLAY: int # wait()/waitpid() options if sys.platform != 'win32': WNOHANG: int # Unix only WCONTINUED: int # some Unix systems WUNTRACED: int # Unix only TMP_MAX: int # Undocumented, but used by tempfile # ----- os classes (structures) ----- if sys.version_info >= (3, 6): from builtins import _PathLike as PathLike # See comment in builtins _PathType = path._PathType class _StatVFS(NamedTuple): f_bsize: int f_frsize: int f_blocks: int f_bfree: int f_bavail: int f_files: int f_ffree: int f_favail: int f_flag: int f_namemax: int def getlogin() -> str: ... def getpid() -> int: ... def getppid() -> int: ... def strerror(code: int) -> str: ... def umask(mask: int) -> int: ... if sys.platform != 'win32': def ctermid() -> str: ... def getegid() -> int: ... def geteuid() -> int: ... def getgid() -> int: ... def getgroups() -> List[int]: ... # Unix only, behaves differently on Mac def initgroups(username: str, gid: int) -> None: ... def getpgid(pid: int) -> int: ... def getpgrp() -> int: ... def getresuid() -> Tuple[int, int, int]: ... def getresgid() -> Tuple[int, int, int]: ... def getuid() -> int: ... def setegid(egid: int) -> None: ... def seteuid(euid: int) -> None: ... def setgid(gid: int) -> None: ... def setgroups(groups: Sequence[int]) -> None: ... def setpgrp() -> None: ... def setpgid(pid: int, pgrp: int) -> None: ... def setregid(rgid: int, egid: int) -> None: ... def setresgid(rgid: int, egid: int, sgid: int) -> None: ... def setresuid(ruid: int, euid: int, suid: int) -> None: ... def setreuid(ruid: int, euid: int) -> None: ... def getsid(pid: int) -> int: ... def setsid() -> None: ... def setuid(uid: int) -> None: ... def uname() -> Tuple[str, str, str, str, str]: ... @overload def getenv(key: Text) -> Optional[str]: ... @overload def getenv(key: Text, default: _T) -> Union[str, _T]: ... def putenv(key: Union[bytes, Text], value: Union[bytes, Text]) -> None: ... def unsetenv(key: Union[bytes, Text]) -> None: ... def fdopen(fd: int, *args, **kwargs) -> IO[Any]: ... def close(fd: int) -> None: ... def closerange(fd_low: int, fd_high: int) -> None: ... def dup(fd: int) -> int: ... def dup2(fd: int, fd2: int) -> None: ... def fstat(fd: int) -> Any: ... def fsync(fd: int) -> None: ... def lseek(fd: int, pos: int, how: int) -> int: ... def open(file: _PathType, flags: int, mode: int = ...) -> int: ... def pipe() -> Tuple[int, int]: ... def read(fd: int, n: int) -> bytes: ... def write(fd: int, string: Union[bytes, buffer]) -> int: ... def access(path: _PathType, mode: int) -> bool: ... def chdir(path: _PathType) -> None: ... def fchdir(fd: int) -> None: ... def getcwd() -> str: ... def getcwdu() -> unicode: ... def chmod(path: _PathType, mode: int) -> None: ... def link(src: _PathType, link_name: _PathType) -> None: ... def lstat(path: _PathType) -> Any: ... def mknod(filename: _PathType, mode: int = ..., device: int = ...) -> None: ... def major(device: int) -> int: ... def minor(device: int) -> int: ... def makedev(major: int, minor: int) -> int: ... def mkdir(path: _PathType, mode: int = ...) -> None: ... def makedirs(path: _PathType, mode: int = ...) -> None: ... def readlink(path: AnyStr) -> AnyStr: ... def remove(path: _PathType) -> None: ... def removedirs(path: _PathType) -> None: ... def rename(src: _PathType, dst: _PathType) -> None: ... def renames(old: _PathType, new: _PathType) -> None: ... def rmdir(path: _PathType) -> None: ... def stat(path: _PathType) -> Any: ... @overload def stat_float_times() -> bool: ... @overload def stat_float_times(newvalue: bool) -> None: ... def symlink(source: _PathType, link_name: _PathType) -> None: ... def unlink(path: _PathType) -> None: ... # TODO: add ns, dir_fd, follow_symlinks argument if sys.version_info >= (3, 0): def utime(path: _PathType, times: Optional[Tuple[float, float]] = ...) -> None: ... else: def utime(path: _PathType, times: Optional[Tuple[float, float]]) -> None: ... if sys.platform != 'win32': # Unix only def fchmod(fd: int, mode: int) -> None: ... def fchown(fd: int, uid: int, gid: int) -> None: ... if sys.platform != 'darwin': def fdatasync(fd: int) -> None: ... # Unix only, not Mac def fpathconf(fd: int, name: Union[str, int]) -> int: ... def fstatvfs(fd: int) -> _StatVFS: ... def ftruncate(fd: int, length: int) -> None: ... def isatty(fd: int) -> bool: ... def openpty() -> Tuple[int, int]: ... # some flavors of Unix def tcgetpgrp(fd: int) -> int: ... def tcsetpgrp(fd: int, pg: int) -> None: ... def ttyname(fd: int) -> str: ... def chflags(path: _PathType, flags: int) -> None: ... def chroot(path: _PathType) -> None: ... def chown(path: _PathType, uid: int, gid: int) -> None: ... def lchflags(path: _PathType, flags: int) -> None: ... def lchmod(path: _PathType, mode: int) -> None: ... def lchown(path: _PathType, uid: int, gid: int) -> None: ... def mkfifo(path: _PathType, mode: int = ...) -> None: ... def pathconf(path: _PathType, name: Union[str, int]) -> int: ... def statvfs(path: _PathType) -> _StatVFS: ... if sys.version_info >= (3, 6): def walk(top: Union[AnyStr, PathLike[AnyStr]], topdown: bool = ..., onerror: Optional[Callable[[OSError], Any]] = ..., followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], List[AnyStr]]]: ... else: def walk(top: AnyStr, topdown: bool = ..., onerror: Optional[Callable[[OSError], Any]] = ..., followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], List[AnyStr]]]: ... def abort() -> NoReturn: ... # These are defined as execl(file, *args) but the first *arg is mandatory. def execl(file: _PathType, __arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> NoReturn: ... def execlp(file: _PathType, __arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> NoReturn: ... # These are: execle(file, *args, env) but env is pulled from the last element of the args. def execle(file: _PathType, __arg0: Union[bytes, Text], *args: Any) -> NoReturn: ... def execlpe(file: _PathType, __arg0: Union[bytes, Text], *args: Any) -> NoReturn: ... # The docs say `args: tuple or list of strings` # The implementation enforces tuple or list so we can't use Sequence. _ExecVArgs = Union[Tuple[Union[bytes, Text], ...], List[bytes], List[Text], List[Union[bytes, Text]]] def execv(path: _PathType, args: _ExecVArgs) -> NoReturn: ... def execve(path: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> NoReturn: ... def execvp(file: _PathType, args: _ExecVArgs) -> NoReturn: ... def execvpe(file: _PathType, args: _ExecVArgs, env: Mapping[str, str]) -> NoReturn: ... def _exit(n: int) -> NoReturn: ... def kill(pid: int, sig: int) -> None: ... if sys.platform != 'win32': # Unix only def fork() -> int: ... def forkpty() -> Tuple[int, int]: ... # some flavors of Unix def killpg(pgid: int, sig: int) -> None: ... def nice(increment: int) -> int: ... def plock(op: int) -> None: ... # ???op is int? if sys.version_info >= (3, 0): class popen(_TextIOWrapper): # TODO 'b' modes or bytes command not accepted? def __init__(self, command: str, mode: str = ..., bufsize: int = ...) -> None: ... def close(self) -> Any: ... # may return int else: def popen(command: str, *args, **kwargs) -> IO[Any]: ... def popen2(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any]]: ... def popen3(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any], IO[Any]]: ... def popen4(cmd: str, *args, **kwargs) -> Tuple[IO[Any], IO[Any]]: ... def spawnl(mode: int, path: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> int: ... def spawnle(mode: int, path: _PathType, arg0: Union[bytes, Text], *args: Any) -> int: ... # Imprecise sig def spawnv(mode: int, path: _PathType, args: List[Union[bytes, Text]]) -> int: ... def spawnve(mode: int, path: _PathType, args: List[Union[bytes, Text]], env: Mapping[str, str]) -> int: ... def system(command: _PathType) -> int: ... def times() -> Tuple[float, float, float, float, float]: ... def waitpid(pid: int, options: int) -> Tuple[int, int]: ... def urandom(n: int) -> bytes: ... if sys.platform == 'win32': def startfile(path: _PathType, operation: Optional[str] = ...) -> None: ... else: # Unix only def spawnlp(mode: int, file: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> int: ... def spawnlpe(mode: int, file: _PathType, arg0: Union[bytes, Text], *args: Any) -> int: ... # Imprecise signature def spawnvp(mode: int, file: _PathType, args: List[Union[bytes, Text]]) -> int: ... def spawnvpe(mode: int, file: _PathType, args: List[Union[bytes, Text]], env: Mapping[str, str]) -> int: ... def wait() -> Tuple[int, int]: ... def wait3(options: int) -> Tuple[int, int, Any]: ... def wait4(pid: int, options: int) -> Tuple[int, int, Any]: ... def WCOREDUMP(status: int) -> bool: ... def WIFCONTINUED(status: int) -> bool: ... def WIFSTOPPED(status: int) -> bool: ... def WIFSIGNALED(status: int) -> bool: ... def WIFEXITED(status: int) -> bool: ... def WEXITSTATUS(status: int) -> int: ... def WSTOPSIG(status: int) -> int: ... def WTERMSIG(status: int) -> int: ... def confstr(name: Union[str, int]) -> Optional[str]: ... def getloadavg() -> Tuple[float, float, float]: ... def sysconf(name: Union[str, int]) -> int: ... if sys.version_info >= (3, 0): def sched_getaffinity(id: int) -> Set[int]: ... if sys.version_info >= (3, 3): class waitresult: si_pid: int def waitid(idtype: int, id: int, options: int) -> waitresult: ... if sys.version_info < (3, 0): def tmpfile() -> IO[Any]: ... def tmpnam() -> str: ... def tempnam(dir: str = ..., prefix: str = ...) -> str: ... P_ALL: int WEXITED: int WNOWAIT: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/os/path.pyi0000664000175000017500000001412413577124116023220 0ustar davedave00000000000000# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! # Stubs for os.path # Ron Murawski import os import sys from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional _T = TypeVar('_T') if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] _StrPath = Union[Text, _PathLike[Text]] _BytesPath = Union[bytes, _PathLike[bytes]] else: _PathType = Union[bytes, Text] _StrPath = Text _BytesPath = bytes # ----- os.path variables ----- supports_unicode_filenames: bool # aliases (also in os) curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str devnull: str # ----- os.path function stubs ----- if sys.version_info >= (3, 6): # Overloads are necessary to work around python/mypy#3644. @overload def abspath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def basename(path: AnyStr) -> AnyStr: ... @overload def dirname(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(path: AnyStr) -> AnyStr: ... @overload def expanduser(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expanduser(path: AnyStr) -> AnyStr: ... @overload def expandvars(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normcase(path: AnyStr) -> AnyStr: ... @overload def normpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': @overload def realpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(path: AnyStr) -> AnyStr: ... else: @overload def realpath(filename: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(filename: AnyStr) -> AnyStr: ... else: def abspath(path: AnyStr) -> AnyStr: ... def basename(path: AnyStr) -> AnyStr: ... def dirname(path: AnyStr) -> AnyStr: ... def expanduser(path: AnyStr) -> AnyStr: ... def expandvars(path: AnyStr) -> AnyStr: ... def normcase(path: AnyStr) -> AnyStr: ... def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': def realpath(path: AnyStr) -> AnyStr: ... else: def realpath(filename: AnyStr) -> AnyStr: ... if sys.version_info >= (3, 6): # In reality it returns str for sequences of _StrPath and bytes for sequences # of _BytesPath, but mypy does not accept such a signature. def commonpath(paths: Sequence[_PathType]) -> Any: ... elif sys.version_info >= (3, 5): def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ... # NOTE: Empty lists results in '' (str) regardless of contained type. # Also, in Python 2 mixed sequences of Text and bytes results in either Text or bytes # So, fall back to Any def commonprefix(list: Sequence[_PathType]) -> Any: ... if sys.version_info >= (3, 3): def exists(path: Union[_PathType, int]) -> bool: ... else: def exists(path: _PathType) -> bool: ... def lexists(path: _PathType) -> bool: ... # These return float if os.stat_float_times() == True, # but int is a subclass of float. def getatime(path: _PathType) -> float: ... def getmtime(path: _PathType) -> float: ... def getctime(path: _PathType) -> float: ... def getsize(path: _PathType) -> int: ... def isabs(path: _PathType) -> bool: ... def isfile(path: _PathType) -> bool: ... def isdir(path: _PathType) -> bool: ... def islink(path: _PathType) -> bool: ... def ismount(path: _PathType) -> bool: ... if sys.version_info < (3, 0): # Make sure signatures are disjunct, and allow combinations of bytes and unicode. # (Since Python 2 allows that, too) # Note that e.g. os.path.join("a", "b", "c", "d", u"e") will still result in # a type error. @overload def join(__p1: bytes, *p: bytes) -> bytes: ... @overload def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ... @overload def join(__p1: Text, *p: _PathType) -> Text: ... elif sys.version_info >= (3, 6): # Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway. @overload def join(path: _StrPath, *paths: _StrPath) -> Text: ... @overload def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ... else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... def samefile(path1: _PathType, path2: _PathType) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ... if sys.version_info >= (3, 6): @overload def split(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... else: def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... if sys.platform == 'win32': def splitunc(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # deprecated if sys.version_info < (3,): def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/urlparse.pyi0000664000175000017500000000376113577124116023505 0ustar davedave00000000000000# Stubs for urlparse (Python 2) from typing import AnyStr, Dict, List, NamedTuple, Tuple, Sequence, Union, overload, Optional _String = Union[str, unicode] uses_relative: List[str] uses_netloc: List[str] uses_params: List[str] non_hierarchical: List[str] uses_query: List[str] uses_fragment: List[str] scheme_chars: str MAX_CACHE_SIZE: int def clear_cache() -> None: ... class ResultMixin(object): @property def username(self) -> Optional[str]: ... @property def password(self) -> Optional[str]: ... @property def hostname(self) -> Optional[str]: ... @property def port(self) -> Optional[int]: ... class _SplitResult(NamedTuple): scheme: str netloc: str path: str query: str fragment: str class SplitResult(_SplitResult, ResultMixin): def geturl(self) -> str: ... class _ParseResult(NamedTuple): scheme: str netloc: str path: str params: str query: str fragment: str class ParseResult(_ParseResult, ResultMixin): def geturl(self) -> str: ... def urlparse(url: _String, scheme: _String = ..., allow_fragments: bool = ...) -> ParseResult: ... def urlsplit(url: _String, scheme: _String = ..., allow_fragments: bool = ...) -> SplitResult: ... @overload def urlunparse(data: Tuple[_String, _String, _String, _String, _String, _String]) -> str: ... @overload def urlunparse(data: Sequence[_String]) -> str: ... @overload def urlunsplit(data: Tuple[_String, _String, _String, _String, _String]) -> str: ... @overload def urlunsplit(data: Sequence[_String]) -> str: ... def urljoin(base: _String, url: _String, allow_fragments: bool = ...) -> str: ... def urldefrag(url: AnyStr) -> Tuple[AnyStr, str]: ... def unquote(s: AnyStr) -> AnyStr: ... def parse_qs(qs: AnyStr, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> Dict[AnyStr, List[AnyStr]]: ... def parse_qsl(qs: AnyStr, keep_blank_values: int = ..., strict_parsing: bool = ...) -> List[Tuple[AnyStr, AnyStr]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/mimetools.pyi0000664000175000017500000000127713577124116023660 0ustar davedave00000000000000from typing import Any import rfc822 class Message(rfc822.Message): encodingheader: Any typeheader: Any def __init__(self, fp, seekable: int = ...): ... plisttext: Any type: Any maintype: Any subtype: Any def parsetype(self): ... plist: Any def parseplist(self): ... def getplist(self): ... def getparam(self, name): ... def getparamnames(self): ... def getencoding(self): ... def gettype(self): ... def getmaintype(self): ... def getsubtype(self): ... def choose_boundary(): ... def decode(input, output, encoding): ... def encode(input, output, encoding): ... def copyliteral(input, output): ... def copybinary(input, output): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/httplib.pyi0000664000175000017500000001346113577124116023314 0ustar davedave00000000000000# Stubs for httplib (Python 2) # # Generated by stubgen and manually massaged a bit. # Needs lots more work! from typing import Any, Dict, Optional, Protocol import mimetools import ssl class HTTPMessage(mimetools.Message): def addcontinue(self, key: str, more: str) -> None: ... dict: Dict[str, str] def addheader(self, key: str, value: str) -> None: ... unixfrom: str headers: Any status: str seekable: bool def readheaders(self) -> None: ... class HTTPResponse: fp: Any debuglevel: Any strict: Any msg: Any version: Any status: Any reason: Any chunked: Any chunk_left: Any length: Any will_close: Any def __init__(self, sock, debuglevel: int = ..., strict: int = ..., method: Optional[Any] = ..., buffering: bool = ...) -> None: ... def begin(self): ... def close(self): ... def isclosed(self): ... def read(self, amt: Optional[Any] = ...): ... def fileno(self): ... def getheader(self, name, default: Optional[Any] = ...): ... def getheaders(self): ... # This is an API stub only for HTTPConnection and HTTPSConnection, as used in # urllib2.AbstractHTTPHandler.do_open, which takes either the class # HTTPConnection or the class HTTPSConnection, *not* an instance of either # class. do_open does not use all of the parameters of HTTPConnection.__init__ # or HTTPSConnection.__init__, so HTTPConnectionProtocol only implements the # parameters that do_open does use. class HTTPConnectionProtocol(Protocol): def __call__(self, host: str, timeout: int = ..., **http_con_args: Any) -> HTTPConnection: ... class HTTPConnection: response_class: Any default_port: Any auto_open: Any debuglevel: Any strict: Any timeout: Any source_address: Any sock: Any host: str = ... port: int = ... def __init__(self, host, port: Optional[Any] = ..., strict: Optional[Any] = ..., timeout=..., source_address: Optional[Any] = ...) -> None: ... def set_tunnel(self, host, port: Optional[Any] = ..., headers: Optional[Any] = ...): ... def set_debuglevel(self, level): ... def connect(self): ... def close(self): ... def send(self, data): ... def putrequest(self, method, url, skip_host: int = ..., skip_accept_encoding: int = ...): ... def putheader(self, header, *values): ... def endheaders(self, message_body: Optional[Any] = ...): ... def request(self, method, url, body: Optional[Any] = ..., headers=...): ... def getresponse(self, buffering: bool = ...): ... class HTTP: debuglevel: Any def __init__(self, host: str = ..., port: Optional[Any] = ..., strict: Optional[Any] = ...) -> None: ... def connect(self, host: Optional[Any] = ..., port: Optional[Any] = ...): ... def getfile(self): ... file: Any headers: Any def getreply(self, buffering: bool = ...): ... def close(self): ... class HTTPSConnection(HTTPConnection): default_port: Any key_file: Any cert_file: Any def __init__(self, host, port: Optional[Any] = ..., key_file: Optional[Any] = ..., cert_file: Optional[Any] = ..., strict: Optional[Any] = ..., timeout=..., source_address: Optional[Any] = ..., context: Optional[Any] = ...) -> None: ... sock: Any def connect(self): ... class HTTPS(HTTP): key_file: Any cert_file: Any def __init__(self, host: str = ..., port: Optional[Any] = ..., key_file: Optional[Any] = ..., cert_file: Optional[Any] = ..., strict: Optional[Any] = ..., context: Optional[Any] = ...) -> None: ... class HTTPException(Exception): ... class NotConnected(HTTPException): ... class InvalidURL(HTTPException): ... class UnknownProtocol(HTTPException): args: Any version: Any def __init__(self, version) -> None: ... class UnknownTransferEncoding(HTTPException): ... class UnimplementedFileMode(HTTPException): ... class IncompleteRead(HTTPException): args: Any partial: Any expected: Any def __init__(self, partial, expected: Optional[Any] = ...) -> None: ... class ImproperConnectionState(HTTPException): ... class CannotSendRequest(ImproperConnectionState): ... class CannotSendHeader(ImproperConnectionState): ... class ResponseNotReady(ImproperConnectionState): ... class BadStatusLine(HTTPException): args: Any line: Any def __init__(self, line) -> None: ... class LineTooLong(HTTPException): def __init__(self, line_type) -> None: ... error: Any class LineAndFileWrapper: def __init__(self, line, file) -> None: ... def __getattr__(self, attr): ... def read(self, amt: Optional[Any] = ...): ... def readline(self): ... def readlines(self, size: Optional[Any] = ...): ... # Constants responses: Dict[int, str] HTTP_PORT: int HTTPS_PORT: int # status codes # informational CONTINUE: int SWITCHING_PROTOCOLS: int PROCESSING: int # successful OK: int CREATED: int ACCEPTED: int NON_AUTHORITATIVE_INFORMATION: int NO_CONTENT: int RESET_CONTENT: int PARTIAL_CONTENT: int MULTI_STATUS: int IM_USED: int # redirection MULTIPLE_CHOICES: int MOVED_PERMANENTLY: int FOUND: int SEE_OTHER: int NOT_MODIFIED: int USE_PROXY: int TEMPORARY_REDIRECT: int # client error BAD_REQUEST: int UNAUTHORIZED: int PAYMENT_REQUIRED: int FORBIDDEN: int NOT_FOUND: int METHOD_NOT_ALLOWED: int NOT_ACCEPTABLE: int PROXY_AUTHENTICATION_REQUIRED: int REQUEST_TIMEOUT: int CONFLICT: int GONE: int LENGTH_REQUIRED: int PRECONDITION_FAILED: int REQUEST_ENTITY_TOO_LARGE: int REQUEST_URI_TOO_LONG: int UNSUPPORTED_MEDIA_TYPE: int REQUESTED_RANGE_NOT_SATISFIABLE: int EXPECTATION_FAILED: int UNPROCESSABLE_ENTITY: int LOCKED: int FAILED_DEPENDENCY: int UPGRADE_REQUIRED: int # server error INTERNAL_SERVER_ERROR: int NOT_IMPLEMENTED: int BAD_GATEWAY: int SERVICE_UNAVAILABLE: int GATEWAY_TIMEOUT: int HTTP_VERSION_NOT_SUPPORTED: int INSUFFICIENT_STORAGE: int NOT_EXTENDED: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/subprocess.pyi0000664000175000017500000000735313577124116024041 0ustar davedave00000000000000# Stubs for subprocess # Based on http://docs.python.org/2/library/subprocess.html and Python 3 stub from typing import ( Sequence, Any, Mapping, Callable, Tuple, IO, Union, Optional, List, Text, TypeVar, Generic, ) _FILE = Union[None, int, IO[Any]] _TXT = Union[bytes, Text] _CMD = Union[_TXT, Sequence[_TXT]] _ENV = Union[Mapping[bytes, _TXT], Mapping[Text, _TXT]] # Same args as Popen.__init__ def call(args: _CMD, bufsize: int = ..., executable: _TXT = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: _TXT = ..., env: _ENV = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ...) -> int: ... def check_call(args: _CMD, bufsize: int = ..., executable: _TXT = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: _TXT = ..., env: _ENV = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ...) -> int: ... # Same args as Popen.__init__ except for stdout def check_output(args: _CMD, bufsize: int = ..., executable: _TXT = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: _TXT = ..., env: _ENV = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ...) -> bytes: ... PIPE: int STDOUT: int class CalledProcessError(Exception): returncode: int # morally: _CMD cmd: Any # morally: Optional[bytes] output: bytes def __init__(self, returncode: int, cmd: _CMD, output: Optional[bytes] = ...) -> None: ... # We use a dummy type variable used to make Popen generic like it is in python 3 _T = TypeVar('_T', bound=bytes) class Popen(Generic[_T]): stdin: Optional[IO[bytes]] stdout: Optional[IO[bytes]] stderr: Optional[IO[bytes]] pid: int returncode: int def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_TXT] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_TXT] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ...) -> Popen[bytes]: ... def poll(self) -> int: ... def wait(self) -> int: ... # morally: -> Tuple[Optional[bytes], Optional[bytes]] def communicate(self, input: Optional[_TXT] = ...) -> Tuple[bytes, bytes]: ... def send_signal(self, signal: int) -> None: ... def terminate(self) -> None: ... def kill(self) -> None: ... def list2cmdline(seq: Sequence[str]) -> str: ... # undocumented # Windows-only: STARTUPINFO etc. STD_INPUT_HANDLE: Any STD_OUTPUT_HANDLE: Any STD_ERROR_HANDLE: Any SW_HIDE: Any STARTF_USESTDHANDLES: Any STARTF_USESHOWWINDOW: Any CREATE_NEW_CONSOLE: Any CREATE_NEW_PROCESS_GROUP: Any jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/urllib2.pyi0000664000175000017500000002022113577124116023211 0ustar davedave00000000000000 import ssl from typing import Any, AnyStr, Dict, List, Union, Optional, Mapping, Callable, Sequence, Text, Tuple, Type from urllib import addinfourl from httplib import HTTPConnectionProtocol, HTTPResponse _string = Union[str, unicode] class URLError(IOError): reason: Union[str, BaseException] class HTTPError(URLError, addinfourl): code: int headers: Mapping[str, str] def __init__(self, url, code: int, msg: str, hdrs: Mapping[str, str], fp: addinfourl) -> None: ... class Request(object): host: str port: str data: str headers: Dict[str, str] unverifiable: bool type: Optional[str] origin_req_host = ... unredirected_hdrs: Dict[str, str] def __init__(self, url: str, data: Optional[str] = ..., headers: Dict[str, str] = ..., origin_req_host: Optional[str] = ..., unverifiable: bool = ...) -> None: ... def __getattr__(self, attr): ... def get_method(self) -> str: ... def add_data(self, data) -> None: ... def has_data(self) -> bool: ... def get_data(self) -> str: ... def get_full_url(self) -> str: ... def get_type(self): ... def get_host(self) -> str: ... def get_selector(self): ... def set_proxy(self, host, type) -> None: ... def has_proxy(self) -> bool: ... def get_origin_req_host(self) -> str: ... def is_unverifiable(self) -> bool: ... def add_header(self, key: str, val: str) -> None: ... def add_unredirected_header(self, key: str, val: str) -> None: ... def has_header(self, header_name: str) -> bool: ... def get_header(self, header_name: str, default: Optional[str] = ...) -> str: ... def header_items(self): ... class OpenerDirector(object): addheaders: List[Tuple[str, str]] def add_handler(self, handler: BaseHandler) -> None: ... def open(self, fullurl: Union[Request, _string], data: Optional[_string] = ..., timeout: Optional[float] = ...) -> Optional[addinfourl]: ... def error(self, proto: _string, *args: Any): ... # Note that this type is somewhat a lie. The return *can* be None if # a custom opener has been installed that fails to handle the request. def urlopen(url: Union[Request, _string], data: Optional[_string] = ..., timeout: Optional[float] = ..., cafile: Optional[_string] = ..., capath: Optional[_string] = ..., cadefault: bool = ..., context: Optional[ssl.SSLContext] = ...) -> addinfourl: ... def install_opener(opener: OpenerDirector) -> None: ... def build_opener(*handlers: Union[BaseHandler, Type[BaseHandler]]) -> OpenerDirector: ... class BaseHandler: handler_order: int parent: OpenerDirector def add_parent(self, parent: OpenerDirector) -> None: ... def close(self) -> None: ... def __lt__(self, other: Any) -> bool: ... class HTTPErrorProcessor(BaseHandler): def http_response(self, request, response): ... class HTTPDefaultErrorHandler(BaseHandler): def http_error_default(self, req: Request, fp: addinfourl, code: int, msg: str, hdrs: Mapping[str, str]): ... class HTTPRedirectHandler(BaseHandler): max_repeats: int max_redirections: int def redirect_request(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str], newurl): ... def http_error_301(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... def http_error_302(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... def http_error_303(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... def http_error_307(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... inf_msg: str class ProxyHandler(BaseHandler): proxies: Mapping[str, str] def __init__(self, proxies: Optional[Mapping[str, str]] = ...): ... def proxy_open(self, req: Request, proxy, type): ... class HTTPPasswordMgr: def __init__(self) -> None: ... def add_password(self, realm: Optional[Text], uri: Union[Text, Sequence[Text]], user: Text, passwd: Text) -> None: ... def find_user_password(self, realm: Optional[Text], authuri: Text) -> Tuple[Any, Any]: ... def reduce_uri(self, uri: _string, default_port: bool = ...) -> Tuple[Any, Any]: ... def is_suburi(self, base: _string, test: _string) -> bool: ... class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr): ... class AbstractBasicAuthHandler: def __init__(self, password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ... def add_password(self, realm: Optional[Text], uri: Union[Text, Sequence[Text]], user: Text, passwd: Text) -> None: ... def http_error_auth_reqed(self, authreq, host, req: Request, headers: Mapping[str, str]): ... def retry_http_basic_auth(self, host, req: Request, realm): ... class HTTPBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler): auth_header: str def http_error_401(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... class ProxyBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler): auth_header: str def http_error_407(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... class AbstractDigestAuthHandler: def __init__(self, passwd: Optional[HTTPPasswordMgr] = ...) -> None: ... def add_password(self, realm: Optional[Text], uri: Union[Text, Sequence[Text]], user: Text, passwd: Text) -> None: ... def reset_retry_count(self) -> None: ... def http_error_auth_reqed(self, auth_header: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ... def retry_http_digest_auth(self, req: Request, auth: str) -> Optional[HTTPResponse]: ... def get_cnonce(self, nonce: str) -> str: ... def get_authorization(self, req: Request, chal: Mapping[str, str]) -> str: ... def get_algorithm_impls(self, algorithm: str) -> Tuple[Callable[[str], str], Callable[[str, str], str]]: ... def get_entity_digest(self, data: Optional[bytes], chal: Mapping[str, str]) -> Optional[str]: ... class HTTPDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): auth_header: str handler_order: int def http_error_401(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): auth_header: str handler_order: int def http_error_407(self, req: Request, fp: addinfourl, code: int, msg: str, headers: Mapping[str, str]): ... class AbstractHTTPHandler(BaseHandler): # undocumented def __init__(self, debuglevel: int = ...) -> None: ... def set_http_debuglevel(self, level: int) -> None: ... def do_request_(self, request: Request) -> Request: ... def do_open(self, http_class: HTTPConnectionProtocol, req: Request, **http_conn_args: Optional[Any]) -> addinfourl: ... class HTTPHandler(AbstractHTTPHandler): def http_open(self, req: Request) -> addinfourl: ... def http_request(self, request: Request) -> Request: ... # undocumented class HTTPSHandler(AbstractHTTPHandler): def __init__(self, debuglevel: int = ..., context: Optional[ssl.SSLContext] = ...) -> None: ... def https_open(self, req: Request) -> addinfourl: ... def https_request(self, request: Request) -> Request: ... # undocumented class HTTPCookieProcessor(BaseHandler): def __init__(self, cookiejar: Optional[Any] = ...): ... def http_request(self, request: Request): ... def http_response(self, request: Request, response): ... class UnknownHandler(BaseHandler): def unknown_open(self, req: Request): ... class FileHandler(BaseHandler): def file_open(self, req: Request): ... def get_names(self): ... def open_local_file(self, req: Request): ... class FTPHandler(BaseHandler): def ftp_open(self, req: Request): ... def connect_ftp(self, user, passwd, host, port, dirs, timeout): ... class CacheFTPHandler(FTPHandler): def __init__(self) -> None: ... def setTimeout(self, t: Optional[float]): ... def setMaxConns(self, m: int): ... def check_cache(self): ... def clear_cache(self): ... def parse_http_list(s: AnyStr) -> List[AnyStr]: ... def parse_keqv_list(l: List[AnyStr]) -> Dict[AnyStr, AnyStr]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/os2emxpath.pyi0000664000175000017500000001412413577124116023735 0ustar davedave00000000000000# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! # Stubs for os.path # Ron Murawski import os import sys from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional _T = TypeVar('_T') if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] _StrPath = Union[Text, _PathLike[Text]] _BytesPath = Union[bytes, _PathLike[bytes]] else: _PathType = Union[bytes, Text] _StrPath = Text _BytesPath = bytes # ----- os.path variables ----- supports_unicode_filenames: bool # aliases (also in os) curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str devnull: str # ----- os.path function stubs ----- if sys.version_info >= (3, 6): # Overloads are necessary to work around python/mypy#3644. @overload def abspath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def basename(path: AnyStr) -> AnyStr: ... @overload def dirname(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(path: AnyStr) -> AnyStr: ... @overload def expanduser(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expanduser(path: AnyStr) -> AnyStr: ... @overload def expandvars(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normcase(path: AnyStr) -> AnyStr: ... @overload def normpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': @overload def realpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(path: AnyStr) -> AnyStr: ... else: @overload def realpath(filename: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(filename: AnyStr) -> AnyStr: ... else: def abspath(path: AnyStr) -> AnyStr: ... def basename(path: AnyStr) -> AnyStr: ... def dirname(path: AnyStr) -> AnyStr: ... def expanduser(path: AnyStr) -> AnyStr: ... def expandvars(path: AnyStr) -> AnyStr: ... def normcase(path: AnyStr) -> AnyStr: ... def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': def realpath(path: AnyStr) -> AnyStr: ... else: def realpath(filename: AnyStr) -> AnyStr: ... if sys.version_info >= (3, 6): # In reality it returns str for sequences of _StrPath and bytes for sequences # of _BytesPath, but mypy does not accept such a signature. def commonpath(paths: Sequence[_PathType]) -> Any: ... elif sys.version_info >= (3, 5): def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ... # NOTE: Empty lists results in '' (str) regardless of contained type. # Also, in Python 2 mixed sequences of Text and bytes results in either Text or bytes # So, fall back to Any def commonprefix(list: Sequence[_PathType]) -> Any: ... if sys.version_info >= (3, 3): def exists(path: Union[_PathType, int]) -> bool: ... else: def exists(path: _PathType) -> bool: ... def lexists(path: _PathType) -> bool: ... # These return float if os.stat_float_times() == True, # but int is a subclass of float. def getatime(path: _PathType) -> float: ... def getmtime(path: _PathType) -> float: ... def getctime(path: _PathType) -> float: ... def getsize(path: _PathType) -> int: ... def isabs(path: _PathType) -> bool: ... def isfile(path: _PathType) -> bool: ... def isdir(path: _PathType) -> bool: ... def islink(path: _PathType) -> bool: ... def ismount(path: _PathType) -> bool: ... if sys.version_info < (3, 0): # Make sure signatures are disjunct, and allow combinations of bytes and unicode. # (Since Python 2 allows that, too) # Note that e.g. os.path.join("a", "b", "c", "d", u"e") will still result in # a type error. @overload def join(__p1: bytes, *p: bytes) -> bytes: ... @overload def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ... @overload def join(__p1: Text, *p: _PathType) -> Text: ... elif sys.version_info >= (3, 6): # Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway. @overload def join(path: _StrPath, *paths: _StrPath) -> Text: ... @overload def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ... else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... def samefile(path1: _PathType, path2: _PathType) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ... if sys.version_info >= (3, 6): @overload def split(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... else: def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... if sys.platform == 'win32': def splitunc(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # deprecated if sys.version_info < (3,): def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/symbol.pyi0000664000175000017500000000253413577124116023152 0ustar davedave00000000000000# Stubs for symbol (Python 2) from typing import Dict single_input: int file_input: int eval_input: int decorator: int decorators: int decorated: int funcdef: int parameters: int varargslist: int fpdef: int fplist: int stmt: int simple_stmt: int small_stmt: int expr_stmt: int augassign: int print_stmt: int del_stmt: int pass_stmt: int flow_stmt: int break_stmt: int continue_stmt: int return_stmt: int yield_stmt: int raise_stmt: int import_stmt: int import_name: int import_from: int import_as_name: int dotted_as_name: int import_as_names: int dotted_as_names: int dotted_name: int global_stmt: int exec_stmt: int assert_stmt: int compound_stmt: int if_stmt: int while_stmt: int for_stmt: int try_stmt: int with_stmt: int with_item: int except_clause: int suite: int testlist_safe: int old_test: int old_lambdef: int test: int or_test: int and_test: int not_test: int comparison: int comp_op: int expr: int xor_expr: int and_expr: int shift_expr: int arith_expr: int term: int factor: int power: int atom: int listmaker: int testlist_comp: int lambdef: int trailer: int subscriptlist: int subscript: int sliceop: int exprlist: int testlist: int dictorsetmaker: int classdef: int arglist: int argument: int list_iter: int list_for: int list_if: int comp_iter: int comp_for: int comp_if: int testlist1: int encoding_decl: int yield_expr: int sym_name: Dict[int, str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/strop.pyi0000664000175000017500000000225613577124116023015 0ustar davedave00000000000000"""Stub file for the 'strop' module.""" from typing import List, Sequence lowercase: str uppercase: str whitespace: str def atof(a: str) -> float: ... def atoi(a: str, base: int = ...) -> int: ... def atol(a: str, base: int = ...) -> long: ... def capitalize(s: str) -> str: ... def count(s: str, sub: str, start: int = ..., end: int = ...) -> int: ... def expandtabs(string: str, tabsize: int = ...) -> str: ... def find(s: str, sub: str, start: int = ..., end: int = ...) -> int: ... def join(list: Sequence[str], sep: str = ...) -> str: ... def joinfields(list: Sequence[str], sep: str = ...) -> str: ... def lower(s: str) -> str: ... def lstrip(s: str) -> str: ... def maketrans(frm: str, to: str) -> str: ... def replace(s: str, old: str, new: str, maxsplit: int = ...) -> str: ... def rfind(s: str, sub: str, start: int = ..., end: int = ...) -> int: ... def rstrip(s: str) -> str: ... def split(s: str, sep: str, maxsplit: int = ...) -> List[str]: ... def splitfields(s: str, sep: str, maxsplit: int = ...) -> List[str]: ... def strip(s: str) -> str: ... def swapcase(s: str) -> str: ... def translate(s: str, table: str, deletechars: str = ...) -> str: ... def upper(s: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/shlex.pyi0000664000175000017500000000175013577124116022767 0ustar davedave00000000000000from typing import Any, IO, List, Optional, TypeVar def split(s: Optional[str], comments: bool = ..., posix: bool = ...) -> List[str]: ... _SLT = TypeVar('_SLT', bound=shlex) class shlex: def __init__(self, instream: IO[Any] = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ... def __iter__(self: _SLT) -> _SLT: ... def next(self) -> str: ... def get_token(self) -> Optional[str]: ... def push_token(self, _str: str) -> None: ... def read_token(self) -> str: ... def sourcehook(self, filename: str) -> None: ... def push_source(self, stream: IO[Any], filename: str = ...) -> None: ... def pop_source(self) -> IO[Any]: ... def error_leader(self, file: str = ..., line: int = ...) -> str: ... commenters: str wordchars: str whitespace: str escape: str quotes: str escapedquotes: str whitespace_split: bool infile: IO[Any] source: Optional[str] debug: int lineno: int token: Any eof: Optional[str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/signal.pyi0000664000175000017500000000304313577124116023116 0ustar davedave00000000000000from typing import Callable, Any, Tuple, Union from types import FrameType SIG_DFL: int = ... SIG_IGN: int = ... ITIMER_REAL: int = ... ITIMER_VIRTUAL: int = ... ITIMER_PROF: int = ... NSIG: int = ... SIGABRT: int = ... SIGALRM: int = ... SIGBREAK: int = ... # Windows SIGBUS: int = ... SIGCHLD: int = ... SIGCLD: int = ... SIGCONT: int = ... SIGEMT: int = ... SIGFPE: int = ... SIGHUP: int = ... SIGILL: int = ... SIGINFO: int = ... SIGINT: int = ... SIGIO: int = ... SIGIOT: int = ... SIGKILL: int = ... SIGPIPE: int = ... SIGPOLL: int = ... SIGPROF: int = ... SIGPWR: int = ... SIGQUIT: int = ... SIGRTMAX: int = ... SIGRTMIN: int = ... SIGSEGV: int = ... SIGSTOP: int = ... SIGSYS: int = ... SIGTERM: int = ... SIGTRAP: int = ... SIGTSTP: int = ... SIGTTIN: int = ... SIGTTOU: int = ... SIGURG: int = ... SIGUSR1: int = ... SIGUSR2: int = ... SIGVTALRM: int = ... SIGWINCH: int = ... SIGXCPU: int = ... SIGXFSZ: int = ... # Windows CTRL_C_EVENT: int = ... CTRL_BREAK_EVENT: int = ... class ItimerError(IOError): ... _HANDLER = Union[Callable[[int, FrameType], None], int, None] def alarm(time: int) -> int: ... def getsignal(signalnum: int) -> _HANDLER: ... def pause() -> None: ... def setitimer(which: int, seconds: float, interval: float = ...) -> Tuple[float, float]: ... def getitimer(which: int) -> Tuple[float, float]: ... def set_wakeup_fd(fd: int) -> int: ... def siginterrupt(signalnum: int, flag: bool) -> None: ... def signal(signalnum: int, handler: _HANDLER) -> _HANDLER: ... def default_int_handler(signum: int, frame: FrameType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/unittest.pyi0000664000175000017500000003236713577124116023533 0ustar davedave00000000000000# Stubs for unittest # Based on http://docs.python.org/2.7/library/unittest.html from typing import (Any, Callable, Dict, FrozenSet, Iterable, Iterator, List, Mapping, NoReturn, Optional, overload, Pattern, Sequence, Set, Text, TextIO, Tuple, Type, TypeVar, Union) from abc import abstractmethod, ABCMeta import datetime import types _T = TypeVar('_T') _FT = TypeVar('_FT') _ExceptionType = Union[Type[BaseException], Tuple[Type[BaseException], ...]] _Regexp = Union[Text, Pattern[Text]] class Testable(metaclass=ABCMeta): @abstractmethod def run(self, result: TestResult) -> None: ... @abstractmethod def debug(self) -> None: ... @abstractmethod def countTestCases(self) -> int: ... # TODO ABC for test runners? class TestResult: errors: List[Tuple[Testable, str]] failures: List[Tuple[Testable, str]] skipped: List[Tuple[Testable, str]] expectedFailures: List[Tuple[Testable, str]] unexpectedSuccesses: List[Testable] shouldStop: bool testsRun: int buffer: bool failfast: bool def wasSuccessful(self) -> bool: ... def stop(self) -> None: ... def startTest(self, test: Testable) -> None: ... def stopTest(self, test: Testable) -> None: ... def startTestRun(self) -> None: ... def stopTestRun(self) -> None: ... def addError(self, test: Testable, err: Tuple[type, Any, Any]) -> None: ... # TODO def addFailure(self, test: Testable, err: Tuple[type, Any, Any]) -> None: ... # TODO def addSuccess(self, test: Testable) -> None: ... def addSkip(self, test: Testable, reason: str) -> None: ... def addExpectedFailure(self, test: Testable, err: str) -> None: ... def addUnexpectedSuccess(self, test: Testable) -> None: ... class _AssertRaisesBaseContext: expected: Any failureException: Type[BaseException] obj_name: str expected_regex: Pattern[str] class _AssertRaisesContext(_AssertRaisesBaseContext): exception: Any def __enter__(self) -> _AssertRaisesContext: ... def __exit__(self, exc_type, exc_value, tb) -> bool: ... class TestCase(Testable): failureException: Type[BaseException] longMessage: bool maxDiff: Optional[int] # undocumented _testMethodName: str def __init__(self, methodName: str = ...) -> None: ... def setUp(self) -> None: ... def tearDown(self) -> None: ... @classmethod def setUpClass(cls) -> None: ... @classmethod def tearDownClass(cls) -> None: ... def run(self, result: TestResult = ...) -> None: ... def debug(self) -> None: ... def assert_(self, expr: Any, msg: object = ...) -> None: ... def failUnless(self, expr: Any, msg: object = ...) -> None: ... def assertTrue(self, expr: Any, msg: object = ...) -> None: ... def assertEqual(self, first: Any, second: Any, msg: object = ...) -> None: ... def assertEquals(self, first: Any, second: Any, msg: object = ...) -> None: ... def failUnlessEqual(self, first: Any, second: Any, msg: object = ...) -> None: ... def assertNotEqual(self, first: Any, second: Any, msg: object = ...) -> None: ... def assertNotEquals(self, first: Any, second: Any, msg: object = ...) -> None: ... def failIfEqual(self, first: Any, second: Any, msg: object = ...) -> None: ... @overload def assertAlmostEqual(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... @overload def assertAlmostEqual(self, first: float, second: float, *, msg: Any = ..., delta: float = ...) -> None: ... @overload def assertAlmostEqual(self, first: datetime.datetime, second: datetime.datetime, *, msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... @overload def assertAlmostEquals(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... @overload def assertAlmostEquals(self, first: float, second: float, *, msg: Any = ..., delta: float = ...) -> None: ... @overload def assertAlmostEquals(self, first: datetime.datetime, second: datetime.datetime, *, msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... def failUnlessAlmostEqual(self, first: float, second: float, places: int = ..., msg: object = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: float, second: float, *, msg: Any = ..., delta: float = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: datetime.datetime, second: datetime.datetime, *, msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... @overload def assertNotAlmostEquals(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... @overload def assertNotAlmostEquals(self, first: float, second: float, *, msg: Any = ..., delta: float = ...) -> None: ... @overload def assertNotAlmostEquals(self, first: datetime.datetime, second: datetime.datetime, *, msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... def failIfAlmostEqual(self, first: float, second: float, places: int = ..., msg: object = ..., delta: float = ...) -> None: ... def assertGreater(self, first: Any, second: Any, msg: object = ...) -> None: ... def assertGreaterEqual(self, first: Any, second: Any, msg: object = ...) -> None: ... def assertMultiLineEqual(self, first: str, second: str, msg: object = ...) -> None: ... def assertSequenceEqual(self, first: Sequence[Any], second: Sequence[Any], msg: object = ..., seq_type: type = ...) -> None: ... def assertListEqual(self, first: List[Any], second: List[Any], msg: object = ...) -> None: ... def assertTupleEqual(self, first: Tuple[Any, ...], second: Tuple[Any, ...], msg: object = ...) -> None: ... def assertSetEqual(self, first: Union[Set[Any], FrozenSet[Any]], second: Union[Set[Any], FrozenSet[Any]], msg: object = ...) -> None: ... def assertDictEqual(self, first: Dict[Any, Any], second: Dict[Any, Any], msg: object = ...) -> None: ... def assertLess(self, first: Any, second: Any, msg: object = ...) -> None: ... def assertLessEqual(self, first: Any, second: Any, msg: object = ...) -> None: ... @overload def assertRaises(self, exception: _ExceptionType, callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertRaises(self, exception: _ExceptionType) -> _AssertRaisesContext: ... @overload def assertRaisesRegexp(self, exception: _ExceptionType, regexp: _Regexp, callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertRaisesRegexp(self, exception: _ExceptionType, regexp: _Regexp) -> _AssertRaisesContext: ... def assertRegexpMatches(self, text: Text, regexp: _Regexp, msg: object = ...) -> None: ... def assertNotRegexpMatches(self, text: Text, regexp: _Regexp, msg: object = ...) -> None: ... def assertItemsEqual(self, first: Iterable[Any], second: Iterable[Any], msg: object = ...) -> None: ... def assertDictContainsSubset(self, expected: Mapping[Any, Any], actual: Mapping[Any, Any], msg: object = ...) -> None: ... def addTypeEqualityFunc(self, typeobj: type, function: Callable[..., None]) -> None: ... @overload def failUnlessRaises(self, exception: _ExceptionType, callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def failUnlessRaises(self, exception: _ExceptionType) -> _AssertRaisesContext: ... def failIf(self, expr: Any, msg: object = ...) -> None: ... def assertFalse(self, expr: Any, msg: object = ...) -> None: ... def assertIs(self, first: object, second: object, msg: object = ...) -> None: ... def assertIsNot(self, first: object, second: object, msg: object = ...) -> None: ... def assertIsNone(self, expr: Any, msg: object = ...) -> None: ... def assertIsNotNone(self, expr: Any, msg: object = ...) -> None: ... def assertIn(self, first: _T, second: Iterable[_T], msg: object = ...) -> None: ... def assertNotIn(self, first: _T, second: Iterable[_T], msg: object = ...) -> None: ... def assertIsInstance(self, obj: Any, cls: Union[type, Tuple[type, ...]], msg: object = ...) -> None: ... def assertNotIsInstance(self, obj: Any, cls: Union[type, Tuple[type, ...]], msg: object = ...) -> None: ... def fail(self, msg: object = ...) -> NoReturn: ... def countTestCases(self) -> int: ... def defaultTestResult(self) -> TestResult: ... def id(self) -> str: ... def shortDescription(self) -> str: ... # May return None def addCleanup(self, function: Any, *args: Any, **kwargs: Any) -> None: ... def doCleanups(self) -> bool: ... def skipTest(self, reason: Any) -> None: ... def _formatMessage(self, msg: Optional[Text], standardMsg: Text) -> str: ... # undocumented def _getAssertEqualityFunc(self, first: Any, second: Any) -> Callable[..., None]: ... # undocumented class FunctionTestCase(Testable): def __init__(self, testFunc: Callable[[], None], setUp: Optional[Callable[[], None]] = ..., tearDown: Optional[Callable[[], None]] = ..., description: Optional[str] = ...) -> None: ... def run(self, result: TestResult) -> None: ... def debug(self) -> None: ... def countTestCases(self) -> int: ... class TestSuite(Testable): def __init__(self, tests: Iterable[Testable] = ...) -> None: ... def addTest(self, test: Testable) -> None: ... def addTests(self, tests: Iterable[Testable]) -> None: ... def run(self, result: TestResult) -> None: ... def debug(self) -> None: ... def countTestCases(self) -> int: ... def __iter__(self) -> Iterator[Testable]: ... class TestLoader: testMethodPrefix: str sortTestMethodsUsing: Optional[Callable[[str, str], int]] suiteClass: Callable[[List[TestCase]], TestSuite] def loadTestsFromTestCase(self, testCaseClass: Type[TestCase]) -> TestSuite: ... def loadTestsFromModule(self, module: types.ModuleType = ..., use_load_tests: bool = ...) -> TestSuite: ... def loadTestsFromName(self, name: str = ..., module: Optional[types.ModuleType] = ...) -> TestSuite: ... def loadTestsFromNames(self, names: List[str] = ..., module: Optional[types.ModuleType] = ...) -> TestSuite: ... def discover(self, start_dir: str, pattern: str = ..., top_level_dir: Optional[str] = ...) -> TestSuite: ... def getTestCaseNames(self, testCaseClass: Type[TestCase] = ...) -> List[str]: ... defaultTestLoader: TestLoader class TextTestResult(TestResult): def __init__(self, stream: TextIO, descriptions: bool, verbosity: int) -> None: ... class TextTestRunner: def __init__(self, stream: Optional[TextIO] = ..., descriptions: bool = ..., verbosity: int = ..., failfast: bool = ..., buffer: bool = ..., resultclass: Optional[Type[TestResult]] = ...) -> None: ... def _makeResult(self) -> TestResult: ... class SkipTest(Exception): ... # TODO precise types def skipUnless(condition: Any, reason: Union[str, unicode]) -> Any: ... def skipIf(condition: Any, reason: Union[str, unicode]) -> Any: ... def expectedFailure(func: _FT) -> _FT: ... def skip(reason: Union[str, unicode]) -> Any: ... # not really documented class TestProgram: result: TestResult def runTests(self) -> None: ... # undocumented def main(module: Union[None, Text, types.ModuleType] = ..., defaultTest: Optional[str] = ..., argv: Optional[Sequence[str]] = ..., testRunner: Union[Type[TextTestRunner], TextTestRunner, None] = ..., testLoader: TestLoader = ..., exit: bool = ..., verbosity: int = ..., failfast: Optional[bool] = ..., catchbreak: Optional[bool] = ..., buffer: Optional[bool] = ...) -> TestProgram: ... def load_tests(loader: TestLoader, tests: TestSuite, pattern: Optional[Text]) -> TestSuite: ... def installHandler() -> None: ... def registerResult(result: TestResult) -> None: ... def removeResult(result: TestResult) -> bool: ... @overload def removeHandler() -> None: ... @overload def removeHandler(function: Callable[..., Any]) -> Callable[..., Any]: ... # private but occasionally used util: types.ModuleType jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_threading_local.pyi0000664000175000017500000000061013577124116025114 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/_threading_local.py from typing import Any class _localbase(object): ... class local(_localbase): def __getattribute__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __delattr__(self, name: str) -> None: ... def __del__(self) -> None: ... def _patch(self: local) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/posix.pyi0000664000175000017500000001433313577124116023007 0ustar davedave00000000000000from typing import AnyStr, Dict, List, Mapping, Tuple, Union, Sequence, IO, Optional, TypeVar error = OSError confstr_names: Dict[str, int] environ: Dict[str, str] pathconf_names: Dict[str, int] sysconf_names: Dict[str, int] _T = TypeVar("_T") EX_CANTCREAT: int EX_CONFIG: int EX_DATAERR: int EX_IOERR: int EX_NOHOST: int EX_NOINPUT: int EX_NOPERM: int EX_NOUSER: int EX_OK: int EX_OSERR: int EX_OSFILE: int EX_PROTOCOL: int EX_SOFTWARE: int EX_TEMPFAIL: int EX_UNAVAILABLE: int EX_USAGE: int F_OK: int NGROUPS_MAX: int O_APPEND: int O_ASYNC: int O_CREAT: int O_DIRECT: int O_DIRECTORY: int O_DSYNC: int O_EXCL: int O_LARGEFILE: int O_NDELAY: int O_NOATIME: int O_NOCTTY: int O_NOFOLLOW: int O_NONBLOCK: int O_RDONLY: int O_RDWR: int O_RSYNC: int O_SYNC: int O_TRUNC: int O_WRONLY: int R_OK: int TMP_MAX: int WCONTINUED: int WNOHANG: int WUNTRACED: int W_OK: int X_OK: int def WCOREDUMP(status: int) -> bool: ... def WEXITSTATUS(status: int) -> bool: ... def WIFCONTINUED(status: int) -> bool: ... def WIFEXITED(status: int) -> bool: ... def WIFSIGNALED(status: int) -> bool: ... def WIFSTOPPED(status: int) -> bool: ... def WSTOPSIG(status: int) -> bool: ... def WTERMSIG(status: int) -> bool: ... class stat_result(object): n_fields: int n_sequence_fields: int n_unnamed_fields: int st_mode: int st_ino: int st_dev: int st_nlink: int st_uid: int st_gid: int st_size: int st_atime: int st_mtime: int st_ctime: int class statvfs_result(object): n_fields: int n_sequence_fields: int n_unnamed_fields: int f_bsize: int f_frsize: int f_blocks: int f_bfree: int f_bavail: int f_files: int f_ffree: int f_favail: int f_flag: int f_namemax: int def _exit(status: int) -> None: ... def abort() -> None: ... def access(path: unicode, mode: int) -> bool: ... def chdir(path: unicode) -> None: ... def chmod(path: unicode, mode: int) -> None: ... def chown(path: unicode, uid: int, gid: int) -> None: ... def chroot(path: unicode) -> None: ... def close(fd: int) -> None: ... def closerange(fd_low: int, fd_high: int) -> None: ... def confstr(name: Union[str, int]) -> str: ... def ctermid() -> str: ... def dup(fd: int) -> int: ... def dup2(fd: int, fd2: int) -> None: ... def execv(path: str, args: Sequence[str], env: Mapping[str, str]) -> None: ... def execve(path: str, args: Sequence[str], env: Mapping[str, str]) -> None: ... def fchdir(fd: int) -> None: ... def fchmod(fd: int, mode: int) -> None: ... def fchown(fd: int, uid: int, gid: int) -> None: ... def fdatasync(fd: int) -> None: ... def fdopen(fd: int, mode: str = ..., bufsize: int = ...) -> IO[str]: ... def fork() -> int: ... def forkpty() -> Tuple[int, int]: ... def fpathconf(fd: int, name: str) -> None: ... def fstat(fd: int) -> stat_result: ... def fstatvfs(fd: int) -> statvfs_result: ... def fsync(fd: int) -> None: ... def ftruncate(fd: int, length: int) -> None: ... def getcwd() -> str: ... def getcwdu() -> unicode: ... def getegid() -> int: ... def geteuid() -> int: ... def getgid() -> int: ... def getgroups() -> List[int]: ... def getloadavg() -> Tuple[float, float, float]: ... def getlogin() -> str: ... def getpgid(pid: int) -> int: ... def getpgrp() -> int: ... def getpid() -> int: ... def getppid() -> int: ... def getresgid() -> Tuple[int, int, int]: ... def getresuid() -> Tuple[int, int, int]: ... def getsid(pid: int) -> int: ... def getuid() -> int: ... def initgroups(username: str, gid: int) -> None: ... def isatty(fd: int) -> bool: ... def kill(pid: int, sig: int) -> None: ... def killpg(pgid: int, sig: int) -> None: ... def lchown(path: unicode, uid: int, gid: int) -> None: ... def link(source: unicode, link_name: str) -> None: ... def listdir(path: AnyStr) -> List[AnyStr]: ... def lseek(fd: int, pos: int, how: int) -> None: ... def lstat(path: unicode) -> stat_result: ... def major(device: int) -> int: ... def makedev(major: int, minor: int) -> int: ... def minor(device: int) -> int: ... def mkdir(path: unicode, mode: int = ...) -> None: ... def mkfifo(path: unicode, mode: int = ...) -> None: ... def mknod(filename: unicode, mode: int = ..., device: int = ...) -> None: ... def nice(increment: int) -> int: ... def open(file: unicode, flags: int, mode: int = ...) -> int: ... def openpty() -> Tuple[int, int]: ... def pathconf(path: unicode, name: str) -> str: ... def pipe() -> Tuple[int, int]: ... def popen(command: str, mode: str = ..., bufsize: int = ...) -> IO[str]: ... def putenv(varname: str, value: str) -> None: ... def read(fd: int, n: int) -> str: ... def readlink(path: _T) -> _T: ... def remove(path: unicode) -> None: ... def rename(src: unicode, dst: unicode) -> None: ... def rmdir(path: unicode) -> None: ... def setegid(egid: int) -> None: ... def seteuid(euid: int) -> None: ... def setgid(gid: int) -> None: ... def setgroups(groups: Sequence[int]) -> None: ... def setpgid(pid: int, pgrp: int) -> None: ... def setpgrp() -> None: ... def setregid(rgid: int, egid: int) -> None: ... def setresgid(rgid: int, egid: int, sgid: int) -> None: ... def setresuid(ruid: int, euid: int, suid: int) -> None: ... def setreuid(ruid: int, euid: int) -> None: ... def setsid() -> None: ... def setuid(pid: int) -> None: ... def stat(path: unicode) -> stat_result: ... def statvfs(path: unicode) -> statvfs_result: ... def stat_float_times(fd: int) -> None: ... def strerror(code: int) -> str: ... def symlink(source: unicode, link_name: unicode) -> None: ... def sysconf(name: Union[str, int]) -> int: ... def system(command: unicode) -> int: ... def tcgetpgrp(fd: int) -> int: ... def tcsetpgrp(fd: int, pg: int) -> None: ... def times() -> Tuple[float, float, float, float, float]: ... def tmpfile() -> IO[str]: ... def ttyname(fd: int) -> str: ... def umask(mask: int) -> int: ... def uname() -> Tuple[str, str, str, str, str]: ... def unlink(path: unicode) -> None: ... def unsetenv(varname: str) -> None: ... def urandom(n: int) -> str: ... def utime(path: unicode, times: Optional[Tuple[int, int]]) -> None: ... def wait() -> int: ... _r = Tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int] def wait3(options: int) -> Tuple[int, int, _r]: ... def wait4(pid: int, options: int) -> Tuple[int, int, _r]: ... def waitpid(pid: int, options: int) -> int: ... def write(fd: int, str: str) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/SocketServer.pyi0000664000175000017500000000755613577124116024275 0ustar davedave00000000000000# NB: SocketServer.pyi and socketserver.pyi must remain consistent! # Stubs for socketserver from typing import Any, BinaryIO, Callable, Optional, Tuple, Type, Text, Union from socket import SocketType import sys import types class BaseServer: address_family: int RequestHandlerClass: Callable[..., BaseRequestHandler] server_address: Tuple[str, int] socket: SocketType allow_reuse_address: bool request_queue_size: int socket_type: int timeout: Optional[float] def __init__(self, server_address: Any, RequestHandlerClass: Callable[..., BaseRequestHandler]) -> None: ... def fileno(self) -> int: ... def handle_request(self) -> None: ... def serve_forever(self, poll_interval: float = ...) -> None: ... def shutdown(self) -> None: ... def server_close(self) -> None: ... def finish_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ... def get_request(self) -> None: ... def handle_error(self, request: bytes, client_address: Tuple[str, int]) -> None: ... def handle_timeout(self) -> None: ... def process_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ... def server_activate(self) -> None: ... def server_bind(self) -> None: ... def verify_request(self, request: bytes, client_address: Tuple[str, int]) -> bool: ... if sys.version_info >= (3, 6): def __enter__(self) -> BaseServer: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]) -> None: ... if sys.version_info >= (3, 3): def service_actions(self) -> None: ... class TCPServer(BaseServer): def __init__(self, server_address: Tuple[str, int], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... class UDPServer(BaseServer): def __init__(self, server_address: Tuple[str, int], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... if sys.platform != 'win32': class UnixStreamServer(BaseServer): def __init__(self, server_address: Union[Text, bytes], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... class UnixDatagramServer(BaseServer): def __init__(self, server_address: Union[Text, bytes], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... class ForkingMixIn: ... class ThreadingMixIn: ... class ForkingTCPServer(ForkingMixIn, TCPServer): ... class ForkingUDPServer(ForkingMixIn, UDPServer): ... class ThreadingTCPServer(ThreadingMixIn, TCPServer): ... class ThreadingUDPServer(ThreadingMixIn, UDPServer): ... if sys.platform != 'win32': class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ... class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ... class BaseRequestHandler: # Those are technically of types, respectively: # * Union[SocketType, Tuple[bytes, SocketType]] # * Union[Tuple[str, int], str] # But there are some concerns that having unions here would cause # too much inconvenience to people using it (see # https://github.com/python/typeshed/pull/384#issuecomment-234649696) request: Any client_address: Any server: BaseServer def setup(self) -> None: ... def handle(self) -> None: ... def finish(self) -> None: ... class StreamRequestHandler(BaseRequestHandler): rfile: BinaryIO wfile: BinaryIO class DatagramRequestHandler(BaseRequestHandler): rfile: BinaryIO wfile: BinaryIO jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/nturl2path.pyi0000664000175000017500000000016313577124116023744 0ustar davedave00000000000000from typing import AnyStr def url2pathname(url: AnyStr) -> AnyStr: ... def pathname2url(p: AnyStr) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/UserString.pyi0000664000175000017500000000740413577124116023753 0ustar davedave00000000000000import collections from typing import Any, Iterable, List, MutableSequence, Sequence, Optional, overload, Text, TypeVar, Tuple, Union _UST = TypeVar("_UST", bound=UserString) _MST = TypeVar("_MST", bound=MutableString) class UserString(Sequence[UserString]): data: unicode def __init__(self, seq: object) -> None: ... def __int__(self) -> int: ... def __long__(self) -> long: ... def __float__(self) -> float: ... def __complex__(self) -> complex: ... def __hash__(self) -> int: ... def __len__(self) -> int: ... @overload def __getitem__(self: _UST, i: int) -> _UST: ... @overload def __getitem__(self: _UST, s: slice) -> _UST: ... def __add__(self: _UST, other: Any) -> _UST: ... def __radd__(self: _UST, other: Any) -> _UST: ... def __mul__(self: _UST, other: int) -> _UST: ... def __rmul__(self: _UST, other: int) -> _UST: ... def __mod__(self: _UST, args: Any) -> _UST: ... def capitalize(self: _UST) -> _UST: ... def center(self: _UST, width: int, *args: Any) -> _UST: ... def count(self, sub: int, start: int = ..., end: int = ...) -> int: ... def decode(self: _UST, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> _UST: ... def encode(self: _UST, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> _UST: ... def endswith(self, suffix: Text, start: int = ..., end: int = ...) -> bool: ... def expandtabs(self: _UST, tabsize: int = ...) -> _UST: ... def find(self, sub: Text, start: int = ..., end: int = ...) -> int: ... def index(self, sub: Text, start: int = ..., end: int = ...) -> int: ... def isalpha(self) -> bool: ... def isalnum(self) -> bool: ... def isdecimal(self) -> bool: ... def isdigit(self) -> bool: ... def islower(self) -> bool: ... def isnumeric(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... def join(self, seq: Iterable[Text]) -> Text: ... def ljust(self: _UST, width: int, *args: Any) -> _UST: ... def lower(self: _UST) -> _UST: ... def lstrip(self: _UST, chars: Optional[Text] = ...) -> _UST: ... def partition(self, sep: Text) -> Tuple[Text, Text, Text]: ... def replace(self: _UST, old: Text, new: Text, maxsplit: int = ...) -> _UST: ... def rfind(self, sub: Text, start: int = ..., end: int = ...) -> int: ... def rindex(self, sub: Text, start: int = ..., end: int = ...) -> int: ... def rjust(self: _UST, width: int, *args: Any) -> _UST: ... def rpartition(self, sep: Text) -> Tuple[Text, Text, Text]: ... def rstrip(self: _UST, chars: Optional[Text] = ...) -> _UST: ... def split(self, sep: Optional[Text] = ..., maxsplit: int = ...) -> List[Text]: ... def rsplit(self, sep: Optional[Text] = ..., maxsplit: int = ...) -> List[Text]: ... def splitlines(self, keepends: int = ...) -> List[Text]: ... def startswith(self, suffix: Text, start: int = ..., end: int = ...) -> bool: ... def strip(self: _UST, chars: Optional[Text] = ...) -> _UST: ... def swapcase(self: _UST) -> _UST: ... def title(self: _UST) -> _UST: ... def translate(self: _UST, *args: Any) -> _UST: ... def upper(self: _UST) -> _UST: ... def zfill(self: _UST, width: int) -> _UST: ... class MutableString(UserString, MutableSequence[MutableString]): @overload def __getitem__(self: _MST, i: int) -> _MST: ... @overload def __getitem__(self: _MST, s: slice) -> _MST: ... def __setitem__(self, index: Union[int, slice], sub: Any) -> None: ... def __delitem__(self, index: Union[int, slice]) -> None: ... def immutable(self) -> UserString: ... def __iadd__(self: _MST, other: Any) -> _MST: ... def __imul__(self, n: int) -> _MST: ... def insert(self, index: int, value: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/random.pyi0000664000175000017500000000635713577124116023134 0ustar davedave00000000000000# Stubs for random # Ron Murawski # Updated by Jukka Lehtosalo # based on https://docs.python.org/2/library/random.html # ----- random classes ----- import _random from typing import AbstractSet, Any, Callable, Iterator, List, Protocol, Sequence, TypeVar, Union, overload _T = TypeVar("_T") _T_co = TypeVar('_T_co', covariant=True) class _Sampleable(Protocol[_T_co]): def __iter__(self) -> Iterator[_T_co]: ... def __len__(self) -> int: ... class Random(_random.Random): def __init__(self, x: object = ...) -> None: ... def seed(self, x: object = ...) -> None: ... def getstate(self) -> _random._State: ... def setstate(self, state: _random._State) -> None: ... def jumpahead(self, n: int) -> None: ... def getrandbits(self, k: int) -> int: ... @overload def randrange(self, stop: int) -> int: ... @overload def randrange(self, start: int, stop: int, step: int = ...) -> int: ... def randint(self, a: int, b: int) -> int: ... def choice(self, seq: Sequence[_T]) -> _T: ... def shuffle(self, x: List[Any], random: Callable[[], None] = ...) -> None: ... def sample(self, population: _Sampleable[_T], k: int) -> List[_T]: ... def random(self) -> float: ... def uniform(self, a: float, b: float) -> float: ... def triangular(self, low: float = ..., high: float = ..., mode: float = ...) -> float: ... def betavariate(self, alpha: float, beta: float) -> float: ... def expovariate(self, lambd: float) -> float: ... def gammavariate(self, alpha: float, beta: float) -> float: ... def gauss(self, mu: float, sigma: float) -> float: ... def lognormvariate(self, mu: float, sigma: float) -> float: ... def normalvariate(self, mu: float, sigma: float) -> float: ... def vonmisesvariate(self, mu: float, kappa: float) -> float: ... def paretovariate(self, alpha: float) -> float: ... def weibullvariate(self, alpha: float, beta: float) -> float: ... # SystemRandom is not implemented for all OS's; good on Windows & Linux class SystemRandom(Random): ... # ----- random function stubs ----- def seed(x: object = ...) -> None: ... def getstate() -> object: ... def setstate(state: object) -> None: ... def jumpahead(n: int) -> None: ... def getrandbits(k: int) -> int: ... @overload def randrange(stop: int) -> int: ... @overload def randrange(start: int, stop: int, step: int = ...) -> int: ... def randint(a: int, b: int) -> int: ... def choice(seq: Sequence[_T]) -> _T: ... def shuffle(x: List[Any], random: Callable[[], float] = ...) -> None: ... def sample(population: _Sampleable[_T], k: int) -> List[_T]: ... def random() -> float: ... def uniform(a: float, b: float) -> float: ... def triangular(low: float = ..., high: float = ..., mode: float = ...) -> float: ... def betavariate(alpha: float, beta: float) -> float: ... def expovariate(lambd: float) -> float: ... def gammavariate(alpha: float, beta: float) -> float: ... def gauss(mu: float, sigma: float) -> float: ... def lognormvariate(mu: float, sigma: float) -> float: ... def normalvariate(mu: float, sigma: float) -> float: ... def vonmisesvariate(mu: float, kappa: float) -> float: ... def paretovariate(alpha: float) -> float: ... def weibullvariate(alpha: float, beta: float) -> float: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/sets.pyi0000664000175000017500000000567313577124116022632 0ustar davedave00000000000000# Stubs for sets (Python 2) from typing import Any, Callable, Hashable, Iterable, Iterator, MutableMapping, Optional, TypeVar, Union _T = TypeVar('_T') _Setlike = Union[BaseSet[_T], Iterable[_T]] _SelfT = TypeVar('_SelfT') class BaseSet(Iterable[_T]): def __init__(self) -> None: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def __iter__(self) -> Iterator[_T]: ... def __cmp__(self, other: Any) -> int: ... def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... def copy(self: _SelfT) -> _SelfT: ... def __copy__(self: _SelfT) -> _SelfT: ... def __deepcopy__(self: _SelfT, memo: MutableMapping[int, BaseSet[_T]]) -> _SelfT: ... def __or__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def union(self: _SelfT, other: _Setlike[_T]) -> _SelfT: ... def __and__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def intersection(self: _SelfT, other: _Setlike[Any]) -> _SelfT: ... def __xor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def symmetric_difference(self: _SelfT, other: _Setlike[_T]) -> _SelfT: ... def __sub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def difference(self: _SelfT, other: _Setlike[Any]) -> _SelfT: ... def __contains__(self, element: Any) -> bool: ... def issubset(self, other: BaseSet[_T]) -> bool: ... def issuperset(self, other: BaseSet[_T]) -> bool: ... def __le__(self, other: BaseSet[_T]) -> bool: ... def __ge__(self, other: BaseSet[_T]) -> bool: ... def __lt__(self, other: BaseSet[_T]) -> bool: ... def __gt__(self, other: BaseSet[_T]) -> bool: ... class ImmutableSet(BaseSet[_T], Hashable): def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ... def __hash__(self) -> int: ... class Set(BaseSet[_T]): def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ... def __ior__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def union_update(self, other: _Setlike[_T]) -> None: ... def __iand__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def intersection_update(self, other: _Setlike[Any]) -> None: ... def __ixor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def symmetric_difference_update(self, other: _Setlike[_T]) -> None: ... def __isub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ... def difference_update(self, other: _Setlike[Any]) -> None: ... def update(self, iterable: _Setlike[_T]) -> None: ... def clear(self) -> None: ... def add(self, element: _T) -> None: ... def remove(self, element: _T) -> None: ... def discard(self, element: _T) -> None: ... def pop(self) -> _T: ... def __as_immutable__(self) -> ImmutableSet[_T]: ... def __as_temporarily_immutable__(self) -> _TemporarilyImmutableSet[_T]: ... class _TemporarilyImmutableSet(BaseSet[_T]): def __init__(self, set: BaseSet[_T]) -> None: ... def __hash__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_sha512.pyi0000664000175000017500000000117013577124116023002 0ustar davedave00000000000000from typing import Optional class sha384(object): name: str block_size: int digest_size: int digestsize: int def __init__(self, init: Optional[str]) -> None: ... def copy(self) -> sha384: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def update(self, arg: str) -> None: ... class sha512(object): name: str block_size: int digest_size: int digestsize: int def __init__(self, init: Optional[str]) -> None: ... def copy(self) -> sha512: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def update(self, arg: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/glob.pyi0000664000175000017500000000056713577124116022574 0ustar davedave00000000000000from typing import List, Iterator, Union, AnyStr def glob(pathname: AnyStr) -> List[AnyStr]: ... def iglob(pathname: AnyStr) -> Iterator[AnyStr]: ... def glob1(dirname: Union[str, unicode], pattern: AnyStr) -> List[AnyStr]: ... def glob0(dirname: Union[str, unicode], basename: AnyStr) -> List[AnyStr]: ... def has_magic(s: Union[str, unicode]) -> bool: ... # undocumented jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/popen2.pyi0000664000175000017500000000175013577124116023047 0ustar davedave00000000000000from typing import Any, Iterable, List, Optional, Union, TextIO, Tuple, TypeVar _T = TypeVar('_T') class Popen3: sts: int cmd: Iterable[Any] pid: int tochild: TextIO fromchild: TextIO childerr: Optional[TextIO] def __init__(self, cmd: Iterable[Any] = ..., capturestderr: bool = ..., bufsize: int = ...) -> None: ... def __del__(self) -> None: ... def poll(self, _deadstate: _T = ...) -> Union[int, _T]: ... def wait(self) -> int: ... class Popen4(Popen3): childerr: None cmd: Iterable[Any] pid: int tochild: TextIO fromchild: TextIO def __init__(self, cmd: Iterable[Any] = ..., bufsize: int = ...) -> None: ... def popen2(cmd: Iterable[Any] = ..., bufsize: int = ..., mode: str = ...) -> Tuple[TextIO, TextIO]: ... def popen3(cmd: Iterable[Any] = ..., bufsize: int = ..., mode: str = ...) -> Tuple[TextIO, TextIO, TextIO]: ... def popen4(cmd: Iterable[Any] = ..., bufsize: int = ..., mode: str = ...) -> Tuple[TextIO, TextIO]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_md5.pyi0000664000175000017500000000045413577124116022470 0ustar davedave00000000000000blocksize: int digest_size: int class MD5Type(object): name: str block_size: int digest_size: int def copy(self) -> MD5Type: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def update(self, arg: str) -> None: ... def new(arg: str = ...) -> MD5Type: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/compileall.pyi0000664000175000017500000000122413577124116023761 0ustar davedave00000000000000# Stubs for compileall (Python 2) from typing import Any, Optional, Pattern, Union _Path = Union[str, bytes] # rx can be any object with a 'search' method; once we have Protocols we can change the type def compile_dir( dir: _Path, maxlevels: int = ..., ddir: Optional[_Path] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ..., ) -> int: ... def compile_file( fullname: _Path, ddir: Optional[_Path] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ..., ) -> int: ... def compile_path(skip_curdir: bool = ..., maxlevels: int = ..., force: bool = ..., quiet: int = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/StringIO.pyi0000664000175000017500000000223313577124116023337 0ustar davedave00000000000000# Stubs for StringIO (Python 2) from typing import Any, IO, AnyStr, Iterator, Iterable, Generic, List, Optional class StringIO(IO[AnyStr], Generic[AnyStr]): closed: bool softspace: int len: int name: str def __init__(self, buf: AnyStr = ...) -> None: ... def __iter__(self) -> Iterator[AnyStr]: ... def next(self) -> AnyStr: ... def close(self) -> None: ... def isatty(self) -> bool: ... def seek(self, pos: int, mode: int = ...) -> int: ... def tell(self) -> int: ... def read(self, n: int = ...) -> AnyStr: ... def readline(self, length: int = ...) -> AnyStr: ... def readlines(self, sizehint: int = ...) -> List[AnyStr]: ... def truncate(self, size: Optional[int] = ...) -> int: ... def write(self, s: AnyStr) -> int: ... def writelines(self, iterable: Iterable[AnyStr]) -> None: ... def flush(self) -> None: ... def getvalue(self) -> AnyStr: ... def __enter__(self) -> Any: ... def __exit__(self, type: Any, value: Any, traceback: Any) -> Any: ... def fileno(self) -> int: ... def readable(self) -> bool: ... def seekable(self) -> bool: ... def writable(self) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/copy_reg.pyi0000664000175000017500000000132613577124116023452 0ustar davedave00000000000000 from typing import TypeVar, Callable, Union, Tuple, Any, Optional, SupportsInt, Hashable, List _Type = TypeVar("_Type", bound=type) _Reduce = Union[Tuple[Callable[..., _Type], Tuple[Any, ...]], Tuple[Callable[..., _Type], Tuple[Any, ...], Optional[Any]]] __all__: List[str] def pickle(ob_type: _Type, pickle_function: Callable[[_Type], Union[str, _Reduce[_Type]]], constructor_ob: Optional[Callable[[_Reduce[_Type]], _Type]] = ...) -> None: ... def constructor(object: Callable[[_Reduce[_Type]], _Type]) -> None: ... def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ... def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ... def clear_extension_cache() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/dummy_thread.pyi0000664000175000017500000000143213577124116024323 0ustar davedave00000000000000from typing import Any, Callable, Dict, NoReturn, Optional, Tuple class error(Exception): def __init__(self, *args: Any) -> None: ... def start_new_thread(function: Callable[..., Any], args: Tuple[Any, ...], kwargs: Dict[str, Any] = ...) -> None: ... def exit() -> NoReturn: ... def get_ident() -> int: ... def allocate_lock() -> LockType: ... def stack_size(size: Optional[int] = ...) -> int: ... class LockType(object): locked_status: bool def __init__(self) -> None: ... def acquire(self, waitflag: Optional[bool] = ...) -> bool: ... def __enter__(self, waitflag: Optional[bool] = ...) -> bool: ... def __exit__(self, typ: Any, val: Any, tb: Any) -> None: ... def release(self) -> bool: ... def locked(self) -> bool: ... def interrupt_main() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/whichdb.pyi0000664000175000017500000000022613577124116023251 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/whichdb.py from typing import Optional, Text def whichdb(filename: Text) -> Optional[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_collections.pyi0000664000175000017500000000270613577124116024323 0ustar davedave00000000000000"""Stub file for the '_collections' module.""" from typing import Any, Callable, Dict, Generic, Iterator, TypeVar, Optional, Union _K = TypeVar("_K") _V = TypeVar("_V") _T = TypeVar('_T') _T2 = TypeVar('_T2') class defaultdict(Dict[_K, _V]): default_factory: None def __init__(self, __default_factory: Callable[[], _V] = ..., init: Any = ...) -> None: ... def __missing__(self, key: _K) -> _V: ... def __copy__(self: _T) -> _T: ... def copy(self: _T) -> _T: ... class deque(Generic[_T]): maxlen: Optional[int] def __init__(self, iterable: Iterator[_T] = ..., maxlen: int = ...) -> None: ... def append(self, x: _T) -> None: ... def appendleft(self, x: _T) -> None: ... def clear(self) -> None: ... def count(self, x: Any) -> int: ... def extend(self, iterable: Iterator[_T]) -> None: ... def extendleft(self, iterable: Iterator[_T]) -> None: ... def pop(self) -> _T: ... def popleft(self) -> _T: ... def remove(self, value: _T) -> None: ... def reverse(self) -> None: ... def rotate(self, n: int = ...) -> None: ... def __contains__(self, o: Any) -> bool: ... def __copy__(self) -> deque[_T]: ... def __getitem__(self, i: int) -> _T: ... def __iadd__(self, other: deque[_T2]) -> deque[Union[_T, _T2]]: ... def __iter__(self) -> Iterator[_T]: ... def __len__(self) -> int: ... def __reversed__(self) -> Iterator[_T]: ... def __setitem__(self, i: int, x: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/SimpleHTTPServer.pyi0000664000175000017500000000126113577124116024761 0ustar davedave00000000000000# Stubs for SimpleHTTPServer (Python 2) from typing import Any, AnyStr, IO, Mapping, Optional, Union import BaseHTTPServer from StringIO import StringIO class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): server_version: str def do_GET(self) -> None: ... def do_HEAD(self) -> None: ... def send_head(self) -> Optional[IO[str]]: ... def list_directory(self, path: Union[str, unicode]) -> Optional[StringIO[Any]]: ... def translate_path(self, path: AnyStr) -> AnyStr: ... def copyfile(self, source: IO[AnyStr], outputfile: IO[AnyStr]): ... def guess_type(self, path: Union[str, unicode]) -> str: ... extensions_map: Mapping[str, str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_io.pyi0000664000175000017500000001573313577124116022420 0ustar davedave00000000000000from typing import Any, AnyStr, BinaryIO, IO, Text, TextIO, Iterable, Iterator, List, Optional, Type, Tuple, TypeVar, Union from mmap import mmap from types import TracebackType _bytearray_like = Union[bytearray, mmap] DEFAULT_BUFFER_SIZE: int class BlockingIOError(IOError): characters_written: int class UnsupportedOperation(ValueError, IOError): ... _T = TypeVar("_T") class _IOBase(BinaryIO): @property def closed(self) -> bool: ... def _checkClosed(self, msg: Optional[str] = ...) -> None: ... # undocumented def _checkReadable(self) -> None: ... def _checkSeekable(self) -> None: ... def _checkWritable(self) -> None: ... # All these methods are concrete here (you can instantiate this) def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def readable(self) -> bool: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... def __enter__(self: _T) -> _T: ... def __exit__(self, t: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[Any]) -> Optional[bool]: ... def __iter__(self: _T) -> _T: ... # The parameter type of writelines[s]() is determined by that of write(): def writelines(self, lines: Iterable[bytes]) -> None: ... # The return type of readline[s]() and next() is determined by that of read(): def readline(self, limit: int = ...) -> bytes: ... def readlines(self, hint: int = ...) -> List[bytes]: ... def next(self) -> bytes: ... # These don't actually exist but we need to pretend that it does # so that this class is concrete. def write(self, s: bytes) -> int: ... def read(self, n: int = ...) -> bytes: ... class _BufferedIOBase(_IOBase): def read1(self, n: int) -> bytes: ... def read(self, size: int = ...) -> bytes: ... def readinto(self, buffer: _bytearray_like) -> int: ... def write(self, s: bytes) -> int: ... def detach(self) -> _IOBase: ... class BufferedRWPair(_BufferedIOBase): def __init__(self, reader: _RawIOBase, writer: _RawIOBase, buffer_size: int = ..., max_buffer_size: int = ...) -> None: ... def peek(self, n: int = ...) -> bytes: ... def __enter__(self) -> BufferedRWPair: ... class BufferedRandom(_BufferedIOBase): mode: str name: str raw: _IOBase def __init__(self, raw: _IOBase, buffer_size: int = ..., max_buffer_size: int = ...) -> None: ... def peek(self, n: int = ...) -> bytes: ... class BufferedReader(_BufferedIOBase): mode: str name: str raw: _IOBase def __init__(self, raw: _IOBase, buffer_size: int = ...) -> None: ... def peek(self, n: int = ...) -> bytes: ... class BufferedWriter(_BufferedIOBase): name: str raw: _IOBase mode: str def __init__(self, raw: _IOBase, buffer_size: int = ..., max_buffer_size: int = ...) -> None: ... class BytesIO(_BufferedIOBase): def __init__(self, initial_bytes: bytes = ...) -> None: ... def __setstate__(self, state: Tuple[Any, ...]) -> None: ... def __getstate__(self) -> Tuple[Any, ...]: ... # BytesIO does not contain a "name" field. This workaround is necessary # to allow BytesIO sub-classes to add this field, as it is defined # as a read-only property on IO[]. name: Any def getvalue(self) -> bytes: ... def write(self, s: bytes) -> int: ... def writelines(self, lines: Iterable[bytes]) -> None: ... def read1(self, size: int) -> bytes: ... def next(self) -> bytes: ... class _RawIOBase(_IOBase): def readall(self) -> str: ... def read(self, n: int = ...) -> str: ... class FileIO(_RawIOBase, BytesIO): mode: str closefd: bool def __init__(self, file: Union[str, int], mode: str = ..., closefd: bool = ...) -> None: ... def readinto(self, buffer: _bytearray_like) -> int: ... def write(self, pbuf: str) -> int: ... class IncrementalNewlineDecoder(object): newlines: Union[str, unicode] def __init__(self, decoder, translate, z=...) -> None: ... def decode(self, input, final) -> Any: ... def getstate(self) -> Tuple[Any, int]: ... def setstate(self, state: Tuple[Any, int]) -> None: ... def reset(self) -> None: ... # Note: In the actual _io.py, _TextIOBase inherits from _IOBase. class _TextIOBase(TextIO): errors: Optional[str] # TODO: On _TextIOBase, this is always None. But it's unicode/bytes in subclasses. newlines: Union[None, unicode, bytes] encoding: str @property def closed(self) -> bool: ... def _checkClosed(self) -> None: ... def _checkReadable(self) -> None: ... def _checkSeekable(self) -> None: ... def _checkWritable(self) -> None: ... def close(self) -> None: ... def detach(self) -> IO[Any]: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def next(self) -> unicode: ... def read(self, size: int = ...) -> unicode: ... def readable(self) -> bool: ... def readline(self, limit: int = ...) -> unicode: ... def readlines(self, hint: int = ...) -> list[unicode]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... def write(self, pbuf: unicode) -> int: ... def writelines(self, lines: Iterable[unicode]) -> None: ... def __enter__(self: _T) -> _T: ... def __exit__(self, t: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[Any]) -> Optional[bool]: ... def __iter__(self: _T) -> _T: ... class StringIO(_TextIOBase): line_buffering: bool def __init__(self, initial_value: Optional[unicode] = ..., newline: Optional[unicode] = ...) -> None: ... def __setstate__(self, state: Tuple[Any, ...]) -> None: ... def __getstate__(self) -> Tuple[Any, ...]: ... # StringIO does not contain a "name" field. This workaround is necessary # to allow StringIO sub-classes to add this field, as it is defined # as a read-only property on IO[]. name: Any def getvalue(self) -> unicode: ... class TextIOWrapper(_TextIOBase): name: str line_buffering: bool buffer: BinaryIO _CHUNK_SIZE: int def __init__( self, buffer: IO[Any], encoding: Optional[Text] = ..., errors: Optional[Text] = ..., newline: Optional[Text] = ..., line_buffering: bool = ..., write_through: bool = ..., ) -> None: ... def open(file: Union[str, unicode, int], mode: Text = ..., buffering: int = ..., encoding: Optional[Text] = ..., errors: Optional[Text] = ..., newline: Optional[Text] = ..., closefd: bool = ...) -> IO[Any]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/UserDict.pyi0000664000175000017500000000314013577124116023361 0ustar davedave00000000000000from typing import (Any, Container, Dict, Generic, Iterable, Iterator, List, Mapping, Optional, Sized, Tuple, TypeVar, Union, overload) _KT = TypeVar('_KT') _VT = TypeVar('_VT') _T = TypeVar('_T') class UserDict(Dict[_KT, _VT], Generic[_KT, _VT]): data: Dict[_KT, _VT] def __init__(self, initialdata: Mapping[_KT, _VT] = ...) -> None: ... # TODO: __iter__ is not available for UserDict class IterableUserDict(UserDict[_KT, _VT], Generic[_KT, _VT]): ... class DictMixin(Iterable[_KT], Container[_KT], Sized, Generic[_KT, _VT]): def has_key(self, key: _KT) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_KT]: ... # From typing.Mapping[_KT, _VT] # (can't inherit because of keys()) @overload def get(self, k: _KT) -> Optional[_VT]: ... @overload def get(self, k: _KT, default: Union[_VT, _T]) -> Union[_VT, _T]: ... def values(self) -> List[_VT]: ... def items(self) -> List[Tuple[_KT, _VT]]: ... def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT]: ... def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... def __contains__(self, o: Any) -> bool: ... # From typing.MutableMapping[_KT, _VT] def clear(self) -> None: ... def pop(self, k: _KT, default: _VT = ...) -> _VT: ... def popitem(self) -> Tuple[_KT, _VT]: ... def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... @overload def update(self, m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def update(self, m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/heapq.pyi0000664000175000017500000000135213577124116022740 0ustar davedave00000000000000from typing import TypeVar, List, Iterable, Any, Callable, Optional, Protocol _T = TypeVar('_T') class _Sortable(Protocol): def __lt__(self: _T, other: _T) -> bool: ... def cmp_lt(x, y) -> bool: ... def heappush(heap: List[_T], item: _T) -> None: ... def heappop(heap: List[_T]) -> _T: ... def heappushpop(heap: List[_T], item: _T) -> _T: ... def heapify(x: List[_T]) -> None: ... def heapreplace(heap: List[_T], item: _T) -> _T: ... def merge(*iterables: Iterable[_T]) -> Iterable[_T]: ... def nlargest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], _Sortable]] = ...) -> List[_T]: ... def nsmallest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], _Sortable]] = ...) -> List[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/dircache.pyi0000664000175000017500000000052313577124116023403 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/dircache.py from typing import List, MutableSequence, Text, Union def reset() -> None: ... def listdir(path: Text) -> List[str]: ... opendir = listdir def annotate(head: Text, list: Union[MutableSequence[str], MutableSequence[Text], MutableSequence[Union[str, Text]]]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/sha.pyi0000664000175000017500000000042513577124116022415 0ustar davedave00000000000000# Stubs for Python 2.7 sha stdlib module class sha(object): def update(self, arg: str) -> None: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def copy(self) -> sha: ... def new(string: str = ...) -> sha: ... blocksize: int digest_size: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/abc.pyi0000664000175000017500000000217313577124116022371 0ustar davedave00000000000000from typing import Any, Callable, Dict, Set, Tuple, Type, TypeVar import _weakrefset _FuncT = TypeVar('_FuncT', bound=Callable[..., Any]) # NOTE: mypy has special processing for ABCMeta and abstractmethod. def abstractmethod(funcobj: _FuncT) -> _FuncT: ... class ABCMeta(type): # TODO: FrozenSet __abstractmethods__: Set[Any] _abc_cache: _weakrefset.WeakSet[Any] _abc_invalidation_counter: int _abc_negative_cache: _weakrefset.WeakSet[Any] _abc_negative_cache_version: int _abc_registry: _weakrefset.WeakSet[Any] def __init__(self, name: str, bases: Tuple[type, ...], namespace: Dict[Any, Any]) -> None: ... def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ... def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ... def _dump_registry(cls: ABCMeta, *args: Any, **kwargs: Any) -> None: ... def register(cls: ABCMeta, subclass: Type[Any]) -> None: ... # TODO: The real abc.abstractproperty inherits from "property". class abstractproperty(object): def __new__(cls, func: Any) -> Any: ... __isabstractmethod__: bool doc: Any fdel: Any fget: Any fset: Any jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/runpy.pyi0000664000175000017500000000103513577124116023015 0ustar davedave00000000000000from typing import Any, Optional class _TempModule: mod_name: Any module: Any def __init__(self, mod_name): ... def __enter__(self): ... def __exit__(self, *args): ... class _ModifiedArgv0: value: Any def __init__(self, value): ... def __enter__(self): ... def __exit__(self, *args): ... def run_module(mod_name, init_globals: Optional[Any] = ..., run_name: Optional[Any] = ..., alter_sys: bool = ...): ... def run_path(path_name, init_globals: Optional[Any] = ..., run_name: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/markupbase.pyi0000664000175000017500000000041113577124116023767 0ustar davedave00000000000000from typing import Tuple class ParserBase(object): def __init__(self) -> None: ... def error(self, message: str) -> None: ... def reset(self) -> None: ... def getpos(self) -> Tuple[int, int]: ... def unknown_decl(self, data: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/importlib.pyi0000664000175000017500000000020613577124116023640 0ustar davedave00000000000000import types from typing import Optional, Text def import_module(name: Text, package: Optional[Text] = ...) -> types.ModuleType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_sha.pyi0000664000175000017500000000053413577124116022555 0ustar davedave00000000000000blocksize: int block_size: int digest_size: int class sha(object): # not actually exposed name: str block_size: int digest_size: int digestsize: int def copy(self) -> sha: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def update(self, arg: str) -> None: ... def new(arg: str = ...) -> sha: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/xmlrpclib.pyi0000664000175000017500000002266713577124116023652 0ustar davedave00000000000000# Stubs for xmlrpclib (Python 2) from typing import Any, AnyStr, Callable, IO, Iterable, List, Mapping, MutableMapping, Optional, Tuple, Type, TypeVar, Union from types import InstanceType from datetime import datetime from time import struct_time from httplib import HTTPConnection, HTTPResponse, HTTPSConnection from ssl import SSLContext from StringIO import StringIO from gzip import GzipFile _Unmarshaller = Any _timeTuple = Tuple[int, int, int, int, int, int, int, int, int] # Represents types that can be compared against a DateTime object _dateTimeComp = Union[unicode, DateTime, datetime] # A "host description" used by Transport factories _hostDesc = Union[str, Tuple[str, Mapping[Any, Any]]] def escape(s: AnyStr, replace: Callable[[AnyStr, AnyStr, AnyStr], AnyStr] = ...) -> AnyStr: ... MAXINT: int MININT: int PARSE_ERROR: int SERVER_ERROR: int APPLICATION_ERROR: int SYSTEM_ERROR: int TRANSPORT_ERROR: int NOT_WELLFORMED_ERROR: int UNSUPPORTED_ENCODING: int INVALID_ENCODING_CHAR: int INVALID_XMLRPC: int METHOD_NOT_FOUND: int INVALID_METHOD_PARAMS: int INTERNAL_ERROR: int class Error(Exception): ... class ProtocolError(Error): url: str errcode: int errmsg: str headers: Any def __init__(self, url: str, errcode: int, errmsg: str, headers: Any) -> None: ... class ResponseError(Error): ... class Fault(Error): faultCode: Any faultString: str def __init__(self, faultCode: Any, faultString: str, **extra: Any) -> None: ... boolean: Type[bool] Boolean: Type[bool] class DateTime: value: str def __init__(self, value: Union[str, unicode, datetime, float, int, _timeTuple, struct_time] = ...) -> None: ... def make_comparable(self, other: _dateTimeComp) -> Tuple[unicode, unicode]: ... def __lt__(self, other: _dateTimeComp) -> bool: ... def __le__(self, other: _dateTimeComp) -> bool: ... def __gt__(self, other: _dateTimeComp) -> bool: ... def __ge__(self, other: _dateTimeComp) -> bool: ... def __eq__(self, other: _dateTimeComp) -> bool: ... # type: ignore def __ne__(self, other: _dateTimeComp) -> bool: ... # type: ignore def timetuple(self) -> struct_time: ... def __cmp__(self, other: _dateTimeComp) -> int: ... def decode(self, data: Any) -> None: ... def encode(self, out: IO[str]) -> None: ... class Binary: data: str def __init__(self, data: Optional[str] = ...) -> None: ... def __cmp__(self, other: Any) -> int: ... def decode(self, data: str) -> None: ... def encode(self, out: IO[str]) -> None: ... WRAPPERS: Tuple[Type[Any], ...] # Still part of the public API, but see http://bugs.python.org/issue1773632 FastParser: None FastUnmarshaller: None FastMarshaller: None # xmlrpclib.py will leave ExpatParser undefined if it can't import expat from # xml.parsers. Because this is Python 2.7, the import will succeed. class ExpatParser: def __init__(self, target: _Unmarshaller) -> None: ... def feed(self, data: str): ... def close(self): ... # TODO: Add xmllib.XMLParser as base class class SlowParser: handle_xml: Callable[[str, bool], None] unknown_starttag: Callable[[str, Any], None] handle_data: Callable[[str], None] handle_cdata: Callable[[str], None] unknown_endtag: Callable[[str, Callable[[Iterable[str], str], str]], None] def __init__(self, target: _Unmarshaller) -> None: ... class Marshaller: memo: MutableMapping[int, Any] data: Optional[str] encoding: Optional[str] allow_none: bool def __init__(self, encoding: Optional[str] = ..., allow_none: bool = ...) -> None: ... dispatch: Mapping[type, Callable[[Marshaller, str, Callable[[str], None]], None]] def dumps( self, values: Union[ Iterable[ Union[ None, int, bool, long, float, str, unicode, List[Any], Tuple[Any, ...], Mapping[Any, Any], datetime, InstanceType, ], ], Fault, ], ) -> str: ... def dump_nil(self, value: None, write: Callable[[str], None]) -> None: ... def dump_int(self, value: int, write: Callable[[str], None]) -> None: ... def dump_bool(self, value: bool, write: Callable[[str], None]) -> None: ... def dump_long(self, value: long, write: Callable[[str], None]) -> None: ... def dump_double(self, value: float, write: Callable[[str], None]) -> None: ... def dump_string(self, value: str, write: Callable[[str], None], escape: Callable[[AnyStr, Callable[[AnyStr, AnyStr, AnyStr], AnyStr]], AnyStr] = ...) -> None: ... def dump_unicode(self, value: unicode, write: Callable[[str], None], escape: Callable[[AnyStr, Callable[[AnyStr, AnyStr, AnyStr], AnyStr]], AnyStr] = ...) -> None: ... def dump_array(self, value: Iterable[Any], write: Callable[[str], None]) -> None: ... def dump_struct( self, value: Mapping[unicode, Any], write: Callable[[str], None], escape: Callable[[AnyStr, Callable[[AnyStr, AnyStr, AnyStr], AnyStr]], AnyStr] = ..., ) -> None: ... def dump_datetime(self, value: datetime, write: Callable[[str], None]) -> None: ... def dump_instance(self, value: InstanceType, write: Callable[[str], None]) -> None: ... class Unmarshaller: def append(self, object: Any) -> None: ... def __init__(self, use_datetime: bool = ...) -> None: ... def close(self) -> Tuple[Any, ...]: ... def getmethodname(self) -> Optional[str]: ... def xml(self, encoding: str, standalone: bool) -> None: ... def start(self, tag: str, attrs: Any) -> None: ... def data(self, text: str) -> None: ... def end(self, tag: str, join: Callable[[Iterable[str], str], str] = ...) -> None: ... def end_dispatch(self, tag: str, data: str) -> None: ... dispatch: Mapping[str, Callable[[Unmarshaller, str], None]] def end_nil(self, data: str): ... def end_boolean(self, data: str) -> None: ... def end_int(self, data: str) -> None: ... def end_double(self, data: str) -> None: ... def end_string(self, data: str) -> None: ... def end_array(self, data: str) -> None: ... def end_struct(self, data: str) -> None: ... def end_base64(self, data: str) -> None: ... def end_dateTime(self, data: str) -> None: ... def end_value(self, data: str) -> None: ... def end_params(self, data: str) -> None: ... def end_fault(self, data: str) -> None: ... def end_methodName(self, data: str) -> None: ... class _MultiCallMethod: def __init__(self, call_list: List[Tuple[str, Tuple[Any, ...]]], name: str) -> None: ... class MultiCallIterator: def __init__(self, results: List[Any]) -> None: ... class MultiCall: def __init__(self, server: ServerProxy) -> None: ... def __getattr__(self, name: str) -> _MultiCallMethod: ... def __call__(self) -> MultiCallIterator: ... def getparser(use_datetime: bool = ...) -> Tuple[Union[ExpatParser, SlowParser], Unmarshaller]: ... def dumps( params: Union[Tuple[Any, ...], Fault], methodname: Optional[str] = ..., methodresponse: Optional[bool] = ..., encoding: Optional[str] = ..., allow_none: bool = ..., ) -> str: ... def loads(data: str, use_datetime: bool = ...) -> Tuple[Tuple[Any, ...], Optional[str]]: ... def gzip_encode(data: str) -> str: ... def gzip_decode(data: str, max_decode: int = ...) -> str: ... class GzipDecodedResponse(GzipFile): stringio: StringIO[Any] def __init__(self, response: HTTPResponse) -> None: ... def close(self): ... class _Method: def __init__(self, send: Callable[[str, Tuple[Any, ...]], Any], name: str) -> None: ... def __getattr__(self, name: str) -> _Method: ... def __call__(self, *args: Any) -> Any: ... class Transport: user_agent: str accept_gzip_encoding: bool encode_threshold: Optional[int] def __init__(self, use_datetime: bool = ...) -> None: ... def request(self, host: _hostDesc, handler: str, request_body: str, verbose: bool = ...) -> Tuple[Any, ...]: ... verbose: bool def single_request(self, host: _hostDesc, handler: str, request_body: str, verbose: bool = ...) -> Tuple[Any, ...]: ... def getparser(self) -> Tuple[Union[ExpatParser, SlowParser], Unmarshaller]: ... def get_host_info(self, host: _hostDesc) -> Tuple[str, Optional[List[Tuple[str, str]]], Optional[Mapping[Any, Any]]]: ... def make_connection(self, host: _hostDesc) -> HTTPConnection: ... def close(self) -> None: ... def send_request(self, connection: HTTPConnection, handler: str, request_body: str) -> None: ... def send_host(self, connection: HTTPConnection, host: str) -> None: ... def send_user_agent(self, connection: HTTPConnection) -> None: ... def send_content(self, connection: HTTPConnection, request_body: str) -> None: ... def parse_response(self, response: HTTPResponse) -> Tuple[Any, ...]: ... class SafeTransport(Transport): def __init__(self, use_datetime: bool = ..., context: Optional[SSLContext] = ...) -> None: ... def make_connection(self, host: _hostDesc) -> HTTPSConnection: ... class ServerProxy: def __init__(self, uri: str, transport: Optional[Transport] = ..., encoding: Optional[str] = ..., verbose: bool = ..., allow_none: bool = ..., use_datetime: bool = ..., context: Optional[SSLContext] = ...) -> None: ... def __getattr__(self, name: str) -> _Method: ... def __call__(self, attr: str) -> Optional[Transport]: ... Server = ServerProxy jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/0000775000175000017500000000000013577125145022210 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/__init__.pyi0000664000175000017500000000041613577124116024470 0ustar davedave00000000000000from typing import IO, Any, AnyStr def message_from_string(s: AnyStr, *args, **kwargs): ... def message_from_bytes(s: str, *args, **kwargs): ... def message_from_file(fp: IO[AnyStr], *args, **kwargs): ... def message_from_binary_file(fp: IO[str], *args, **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/message.pyi0000664000175000017500000000363613577124116024364 0ustar davedave00000000000000from typing import Any, Generator class Message: preamble = ... epilogue = ... defects = ... def __init__(self): ... def as_string(self, unixfrom=...): ... def is_multipart(self) -> bool: ... def set_unixfrom(self, unixfrom) -> None: ... def get_unixfrom(self): ... def attach(self, payload) -> None: ... def get_payload(self, i=..., decode: bool = ...): ... def set_payload(self, payload, charset=...) -> None: ... def set_charset(self, charset): ... def get_charset(self): ... def __len__(self): ... def __getitem__(self, name): ... def __setitem__(self, name, val) -> None: ... def __delitem__(self, name) -> None: ... def __contains__(self, name): ... def has_key(self, name) -> bool: ... def keys(self): ... def values(self): ... def items(self): ... def get(self, name, failobj=...): ... def get_all(self, name, failobj=...): ... def add_header(self, _name, _value, **_params) -> None: ... def replace_header(self, _name, _value) -> None: ... def get_content_type(self): ... def get_content_maintype(self): ... def get_content_subtype(self): ... def get_default_type(self): ... def set_default_type(self, ctype) -> None: ... def get_params(self, failobj=..., header=..., unquote: bool = ...): ... def get_param(self, param, failobj=..., header=..., unquote: bool = ...): ... def set_param(self, param, value, header=..., requote: bool = ..., charset=..., language=...) -> None: ... def del_param(self, param, header=..., requote: bool = ...): ... def set_type(self, type, header=..., requote: bool = ...): ... def get_filename(self, failobj=...): ... def get_boundary(self, failobj=...): ... def set_boundary(self, boundary) -> None: ... def get_content_charset(self, failobj=...): ... def get_charsets(self, failobj=...): ... def walk(self) -> Generator[Any, Any, Any]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/base64mime.pyi0000664000175000017500000000045413577124116024667 0ustar davedave00000000000000def base64_len(s: bytes) -> int: ... def header_encode(header, charset=..., keep_eols=..., maxlinelen=..., eol=...): ... def encode(s, binary=..., maxlinelen=..., eol=...): ... body_encode = encode encodestring = encode def decode(s, convert_eols=...): ... body_decode = decode decodestring = decode jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/generator.pyi0000664000175000017500000000057213577124116024722 0ustar davedave00000000000000class Generator: def __init__(self, outfp, mangle_from_: bool = ..., maxheaderlen: int = ...) -> None: ... def write(self, s) -> None: ... def flatten(self, msg, unixfrom: bool = ...) -> None: ... def clone(self, fp): ... class DecodedGenerator(Generator): def __init__(self, outfp, mangle_from_: bool = ..., maxheaderlen: int = ..., fmt=...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/_parseaddr.pyi0000664000175000017500000000206013577124116025032 0ustar davedave00000000000000from typing import Any, Optional def parsedate_tz(data): ... def parsedate(data): ... def mktime_tz(data): ... def quote(str): ... class AddrlistClass: specials: Any pos: Any LWS: Any CR: Any FWS: Any atomends: Any phraseends: Any field: Any commentlist: Any def __init__(self, field): ... def gotonext(self): ... def getaddrlist(self): ... def getaddress(self): ... def getrouteaddr(self): ... def getaddrspec(self): ... def getdomain(self): ... def getdelimited(self, beginchar, endchars, allowcomments: bool = ...): ... def getquote(self): ... def getcomment(self): ... def getdomainliteral(self): ... def getatom(self, atomends: Optional[Any] = ...): ... def getphraselist(self): ... class AddressList(AddrlistClass): addresslist: Any def __init__(self, field): ... def __len__(self): ... def __add__(self, other): ... def __iadd__(self, other): ... def __sub__(self, other): ... def __isub__(self, other): ... def __getitem__(self, index): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/utils.pyi0000664000175000017500000000146713577124116024100 0ustar davedave00000000000000from email._parseaddr import AddressList as _AddressList from email._parseaddr import mktime_tz as mktime_tz from email._parseaddr import parsedate as _parsedate from email._parseaddr import parsedate_tz as _parsedate_tz from quopri import decodestring as _qdecode from typing import Optional, Any def formataddr(pair): ... def getaddresses(fieldvalues): ... def formatdate(timeval: Optional[Any] = ..., localtime: bool = ..., usegmt: bool = ...): ... def make_msgid(idstring: Optional[Any] = ...): ... def parsedate(data): ... def parsedate_tz(data): ... def parseaddr(addr): ... def unquote(str): ... def decode_rfc2231(s): ... def encode_rfc2231(s, charset: Optional[Any] = ..., language: Optional[Any] = ...): ... def decode_params(params): ... def collapse_rfc2231_value(value, errors=..., fallback_charset=...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/MIMEText.pyi0000664000175000017500000000023713577124116024326 0ustar davedave00000000000000from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): def __init__(self, _text, _subtype=..., _charset=...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/iterators.pyi0000664000175000017500000000040013577124116024736 0ustar davedave00000000000000from typing import Any, Generator def walk(self) -> Generator[Any, Any, Any]: ... def body_line_iterator(msg, decode: bool = ...) -> Generator[Any, Any, Any]: ... def typed_subpart_iterator(msg, maintype=..., subtype=...) -> Generator[Any, Any, Any]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/header.pyi0000664000175000017500000000073213577124116024162 0ustar davedave00000000000000def decode_header(header): ... def make_header(decoded_seq, maxlinelen=..., header_name=..., continuation_ws=...): ... class Header: def __init__(self, s=..., charset=..., maxlinelen=..., header_name=..., continuation_ws=..., errors=...) -> None: ... def __unicode__(self): ... def __eq__(self, other): ... def __ne__(self, other): ... def append(self, s, charset=..., errors=...) -> None: ... def encode(self, splitchars=...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/encoders.pyi0000664000175000017500000000021713577124116024532 0ustar davedave00000000000000def encode_base64(msg) -> None: ... def encode_quopri(msg) -> None: ... def encode_7or8bit(msg) -> None: ... def encode_noop(msg) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/feedparser.pyi0000664000175000017500000000103113577124116025043 0ustar davedave00000000000000class BufferedSubFile: def __init__(self) -> None: ... def push_eof_matcher(self, pred) -> None: ... def pop_eof_matcher(self): ... def close(self) -> None: ... def readline(self): ... def unreadline(self, line) -> None: ... def push(self, data): ... def pushlines(self, lines) -> None: ... def is_closed(self): ... def __iter__(self): ... def next(self): ... class FeedParser: def __init__(self, _factory=...) -> None: ... def feed(self, data) -> None: ... def close(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/parser.pyi0000664000175000017500000000063713577124116024232 0ustar davedave00000000000000from .feedparser import FeedParser as FeedParser # not in __all__ but listed in documentation class Parser: def __init__(self, *args, **kws) -> None: ... def parse(self, fp, headersonly: bool = ...): ... def parsestr(self, text, headersonly: bool = ...): ... class HeaderParser(Parser): def parse(self, fp, headersonly: bool = ...): ... def parsestr(self, text, headersonly: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/charset.pyi0000664000175000017500000000160613577124116024364 0ustar davedave00000000000000def add_charset(charset, header_enc=..., body_enc=..., output_charset=...) -> None: ... def add_alias(alias, canonical) -> None: ... def add_codec(charset, codecname) -> None: ... QP: int # undocumented BASE64: int # undocumented SHORTEST: int # undocumented class Charset: input_charset = ... header_encoding = ... body_encoding = ... output_charset = ... input_codec = ... output_codec = ... def __init__(self, input_charset=...) -> None: ... def __eq__(self, other): ... def __ne__(self, other): ... def get_body_encoding(self): ... def convert(self, s): ... def to_splittable(self, s): ... def from_splittable(self, ustr, to_output: bool = ...): ... def get_output_charset(self): ... def encoded_header_len(self, s): ... def header_encode(self, s, convert: bool = ...): ... def body_encode(self, s, convert: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/0000775000175000017500000000000013577125145023137 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/__init__.pyi0000664000175000017500000000000013577124116025404 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/message.pyi0000664000175000017500000000022413577124116025301 0ustar davedave00000000000000from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart): def __init__(self, _msg, _subtype=...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/application.pyi0000664000175000017500000000065313577124116026166 0ustar davedave00000000000000# Stubs for email.mime.application from typing import Callable, Optional, Tuple, Union from email.mime.nonmultipart import MIMENonMultipart _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] class MIMEApplication(MIMENonMultipart): def __init__(self, _data: bytes, _subtype: str = ..., _encoder: Callable[[MIMEApplication], None] = ..., **_params: _ParamsType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/base.pyi0000664000175000017500000000020013577124116024561 0ustar davedave00000000000000from email import message class MIMEBase(message.Message): def __init__(self, _maintype, _subtype, **_params) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/image.pyi0000664000175000017500000000026113577124116024740 0ustar davedave00000000000000from email.mime.nonmultipart import MIMENonMultipart class MIMEImage(MIMENonMultipart): def __init__(self, _imagedata, _subtype=..., _encoder=..., **_params) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/nonmultipart.pyi0000664000175000017500000000015313577124116026412 0ustar davedave00000000000000from email.mime.base import MIMEBase class MIMENonMultipart(MIMEBase): def attach(self, payload): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/audio.pyi0000664000175000017500000000026113577124116024757 0ustar davedave00000000000000from email.mime.nonmultipart import MIMENonMultipart class MIMEAudio(MIMENonMultipart): def __init__(self, _audiodata, _subtype=..., _encoder=..., **_params) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/text.pyi0000664000175000017500000000023713577124116024645 0ustar davedave00000000000000from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): def __init__(self, _text, _subtype=..., _charset=...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/mime/multipart.pyi0000664000175000017500000000023713577124116025702 0ustar davedave00000000000000from email.mime.base import MIMEBase class MIMEMultipart(MIMEBase): def __init__(self, _subtype=..., boundary=..., _subparts=..., **_params) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/email/quoprimime.pyi0000664000175000017500000000075213577124116025123 0ustar davedave00000000000000def header_quopri_check(c): ... def body_quopri_check(c): ... def header_quopri_len(s): ... def body_quopri_len(str): ... def unquote(s): ... def quote(c): ... def header_encode(header, charset: str = ..., keep_eols: bool = ..., maxlinelen: int = ..., eol=...): ... def encode(body, binary: bool = ..., maxlinelen: int = ..., eol=...): ... body_encode = encode encodestring = encode def decode(encoded, eol=...): ... body_decode = decode decodestring = decode def header_decode(s): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/inspect.pyi0000664000175000017500000001075513577124116023316 0ustar davedave00000000000000from types import CodeType, TracebackType, FrameType, FunctionType, MethodType, ModuleType from typing import Any, Dict, Callable, List, NamedTuple, Optional, Sequence, Tuple, Type, Union # Types and members class EndOfBlock(Exception): ... class BlockFinder: indent: int islambda: bool started: bool passline: bool last: int def tokeneater(self, type: int, token: str, srow_scol: Tuple[int, int], erow_ecol: Tuple[int, int], line: str) -> None: ... CO_GENERATOR: int CO_NESTED: int CO_NEWLOCALS: int CO_NOFREE: int CO_OPTIMIZED: int CO_VARARGS: int CO_VARKEYWORDS: int TPFLAGS_IS_ABSTRACT: int class ModuleInfo(NamedTuple): name: str suffix: str mode: str module_type: int def getmembers( object: object, predicate: Optional[Callable[[Any], bool]] = ... ) -> List[Tuple[str, Any]]: ... def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ... def getmodulename(path: str) -> Optional[str]: ... def ismodule(object: object) -> bool: ... def isclass(object: object) -> bool: ... def ismethod(object: object) -> bool: ... def isfunction(object: object) -> bool: ... def isgeneratorfunction(object: object) -> bool: ... def isgenerator(object: object) -> bool: ... def istraceback(object: object) -> bool: ... def isframe(object: object) -> bool: ... def iscode(object: object) -> bool: ... def isbuiltin(object: object) -> bool: ... def isroutine(object: object) -> bool: ... def isabstract(object: object) -> bool: ... def ismethoddescriptor(object: object) -> bool: ... def isdatadescriptor(object: object) -> bool: ... def isgetsetdescriptor(object: object) -> bool: ... def ismemberdescriptor(object: object) -> bool: ... # Retrieving source code _SourceObjectType = Union[ModuleType, Type[Any], MethodType, FunctionType, TracebackType, FrameType, CodeType, Callable[..., Any]] def findsource(object: _SourceObjectType) -> Tuple[List[str], int]: ... def getabsfile(object: _SourceObjectType) -> str: ... def getblock(lines: Sequence[str]) -> Sequence[str]: ... def getdoc(object: object) -> Optional[str]: ... def getcomments(object: object) -> Optional[str]: ... def getfile(object: _SourceObjectType) -> str: ... def getmodule(object: object) -> Optional[ModuleType]: ... def getsourcefile(object: _SourceObjectType) -> Optional[str]: ... def getsourcelines(object: _SourceObjectType) -> Tuple[List[str], int]: ... def getsource(object: _SourceObjectType) -> str: ... def cleandoc(doc: str) -> str: ... def indentsize(line: str) -> int: ... # Classes and functions def getclasstree(classes: List[type], unique: bool = ...) -> List[Union[Tuple[type, Tuple[type, ...]], List[Any]]]: ... class ArgSpec(NamedTuple): args: List[str] varargs: Optional[str] keywords: Optional[str] defaults: Tuple[Any, ...] class ArgInfo(NamedTuple): args: List[str] varargs: Optional[str] keywords: Optional[str] locals: Dict[str, Any] class Arguments(NamedTuple): args: List[Union[str, List[Any]]] varargs: Optional[str] keywords: Optional[str] def getargs(co: CodeType) -> Arguments: ... def getargspec(func: object) -> ArgSpec: ... def getargvalues(frame: FrameType) -> ArgInfo: ... def formatargspec(args, varargs=..., varkw=..., defaults=..., formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=..., join=...) -> str: ... def formatargvalues(args, varargs=..., varkw=..., defaults=..., formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=..., join=...) -> str: ... def getmro(cls: type) -> Tuple[type, ...]: ... def getcallargs(func, *args, **kwds) -> Dict[str, Any]: ... # The interpreter stack class Traceback(NamedTuple): filename: str lineno: int function: str code_context: Optional[List[str]] index: Optional[int] # type: ignore _FrameInfo = Tuple[FrameType, str, int, str, Optional[List[str]], Optional[int]] def getouterframes(frame: FrameType, context: int = ...) -> List[_FrameInfo]: ... def getframeinfo(frame: Union[FrameType, TracebackType], context: int = ...) -> Traceback: ... def getinnerframes(traceback: TracebackType, context: int = ...) -> List[_FrameInfo]: ... def getlineno(frame: FrameType) -> int: ... def currentframe(depth: int = ...) -> FrameType: ... def stack(context: int = ...) -> List[_FrameInfo]: ... def trace(context: int = ...) -> List[_FrameInfo]: ... class Attribute(NamedTuple): name: str kind: str defining_class: type object: object def classify_class_attrs(cls: type) -> List[Attribute]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/getpass.pyi0000664000175000017500000000030013577124116023300 0ustar davedave00000000000000# Stubs for getpass (Python 2) from typing import Any, IO class GetPassWarning(UserWarning): ... def getpass(prompt: str = ..., stream: IO[Any] = ...) -> str: ... def getuser() -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/user.pyi0000664000175000017500000000034013577124116022614 0ustar davedave00000000000000# Stubs for user (Python 2) # Docs: https://docs.python.org/2/library/user.html # Source: https://hg.python.org/cpython/file/2.7/Lib/user.py from typing import Any def __getattr__(name) -> Any: ... home: str pythonrc: str jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/commands.pyi0000664000175000017500000000051313577124116023441 0ustar davedave00000000000000from typing import overload, AnyStr, Text, Tuple def getstatus(file: Text) -> str: ... def getoutput(cmd: Text) -> str: ... def getstatusoutput(cmd: Text) -> Tuple[int, str]: ... @overload def mk2arg(head: bytes, x: bytes) -> bytes: ... @overload def mk2arg(head: Text, x: Text) -> Text: ... def mkarg(x: AnyStr) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/sre_parse.pyi0000664000175000017500000000451113577124116023625 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_parse.py from typing import Any, Dict, Iterable, List, Match, Optional, Pattern as _Pattern, Set, Tuple, Union SPECIAL_CHARS: str REPEAT_CHARS: str DIGITS: Set[Any] OCTDIGITS: Set[Any] HEXDIGITS: Set[Any] WHITESPACE: Set[Any] ESCAPES: Dict[str, Tuple[str, int]] CATEGORIES: Dict[str, Union[Tuple[str, str], Tuple[str, List[Tuple[str, str]]]]] FLAGS: Dict[str, int] class Pattern: flags: int open: List[int] groups: int groupdict: Dict[str, int] lookbehind: int def __init__(self) -> None: ... def opengroup(self, name: str = ...) -> int: ... def closegroup(self, gid: int) -> None: ... def checkgroup(self, gid: int) -> bool: ... _OpSubpatternType = Tuple[Optional[int], int, int, SubPattern] _OpGroupRefExistsType = Tuple[int, SubPattern, SubPattern] _OpInType = List[Tuple[str, int]] _OpBranchType = Tuple[None, List[SubPattern]] _AvType = Union[_OpInType, _OpBranchType, Iterable[SubPattern], _OpGroupRefExistsType, _OpSubpatternType] _CodeType = Union[str, _AvType] class SubPattern: pattern: str data: List[_CodeType] width: Optional[int] def __init__(self, pattern, data: List[_CodeType] = ...) -> None: ... def dump(self, level: int = ...) -> None: ... def __len__(self) -> int: ... def __delitem__(self, index: Union[int, slice]) -> None: ... def __getitem__(self, index: Union[int, slice]) -> Union[SubPattern, _CodeType]: ... def __setitem__(self, index: Union[int, slice], code: _CodeType): ... def insert(self, index, code: _CodeType) -> None: ... def append(self, code: _CodeType) -> None: ... def getwidth(self) -> int: ... class Tokenizer: string: str index: int def __init__(self, string: str) -> None: ... def match(self, char: str, skip: int = ...) -> int: ... def get(self) -> Optional[str]: ... def tell(self) -> Tuple[int, Optional[str]]: ... def seek(self, index: int) -> None: ... def isident(char: str) -> bool: ... def isdigit(char: str) -> bool: ... def isname(name: str) -> bool: ... def parse(str: str, flags: int = ..., pattern: Pattern = ...) -> SubPattern: ... _Template = Tuple[List[Tuple[int, int]], List[Optional[int]]] def parse_template(source: str, pattern: _Pattern[Any]) -> _Template: ... def expand_template(template: _Template, match: Match[Any]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/hashlib.pyi0000664000175000017500000000175413577124116023262 0ustar davedave00000000000000# Stubs for hashlib (Python 2) from typing import Tuple, Union _DataType = Union[str, unicode, bytearray, buffer, memoryview] class _hash(object): # This is not actually in the module namespace. name: str block_size: int digest_size: int digestsize: int def __init__(self, arg: _DataType = ...) -> None: ... def update(self, arg: _DataType) -> None: ... def digest(self) -> str: ... def hexdigest(self) -> str: ... def copy(self) -> _hash: ... def new(name: str, data: str = ...) -> _hash: ... def md5(s: _DataType = ...) -> _hash: ... def sha1(s: _DataType = ...) -> _hash: ... def sha224(s: _DataType = ...) -> _hash: ... def sha256(s: _DataType = ...) -> _hash: ... def sha384(s: _DataType = ...) -> _hash: ... def sha512(s: _DataType = ...) -> _hash: ... algorithms: Tuple[str, ...] algorithms_guaranteed: Tuple[str, ...] algorithms_available: Tuple[str, ...] def pbkdf2_hmac(name: str, password: str, salt: str, rounds: int, dklen: int = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/pipes.pyi0000664000175000017500000000070513577124116022763 0ustar davedave00000000000000from typing import Any, IO class Template: def __init__(self) -> None: ... def reset(self) -> None: ... def clone(self) -> Template: ... def debug(self, flag: bool) -> None: ... def append(self, cmd: str, kind: str) -> None: ... def prepend(self, cmd: str, kind: str) -> None: ... def open(self, file: str, mode: str) -> IO[Any]: ... def copy(self, infile: str, outfile: str) -> None: ... def quote(s: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_json.pyi0000664000175000017500000000035113577124116022750 0ustar davedave00000000000000from typing import Any, List, Tuple, Dict, Generic, Tuple def encode_basestring_ascii(*args, **kwargs) -> str: ... def scanstring(a, b, *args, **kwargs) -> Tuple[Any, ...]: ... class Encoder(object): ... class Scanner(object): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/repr.pyi0000664000175000017500000000210613577124116022610 0ustar davedave00000000000000from typing import Any, List class Repr: maxarray: int maxdeque: int maxdict: int maxfrozenset: int maxlevel: int maxlist: int maxlong: int maxother: int maxset: int maxstring: int maxtuple: int def __init__(self) -> None: ... def _repr_iterable(self, x, level: complex, left, right, maxiter, trail=...) -> str: ... def repr(self, x) -> str: ... def repr1(self, x, level: complex) -> str: ... def repr_array(self, x, level: complex) -> str: ... def repr_deque(self, x, level: complex) -> str: ... def repr_dict(self, x, level: complex) -> str: ... def repr_frozenset(self, x, level: complex) -> str: ... def repr_instance(self, x, level: complex) -> str: ... def repr_list(self, x, level: complex) -> str: ... def repr_long(self, x, level: complex) -> str: ... def repr_set(self, x, level: complex) -> str: ... def repr_str(self, x, level: complex) -> str: ... def repr_tuple(self, x, level: complex) -> str: ... def _possibly_sorted(x) -> List[Any]: ... aRepr: Repr def repr(x) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/gc.pyi0000664000175000017500000000142313577124116022232 0ustar davedave00000000000000# Stubs for gc from typing import Any, List, Tuple def enable() -> None: ... def disable() -> None: ... def isenabled() -> bool: ... def collect(generation: int = ...) -> int: ... def set_debug(flags: int) -> None: ... def get_debug() -> int: ... def get_objects() -> List[Any]: ... def set_threshold(threshold0: int, threshold1: int = ..., threshold2: int = ...) -> None: ... def get_count() -> Tuple[int, int, int]: ... def get_threshold() -> Tuple[int, int, int]: ... def get_referrers(*objs: Any) -> List[Any]: ... def get_referents(*objs: Any) -> List[Any]: ... def is_tracked(obj: Any) -> bool: ... garbage: List[Any] DEBUG_STATS: int DEBUG_COLLECTABLE: int DEBUG_UNCOLLECTABLE: int DEBUG_INSTANCES: int DEBUG_OBJECTS: int DEBUG_SAVEALL: int DEBUG_LEAK: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/getopt.pyi0000664000175000017500000000070013577124116023140 0ustar davedave00000000000000from typing import List, Tuple class GetoptError(Exception): opt: str msg: str def __init__(self, msg: str, opt: str = ...) -> None: ... def __str__(self) -> str: ... error = GetoptError def getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ... def gnu_getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/io.pyi0000664000175000017500000000266713577124116022263 0ustar davedave00000000000000# Stubs for io # Based on https://docs.python.org/2/library/io.html # Only a subset of functionality is included. from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any, Union, Optional import _io from _io import BlockingIOError as BlockingIOError from _io import BufferedRWPair as BufferedRWPair from _io import BufferedRandom as BufferedRandom from _io import BufferedReader as BufferedReader from _io import BufferedWriter as BufferedWriter from _io import BytesIO as BytesIO from _io import DEFAULT_BUFFER_SIZE as DEFAULT_BUFFER_SIZE from _io import FileIO as FileIO from _io import IncrementalNewlineDecoder as IncrementalNewlineDecoder from _io import StringIO as StringIO from _io import TextIOWrapper as TextIOWrapper from _io import UnsupportedOperation as UnsupportedOperation from _io import open as open def _OpenWrapper(file: Union[str, unicode, int], mode: unicode = ..., buffering: int = ..., encoding: unicode = ..., errors: unicode = ..., newline: unicode = ..., closefd: bool = ...) -> IO[Any]: ... SEEK_SET: int SEEK_CUR: int SEEK_END: int class IOBase(_io._IOBase): ... class RawIOBase(_io._RawIOBase, IOBase): ... class BufferedIOBase(_io._BufferedIOBase, IOBase): ... # Note: In the actual io.py, TextIOBase subclasses IOBase. # (Which we don't do here because we don't want to subclass both TextIO and BinaryIO.) class TextIOBase(_io._TextIOBase): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/shelve.pyi0000664000175000017500000000306113577124116023127 0ustar davedave00000000000000from typing import Any, Dict, Iterator, List, Optional, Tuple import collections class Shelf(collections.MutableMapping[Any, Any]): def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ... def __iter__(self) -> Iterator[str]: ... def keys(self) -> List[Any]: ... def __len__(self) -> int: ... def has_key(self, key: Any) -> bool: ... def __contains__(self, key: Any) -> bool: ... def get(self, key: Any, default: Any = ...) -> Any: ... def __getitem__(self, key: Any) -> Any: ... def __setitem__(self, key: Any, value: Any) -> None: ... def __delitem__(self, key: Any) -> None: ... def __enter__(self) -> Shelf: ... def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ... def close(self) -> None: ... def __del__(self) -> None: ... def sync(self) -> None: ... class BsdDbShelf(Shelf): def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ... def set_location(self, key: Any) -> Tuple[str, Any]: ... def next(self) -> Tuple[str, Any]: ... def previous(self) -> Tuple[str, Any]: ... def first(self) -> Tuple[str, Any]: ... def last(self) -> Tuple[str, Any]: ... class DbfilenameShelf(Shelf): def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ... def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/cPickle.pyi0000664000175000017500000000144113577124116023213 0ustar davedave00000000000000from typing import Any, IO, List HIGHEST_PROTOCOL: int compatible_formats: List[str] format_version: str class Pickler: def __init__(self, file: IO[str], protocol: int = ...) -> None: ... def dump(self, obj: Any) -> None: ... def clear_memo(self) -> None: ... class Unpickler: def __init__(self, file: IO[str]) -> None: ... def load(self) -> Any: ... def noload(self) -> Any: ... def dump(obj: Any, file: IO[str], protocol: int = ...) -> None: ... def dumps(obj: Any, protocol: int = ...) -> str: ... def load(file: IO[str]) -> Any: ... def loads(str: str) -> Any: ... class PickleError(Exception): ... class UnpicklingError(PickleError): ... class BadPickleGet(UnpicklingError): ... class PicklingError(PickleError): ... class UnpickleableError(PicklingError): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/resource.pyi0000664000175000017500000000155413577124116023475 0ustar davedave00000000000000from typing import Tuple, NamedTuple class error(Exception): ... RLIM_INFINITY: int def getrlimit(resource: int) -> Tuple[int, int]: ... def setrlimit(resource: int, limits: Tuple[int, int]) -> None: ... RLIMIT_CORE: int RLIMIT_CPU: int RLIMIT_FSIZE: int RLIMIT_DATA: int RLIMIT_STACK: int RLIMIT_RSS: int RLIMIT_NPROC: int RLIMIT_NOFILE: int RLIMIT_OFILE: int RLIMIT_MEMLOCK: int RLIMIT_VMEM: int RLIMIT_AS: int class _RUsage(NamedTuple): ru_utime: float ru_stime: float ru_maxrss: int ru_ixrss: int ru_idrss: int ru_isrss: int ru_minflt: int ru_majflt: int ru_nswap: int ru_inblock: int ru_oublock: int ru_msgsnd: int ru_msgrcv: int ru_nsignals: int ru_nvcsw: int ru_nivcsw: int def getrusage(who: int) -> _RUsage: ... def getpagesize() -> int: ... RUSAGE_SELF: int RUSAGE_CHILDREN: int RUSAGE_BOTH: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/htmlentitydefs.pyi0000664000175000017500000000016213577124116024703 0ustar davedave00000000000000from typing import Dict name2codepoint: Dict[str, int] codepoint2name: Dict[int, str] entitydefs: Dict[str, str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/Cookie.pyi0000664000175000017500000000247613577124116023063 0ustar davedave00000000000000from typing import Any, Dict, Optional class CookieError(Exception): ... class Morsel(Dict[Any, Any]): key: Any def __init__(self): ... def __setitem__(self, K, V): ... def isReservedKey(self, K): ... value: Any coded_value: Any def set(self, key, val, coded_val, LegalChars=..., idmap=..., translate=...): ... def output(self, attrs: Optional[Any] = ..., header=...): ... def js_output(self, attrs: Optional[Any] = ...): ... def OutputString(self, attrs: Optional[Any] = ...): ... class BaseCookie(Dict[Any, Any]): def value_decode(self, val): ... def value_encode(self, val): ... def __init__(self, input: Optional[Any] = ...): ... def __setitem__(self, key, value): ... def output(self, attrs: Optional[Any] = ..., header=..., sep=...): ... def js_output(self, attrs: Optional[Any] = ...): ... def load(self, rawdata): ... class SimpleCookie(BaseCookie): def value_decode(self, val): ... def value_encode(self, val): ... class SerialCookie(BaseCookie): def __init__(self, input: Optional[Any] = ...): ... def value_decode(self, val): ... def value_encode(self, val): ... class SmartCookie(BaseCookie): def __init__(self, input: Optional[Any] = ...): ... def value_decode(self, val): ... def value_encode(self, val): ... Cookie: Any jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/itertools.pyi0000664000175000017500000001454313577124116023674 0ustar davedave00000000000000# Stubs for itertools # Based on https://docs.python.org/2/library/itertools.html from typing import (Iterator, TypeVar, Iterable, overload, Any, Callable, Tuple, Union, Sequence, Generic, Optional) _T = TypeVar('_T') _S = TypeVar('_S') def count(start: int = ..., step: int = ...) -> Iterator[int]: ... # more general types? def cycle(iterable: Iterable[_T]) -> Iterator[_T]: ... def repeat(object: _T, times: int = ...) -> Iterator[_T]: ... class chain(Iterator[_T], Generic[_T]): def __init__(self, *iterables: Iterable[_T]) -> None: ... def next(self) -> _T: ... def __iter__(self) -> Iterator[_T]: ... @staticmethod def from_iterable(iterable: Iterable[Iterable[_S]]) -> Iterator[_S]: ... def compress(data: Iterable[_T], selectors: Iterable[Any]) -> Iterator[_T]: ... def dropwhile(predicate: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ... def ifilter(predicate: Optional[Callable[[_T], Any]], iterable: Iterable[_T]) -> Iterator[_T]: ... def ifilterfalse(predicate: Optional[Callable[[_T], Any]], iterable: Iterable[_T]) -> Iterator[_T]: ... @overload def groupby(iterable: Iterable[_T], key: None = ...) -> Iterator[Tuple[_T, Iterator[_T]]]: ... @overload def groupby(iterable: Iterable[_T], key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ... @overload def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ... @overload def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> Iterator[_T]: ... _T1 = TypeVar('_T1') _T2 = TypeVar('_T2') _T3 = TypeVar('_T3') _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _T6 = TypeVar('_T6') @overload def imap(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> Iterator[_S]: ... @overload def imap(func: Callable[[_T1, _T2], _S], iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[_S]: ... @overload def imap(func: Callable[[_T1, _T2, _T3], _S], iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3]) -> Iterator[_S]: ... @overload def imap(func: Callable[[_T1, _T2, _T3, _T4], _S], iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4]) -> Iterator[_S]: ... @overload def imap(func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5]) -> Iterator[_S]: ... @overload def imap(func: Callable[[_T1, _T2, _T3, _T4, _T5, _T6], _S], iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5], iter6: Iterable[_T6]) -> Iterator[_S]: ... @overload def imap(func: Callable[..., _S], iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any], iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any], iter7: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[_S]: ... def starmap(func: Any, iterable: Iterable[Any]) -> Iterator[Any]: ... def takewhile(predicate: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ... def tee(iterable: Iterable[_T], n: int = ...) -> Tuple[Iterator[_T], ...]: ... @overload def izip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... @overload def izip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... @overload def izip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... @overload def izip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def izip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def izip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5], iter6: Iterable[_T6]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ... @overload def izip(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any], iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any], iter7: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[Tuple[Any, ...]]: ... def izip_longest(*p: Iterable[Any], fillvalue: Any = ...) -> Iterator[Any]: ... @overload def product(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5], iter6: Iterable[_T6]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ... @overload def product(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any], iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any], iter7: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[Tuple[Any, ...]]: ... @overload def product(*iterables: Iterable[Any], repeat: int) -> Iterator[Tuple[Any, ...]]: ... def permutations(iterable: Iterable[_T], r: int = ...) -> Iterator[Sequence[_T]]: ... def combinations(iterable: Iterable[_T], r: int) -> Iterator[Sequence[_T]]: ... def combinations_with_replacement(iterable: Iterable[_T], r: int) -> Iterator[Sequence[_T]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_struct.pyi0000664000175000017500000000145313577124116023327 0ustar davedave00000000000000"""Stub file for the '_struct' module.""" from typing import Any, AnyStr, Tuple class error(Exception): ... class Struct(object): size: int format: str def __init__(self, fmt: str) -> None: ... def pack_into(self, buffer: bytearray, offset: int, obj: Any) -> None: ... def pack(self, *args) -> str: ... def unpack(self, s: str) -> Tuple[Any, ...]: ... def unpack_from(self, buffer: bytearray, offset: int = ...) -> Tuple[Any, ...]: ... def _clearcache() -> None: ... def calcsize(fmt: str) -> int: ... def pack(fmt: AnyStr, obj: Any) -> str: ... def pack_into(fmt: AnyStr, buffer: bytearray, offset: int, obj: Any) -> None: ... def unpack(fmt: AnyStr, data: str) -> Tuple[Any, ...]: ... def unpack_from(fmt: AnyStr, buffer: bytearray, offset: int = ...) -> Tuple[Any, ...]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_symtable.pyi0000664000175000017500000000125213577124116023620 0ustar davedave00000000000000from typing import List, Dict CELL: int DEF_BOUND: int DEF_FREE: int DEF_FREE_CLASS: int DEF_GLOBAL: int DEF_IMPORT: int DEF_LOCAL: int DEF_PARAM: int FREE: int GLOBAL_EXPLICIT: int GLOBAL_IMPLICIT: int LOCAL: int OPT_BARE_EXEC: int OPT_EXEC: int OPT_IMPORT_STAR: int SCOPE_MASK: int SCOPE_OFF: int TYPE_CLASS: int TYPE_FUNCTION: int TYPE_MODULE: int USE: int class _symtable_entry(object): ... class symtable(object): children: List[_symtable_entry] id: int lineno: int name: str nested: int optimized: int symbols: Dict[str, int] type: int varnames: List[str] def __init__(self, src: str, filename: str, startstr: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/__builtin__.pyi0000664000175000017500000021176113577124116024113 0ustar davedave00000000000000# True and False are deliberately omitted because they are keywords in # Python 3, and stub files conform to Python 3 syntax. from typing import ( TypeVar, Iterator, Iterable, NoReturn, overload, Container, Sequence, MutableSequence, Mapping, MutableMapping, Tuple, List, Any, Dict, Callable, Generic, Set, AbstractSet, FrozenSet, MutableSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs, SupportsComplex, IO, BinaryIO, Union, ItemsView, KeysView, ValuesView, ByteString, Optional, AnyStr, Type, Text, Protocol, ) from abc import abstractmethod, ABCMeta from ast import mod, AST from types import TracebackType, CodeType import sys if sys.version_info >= (3,): from typing import SupportsBytes, SupportsRound if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal _T = TypeVar('_T') _T_co = TypeVar('_T_co', covariant=True) _KT = TypeVar('_KT') _VT = TypeVar('_VT') _S = TypeVar('_S') _T1 = TypeVar('_T1') _T2 = TypeVar('_T2') _T3 = TypeVar('_T3') _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _TT = TypeVar('_TT', bound='type') class _SupportsIndex(Protocol): def __index__(self) -> int: ... class object: __doc__: Optional[str] __dict__: Dict[str, Any] __slots__: Union[Text, Iterable[Text]] __module__: str if sys.version_info >= (3, 6): __annotations__: Dict[str, Any] @property def __class__(self: _T) -> Type[_T]: ... @__class__.setter def __class__(self, __type: Type[object]) -> None: ... def __init__(self) -> None: ... def __new__(cls) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __eq__(self, o: object) -> bool: ... def __ne__(self, o: object) -> bool: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __hash__(self) -> int: ... def __format__(self, format_spec: str) -> str: ... def __getattribute__(self, name: str) -> Any: ... def __delattr__(self, name: str) -> None: ... def __sizeof__(self) -> int: ... def __reduce__(self) -> Union[str, Tuple[Any, ...]]: ... def __reduce_ex__(self, protocol: int) -> Union[str, Tuple[Any, ...]]: ... if sys.version_info >= (3,): def __dir__(self) -> Iterable[str]: ... if sys.version_info >= (3, 6): def __init_subclass__(cls) -> None: ... class staticmethod(object): # Special, only valid as a decorator. __func__: Callable[..., Any] if sys.version_info >= (3,): __isabstractmethod__: bool def __init__(self, f: Callable[..., Any]) -> None: ... def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable[..., Any]: ... class classmethod(object): # Special, only valid as a decorator. __func__: Callable[..., Any] if sys.version_info >= (3,): __isabstractmethod__: bool def __init__(self, f: Callable[..., Any]) -> None: ... def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable[..., Any]: ... class type(object): __base__: type __bases__: Tuple[type, ...] __basicsize__: int __dict__: Dict[str, Any] __dictoffset__: int __flags__: int __itemsize__: int __module__: str __mro__: Tuple[type, ...] __name__: str if sys.version_info >= (3,): __qualname__: str __text_signature__: Optional[str] __weakrefoffset__: int @overload def __init__(self, o: object) -> None: ... @overload def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ... @overload def __new__(cls, o: object) -> type: ... @overload def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ... def __call__(self, *args: Any, **kwds: Any) -> Any: ... def __subclasses__(self: _TT) -> List[_TT]: ... # Note: the documentation doesnt specify what the return type is, the standard # implementation seems to be returning a list. def mro(self) -> List[type]: ... def __instancecheck__(self, instance: Any) -> bool: ... def __subclasscheck__(self, subclass: type) -> bool: ... if sys.version_info >= (3,): @classmethod def __prepare__(metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any) -> Mapping[str, Any]: ... class super(object): if sys.version_info >= (3,): @overload def __init__(self, t: Any, obj: Any) -> None: ... @overload def __init__(self, t: Any) -> None: ... @overload def __init__(self) -> None: ... else: @overload def __init__(self, t: Any, obj: Any) -> None: ... @overload def __init__(self, t: Any) -> None: ... class int: @overload def __init__(self, x: Union[Text, bytes, SupportsInt, _SupportsIndex] = ...) -> None: ... @overload def __init__(self, x: Union[Text, bytes, bytearray], base: int) -> None: ... if sys.version_info >= (3, 8): def as_integer_ratio(self) -> Tuple[int, Literal[1]]: ... @property def real(self) -> int: ... @property def imag(self) -> int: ... @property def numerator(self) -> int: ... @property def denominator(self) -> int: ... def conjugate(self) -> int: ... def bit_length(self) -> int: ... if sys.version_info >= (3,): def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ... @classmethod def from_bytes(cls, bytes: Sequence[int], byteorder: str, *, signed: bool = ...) -> int: ... # TODO buffer object argument def __add__(self, x: int) -> int: ... def __sub__(self, x: int) -> int: ... def __mul__(self, x: int) -> int: ... def __floordiv__(self, x: int) -> int: ... if sys.version_info < (3,): def __div__(self, x: int) -> int: ... def __truediv__(self, x: int) -> float: ... def __mod__(self, x: int) -> int: ... def __divmod__(self, x: int) -> Tuple[int, int]: ... def __radd__(self, x: int) -> int: ... def __rsub__(self, x: int) -> int: ... def __rmul__(self, x: int) -> int: ... def __rfloordiv__(self, x: int) -> int: ... if sys.version_info < (3,): def __rdiv__(self, x: int) -> int: ... def __rtruediv__(self, x: int) -> float: ... def __rmod__(self, x: int) -> int: ... def __rdivmod__(self, x: int) -> Tuple[int, int]: ... def __pow__(self, __x: int, __modulo: Optional[int] = ...) -> Any: ... # Return type can be int or float, depending on x. def __rpow__(self, x: int) -> Any: ... def __and__(self, n: int) -> int: ... def __or__(self, n: int) -> int: ... def __xor__(self, n: int) -> int: ... def __lshift__(self, n: int) -> int: ... def __rshift__(self, n: int) -> int: ... def __rand__(self, n: int) -> int: ... def __ror__(self, n: int) -> int: ... def __rxor__(self, n: int) -> int: ... def __rlshift__(self, n: int) -> int: ... def __rrshift__(self, n: int) -> int: ... def __neg__(self) -> int: ... def __pos__(self) -> int: ... def __invert__(self) -> int: ... def __trunc__(self) -> int: ... if sys.version_info >= (3,): def __ceil__(self) -> int: ... def __floor__(self) -> int: ... def __round__(self, ndigits: Optional[int] = ...) -> int: ... def __getnewargs__(self) -> Tuple[int]: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: int) -> bool: ... def __le__(self, x: int) -> bool: ... def __gt__(self, x: int) -> bool: ... def __ge__(self, x: int) -> bool: ... def __str__(self) -> str: ... def __float__(self) -> float: ... def __int__(self) -> int: ... def __abs__(self) -> int: ... def __hash__(self) -> int: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... def __index__(self) -> int: ... class float: def __init__(self, x: Union[SupportsFloat, _SupportsIndex, Text, bytes, bytearray] = ...) -> None: ... def as_integer_ratio(self) -> Tuple[int, int]: ... def hex(self) -> str: ... def is_integer(self) -> bool: ... @classmethod def fromhex(cls, s: str) -> float: ... @property def real(self) -> float: ... @property def imag(self) -> float: ... def conjugate(self) -> float: ... def __add__(self, x: float) -> float: ... def __sub__(self, x: float) -> float: ... def __mul__(self, x: float) -> float: ... def __floordiv__(self, x: float) -> float: ... if sys.version_info < (3,): def __div__(self, x: float) -> float: ... def __truediv__(self, x: float) -> float: ... def __mod__(self, x: float) -> float: ... def __divmod__(self, x: float) -> Tuple[float, float]: ... def __pow__(self, x: float) -> float: ... # In Python 3, returns complex if self is negative and x is not whole def __radd__(self, x: float) -> float: ... def __rsub__(self, x: float) -> float: ... def __rmul__(self, x: float) -> float: ... def __rfloordiv__(self, x: float) -> float: ... if sys.version_info < (3,): def __rdiv__(self, x: float) -> float: ... def __rtruediv__(self, x: float) -> float: ... def __rmod__(self, x: float) -> float: ... def __rdivmod__(self, x: float) -> Tuple[float, float]: ... def __rpow__(self, x: float) -> float: ... def __getnewargs__(self) -> Tuple[float]: ... def __trunc__(self) -> int: ... if sys.version_info >= (3,): @overload def __round__(self, ndigits: None = ...) -> int: ... @overload def __round__(self, ndigits: int) -> float: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: float) -> bool: ... def __le__(self, x: float) -> bool: ... def __gt__(self, x: float) -> bool: ... def __ge__(self, x: float) -> bool: ... def __neg__(self) -> float: ... def __pos__(self) -> float: ... def __str__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... class complex: @overload def __init__(self, real: float = ..., imag: float = ...) -> None: ... @overload def __init__(self, real: Union[str, SupportsComplex, _SupportsIndex]) -> None: ... @property def real(self) -> float: ... @property def imag(self) -> float: ... def conjugate(self) -> complex: ... def __add__(self, x: complex) -> complex: ... def __sub__(self, x: complex) -> complex: ... def __mul__(self, x: complex) -> complex: ... def __pow__(self, x: complex) -> complex: ... if sys.version_info < (3,): def __div__(self, x: complex) -> complex: ... def __truediv__(self, x: complex) -> complex: ... def __radd__(self, x: complex) -> complex: ... def __rsub__(self, x: complex) -> complex: ... def __rmul__(self, x: complex) -> complex: ... def __rpow__(self, x: complex) -> complex: ... if sys.version_info < (3,): def __rdiv__(self, x: complex) -> complex: ... def __rtruediv__(self, x: complex) -> complex: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __neg__(self) -> complex: ... def __pos__(self) -> complex: ... def __str__(self) -> str: ... def __complex__(self) -> complex: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... if sys.version_info >= (3,): def __bool__(self) -> bool: ... else: def __nonzero__(self) -> bool: ... if sys.version_info >= (3,): _str_base = object else: class basestring(metaclass=ABCMeta): ... class unicode(basestring, Sequence[unicode]): @overload def __init__(self) -> None: ... @overload def __init__(self, o: object) -> None: ... @overload def __init__(self, o: str, encoding: unicode = ..., errors: unicode = ...) -> None: ... def capitalize(self) -> unicode: ... def center(self, width: int, fillchar: unicode = ...) -> unicode: ... def count(self, x: unicode) -> int: ... def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ... def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ... def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = ..., end: int = ...) -> bool: ... def expandtabs(self, tabsize: int = ...) -> unicode: ... def find(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def format(self, *args: object, **kwargs: object) -> unicode: ... def index(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... def isdecimal(self) -> bool: ... def isdigit(self) -> bool: ... def isidentifier(self) -> bool: ... def islower(self) -> bool: ... def isnumeric(self) -> bool: ... def isprintable(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... def join(self, iterable: Iterable[unicode]) -> unicode: ... def ljust(self, width: int, fillchar: unicode = ...) -> unicode: ... def lower(self) -> unicode: ... def lstrip(self, chars: unicode = ...) -> unicode: ... def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def replace(self, old: unicode, new: unicode, count: int = ...) -> unicode: ... def rfind(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rindex(self, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rjust(self, width: int, fillchar: unicode = ...) -> unicode: ... def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def rsplit(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ... def rstrip(self, chars: unicode = ...) -> unicode: ... def split(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ... def splitlines(self, keepends: bool = ...) -> List[unicode]: ... def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = ..., end: int = ...) -> bool: ... def strip(self, chars: unicode = ...) -> unicode: ... def swapcase(self) -> unicode: ... def title(self) -> unicode: ... def translate(self, table: Union[Dict[int, Any], unicode]) -> unicode: ... def upper(self) -> unicode: ... def zfill(self, width: int) -> unicode: ... @overload def __getitem__(self, i: int) -> unicode: ... @overload def __getitem__(self, s: slice) -> unicode: ... def __getslice__(self, start: int, stop: int) -> unicode: ... def __add__(self, s: unicode) -> unicode: ... def __mul__(self, n: int) -> unicode: ... def __rmul__(self, n: int) -> unicode: ... def __mod__(self, x: Any) -> unicode: ... def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: unicode) -> bool: ... def __le__(self, x: unicode) -> bool: ... def __gt__(self, x: unicode) -> bool: ... def __ge__(self, x: unicode) -> bool: ... def __len__(self) -> int: ... # The argument type is incompatible with Sequence def __contains__(self, s: Union[unicode, bytes]) -> bool: ... # type: ignore def __iter__(self) -> Iterator[unicode]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __hash__(self) -> int: ... def __getnewargs__(self) -> Tuple[unicode]: ... _str_base = basestring class str(Sequence[str], _str_base): if sys.version_info >= (3,): @overload def __init__(self, o: object = ...) -> None: ... @overload def __init__(self, o: bytes, encoding: str = ..., errors: str = ...) -> None: ... else: def __init__(self, o: object = ...) -> None: ... def capitalize(self) -> str: ... if sys.version_info >= (3, 3): def casefold(self) -> str: ... def center(self, width: int, fillchar: str = ...) -> str: ... def count(self, x: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... if sys.version_info < (3,): def decode(self, encoding: Text = ..., errors: Text = ...) -> unicode: ... def encode(self, encoding: Text = ..., errors: Text = ...) -> bytes: ... if sys.version_info >= (3,): def endswith(self, suffix: Union[Text, Tuple[Text, ...]], start: Optional[int] = ..., end: Optional[int] = ...) -> bool: ... else: def endswith(self, suffix: Union[Text, Tuple[Text, ...]]) -> bool: ... def expandtabs(self, tabsize: int = ...) -> str: ... def find(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def format(self, *args: object, **kwargs: object) -> str: ... if sys.version_info >= (3,): def format_map(self, map: Mapping[str, Any]) -> str: ... def index(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... if sys.version_info >= (3, 7): def isascii(self) -> bool: ... if sys.version_info >= (3,): def isdecimal(self) -> bool: ... def isdigit(self) -> bool: ... if sys.version_info >= (3,): def isidentifier(self) -> bool: ... def islower(self) -> bool: ... if sys.version_info >= (3,): def isnumeric(self) -> bool: ... def isprintable(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... if sys.version_info >= (3,): def join(self, iterable: Iterable[str]) -> str: ... else: def join(self, iterable: Iterable[AnyStr]) -> AnyStr: ... def ljust(self, width: int, fillchar: str = ...) -> str: ... def lower(self) -> str: ... if sys.version_info >= (3,): def lstrip(self, chars: Optional[str] = ...) -> str: ... def partition(self, sep: str) -> Tuple[str, str, str]: ... def replace(self, old: str, new: str, count: int = ...) -> str: ... else: @overload def lstrip(self, chars: str = ...) -> str: ... @overload def lstrip(self, chars: unicode) -> unicode: ... @overload def partition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... @overload def partition(self, sep: str) -> Tuple[str, str, str]: ... @overload def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def replace(self, old: AnyStr, new: AnyStr, count: int = ...) -> AnyStr: ... def rfind(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def rindex(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def rjust(self, width: int, fillchar: str = ...) -> str: ... if sys.version_info >= (3,): def rpartition(self, sep: str) -> Tuple[str, str, str]: ... def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... def rstrip(self, chars: Optional[str] = ...) -> str: ... def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... else: @overload def rpartition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... @overload def rpartition(self, sep: str) -> Tuple[str, str, str]: ... @overload def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... @overload def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... @overload def rsplit(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... @overload def rstrip(self, chars: str = ...) -> str: ... @overload def rstrip(self, chars: unicode) -> unicode: ... @overload def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... @overload def split(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... def splitlines(self, keepends: bool = ...) -> List[str]: ... if sys.version_info >= (3,): def startswith(self, prefix: Union[Text, Tuple[Text, ...]], start: Optional[int] = ..., end: Optional[int] = ...) -> bool: ... def strip(self, chars: Optional[str] = ...) -> str: ... else: def startswith(self, prefix: Union[Text, Tuple[Text, ...]]) -> bool: ... @overload def strip(self, chars: str = ...) -> str: ... @overload def strip(self, chars: unicode) -> unicode: ... def swapcase(self) -> str: ... def title(self) -> str: ... if sys.version_info >= (3,): def translate(self, table: Union[Mapping[int, Union[int, str, None]], Sequence[Union[int, str, None]]]) -> str: ... else: def translate(self, table: Optional[AnyStr], deletechars: AnyStr = ...) -> AnyStr: ... def upper(self) -> str: ... def zfill(self, width: int) -> str: ... if sys.version_info >= (3,): @staticmethod @overload def maketrans(x: Union[Dict[int, _T], Dict[str, _T], Dict[Union[str, int], _T]]) -> Dict[int, _T]: ... @staticmethod @overload def maketrans(x: str, y: str, z: str = ...) -> Dict[int, Union[int, None]]: ... if sys.version_info >= (3,): def __add__(self, s: str) -> str: ... else: def __add__(self, s: AnyStr) -> AnyStr: ... # Incompatible with Sequence.__contains__ def __contains__(self, o: Union[str, Text]) -> bool: ... # type: ignore def __eq__(self, x: object) -> bool: ... def __ge__(self, x: Text) -> bool: ... def __getitem__(self, i: Union[int, slice]) -> str: ... def __gt__(self, x: Text) -> bool: ... def __hash__(self) -> int: ... def __iter__(self) -> Iterator[str]: ... def __le__(self, x: Text) -> bool: ... def __len__(self) -> int: ... def __lt__(self, x: Text) -> bool: ... def __mod__(self, x: Any) -> str: ... def __mul__(self, n: int) -> str: ... def __ne__(self, x: object) -> bool: ... def __repr__(self) -> str: ... def __rmul__(self, n: int) -> str: ... def __str__(self) -> str: ... def __getnewargs__(self) -> Tuple[str]: ... if sys.version_info < (3,): def __getslice__(self, start: int, stop: int) -> str: ... def __float__(self) -> float: ... def __int__(self) -> int: ... if sys.version_info >= (3,): class bytes(ByteString): @overload def __init__(self, ints: Iterable[int]) -> None: ... @overload def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ... @overload def __init__(self, length: int) -> None: ... @overload def __init__(self) -> None: ... @overload def __init__(self, o: SupportsBytes) -> None: ... def capitalize(self) -> bytes: ... def center(self, width: int, fillchar: bytes = ...) -> bytes: ... def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def decode(self, encoding: str = ..., errors: str = ...) -> str: ... def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... def expandtabs(self, tabsize: int = ...) -> bytes: ... def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... if sys.version_info >= (3, 5): def hex(self) -> str: ... def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... if sys.version_info >= (3, 7): def isascii(self) -> bool: ... def isdigit(self) -> bool: ... def islower(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... def join(self, iterable: Iterable[Union[ByteString, memoryview]]) -> bytes: ... def ljust(self, width: int, fillchar: bytes = ...) -> bytes: ... def lower(self) -> bytes: ... def lstrip(self, chars: Optional[bytes] = ...) -> bytes: ... def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ... def replace(self, old: bytes, new: bytes, count: int = ...) -> bytes: ... def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def rjust(self, width: int, fillchar: bytes = ...) -> bytes: ... def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ... def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ... def rstrip(self, chars: Optional[bytes] = ...) -> bytes: ... def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ... def splitlines(self, keepends: bool = ...) -> List[bytes]: ... def startswith( self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ..., end: Optional[int] = ..., ) -> bool: ... def strip(self, chars: Optional[bytes] = ...) -> bytes: ... def swapcase(self) -> bytes: ... def title(self) -> bytes: ... def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytes: ... def upper(self) -> bytes: ... def zfill(self, width: int) -> bytes: ... @classmethod def fromhex(cls, s: str) -> bytes: ... @classmethod def maketrans(cls, frm: bytes, to: bytes) -> bytes: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[int]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __hash__(self) -> int: ... @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> bytes: ... def __add__(self, s: bytes) -> bytes: ... def __mul__(self, n: int) -> bytes: ... def __rmul__(self, n: int) -> bytes: ... if sys.version_info >= (3, 5): def __mod__(self, value: Any) -> bytes: ... # Incompatible with Sequence.__contains__ def __contains__(self, o: Union[int, bytes]) -> bool: ... # type: ignore def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: bytes) -> bool: ... def __le__(self, x: bytes) -> bool: ... def __gt__(self, x: bytes) -> bool: ... def __ge__(self, x: bytes) -> bool: ... def __getnewargs__(self) -> Tuple[bytes]: ... else: bytes = str class bytearray(MutableSequence[int], ByteString): if sys.version_info >= (3,): @overload def __init__(self) -> None: ... @overload def __init__(self, ints: Iterable[int]) -> None: ... @overload def __init__(self, string: Text, encoding: Text, errors: Text = ...) -> None: ... @overload def __init__(self, length: int) -> None: ... else: @overload def __init__(self) -> None: ... @overload def __init__(self, ints: Iterable[int]) -> None: ... @overload def __init__(self, string: str) -> None: ... @overload def __init__(self, string: Text, encoding: Text, errors: Text = ...) -> None: ... @overload def __init__(self, length: int) -> None: ... def capitalize(self) -> bytearray: ... def center(self, width: int, fillchar: bytes = ...) -> bytearray: ... if sys.version_info >= (3,): def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def copy(self) -> bytearray: ... else: def count(self, x: str) -> int: ... def decode(self, encoding: Text = ..., errors: Text = ...) -> str: ... def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ... def expandtabs(self, tabsize: int = ...) -> bytearray: ... if sys.version_info < (3,): def extend(self, iterable: Union[str, Iterable[int]]) -> None: ... if sys.version_info >= (3,): def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... if sys.version_info >= (3, 5): def hex(self) -> str: ... def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... else: def find(self, sub: str, start: int = ..., end: int = ...) -> int: ... def index(self, sub: str, start: int = ..., end: int = ...) -> int: ... def insert(self, index: int, object: int) -> None: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... if sys.version_info >= (3, 7): def isascii(self) -> bool: ... def isdigit(self) -> bool: ... def islower(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... if sys.version_info >= (3,): def join(self, iterable: Iterable[Union[ByteString, memoryview]]) -> bytearray: ... def ljust(self, width: int, fillchar: bytes = ...) -> bytearray: ... else: def join(self, iterable: Iterable[str]) -> bytearray: ... def ljust(self, width: int, fillchar: str = ...) -> bytearray: ... def lower(self) -> bytearray: ... def lstrip(self, chars: Optional[bytes] = ...) -> bytearray: ... def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ... def replace(self, old: bytes, new: bytes, count: int = ...) -> bytearray: ... if sys.version_info >= (3,): def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ... else: def rfind(self, sub: bytes, start: int = ..., end: int = ...) -> int: ... def rindex(self, sub: bytes, start: int = ..., end: int = ...) -> int: ... def rjust(self, width: int, fillchar: bytes = ...) -> bytearray: ... def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ... def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ... def rstrip(self, chars: Optional[bytes] = ...) -> bytearray: ... def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ... def splitlines(self, keepends: bool = ...) -> List[bytearray]: ... def startswith( self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ..., end: Optional[int] = ..., ) -> bool: ... def strip(self, chars: Optional[bytes] = ...) -> bytearray: ... def swapcase(self) -> bytearray: ... def title(self) -> bytearray: ... if sys.version_info >= (3,): def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytearray: ... else: def translate(self, table: str) -> bytearray: ... def upper(self) -> bytearray: ... def zfill(self, width: int) -> bytearray: ... @staticmethod def fromhex(s: str) -> bytearray: ... if sys.version_info >= (3,): @classmethod def maketrans(cls, frm: bytes, to: bytes) -> bytes: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[int]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... __hash__: None # type: ignore @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> bytearray: ... @overload def __setitem__(self, i: int, x: int) -> None: ... @overload def __setitem__(self, s: slice, x: Union[Iterable[int], bytes]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... if sys.version_info < (3,): def __getslice__(self, start: int, stop: int) -> bytearray: ... def __setslice__(self, start: int, stop: int, x: Union[Sequence[int], str]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __add__(self, s: bytes) -> bytearray: ... if sys.version_info >= (3,): def __iadd__(self, s: Iterable[int]) -> bytearray: ... def __mul__(self, n: int) -> bytearray: ... if sys.version_info >= (3,): def __rmul__(self, n: int) -> bytearray: ... def __imul__(self, n: int) -> bytearray: ... if sys.version_info >= (3, 5): def __mod__(self, value: Any) -> bytes: ... # Incompatible with Sequence.__contains__ def __contains__(self, o: Union[int, bytes]) -> bool: ... # type: ignore def __eq__(self, x: object) -> bool: ... def __ne__(self, x: object) -> bool: ... def __lt__(self, x: bytes) -> bool: ... def __le__(self, x: bytes) -> bool: ... def __gt__(self, x: bytes) -> bool: ... def __ge__(self, x: bytes) -> bool: ... if sys.version_info >= (3,): _mv_container_type = int else: _mv_container_type = str class memoryview(Sized, Container[_mv_container_type]): format: str itemsize: int shape: Optional[Tuple[int, ...]] strides: Optional[Tuple[int, ...]] suboffsets: Optional[Tuple[int, ...]] readonly: bool ndim: int if sys.version_info >= (3,): c_contiguous: bool f_contiguous: bool contiguous: bool nbytes: int def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ... def __enter__(self) -> memoryview: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ... else: def __init__(self, obj: Union[bytes, bytearray, buffer, memoryview]) -> None: ... @overload def __getitem__(self, i: int) -> _mv_container_type: ... @overload def __getitem__(self, s: slice) -> memoryview: ... def __contains__(self, x: object) -> bool: ... def __iter__(self) -> Iterator[_mv_container_type]: ... def __len__(self) -> int: ... @overload def __setitem__(self, s: slice, o: memoryview) -> None: ... @overload def __setitem__(self, i: int, o: bytes) -> None: ... @overload def __setitem__(self, s: slice, o: Sequence[bytes]) -> None: ... def tobytes(self) -> bytes: ... def tolist(self) -> List[int]: ... if sys.version_info >= (3, 2): def release(self) -> None: ... if sys.version_info >= (3, 5): def hex(self) -> str: ... class bool(int): def __init__(self, o: object = ...) -> None: ... @overload def __and__(self, x: bool) -> bool: ... @overload def __and__(self, x: int) -> int: ... @overload def __or__(self, x: bool) -> bool: ... @overload def __or__(self, x: int) -> int: ... @overload def __xor__(self, x: bool) -> bool: ... @overload def __xor__(self, x: int) -> int: ... @overload def __rand__(self, x: bool) -> bool: ... @overload def __rand__(self, x: int) -> int: ... @overload def __ror__(self, x: bool) -> bool: ... @overload def __ror__(self, x: int) -> int: ... @overload def __rxor__(self, x: bool) -> bool: ... @overload def __rxor__(self, x: int) -> int: ... def __getnewargs__(self) -> Tuple[int]: ... class slice(object): start: Any step: Any stop: Any @overload def __init__(self, stop: Any) -> None: ... @overload def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ... __hash__: None # type: ignore def indices(self, len: int) -> Tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]): def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... def __init__(self, iterable: Iterable[_T_co] = ...): ... def __len__(self) -> int: ... def __contains__(self, x: object) -> bool: ... @overload def __getitem__(self, x: int) -> _T_co: ... @overload def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ... def __iter__(self) -> Iterator[_T_co]: ... def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ... def __le__(self, x: Tuple[_T_co, ...]) -> bool: ... def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ... def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ... @overload def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ... @overload def __add__(self, x: Tuple[Any, ...]) -> Tuple[Any, ...]: ... def __mul__(self, n: int) -> Tuple[_T_co, ...]: ... def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ... def count(self, x: Any) -> int: ... if sys.version_info >= (3, 5): def index(self, x: Any, start: int = ..., end: int = ...) -> int: ... else: def index(self, x: Any) -> int: ... class list(MutableSequence[_T], Generic[_T]): @overload def __init__(self) -> None: ... @overload def __init__(self, iterable: Iterable[_T]) -> None: ... if sys.version_info >= (3,): def clear(self) -> None: ... def copy(self) -> List[_T]: ... def append(self, object: _T) -> None: ... def extend(self, iterable: Iterable[_T]) -> None: ... def pop(self, index: int = ...) -> _T: ... def index(self, object: _T, start: int = ..., stop: int = ...) -> int: ... def count(self, object: _T) -> int: ... def insert(self, index: int, object: _T) -> None: ... def remove(self, object: _T) -> None: ... def reverse(self) -> None: ... if sys.version_info >= (3,): def sort(self, *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> None: ... else: def sort(self, cmp: Callable[[_T, _T], Any] = ..., key: Callable[[_T], Any] = ..., reverse: bool = ...) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... __hash__: None # type: ignore @overload def __getitem__(self, i: int) -> _T: ... @overload def __getitem__(self, s: slice) -> List[_T]: ... @overload def __setitem__(self, i: int, o: _T) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... if sys.version_info < (3,): def __getslice__(self, start: int, stop: int) -> List[_T]: ... def __setslice__(self, start: int, stop: int, o: Sequence[_T]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __add__(self, x: List[_T]) -> List[_T]: ... def __iadd__(self: _S, x: Iterable[_T]) -> _S: ... def __mul__(self, n: int) -> List[_T]: ... def __rmul__(self, n: int) -> List[_T]: ... if sys.version_info >= (3,): def __imul__(self: _S, n: int) -> _S: ... def __contains__(self, o: object) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... def __gt__(self, x: List[_T]) -> bool: ... def __ge__(self, x: List[_T]) -> bool: ... def __lt__(self, x: List[_T]) -> bool: ... def __le__(self, x: List[_T]) -> bool: ... class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): # NOTE: Keyword arguments are special. If they are used, _KT must include # str, but we have no way of enforcing it here. @overload def __init__(self, **kwargs: _VT) -> None: ... @overload def __init__(self, map: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def __init__(self, iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ... if sys.version_info < (3,): def has_key(self, k: _KT) -> bool: ... def clear(self) -> None: ... def copy(self) -> Dict[_KT, _VT]: ... def popitem(self) -> Tuple[_KT, _VT]: ... def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... @overload def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... @overload def update(self, **kwargs: _VT) -> None: ... if sys.version_info >= (3,): def keys(self) -> KeysView[_KT]: ... def values(self) -> ValuesView[_VT]: ... def items(self) -> ItemsView[_KT, _VT]: ... else: def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT]: ... def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ... def viewkeys(self) -> KeysView[_KT]: ... def viewvalues(self) -> ValuesView[_VT]: ... def viewitems(self) -> ItemsView[_KT, _VT]: ... @staticmethod @overload def fromkeys(seq: Iterable[_T]) -> Dict[_T, Any]: ... # TODO: Actually a class method (mypy/issues#328) @staticmethod @overload def fromkeys(seq: Iterable[_T], value: _S) -> Dict[_T, _S]: ... def __len__(self) -> int: ... def __getitem__(self, k: _KT) -> _VT: ... def __setitem__(self, k: _KT, v: _VT) -> None: ... def __delitem__(self, v: _KT) -> None: ... def __iter__(self) -> Iterator[_KT]: ... if sys.version_info >= (3, 8): def __reversed__(self) -> Iterator[_KT]: ... def __str__(self) -> str: ... __hash__: None # type: ignore class set(MutableSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... def add(self, element: _T) -> None: ... def clear(self) -> None: ... def copy(self) -> Set[_T]: ... def difference(self, *s: Iterable[Any]) -> Set[_T]: ... def difference_update(self, *s: Iterable[Any]) -> None: ... def discard(self, element: _T) -> None: ... def intersection(self, *s: Iterable[Any]) -> Set[_T]: ... def intersection_update(self, *s: Iterable[Any]) -> None: ... def isdisjoint(self, s: Iterable[Any]) -> bool: ... def issubset(self, s: Iterable[Any]) -> bool: ... def issuperset(self, s: Iterable[Any]) -> bool: ... def pop(self) -> _T: ... def remove(self, element: _T) -> None: ... def symmetric_difference(self, s: Iterable[_T]) -> Set[_T]: ... def symmetric_difference_update(self, s: Iterable[_T]) -> None: ... def union(self, *s: Iterable[_T]) -> Set[_T]: ... def update(self, *s: Iterable[_T]) -> None: ... def __len__(self) -> int: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... def __and__(self, s: AbstractSet[object]) -> Set[_T]: ... def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ... def __or__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __ior__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __sub__(self, s: AbstractSet[object]) -> Set[_T]: ... def __isub__(self, s: AbstractSet[object]) -> Set[_T]: ... def __xor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __ixor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ... def __le__(self, s: AbstractSet[object]) -> bool: ... def __lt__(self, s: AbstractSet[object]) -> bool: ... def __ge__(self, s: AbstractSet[object]) -> bool: ... def __gt__(self, s: AbstractSet[object]) -> bool: ... __hash__: None # type: ignore class frozenset(AbstractSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... def copy(self) -> FrozenSet[_T]: ... def difference(self, *s: Iterable[object]) -> FrozenSet[_T]: ... def intersection(self, *s: Iterable[object]) -> FrozenSet[_T]: ... def isdisjoint(self, s: Iterable[_T]) -> bool: ... def issubset(self, s: Iterable[object]) -> bool: ... def issuperset(self, s: Iterable[object]) -> bool: ... def symmetric_difference(self, s: Iterable[_T]) -> FrozenSet[_T]: ... def union(self, *s: Iterable[_T]) -> FrozenSet[_T]: ... def __len__(self) -> int: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... def __and__(self, s: AbstractSet[_T]) -> FrozenSet[_T]: ... def __or__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ... def __sub__(self, s: AbstractSet[_T]) -> FrozenSet[_T]: ... def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ... def __le__(self, s: AbstractSet[object]) -> bool: ... def __lt__(self, s: AbstractSet[object]) -> bool: ... def __ge__(self, s: AbstractSet[object]) -> bool: ... def __gt__(self, s: AbstractSet[object]) -> bool: ... class enumerate(Iterator[Tuple[int, _T]], Generic[_T]): def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ... def __iter__(self) -> Iterator[Tuple[int, _T]]: ... if sys.version_info >= (3,): def __next__(self) -> Tuple[int, _T]: ... else: def next(self) -> Tuple[int, _T]: ... if sys.version_info >= (3,): class range(Sequence[int]): start: int stop: int step: int @overload def __init__(self, stop: int) -> None: ... @overload def __init__(self, start: int, stop: int, step: int = ...) -> None: ... def count(self, value: int) -> int: ... def index(self, value: int, start: int = ..., stop: Optional[int] = ...) -> int: ... def __len__(self) -> int: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[int]: ... @overload def __getitem__(self, i: int) -> int: ... @overload def __getitem__(self, s: slice) -> range: ... def __repr__(self) -> str: ... def __reversed__(self) -> Iterator[int]: ... else: class xrange(Sized, Iterable[int], Reversible[int]): @overload def __init__(self, stop: int) -> None: ... @overload def __init__(self, start: int, stop: int, step: int = ...) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[int]: ... def __getitem__(self, i: int) -> int: ... def __reversed__(self) -> Iterator[int]: ... class property(object): def __init__(self, fget: Optional[Callable[[Any], Any]] = ..., fset: Optional[Callable[[Any, Any], None]] = ..., fdel: Optional[Callable[[Any], None]] = ..., doc: Optional[str] = ...) -> None: ... def getter(self, fget: Callable[[Any], Any]) -> property: ... def setter(self, fset: Callable[[Any, Any], None]) -> property: ... def deleter(self, fdel: Callable[[Any], None]) -> property: ... def __get__(self, obj: Any, type: Optional[type] = ...) -> Any: ... def __set__(self, obj: Any, value: Any) -> None: ... def __delete__(self, obj: Any) -> None: ... def fget(self) -> Any: ... def fset(self, value: Any) -> None: ... def fdel(self) -> None: ... if sys.version_info < (3,): long = int NotImplemented: Any def abs(__n: SupportsAbs[_T]) -> _T: ... def all(__i: Iterable[object]) -> bool: ... def any(__i: Iterable[object]) -> bool: ... if sys.version_info < (3,): def apply(__func: Callable[..., _T], __args: Optional[Sequence[Any]] = ..., __kwds: Optional[Mapping[str, Any]] = ...) -> _T: ... if sys.version_info >= (3,): def ascii(__o: object) -> str: ... def bin(__number: Union[int, _SupportsIndex]) -> str: ... if sys.version_info >= (3, 7): def breakpoint(*args: Any, **kws: Any) -> None: ... def callable(__o: object) -> bool: ... def chr(__code: int) -> str: ... if sys.version_info < (3,): def cmp(__x: Any, __y: Any) -> int: ... _N1 = TypeVar('_N1', bool, int, float, complex) def coerce(__x: _N1, __y: _N1) -> Tuple[_N1, _N1]: ... if sys.version_info >= (3, 6): # This class is to be exported as PathLike from os, # but we define it here as _PathLike to avoid import cycle issues. # See https://github.com/python/typeshed/pull/991#issuecomment-288160993 class _PathLike(Generic[AnyStr]): def __fspath__(self) -> AnyStr: ... def compile(source: Union[str, bytes, mod, AST], filename: Union[str, bytes, _PathLike[Any]], mode: str, flags: int = ..., dont_inherit: int = ..., optimize: int = ...) -> Any: ... elif sys.version_info >= (3,): def compile(source: Union[str, bytes, mod, AST], filename: Union[str, bytes], mode: str, flags: int = ..., dont_inherit: int = ..., optimize: int = ...) -> Any: ... else: def compile(source: Union[Text, mod], filename: Text, mode: Text, flags: int = ..., dont_inherit: int = ...) -> Any: ... if sys.version_info >= (3,): def copyright() -> None: ... def credits() -> None: ... def delattr(__o: Any, __name: Text) -> None: ... def dir(__o: object = ...) -> List[str]: ... _N2 = TypeVar('_N2', int, float) def divmod(__a: _N2, __b: _N2) -> Tuple[_N2, _N2]: ... def eval(__source: Union[Text, bytes, CodeType], __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Mapping[str, Any]] = ...) -> Any: ... if sys.version_info >= (3,): def exec(__object: Union[str, bytes, CodeType], __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Mapping[str, Any]] = ...) -> Any: ... else: def execfile(__filename: str, __globals: Optional[Dict[str, Any]] = ..., __locals: Optional[Dict[str, Any]] = ...) -> None: ... def exit(code: object = ...) -> NoReturn: ... if sys.version_info >= (3,): @overload def filter(__function: None, __iterable: Iterable[Optional[_T]]) -> Iterator[_T]: ... @overload def filter(__function: Callable[[_T], Any], __iterable: Iterable[_T]) -> Iterator[_T]: ... else: @overload def filter(__function: Callable[[AnyStr], Any], __iterable: AnyStr) -> AnyStr: ... # type: ignore @overload def filter(__function: None, __iterable: Tuple[Optional[_T], ...]) -> Tuple[_T, ...]: ... # type: ignore @overload def filter(__function: Callable[[_T], Any], __iterable: Tuple[_T, ...]) -> Tuple[_T, ...]: ... # type: ignore @overload def filter(__function: None, __iterable: Iterable[Optional[_T]]) -> List[_T]: ... @overload def filter(__function: Callable[[_T], Any], __iterable: Iterable[_T]) -> List[_T]: ... def format(__o: object, __format_spec: str = ...) -> str: ... # TODO unicode def getattr(__o: Any, name: Text, __default: Any = ...) -> Any: ... def globals() -> Dict[str, Any]: ... def hasattr(__o: Any, __name: Text) -> bool: ... def hash(__o: object) -> int: ... if sys.version_info >= (3,): def help(*args: Any, **kwds: Any) -> None: ... def hex(__i: Union[int, _SupportsIndex]) -> str: ... def id(__o: object) -> int: ... if sys.version_info >= (3,): def input(__prompt: Any = ...) -> str: ... else: def input(__prompt: Any = ...) -> Any: ... def intern(__string: str) -> str: ... @overload def iter(__iterable: Iterable[_T]) -> Iterator[_T]: ... @overload def iter(__function: Callable[[], Optional[_T]], __sentinel: None) -> Iterator[_T]: ... @overload def iter(__function: Callable[[], _T], __sentinel: Any) -> Iterator[_T]: ... def isinstance(__o: object, __t: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ... def issubclass(__cls: type, __classinfo: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ... def len(__o: Sized) -> int: ... if sys.version_info >= (3,): def license() -> None: ... def locals() -> Dict[str, Any]: ... if sys.version_info >= (3,): @overload def map(__func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> Iterator[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> Iterator[_S]: ... @overload def map(__func: Callable[..., _S], __iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[_S]: ... else: @overload def map(__func: None, __iter1: Iterable[_T1]) -> List[_T1]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> List[Tuple[_T1, _T2]]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def map(__func: None, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def map(__func: None, __iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> List[Tuple[Any, ...]]: ... @overload def map(__func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> List[_S]: ... @overload def map(__func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> List[_S]: ... @overload def map(__func: Callable[..., _S], __iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> List[_S]: ... if sys.version_info >= (3,): @overload def max(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def max(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... @overload def max(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ..., default: _VT) -> Union[_T, _VT]: ... else: @overload def max(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def max(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... if sys.version_info >= (3,): @overload def min(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def min(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... @overload def min(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ..., default: _VT) -> Union[_T, _VT]: ... else: @overload def min(__arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], Any] = ...) -> _T: ... @overload def min(__iterable: Iterable[_T], *, key: Callable[[_T], Any] = ...) -> _T: ... @overload def next(__i: Iterator[_T]) -> _T: ... @overload def next(__i: Iterator[_T], default: _VT) -> Union[_T, _VT]: ... def oct(__i: Union[int, _SupportsIndex]) -> str: ... if sys.version_info >= (3, 6): def open(file: Union[str, bytes, int, _PathLike[Any]], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]: ... elif sys.version_info >= (3,): def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]: ... else: def open(name: Union[unicode, int], mode: unicode = ..., buffering: int = ...) -> BinaryIO: ... def ord(__c: Union[Text, bytes]) -> int: ... if sys.version_info >= (3,): class _Writer(Protocol): def write(self, __s: str) -> Any: ... def print( *values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ..., flush: bool = ... ) -> None: ... else: class _Writer(Protocol): def write(self, __s: Any) -> Any: ... # This is only available after from __future__ import print_function. def print(*values: object, sep: Optional[Text] = ..., end: Optional[Text] = ..., file: Optional[_Writer] = ...) -> None: ... @overload def pow(__x: int, __y: int) -> Any: ... # The return type can be int or float, depending on y @overload def pow(__x: int, __y: int, __z: int) -> Any: ... @overload def pow(__x: float, __y: float) -> float: ... @overload def pow(__x: float, __y: float, __z: float) -> float: ... def quit(code: object = ...) -> NoReturn: ... if sys.version_info < (3,): def range(__x: int, __y: int = ..., __step: int = ...) -> List[int]: ... def raw_input(__prompt: Any = ...) -> str: ... @overload def reduce(__function: Callable[[_T, _S], _T], __iterable: Iterable[_S], __initializer: _T) -> _T: ... @overload def reduce(__function: Callable[[_T, _T], _T], __iterable: Iterable[_T]) -> _T: ... def reload(__module: Any) -> Any: ... @overload def reversed(__object: Sequence[_T]) -> Iterator[_T]: ... @overload def reversed(__object: Reversible[_T]) -> Iterator[_T]: ... def repr(__o: object) -> str: ... if sys.version_info >= (3,): @overload def round(number: float) -> int: ... @overload def round(number: float, ndigits: None) -> int: ... @overload def round(number: float, ndigits: int) -> float: ... @overload def round(number: SupportsRound[_T]) -> int: ... @overload def round(number: SupportsRound[_T], ndigits: None) -> int: ... @overload def round(number: SupportsRound[_T], ndigits: int) -> _T: ... else: @overload def round(number: float) -> float: ... @overload def round(number: float, ndigits: int) -> float: ... @overload def round(number: SupportsFloat) -> float: ... @overload def round(number: SupportsFloat, ndigits: int) -> float: ... def setattr(__object: Any, __name: Text, __value: Any) -> None: ... if sys.version_info >= (3,): def sorted(__iterable: Iterable[_T], *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> List[_T]: ... else: def sorted(__iterable: Iterable[_T], *, cmp: Callable[[_T, _T], int] = ..., key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> List[_T]: ... @overload def sum(__iterable: Iterable[_T]) -> Union[_T, int]: ... @overload def sum(__iterable: Iterable[_T], __start: _S) -> Union[_T, _S]: ... if sys.version_info < (3,): def unichr(__i: int) -> unicode: ... def vars(__object: Any = ...) -> Dict[str, Any]: ... if sys.version_info >= (3,): @overload def zip(__iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def zip(__iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[Tuple[Any, ...]]: ... else: @overload def zip(__iter1: Iterable[_T1]) -> List[Tuple[_T1]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> List[Tuple[_T1, _T2]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def zip(__iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4], __iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def zip(__iter1: Iterable[Any], __iter2: Iterable[Any], __iter3: Iterable[Any], __iter4: Iterable[Any], __iter5: Iterable[Any], __iter6: Iterable[Any], *iterables: Iterable[Any]) -> List[Tuple[Any, ...]]: ... def __import__(name: Text, globals: Optional[Mapping[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ..., fromlist: Sequence[str] = ..., level: int = ...) -> Any: ... # Actually the type of Ellipsis is , but since it's # not exposed anywhere under that name, we make it private here. class ellipsis: ... Ellipsis: ellipsis if sys.version_info < (3,): # TODO: buffer support is incomplete; e.g. some_string.startswith(some_buffer) doesn't type check. _AnyBuffer = TypeVar('_AnyBuffer', str, unicode, bytearray, buffer) class buffer(Sized): def __init__(self, object: _AnyBuffer, offset: int = ..., size: int = ...) -> None: ... def __add__(self, other: _AnyBuffer) -> str: ... def __cmp__(self, other: _AnyBuffer) -> bool: ... def __getitem__(self, key: Union[int, slice]) -> str: ... def __getslice__(self, i: int, j: int) -> str: ... def __len__(self) -> int: ... def __mul__(self, x: int) -> str: ... class BaseException(object): args: Tuple[Any, ...] if sys.version_info < (3,): message: Any if sys.version_info >= (3,): __cause__: Optional[BaseException] __context__: Optional[BaseException] __suppress_context__: bool __traceback__: Optional[TracebackType] def __init__(self, *args: object) -> None: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... if sys.version_info < (3,): def __getitem__(self, i: int) -> Any: ... def __getslice__(self, start: int, stop: int) -> Tuple[Any, ...]: ... if sys.version_info >= (3,): def with_traceback(self, tb: Optional[TracebackType]) -> BaseException: ... class GeneratorExit(BaseException): ... class KeyboardInterrupt(BaseException): ... class SystemExit(BaseException): code: int class Exception(BaseException): ... class StopIteration(Exception): if sys.version_info >= (3,): value: Any if sys.version_info >= (3,): _StandardError = Exception class OSError(Exception): errno: int strerror: str # filename, filename2 are actually Union[str, bytes, None] filename: Any filename2: Any EnvironmentError = OSError IOError = OSError else: class StandardError(Exception): ... _StandardError = StandardError class EnvironmentError(StandardError): errno: int strerror: str # TODO can this be unicode? filename: str class OSError(EnvironmentError): ... class IOError(EnvironmentError): ... class ArithmeticError(_StandardError): ... class AssertionError(_StandardError): ... class AttributeError(_StandardError): ... class BufferError(_StandardError): ... class EOFError(_StandardError): ... class ImportError(_StandardError): if sys.version_info >= (3, 3): def __init__(self, *args, name: Optional[str] = ..., path: Optional[str] = ...) -> None: ... name: Optional[str] path: Optional[str] class LookupError(_StandardError): ... class MemoryError(_StandardError): ... class NameError(_StandardError): ... class ReferenceError(_StandardError): ... class RuntimeError(_StandardError): ... if sys.version_info >= (3, 5): class StopAsyncIteration(Exception): value: Any class SyntaxError(_StandardError): msg: str lineno: int offset: Optional[int] text: Optional[str] filename: str class SystemError(_StandardError): ... class TypeError(_StandardError): ... class ValueError(_StandardError): ... class FloatingPointError(ArithmeticError): ... class OverflowError(ArithmeticError): ... class ZeroDivisionError(ArithmeticError): ... if sys.version_info >= (3, 6): class ModuleNotFoundError(ImportError): ... class IndexError(LookupError): ... class KeyError(LookupError): ... class UnboundLocalError(NameError): ... class WindowsError(OSError): winerror: int if sys.version_info >= (3,): class BlockingIOError(OSError): characters_written: int class ChildProcessError(OSError): ... class ConnectionError(OSError): ... class BrokenPipeError(ConnectionError): ... class ConnectionAbortedError(ConnectionError): ... class ConnectionRefusedError(ConnectionError): ... class ConnectionResetError(ConnectionError): ... class FileExistsError(OSError): ... class FileNotFoundError(OSError): ... class InterruptedError(OSError): ... class IsADirectoryError(OSError): ... class NotADirectoryError(OSError): ... class PermissionError(OSError): ... class ProcessLookupError(OSError): ... class TimeoutError(OSError): ... class NotImplementedError(RuntimeError): ... if sys.version_info >= (3, 5): class RecursionError(RuntimeError): ... class IndentationError(SyntaxError): ... class TabError(IndentationError): ... class UnicodeError(ValueError): ... class UnicodeDecodeError(UnicodeError): encoding: str object: bytes start: int end: int reason: str def __init__(self, __encoding: str, __object: bytes, __start: int, __end: int, __reason: str) -> None: ... class UnicodeEncodeError(UnicodeError): encoding: str object: Text start: int end: int reason: str def __init__(self, __encoding: str, __object: Text, __start: int, __end: int, __reason: str) -> None: ... class UnicodeTranslateError(UnicodeError): ... class Warning(Exception): ... class UserWarning(Warning): ... class DeprecationWarning(Warning): ... class SyntaxWarning(Warning): ... class RuntimeWarning(Warning): ... class FutureWarning(Warning): ... class PendingDeprecationWarning(Warning): ... class ImportWarning(Warning): ... class UnicodeWarning(Warning): ... class BytesWarning(Warning): ... if sys.version_info >= (3, 2): class ResourceWarning(Warning): ... if sys.version_info < (3,): class file(BinaryIO): @overload def __init__(self, file: str, mode: str = ..., buffering: int = ...) -> None: ... @overload def __init__(self, file: unicode, mode: str = ..., buffering: int = ...) -> None: ... @overload def __init__(self, file: int, mode: str = ..., buffering: int = ...) -> None: ... def __iter__(self) -> Iterator[str]: ... def next(self) -> str: ... def read(self, n: int = ...) -> str: ... def __enter__(self) -> BinaryIO: ... def __exit__(self, t: Optional[type] = ..., exc: Optional[BaseException] = ..., tb: Optional[Any] = ...) -> Optional[bool]: ... def flush(self) -> None: ... def fileno(self) -> int: ... def isatty(self) -> bool: ... def close(self) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def seekable(self) -> bool: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... def readline(self, limit: int = ...) -> str: ... def readlines(self, hint: int = ...) -> List[str]: ... def write(self, data: str) -> int: ... def writelines(self, data: Iterable[str]) -> None: ... def truncate(self, pos: Optional[int] = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/exceptions.pyi0000664000175000017500000000512013577124116024020 0ustar davedave00000000000000from __builtin__ import ArithmeticError as ArithmeticError from __builtin__ import AssertionError as AssertionError from __builtin__ import AttributeError as AttributeError from __builtin__ import BaseException as BaseException from __builtin__ import BufferError as BufferError from __builtin__ import BytesWarning as BytesWarning from __builtin__ import DeprecationWarning as DeprecationWarning from __builtin__ import EOFError as EOFError from __builtin__ import EnvironmentError as EnvironmentError from __builtin__ import Exception as Exception from __builtin__ import FloatingPointError as FloatingPointError from __builtin__ import FutureWarning as FutureWarning from __builtin__ import GeneratorExit as GeneratorExit from __builtin__ import IOError as IOError from __builtin__ import ImportError as ImportError from __builtin__ import ImportWarning as ImportWarning from __builtin__ import IndentationError as IndentationError from __builtin__ import IndexError as IndexError from __builtin__ import KeyError as KeyError from __builtin__ import KeyboardInterrupt as KeyboardInterrupt from __builtin__ import LookupError as LookupError from __builtin__ import MemoryError as MemoryError from __builtin__ import NameError as NameError from __builtin__ import NotImplementedError as NotImplementedError from __builtin__ import OSError as OSError from __builtin__ import OverflowError as OverflowError from __builtin__ import PendingDeprecationWarning as PendingDeprecationWarning from __builtin__ import ReferenceError as ReferenceError from __builtin__ import RuntimeError as RuntimeError from __builtin__ import RuntimeWarning as RuntimeWarning from __builtin__ import StandardError as StandardError from __builtin__ import StopIteration as StopIteration from __builtin__ import SyntaxError as SyntaxError from __builtin__ import SyntaxWarning as SyntaxWarning from __builtin__ import SystemError as SystemError from __builtin__ import SystemExit as SystemExit from __builtin__ import TabError as TabError from __builtin__ import TypeError as TypeError from __builtin__ import UnboundLocalError as UnboundLocalError from __builtin__ import UnicodeError as UnicodeError from __builtin__ import UnicodeDecodeError as UnicodeDecodeError from __builtin__ import UnicodeEncodeError as UnicodeEncodeError from __builtin__ import UnicodeTranslateError as UnicodeTranslateError from __builtin__ import UnicodeWarning as UnicodeWarning from __builtin__ import UserWarning as UserWarning from __builtin__ import ValueError as ValueError from __builtin__ import Warning as Warning from __builtin__ import ZeroDivisionError as ZeroDivisionError jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/stringold.pyi0000664000175000017500000000403513577124116023650 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/stringold.py from typing import AnyStr, Iterable, List, Optional, Type whitespace: str lowercase: str uppercase: str letters: str digits: str hexdigits: str octdigits: str _idmap: str _idmapL: Optional[List[str]] index_error = ValueError atoi_error = ValueError atof_error = ValueError atol_error = ValueError def lower(s: AnyStr) -> AnyStr: ... def upper(s: AnyStr) -> AnyStr: ... def swapcase(s: AnyStr) -> AnyStr: ... def strip(s: AnyStr) -> AnyStr: ... def lstrip(s: AnyStr) -> AnyStr: ... def rstrip(s: AnyStr) -> AnyStr: ... def split(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ... def splitfields(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ... def join(words: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ... def joinfields(words: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ... def index(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rindex(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def count(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def find(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rfind(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def atof(s: unicode) -> float: ... def atoi(s: unicode, base: int = ...) -> int: ... def atol(s: unicode, base: int = ...) -> long: ... def ljust(s: AnyStr, width: int, fillchar: AnyStr = ...) -> AnyStr: ... def rjust(s: AnyStr, width: int, fillchar: AnyStr = ...) -> AnyStr: ... def center(s: AnyStr, width: int, fillchar: AnyStr = ...) -> AnyStr: ... def zfill(s: AnyStr, width: int) -> AnyStr: ... def expandtabs(s: AnyStr, tabsize: int = ...) -> AnyStr: ... def translate(s: str, table: str, deletions: str = ...) -> str: ... def capitalize(s: AnyStr) -> AnyStr: ... def capwords(s: AnyStr, sep: AnyStr = ...) -> AnyStr: ... def maketrans(fromstr: str, tostr: str) -> str: ... def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = ...) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/stat.pyi0000664000175000017500000000174113577124116022617 0ustar davedave00000000000000def S_ISDIR(mode: int) -> bool: ... def S_ISCHR(mode: int) -> bool: ... def S_ISBLK(mode: int) -> bool: ... def S_ISREG(mode: int) -> bool: ... def S_ISFIFO(mode: int) -> bool: ... def S_ISLNK(mode: int) -> bool: ... def S_ISSOCK(mode: int) -> bool: ... def S_IMODE(mode: int) -> int: ... def S_IFMT(mode: int) -> int: ... ST_MODE: int ST_INO: int ST_DEV: int ST_NLINK: int ST_UID: int ST_GID: int ST_SIZE: int ST_ATIME: int ST_MTIME: int ST_CTIME: int S_IFSOCK: int S_IFLNK: int S_IFREG: int S_IFBLK: int S_IFDIR: int S_IFCHR: int S_IFIFO: int S_ISUID: int S_ISGID: int S_ISVTX: int S_IRWXU: int S_IRUSR: int S_IWUSR: int S_IXUSR: int S_IRWXG: int S_IRGRP: int S_IWGRP: int S_IXGRP: int S_IRWXO: int S_IROTH: int S_IWOTH: int S_IXOTH: int S_ENFMT: int S_IREAD: int S_IWRITE: int S_IEXEC: int UF_NODUMP: int UF_IMMUTABLE: int UF_APPEND: int UF_OPAQUE: int UF_NOUNLINK: int UF_COMPRESSED: int UF_HIDDEN: int SF_ARCHIVED: int SF_IMMUTABLE: int SF_APPEND: int SF_NOUNLINK: int SF_SNAPSHOT: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/string.pyi0000664000175000017500000000717213577124116023156 0ustar davedave00000000000000# Stubs for string # Based on http://docs.python.org/3.2/library/string.html from typing import Any, AnyStr, Iterable, List, Mapping, Optional, overload, Sequence, Text, Tuple, Union ascii_letters: str ascii_lowercase: str ascii_uppercase: str digits: str hexdigits: str letters: str lowercase: str octdigits: str punctuation: str printable: str uppercase: str whitespace: str def capwords(s: AnyStr, sep: AnyStr = ...) -> AnyStr: ... # TODO: originally named 'from' def maketrans(_from: str, to: str) -> str: ... def atof(s: unicode) -> float: ... def atoi(s: unicode, base: int = ...) -> int: ... def atol(s: unicode, base: int = ...) -> int: ... def capitalize(word: AnyStr) -> AnyStr: ... def find(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rfind(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def index(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def rindex(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def count(s: unicode, sub: unicode, start: int = ..., end: int = ...) -> int: ... def lower(s: AnyStr) -> AnyStr: ... def split(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ... def rsplit(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ... def splitfields(s: AnyStr, sep: AnyStr = ..., maxsplit: int = ...) -> List[AnyStr]: ... def join(words: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ... def joinfields(word: Iterable[AnyStr], sep: AnyStr = ...) -> AnyStr: ... def lstrip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ... def rstrip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ... def strip(s: AnyStr, chars: AnyStr = ...) -> AnyStr: ... def swapcase(s: AnyStr) -> AnyStr: ... def translate(s: str, table: str, deletechars: str = ...) -> str: ... def upper(s: AnyStr) -> AnyStr: ... def ljust(s: AnyStr, width: int, fillchar: AnyStr = ...) -> AnyStr: ... def rjust(s: AnyStr, width: int, fillchar: AnyStr = ...) -> AnyStr: ... def center(s: AnyStr, width: int, fillchar: AnyStr = ...) -> AnyStr: ... def zfill(s: AnyStr, width: int) -> AnyStr: ... def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = ...) -> AnyStr: ... class Template: template: Text def __init__(self, template: Text) -> None: ... @overload def substitute(self, mapping: Union[Mapping[str, str], Mapping[unicode, str]] = ..., **kwds: str) -> str: ... @overload def substitute(self, mapping: Union[Mapping[str, Text], Mapping[unicode, Text]] = ..., **kwds: Text) -> Text: ... @overload def safe_substitute(self, mapping: Union[Mapping[str, str], Mapping[unicode, str]] = ..., **kwds: str) -> str: ... @overload def safe_substitute(self, mapping: Union[Mapping[str, Text], Mapping[unicode, Text]], **kwds: Text) -> Text: ... # TODO(MichalPokorny): This is probably badly and/or loosely typed. class Formatter(object): def format(self, format_string: str, *args, **kwargs) -> str: ... def vformat(self, format_string: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> str: ... def parse(self, format_string: str) -> Iterable[Tuple[str, str, str, str]]: ... def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ... def get_value(self, key: Union[int, str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ... def check_unused_args(self, used_args: Sequence[Union[int, str]], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ... def format_field(self, value: Any, format_spec: str) -> Any: ... def convert_field(self, value: Any, conversion: str) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/mutex.pyi0000664000175000017500000000065213577124116023006 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/mutex.py from typing import Any, Callable, Deque, TypeVar _ArgType = TypeVar('_ArgType') class mutex: locked: bool queue: Deque[Any] def __init__(self) -> None: ... def test(self) -> bool: ... def testandset(self) -> bool: ... def lock(self, function: Callable[[_ArgType], Any], argument: _ArgType) -> None: ... def unlock(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/re.pyi0000664000175000017500000000733413577124116022256 0ustar davedave00000000000000# Stubs for re # Ron Murawski # 'bytes' support added by Jukka Lehtosalo # based on: http: //docs.python.org/2.7/library/re.html from typing import ( List, Iterator, overload, Callable, Tuple, Sequence, Dict, Generic, AnyStr, Match, Pattern, Any, Optional, Union ) # ----- re variables and constants ----- DEBUG: int I: int IGNORECASE: int L: int LOCALE: int M: int MULTILINE: int S: int DOTALL: int X: int VERBOSE: int U: int UNICODE: int T: int TEMPLATE: int class error(Exception): ... @overload def compile(pattern: AnyStr, flags: int = ...) -> Pattern[AnyStr]: ... @overload def compile(pattern: Pattern[AnyStr], flags: int = ...) -> Pattern[AnyStr]: ... @overload def search(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> Optional[Match[AnyStr]]: ... @overload def search(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> Optional[Match[AnyStr]]: ... @overload def match(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> Optional[Match[AnyStr]]: ... @overload def match(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> Optional[Match[AnyStr]]: ... @overload def split(pattern: Union[str, unicode], string: AnyStr, maxsplit: int = ..., flags: int = ...) -> List[AnyStr]: ... @overload def split(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, maxsplit: int = ..., flags: int = ...) -> List[AnyStr]: ... @overload def findall(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> List[Any]: ... @overload def findall(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> List[Any]: ... # Return an iterator yielding match objects over all non-overlapping matches # for the RE pattern in string. The string is scanned left-to-right, and # matches are returned in the order found. Empty matches are included in the # result unless they touch the beginning of another match. @overload def finditer(pattern: Union[str, unicode], string: AnyStr, flags: int = ...) -> Iterator[Match[AnyStr]]: ... @overload def finditer(pattern: Union[Pattern[str], Pattern[unicode]], string: AnyStr, flags: int = ...) -> Iterator[Match[AnyStr]]: ... @overload def sub(pattern: Union[str, unicode], repl: AnyStr, string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ... @overload def sub(pattern: Union[str, unicode], repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ... @overload def sub(pattern: Union[Pattern[str], Pattern[unicode]], repl: AnyStr, string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ... @overload def sub(pattern: Union[Pattern[str], Pattern[unicode]], repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: int = ...) -> AnyStr: ... @overload def subn(pattern: Union[str, unicode], repl: AnyStr, string: AnyStr, count: int = ..., flags: int = ...) -> Tuple[AnyStr, int]: ... @overload def subn(pattern: Union[str, unicode], repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: int = ...) -> Tuple[AnyStr, int]: ... @overload def subn(pattern: Union[Pattern[str], Pattern[unicode]], repl: AnyStr, string: AnyStr, count: int = ..., flags: int = ...) -> Tuple[AnyStr, int]: ... @overload def subn(pattern: Union[Pattern[str], Pattern[unicode]], repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: int = ...) -> Tuple[AnyStr, int]: ... def escape(string: AnyStr) -> AnyStr: ... def purge() -> None: ... def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: int = ...) -> Pattern[AnyStr]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/atexit.pyi0000664000175000017500000000016513577124116023141 0ustar davedave00000000000000from typing import TypeVar, Any _FT = TypeVar('_FT') def register(func: _FT, *args: Any, **kargs: Any) -> _FT: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/Queue.pyi0000664000175000017500000000163513577124116022732 0ustar davedave00000000000000# Stubs for Queue (Python 2) from collections import deque from typing import Any, Deque, TypeVar, Generic, Optional _T = TypeVar('_T') class Empty(Exception): ... class Full(Exception): ... class Queue(Generic[_T]): maxsize: Any mutex: Any not_empty: Any not_full: Any all_tasks_done: Any unfinished_tasks: Any queue: Deque[Any] # undocumented def __init__(self, maxsize: int = ...) -> None: ... def task_done(self) -> None: ... def join(self) -> None: ... def qsize(self) -> int: ... def empty(self) -> bool: ... def full(self) -> bool: ... def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ... def put_nowait(self, item: _T) -> None: ... def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ... def get_nowait(self) -> _T: ... class PriorityQueue(Queue[_T]): ... class LifoQueue(Queue[_T]): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/spwd.pyi0000664000175000017500000000046413577124116022622 0ustar davedave00000000000000from typing import List, NamedTuple class struct_spwd(NamedTuple): sp_nam: str sp_pwd: str sp_lstchg: int sp_min: int sp_max: int sp_warn: int sp_inact: int sp_expire: int sp_flag: int def getspall() -> List[struct_spwd]: ... def getspnam(name: str) -> struct_spwd: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/imp.pyi0000664000175000017500000000245513577124116022434 0ustar davedave00000000000000"""Stubs for the 'imp' module.""" from typing import List, Optional, Tuple, Iterable, IO, Any import types C_BUILTIN: int C_EXTENSION: int IMP_HOOK: int PKG_DIRECTORY: int PY_CODERESOURCE: int PY_COMPILED: int PY_FROZEN: int PY_RESOURCE: int PY_SOURCE: int SEARCH_ERROR: int def acquire_lock() -> None: ... def find_module(name: str, path: Iterable[str] = ...) -> Optional[Tuple[IO[Any], str, Tuple[str, str, int]]]: ... def get_magic() -> str: ... def get_suffixes() -> List[Tuple[str, str, int]]: ... def init_builtin(name: str) -> types.ModuleType: ... def init_frozen(name: str) -> types.ModuleType: ... def is_builtin(name: str) -> int: ... def is_frozen(name: str) -> bool: ... def load_compiled(name: str, pathname: str, file: IO[Any] = ...) -> types.ModuleType: ... def load_dynamic(name: str, pathname: str, file: IO[Any] = ...) -> types.ModuleType: ... def load_module(name: str, file: str, pathname: str, description: Tuple[str, str, int]) -> types.ModuleType: ... def load_source(name: str, pathname: str, file: IO[Any] = ...) -> types.ModuleType: ... def lock_held() -> bool: ... def new_module(name: str) -> types.ModuleType: ... def release_lock() -> None: ... class NullImporter: def __init__(self, path_string: str) -> None: ... def find_module(self, fullname: str, path: str = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_hotshot.pyi0000664000175000017500000000154713577124116023477 0ustar davedave00000000000000"""Stub file for the '_hotshot' module.""" # This is an autogenerated file. It serves as a starting point # for a more precise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. from typing import Any, List, Tuple, Dict, Generic def coverage(a: str) -> Any: ... def logreader(a: str) -> LogReaderType: ... def profiler(a: str, *args, **kwargs) -> Any: ... def resolution() -> Tuple[Any, ...]: ... class LogReaderType(object): def close(self) -> None: ... def fileno(self) -> int: ... class ProfilerType(object): def addinfo(self, a: str, b: str) -> None: ... def close(self) -> None: ... def fileno(self) -> int: ... def runcall(self, *args, **kwargs) -> Any: ... def runcode(self, a, b, *args, **kwargs) -> Any: ... def start(self) -> None: ... def stop(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/smtplib.pyi0000664000175000017500000000475613577124116023327 0ustar davedave00000000000000from typing import Any class SMTPException(Exception): ... class SMTPServerDisconnected(SMTPException): ... class SMTPResponseException(SMTPException): smtp_code: Any smtp_error: Any args: Any def __init__(self, code, msg) -> None: ... class SMTPSenderRefused(SMTPResponseException): smtp_code: Any smtp_error: Any sender: Any args: Any def __init__(self, code, msg, sender) -> None: ... class SMTPRecipientsRefused(SMTPException): recipients: Any args: Any def __init__(self, recipients) -> None: ... class SMTPDataError(SMTPResponseException): ... class SMTPConnectError(SMTPResponseException): ... class SMTPHeloError(SMTPResponseException): ... class SMTPAuthenticationError(SMTPResponseException): ... def quoteaddr(addr): ... def quotedata(data): ... class SSLFakeFile: sslobj: Any def __init__(self, sslobj) -> None: ... def readline(self, size=...): ... def close(self): ... class SMTP: debuglevel: Any file: Any helo_resp: Any ehlo_msg: Any ehlo_resp: Any does_esmtp: Any default_port: Any timeout: Any esmtp_features: Any local_hostname: Any def __init__(self, host: str = ..., port: int = ..., local_hostname=..., timeout=...) -> None: ... def set_debuglevel(self, debuglevel): ... sock: Any def connect(self, host=..., port=...): ... def send(self, str): ... def putcmd(self, cmd, args=...): ... def getreply(self): ... def docmd(self, cmd, args=...): ... def helo(self, name=...): ... def ehlo(self, name=...): ... def has_extn(self, opt): ... def help(self, args=...): ... def rset(self): ... def noop(self): ... def mail(self, sender, options=...): ... def rcpt(self, recip, options=...): ... def data(self, msg): ... def verify(self, address): ... vrfy: Any def expn(self, address): ... def ehlo_or_helo_if_needed(self): ... def login(self, user, password): ... def starttls(self, keyfile=..., certfile=...): ... def sendmail(self, from_addr, to_addrs, msg, mail_options=..., rcpt_options=...): ... def close(self): ... def quit(self): ... class SMTP_SSL(SMTP): default_port: Any keyfile: Any certfile: Any def __init__(self, host=..., port=..., local_hostname=..., keyfile=..., certfile=..., timeout=...) -> None: ... class LMTP(SMTP): ehlo_msg: Any def __init__(self, host=..., port=..., local_hostname=...) -> None: ... sock: Any def connect(self, host=..., port=...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/thread.pyi0000664000175000017500000000167513577124116023121 0ustar davedave00000000000000"""Stubs for the "thread" module.""" from typing import Callable, Any def _count() -> int: ... class error(Exception): ... class LockType: def acquire(self, waitflag: int = ...) -> bool: ... def acquire_lock(self, waitflag: int = ...) -> bool: ... def release(self) -> None: ... def release_lock(self) -> None: ... def locked(self) -> bool: ... def locked_lock(self) -> bool: ... def __enter__(self) -> LockType: ... def __exit__(self, typ: Any, value: Any, traceback: Any) -> None: ... class _local(object): ... class _localdummy(object): ... def start_new(function: Callable[..., Any], args: Any, kwargs: Any = ...) -> int: ... def start_new_thread(function: Callable[..., Any], args: Any, kwargs: Any = ...) -> int: ... def interrupt_main() -> None: ... def exit() -> None: ... def exit_thread() -> Any: ... def allocate_lock() -> LockType: ... def get_ident() -> int: ... def stack_size(size: int = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/CGIHTTPServer.pyi0000664000175000017500000000034313577124116024132 0ustar davedave00000000000000# Stubs for CGIHTTPServer (Python 2.7) from typing import List import SimpleHTTPServer class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): cgi_directories: List[str] def do_POST(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/gzip.pyi0000664000175000017500000000175013577124116022615 0ustar davedave00000000000000from typing import Any, IO, Text import io class GzipFile(io.BufferedIOBase): myfileobj: Any max_read_chunk: Any mode: Any extrabuf: Any extrasize: Any extrastart: Any name: Any min_readsize: Any compress: Any fileobj: Any offset: Any mtime: Any def __init__(self, filename: str = ..., mode: Text = ..., compresslevel: int = ..., fileobj: IO[str] = ..., mtime: float = ...) -> None: ... @property def filename(self): ... size: Any crc: Any def write(self, data): ... def read(self, size=...): ... @property def closed(self): ... def close(self): ... def flush(self, zlib_mode=...): ... def fileno(self): ... def rewind(self): ... def readable(self): ... def writable(self): ... def seekable(self): ... def seek(self, offset, whence=...): ... def readline(self, size=...): ... def open(filename: str, mode: Text = ..., compresslevel: int = ...) -> GzipFile: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/robotparser.pyi0000664000175000017500000000034613577124116024206 0ustar davedave00000000000000class RobotFileParser: def set_url(self, url: str): ... def read(self): ... def parse(self, lines: str): ... def can_fetch(self, user_agent: str, url: str): ... def mtime(self): ... def modified(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/toaiff.pyi0000664000175000017500000000052113577124116023107 0ustar davedave00000000000000# Stubs for toaiff (Python 2) # Source: https://hg.python.org/cpython/file/2.7/Lib/toaiff.py from pipes import Template from typing import Dict, List table: Dict[str, Template] t: Template uncompress: Template class error(Exception): ... def toaiff(filename: str) -> str: ... def _toaiff(filename: str, temps: List[str]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/tokenize.pyi0000664000175000017500000000532213577124116023473 0ustar davedave00000000000000# Automatically generated by pytype, manually fixed up. May still contain errors. from typing import Any, Callable, Dict, Generator, Iterator, List, Tuple, Union, Iterable __author__: str __credits__: str AMPER: int AMPEREQUAL: int AT: int BACKQUOTE: int Binnumber: str Bracket: str CIRCUMFLEX: int CIRCUMFLEXEQUAL: int COLON: int COMMA: int COMMENT: int Comment: str ContStr: str DEDENT: int DOT: int DOUBLESLASH: int DOUBLESLASHEQUAL: int DOUBLESTAR: int DOUBLESTAREQUAL: int Decnumber: str Double: str Double3: str ENDMARKER: int EQEQUAL: int EQUAL: int ERRORTOKEN: int Expfloat: str Exponent: str Floatnumber: str Funny: str GREATER: int GREATEREQUAL: int Hexnumber: str INDENT: int def ISEOF(x: int) -> bool: ... def ISNONTERMINAL(x: int) -> bool: ... def ISTERMINAL(x: int) -> bool: ... Ignore: str Imagnumber: str Intnumber: str LBRACE: int LEFTSHIFT: int LEFTSHIFTEQUAL: int LESS: int LESSEQUAL: int LPAR: int LSQB: int MINEQUAL: int MINUS: int NAME: int NEWLINE: int NL: int NOTEQUAL: int NT_OFFSET: int NUMBER: int N_TOKENS: int Name: str Number: str OP: int Octnumber: str Operator: str PERCENT: int PERCENTEQUAL: int PLUS: int PLUSEQUAL: int PlainToken: str Pointfloat: str PseudoExtras: str PseudoToken: str RBRACE: int RIGHTSHIFT: int RIGHTSHIFTEQUAL: int RPAR: int RSQB: int SEMI: int SLASH: int SLASHEQUAL: int STAR: int STAREQUAL: int STRING: int Single: str Single3: str Special: str String: str TILDE: int Token: str Triple: str VBAR: int VBAREQUAL: int Whitespace: str chain: type double3prog: type endprogs: Dict[str, Any] pseudoprog: type single3prog: type single_quoted: Dict[str, str] t: str tabsize: int tok_name: Dict[int, str] tokenprog: type triple_quoted: Dict[str, str] x: str _Pos = Tuple[int, int] _TokenType = Tuple[int, str, _Pos, _Pos, str] def any(*args, **kwargs) -> str: ... def generate_tokens(readline: Callable[[], str]) -> Generator[_TokenType, None, None]: ... def group(*args: str) -> str: ... def maybe(*args: str) -> str: ... def printtoken(type: int, token: str, srow_scol: _Pos, erow_ecol: _Pos, line: str) -> None: ... def tokenize(readline: Callable[[], str], tokeneater: Callable[[Tuple[int, str, _Pos, _Pos, str]], None]) -> None: ... def tokenize_loop(readline: Callable[[], str], tokeneater: Callable[[Tuple[int, str, _Pos, _Pos, str]], None]) -> None: ... def untokenize(iterable: Iterable[_TokenType]) -> str: ... class StopTokenizing(Exception): ... class TokenError(Exception): ... class Untokenizer: prev_col: int prev_row: int tokens: List[str] def __init__(self) -> None: ... def add_whitespace(self, _Pos) -> None: ... def compat(self, token: Tuple[int, Any], iterable: Iterator[_TokenType]) -> None: ... def untokenize(self, iterable: Iterable[_TokenType]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/future_builtins.pyi0000664000175000017500000000034213577124116025063 0ustar davedave00000000000000from typing import Any from itertools import ifilter as filter from itertools import imap as map from itertools import izip as zip def ascii(obj: Any) -> str: ... def hex(x: int) -> str: ... def oct(x: int) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/sys.pyi0000664000175000017500000000712213577124116022461 0ustar davedave00000000000000"""Stubs for the 'sys' module.""" from typing import ( IO, NoReturn, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional, Callable, overload, Text, Type, ) from types import FrameType, ModuleType, TracebackType, ClassType # The following type alias are stub-only and do not exist during runtime _ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType] _OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]] class _flags: bytes_warning: int debug: int division_new: int division_warning: int dont_write_bytecode: int hash_randomization: int ignore_environment: int inspect: int interactive: int no_site: int no_user_site: int optimize: int py3k_warning: int tabcheck: int unicode: int verbose: int class _float_info: max: float max_exp: int max_10_exp: int min: float min_exp: int min_10_exp: int dig: int mant_dig: int epsilon: float radix: int rounds: int class _version_info(Tuple[int, int, int, str, int]): major: int minor: int micro: int releaselevel: str serial: int _mercurial: Tuple[str, str, str] api_version: int argv: List[str] builtin_module_names: Tuple[str, ...] byteorder: str copyright: str dont_write_bytecode: bool exec_prefix: str executable: str flags: _flags float_repr_style: str hexversion: int long_info: object maxint: int maxsize: int maxunicode: int modules: Dict[str, Any] path: List[str] platform: str prefix: str py3kwarning: bool __stderr__: IO[str] __stdin__: IO[str] __stdout__: IO[str] stderr: IO[str] stdin: IO[str] stdout: IO[str] subversion: Tuple[str, str, str] version: str warnoptions: object float_info: _float_info version_info: _version_info ps1: str ps2: str last_type: type last_value: BaseException last_traceback: TracebackType # TODO precise types meta_path: List[Any] path_hooks: List[Any] path_importer_cache: Dict[str, Any] displayhook: Optional[Callable[[int], None]] excepthook: Optional[Callable[[type, BaseException, TracebackType], None]] exc_type: Optional[type] exc_value: Union[BaseException, ClassType] exc_traceback: TracebackType class _WindowsVersionType: major: Any minor: Any build: Any platform: Any service_pack: Any service_pack_major: Any service_pack_minor: Any suite_mask: Any product_type: Any def getwindowsversion() -> _WindowsVersionType: ... def _clear_type_cache() -> None: ... def _current_frames() -> Dict[int, FrameType]: ... def _getframe(depth: int = ...) -> FrameType: ... def call_tracing(fn: Any, args: Any) -> Any: ... def __displayhook__(value: int) -> None: ... def __excepthook__(type_: type, value: BaseException, traceback: TracebackType) -> None: ... def exc_clear() -> None: ... def exc_info() -> _OptExcInfo: ... # sys.exit() accepts an optional argument of anything printable def exit(arg: Any = ...) -> NoReturn: ... def getcheckinterval() -> int: ... # deprecated def getdefaultencoding() -> str: ... def getdlopenflags() -> int: ... def getfilesystemencoding() -> str: ... # In practice, never returns None def getrefcount(arg: Any) -> int: ... def getrecursionlimit() -> int: ... def getsizeof(obj: object, default: int = ...) -> int: ... def getprofile() -> Optional[Any]: ... def gettrace() -> Optional[Any]: ... def setcheckinterval(interval: int) -> None: ... # deprecated def setdlopenflags(n: int) -> None: ... def setdefaultencoding(encoding: Text) -> None: ... # only exists after reload(sys) def setprofile(profilefunc: Any) -> None: ... # TODO type def setrecursionlimit(limit: int) -> None: ... def settrace(tracefunc: Any) -> None: ... # TODO type jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/functools.pyi0000664000175000017500000000235613577124116023663 0ustar davedave00000000000000# Stubs for functools (Python 2.7) # NOTE: These are incomplete! from abc import ABCMeta, abstractmethod from typing import Any, Callable, Generic, Dict, Iterable, Optional, Sequence, Tuple, TypeVar, overload _AnyCallable = Callable[..., Any] _T = TypeVar("_T") _S = TypeVar("_S") @overload def reduce(function: Callable[[_T, _T], _T], sequence: Iterable[_T]) -> _T: ... @overload def reduce(function: Callable[[_T, _S], _T], sequence: Iterable[_S], initial: _T) -> _T: ... WRAPPER_ASSIGNMENTS: Sequence[str] WRAPPER_UPDATES: Sequence[str] def update_wrapper(wrapper: _AnyCallable, wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _AnyCallable: ... def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> Callable[[_AnyCallable], _AnyCallable]: ... def total_ordering(cls: type) -> type: ... def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], Any]: ... class partial(Generic[_T]): func = ... # Callable[..., _T] args: Tuple[Any, ...] keywords: Dict[str, Any] def __init__(self, func: Callable[..., _T], *args: Any, **kwargs: Any) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_ast.pyi0000664000175000017500000001322113577124116022566 0ustar davedave00000000000000import typing from typing import Optional __version__: str PyCF_ONLY_AST: int _identifier = str class AST: _attributes: typing.Tuple[str, ...] _fields: typing.Tuple[str, ...] def __init__(self, *args, **kwargs) -> None: ... class mod(AST): ... class Module(mod): body: typing.List[stmt] class Interactive(mod): body: typing.List[stmt] class Expression(mod): body: expr class Suite(mod): body: typing.List[stmt] class stmt(AST): lineno: int col_offset: int class FunctionDef(stmt): name: _identifier args: arguments body: typing.List[stmt] decorator_list: typing.List[expr] class ClassDef(stmt): name: _identifier bases: typing.List[expr] body: typing.List[stmt] decorator_list: typing.List[expr] class Return(stmt): value: Optional[expr] class Delete(stmt): targets: typing.List[expr] class Assign(stmt): targets: typing.List[expr] value: expr class AugAssign(stmt): target: expr op: operator value: expr class Print(stmt): dest: Optional[expr] values: typing.List[expr] nl: bool class For(stmt): target: expr iter: expr body: typing.List[stmt] orelse: typing.List[stmt] class While(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class If(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class With(stmt): context_expr: expr optional_vars: Optional[expr] body: typing.List[stmt] class Raise(stmt): type: Optional[expr] inst: Optional[expr] tback: Optional[expr] class TryExcept(stmt): body: typing.List[stmt] handlers: typing.List[ExceptHandler] orelse: typing.List[stmt] class TryFinally(stmt): body: typing.List[stmt] finalbody: typing.List[stmt] class Assert(stmt): test: expr msg: Optional[expr] class Import(stmt): names: typing.List[alias] class ImportFrom(stmt): module: Optional[_identifier] names: typing.List[alias] level: Optional[int] class Exec(stmt): body: expr globals: Optional[expr] locals: Optional[expr] class Global(stmt): names: typing.List[_identifier] class Expr(stmt): value: expr class Pass(stmt): ... class Break(stmt): ... class Continue(stmt): ... class slice(AST): ... _slice = slice # this lets us type the variable named 'slice' below class Slice(slice): lower: Optional[expr] upper: Optional[expr] step: Optional[expr] class ExtSlice(slice): dims: typing.List[slice] class Index(slice): value: expr class Ellipsis(slice): ... class expr(AST): lineno: int col_offset: int class BoolOp(expr): op: boolop values: typing.List[expr] class BinOp(expr): left: expr op: operator right: expr class UnaryOp(expr): op: unaryop operand: expr class Lambda(expr): args: arguments body: expr class IfExp(expr): test: expr body: expr orelse: expr class Dict(expr): keys: typing.List[expr] values: typing.List[expr] class Set(expr): elts: typing.List[expr] class ListComp(expr): elt: expr generators: typing.List[comprehension] class SetComp(expr): elt: expr generators: typing.List[comprehension] class DictComp(expr): key: expr value: expr generators: typing.List[comprehension] class GeneratorExp(expr): elt: expr generators: typing.List[comprehension] class Yield(expr): value: Optional[expr] class Compare(expr): left: expr ops: typing.List[cmpop] comparators: typing.List[expr] class Call(expr): func: expr args: typing.List[expr] keywords: typing.List[keyword] starargs: Optional[expr] kwargs: Optional[expr] class Repr(expr): value: expr class Num(expr): n: float class Str(expr): s: str class Attribute(expr): value: expr attr: _identifier ctx: expr_context class Subscript(expr): value: expr slice: _slice ctx: expr_context class Name(expr): id: _identifier ctx: expr_context class List(expr): elts: typing.List[expr] ctx: expr_context class Tuple(expr): elts: typing.List[expr] ctx: expr_context class expr_context(AST): ... class AugLoad(expr_context): ... class AugStore(expr_context): ... class Del(expr_context): ... class Load(expr_context): ... class Param(expr_context): ... class Store(expr_context): ... class boolop(AST): ... class And(boolop): ... class Or(boolop): ... class operator(AST): ... class Add(operator): ... class BitAnd(operator): ... class BitOr(operator): ... class BitXor(operator): ... class Div(operator): ... class FloorDiv(operator): ... class LShift(operator): ... class Mod(operator): ... class Mult(operator): ... class Pow(operator): ... class RShift(operator): ... class Sub(operator): ... class unaryop(AST): ... class Invert(unaryop): ... class Not(unaryop): ... class UAdd(unaryop): ... class USub(unaryop): ... class cmpop(AST): ... class Eq(cmpop): ... class Gt(cmpop): ... class GtE(cmpop): ... class In(cmpop): ... class Is(cmpop): ... class IsNot(cmpop): ... class Lt(cmpop): ... class LtE(cmpop): ... class NotEq(cmpop): ... class NotIn(cmpop): ... class comprehension(AST): target: expr iter: expr ifs: typing.List[expr] class excepthandler(AST): ... class ExceptHandler(excepthandler): type: Optional[expr] name: Optional[expr] body: typing.List[stmt] lineno: int col_offset: int class arguments(AST): args: typing.List[expr] vararg: Optional[_identifier] kwarg: Optional[_identifier] defaults: typing.List[expr] class keyword(AST): arg: _identifier value: expr class alias(AST): name: _identifier asname: Optional[_identifier] jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/BaseHTTPServer.pyi0000664000175000017500000000351013577124116024401 0ustar davedave00000000000000# Stubs for BaseHTTPServer (Python 2.7) from typing import Any, BinaryIO, Callable, Mapping, Optional, Tuple, Union import SocketServer import mimetools class HTTPServer(SocketServer.TCPServer): server_name: str server_port: int def __init__(self, server_address: Tuple[str, int], RequestHandlerClass: Callable[..., BaseHTTPRequestHandler]) -> None: ... class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler): client_address: Tuple[str, int] server: SocketServer.BaseServer close_connection: bool command: str path: str request_version: str headers: mimetools.Message rfile: BinaryIO wfile: BinaryIO server_version: str sys_version: str error_message_format: str error_content_type: str protocol_version: str MessageClass: type responses: Mapping[int, Tuple[str, str]] def __init__(self, request: bytes, client_address: Tuple[str, int], server: SocketServer.BaseServer) -> None: ... def handle(self) -> None: ... def handle_one_request(self) -> None: ... def send_error(self, code: int, message: Optional[str] = ...) -> None: ... def send_response(self, code: int, message: Optional[str] = ...) -> None: ... def send_header(self, keyword: str, value: str) -> None: ... def end_headers(self) -> None: ... def flush_headers(self) -> None: ... def log_request(self, code: Union[int, str] = ..., size: Union[int, str] = ...) -> None: ... def log_error(self, format: str, *args: Any) -> None: ... def log_message(self, format: str, *args: Any) -> None: ... def version_string(self) -> str: ... def date_time_string(self, timestamp: Optional[int] = ...) -> str: ... def log_date_time_string(self) -> str: ... def address_string(self) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/json.pyi0000664000175000017500000000730113577124116022613 0ustar davedave00000000000000from typing import Any, IO, Optional, Tuple, Callable, Dict, List, Union, Text, Protocol, Type class JSONDecodeError(ValueError): def dumps(self, obj: Any) -> str: ... def dump(self, obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... def loads(self, s: str) -> Any: ... def load(self, fp: IO[str]) -> Any: ... def dumps(obj: Any, skipkeys: bool = ..., ensure_ascii: bool = ..., check_circular: bool = ..., allow_nan: bool = ..., cls: Optional[Type[JSONEncoder]] = ..., indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ..., encoding: str = ..., default: Optional[Callable[[Any], Any]] = ..., sort_keys: bool = ..., **kwds: Any) -> str: ... def dump(obj: Any, fp: Union[IO[str], IO[Text]], skipkeys: bool = ..., ensure_ascii: bool = ..., check_circular: bool = ..., allow_nan: bool = ..., cls: Optional[Type[JSONEncoder]] = ..., indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ..., encoding: str = ..., default: Optional[Callable[[Any], Any]] = ..., sort_keys: bool = ..., **kwds: Any) -> None: ... def loads(s: Union[Text, bytes], encoding: Any = ..., cls: Optional[Type[JSONDecoder]] = ..., object_hook: Optional[Callable[[Dict[Any, Any]], Any]] = ..., parse_float: Optional[Callable[[str], Any]] = ..., parse_int: Optional[Callable[[str], Any]] = ..., parse_constant: Optional[Callable[[str], Any]] = ..., object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ..., **kwds: Any) -> Any: ... class _Reader(Protocol): def read(self) -> Union[Text, bytes]: ... def load(fp: _Reader, encoding: Optional[str] = ..., cls: Optional[Type[JSONDecoder]] = ..., object_hook: Optional[Callable[[Dict[Any, Any]], Any]] = ..., parse_float: Optional[Callable[[str], Any]] = ..., parse_int: Optional[Callable[[str], Any]] = ..., parse_constant: Optional[Callable[[str], Any]] = ..., object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ..., **kwds: Any) -> Any: ... class JSONDecoder(object): def __init__(self, encoding: Union[Text, bytes] = ..., object_hook: Callable[..., Any] = ..., parse_float: Callable[[str], float] = ..., parse_int: Callable[[str], int] = ..., parse_constant: Callable[[str], Any] = ..., strict: bool = ..., object_pairs_hook: Callable[..., Any] = ...) -> None: ... def decode(self, s: Union[Text, bytes], _w: Any = ...) -> Any: ... def raw_decode(self, s: Union[Text, bytes], idx: int = ...) -> Tuple[Any, Any]: ... class JSONEncoder(object): item_separator: str key_separator: str skipkeys: bool ensure_ascii: bool check_circular: bool allow_nan: bool sort_keys: bool indent: Optional[int] def __init__(self, skipkeys: bool = ..., ensure_ascii: bool = ..., check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ..., indent: Optional[int] = ..., separators: Tuple[Union[Text, bytes], Union[Text, bytes]] = ..., encoding: Union[Text, bytes] = ..., default: Callable[..., Any] = ...) -> None: ... def default(self, o: Any) -> Any: ... def encode(self, o: Any) -> str: ... def iterencode(self, o: Any, _one_shot: bool = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/fnmatch.pyi0000664000175000017500000000053413577124116023263 0ustar davedave00000000000000from typing import AnyStr, Iterable, List, Union _EitherStr = Union[str, unicode] def fnmatch(filename: _EitherStr, pattern: _EitherStr) -> bool: ... def fnmatchcase(filename: _EitherStr, pattern: _EitherStr) -> bool: ... def filter(names: Iterable[AnyStr], pattern: _EitherStr) -> List[AnyStr]: ... def translate(pattern: AnyStr) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/md5.pyi0000664000175000017500000000016613577124116022331 0ustar davedave00000000000000# Stubs for Python 2.7 md5 stdlib module from hashlib import md5 as md5, md5 as new blocksize: int digest_size: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/ast.pyi0000664000175000017500000000226113577124116022431 0ustar davedave00000000000000# Python 2.7 ast # Rename typing to _typing, as not to conflict with typing imported # from _ast below when loaded in an unorthodox way by the Dropbox # internal Bazel integration. import typing as _typing from typing import Any, Iterator, Optional, Union from _ast import * from _ast import AST, Module def parse(source: Union[str, unicode], filename: Union[str, unicode] = ..., mode: Union[str, unicode] = ...) -> Module: ... def copy_location(new_node: AST, old_node: AST) -> AST: ... def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... def fix_missing_locations(node: AST) -> AST: ... def get_docstring(node: AST, clean: bool = ...) -> str: ... def increment_lineno(node: AST, n: int = ...) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[_typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, unicode, AST]) -> Any: ... def walk(node: AST) -> Iterator[AST]: ... class NodeVisitor(): def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> Any: ... class NodeTransformer(NodeVisitor): def generic_visit(self, node: AST) -> Optional[AST]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/_functools.pyi0000664000175000017500000000120513577124116024012 0ustar davedave00000000000000"""Stub file for the '_functools' module.""" from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Tuple, overload _T = TypeVar("_T") _S = TypeVar("_S") @overload def reduce(function: Callable[[_T, _T], _T], sequence: Iterable[_T]) -> _T: ... @overload def reduce(function: Callable[[_T, _S], _T], sequence: Iterable[_S], initial: _T) -> _T: ... class partial(object): func: Callable[..., Any] args: Tuple[Any, ...] keywords: Dict[str, Any] def __init__(self, func: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/0000775000175000017500000000000013577125145024350 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/__init__.pyi0000664000175000017500000000361313577124116026632 0ustar davedave00000000000000from typing import Any, Callable, Optional, TypeVar, Iterable from multiprocessing import pool from multiprocessing.process import Process as Process, current_process as current_process, active_children as active_children from multiprocessing.util import SUBDEBUG as SUBDEBUG, SUBWARNING as SUBWARNING from Queue import Queue as _BaseQueue class ProcessError(Exception): ... class BufferTooShort(ProcessError): ... class TimeoutError(ProcessError): ... class AuthenticationError(ProcessError): ... _T = TypeVar('_T') class Queue(_BaseQueue[_T]): def __init__(self, maxsize: int = ...) -> None: ... def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ... def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ... def qsize(self) -> int: ... def empty(self) -> bool: ... def full(self) -> bool: ... def put_nowait(self, item: _T) -> None: ... def get_nowait(self) -> _T: ... def close(self) -> None: ... def join_thread(self) -> None: ... def cancel_join_thread(self) -> None: ... def Manager(): ... def Pipe(duplex: bool = ...): ... def cpu_count() -> int: ... def freeze_support(): ... def get_logger(): ... def log_to_stderr(level: Optional[Any] = ...): ... def allow_connection_pickling(): ... def Lock(): ... def RLock(): ... def Condition(lock: Optional[Any] = ...): ... def Semaphore(value: int = ...): ... def BoundedSemaphore(value: int = ...): ... def Event(): ... def JoinableQueue(maxsize: int = ...): ... def RawValue(typecode_or_type, *args): ... def RawArray(typecode_or_type, size_or_initializer): ... def Value(typecode_or_type, *args, **kwds): ... def Array(typecode_or_type, size_or_initializer, **kwds): ... def Pool(processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ..., maxtasksperchild: Optional[int] = ...) -> pool.Pool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/dummy/0000775000175000017500000000000013577125145025503 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/dummy/__init__.pyi0000664000175000017500000000261113577124116027762 0ustar davedave00000000000000from typing import Any, Optional, List, Type import threading import sys import weakref import array import itertools from multiprocessing import TimeoutError, cpu_count from multiprocessing.dummy.connection import Pipe from threading import Lock, RLock, Semaphore, BoundedSemaphore from threading import Event from Queue import Queue class DummyProcess(threading.Thread): _children: weakref.WeakKeyDictionary[Any, Any] _parent: threading.Thread _pid: None _start_called: bool def __init__(self, group=..., target=..., name=..., args=..., kwargs=...) -> None: ... @property def exitcode(self) -> Optional[int]: ... Process = DummyProcess # This should be threading._Condition but threading.pyi exports it as Condition class Condition(threading.Condition): notify_all: Any class Namespace(object): def __init__(self, **kwds) -> None: ... class Value(object): _typecode: Any _value: Any value: Any def __init__(self, typecode, value, lock=...) -> None: ... def _get(self) -> Any: ... def _set(self, value) -> None: ... JoinableQueue = Queue def Array(typecode, sequence, lock=...) -> array.array[Any]: ... def Manager() -> Any: ... def Pool(processes=..., initializer=..., initargs=...) -> Any: ... def active_children() -> List[Any]: ... def current_process() -> threading.Thread: ... def freeze_support() -> None: ... def shutdown() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/dummy/connection.pyi0000664000175000017500000000124213577124116030361 0ustar davedave00000000000000from Queue import Queue from typing import Any, List, Optional, Tuple, Type families: List[None] class Connection(object): _in: Any _out: Any recv: Any recv_bytes: Any send: Any send_bytes: Any def __init__(self, _in, _out) -> None: ... def close(self) -> None: ... def poll(self, timeout=...) -> Any: ... class Listener(object): _backlog_queue: Optional[Queue[Any]] address: Any def __init__(self, address=..., family=..., backlog=...) -> None: ... def accept(self) -> Connection: ... def close(self) -> None: ... def Client(address) -> Connection: ... def Pipe(duplex=...) -> Tuple[Connection, Connection]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/util.pyi0000664000175000017500000000136613577124116026053 0ustar davedave00000000000000from typing import Any, Optional import threading SUBDEBUG: Any SUBWARNING: Any def sub_debug(msg, *args): ... def debug(msg, *args): ... def info(msg, *args): ... def sub_warning(msg, *args): ... def get_logger(): ... def log_to_stderr(level: Optional[Any] = ...): ... def get_temp_dir(): ... def register_after_fork(obj, func): ... class Finalize: def __init__(self, obj, callback, args=..., kwargs: Optional[Any] = ..., exitpriority: Optional[Any] = ...): ... def __call__(self, wr: Optional[Any] = ...): ... def cancel(self): ... def still_active(self): ... def is_exiting(): ... class ForkAwareThreadLock: def __init__(self): ... class ForkAwareLocal(threading.local): def __init__(self): ... def __reduce__(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/pool.pyi0000664000175000017500000000452313577124116026045 0ustar davedave00000000000000from typing import ( Any, Callable, ContextManager, Iterable, Optional, Dict, List, TypeVar, Iterator, ) _T = TypeVar('_T', bound=Pool) class AsyncResult(): def get(self, timeout: Optional[float] = ...) -> Any: ... def wait(self, timeout: Optional[float] = ...) -> None: ... def ready(self) -> bool: ... def successful(self) -> bool: ... class IMapIterator(Iterator[Any]): def __iter__(self) -> Iterator[Any]: ... def next(self, timeout: Optional[float] = ...) -> Any: ... class IMapUnorderedIterator(IMapIterator): ... class Pool(ContextManager[Pool]): def __init__(self, processes: Optional[int] = ..., initializer: Optional[Callable[..., None]] = ..., initargs: Iterable[Any] = ..., maxtasksperchild: Optional[int] = ...) -> None: ... def apply(self, func: Callable[..., Any], args: Iterable[Any] = ..., kwds: Dict[str, Any] = ...) -> Any: ... def apply_async(self, func: Callable[..., Any], args: Iterable[Any] = ..., kwds: Dict[str, Any] = ..., callback: Optional[Callable[..., None]] = ...) -> AsyncResult: ... def map(self, func: Callable[..., Any], iterable: Iterable[Any] = ..., chunksize: Optional[int] = ...) -> List[Any]: ... def map_async(self, func: Callable[..., Any], iterable: Iterable[Any] = ..., chunksize: Optional[int] = ..., callback: Optional[Callable[..., None]] = ...) -> AsyncResult: ... def imap(self, func: Callable[..., Any], iterable: Iterable[Any] = ..., chunksize: Optional[int] = ...) -> IMapIterator: ... def imap_unordered(self, func: Callable[..., Any], iterable: Iterable[Any] = ..., chunksize: Optional[int] = ...) -> IMapIterator: ... def close(self) -> None: ... def terminate(self) -> None: ... def join(self) -> None: ... def __enter__(self: _T) -> _T: ... class ThreadPool(Pool, ContextManager[ThreadPool]): def __init__(self, processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/multiprocessing/process.pyi0000664000175000017500000000161513577124116026551 0ustar davedave00000000000000from typing import Any, Optional def current_process(): ... def active_children(): ... class Process: def __init__(self, group: Optional[Any] = ..., target: Optional[Any] = ..., name: Optional[Any] = ..., args=..., kwargs=...): ... def run(self): ... def start(self): ... def terminate(self): ... def join(self, timeout: Optional[Any] = ...): ... def is_alive(self): ... @property def name(self): ... @name.setter def name(self, name): ... @property def daemon(self): ... @daemon.setter def daemon(self, daemonic): ... @property def authkey(self): ... @authkey.setter def authkey(self, authkey): ... @property def exitcode(self): ... @property def ident(self): ... pid: Any class AuthenticationString(bytes): def __reduce__(self): ... class _MainProcess(Process): def __init__(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/gettext.pyi0000664000175000017500000000435413577124116023333 0ustar davedave00000000000000from typing import Any, Container, Dict, IO, List, Optional, Sequence, Type, Union def bindtextdomain(domain: str, localedir: str = ...) -> str: ... def bind_textdomain_codeset(domain: str, codeset: str = ...) -> str: ... def textdomain(domain: str = ...) -> str: ... def gettext(message: str) -> str: ... def lgettext(message: str) -> str: ... def dgettext(domain: str, message: str) -> str: ... def ldgettext(domain: str, message: str) -> str: ... def ngettext(singular: str, plural: str, n: int) -> str: ... def lngettext(singular: str, plural: str, n: int) -> str: ... def dngettext(domain: str, singular: str, plural: str, n: int) -> str: ... def ldngettext(domain: str, singular: str, plural: str, n: int) -> str: ... class NullTranslations(object): def __init__(self, fp: IO[str] = ...) -> None: ... def _parse(self, fp: IO[str]) -> None: ... def add_fallback(self, fallback: NullTranslations) -> None: ... def gettext(self, message: str) -> str: ... def lgettext(self, message: str) -> str: ... def ugettext(self, message: Union[str, unicode]) -> unicode: ... def ngettext(self, singular: str, plural: str, n: int) -> str: ... def lngettext(self, singular: str, plural: str, n: int) -> str: ... def ungettext(self, singular: Union[str, unicode], plural: Union[str, unicode], n: int) -> unicode: ... def info(self) -> Dict[str, str]: ... def charset(self) -> Optional[str]: ... def output_charset(self) -> Optional[str]: ... def set_output_charset(self, charset: Optional[str]) -> None: ... def install(self, unicode: bool = ..., names: Container[str] = ...) -> None: ... class GNUTranslations(NullTranslations): LE_MAGIC: int BE_MAGIC: int def find(domain: str, localedir: Optional[str] = ..., languages: Optional[Sequence[str]] = ..., all: Any = ...) -> Optional[Union[str, List[str]]]: ... def translation(domain: str, localedir: Optional[str] = ..., languages: Optional[Sequence[str]] = ..., class_: Optional[Type[NullTranslations]] = ..., fallback: bool = ..., codeset: Optional[str] = ...) -> NullTranslations: ... def install(domain: str, localedir: Optional[str] = ..., unicode: bool = ..., codeset: Optional[str] = ..., names: Container[str] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/sre_constants.pyi0000664000175000017500000000342613577124116024533 0ustar davedave00000000000000# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_constants.py from typing import Dict, List, TypeVar MAGIC: int MAXREPEAT: int class error(Exception): ... FAILURE: str SUCCESS: str ANY: str ANY_ALL: str ASSERT: str ASSERT_NOT: str AT: str BIGCHARSET: str BRANCH: str CALL: str CATEGORY: str CHARSET: str GROUPREF: str GROUPREF_IGNORE: str GROUPREF_EXISTS: str IN: str IN_IGNORE: str INFO: str JUMP: str LITERAL: str LITERAL_IGNORE: str MARK: str MAX_REPEAT: str MAX_UNTIL: str MIN_REPEAT: str MIN_UNTIL: str NEGATE: str NOT_LITERAL: str NOT_LITERAL_IGNORE: str RANGE: str REPEAT: str REPEAT_ONE: str SUBPATTERN: str MIN_REPEAT_ONE: str AT_BEGINNING: str AT_BEGINNING_LINE: str AT_BEGINNING_STRING: str AT_BOUNDARY: str AT_NON_BOUNDARY: str AT_END: str AT_END_LINE: str AT_END_STRING: str AT_LOC_BOUNDARY: str AT_LOC_NON_BOUNDARY: str AT_UNI_BOUNDARY: str AT_UNI_NON_BOUNDARY: str CATEGORY_DIGIT: str CATEGORY_NOT_DIGIT: str CATEGORY_SPACE: str CATEGORY_NOT_SPACE: str CATEGORY_WORD: str CATEGORY_NOT_WORD: str CATEGORY_LINEBREAK: str CATEGORY_NOT_LINEBREAK: str CATEGORY_LOC_WORD: str CATEGORY_LOC_NOT_WORD: str CATEGORY_UNI_DIGIT: str CATEGORY_UNI_NOT_DIGIT: str CATEGORY_UNI_SPACE: str CATEGORY_UNI_NOT_SPACE: str CATEGORY_UNI_WORD: str CATEGORY_UNI_NOT_WORD: str CATEGORY_UNI_LINEBREAK: str CATEGORY_UNI_NOT_LINEBREAK: str _T = TypeVar('_T') def makedict(list: List[_T]) -> Dict[_T, int]: ... OP_IGNORE: Dict[str, str] AT_MULTILINE: Dict[str, str] AT_LOCALE: Dict[str, str] AT_UNICODE: Dict[str, str] CH_LOCALE: Dict[str, str] CH_UNICODE: Dict[str, str] SRE_FLAG_TEMPLATE: int SRE_FLAG_IGNORECASE: int SRE_FLAG_LOCALE: int SRE_FLAG_MULTILINE: int SRE_FLAG_DOTALL: int SRE_FLAG_UNICODE: int SRE_FLAG_VERBOSE: int SRE_FLAG_DEBUG: int SRE_INFO_PREFIX: int SRE_INFO_LITERAL: int SRE_INFO_CHARSET: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/types.pyi0000664000175000017500000001230413577124116023005 0ustar davedave00000000000000# Stubs for types # Note, all classes "defined" here require special handling. from typing import ( Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Type, TypeVar, Union, overload, ) _T = TypeVar('_T') class NoneType: ... TypeType = type ObjectType = object IntType = int LongType = int # Really long, but can't reference that due to a mypy import cycle FloatType = float BooleanType = bool ComplexType = complex StringType = str UnicodeType = unicode StringTypes: Tuple[Type[StringType], Type[UnicodeType]] BufferType = buffer TupleType = tuple ListType = list DictType = dict DictionaryType = dict class _Cell: cell_contents: Any class FunctionType: func_closure: Optional[Tuple[_Cell, ...]] = ... func_code: CodeType = ... func_defaults: Optional[Tuple[Any, ...]] = ... func_dict: Dict[str, Any] = ... func_doc: Optional[str] = ... func_globals: Dict[str, Any] = ... func_name: str = ... __closure__ = func_closure __code__ = func_code __defaults__ = func_defaults __dict__ = func_dict __globals__ = func_globals __name__ = func_name def __init__(self, code: CodeType, globals: Dict[str, Any], name: Optional[str] = ..., argdefs: Optional[Tuple[object, ...]] = ..., closure: Optional[Tuple[_Cell, ...]] = ...) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Optional[object], type: Optional[type]) -> UnboundMethodType: ... LambdaType = FunctionType class CodeType: co_argcount: int co_cellvars: Tuple[str, ...] co_code: str co_consts: Tuple[Any, ...] co_filename: str co_firstlineno: int co_flags: int co_freevars: Tuple[str, ...] co_lnotab: str co_name: str co_names: Tuple[str, ...] co_nlocals: int co_stacksize: int co_varnames: Tuple[str, ...] def __init__( self, argcount: int, nlocals: int, stacksize: int, flags: int, codestring: str, constants: Tuple[Any, ...], names: Tuple[str, ...], varnames: Tuple[str, ...], filename: str, name: str, firstlineno: int, lnotab: str, freevars: Tuple[str, ...] = ..., cellvars: Tuple[str, ...] = ..., ) -> None: ... class GeneratorType: gi_code: CodeType gi_frame: FrameType gi_running: int def __iter__(self) -> GeneratorType: ... def close(self) -> None: ... def next(self) -> Any: ... def send(self, arg: Any) -> Any: ... @overload def throw(self, val: BaseException) -> Any: ... @overload def throw(self, typ: type, val: BaseException = ..., tb: TracebackType = ...) -> Any: ... class ClassType: ... class UnboundMethodType: im_class: type = ... im_func: FunctionType = ... im_self: object = ... __name__: str __func__ = im_func __self__ = im_self def __init__(self, func: Callable[..., Any], obj: object) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class InstanceType(object): ... MethodType = UnboundMethodType class BuiltinFunctionType: __self__: Optional[object] def __call__(self, *args: Any, **kwargs: Any) -> Any: ... BuiltinMethodType = BuiltinFunctionType class ModuleType: __doc__: Optional[str] __file__: Optional[str] __name__: str __package__: Optional[str] __path__: Optional[Iterable[str]] __dict__: Dict[str, Any] def __init__(self, name: str, doc: Optional[str] = ...) -> None: ... FileType = file XRangeType = xrange class TracebackType: tb_frame: FrameType tb_lasti: int tb_lineno: int tb_next: TracebackType class FrameType: f_back: FrameType f_builtins: Dict[str, Any] f_code: CodeType f_exc_type: None f_exc_value: None f_exc_traceback: None f_globals: Dict[str, Any] f_lasti: int f_lineno: int f_locals: Dict[str, Any] f_restricted: bool f_trace: Callable[[], None] def clear(self) -> None: ... SliceType = slice class EllipsisType: ... class DictProxyType: # TODO is it possible to have non-string keys? # no __init__ def copy(self) -> Dict[Any, Any]: ... def get(self, key: str, default: _T = ...) -> Union[Any, _T]: ... def has_key(self, key: str) -> bool: ... def items(self) -> List[Tuple[str, Any]]: ... def iteritems(self) -> Iterator[Tuple[str, Any]]: ... def iterkeys(self) -> Iterator[str]: ... def itervalues(self) -> Iterator[Any]: ... def keys(self) -> List[str]: ... def values(self) -> List[Any]: ... def __contains__(self, key: str) -> bool: ... def __getitem__(self, key: str) -> Any: ... def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... class NotImplementedType: ... class GetSetDescriptorType: __name__: str __objclass__: type def __get__(self, obj: Any, type: type = ...) -> Any: ... def __set__(self, obj: Any) -> None: ... def __delete__(self, obj: Any) -> None: ... # Same type on Jython, different on CPython and PyPy, unknown on IronPython. class MemberDescriptorType: __name__: str __objclass__: type def __get__(self, obj: Any, type: type = ...) -> Any: ... def __set__(self, obj: Any) -> None: ... def __delete__(self, obj: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/platform.pyi0000664000175000017500000000311113577124116023461 0ustar davedave00000000000000# Stubs for platform (Python 2) # # Based on stub generated by stubgen. from typing import Any, Optional, Tuple __copyright__: Any DEV_NULL: Any def libc_ver(executable=..., lib=..., version=..., chunksize: int = ...): ... def linux_distribution(distname=..., version=..., id=..., supported_dists=..., full_distribution_name: int = ...): ... def dist(distname=..., version=..., id=..., supported_dists=...): ... class _popen: tmpfile: Any pipe: Any bufsize: Any mode: Any def __init__(self, cmd, mode=..., bufsize: Optional[Any] = ...): ... def read(self): ... def readlines(self): ... def close(self, remove=..., error=...): ... __del__: Any def popen(cmd, mode=..., bufsize: Optional[Any] = ...): ... def win32_ver(release=..., version=..., csd=..., ptype=...): ... def mac_ver(release=..., versioninfo=..., machine=...): ... def java_ver(release=..., vendor=..., vminfo=..., osinfo=...): ... def system_alias(system, release, version): ... def architecture(executable=..., bits=..., linkage=...) -> Tuple[str, str]: ... def uname() -> Tuple[str, str, str, str, str, str]: ... def system() -> str: ... def node() -> str: ... def release() -> str: ... def version() -> str: ... def machine() -> str: ... def processor() -> str: ... def python_implementation() -> str: ... def python_version() -> str: ... def python_version_tuple() -> Tuple[str, str, str]: ... def python_branch() -> str: ... def python_revision() -> str: ... def python_build() -> Tuple[str, str]: ... def python_compiler() -> str: ... def platform(aliased: int = ..., terse: int = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/2/fcntl.pyi0000664000175000017500000000303113577124116022744 0ustar davedave00000000000000from typing import Any, Union, IO import io FASYNC: int FD_CLOEXEC: int DN_ACCESS: int DN_ATTRIB: int DN_CREATE: int DN_DELETE: int DN_MODIFY: int DN_MULTISHOT: int DN_RENAME: int F_DUPFD: int F_EXLCK: int F_GETFD: int F_GETFL: int F_GETLEASE: int F_GETLK: int F_GETLK64: int F_GETOWN: int F_GETSIG: int F_NOTIFY: int F_RDLCK: int F_SETFD: int F_SETFL: int F_SETLEASE: int F_SETLK: int F_SETLK64: int F_SETLKW: int F_SETLKW64: int F_SETOWN: int F_SETSIG: int F_SHLCK: int F_UNLCK: int F_WRLCK: int I_ATMARK: int I_CANPUT: int I_CKBAND: int I_FDINSERT: int I_FIND: int I_FLUSH: int I_FLUSHBAND: int I_GETBAND: int I_GETCLTIME: int I_GETSIG: int I_GRDOPT: int I_GWROPT: int I_LINK: int I_LIST: int I_LOOK: int I_NREAD: int I_PEEK: int I_PLINK: int I_POP: int I_PUNLINK: int I_PUSH: int I_RECVFD: int I_SENDFD: int I_SETCLTIME: int I_SETSIG: int I_SRDOPT: int I_STR: int I_SWROPT: int I_UNLINK: int LOCK_EX: int LOCK_MAND: int LOCK_NB: int LOCK_READ: int LOCK_RW: int LOCK_SH: int LOCK_UN: int LOCK_WRITE: int _ANYFILE = Union[int, IO] # TODO All these return either int or bytes depending on the value of # cmd (not on the type of arg). def fcntl(fd: _ANYFILE, op: int, arg: Union[int, bytes] = ...) -> Any: ... # TODO: arg: int or read-only buffer interface or read-write buffer interface def ioctl(fd: _ANYFILE, op: int, arg: Union[int, bytes] = ..., mutate_flag: bool = ...) -> Any: ... def flock(fd: _ANYFILE, op: int) -> None: ... def lockf(fd: _ANYFILE, op: int, length: int = ..., start: int = ..., whence: int = ...) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3.6/0000775000175000017500000000000013577125145021266 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3.6/secrets.pyi0000664000175000017500000000076513577124116023466 0ustar davedave00000000000000# Stubs for secrets (Python 3.6) from typing import Optional, Sequence, TypeVar from hmac import compare_digest as compare_digest from random import SystemRandom as SystemRandom _T = TypeVar('_T') def randbelow(exclusive_upper_bound: int) -> int: ... def randbits(k: int) -> int: ... def choice(seq: Sequence[_T]) -> _T: ... def token_bytes(nbytes: Optional[int] = ...) -> bytes: ... def token_hex(nbytes: Optional[int] = ...) -> str: ... def token_urlsafe(nbytes: Optional[int] = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/0000775000175000017500000000000013577125145021122 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/0000775000175000017500000000000013577125145022567 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/__init__.pyi0000664000175000017500000001007513577124116025051 0ustar davedave00000000000000import sys from typing import Type from asyncio.coroutines import ( coroutine as coroutine, iscoroutinefunction as iscoroutinefunction, iscoroutine as iscoroutine, ) from asyncio.protocols import ( BaseProtocol as BaseProtocol, Protocol as Protocol, DatagramProtocol as DatagramProtocol, SubprocessProtocol as SubprocessProtocol, ) from asyncio.streams import ( StreamReader as StreamReader, StreamWriter as StreamWriter, StreamReaderProtocol as StreamReaderProtocol, open_connection as open_connection, start_server as start_server, ) from asyncio.subprocess import ( create_subprocess_exec as create_subprocess_exec, create_subprocess_shell as create_subprocess_shell, ) from asyncio.transports import ( BaseTransport as BaseTransport, ReadTransport as ReadTransport, WriteTransport as WriteTransport, Transport as Transport, DatagramTransport as DatagramTransport, SubprocessTransport as SubprocessTransport, ) from asyncio.futures import ( Future as Future, wrap_future as wrap_future, ) from asyncio.tasks import ( FIRST_COMPLETED as FIRST_COMPLETED, FIRST_EXCEPTION as FIRST_EXCEPTION, ALL_COMPLETED as ALL_COMPLETED, as_completed as as_completed, ensure_future as ensure_future, gather as gather, run_coroutine_threadsafe as run_coroutine_threadsafe, shield as shield, sleep as sleep, wait as wait, wait_for as wait_for, Task as Task, ) from asyncio.base_events import ( BaseEventLoop as BaseEventLoop, Server as Server ) from asyncio.events import ( AbstractEventLoopPolicy as AbstractEventLoopPolicy, AbstractEventLoop as AbstractEventLoop, AbstractServer as AbstractServer, Handle as Handle, TimerHandle as TimerHandle, get_event_loop_policy as get_event_loop_policy, set_event_loop_policy as set_event_loop_policy, get_event_loop as get_event_loop, set_event_loop as set_event_loop, new_event_loop as new_event_loop, get_child_watcher as get_child_watcher, set_child_watcher as set_child_watcher, ) from asyncio.queues import ( Queue as Queue, PriorityQueue as PriorityQueue, LifoQueue as LifoQueue, QueueFull as QueueFull, QueueEmpty as QueueEmpty, ) from asyncio.locks import ( Lock as Lock, Event as Event, Condition as Condition, Semaphore as Semaphore, BoundedSemaphore as BoundedSemaphore, ) from asyncio.futures import isfuture as isfuture from asyncio.events import ( _set_running_loop as _set_running_loop, _get_running_loop as _get_running_loop, ) if sys.platform == 'win32': from asyncio.windows_events import * else: from asyncio.streams import ( open_unix_connection as open_unix_connection, start_unix_server as start_unix_server, ) DefaultEventLoopPolicy: Type[AbstractEventLoopPolicy] if sys.version_info >= (3, 7): from asyncio.events import ( get_running_loop as get_running_loop, ) from asyncio.tasks import ( all_tasks as all_tasks, create_task as create_task, current_task as current_task, ) from asyncio.runners import ( run as run, ) if sys.platform != 'win32': # This is already imported above on Windows. SelectorEventLoop: Type[AbstractEventLoop] # TODO: AbstractChildWatcher (UNIX only) if sys.version_info >= (3, 8): from asyncio.exceptions import ( CancelledError as CancelledError, IncompleteReadError as IncompleteReadError, InvalidStateError as InvalidStateError, LimitOverrunError as LimitOverrunError, SendfileNotAvailableError as SendfileNotAvailableError, TimeoutError as TimeoutError, ) else: from asyncio.events import ( SendfileNotAvailableError as SendfileNotAvailableError ) from asyncio.futures import ( CancelledError as CancelledError, TimeoutError as TimeoutError, InvalidStateError as InvalidStateError, ) from asyncio.streams import ( IncompleteReadError as IncompleteReadError, LimitOverrunError as LimitOverrunError, ) jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/transports.pyi0000664000175000017500000000352013577124116025526 0ustar davedave00000000000000import sys from typing import Any, Mapping, List, Optional, Tuple from asyncio.protocols import BaseProtocol from asyncio.events import AbstractEventLoop class BaseTransport: def __init__(self, extra: Mapping[Any, Any] = ...) -> None: ... def get_extra_info(self, name: Any, default: Any = ...) -> Any: ... def is_closing(self) -> bool: ... def close(self) -> None: ... if sys.version_info >= (3, 5): def set_protocol(self, protocol: BaseProtocol) -> None: ... def get_protocol(self) -> BaseProtocol: ... class ReadTransport(BaseTransport): if sys.version_info >= (3, 7): def is_reading(self) -> bool: ... def pause_reading(self) -> None: ... def resume_reading(self) -> None: ... class WriteTransport(BaseTransport): def set_write_buffer_limits( self, high: int = ..., low: int = ... ) -> None: ... def get_write_buffer_size(self) -> int: ... def write(self, data: Any) -> None: ... def writelines(self, list_of_data: List[Any]) -> None: ... def write_eof(self) -> None: ... def can_write_eof(self) -> bool: ... def abort(self) -> None: ... class Transport(ReadTransport, WriteTransport): ... class DatagramTransport(BaseTransport): def sendto(self, data: Any, addr: Optional[Tuple[str, int]] = ...) -> None: ... def abort(self) -> None: ... class SubprocessTransport(BaseTransport): def get_pid(self) -> int: ... def get_returncode(self) -> int: ... def get_pipe_transport(self, fd: int) -> BaseTransport: ... def send_signal(self, signal: int) -> int: ... def terminate(self) -> None: ... def kill(self) -> None: ... class _FlowControlMixin(Transport): def __init__(self, extra: Optional[Mapping[Any, Any]] = ..., loop: Optional[AbstractEventLoop] = ...) -> None: ... def get_write_buffer_limits(self) -> Tuple[int, int]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/selector_events.pyi0000664000175000017500000000333713577124116026521 0ustar davedave00000000000000import selectors import sys from socket import socket from typing import Optional, Union from . import base_events, events if sys.version_info >= (3, 7): from os import PathLike _Path = Union[str, PathLike[str]] else: _Path = str class BaseSelectorEventLoop(base_events.BaseEventLoop): def __init__(self, selector: selectors.BaseSelector = ...) -> None: ... if sys.version_info >= (3, 7): async def create_unix_connection( self, protocol_factory: events._ProtocolFactory, path: _Path, *, ssl: events._SSLContext = ..., sock: Optional[socket] = ..., server_hostname: str = ..., ssl_handshake_timeout: Optional[float] = ..., ) -> events._TransProtPair: ... async def create_unix_server( self, protocol_factory: events._ProtocolFactory, path: _Path, *, sock: Optional[socket] = ..., backlog: int = ..., ssl: events._SSLContext = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ..., ) -> events.AbstractServer: ... else: async def create_unix_connection(self, protocol_factory: events._ProtocolFactory, path: str, *, ssl: events._SSLContext = ..., sock: Optional[socket] = ..., server_hostname: str = ...) -> events._TransProtPair: ... async def create_unix_server(self, protocol_factory: events._ProtocolFactory, path: str, *, sock: Optional[socket] = ..., backlog: int = ..., ssl: events._SSLContext = ...) -> events.AbstractServer: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/queues.pyi0000664000175000017500000000207213577124116024617 0ustar davedave00000000000000from asyncio.events import AbstractEventLoop from typing import Generic, TypeVar, Optional class QueueEmpty(Exception): ... class QueueFull(Exception): ... _T = TypeVar('_T') class Queue(Generic[_T]): def __init__(self, maxsize: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ... def _init(self, maxsize: int) -> None: ... def _get(self) -> _T: ... def _put(self, item: _T) -> None: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def _format(self) -> str: ... def _consume_done_getters(self) -> None: ... def _consume_done_putters(self) -> None: ... def qsize(self) -> int: ... @property def maxsize(self) -> int: ... def empty(self) -> bool: ... def full(self) -> bool: ... async def put(self, item: _T) -> None: ... def put_nowait(self, item: _T) -> None: ... async def get(self) -> _T: ... def get_nowait(self) -> _T: ... async def join(self) -> bool: ... def task_done(self) -> None: ... class PriorityQueue(Queue[_T]): ... class LifoQueue(Queue[_T]): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/subprocess.pyi0000664000175000017500000000422613577124116025503 0ustar davedave00000000000000from asyncio import events from asyncio import protocols from asyncio import streams from asyncio import transports from typing import Any, Optional, Text, Tuple, Union, IO PIPE: int STDOUT: int DEVNULL: int class SubprocessStreamProtocol(streams.FlowControlMixin, protocols.SubprocessProtocol): stdin: Optional[streams.StreamWriter] stdout: Optional[streams.StreamReader] stderr: Optional[streams.StreamReader] def __init__(self, limit: int, loop: events.AbstractEventLoop) -> None: ... def connection_made(self, transport: transports.BaseTransport) -> None: ... def pipe_data_received(self, fd: int, data: Union[bytes, Text]) -> None: ... def pipe_connection_lost(self, fd: int, exc: Optional[Exception]) -> None: ... def process_exited(self) -> None: ... class Process: stdin: Optional[streams.StreamWriter] stdout: Optional[streams.StreamReader] stderr: Optional[streams.StreamReader] pid: int def __init__(self, transport: transports.BaseTransport, protocol: protocols.BaseProtocol, loop: events.AbstractEventLoop) -> None: ... @property def returncode(self) -> int: ... async def wait(self) -> int: ... def send_signal(self, signal: int) -> None: ... def terminate(self) -> None: ... def kill(self) -> None: ... async def communicate(self, input: Optional[bytes] = ...) -> Tuple[bytes, bytes]: ... async def create_subprocess_shell( *Args: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236 stdin: Union[int, IO[Any], None] = ..., stdout: Union[int, IO[Any], None] = ..., stderr: Union[int, IO[Any], None] = ..., loop: events.AbstractEventLoop = ..., limit: int = ..., **kwds: Any ) -> Process: ... async def create_subprocess_exec( program: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236 *args: Any, stdin: Union[int, IO[Any], None] = ..., stdout: Union[int, IO[Any], None] = ..., stderr: Union[int, IO[Any], None] = ..., loop: events.AbstractEventLoop = ..., limit: int = ..., **kwds: Any ) -> Process: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/tasks.pyi0000664000175000017500000001533513577124116024443 0ustar davedave00000000000000import concurrent.futures import sys from typing import ( Any, TypeVar, Set, List, TextIO, Union, Tuple, Generic, Generator, Iterable, Awaitable, overload, Iterator, Optional, ) from types import FrameType from .events import AbstractEventLoop from .futures import Future if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal _T = TypeVar('_T') _T1 = TypeVar('_T1') _T2 = TypeVar('_T2') _T3 = TypeVar('_T3') _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _FutureT = Union[Future[_T], Generator[Any, None, _T], Awaitable[_T]] FIRST_EXCEPTION: str FIRST_COMPLETED: str ALL_COMPLETED: str def as_completed(fs: Iterable[_FutureT[_T]], *, loop: Optional[AbstractEventLoop] = ..., timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ... def ensure_future(coro_or_future: _FutureT[_T], *, loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ... # Prior to Python 3.7 'async' was an alias for 'ensure_future'. # It became a keyword in 3.7. # `gather()` actually returns a list with length equal to the number # of tasks passed; however, Tuple is used similar to the annotation for # zip() because typing does not support variadic type variables. See # typing PR #1550 for discussion. @overload def gather(coro_or_future1: _FutureT[_T1], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: Literal[False] = ...) -> Future[Tuple[_T1]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: Literal[False] = ...) -> Future[Tuple[_T1, _T2]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: Literal[False] = ...) -> Future[Tuple[_T1, _T2, _T3]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3], coro_or_future4: _FutureT[_T4], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: Literal[False] = ...) -> Future[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3], coro_or_future4: _FutureT[_T4], coro_or_future5: _FutureT[_T5], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: Literal[False] = ...) -> Future[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def gather(coro_or_future1: _FutureT[Any], coro_or_future2: _FutureT[Any], coro_or_future3: _FutureT[Any], coro_or_future4: _FutureT[Any], coro_or_future5: _FutureT[Any], coro_or_future6: _FutureT[Any], *coros_or_futures: _FutureT[Any], loop: Optional[AbstractEventLoop] = ..., return_exceptions: bool = ...) -> Future[List[Any]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: bool = ...) -> Future[Tuple[Union[_T1, BaseException]]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: bool = ...) -> Future[Tuple[Union[_T1, BaseException], Union[_T2, BaseException]]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: bool = ...) -> Future[ Tuple[Union[_T1, BaseException], Union[_T2, BaseException], Union[_T3, BaseException]]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3], coro_or_future4: _FutureT[_T4], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: bool = ...) -> Future[ Tuple[Union[_T1, BaseException], Union[_T2, BaseException], Union[_T3, BaseException], Union[_T4, BaseException]]]: ... @overload def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3], coro_or_future4: _FutureT[_T4], coro_or_future5: _FutureT[_T5], *, loop: Optional[AbstractEventLoop] = ..., return_exceptions: bool = ...) -> Future[ Tuple[Union[_T1, BaseException], Union[_T2, BaseException], Union[_T3, BaseException], Union[_T4, BaseException], Union[_T5, BaseException]]]: ... def run_coroutine_threadsafe(coro: _FutureT[_T], loop: AbstractEventLoop) -> concurrent.futures.Future[_T]: ... def shield(arg: _FutureT[_T], *, loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ... def sleep(delay: float, result: _T = ..., loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ... def wait(fs: Iterable[_FutureT[_T]], *, loop: Optional[AbstractEventLoop] = ..., timeout: Optional[float] = ..., return_when: str = ...) -> Future[Tuple[Set[Future[_T]], Set[Future[_T]]]]: ... def wait_for(fut: _FutureT[_T], timeout: Optional[float], *, loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ... class Task(Future[_T], Generic[_T]): @classmethod def current_task(cls, loop: Optional[AbstractEventLoop] = ...) -> Task[Any]: ... @classmethod def all_tasks(cls, loop: Optional[AbstractEventLoop] = ...) -> Set[Task[Any]]: ... if sys.version_info >= (3, 8): def __init__( self, coro: Union[Generator[Any, None, _T], Awaitable[_T]], *, loop: AbstractEventLoop = ..., name: Optional[str] = ..., ) -> None: ... else: def __init__(self, coro: Union[Generator[Any, None, _T], Awaitable[_T]], *, loop: AbstractEventLoop = ...) -> None: ... def __repr__(self) -> str: ... if sys.version_info >= (3, 8): def get_coro(self) -> Any: ... def get_name(self) -> str: ... def set_name(self, value: object) -> None: ... def get_stack(self, *, limit: int = ...) -> List[FrameType]: ... def print_stack(self, *, limit: int = ..., file: TextIO = ...) -> None: ... def cancel(self) -> bool: ... def _step(self, value: Any = ..., exc: Exception = ...) -> None: ... def _wakeup(self, future: Future[Any]) -> None: ... if sys.version_info >= (3, 7): def all_tasks(loop: Optional[AbstractEventLoop] = ...) -> Set[Task[Any]]: ... if sys.version_info >= (3, 8): def create_task( coro: Union[Generator[Any, None, _T], Awaitable[_T]], *, name: Optional[str] = ..., ) -> Task[Any]: ... else: def create_task(coro: Union[Generator[Any, None, _T], Awaitable[_T]]) -> Task[Any]: ... def current_task(loop: Optional[AbstractEventLoop] = ...) -> Optional[Task[Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/streams.pyi0000664000175000017500000000747313577124116025000 0ustar davedave00000000000000import sys from typing import Any, Awaitable, Callable, Iterable, Optional, Tuple, Union from . import events from . import protocols from . import transports _ClientConnectedCallback = Callable[[StreamReader, StreamWriter], Optional[Awaitable[None]]] if sys.version_info < (3, 8): class IncompleteReadError(EOFError): expected: Optional[int] partial: bytes def __init__(self, partial: bytes, expected: Optional[int]) -> None: ... class LimitOverrunError(Exception): consumed: int def __init__(self, message: str, consumed: int) -> None: ... async def open_connection( host: str = ..., port: Union[int, str] = ..., *, loop: Optional[events.AbstractEventLoop] = ..., limit: int = ..., ssl_handshake_timeout: Optional[float] = ..., **kwds: Any ) -> Tuple[StreamReader, StreamWriter]: ... async def start_server( client_connected_cb: _ClientConnectedCallback, host: Optional[str] = ..., port: Optional[Union[int, str]] = ..., *, loop: Optional[events.AbstractEventLoop] = ..., limit: int = ..., ssl_handshake_timeout: Optional[float] = ..., **kwds: Any ) -> events.AbstractServer: ... if sys.platform != 'win32': if sys.version_info >= (3, 7): from os import PathLike _PathType = Union[str, PathLike[str]] else: _PathType = str async def open_unix_connection( path: _PathType = ..., *, loop: Optional[events.AbstractEventLoop] = ..., limit: int = ..., **kwds: Any ) -> Tuple[StreamReader, StreamWriter]: ... async def start_unix_server( client_connected_cb: _ClientConnectedCallback, path: _PathType = ..., *, loop: Optional[events.AbstractEventLoop] = ..., limit: int = ..., **kwds: Any) -> events.AbstractServer: ... class FlowControlMixin(protocols.Protocol): ... class StreamReaderProtocol(FlowControlMixin, protocols.Protocol): def __init__(self, stream_reader: StreamReader, client_connected_cb: _ClientConnectedCallback = ..., loop: Optional[events.AbstractEventLoop] = ...) -> None: ... def connection_made(self, transport: transports.BaseTransport) -> None: ... def connection_lost(self, exc: Optional[Exception]) -> None: ... def data_received(self, data: bytes) -> None: ... def eof_received(self) -> bool: ... class StreamWriter: def __init__(self, transport: transports.BaseTransport, protocol: protocols.BaseProtocol, reader: Optional[StreamReader], loop: events.AbstractEventLoop) -> None: ... @property def transport(self) -> transports.BaseTransport: ... def write(self, data: bytes) -> None: ... def writelines(self, data: Iterable[bytes]) -> None: ... def write_eof(self) -> None: ... def can_write_eof(self) -> bool: ... def close(self) -> None: ... if sys.version_info >= (3, 7): def is_closing(self) -> bool: ... async def wait_closed(self) -> None: ... def get_extra_info(self, name: str, default: Any = ...) -> Any: ... async def drain(self) -> None: ... class StreamReader: def __init__(self, limit: int = ..., loop: Optional[events.AbstractEventLoop] = ...) -> None: ... def exception(self) -> Exception: ... def set_exception(self, exc: Exception) -> None: ... def set_transport(self, transport: transports.BaseTransport) -> None: ... def feed_eof(self) -> None: ... def at_eof(self) -> bool: ... def feed_data(self, data: bytes) -> None: ... async def readline(self) -> bytes: ... async def readuntil(self, separator: bytes = ...) -> bytes: ... async def read(self, n: int = ...) -> bytes: ... async def readexactly(self, n: int) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/locks.pyi0000664000175000017500000000402313577124116024421 0ustar davedave00000000000000from typing import Any, Callable, Type, TypeVar, Union, Optional, Awaitable from .events import AbstractEventLoop from .futures import Future from types import TracebackType _T = TypeVar('_T') class _ContextManager: def __init__(self, lock: Union[Lock, Semaphore]) -> None: ... def __enter__(self) -> object: ... def __exit__(self, *args: Any) -> None: ... class _ContextManagerMixin(Future[_ContextManager]): # Apparently this exists to *prohibit* use as a context manager. def __enter__(self) -> object: ... def __exit__(self, *args: Any) -> None: ... def __aenter__(self) -> Awaitable[None]: ... def __aexit__(self, exc_type: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[TracebackType]) -> Awaitable[None]: ... class Lock(_ContextManagerMixin): def __init__(self, *, loop: Optional[AbstractEventLoop] = ...) -> None: ... def locked(self) -> bool: ... async def acquire(self) -> bool: ... def release(self) -> None: ... class Event: def __init__(self, *, loop: Optional[AbstractEventLoop] = ...) -> None: ... def is_set(self) -> bool: ... def set(self) -> None: ... def clear(self) -> None: ... async def wait(self) -> bool: ... class Condition(_ContextManagerMixin): def __init__(self, lock: Optional[Lock] = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ... def locked(self) -> bool: ... async def acquire(self) -> bool: ... def release(self) -> None: ... async def wait(self) -> bool: ... async def wait_for(self, predicate: Callable[[], _T]) -> _T: ... def notify(self, n: int = ...) -> None: ... def notify_all(self) -> None: ... class Semaphore(_ContextManagerMixin): def __init__(self, value: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ... def locked(self) -> bool: ... async def acquire(self) -> bool: ... def release(self) -> None: ... class BoundedSemaphore(Semaphore): def __init__(self, value: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/coroutines.pyi0000664000175000017500000000034213577124116025500 0ustar davedave00000000000000from typing import Any, Callable, TypeVar _F = TypeVar('_F', bound=Callable[..., Any]) def coroutine(func: _F) -> _F: ... def iscoroutinefunction(func: Callable[..., Any]) -> bool: ... def iscoroutine(obj: Any) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/futures.pyi0000664000175000017500000000454313577124116025012 0ustar davedave00000000000000import sys from typing import Any, Union, Callable, TypeVar, Type, List, Iterable, Generator, Awaitable, Optional, Tuple from .events import AbstractEventLoop from concurrent.futures import ( Future as _ConcurrentFuture, Error, ) if sys.version_info < (3, 8): from concurrent.futures import CancelledError as CancelledError from concurrent.futures import TimeoutError as TimeoutError class InvalidStateError(Error): ... if sys.version_info >= (3, 7): from contextvars import Context _T = TypeVar('_T') _S = TypeVar('_S') class _TracebackLogger: exc: BaseException tb: List[str] def __init__(self, exc: Any, loop: AbstractEventLoop) -> None: ... def activate(self) -> None: ... def clear(self) -> None: ... def __del__(self) -> None: ... def isfuture(obj: object) -> bool: ... class Future(Awaitable[_T], Iterable[_T]): _state: str _exception: BaseException _blocking = False _log_traceback = False _tb_logger: Type[_TracebackLogger] def __init__(self, *, loop: Optional[AbstractEventLoop] = ...) -> None: ... def __repr__(self) -> str: ... def __del__(self) -> None: ... if sys.version_info >= (3, 7): def get_loop(self) -> AbstractEventLoop: ... def _callbacks(self: _S) -> List[Tuple[Callable[[_S], Any], Context]]: ... def add_done_callback(self: _S, __fn: Callable[[_S], Any], *, context: Optional[Context] = ...) -> None: ... else: @property def _callbacks(self: _S) -> List[Callable[[_S], Any]]: ... def add_done_callback(self: _S, __fn: Callable[[_S], Any]) -> None: ... def cancel(self) -> bool: ... def _schedule_callbacks(self) -> None: ... def cancelled(self) -> bool: ... def done(self) -> bool: ... def result(self) -> _T: ... def exception(self) -> BaseException: ... def remove_done_callback(self: _S, fn: Callable[[_S], Any]) -> int: ... def set_result(self, result: _T) -> None: ... def set_exception(self, exception: Union[type, BaseException]) -> None: ... def _copy_state(self, other: Any) -> None: ... def __iter__(self) -> Generator[Any, None, _T]: ... def __await__(self) -> Generator[Any, None, _T]: ... @property def _loop(self) -> AbstractEventLoop: ... def wrap_future(f: Union[_ConcurrentFuture[_T], Future[_T]], *, loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/proactor_events.pyi0000664000175000017500000001016213577124116026524 0ustar davedave00000000000000import sys from socket import socket from typing import Any, Mapping, Optional, Union from . import base_events, constants, events, futures, streams, transports if sys.version_info >= (3, 7): from os import PathLike _Path = Union[str, PathLike[str]] else: _Path = str if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal class _ProactorBasePipeTransport(transports._FlowControlMixin, transports.BaseTransport): def __init__(self, loop: events.AbstractEventLoop, sock: socket, protocol: streams.StreamReaderProtocol, waiter: Optional[futures.Future[Any]] = ..., extra: Optional[Mapping[Any, Any]] = ..., server: Optional[events.AbstractServer] = ...) -> None: ... def __repr__(self) -> str: ... def __del__(self) -> None: ... def get_write_buffer_size(self) -> int: ... class _ProactorReadPipeTransport(_ProactorBasePipeTransport, transports.ReadTransport): def __init__(self, loop: events.AbstractEventLoop, sock: socket, protocol: streams.StreamReaderProtocol, waiter: Optional[futures.Future[Any]] = ..., extra: Optional[Mapping[Any, Any]] = ..., server: Optional[events.AbstractServer] = ...) -> None: ... class _ProactorBaseWritePipeTransport(_ProactorBasePipeTransport, transports.WriteTransport): def __init__(self, loop: events.AbstractEventLoop, sock: socket, protocol: streams.StreamReaderProtocol, waiter: Optional[futures.Future[Any]] = ..., extra: Optional[Mapping[Any, Any]] = ..., server: Optional[events.AbstractServer] = ...) -> None: ... class _ProactorWritePipeTransport(_ProactorBaseWritePipeTransport): def __init__(self, loop: events.AbstractEventLoop, sock: socket, protocol: streams.StreamReaderProtocol, waiter: Optional[futures.Future[Any]] = ..., extra: Optional[Mapping[Any, Any]] = ..., server: Optional[events.AbstractServer] = ...) -> None: ... class _ProactorDuplexPipeTransport(_ProactorReadPipeTransport, _ProactorBaseWritePipeTransport, transports.Transport): ... class _ProactorSocketTransport(_ProactorReadPipeTransport, _ProactorBaseWritePipeTransport, transports.Transport): _sendfile_compatible: constants._SendfileMode = ... def __init__(self, loop: events.AbstractEventLoop, sock: socket, protocol: streams.StreamReaderProtocol, waiter: Optional[futures.Future[Any]] = ..., extra: Optional[Mapping[Any, Any]] = ..., server: Optional[events.AbstractServer] = ...) -> None: ... def _set_extra(self, sock: socket) -> None: ... def can_write_eof(self) -> Literal[True]: ... def write_eof(self) -> None: ... class BaseProactorEventLoop(base_events.BaseEventLoop): def __init__(self, proactor: Any) -> None: ... # The methods below don't actually exist directly, ProactorEventLoops do not implement them. However, they are # needed to satisfy mypy if sys.version_info >= (3, 7): async def create_unix_connection( self, protocol_factory: events._ProtocolFactory, path: _Path, *, ssl: events._SSLContext = ..., sock: Optional[socket] = ..., server_hostname: str = ..., ssl_handshake_timeout: Optional[float] = ..., ) -> events._TransProtPair: ... async def create_unix_server( self, protocol_factory: events._ProtocolFactory, path: _Path, *, sock: Optional[socket] = ..., backlog: int = ..., ssl: events._SSLContext = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ..., ) -> events.AbstractServer: ... else: async def create_unix_connection(self, protocol_factory: events._ProtocolFactory, path: str, *, ssl: events._SSLContext = ..., sock: Optional[socket] = ..., server_hostname: str = ...) -> events._TransProtPair: ... async def create_unix_server(self, protocol_factory: events._ProtocolFactory, path: str, *, sock: Optional[socket] = ..., backlog: int = ..., ssl: events._SSLContext = ...) -> events.AbstractServer: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/protocols.pyi0000664000175000017500000000203513577124116025333 0ustar davedave00000000000000from asyncio import transports from typing import Optional, Text, Tuple, Union class BaseProtocol: def connection_made(self, transport: transports.BaseTransport) -> None: ... def connection_lost(self, exc: Optional[Exception]) -> None: ... def pause_writing(self) -> None: ... def resume_writing(self) -> None: ... class Protocol(BaseProtocol): def data_received(self, data: bytes) -> None: ... def eof_received(self) -> Optional[bool]: ... class BufferedProtocol(Protocol): def get_buffer(self, sizehint: int) -> bytearray: ... def buffer_updated(self, nbytes: int) -> None: ... class DatagramProtocol(BaseProtocol): def datagram_received(self, data: Union[bytes, Text], addr: Tuple[str, int]) -> None: ... def error_received(self, exc: Exception) -> None: ... class SubprocessProtocol(BaseProtocol): def pipe_data_received(self, fd: int, data: Union[bytes, Text]) -> None: ... def pipe_connection_lost(self, fd: int, exc: Optional[Exception]) -> None: ... def process_exited(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/windows_events.pyi0000664000175000017500000000536413577124116026375 0ustar davedave00000000000000 from typing import Callable, Tuple, List, IO, Any, Optional import socket from . import proactor_events, events, futures, windows_utils, selector_events, streams NULL: int INFINITE: int ERROR_CONNECTION_REFUSED: int ERROR_CONNECTION_ABORTED: int CONNECT_PIPE_INIT_DELAY: float CONNECT_PIPE_MAX_DELAY: float class PipeServer: def __init__(self, address: str) -> None: ... def __del__(self) -> None: ... def closed(self) -> bool: ... def close(self) -> None: ... class _WindowsSelectorEventLoop(selector_events.BaseSelectorEventLoop): ... class ProactorEventLoop(proactor_events.BaseProactorEventLoop): def __init__(self, proactor: Optional[IocpProactor] = ...) -> None: ... async def create_pipe_connection(self, protocol_factory: Callable[[], streams.StreamReaderProtocol], address: str) -> Tuple[proactor_events._ProactorDuplexPipeTransport, streams.StreamReaderProtocol]: ... async def start_serving_pipe(self, protocol_factory: Callable[[], streams.StreamReaderProtocol], address: str) -> List[PipeServer]: ... class IocpProactor: def __init__(self, concurrency: int = ...) -> None: ... def __repr__(self) -> str: ... def __del__(self) -> None: ... def set_loop(self, loop: events.AbstractEventLoop) -> None: ... def select(self, timeout: Optional[int] = ...) -> List[futures.Future[Any]]: ... def recv(self, conn: socket.socket, nbytes: int, flags: int = ...) -> futures.Future[bytes]: ... def recv_into(self, conn: socket.socket, buf: socket._WriteBuffer, flags: int = ...) -> futures.Future[Any]: ... def send(self, conn: socket.socket, buf: socket._WriteBuffer, flags: int = ...) -> futures.Future[Any]: ... def accept(self, listener: socket.socket) -> futures.Future[Any]: ... def connect(self, conn: socket.socket, address: bytes) -> futures.Future[Any]: ... def sendfile(self, sock: socket.socket, file: IO[bytes], offset: int, count: int) -> futures.Future[Any]: ... def accept_pipe(self, pipe: socket.socket) -> futures.Future[Any]: ... async def connect_pipe(self, address: bytes) -> windows_utils.PipeHandle: ... def wait_for_handle(self, handle: windows_utils.PipeHandle, timeout: int = ...) -> bool: ... def close(self) -> None: ... SelectorEventLoop = _WindowsSelectorEventLoop class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy): _loop_factory: events.AbstractEventLoop = ... def get_child_watcher(self) -> Any: ... def set_child_watcher(self, watcher: Any) -> None: ... class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy): _loop_factory: events.AbstractEventLoop = ... def get_child_watcher(self) -> Any: ... def set_child_watcher(self, watcher: Any) -> None: ... DefaultEventLoopPolicy = WindowsSelectorEventLoopPolicy jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/runners.pyi0000664000175000017500000000026113577124116025002 0ustar davedave00000000000000import sys if sys.version_info >= (3, 7): from typing import Awaitable, TypeVar _T = TypeVar('_T') def run(main: Awaitable[_T], *, debug: bool = ...) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/events.pyi0000664000175000017500000004257113577124116024624 0ustar davedave00000000000000import selectors from socket import socket, _Address, _RetAddress import ssl import sys from typing import Any, Awaitable, Callable, Dict, Generator, IO, List, Optional, Sequence, Tuple, TypeVar, Union, overload from abc import ABCMeta, abstractmethod from asyncio.futures import Future from asyncio.protocols import BaseProtocol from asyncio.tasks import Task from asyncio.transports import BaseTransport _T = TypeVar('_T') _Context = Dict[str, Any] _ExceptionHandler = Callable[[AbstractEventLoop, _Context], Any] _ProtocolFactory = Callable[[], BaseProtocol] _SSLContext = Union[bool, None, ssl.SSLContext] _TransProtPair = Tuple[BaseTransport, BaseProtocol] class Handle: _cancelled = False _args: List[Any] def __init__(self, callback: Callable[..., Any], args: List[Any], loop: AbstractEventLoop) -> None: ... def __repr__(self) -> str: ... def cancel(self) -> None: ... def _run(self) -> None: ... if sys.version_info >= (3, 7): def cancelled(self) -> bool: ... class TimerHandle(Handle): def __init__(self, when: float, callback: Callable[..., Any], args: List[Any], loop: AbstractEventLoop) -> None: ... def __hash__(self) -> int: ... if sys.version_info >= (3, 7): def when(self) -> float: ... class AbstractServer: sockets: Optional[List[socket]] def close(self) -> None: ... if sys.version_info >= (3, 7): async def __aenter__(self: _T) -> _T: ... async def __aexit__(self, *exc: Any) -> None: ... def get_loop(self) -> AbstractEventLoop: ... def is_serving(self) -> bool: ... async def start_serving(self) -> None: ... async def serve_forever(self) -> None: ... async def wait_closed(self) -> None: ... class AbstractEventLoop(metaclass=ABCMeta): slow_callback_duration: float = ... @abstractmethod def run_forever(self) -> None: ... # Can't use a union, see mypy issue # 1873. @overload @abstractmethod def run_until_complete(self, future: Generator[Any, None, _T]) -> _T: ... @overload @abstractmethod def run_until_complete(self, future: Awaitable[_T]) -> _T: ... @abstractmethod def stop(self) -> None: ... @abstractmethod def is_running(self) -> bool: ... @abstractmethod def is_closed(self) -> bool: ... @abstractmethod def close(self) -> None: ... if sys.version_info >= (3, 6): @abstractmethod async def shutdown_asyncgens(self) -> None: ... # Methods scheduling callbacks. All these return Handles. @abstractmethod def call_soon(self, callback: Callable[..., Any], *args: Any) -> Handle: ... @abstractmethod def call_later(self, delay: float, callback: Callable[..., Any], *args: Any) -> TimerHandle: ... @abstractmethod def call_at(self, when: float, callback: Callable[..., Any], *args: Any) -> TimerHandle: ... @abstractmethod def time(self) -> float: ... # Future methods @abstractmethod def create_future(self) -> Future[Any]: ... # Tasks methods if sys.version_info >= (3, 8): @abstractmethod def create_task( self, coro: Union[Awaitable[_T], Generator[Any, None, _T]], *, name: Optional[str] = ..., ) -> Task[_T]: ... else: @abstractmethod def create_task(self, coro: Union[Awaitable[_T], Generator[Any, None, _T]]) -> Task[_T]: ... @abstractmethod def set_task_factory(self, factory: Optional[Callable[[AbstractEventLoop, Generator[Any, None, _T]], Future[_T]]]) -> None: ... @abstractmethod def get_task_factory(self) -> Optional[Callable[[AbstractEventLoop, Generator[Any, None, _T]], Future[_T]]]: ... # Methods for interacting with threads @abstractmethod def call_soon_threadsafe(self, callback: Callable[..., Any], *args: Any) -> Handle: ... @abstractmethod async def run_in_executor(self, executor: Any, func: Callable[..., _T], *args: Any) -> _T: ... @abstractmethod def set_default_executor(self, executor: Any) -> None: ... # Network I/O methods returning Futures. @abstractmethod # TODO the "Tuple[Any, ...]" should be "Union[Tuple[str, int], Tuple[str, int, int, int]]" but that triggers # https://github.com/python/mypy/issues/2509 async def getaddrinfo(self, host: Optional[str], port: Union[str, int, None], *, family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> List[Tuple[int, int, int, str, Tuple[Any, ...]]]: ... @abstractmethod async def getnameinfo(self, sockaddr: Tuple[Any, ...], flags: int = ...) -> Tuple[str, int]: ... if sys.version_info >= (3, 8): @overload @abstractmethod async def create_connection( self, protocol_factory: _ProtocolFactory, host: str = ..., port: int = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: None = ..., local_addr: Optional[str] = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ..., happy_eyeballs_delay: Optional[float] = ..., interleave: Optional[int] = ..., ) -> _TransProtPair: ... @overload @abstractmethod async def create_connection( self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: socket, local_addr: None = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ..., happy_eyeballs_delay: Optional[float] = ..., interleave: Optional[int] = ..., ) -> _TransProtPair: ... elif sys.version_info >= (3, 7): @overload @abstractmethod async def create_connection(self, protocol_factory: _ProtocolFactory, host: str = ..., port: int = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: None = ..., local_addr: Optional[str] = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... @overload @abstractmethod async def create_connection(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: socket, local_addr: None = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... else: @overload @abstractmethod async def create_connection(self, protocol_factory: _ProtocolFactory, host: str = ..., port: int = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: None = ..., local_addr: Optional[str] = ..., server_hostname: Optional[str] = ...) -> _TransProtPair: ... @overload @abstractmethod async def create_connection(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: socket, local_addr: None = ..., server_hostname: Optional[str] = ...) -> _TransProtPair: ... if sys.version_info >= (3, 7): @abstractmethod async def sock_sendfile(self, sock: socket, file: IO[bytes], offset: int = ..., count: Optional[int] = ..., *, fallback: bool = ...) -> int: ... @overload @abstractmethod async def create_server(self, protocol_factory: _ProtocolFactory, host: Optional[Union[str, Sequence[str]]] = ..., port: int = ..., *, family: int = ..., flags: int = ..., sock: None = ..., backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ...) -> AbstractServer: ... @overload @abstractmethod async def create_server(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, family: int = ..., flags: int = ..., sock: socket = ..., backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ...) -> AbstractServer: ... @abstractmethod async def create_unix_connection(self, protocol_factory: _ProtocolFactory, path: str, *, ssl: _SSLContext = ..., sock: Optional[socket] = ..., server_hostname: str = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... @abstractmethod async def create_unix_server(self, protocol_factory: _ProtocolFactory, path: str, *, sock: Optional[socket] = ..., backlog: int = ..., ssl: _SSLContext = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ...) -> AbstractServer: ... @abstractmethod async def connect_accepted_socket(self, protocol_factory: _ProtocolFactory, sock: socket, *, ssl: _SSLContext = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... @abstractmethod async def sendfile(self, transport: BaseTransport, file: IO[bytes], offset: int = ..., count: Optional[int] = ..., *, fallback: bool = ...) -> int: ... @abstractmethod async def start_tls(self, transport: BaseTransport, protocol: BaseProtocol, sslcontext: ssl.SSLContext, *, server_side: bool = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ...) -> BaseTransport: ... else: @overload @abstractmethod async def create_server(self, protocol_factory: _ProtocolFactory, host: Optional[Union[str, Sequence[str]]] = ..., port: int = ..., *, family: int = ..., flags: int = ..., sock: None = ..., backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ...) -> AbstractServer: ... @overload @abstractmethod async def create_server(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, family: int = ..., flags: int = ..., sock: socket, backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ...) -> AbstractServer: ... @abstractmethod async def create_unix_connection(self, protocol_factory: _ProtocolFactory, path: str, *, ssl: _SSLContext = ..., sock: Optional[socket] = ..., server_hostname: str = ...) -> _TransProtPair: ... @abstractmethod async def create_unix_server(self, protocol_factory: _ProtocolFactory, path: str, *, sock: Optional[socket] = ..., backlog: int = ..., ssl: _SSLContext = ...) -> AbstractServer: ... @abstractmethod async def connect_accepted_socket(self, protocol_factory: _ProtocolFactory, sock: socket, *, ssl: _SSLContext = ...) -> _TransProtPair: ... @abstractmethod async def create_datagram_endpoint(self, protocol_factory: _ProtocolFactory, local_addr: Optional[Tuple[str, int]] = ..., remote_addr: Optional[Tuple[str, int]] = ..., *, family: int = ..., proto: int = ..., flags: int = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ..., allow_broadcast: Optional[bool] = ..., sock: Optional[socket] = ...) -> _TransProtPair: ... # Pipes and subprocesses. @abstractmethod async def connect_read_pipe(self, protocol_factory: _ProtocolFactory, pipe: Any) -> _TransProtPair: ... @abstractmethod async def connect_write_pipe(self, protocol_factory: _ProtocolFactory, pipe: Any) -> _TransProtPair: ... @abstractmethod async def subprocess_shell(self, protocol_factory: _ProtocolFactory, cmd: Union[bytes, str], *, stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., **kwargs: Any) -> _TransProtPair: ... @abstractmethod async def subprocess_exec(self, protocol_factory: _ProtocolFactory, *args: Any, stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., **kwargs: Any) -> _TransProtPair: ... @abstractmethod def add_reader(self, fd: selectors._FileObject, callback: Callable[..., Any], *args: Any) -> None: ... @abstractmethod def remove_reader(self, fd: selectors._FileObject) -> None: ... @abstractmethod def add_writer(self, fd: selectors._FileObject, callback: Callable[..., Any], *args: Any) -> None: ... @abstractmethod def remove_writer(self, fd: selectors._FileObject) -> None: ... # Completion based I/O methods returning Futures prior to 3.7 if sys.version_info >= (3, 7): @abstractmethod async def sock_recv(self, sock: socket, nbytes: int) -> bytes: ... @abstractmethod async def sock_recv_into(self, sock: socket, buf: bytearray) -> int: ... @abstractmethod async def sock_sendall(self, sock: socket, data: bytes) -> None: ... @abstractmethod async def sock_connect(self, sock: socket, address: _Address) -> None: ... @abstractmethod async def sock_accept(self, sock: socket) -> Tuple[socket, _RetAddress]: ... else: @abstractmethod def sock_recv(self, sock: socket, nbytes: int) -> Future[bytes]: ... @abstractmethod def sock_sendall(self, sock: socket, data: bytes) -> Future[None]: ... @abstractmethod def sock_connect(self, sock: socket, address: _Address) -> Future[None]: ... @abstractmethod def sock_accept(self, sock: socket) -> Future[Tuple[socket, _RetAddress]]: ... # Signal handling. @abstractmethod def add_signal_handler(self, sig: int, callback: Callable[..., Any], *args: Any) -> None: ... @abstractmethod def remove_signal_handler(self, sig: int) -> None: ... # Error handlers. @abstractmethod def set_exception_handler(self, handler: Optional[_ExceptionHandler]) -> None: ... @abstractmethod def get_exception_handler(self) -> Optional[_ExceptionHandler]: ... @abstractmethod def default_exception_handler(self, context: _Context) -> None: ... @abstractmethod def call_exception_handler(self, context: _Context) -> None: ... # Debug flag management. @abstractmethod def get_debug(self) -> bool: ... @abstractmethod def set_debug(self, enabled: bool) -> None: ... class AbstractEventLoopPolicy(metaclass=ABCMeta): @abstractmethod def get_event_loop(self) -> AbstractEventLoop: ... @abstractmethod def set_event_loop(self, loop: Optional[AbstractEventLoop]) -> None: ... @abstractmethod def new_event_loop(self) -> AbstractEventLoop: ... # Child processes handling (Unix only). @abstractmethod def get_child_watcher(self) -> Any: ... # TODO: unix_events.AbstractChildWatcher @abstractmethod def set_child_watcher(self, watcher: Any) -> None: ... # TODO: unix_events.AbstractChildWatcher class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy, metaclass=ABCMeta): def __init__(self) -> None: ... def get_event_loop(self) -> AbstractEventLoop: ... def set_event_loop(self, loop: Optional[AbstractEventLoop]) -> None: ... def new_event_loop(self) -> AbstractEventLoop: ... def get_event_loop_policy() -> AbstractEventLoopPolicy: ... def set_event_loop_policy(policy: AbstractEventLoopPolicy) -> None: ... def get_event_loop() -> AbstractEventLoop: ... def set_event_loop(loop: Optional[AbstractEventLoop]) -> None: ... def new_event_loop() -> AbstractEventLoop: ... def get_child_watcher() -> Any: ... # TODO: unix_events.AbstractChildWatcher def set_child_watcher(watcher: Any) -> None: ... # TODO: unix_events.AbstractChildWatcher def _set_running_loop(loop: Optional[AbstractEventLoop]) -> None: ... def _get_running_loop() -> AbstractEventLoop: ... if sys.version_info >= (3, 7): def get_running_loop() -> AbstractEventLoop: ... if sys.version_info < (3, 8): class SendfileNotAvailableError(RuntimeError): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/base_events.pyi0000664000175000017500000003163013577124116025610 0ustar davedave00000000000000import selectors from socket import socket, _Address, _RetAddress import ssl import sys from typing import Any, Awaitable, Callable, Dict, Generator, IO, List, Optional, Sequence, Tuple, TypeVar, Union, overload from abc import ABCMeta from asyncio.futures import Future from asyncio.events import AbstractEventLoop, AbstractServer, Handle, TimerHandle from asyncio.protocols import BaseProtocol from asyncio.tasks import Task from asyncio.transports import BaseTransport if sys.version_info >= (3, 7): from contextvars import Context _T = TypeVar('_T') _Context = Dict[str, Any] _ExceptionHandler = Callable[[AbstractEventLoop, _Context], Any] _ProtocolFactory = Callable[[], BaseProtocol] _SSLContext = Union[bool, None, ssl.SSLContext] _TransProtPair = Tuple[BaseTransport, BaseProtocol] class Server(AbstractServer): ... class BaseEventLoop(AbstractEventLoop, metaclass=ABCMeta): def run_forever(self) -> None: ... # Can't use a union, see mypy issue # 1873. @overload def run_until_complete(self, future: Generator[Any, None, _T]) -> _T: ... @overload def run_until_complete(self, future: Awaitable[_T]) -> _T: ... def stop(self) -> None: ... def is_running(self) -> bool: ... def is_closed(self) -> bool: ... def close(self) -> None: ... if sys.version_info >= (3, 6): async def shutdown_asyncgens(self) -> None: ... # Methods scheduling callbacks. All these return Handles. if sys.version_info >= (3, 7): def call_soon(self, callback: Callable[..., Any], *args: Any, context: Optional[Context] = ...) -> Handle: ... def call_later( self, delay: float, callback: Callable[..., Any], *args: Any, context: Optional[Context] = ..., ) -> TimerHandle: ... def call_at( self, when: float, callback: Callable[..., Any], *args: Any, context: Optional[Context] = ..., ) -> TimerHandle: ... else: def call_soon(self, callback: Callable[..., Any], *args: Any) -> Handle: ... def call_later(self, delay: float, callback: Callable[..., Any], *args: Any) -> TimerHandle: ... def call_at(self, when: float, callback: Callable[..., Any], *args: Any) -> TimerHandle: ... def time(self) -> float: ... # Future methods def create_future(self) -> Future[Any]: ... # Tasks methods if sys.version_info >= (3, 8): def create_task( self, coro: Union[Awaitable[_T], Generator[Any, None, _T]], *, name: Optional[str] = ..., ) -> Task[_T]: ... else: def create_task(self, coro: Union[Awaitable[_T], Generator[Any, None, _T]]) -> Task[_T]: ... def set_task_factory(self, factory: Optional[Callable[[AbstractEventLoop, Generator[Any, None, _T]], Future[_T]]]) -> None: ... def get_task_factory(self) -> Optional[Callable[[AbstractEventLoop, Generator[Any, None, _T]], Future[_T]]]: ... # Methods for interacting with threads if sys.version_info >= (3, 7): def call_soon_threadsafe(self, callback: Callable[..., Any], *args: Any, context: Optional[Context] = ...) -> Handle: ... else: def call_soon_threadsafe(self, callback: Callable[..., Any], *args: Any) -> Handle: ... async def run_in_executor(self, executor: Any, func: Callable[..., _T], *args: Any) -> _T: ... def set_default_executor(self, executor: Any) -> None: ... # Network I/O methods returning Futures. # TODO the "Tuple[Any, ...]" should be "Union[Tuple[str, int], Tuple[str, int, int, int]]" but that triggers # https://github.com/python/mypy/issues/2509 async def getaddrinfo(self, host: Optional[str], port: Union[str, int, None], *, family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> List[Tuple[int, int, int, str, Tuple[Any, ...]]]: ... async def getnameinfo(self, sockaddr: Tuple[Any, ...], flags: int = ...) -> Tuple[str, int]: ... if sys.version_info >= (3, 8): @overload async def create_connection( self, protocol_factory: _ProtocolFactory, host: str = ..., port: int = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: None = ..., local_addr: Optional[str] = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ..., happy_eyeballs_delay: Optional[float] = ..., interleave: Optional[int] = ..., ) -> _TransProtPair: ... @overload async def create_connection( self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: socket, local_addr: None = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ..., happy_eyeballs_delay: Optional[float] = ..., interleave: Optional[int] = ..., ) -> _TransProtPair: ... elif sys.version_info >= (3, 7): @overload async def create_connection(self, protocol_factory: _ProtocolFactory, host: str = ..., port: int = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: None = ..., local_addr: Optional[str] = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... @overload async def create_connection(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: socket, local_addr: None = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... else: @overload async def create_connection(self, protocol_factory: _ProtocolFactory, host: str = ..., port: int = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: None = ..., local_addr: Optional[str] = ..., server_hostname: Optional[str] = ...) -> _TransProtPair: ... @overload async def create_connection(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, ssl: _SSLContext = ..., family: int = ..., proto: int = ..., flags: int = ..., sock: socket, local_addr: None = ..., server_hostname: Optional[str] = ...) -> _TransProtPair: ... if sys.version_info >= (3, 7): async def sock_sendfile(self, sock: socket, file: IO[bytes], offset: int = ..., count: Optional[int] = ..., *, fallback: bool = ...) -> int: ... @overload async def create_server(self, protocol_factory: _ProtocolFactory, host: Optional[Union[str, Sequence[str]]] = ..., port: int = ..., *, family: int = ..., flags: int = ..., sock: None = ..., backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ...) -> Server: ... @overload async def create_server(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, family: int = ..., flags: int = ..., sock: socket = ..., backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ..., ssl_handshake_timeout: Optional[float] = ..., start_serving: bool = ...) -> Server: ... async def connect_accepted_socket(self, protocol_factory: _ProtocolFactory, sock: socket, *, ssl: _SSLContext = ..., ssl_handshake_timeout: Optional[float] = ...) -> _TransProtPair: ... async def sendfile(self, transport: BaseTransport, file: IO[bytes], offset: int = ..., count: Optional[int] = ..., *, fallback: bool = ...) -> int: ... async def start_tls(self, transport: BaseTransport, protocol: BaseProtocol, sslcontext: ssl.SSLContext, *, server_side: bool = ..., server_hostname: Optional[str] = ..., ssl_handshake_timeout: Optional[float] = ...) -> BaseTransport: ... else: @overload async def create_server(self, protocol_factory: _ProtocolFactory, host: Optional[Union[str, Sequence[str]]] = ..., port: int = ..., *, family: int = ..., flags: int = ..., sock: None = ..., backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ...) -> Server: ... @overload async def create_server(self, protocol_factory: _ProtocolFactory, host: None = ..., port: None = ..., *, family: int = ..., flags: int = ..., sock: socket, backlog: int = ..., ssl: _SSLContext = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ...) -> Server: ... async def connect_accepted_socket(self, protocol_factory: _ProtocolFactory, sock: socket, *, ssl: _SSLContext = ...) -> _TransProtPair: ... async def create_datagram_endpoint(self, protocol_factory: _ProtocolFactory, local_addr: Optional[Tuple[str, int]] = ..., remote_addr: Optional[Tuple[str, int]] = ..., *, family: int = ..., proto: int = ..., flags: int = ..., reuse_address: Optional[bool] = ..., reuse_port: Optional[bool] = ..., allow_broadcast: Optional[bool] = ..., sock: Optional[socket] = ...) -> _TransProtPair: ... # Pipes and subprocesses. async def connect_read_pipe(self, protocol_factory: _ProtocolFactory, pipe: Any) -> _TransProtPair: ... async def connect_write_pipe(self, protocol_factory: _ProtocolFactory, pipe: Any) -> _TransProtPair: ... async def subprocess_shell(self, protocol_factory: _ProtocolFactory, cmd: Union[bytes, str], *, stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., **kwargs: Any) -> _TransProtPair: ... async def subprocess_exec(self, protocol_factory: _ProtocolFactory, *args: Any, stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., **kwargs: Any) -> _TransProtPair: ... def add_reader(self, fd: selectors._FileObject, callback: Callable[..., Any], *args: Any) -> None: ... def remove_reader(self, fd: selectors._FileObject) -> None: ... def add_writer(self, fd: selectors._FileObject, callback: Callable[..., Any], *args: Any) -> None: ... def remove_writer(self, fd: selectors._FileObject) -> None: ... # Completion based I/O methods returning Futures prior to 3.7 if sys.version_info >= (3, 7): async def sock_recv(self, sock: socket, nbytes: int) -> bytes: ... async def sock_recv_into(self, sock: socket, buf: bytearray) -> int: ... async def sock_sendall(self, sock: socket, data: bytes) -> None: ... async def sock_connect(self, sock: socket, address: _Address) -> None: ... async def sock_accept(self, sock: socket) -> Tuple[socket, _RetAddress]: ... else: def sock_recv(self, sock: socket, nbytes: int) -> Future[bytes]: ... def sock_sendall(self, sock: socket, data: bytes) -> Future[None]: ... def sock_connect(self, sock: socket, address: _Address) -> Future[None]: ... def sock_accept(self, sock: socket) -> Future[Tuple[socket, _RetAddress]]: ... # Signal handling. def add_signal_handler(self, sig: int, callback: Callable[..., Any], *args: Any) -> None: ... def remove_signal_handler(self, sig: int) -> None: ... # Error handlers. def set_exception_handler(self, handler: Optional[_ExceptionHandler]) -> None: ... def get_exception_handler(self) -> Optional[_ExceptionHandler]: ... def default_exception_handler(self, context: _Context) -> None: ... def call_exception_handler(self, context: _Context) -> None: ... # Debug flag management. def get_debug(self) -> bool: ... def set_debug(self, enabled: bool) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/exceptions.pyi0000664000175000017500000000106213577124116025467 0ustar davedave00000000000000import sys from typing import Optional if sys.version_info >= (3, 8): class CancelledError(BaseException): ... class TimeoutError(Exception): ... class InvalidStateError(Exception): ... class SendfileNotAvailableError(RuntimeError): ... class IncompleteReadError(EOFError): expected: Optional[int] partial: bytes def __init__(self, partial: bytes, expected: Optional[int]) -> None: ... class LimitOverrunError(Exception): consumed: int def __init__(self, message: str, consumed: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/windows_utils.pyi0000664000175000017500000000125013577124116026217 0ustar davedave00000000000000 from typing import Tuple, Callable, Optional from types import TracebackType BUFSIZE: int PIPE: int STDOUT: int def pipe(*, duplex: bool = ..., overlapped: Tuple[bool, bool] = ..., bufsize: int = ...) -> Tuple[int, int]: ... class PipeHandle: def __init__(self, handle: int) -> None: ... def __repr__(self) -> str: ... def __del__(self) -> None: ... def __enter__(self) -> PipeHandle: ... def __exit__(self, t: Optional[type], v: Optional[BaseException], tb: Optional[TracebackType]) -> None: ... @property def handle(self) -> int: ... def fileno(self) -> int: ... def close(self, *, CloseHandle: Callable[[int], None] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/asyncio/constants.pyi0000664000175000017500000000042613577124116025325 0ustar davedave00000000000000 import enum LOG_THRESHOLD_FOR_CONNLOST_WRITES: int ACCEPT_RETRY_DELAY: int DEBUG_STACK_DEPTH: int SSL_HANDSHAKE_TIMEOUT: float SENDFILE_FALLBACK_READBUFFER_SIZE: int class _SendfileMode(enum.Enum): UNSUPPORTED: int = ... TRY_NATIVE: int = ... FALLBACK: int = ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/ipaddress.pyi0000664000175000017500000001177713577124116023635 0ustar davedave00000000000000from typing import (Any, Container, Generic, Iterable, Iterator, Optional, overload, SupportsInt, Text, Tuple, TypeVar) # Undocumented length constants IPV4LENGTH: int IPV6LENGTH: int _A = TypeVar("_A", IPv4Address, IPv6Address) _N = TypeVar("_N", IPv4Network, IPv6Network) _T = TypeVar("_T") def ip_address(address: object) -> Any: ... # morally Union[IPv4Address, IPv6Address] def ip_network(address: object, strict: bool = ...) -> Any: ... # morally Union[IPv4Network, IPv6Network] def ip_interface(address: object) -> Any: ... # morally Union[IPv4Interface, IPv6Interface] class _IPAddressBase: def __eq__(self, other: Any) -> bool: ... def __ge__(self: _T, other: _T) -> bool: ... def __gt__(self: _T, other: _T) -> bool: ... def __le__(self: _T, other: _T) -> bool: ... def __lt__(self: _T, other: _T) -> bool: ... def __ne__(self, other: Any) -> bool: ... @property def compressed(self) -> Text: ... @property def exploded(self) -> Text: ... @property def reverse_pointer(self) -> Text: ... @property def version(self) -> int: ... class _BaseAddress(_IPAddressBase, SupportsInt): def __init__(self, address: object) -> None: ... def __add__(self: _T, other: int) -> _T: ... def __hash__(self) -> int: ... def __int__(self) -> int: ... def __sub__(self: _T, other: int) -> _T: ... @property def is_global(self) -> bool: ... @property def is_link_local(self) -> bool: ... @property def is_loopback(self) -> bool: ... @property def is_multicast(self) -> bool: ... @property def is_private(self) -> bool: ... @property def is_reserved(self) -> bool: ... @property def is_unspecified(self) -> bool: ... @property def max_prefixlen(self) -> int: ... @property def packed(self) -> bytes: ... class _BaseNetwork(_IPAddressBase, Container[_A], Iterable[_A], Generic[_A]): network_address: _A netmask: _A def __init__(self, address: object, strict: bool = ...) -> None: ... def __contains__(self, other: Any) -> bool: ... def __getitem__(self, n: int) -> _A: ... def __iter__(self) -> Iterator[_A]: ... def address_exclude(self: _T, other: _T) -> Iterator[_T]: ... @property def broadcast_address(self) -> _A: ... def compare_networks(self: _T, other: _T) -> int: ... def hosts(self) -> Iterator[_A]: ... @property def is_global(self) -> bool: ... @property def is_link_local(self) -> bool: ... @property def is_loopback(self) -> bool: ... @property def is_multicast(self) -> bool: ... @property def is_private(self) -> bool: ... @property def is_reserved(self) -> bool: ... @property def is_unspecified(self) -> bool: ... @property def max_prefixlen(self) -> int: ... @property def num_addresses(self) -> int: ... def overlaps(self: _T, other: _T) -> bool: ... @property def prefixlen(self) -> int: ... def subnets(self: _T, prefixlen_diff: int = ..., new_prefix: Optional[int] = ...) -> Iterator[_T]: ... def supernet(self: _T, prefixlen_diff: int = ..., new_prefix: Optional[int] = ...) -> _T: ... @property def with_hostmask(self) -> Text: ... @property def with_netmask(self) -> Text: ... @property def with_prefixlen(self) -> Text: ... @property def hostmask(self) -> _A: ... class _BaseInterface(_BaseAddress, Generic[_A, _N]): hostmask: _A netmask: _A network: _N @property def ip(self) -> _A: ... @property def with_hostmask(self) -> Text: ... @property def with_netmask(self) -> Text: ... @property def with_prefixlen(self) -> Text: ... class IPv4Address(_BaseAddress): ... class IPv4Network(_BaseNetwork[IPv4Address]): ... class IPv4Interface(IPv4Address, _BaseInterface[IPv4Address, IPv4Network]): ... class IPv6Address(_BaseAddress): @property def ipv4_mapped(self) -> Optional[IPv4Address]: ... @property def is_site_local(self) -> bool: ... @property def sixtofour(self) -> Optional[IPv4Address]: ... @property def teredo(self) -> Optional[Tuple[IPv4Address, IPv4Address]]: ... class IPv6Network(_BaseNetwork[IPv6Address]): @property def is_site_local(self) -> bool: ... class IPv6Interface(IPv6Address, _BaseInterface[IPv6Address, IPv6Network]): ... def v4_int_to_packed(address: int) -> bytes: ... def v6_int_to_packed(address: int) -> bytes: ... @overload def summarize_address_range(first: IPv4Address, last: IPv4Address) -> Iterator[IPv4Network]: ... @overload def summarize_address_range(first: IPv6Address, last: IPv6Address) -> Iterator[IPv6Network]: ... def collapse_addresses(addresses: Iterable[_N]) -> Iterator[_N]: ... @overload def get_mixed_type_key(obj: _A) -> Tuple[int, _A]: ... @overload def get_mixed_type_key(obj: IPv4Network) -> Tuple[int, IPv4Address, IPv4Address]: ... @overload def get_mixed_type_key(obj: IPv6Network) -> Tuple[int, IPv6Address, IPv6Address]: ... class AddressValueError(ValueError): ... class NetmaskValueError(ValueError): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/0000775000175000017500000000000013577125145023123 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/__init__.pyi0000664000175000017500000000112513577124116025401 0ustar davedave00000000000000from importlib.abc import Loader import types from typing import Any, Mapping, Optional, Sequence def __import__(name: str, globals: Optional[Mapping[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ..., fromlist: Sequence[str] = ..., level: int = ...) -> types.ModuleType: ... def import_module(name: str, package: Optional[str] = ...) -> types.ModuleType: ... def find_loader(name: str, path: Optional[str] = ...) -> Optional[Loader]: ... def invalidate_caches() -> None: ... def reload(module: types.ModuleType) -> types.ModuleType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/abc.pyi0000664000175000017500000000670213577124116024375 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod import os import sys import types from typing import Any, IO, Iterator, Mapping, Optional, Sequence, Tuple, Union # Loader is exported from this module, but for circular import reasons # exists in its own stub file (with ModuleSpec and ModuleType). from _importlib_modulespec import Loader as Loader # Exported from _importlib_modulespec import ModuleSpec _Path = Union[bytes, str] class Finder(metaclass=ABCMeta): ... # Technically this class defines the following method, but its subclasses # in this module violate its signature. Since this class is deprecated, it's # easier to simply ignore that this method exists. # @abstractmethod # def find_module(self, fullname: str, # path: Optional[Sequence[_Path]] = ...) -> Optional[Loader]: ... class ResourceLoader(Loader): @abstractmethod def get_data(self, path: _Path) -> bytes: ... class InspectLoader(Loader): def is_package(self, fullname: str) -> bool: ... def get_code(self, fullname: str) -> Optional[types.CodeType]: ... def load_module(self, fullname: str) -> types.ModuleType: ... @abstractmethod def get_source(self, fullname: str) -> Optional[str]: ... def exec_module(self, module: types.ModuleType) -> None: ... @staticmethod def source_to_code(data: Union[bytes, str], path: str = ...) -> types.CodeType: ... class ExecutionLoader(InspectLoader): @abstractmethod def get_filename(self, fullname: str) -> _Path: ... def get_code(self, fullname: str) -> Optional[types.CodeType]: ... class SourceLoader(ResourceLoader, ExecutionLoader, metaclass=ABCMeta): def path_mtime(self, path: _Path) -> float: ... def set_data(self, path: _Path, data: bytes) -> None: ... def get_source(self, fullname: str) -> Optional[str]: ... def path_stats(self, path: _Path) -> Mapping[str, Any]: ... class MetaPathFinder(Finder): def find_module(self, fullname: str, path: Optional[Sequence[_Path]]) -> Optional[Loader]: ... def invalidate_caches(self) -> None: ... # Not defined on the actual class, but expected to exist. def find_spec( self, fullname: str, path: Optional[Sequence[_Path]], target: Optional[types.ModuleType] = ... ) -> Optional[ModuleSpec]: ... class PathEntryFinder(Finder): def find_module(self, fullname: str) -> Optional[Loader]: ... def find_loader( self, fullname: str ) -> Tuple[Optional[Loader], Sequence[_Path]]: ... def invalidate_caches(self) -> None: ... # Not defined on the actual class, but expected to exist. def find_spec( self, fullname: str, target: Optional[types.ModuleType] = ... ) -> Optional[ModuleSpec]: ... class FileLoader(ResourceLoader, ExecutionLoader, metaclass=ABCMeta): name: str path: _Path def __init__(self, fullname: str, path: _Path) -> None: ... def get_data(self, path: _Path) -> bytes: ... def get_filename(self, fullname: str) -> _Path: ... if sys.version_info >= (3, 7): _PathLike = Union[bytes, str, os.PathLike[Any]] class ResourceReader(metaclass=ABCMeta): @abstractmethod def open_resource(self, resource: _PathLike) -> IO[bytes]: ... @abstractmethod def resource_path(self, resource: _PathLike) -> str: ... @abstractmethod def is_resource(self, name: str) -> bool: ... @abstractmethod def contents(self) -> Iterator[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/util.pyi0000664000175000017500000000351713577124116024626 0ustar davedave00000000000000import importlib.abc import importlib.machinery import sys import types from typing import Any, Callable, List, Optional, Union def module_for_loader( fxn: Callable[..., types.ModuleType] ) -> Callable[..., types.ModuleType]: ... def set_loader( fxn: Callable[..., types.ModuleType] ) -> Callable[..., types.ModuleType]: ... def set_package( fxn: Callable[..., types.ModuleType] ) -> Callable[..., types.ModuleType]: ... def resolve_name(name: str, package: str) -> str: ... MAGIC_NUMBER: bytes def cache_from_source(path: str, debug_override: Optional[bool] = ..., *, optimization: Optional[Any] = ...) -> str: ... def source_from_cache(path: str) -> str: ... def decode_source(source_bytes: bytes) -> str: ... def find_spec( name: str, package: Optional[str] = ... ) -> Optional[importlib.machinery.ModuleSpec]: ... def spec_from_loader( name: str, loader: Optional[importlib.abc.Loader], *, origin: Optional[str] = ..., loader_state: Optional[Any] = ..., is_package: Optional[bool] = ... ) -> importlib.machinery.ModuleSpec: ... if sys.version_info >= (3, 6): import os _Path = Union[str, bytes, os.PathLike] else: _Path = str def spec_from_file_location( name: str, location: _Path, *, loader: Optional[importlib.abc.Loader] = ..., submodule_search_locations: Optional[List[str]] = ... ) -> importlib.machinery.ModuleSpec: ... def module_from_spec(spec: importlib.machinery.ModuleSpec) -> types.ModuleType: ... class LazyLoader(importlib.abc.Loader): def __init__(self, loader: importlib.abc.Loader) -> None: ... @classmethod def factory(cls, loader: importlib.abc.Loader) -> Callable[..., LazyLoader]: ... def create_module(self, spec: importlib.machinery.ModuleSpec) -> Optional[types.ModuleType]: ... def exec_module(self, module: types.ModuleType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/resources.pyi0000664000175000017500000000176113577124116025662 0ustar davedave00000000000000import sys # This is a >=3.7 module, so we conditionally include its source. if sys.version_info >= (3, 7): import os from pathlib import Path from types import ModuleType from typing import ContextManager, Iterator, Union, BinaryIO, TextIO Package = Union[str, ModuleType] Resource = Union[str, os.PathLike] def open_binary(package: Package, resource: Resource) -> BinaryIO: ... def open_text(package: Package, resource: Resource, encoding: str = ..., errors: str = ...) -> TextIO: ... def read_binary(package: Package, resource: Resource) -> bytes: ... def read_text(package: Package, resource: Resource, encoding: str = ..., errors: str = ...) -> str: ... def path(package: Package, resource: Resource) -> ContextManager[Path]: ... def is_resource(package: Package, name: str) -> bool: ... def contents(package: Package) -> Iterator[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/metadata.pyi0000664000175000017500000000726713577124116025437 0ustar davedave00000000000000import abc import os import pathlib import sys from email.message import Message from importlib.abc import MetaPathFinder from pathlib import Path from typing import Any, Dict, Iterable, List, NamedTuple, Optional, Tuple, Union, overload if sys.version_info >= (3, 8): class PackageNotFoundError(ModuleNotFoundError): ... class EntryPointBase(NamedTuple): name: str value: str class EntryPoint(EntryPointBase): def load(self) -> Any: ... # Callable[[], Any] or an importable module @property def extras(self) -> List[str]: ... class PackagePath(pathlib.PurePosixPath): def read_text(self, encoding: str = ...) -> str: ... def read_binary(self) -> bytes: ... def locate(self) -> os.PathLike[str]: ... # The following attributes are not defined on PackagePath, but are dynamically added by Distribution.files: hash: Optional[FileHash] size: Optional[int] dist: Distribution class FileHash: mode: str value: str def __init__(self, spec: str) -> None: ... class Distribution: @abc.abstractmethod def read_text(self, filename: str) -> Optional[str]: ... @abc.abstractmethod def locate_file(self, path: Union[os.PathLike[str], str]) -> os.PathLike[str]: ... @classmethod def from_name(cls, name: str) -> Distribution: ... @overload @classmethod def discover(cls, *, context: DistributionFinder.Context) -> Iterable[Distribution]: ... @overload @classmethod def discover( cls, *, context: None = ..., name: Optional[str] = ..., path: List[str] = ..., **kwargs: Any ) -> Iterable[Distribution]: ... @staticmethod def at(path: Union[str, os.PathLike[str]]) -> PathDistribution: ... @property def metadata(self) -> Message: ... @property def version(self) -> str: ... @property def entry_points(self) -> List[EntryPoint]: ... @property def files(self) -> Optional[List[PackagePath]]: ... @property def requires(self) -> Optional[List[str]]: ... class DistributionFinder(MetaPathFinder): class Context: name: Optional[str] def __init__(self, *, name: Optional[str] = ..., path: List[str] = ..., **kwargs: Any) -> None: ... @property def path(self) -> List[str]: ... @property def pattern(self) -> str: ... @abc.abstractmethod def find_distributions(self, context: Context = ...) -> Iterable[Distribution]: ... class MetadataPathFinder(DistributionFinder): @classmethod def find_distributions(cls, context: DistributionFinder.Context = ...) -> Iterable[PathDistribution]: ... class PathDistribution(Distribution): def __init__(self, path: Path) -> None: ... def read_text(self, filename: Union[str, os.PathLike[str]]) -> str: ... def locate_file(self, path: Union[str, os.PathLike[str]]) -> os.PathLike[str]: ... def distribution(distribution_name: str) -> Distribution: ... @overload def distributions(*, context: DistributionFinder.Context) -> Iterable[Distribution]: ... @overload def distributions( *, context: None = ..., name: Optional[str] = ..., path: List[str] = ..., **kwargs: Any ) -> Iterable[Distribution]: ... def metadata(distribution_name: str) -> Message: ... def version(distribution_name: str) -> str: ... def entry_points() -> Dict[str, Tuple[EntryPoint, ...]]: ... def files(distribution_name: str) -> Optional[List[PackagePath]]: ... def requires(distribution_name: str) -> Optional[List[str]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/importlib/machinery.pyi0000664000175000017500000000754013577124116025630 0ustar davedave00000000000000import importlib.abc import types from typing import Any, Callable, List, Optional, Sequence, Tuple # ModuleSpec is exported from this module, but for circular import # reasons exists in its own stub file (with Loader and ModuleType). from _importlib_modulespec import ModuleSpec as ModuleSpec # Exported class BuiltinImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader): # MetaPathFinder @classmethod def find_module( cls, fullname: str, path: Optional[Sequence[importlib.abc._Path]] ) -> Optional[importlib.abc.Loader]: ... @classmethod def find_spec(cls, fullname: str, path: Optional[Sequence[importlib.abc._Path]], target: Optional[types.ModuleType] = ...) -> Optional[ModuleSpec]: ... # InspectLoader @classmethod def is_package(cls, fullname: str) -> bool: ... @classmethod def load_module(cls, fullname: str) -> types.ModuleType: ... @classmethod def get_code(cls, fullname: str) -> None: ... @classmethod def get_source(cls, fullname: str) -> None: ... # Loader @staticmethod def module_repr(module: types.ModuleType) -> str: ... @classmethod def create_module(cls, spec: ModuleSpec) -> Optional[types.ModuleType]: ... @classmethod def exec_module(cls, module: types.ModuleType) -> None: ... class FrozenImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader): # MetaPathFinder @classmethod def find_module( cls, fullname: str, path: Optional[Sequence[importlib.abc._Path]] ) -> Optional[importlib.abc.Loader]: ... @classmethod def find_spec(cls, fullname: str, path: Optional[Sequence[importlib.abc._Path]], target: Optional[types.ModuleType] = ...) -> Optional[ModuleSpec]: ... # InspectLoader @classmethod def is_package(cls, fullname: str) -> bool: ... @classmethod def load_module(cls, fullname: str) -> types.ModuleType: ... @classmethod def get_code(cls, fullname: str) -> None: ... @classmethod def get_source(cls, fullname: str) -> None: ... # Loader @staticmethod def module_repr(module: types.ModuleType) -> str: ... @classmethod def create_module(cls, spec: ModuleSpec) -> Optional[types.ModuleType]: ... @staticmethod def exec_module(module: types.ModuleType) -> None: ... class WindowsRegistryFinder(importlib.abc.MetaPathFinder): @classmethod def find_module( cls, fullname: str, path: Optional[Sequence[importlib.abc._Path]] ) -> Optional[importlib.abc.Loader]: ... @classmethod def find_spec(cls, fullname: str, path: Optional[Sequence[importlib.abc._Path]], target: Optional[types.ModuleType] = ...) -> Optional[ModuleSpec]: ... class PathFinder(importlib.abc.MetaPathFinder): ... SOURCE_SUFFIXES: List[str] DEBUG_BYTECODE_SUFFIXES: List[str] OPTIMIZED_BYTECODE_SUFFIXES: List[str] BYTECODE_SUFFIXES: List[str] EXTENSION_SUFFIXES: List[str] def all_suffixes() -> List[str]: ... class FileFinder(importlib.abc.PathEntryFinder): path: str def __init__( self, path: str, *loader_details: Tuple[importlib.abc.Loader, List[str]] ) -> None: ... @classmethod def path_hook( cls, *loader_details: Tuple[importlib.abc.Loader, List[str]] ) -> Callable[[str], importlib.abc.PathEntryFinder]: ... class SourceFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader): ... class SourcelessFileLoader(importlib.abc.FileLoader, importlib.abc.SourceLoader): ... class ExtensionFileLoader(importlib.abc.ExecutionLoader): def get_filename(self, fullname: str) -> importlib.abc._Path: ... def get_source(self, fullname: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tempfile.pyi0000664000175000017500000001430313577124116023450 0ustar davedave00000000000000# Stubs for tempfile # Ron Murawski # based on http://docs.python.org/3.3/library/tempfile.html import os import sys from types import TracebackType from typing import Any, AnyStr, Generic, IO, Iterable, Iterator, List, Optional, overload, Tuple, Type, TypeVar, Union if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal # global variables TMP_MAX: int tempdir: Optional[str] template: str _S = TypeVar("_S") _T = TypeVar("_T") # for pytype, define typevar in same file as alias if sys.version_info >= (3, 6): _DirT = Union[_T, os.PathLike[_T]] else: _DirT = Union[_T] @overload def TemporaryFile( mode: Literal["r", "w", "a", "x", "r+", "w+", "a+", "x+", "rt", "wt", "at", "xt", "r+t", "w+t", "a+t", "x+t"], buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., ) -> IO[str]: ... @overload def TemporaryFile( mode: Literal["rb", "wb", "ab", "xb", "r+b", "w+b", "a+b", "x+b"] = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., ) -> IO[bytes]: ... @overload def TemporaryFile( mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., ) -> IO[Any]: ... @overload def NamedTemporaryFile( mode: Literal["r", "w", "a", "x", "r+", "w+", "a+", "x+", "rt", "wt", "at", "xt", "r+t", "w+t", "a+t", "x+t"], buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., delete: bool = ..., ) -> IO[str]: ... @overload def NamedTemporaryFile( mode: Literal["rb", "wb", "ab", "xb", "r+b", "w+b", "a+b", "x+b"] = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., delete: bool = ..., ) -> IO[bytes]: ... @overload def NamedTemporaryFile( mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., delete: bool = ..., ) -> IO[Any]: ... # It does not actually derive from IO[AnyStr], but it does implement the # protocol. class SpooledTemporaryFile(IO[AnyStr]): # bytes needs to go first, as default mode is to open as bytes @overload def __init__( self: SpooledTemporaryFile[bytes], max_size: int = ..., mode: Literal["rb", "wb", "ab", "xb", "r+b", "w+b", "a+b", "x+b"] = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[str] = ..., prefix: Optional[str] = ..., dir: Optional[str] = ..., ) -> None: ... @overload def __init__( self: SpooledTemporaryFile[str], max_size: int = ..., mode: Literal["r", "w", "a", "x", "r+", "w+", "a+", "x+", "rt", "wt", "at", "xt", "r+t", "w+t", "a+t", "x+t"] = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[str] = ..., prefix: Optional[str] = ..., dir: Optional[str] = ..., ) -> None: ... @overload def __init__( self, max_size: int = ..., mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., newline: Optional[str] = ..., suffix: Optional[str] = ..., prefix: Optional[str] = ..., dir: Optional[str] = ..., ) -> None: ... def rollover(self) -> None: ... def __enter__(self: _S) -> _S: ... def __exit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] ) -> Optional[bool]: ... # These methods are copied from the abstract methods of IO, because # SpooledTemporaryFile implements IO. # See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918. def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def read(self, n: int = ...) -> AnyStr: ... def readable(self) -> bool: ... def readline(self, limit: int = ...) -> AnyStr: ... def readlines(self, hint: int = ...) -> List[AnyStr]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... def write(self, s: AnyStr) -> int: ... def writelines(self, lines: Iterable[AnyStr]) -> None: ... def __next__(self) -> AnyStr: ... def __iter__(self) -> Iterator[AnyStr]: ... class TemporaryDirectory(Generic[AnyStr]): name: str def __init__( self, suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ... ) -> None: ... def cleanup(self) -> None: ... def __enter__(self) -> AnyStr: ... def __exit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType] ) -> None: ... def mkstemp( suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ..., text: bool = ... ) -> Tuple[int, AnyStr]: ... @overload def mkdtemp() -> str: ... @overload def mkdtemp(suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ...) -> AnyStr: ... def mktemp(suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ..., dir: Optional[_DirT[AnyStr]] = ...) -> AnyStr: ... def gettempdirb() -> bytes: ... def gettempprefixb() -> bytes: ... def gettempdir() -> str: ... def gettempprefix() -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tracemalloc.pyi0000664000175000017500000000414013577124116024127 0ustar davedave00000000000000# Stubs for tracemalloc (Python 3.4+) import sys from typing import List, Optional, Sequence, Tuple, Union, overload def clear_traces() -> None: ... def get_object_traceback(obj: object) -> Optional[Traceback]: ... def get_traceback_limit() -> int: ... def get_traced_memory() -> Tuple[int, int]: ... def get_tracemalloc_memory() -> int: ... def is_tracing() -> bool: ... def start(nframe: int = ...) -> None: ... def stop() -> None: ... def take_snapshot() -> Snapshot: ... if sys.version_info >= (3, 6): class DomainFilter: inclusive: bool domain: int def __init__(self, inclusive: bool, domain: int) -> None: ... class Filter: if sys.version_info >= (3, 6): domain: Optional[int] inclusive: bool lineno: Optional[int] filename_pattern: str all_frames: bool def __init__(self, inclusive: bool, filename_pattern: str, lineno: Optional[int] = ..., all_frames: bool = ..., domain: Optional[int] = ...) -> None: ... class Frame: filename: str lineno: int class Snapshot: def compare_to(self, old_snapshot: Snapshot, key_type: str, cumulative: bool = ...) -> List[StatisticDiff]: ... def dump(self, filename: str) -> None: ... if sys.version_info >= (3, 6): def filter_traces(self, filters: Sequence[Union[DomainFilter, Filter]]) -> Snapshot: ... else: def filter_traces(self, filters: Sequence[Filter]) -> Snapshot: ... @classmethod def load(cls, filename: str) -> Snapshot: ... def statistics(self, key_type: str, cumulative: bool = ...) -> List[Statistic]: ... traceback_limit: int traces: Sequence[Trace] class Statistic: count: int size: int traceback: Traceback class StatisticDiff: count: int count_diff: int size: int size_diff: int traceback: Traceback class Trace: size: int traceback: Traceback class Traceback(Sequence[Frame]): def format(self, limit: Optional[int] = ...) -> List[str]: ... @overload def __getitem__(self, i: int) -> Frame: ... @overload def __getitem__(self, s: slice) -> Sequence[Frame]: ... def __len__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_dummy_thread.pyi0000664000175000017500000000144013577124116024462 0ustar davedave00000000000000from typing import Any, Callable, Dict, NoReturn, Optional, Tuple TIMEOUT_MAX: int error = RuntimeError def start_new_thread(function: Callable[..., Any], args: Tuple[Any, ...], kwargs: Dict[str, Any] = ...) -> None: ... def exit() -> NoReturn: ... def get_ident() -> int: ... def allocate_lock() -> LockType: ... def stack_size(size: Optional[int] = ...) -> int: ... class LockType(object): locked_status: bool def __init__(self) -> None: ... def acquire(self, waitflag: Optional[bool] = ..., timeout: int = ...) -> bool: ... def __enter__(self, waitflag: Optional[bool] = ..., timeout: int = ...) -> bool: ... def __exit__(self, typ: Any, val: Any, tb: Any) -> None: ... def release(self) -> bool: ... def locked(self) -> bool: ... def interrupt_main() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/encodings/0000775000175000017500000000000013577125145023073 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/encodings/__init__.pyi0000664000175000017500000000011313577124116025345 0ustar davedave00000000000000import codecs def search_function(encoding: str) -> codecs.CodecInfo: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/encodings/utf_8.pyi0000664000175000017500000000107513577124116024643 0ustar davedave00000000000000import codecs from typing import Text, Tuple class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input: Text, final: bool = ...) -> bytes: ... class IncrementalDecoder(codecs.BufferedIncrementalDecoder): def _buffer_decode(self, input: bytes, errors: str, final: bool) -> Tuple[Text, int]: ... class StreamWriter(codecs.StreamWriter): ... class StreamReader(codecs.StreamReader): ... def getregentry() -> codecs.CodecInfo: ... def encode(input: Text, errors: Text = ...) -> bytes: ... def decode(input: bytes, errors: Text = ...) -> Text: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/textwrap.pyi0000664000175000017500000000660113577124116023523 0ustar davedave00000000000000from typing import Callable, List, Optional, Dict, Pattern class TextWrapper: width: int = ... initial_indent: str = ... subsequent_indent: str = ... expand_tabs: bool = ... replace_whitespace: bool = ... fix_sentence_endings: bool = ... drop_whitespace: bool = ... break_long_words: bool = ... break_on_hyphens: bool = ... tabsize: int = ... max_lines: Optional[int] = ... placeholder: str = ... # Attributes not present in documentation sentence_end_re: Pattern[str] = ... wordsep_re: Pattern[str] = ... wordsep_simple_re: Pattern[str] = ... whitespace_trans: str = ... unicode_whitespace_trans: Dict[int, int] = ... uspace: int = ... x: int = ... def __init__( self, width: int = ..., initial_indent: str = ..., subsequent_indent: str = ..., expand_tabs: bool = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., drop_whitespace: bool = ..., break_on_hyphens: bool = ..., tabsize: int = ..., *, max_lines: Optional[int] = ..., placeholder: str = ...) -> None: ... # Private methods *are* part of the documented API for subclasses. def _munge_whitespace(self, text: str) -> str: ... def _split(self, text: str) -> List[str]: ... def _fix_sentence_endings(self, chunks: List[str]) -> None: ... def _handle_long_word(self, reversed_chunks: List[str], cur_line: List[str], cur_len: int, width: int) -> None: ... def _wrap_chunks(self, chunks: List[str]) -> List[str]: ... def _split_chunks(self, text: str) -> List[str]: ... def wrap(self, text: str) -> List[str]: ... def fill(self, text: str) -> str: ... def wrap( text: str = ..., width: int = ..., *, initial_indent: str = ..., subsequent_indent: str = ..., expand_tabs: bool = ..., tabsize: int = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., break_on_hyphens: bool = ..., drop_whitespace: bool = ..., max_lines: int = ..., placeholder: str = ... ) -> List[str]: ... def fill( text: str, width: int = ..., *, initial_indent: str = ..., subsequent_indent: str = ..., expand_tabs: bool = ..., tabsize: int = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., break_on_hyphens: bool = ..., drop_whitespace: bool = ..., max_lines: int = ..., placeholder: str = ... ) -> str: ... def shorten( text: str, width: int, *, initial_indent: str = ..., subsequent_indent: str = ..., expand_tabs: bool = ..., tabsize: int = ..., replace_whitespace: bool = ..., fix_sentence_endings: bool = ..., break_long_words: bool = ..., break_on_hyphens: bool = ..., drop_whitespace: bool = ..., # Omit `max_lines: int = None`, it is forced to 1 here. placeholder: str = ... ) -> str: ... def dedent(text: str) -> str: ... def indent(text: str, prefix: str, predicate: Callable[[str], bool] = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/pathlib.pyi0000664000175000017500000001260413577124116023270 0ustar davedave00000000000000from typing import Any, Generator, IO, Optional, Sequence, Tuple, Type, TypeVar, Union, List from types import TracebackType import os import sys _P = TypeVar('_P', bound=PurePath) if sys.version_info >= (3, 6): _PurePathBase = os.PathLike[str] else: _PurePathBase = object class PurePath(_PurePathBase): parts: Tuple[str, ...] drive: str root: str anchor: str name: str suffix: str suffixes: List[str] stem: str if sys.version_info < (3, 5): def __init__(self, *pathsegments: str) -> None: ... elif sys.version_info < (3, 6): def __new__(cls: Type[_P], *args: Union[str, PurePath]) -> _P: ... else: def __new__(cls: Type[_P], *args: Union[str, os.PathLike[str]]) -> _P: ... def __hash__(self) -> int: ... def __lt__(self, other: PurePath) -> bool: ... def __le__(self, other: PurePath) -> bool: ... def __gt__(self, other: PurePath) -> bool: ... def __ge__(self, other: PurePath) -> bool: ... if sys.version_info < (3, 6): def __truediv__(self: _P, key: Union[str, PurePath]) -> _P: ... def __rtruediv__(self: _P, key: Union[str, PurePath]) -> _P: ... else: def __truediv__(self: _P, key: Union[str, os.PathLike[str]]) -> _P: ... def __rtruediv__(self: _P, key: Union[str, os.PathLike[str]]) -> _P: ... if sys.version_info < (3,): def __div__(self: _P, key: Union[str, PurePath]) -> _P: ... def __bytes__(self) -> bytes: ... def as_posix(self) -> str: ... def as_uri(self) -> str: ... def is_absolute(self) -> bool: ... def is_reserved(self) -> bool: ... def match(self, path_pattern: str) -> bool: ... if sys.version_info < (3, 6): def relative_to(self: _P, *other: Union[str, PurePath]) -> _P: ... else: def relative_to(self: _P, *other: Union[str, os.PathLike[str]]) -> _P: ... def with_name(self: _P, name: str) -> _P: ... def with_suffix(self: _P, suffix: str) -> _P: ... if sys.version_info < (3, 6): def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ... else: def joinpath(self: _P, *other: Union[str, os.PathLike[str]]) -> _P: ... @property def parents(self: _P) -> Sequence[_P]: ... @property def parent(self: _P) -> _P: ... class PurePosixPath(PurePath): ... class PureWindowsPath(PurePath): ... class Path(PurePath): def __enter__(self) -> Path: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType]) -> Optional[bool]: ... @classmethod def cwd(cls: Type[_P]) -> _P: ... def stat(self) -> os.stat_result: ... def chmod(self, mode: int) -> None: ... def exists(self) -> bool: ... def glob(self, pattern: str) -> Generator[Path, None, None]: ... def group(self) -> str: ... def is_dir(self) -> bool: ... def is_file(self) -> bool: ... def is_symlink(self) -> bool: ... def is_socket(self) -> bool: ... def is_fifo(self) -> bool: ... def is_block_device(self) -> bool: ... def is_char_device(self) -> bool: ... def iterdir(self) -> Generator[Path, None, None]: ... def lchmod(self, mode: int) -> None: ... def lstat(self) -> os.stat_result: ... if sys.version_info < (3, 5): def mkdir(self, mode: int = ..., parents: bool = ...) -> None: ... else: def mkdir(self, mode: int = ..., parents: bool = ..., exist_ok: bool = ...) -> None: ... def open(self, mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... def owner(self) -> str: ... def rename(self, target: Union[str, PurePath]) -> None: ... def replace(self, target: Union[str, PurePath]) -> None: ... if sys.version_info < (3, 6): def resolve(self: _P) -> _P: ... else: def resolve(self: _P, strict: bool = ...) -> _P: ... def rglob(self, pattern: str) -> Generator[Path, None, None]: ... def rmdir(self) -> None: ... def symlink_to(self, target: Union[str, Path], target_is_directory: bool = ...) -> None: ... def touch(self, mode: int = ..., exist_ok: bool = ...) -> None: ... def unlink(self) -> None: ... if sys.version_info >= (3, 5): @classmethod def home(cls: Type[_P]) -> _P: ... if sys.version_info < (3, 6): def __new__(cls: Type[_P], *args: Union[str, PurePath], **kwargs: Any) -> _P: ... else: def __new__(cls: Type[_P], *args: Union[str, os.PathLike[str]], **kwargs: Any) -> _P: ... def absolute(self: _P) -> _P: ... def expanduser(self: _P) -> _P: ... def read_bytes(self) -> bytes: ... def read_text(self, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> str: ... def samefile(self, other_path: Union[str, bytes, int, Path]) -> bool: ... def write_bytes(self, data: bytes) -> int: ... def write_text(self, data: str, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> int: ... if sys.version_info >= (3, 8): def link_to(self, target: Union[str, bytes, os.PathLike[str]]) -> None: ... class PosixPath(Path, PurePosixPath): ... class WindowsPath(Path, PureWindowsPath): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_compression.pyi0000664000175000017500000000066413577124116024350 0ustar davedave00000000000000from typing import Any import io BUFFER_SIZE: Any class BaseStream(io.BufferedIOBase): ... class DecompressReader(io.RawIOBase): def readable(self): ... def __init__(self, fp, decomp_factory, trailing_error=..., **decomp_args): ... def close(self): ... def seekable(self): ... def readinto(self, b): ... def read(self, size: int = ...): ... def seek(self, offset, whence=...): ... def tell(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/typing.pyi0000664000175000017500000005370713577124116023170 0ustar davedave00000000000000# Stubs for typing import sys from abc import abstractmethod, ABCMeta from types import CodeType, FrameType, TracebackType import collections # Needed by aliases like DefaultDict, see mypy issue 2986 # Definitions of special type checking related constructs. Their definitions # are not used, so their value does not matter. overload = object() Any = object() TypeVar = object() _promote = object() class _SpecialForm: def __getitem__(self, typeargs: Any) -> Any: ... Tuple: _SpecialForm = ... Generic: _SpecialForm = ... Protocol: _SpecialForm = ... Callable: _SpecialForm = ... Type: _SpecialForm = ... ClassVar: _SpecialForm = ... if sys.version_info >= (3, 8): Final: _SpecialForm = ... _F = TypeVar('_F', bound=Callable[..., Any]) def final(f: _F) -> _F: ... Literal: _SpecialForm = ... # TypedDict is a (non-subscriptable) special form. TypedDict: object class GenericMeta(type): ... # Return type that indicates a function does not return. # This type is equivalent to the None type, but the no-op Union is necessary to # distinguish the None type from the None value. NoReturn = Union[None] # These type variables are used by the container types. _T = TypeVar('_T') _S = TypeVar('_S') _KT = TypeVar('_KT') # Key type. _VT = TypeVar('_VT') # Value type. _T_co = TypeVar('_T_co', covariant=True) # Any type covariant containers. _V_co = TypeVar('_V_co', covariant=True) # Any type covariant containers. _KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers. _VT_co = TypeVar('_VT_co', covariant=True) # Value type covariant containers. _T_contra = TypeVar('_T_contra', contravariant=True) # Ditto contravariant. _TC = TypeVar('_TC', bound=Type[object]) _C = TypeVar("_C", bound=Callable[..., Any]) no_type_check = object() def no_type_check_decorator(decorator: _C) -> _C: ... # Type aliases and type constructors class TypeAlias: # Class for defining generic aliases for library types. def __init__(self, target_type: type) -> None: ... def __getitem__(self, typeargs: Any) -> Any: ... Union = TypeAlias(object) Optional = TypeAlias(object) List = TypeAlias(object) Dict = TypeAlias(object) DefaultDict = TypeAlias(object) Set = TypeAlias(object) FrozenSet = TypeAlias(object) Counter = TypeAlias(object) Deque = TypeAlias(object) ChainMap = TypeAlias(object) if sys.version_info >= (3, 7): OrderedDict = TypeAlias(object) # Predefined type variables. AnyStr = TypeVar('AnyStr', str, bytes) # Abstract base classes. def runtime_checkable(cls: _TC) -> _TC: ... @runtime_checkable class SupportsInt(Protocol, metaclass=ABCMeta): @abstractmethod def __int__(self) -> int: ... @runtime_checkable class SupportsFloat(Protocol, metaclass=ABCMeta): @abstractmethod def __float__(self) -> float: ... @runtime_checkable class SupportsComplex(Protocol, metaclass=ABCMeta): @abstractmethod def __complex__(self) -> complex: ... @runtime_checkable class SupportsBytes(Protocol, metaclass=ABCMeta): @abstractmethod def __bytes__(self) -> bytes: ... if sys.version_info >= (3, 8): @runtime_checkable class SupportsIndex(Protocol, metaclass=ABCMeta): @abstractmethod def __index__(self) -> int: ... @runtime_checkable class SupportsAbs(Protocol[_T_co]): @abstractmethod def __abs__(self) -> _T_co: ... @runtime_checkable class SupportsRound(Protocol[_T_co]): @overload @abstractmethod def __round__(self) -> int: ... @overload @abstractmethod def __round__(self, ndigits: int) -> _T_co: ... @runtime_checkable class Reversible(Protocol[_T_co]): @abstractmethod def __reversed__(self) -> Iterator[_T_co]: ... @runtime_checkable class Sized(Protocol, metaclass=ABCMeta): @abstractmethod def __len__(self) -> int: ... @runtime_checkable class Hashable(Protocol, metaclass=ABCMeta): # TODO: This is special, in that a subclass of a hashable class may not be hashable # (for example, list vs. object). It's not obvious how to represent this. This class # is currently mostly useless for static checking. @abstractmethod def __hash__(self) -> int: ... @runtime_checkable class Iterable(Protocol[_T_co]): @abstractmethod def __iter__(self) -> Iterator[_T_co]: ... @runtime_checkable class Iterator(Iterable[_T_co], Protocol[_T_co]): @abstractmethod def __next__(self) -> _T_co: ... def __iter__(self) -> Iterator[_T_co]: ... class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]): @abstractmethod def __next__(self) -> _T_co: ... @abstractmethod def send(self, value: _T_contra) -> _T_co: ... @abstractmethod def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ..., tb: Optional[TracebackType] = ...) -> _T_co: ... @abstractmethod def close(self) -> None: ... @abstractmethod def __iter__(self) -> Generator[_T_co, _T_contra, _V_co]: ... @property def gi_code(self) -> CodeType: ... @property def gi_frame(self) -> FrameType: ... @property def gi_running(self) -> bool: ... @property def gi_yieldfrom(self) -> Optional[Generator[Any, Any, Any]]: ... @runtime_checkable class Awaitable(Protocol[_T_co]): @abstractmethod def __await__(self) -> Generator[Any, None, _T_co]: ... class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]): @property def cr_await(self) -> Optional[Any]: ... @property def cr_code(self) -> CodeType: ... @property def cr_frame(self) -> FrameType: ... @property def cr_running(self) -> bool: ... @abstractmethod def send(self, value: _T_contra) -> _T_co: ... @abstractmethod def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ..., tb: Optional[TracebackType] = ...) -> _T_co: ... @abstractmethod def close(self) -> None: ... # NOTE: This type does not exist in typing.py or PEP 484. # The parameters correspond to Generator, but the 4th is the original type. class AwaitableGenerator(Awaitable[_V_co], Generator[_T_co, _T_contra, _V_co], Generic[_T_co, _T_contra, _V_co, _S], metaclass=ABCMeta): ... @runtime_checkable class AsyncIterable(Protocol[_T_co]): @abstractmethod def __aiter__(self) -> AsyncIterator[_T_co]: ... @runtime_checkable class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]): @abstractmethod def __anext__(self) -> Awaitable[_T_co]: ... def __aiter__(self) -> AsyncIterator[_T_co]: ... if sys.version_info >= (3, 6): class AsyncGenerator(AsyncIterator[_T_co], Generic[_T_co, _T_contra]): @abstractmethod def __anext__(self) -> Awaitable[_T_co]: ... @abstractmethod def asend(self, value: _T_contra) -> Awaitable[_T_co]: ... @abstractmethod def athrow(self, typ: Type[BaseException], val: Optional[BaseException] = ..., tb: Any = ...) -> Awaitable[_T_co]: ... @abstractmethod def aclose(self) -> Awaitable[None]: ... @abstractmethod def __aiter__(self) -> AsyncGenerator[_T_co, _T_contra]: ... @property def ag_await(self) -> Any: ... @property def ag_code(self) -> CodeType: ... @property def ag_frame(self) -> FrameType: ... @property def ag_running(self) -> bool: ... @runtime_checkable class Container(Protocol[_T_co]): @abstractmethod def __contains__(self, __x: object) -> bool: ... if sys.version_info >= (3, 6): @runtime_checkable class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]): # Implement Sized (but don't have it as a base class). @abstractmethod def __len__(self) -> int: ... _Collection = Collection else: @runtime_checkable class _Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]): # Implement Sized (but don't have it as a base class). @abstractmethod def __len__(self) -> int: ... class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]): @overload @abstractmethod def __getitem__(self, i: int) -> _T_co: ... @overload @abstractmethod def __getitem__(self, s: slice) -> Sequence[_T_co]: ... # Mixin methods def index(self, x: Any, start: int = ..., end: int = ...) -> int: ... def count(self, x: Any) -> int: ... def __contains__(self, x: object) -> bool: ... def __iter__(self) -> Iterator[_T_co]: ... def __reversed__(self) -> Iterator[_T_co]: ... class MutableSequence(Sequence[_T], Generic[_T]): @abstractmethod def insert(self, index: int, object: _T) -> None: ... @overload @abstractmethod def __getitem__(self, i: int) -> _T: ... @overload @abstractmethod def __getitem__(self, s: slice) -> MutableSequence[_T]: ... @overload @abstractmethod def __setitem__(self, i: int, o: _T) -> None: ... @overload @abstractmethod def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... @overload @abstractmethod def __delitem__(self, i: int) -> None: ... @overload @abstractmethod def __delitem__(self, i: slice) -> None: ... # Mixin methods def append(self, object: _T) -> None: ... def clear(self) -> None: ... def extend(self, iterable: Iterable[_T]) -> None: ... def reverse(self) -> None: ... def pop(self, index: int = ...) -> _T: ... def remove(self, object: _T) -> None: ... def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ... class AbstractSet(_Collection[_T_co], Generic[_T_co]): @abstractmethod def __contains__(self, x: object) -> bool: ... # Mixin methods def __le__(self, s: AbstractSet[Any]) -> bool: ... def __lt__(self, s: AbstractSet[Any]) -> bool: ... def __gt__(self, s: AbstractSet[Any]) -> bool: ... def __ge__(self, s: AbstractSet[Any]) -> bool: ... def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... def isdisjoint(self, s: Iterable[Any]) -> bool: ... class MutableSet(AbstractSet[_T], Generic[_T]): @abstractmethod def add(self, x: _T) -> None: ... @abstractmethod def discard(self, x: _T) -> None: ... # Mixin methods def clear(self) -> None: ... def pop(self) -> _T: ... def remove(self, element: _T) -> None: ... def __ior__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... def __iand__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... def __ixor__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... def __isub__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... class MappingView: def __len__(self) -> int: ... class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): def __and__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ... def __rand__(self, o: Iterable[_T]) -> Set[_T]: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... if sys.version_info >= (3, 8): def __reversed__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... def __or__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... def __ror__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... def __sub__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ... def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ... def __xor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... def __rxor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): def __and__(self, o: Iterable[Any]) -> Set[_KT_co]: ... def __rand__(self, o: Iterable[_T]) -> Set[_T]: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_KT_co]: ... if sys.version_info >= (3, 8): def __reversed__(self) -> Iterator[_KT_co]: ... def __or__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... def __ror__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... def __sub__(self, o: Iterable[Any]) -> Set[_KT_co]: ... def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ... def __xor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... def __rxor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_VT_co]: ... if sys.version_info >= (3, 8): def __reversed__(self) -> Iterator[_VT_co]: ... @runtime_checkable class ContextManager(Protocol[_T_co]): def __enter__(self) -> _T_co: ... def __exit__(self, __exc_type: Optional[Type[BaseException]], __exc_value: Optional[BaseException], __traceback: Optional[TracebackType]) -> Optional[bool]: ... @runtime_checkable class AsyncContextManager(Protocol[_T_co]): def __aenter__(self) -> Awaitable[_T_co]: ... def __aexit__( self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType], ) -> Awaitable[Optional[bool]]: ... class Mapping(_Collection[_KT], Generic[_KT, _VT_co]): # TODO: We wish the key type could also be covariant, but that doesn't work, # see discussion in https: //github.com/python/typing/pull/273. @abstractmethod def __getitem__(self, k: _KT) -> _VT_co: ... # Mixin methods @overload def get(self, k: _KT) -> Optional[_VT_co]: ... @overload def get(self, k: _KT, default: Union[_VT_co, _T]) -> Union[_VT_co, _T]: ... def items(self) -> AbstractSet[Tuple[_KT, _VT_co]]: ... def keys(self) -> AbstractSet[_KT]: ... def values(self) -> ValuesView[_VT_co]: ... def __contains__(self, o: object) -> bool: ... class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): @abstractmethod def __setitem__(self, k: _KT, v: _VT) -> None: ... @abstractmethod def __delitem__(self, v: _KT) -> None: ... def clear(self) -> None: ... @overload def pop(self, k: _KT) -> _VT: ... @overload def pop(self, k: _KT, default: Union[_VT, _T] = ...) -> Union[_VT, _T]: ... def popitem(self) -> Tuple[_KT, _VT]: ... def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... # 'update' used to take a Union, but using overloading is better. # The second overloaded type here is a bit too general, because # Mapping[Tuple[_KT, _VT], W] is a subclass of Iterable[Tuple[_KT, _VT]], # but will always have the behavior of the first overloaded type # at runtime, leading to keys of a mix of types _KT and Tuple[_KT, _VT]. # We don't currently have any way of forcing all Mappings to use # the first overload, but by using overloading rather than a Union, # mypy will commit to using the first overload when the argument is # known to be a Mapping with unknown type parameters, which is closer # to the behavior we want. See mypy issue #1430. @overload def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... @overload def update(self, **kwargs: _VT) -> None: ... Text = str TYPE_CHECKING = True class IO(Iterator[AnyStr], Generic[AnyStr]): # TODO detach # TODO use abstract properties @property def mode(self) -> str: ... @property def name(self) -> str: ... @abstractmethod def close(self) -> None: ... @property def closed(self) -> bool: ... @abstractmethod def fileno(self) -> int: ... @abstractmethod def flush(self) -> None: ... @abstractmethod def isatty(self) -> bool: ... # TODO what if n is None? @abstractmethod def read(self, n: int = ...) -> AnyStr: ... @abstractmethod def readable(self) -> bool: ... @abstractmethod def readline(self, limit: int = ...) -> AnyStr: ... @abstractmethod def readlines(self, hint: int = ...) -> list[AnyStr]: ... @abstractmethod def seek(self, offset: int, whence: int = ...) -> int: ... @abstractmethod def seekable(self) -> bool: ... @abstractmethod def tell(self) -> int: ... @abstractmethod def truncate(self, size: Optional[int] = ...) -> int: ... @abstractmethod def writable(self) -> bool: ... # TODO buffer objects @abstractmethod def write(self, s: AnyStr) -> int: ... @abstractmethod def writelines(self, lines: Iterable[AnyStr]) -> None: ... @abstractmethod def __next__(self) -> AnyStr: ... @abstractmethod def __iter__(self) -> Iterator[AnyStr]: ... @abstractmethod def __enter__(self) -> IO[AnyStr]: ... @abstractmethod def __exit__(self, t: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> Optional[bool]: ... class BinaryIO(IO[bytes]): # TODO readinto # TODO read1? # TODO peek? @overload @abstractmethod def write(self, s: bytearray) -> int: ... @overload @abstractmethod def write(self, s: bytes) -> int: ... @abstractmethod def __enter__(self) -> BinaryIO: ... class TextIO(IO[str]): # TODO use abstractproperty @property def buffer(self) -> BinaryIO: ... @property def encoding(self) -> str: ... @property def errors(self) -> Optional[str]: ... @property def line_buffering(self) -> int: ... # int on PyPy, bool on CPython @property def newlines(self) -> Any: ... # None, str or tuple @abstractmethod def __enter__(self) -> TextIO: ... class ByteString(Sequence[int], metaclass=ABCMeta): ... class Match(Generic[AnyStr]): pos: int endpos: int lastindex: Optional[int] lastgroup: Optional[AnyStr] string: AnyStr # The regular expression object whose match() or search() method produced # this match instance. re: Pattern[AnyStr] def expand(self, template: AnyStr) -> AnyStr: ... # TODO: The return for a group may be None, except if __group is 0 or not given. @overload def group(self, __group: Union[str, int] = ...) -> AnyStr: ... @overload def group( self, __group1: Union[str, int], __group2: Union[str, int], *groups: Union[str, int], ) -> Tuple[AnyStr, ...]: ... def groups(self, default: AnyStr = ...) -> Sequence[AnyStr]: ... def groupdict(self, default: AnyStr = ...) -> dict[str, AnyStr]: ... def start(self, group: Union[int, str] = ...) -> int: ... def end(self, group: Union[int, str] = ...) -> int: ... def span(self, group: Union[int, str] = ...) -> Tuple[int, int]: ... @property def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented if sys.version_info >= (3, 6): def __getitem__(self, g: Union[int, str]) -> AnyStr: ... class Pattern(Generic[AnyStr]): flags: int groupindex: Mapping[str, int] groups: int pattern: AnyStr def search(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... def match(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... # New in Python 3.4 def fullmatch(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... def split(self, string: AnyStr, maxsplit: int = ...) -> list[AnyStr]: ... def findall(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> list[Any]: ... def finditer(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Iterator[Match[AnyStr]]: ... @overload def sub(self, repl: AnyStr, string: AnyStr, count: int = ...) -> AnyStr: ... @overload def sub(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> AnyStr: ... @overload def subn(self, repl: AnyStr, string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... @overload def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... # Functions def get_type_hints( obj: Callable[..., Any], globalns: Optional[Dict[str, Any]] = ..., localns: Optional[Dict[str, Any]] = ..., ) -> Dict[str, Any]: ... if sys.version_info >= (3, 8): def get_origin(tp: Any) -> Optional[Any]: ... def get_args(tp: Any) -> Tuple[Any, ...]: ... @overload def cast(tp: Type[_T], obj: Any) -> _T: ... @overload def cast(tp: str, obj: Any) -> Any: ... # Type constructors # NamedTuple is special-cased in the type checker class NamedTuple(Tuple[Any, ...]): _field_types: collections.OrderedDict[str, Type[Any]] _field_defaults: Dict[str, Any] = ... _fields: Tuple[str, ...] _source: str def __init__(self, typename: str, fields: Iterable[Tuple[str, Any]] = ..., **kwargs: Any) -> None: ... @classmethod def _make(cls: Type[_T], iterable: Iterable[Any]) -> _T: ... if sys.version_info >= (3, 8): def _asdict(self) -> Dict[str, Any]: ... else: def _asdict(self) -> collections.OrderedDict[str, Any]: ... def _replace(self: _T, **kwargs: Any) -> _T: ... # Internal mypy fallback type for all typed dicts (does not exist at runtime) class _TypedDict(Mapping[str, object], metaclass=ABCMeta): def copy(self: _T) -> _T: ... # Using NoReturn so that only calls using mypy plugin hook that specialize the signature # can go through. def setdefault(self, k: NoReturn, default: object) -> object: ... # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. def pop(self, k: NoReturn, default: _T = ...) -> object: ... def update(self: _T, __m: _T) -> None: ... def __delitem__(self, k: NoReturn) -> None: ... def NewType(name: str, tp: Type[_T]) -> Type[_T]: ... # This itself is only available during type checking def type_check_only(func_or_cls: _C) -> _C: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/os/0000775000175000017500000000000013577125145021543 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/os/__init__.pyi0000664000175000017500000006300513577124116024026 0ustar davedave00000000000000# Stubs for os # Ron Murawski from io import TextIOWrapper as _TextIOWrapper from posix import listdir as listdir, times_result import sys from typing import ( Mapping, MutableMapping, Dict, List, Any, Tuple, Iterable, Iterator, NoReturn, overload, Union, AnyStr, Optional, Generic, Set, Callable, Text, Sequence, NamedTuple, TypeVar, ContextManager ) # Re-exported names from other modules. from builtins import OSError as error from . import path as path _T = TypeVar('_T') # ----- os variables ----- supports_bytes_environ: bool supports_dir_fd: Set[Callable[..., Any]] supports_fd: Set[Callable[..., Any]] supports_effective_ids: Set[Callable[..., Any]] supports_follow_symlinks: Set[Callable[..., Any]] if sys.platform != 'win32': # Unix only PRIO_PROCESS: int PRIO_PGRP: int PRIO_USER: int F_LOCK: int F_TLOCK: int F_ULOCK: int F_TEST: int POSIX_FADV_NORMAL: int POSIX_FADV_SEQUENTIAL: int POSIX_FADV_RANDOM: int POSIX_FADV_NOREUSE: int POSIX_FADV_WILLNEED: int POSIX_FADV_DONTNEED: int SF_NODISKIO: int SF_MNOWAIT: int SF_SYNC: int XATTR_SIZE_MAX: int # Linux only XATTR_CREATE: int # Linux only XATTR_REPLACE: int # Linux only P_PID: int P_PGID: int P_ALL: int WEXITED: int WSTOPPED: int WNOWAIT: int CLD_EXITED: int CLD_DUMPED: int CLD_TRAPPED: int CLD_CONTINUED: int SCHED_OTHER: int # some flavors of Unix SCHED_BATCH: int # some flavors of Unix SCHED_IDLE: int # some flavors of Unix SCHED_SPORADIC: int # some flavors of Unix SCHED_FIFO: int # some flavors of Unix SCHED_RR: int # some flavors of Unix SCHED_RESET_ON_FORK: int # some flavors of Unix RTLD_LAZY: int RTLD_NOW: int RTLD_GLOBAL: int RTLD_LOCAL: int RTLD_NODELETE: int RTLD_NOLOAD: int RTLD_DEEPBIND: int SEEK_SET: int SEEK_CUR: int SEEK_END: int if sys.platform != 'win32': SEEK_DATA: int # some flavors of Unix SEEK_HOLE: int # some flavors of Unix O_RDONLY: int O_WRONLY: int O_RDWR: int O_APPEND: int O_CREAT: int O_EXCL: int O_TRUNC: int # We don't use sys.platform for O_* flags to denote platform-dependent APIs because some codes, # including tests for mypy, use a more finer way than sys.platform before using these APIs # See https://github.com/python/typeshed/pull/2286 for discussions O_DSYNC: int # Unix only O_RSYNC: int # Unix only O_SYNC: int # Unix only O_NDELAY: int # Unix only O_NONBLOCK: int # Unix only O_NOCTTY: int # Unix only O_CLOEXEC: int # Unix only O_SHLOCK: int # Unix only O_EXLOCK: int # Unix only O_BINARY: int # Windows only O_NOINHERIT: int # Windows only O_SHORT_LIVED: int # Windows only O_TEMPORARY: int # Windows only O_RANDOM: int # Windows only O_SEQUENTIAL: int # Windows only O_TEXT: int # Windows only O_ASYNC: int # Gnu extension if in C library O_DIRECT: int # Gnu extension if in C library O_DIRECTORY: int # Gnu extension if in C library O_NOFOLLOW: int # Gnu extension if in C library O_NOATIME: int # Gnu extension if in C library O_PATH: int # Gnu extension if in C library O_TMPFILE: int # Gnu extension if in C library O_LARGEFILE: int # Gnu extension if in C library curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str linesep: str devnull: str name: str F_OK: int R_OK: int W_OK: int X_OK: int class _Environ(MutableMapping[AnyStr, AnyStr], Generic[AnyStr]): def copy(self) -> Dict[AnyStr, AnyStr]: ... def __delitem__(self, key: AnyStr) -> None: ... def __getitem__(self, key: AnyStr) -> AnyStr: ... def __setitem__(self, key: AnyStr, value: AnyStr) -> None: ... def __iter__(self) -> Iterator[AnyStr]: ... def __len__(self) -> int: ... environ: _Environ[str] environb: _Environ[bytes] if sys.platform != 'win32': confstr_names: Dict[str, int] pathconf_names: Dict[str, int] sysconf_names: Dict[str, int] EX_OK: int EX_USAGE: int EX_DATAERR: int EX_NOINPUT: int EX_NOUSER: int EX_NOHOST: int EX_UNAVAILABLE: int EX_SOFTWARE: int EX_OSERR: int EX_OSFILE: int EX_CANTCREAT: int EX_IOERR: int EX_TEMPFAIL: int EX_PROTOCOL: int EX_NOPERM: int EX_CONFIG: int EX_NOTFOUND: int P_NOWAIT: int P_NOWAITO: int P_WAIT: int if sys.platform == 'win32': P_DETACH: int P_OVERLAY: int # wait()/waitpid() options if sys.platform != 'win32': WNOHANG: int # Unix only WCONTINUED: int # some Unix systems WUNTRACED: int # Unix only TMP_MAX: int # Undocumented, but used by tempfile # ----- os classes (structures) ----- class stat_result: # For backward compatibility, the return value of stat() is also # accessible as a tuple of at least 10 integers giving the most important # (and portable) members of the stat structure, in the order st_mode, # st_ino, st_dev, st_nlink, st_uid, st_gid, st_size, st_atime, st_mtime, # st_ctime. More items may be added at the end by some implementations. st_mode: int # protection bits, st_ino: int # inode number, st_dev: int # device, st_nlink: int # number of hard links, st_uid: int # user id of owner, st_gid: int # group id of owner, st_size: int # size of file, in bytes, st_atime: float # time of most recent access, st_mtime: float # time of most recent content modification, st_ctime: float # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) st_atime_ns: int # time of most recent access, in nanoseconds st_mtime_ns: int # time of most recent content modification in nanoseconds st_ctime_ns: int # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) in nanoseconds if sys.version_info >= (3, 8) and sys.platform == "win32": st_reparse_tag: int def __getitem__(self, i: int) -> int: ... # not documented def __init__(self, tuple: Tuple[int, ...]) -> None: ... # On some Unix systems (such as Linux), the following attributes may also # be available: st_blocks: int # number of blocks allocated for file st_blksize: int # filesystem blocksize st_rdev: int # type of device if an inode device st_flags: int # user defined flags for file # On other Unix systems (such as FreeBSD), the following attributes may be # available (but may be only filled out if root tries to use them): st_gen: int # file generation number st_birthtime: int # time of file creation # On Mac OS systems, the following attributes may also be available: st_rsize: int st_creator: int st_type: int if sys.version_info >= (3, 6): from builtins import _PathLike as PathLike # See comment in builtins _PathType = path._PathType _FdOrPathType = Union[int, _PathType] if sys.version_info >= (3, 6): class DirEntry(PathLike[AnyStr]): # This is what the scandir interator yields # The constructor is hidden name: AnyStr path: AnyStr def inode(self) -> int: ... def is_dir(self, *, follow_symlinks: bool = ...) -> bool: ... def is_file(self, *, follow_symlinks: bool = ...) -> bool: ... def is_symlink(self) -> bool: ... def stat(self, *, follow_symlinks: bool = ...) -> stat_result: ... def __fspath__(self) -> AnyStr: ... else: class DirEntry(Generic[AnyStr]): # This is what the scandir interator yields # The constructor is hidden name: AnyStr path: AnyStr def inode(self) -> int: ... def is_dir(self, *, follow_symlinks: bool = ...) -> bool: ... def is_file(self, *, follow_symlinks: bool = ...) -> bool: ... def is_symlink(self) -> bool: ... def stat(self, *, follow_symlinks: bool = ...) -> stat_result: ... if sys.platform != 'win32': class statvfs_result: # Unix only f_bsize: int f_frsize: int f_blocks: int f_bfree: int f_bavail: int f_files: int f_ffree: int f_favail: int f_flag: int f_namemax: int # ----- os function stubs ----- if sys.version_info >= (3, 6): def fsencode(filename: Union[str, bytes, PathLike[Any]]) -> bytes: ... else: def fsencode(filename: Union[str, bytes]) -> bytes: ... if sys.version_info >= (3, 6): def fsdecode(filename: Union[str, bytes, PathLike[Any]]) -> str: ... else: def fsdecode(filename: Union[str, bytes]) -> str: ... if sys.version_info >= (3, 6): @overload def fspath(path: str) -> str: ... @overload def fspath(path: bytes) -> bytes: ... @overload def fspath(path: PathLike[Any]) -> Any: ... def get_exec_path(env: Optional[Mapping[str, str]] = ...) -> List[str]: ... # NOTE: get_exec_path(): returns List[bytes] when env not None def getlogin() -> str: ... def getpid() -> int: ... def getppid() -> int: ... def strerror(code: int) -> str: ... def umask(mask: int) -> int: ... if sys.platform != 'win32': # Unix only def ctermid() -> str: ... def getegid() -> int: ... def geteuid() -> int: ... def getgid() -> int: ... def getgrouplist(user: str, gid: int) -> List[int]: ... def getgroups() -> List[int]: ... # Unix only, behaves differently on Mac def initgroups(username: str, gid: int) -> None: ... def getpgid(pid: int) -> int: ... def getpgrp() -> int: ... def getpriority(which: int, who: int) -> int: ... def setpriority(which: int, who: int, priority: int) -> None: ... def getresuid() -> Tuple[int, int, int]: ... def getresgid() -> Tuple[int, int, int]: ... def getuid() -> int: ... def setegid(egid: int) -> None: ... def seteuid(euid: int) -> None: ... def setgid(gid: int) -> None: ... def setgroups(groups: Sequence[int]) -> None: ... def setpgrp() -> None: ... def setpgid(pid: int, pgrp: int) -> None: ... def setregid(rgid: int, egid: int) -> None: ... def setresgid(rgid: int, egid: int, sgid: int) -> None: ... def setresuid(ruid: int, euid: int, suid: int) -> None: ... def setreuid(ruid: int, euid: int) -> None: ... def getsid(pid: int) -> int: ... def setsid() -> None: ... def setuid(uid: int) -> None: ... from posix import uname_result def uname() -> uname_result: ... @overload def getenv(key: Text) -> Optional[str]: ... @overload def getenv(key: Text, default: _T) -> Union[str, _T]: ... def getenvb(key: bytes, default: bytes = ...) -> bytes: ... def putenv(key: Union[bytes, Text], value: Union[bytes, Text]) -> None: ... def unsetenv(key: Union[bytes, Text]) -> None: ... # Return IO or TextIO def fdopen(fd: int, mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: str = ..., newline: str = ..., closefd: bool = ...) -> Any: ... def close(fd: int) -> None: ... def closerange(fd_low: int, fd_high: int) -> None: ... def device_encoding(fd: int) -> Optional[str]: ... def dup(fd: int) -> int: ... if sys.version_info >= (3, 7): def dup2(fd: int, fd2: int, inheritable: bool = ...) -> int: ... else: def dup2(fd: int, fd2: int, inheritable: bool = ...) -> None: ... def fstat(fd: int) -> stat_result: ... def fsync(fd: int) -> None: ... def lseek(fd: int, pos: int, how: int) -> int: ... def open(file: _PathType, flags: int, mode: int = ..., *, dir_fd: Optional[int] = ...) -> int: ... def pipe() -> Tuple[int, int]: ... def read(fd: int, n: int) -> bytes: ... if sys.platform != 'win32': # Unix only def fchmod(fd: int, mode: int) -> None: ... def fchown(fd: int, uid: int, gid: int) -> None: ... def fdatasync(fd: int) -> None: ... # Unix only, not Mac def fpathconf(fd: int, name: Union[str, int]) -> int: ... def fstatvfs(fd: int) -> statvfs_result: ... def ftruncate(fd: int, length: int) -> None: ... def get_blocking(fd: int) -> bool: ... def set_blocking(fd: int, blocking: bool) -> None: ... def isatty(fd: int) -> bool: ... def lockf(__fd: int, __cmd: int, __length: int) -> None: ... def openpty() -> Tuple[int, int]: ... # some flavors of Unix def pipe2(flags: int) -> Tuple[int, int]: ... # some flavors of Unix def posix_fallocate(fd: int, offset: int, length: int) -> None: ... def posix_fadvise(fd: int, offset: int, length: int, advice: int) -> None: ... def pread(fd: int, buffersize: int, offset: int) -> bytes: ... def pwrite(fd: int, string: bytes, offset: int) -> int: ... @overload def sendfile(__out_fd: int, __in_fd: int, offset: Optional[int], count: int) -> int: ... @overload def sendfile(__out_fd: int, __in_fd: int, offset: int, count: int, headers: Sequence[bytes] = ..., trailers: Sequence[bytes] = ..., flags: int = ...) -> int: ... # FreeBSD and Mac OS X only def readv(fd: int, buffers: Sequence[bytearray]) -> int: ... def writev(fd: int, buffers: Sequence[bytes]) -> int: ... class terminal_size(Tuple[int, int]): columns: int lines: int def get_terminal_size(fd: int = ...) -> terminal_size: ... def get_inheritable(fd: int) -> bool: ... def set_inheritable(fd: int, inheritable: bool) -> None: ... if sys.platform != 'win32': # Unix only def tcgetpgrp(fd: int) -> int: ... def tcsetpgrp(fd: int, pg: int) -> None: ... def ttyname(fd: int) -> str: ... def write(fd: int, string: bytes) -> int: ... def access( path: _FdOrPathType, mode: int, *, dir_fd: Optional[int] = ..., effective_ids: bool = ..., follow_symlinks: bool = ..., ) -> bool: ... def chdir(path: _FdOrPathType) -> None: ... def fchdir(fd: int) -> None: ... def getcwd() -> str: ... def getcwdb() -> bytes: ... def chmod(path: _FdOrPathType, mode: int, *, dir_fd: Optional[int] = ..., follow_symlinks: bool = ...) -> None: ... if sys.platform != 'win32': def chflags(path: _PathType, flags: int, follow_symlinks: bool = ...) -> None: ... # some flavors of Unix def chown(path: _FdOrPathType, uid: int, gid: int, *, dir_fd: Optional[int] = ..., follow_symlinks: bool = ...) -> None: ... # Unix only if sys.platform != 'win32': # Unix only def chroot(path: _PathType) -> None: ... def lchflags(path: _PathType, flags: int) -> None: ... def lchmod(path: _PathType, mode: int) -> None: ... def lchown(path: _PathType, uid: int, gid: int) -> None: ... def link( src: _PathType, link_name: _PathType, *, src_dir_fd: Optional[int] = ..., dst_dir_fd: Optional[int] = ..., follow_symlinks: bool = ..., ) -> None: ... def lstat(path: _PathType, *, dir_fd: Optional[int] = ...) -> stat_result: ... def mkdir(path: _PathType, mode: int = ..., *, dir_fd: Optional[int] = ...) -> None: ... if sys.platform != 'win32': def mkfifo(path: _PathType, mode: int = ..., *, dir_fd: Optional[int] = ...) -> None: ... # Unix only def makedirs(name: _PathType, mode: int = ..., exist_ok: bool = ...) -> None: ... def mknod(path: _PathType, mode: int = ..., device: int = ..., *, dir_fd: Optional[int] = ...) -> None: ... def major(device: int) -> int: ... def minor(device: int) -> int: ... def makedev(major: int, minor: int) -> int: ... if sys.platform != 'win32': def pathconf(path: _FdOrPathType, name: Union[str, int]) -> int: ... # Unix only if sys.version_info >= (3, 6): def readlink(path: Union[AnyStr, PathLike[AnyStr]], *, dir_fd: Optional[int] = ...) -> AnyStr: ... else: def readlink(path: AnyStr, *, dir_fd: Optional[int] = ...) -> AnyStr: ... def remove(path: _PathType, *, dir_fd: Optional[int] = ...) -> None: ... def removedirs(name: _PathType) -> None: ... def rename(src: _PathType, dst: _PathType, *, src_dir_fd: Optional[int] = ..., dst_dir_fd: Optional[int] = ...) -> None: ... def renames(old: _PathType, new: _PathType) -> None: ... def replace(src: _PathType, dst: _PathType, *, src_dir_fd: Optional[int] = ..., dst_dir_fd: Optional[int] = ...) -> None: ... def rmdir(path: _PathType, *, dir_fd: Optional[int] = ...) -> None: ... if sys.version_info >= (3, 7): class _ScandirIterator(Iterator[DirEntry[AnyStr]], ContextManager[_ScandirIterator[AnyStr]]): def __next__(self) -> DirEntry[AnyStr]: ... def close(self) -> None: ... @overload def scandir() -> _ScandirIterator[str]: ... @overload def scandir(path: int) -> _ScandirIterator[str]: ... @overload def scandir(path: Union[AnyStr, PathLike[AnyStr]]) -> _ScandirIterator[AnyStr]: ... elif sys.version_info >= (3, 6): class _ScandirIterator(Iterator[DirEntry[AnyStr]], ContextManager[_ScandirIterator[AnyStr]]): def __next__(self) -> DirEntry[AnyStr]: ... def close(self) -> None: ... @overload def scandir() -> _ScandirIterator[str]: ... @overload def scandir(path: Union[AnyStr, PathLike[AnyStr]]) -> _ScandirIterator[AnyStr]: ... else: @overload def scandir() -> Iterator[DirEntry[str]]: ... @overload def scandir(path: AnyStr) -> Iterator[DirEntry[AnyStr]]: ... def stat(path: _FdOrPathType, *, dir_fd: Optional[int] = ..., follow_symlinks: bool = ...) -> stat_result: ... if sys.version_info < (3, 7): @overload def stat_float_times() -> bool: ... @overload def stat_float_times(__newvalue: bool) -> None: ... if sys.platform != 'win32': def statvfs(path: _FdOrPathType) -> statvfs_result: ... # Unix only def symlink( source: _PathType, link_name: _PathType, target_is_directory: bool = ..., *, dir_fd: Optional[int] = ..., ) -> None: ... if sys.platform != 'win32': def sync() -> None: ... # Unix only def truncate(path: _FdOrPathType, length: int) -> None: ... # Unix only up to version 3.4 def unlink(path: _PathType, *, dir_fd: Optional[int] = ...) -> None: ... def utime( path: _FdOrPathType, times: Optional[Union[Tuple[int, int], Tuple[float, float]]] = ..., *, ns: Tuple[int, int] = ..., dir_fd: Optional[int] = ..., follow_symlinks: bool = ..., ) -> None: ... _OnError = Callable[[OSError], Any] if sys.version_info >= (3, 6): def walk(top: Union[AnyStr, PathLike[AnyStr]], topdown: bool = ..., onerror: Optional[_OnError] = ..., followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], List[AnyStr]]]: ... else: def walk(top: AnyStr, topdown: bool = ..., onerror: Optional[_OnError] = ..., followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], List[AnyStr]]]: ... if sys.platform != 'win32': if sys.version_info >= (3, 7): @overload def fwalk(top: Union[str, PathLike[str]] = ..., topdown: bool = ..., onerror: Optional[_OnError] = ..., *, follow_symlinks: bool = ..., dir_fd: Optional[int] = ...) -> Iterator[Tuple[str, List[str], List[str], int]]: ... @overload def fwalk(top: bytes, topdown: bool = ..., onerror: Optional[_OnError] = ..., *, follow_symlinks: bool = ..., dir_fd: Optional[int] = ...) -> Iterator[Tuple[bytes, List[bytes], List[bytes], int]]: ... elif sys.version_info >= (3, 6): def fwalk(top: Union[str, PathLike[str]] = ..., topdown: bool = ..., onerror: Optional[_OnError] = ..., *, follow_symlinks: bool = ..., dir_fd: Optional[int] = ...) -> Iterator[Tuple[str, List[str], List[str], int]]: ... else: def fwalk(top: str = ..., topdown: bool = ..., onerror: Optional[_OnError] = ..., *, follow_symlinks: bool = ..., dir_fd: Optional[int] = ...) -> Iterator[Tuple[str, List[str], List[str], int]]: ... def getxattr(path: _FdOrPathType, attribute: _PathType, *, follow_symlinks: bool = ...) -> bytes: ... # Linux only def listxattr(path: _FdOrPathType, *, follow_symlinks: bool = ...) -> List[str]: ... # Linux only def removexattr(path: _FdOrPathType, attribute: _PathType, *, follow_symlinks: bool = ...) -> None: ... # Linux only def setxattr(path: _FdOrPathType, attribute: _PathType, value: bytes, flags: int = ..., *, follow_symlinks: bool = ...) -> None: ... # Linux only def abort() -> NoReturn: ... # These are defined as execl(file, *args) but the first *arg is mandatory. def execl(file: _PathType, __arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> NoReturn: ... def execlp(file: _PathType, __arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> NoReturn: ... # These are: execle(file, *args, env) but env is pulled from the last element of the args. def execle(file: _PathType, __arg0: Union[bytes, Text], *args: Any) -> NoReturn: ... def execlpe(file: _PathType, __arg0: Union[bytes, Text], *args: Any) -> NoReturn: ... # The docs say `args: tuple or list of strings` # The implementation enforces tuple or list so we can't use Sequence. _ExecVArgs = Union[Tuple[Union[bytes, Text], ...], List[bytes], List[Text], List[Union[bytes, Text]]] _ExecEnv = Union[Mapping[bytes, Union[bytes, str]], Mapping[str, Union[bytes, str]]] def execv(path: _PathType, args: _ExecVArgs) -> NoReturn: ... def execve(path: _FdOrPathType, args: _ExecVArgs, env: _ExecEnv) -> NoReturn: ... def execvp(file: _PathType, args: _ExecVArgs) -> NoReturn: ... def execvpe(file: _PathType, args: _ExecVArgs, env: _ExecEnv) -> NoReturn: ... def _exit(n: int) -> NoReturn: ... def kill(pid: int, sig: int) -> None: ... if sys.platform != 'win32': # Unix only def fork() -> int: ... def forkpty() -> Tuple[int, int]: ... # some flavors of Unix def killpg(pgid: int, sig: int) -> None: ... def nice(increment: int) -> int: ... def plock(op: int) -> None: ... # ???op is int? class _wrap_close(_TextIOWrapper): def close(self) -> Optional[int]: ... # type: ignore def popen(command: str, mode: str = ..., buffering: int = ...) -> _wrap_close: ... def spawnl(mode: int, path: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> int: ... def spawnle(mode: int, path: _PathType, arg0: Union[bytes, Text], *args: Any) -> int: ... # Imprecise sig def spawnv(mode: int, path: _PathType, args: List[Union[bytes, Text]]) -> int: ... def spawnve(mode: int, path: _PathType, args: List[Union[bytes, Text]], env: _ExecEnv) -> int: ... def system(command: _PathType) -> int: ... def times() -> times_result: ... def waitpid(pid: int, options: int) -> Tuple[int, int]: ... if sys.platform == 'win32': def startfile(path: _PathType, operation: Optional[str] = ...) -> None: ... else: # Unix only def spawnlp(mode: int, file: _PathType, arg0: Union[bytes, Text], *args: Union[bytes, Text]) -> int: ... def spawnlpe(mode: int, file: _PathType, arg0: Union[bytes, Text], *args: Any) -> int: ... # Imprecise signature def spawnvp(mode: int, file: _PathType, args: List[Union[bytes, Text]]) -> int: ... def spawnvpe(mode: int, file: _PathType, args: List[Union[bytes, Text]], env: _ExecEnv) -> int: ... def wait() -> Tuple[int, int]: ... # Unix only from posix import waitid_result def waitid(idtype: int, ident: int, options: int) -> waitid_result: ... def wait3(options: int) -> Tuple[int, int, Any]: ... def wait4(pid: int, options: int) -> Tuple[int, int, Any]: ... def WCOREDUMP(status: int) -> bool: ... def WIFCONTINUED(status: int) -> bool: ... def WIFSTOPPED(status: int) -> bool: ... def WIFSIGNALED(status: int) -> bool: ... def WIFEXITED(status: int) -> bool: ... def WEXITSTATUS(status: int) -> int: ... def WSTOPSIG(status: int) -> int: ... def WTERMSIG(status: int) -> int: ... if sys.platform != 'win32': from posix import sched_param def sched_get_priority_min(policy: int) -> int: ... # some flavors of Unix def sched_get_priority_max(policy: int) -> int: ... # some flavors of Unix def sched_setscheduler(pid: int, policy: int, param: sched_param) -> None: ... # some flavors of Unix def sched_getscheduler(pid: int) -> int: ... # some flavors of Unix def sched_setparam(pid: int, param: sched_param) -> None: ... # some flavors of Unix def sched_getparam(pid: int) -> sched_param: ... # some flavors of Unix def sched_rr_get_interval(pid: int) -> float: ... # some flavors of Unix def sched_yield() -> None: ... # some flavors of Unix def sched_setaffinity(pid: int, mask: Iterable[int]) -> None: ... # some flavors of Unix def sched_getaffinity(pid: int) -> Set[int]: ... # some flavors of Unix def cpu_count() -> Optional[int]: ... if sys.platform != 'win32': # Unix only def confstr(name: Union[str, int]) -> Optional[str]: ... def getloadavg() -> Tuple[float, float, float]: ... def sysconf(name: Union[str, int]) -> int: ... if sys.version_info >= (3, 6): def getrandom(size: int, flags: int = ...) -> bytes: ... def urandom(size: int) -> bytes: ... else: def urandom(n: int) -> bytes: ... if sys.version_info >= (3, 7): def register_at_fork(func: Callable[..., object], when: str) -> None: ... if sys.version_info >= (3, 8): if sys.platform == "win32": class _AddedDllDirectory: path: Optional[str] def close(self) -> None: ... def __enter__(self: _T) -> _T: ... def __exit__(self, *args: Any) -> None: ... def add_dll_directory(path: str) -> _AddedDllDirectory: ... if sys.platform == "linux": MFD_CLOEXEC: int MFD_ALLOW_SEALING: int MFD_HUGETLB: int MFD_HUGE_SHIFT: int MFD_HUGE_MASK: int MFD_HUGE_64KB: int MFD_HUGE_512KB: int MFD_HUGE_1MB: int MFD_HUGE_2MB: int MFD_HUGE_8MB: int MFD_HUGE_16MB: int MFD_HUGE_32MB: int MFD_HUGE_256MB: int MFD_HUGE_512MB: int MFD_HUGE_1GB: int MFD_HUGE_2GB: int MFD_HUGE_16GB: int def memfd_create(name: str, flags: int = ...) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/os/path.pyi0000664000175000017500000001412413577124116023221 0ustar davedave00000000000000# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! # Stubs for os.path # Ron Murawski import os import sys from typing import overload, List, Any, AnyStr, Sequence, Tuple, TypeVar, Union, Text, Callable, Optional _T = TypeVar('_T') if sys.version_info >= (3, 6): from builtins import _PathLike _PathType = Union[bytes, Text, _PathLike] _StrPath = Union[Text, _PathLike[Text]] _BytesPath = Union[bytes, _PathLike[bytes]] else: _PathType = Union[bytes, Text] _StrPath = Text _BytesPath = bytes # ----- os.path variables ----- supports_unicode_filenames: bool # aliases (also in os) curdir: str pardir: str sep: str if sys.platform == 'win32': altsep: str else: altsep: Optional[str] extsep: str pathsep: str defpath: str devnull: str # ----- os.path function stubs ----- if sys.version_info >= (3, 6): # Overloads are necessary to work around python/mypy#3644. @overload def abspath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def abspath(path: AnyStr) -> AnyStr: ... @overload def basename(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def basename(path: AnyStr) -> AnyStr: ... @overload def dirname(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def dirname(path: AnyStr) -> AnyStr: ... @overload def expanduser(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expanduser(path: AnyStr) -> AnyStr: ... @overload def expandvars(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def expandvars(path: AnyStr) -> AnyStr: ... @overload def normcase(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normcase(path: AnyStr) -> AnyStr: ... @overload def normpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': @overload def realpath(path: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(path: AnyStr) -> AnyStr: ... else: @overload def realpath(filename: _PathLike[AnyStr]) -> AnyStr: ... @overload def realpath(filename: AnyStr) -> AnyStr: ... else: def abspath(path: AnyStr) -> AnyStr: ... def basename(path: AnyStr) -> AnyStr: ... def dirname(path: AnyStr) -> AnyStr: ... def expanduser(path: AnyStr) -> AnyStr: ... def expandvars(path: AnyStr) -> AnyStr: ... def normcase(path: AnyStr) -> AnyStr: ... def normpath(path: AnyStr) -> AnyStr: ... if sys.platform == 'win32': def realpath(path: AnyStr) -> AnyStr: ... else: def realpath(filename: AnyStr) -> AnyStr: ... if sys.version_info >= (3, 6): # In reality it returns str for sequences of _StrPath and bytes for sequences # of _BytesPath, but mypy does not accept such a signature. def commonpath(paths: Sequence[_PathType]) -> Any: ... elif sys.version_info >= (3, 5): def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ... # NOTE: Empty lists results in '' (str) regardless of contained type. # Also, in Python 2 mixed sequences of Text and bytes results in either Text or bytes # So, fall back to Any def commonprefix(list: Sequence[_PathType]) -> Any: ... if sys.version_info >= (3, 3): def exists(path: Union[_PathType, int]) -> bool: ... else: def exists(path: _PathType) -> bool: ... def lexists(path: _PathType) -> bool: ... # These return float if os.stat_float_times() == True, # but int is a subclass of float. def getatime(path: _PathType) -> float: ... def getmtime(path: _PathType) -> float: ... def getctime(path: _PathType) -> float: ... def getsize(path: _PathType) -> int: ... def isabs(path: _PathType) -> bool: ... def isfile(path: _PathType) -> bool: ... def isdir(path: _PathType) -> bool: ... def islink(path: _PathType) -> bool: ... def ismount(path: _PathType) -> bool: ... if sys.version_info < (3, 0): # Make sure signatures are disjunct, and allow combinations of bytes and unicode. # (Since Python 2 allows that, too) # Note that e.g. os.path.join("a", "b", "c", "d", u"e") will still result in # a type error. @overload def join(__p1: bytes, *p: bytes) -> bytes: ... @overload def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ... @overload def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ... @overload def join(__p1: Text, *p: _PathType) -> Text: ... elif sys.version_info >= (3, 6): # Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway. @overload def join(path: _StrPath, *paths: _StrPath) -> Text: ... @overload def join(path: _BytesPath, *paths: _BytesPath) -> bytes: ... else: def join(path: AnyStr, *paths: AnyStr) -> AnyStr: ... @overload def relpath(path: _BytesPath, start: Optional[_BytesPath] = ...) -> bytes: ... @overload def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ... def samefile(path1: _PathType, path2: _PathType) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ... if sys.version_info >= (3, 6): @overload def split(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: _PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ... @overload def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... else: def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... if sys.platform == 'win32': def splitunc(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # deprecated if sys.version_info < (3,): def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/subprocess.pyi0000664000175000017500000013250213577124116024035 0ustar davedave00000000000000# Stubs for subprocess # Based on http://docs.python.org/3.6/library/subprocess.html import sys from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union, Type, Text, Generic, TypeVar, AnyStr, overload from types import TracebackType if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal # We prefer to annotate inputs to methods (eg subprocess.check_call) with these # union types. # For outputs we use laborious literal based overloads to try to determine # which specific return types to use, and prefer to fall back to Any when # this does not work, so the caller does not have to use an assertion to confirm # which type. # # For example: # # try: # x = subprocess.check_output(["ls", "-l"]) # reveal_type(x) # bytes, based on the overloads # except TimeoutError as e: # reveal_type(e.cmd) # Any, but morally is _CMD _FILE = Union[None, int, IO[Any]] _TXT = Union[bytes, Text] if sys.version_info >= (3, 6): from builtins import _PathLike _PATH = Union[bytes, Text, _PathLike] else: _PATH = Union[bytes, Text] # Python 3.6 does't support _CMD being a single PathLike. # See: https://bugs.python.org/issue31961 _CMD = Union[_TXT, Sequence[_PATH]] _ENV = Union[Mapping[bytes, _TXT], Mapping[Text, _TXT]] _S = TypeVar('_S') _T = TypeVar('_T') class CompletedProcess(Generic[_T]): # morally: _CMD args: Any returncode: int # These are really both Optional, but requiring checks would be tedious # and writing all the overloads would be horrific. stdout: _T stderr: _T def __init__(self, args: _CMD, returncode: int, stdout: Optional[_T] = ..., stderr: Optional[_T] = ...) -> None: ... def check_returncode(self) -> None: ... if sys.version_info >= (3, 7): # Nearly the same args as for 3.6, except for capture_output and text @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, capture_output: bool = ..., check: bool = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., input: Optional[str] = ..., text: Literal[True], timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, capture_output: bool = ..., check: bool = ..., encoding: str, errors: Optional[str] = ..., input: Optional[str] = ..., text: Optional[bool] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, capture_output: bool = ..., check: bool = ..., encoding: Optional[str] = ..., errors: str, input: Optional[str] = ..., text: Optional[bool] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., # where the *real* keyword only args start capture_output: bool = ..., check: bool = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., input: Optional[str] = ..., text: Optional[bool] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, capture_output: bool = ..., check: bool = ..., encoding: None = ..., errors: None = ..., input: Optional[bytes] = ..., text: Literal[None, False] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[bytes]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, capture_output: bool = ..., check: bool = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., input: Optional[_TXT] = ..., text: Optional[bool] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[Any]: ... elif sys.version_info >= (3, 6): # Nearly same args as Popen.__init__ except for timeout, input, and check @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, check: bool = ..., encoding: str, errors: Optional[str] = ..., input: Optional[str] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, check: bool = ..., encoding: Optional[str] = ..., errors: str, input: Optional[str] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., # where the *real* keyword only args start check: bool = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., input: Optional[str] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, check: bool = ..., encoding: None = ..., errors: None = ..., input: Optional[bytes] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[bytes]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, check: bool = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., input: Optional[_TXT] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[Any]: ... else: # Nearly same args as Popen.__init__ except for timeout, input, and check @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., # where the *real* keyword only args start check: bool = ..., input: Optional[str] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[str]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, check: bool = ..., input: Optional[bytes] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[bytes]: ... @overload def run( args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, check: bool = ..., input: Optional[_TXT] = ..., timeout: Optional[float] = ..., ) -> CompletedProcess[Any]: ... # Same args as Popen.__init__ def call(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., timeout: Optional[float] = ...) -> int: ... # Same args as Popen.__init__ def check_call(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stdout: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., timeout: Optional[float] = ...) -> int: ... if sys.version_info >= (3, 7): # 3.7 added text @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., text: Literal[True], ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: str, errors: Optional[str] = ..., text: Optional[bool] = ..., ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: str, text: Optional[bool] = ..., ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., # where the real keyword only ones start timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., text: Optional[bool] = ..., ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: None = ..., errors: None = ..., text: Literal[None, False] = ..., ) -> bytes: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., text: Optional[bool] = ..., ) -> Any: ... # morally: -> _TXT elif sys.version_info >= (3, 6): # 3.6 added encoding and errors @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: str, errors: Optional[str] = ..., ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: str, ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, universal_newlines: Literal[True], timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: None = ..., errors: None = ..., ) -> bytes: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, timeout: Optional[float] = ..., input: _TXT = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., ) -> Any: ... # morally: -> _TXT else: @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., timeout: Optional[float] = ..., input: _TXT = ..., *, universal_newlines: Literal[True], ) -> str: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., timeout: Optional[float] = ..., input: _TXT = ..., ) -> bytes: ... @overload def check_output(args: _CMD, bufsize: int = ..., executable: _PATH = ..., stdin: _FILE = ..., stderr: _FILE = ..., preexec_fn: Callable[[], Any] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Any = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., timeout: Optional[float] = ..., input: _TXT = ..., ) -> Any: ... # morally: -> _TXT PIPE: int STDOUT: int DEVNULL: int class SubprocessError(Exception): ... class TimeoutExpired(SubprocessError): def __init__(self, cmd: _CMD, timeout: float, output: Optional[_TXT] = ..., stderr: Optional[_TXT] = ...) -> None: ... # morally: _CMD cmd: Any timeout: float # morally: Optional[_TXT] output: Any stdout: Any stderr: Any class CalledProcessError(Exception): returncode: int # morally: _CMD cmd: Any # morally: Optional[_TXT] output: Any # morally: Optional[_TXT] stdout: Any stderr: Any def __init__(self, returncode: int, cmd: _CMD, output: Optional[_TXT] = ..., stderr: Optional[_TXT] = ...) -> None: ... class Popen(Generic[AnyStr]): args: _CMD stdin: IO[AnyStr] stdout: IO[AnyStr] stderr: IO[AnyStr] pid: int returncode: int # Technically it is wrong that Popen provides __new__ instead of __init__ # but this shouldn't come up hopefully? if sys.version_info >= (3, 7): # text is added in 3.7 @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, text: Optional[bool] = ..., encoding: str, errors: Optional[str] = ...) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, text: Optional[bool] = ..., encoding: Optional[str] = ..., errors: str) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., # where the *real* keyword only args start text: Optional[bool] = ..., encoding: Optional[str] = ..., errors: Optional[str] = ...) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, text: Literal[True], encoding: Optional[str] = ..., errors: Optional[str] = ...) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, text: Literal[None, False] = ..., encoding: None = ..., errors: None = ...) -> Popen[bytes]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, text: Optional[bool] = ..., encoding: Optional[str] = ..., errors: Optional[str] = ...) -> Popen[Any]: ... elif sys.version_info >= (3, 6): @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, encoding: str, errors: Optional[str] = ...) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, encoding: Optional[str] = ..., errors: str) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., # where the *real* keyword only args start encoding: Optional[str] = ..., errors: Optional[str] = ...) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: Literal[False] = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, encoding: None = ..., errors: None = ...) -> Popen[bytes]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ..., *, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> Popen[Any]: ... else: @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[True], startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ...) -> Popen[str]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., *, universal_newlines: Literal[False] = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ...) -> Popen[bytes]: ... @overload def __new__(cls, args: _CMD, bufsize: int = ..., executable: Optional[_PATH] = ..., stdin: Optional[_FILE] = ..., stdout: Optional[_FILE] = ..., stderr: Optional[_FILE] = ..., preexec_fn: Optional[Callable[[], Any]] = ..., close_fds: bool = ..., shell: bool = ..., cwd: Optional[_PATH] = ..., env: Optional[_ENV] = ..., universal_newlines: bool = ..., startupinfo: Optional[Any] = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Any = ...) -> Popen[Any]: ... def poll(self) -> int: ... def wait(self, timeout: Optional[float] = ...) -> int: ... # Return str/bytes def communicate(self, input: Optional[AnyStr] = ..., timeout: Optional[float] = ..., # morally this should be optional ) -> Tuple[AnyStr, AnyStr]: ... def send_signal(self, signal: int) -> None: ... def terminate(self) -> None: ... def kill(self) -> None: ... def __enter__(self: _S) -> _S: ... def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> None: ... # The result really is always a str. def getstatusoutput(cmd: _TXT) -> Tuple[int, str]: ... def getoutput(cmd: _TXT) -> str: ... def list2cmdline(seq: Sequence[str]) -> str: ... # undocumented if sys.platform == 'win32': class STARTUPINFO: if sys.version_info >= (3, 7): def __init__(self, *, dwFlags: int = ..., hStdInput: Optional[Any] = ..., hStdOutput: Optional[Any] = ..., hStdError: Optional[Any] = ..., wShowWindow: int = ..., lpAttributeList: Optional[Mapping[str, Any]] = ...) -> None: ... dwFlags: int hStdInput: Optional[Any] hStdOutput: Optional[Any] hStdError: Optional[Any] wShowWindow: int if sys.version_info >= (3, 7): lpAttributeList: Mapping[str, Any] STD_INPUT_HANDLE: Any STD_OUTPUT_HANDLE: Any STD_ERROR_HANDLE: Any SW_HIDE: int STARTF_USESTDHANDLES: int STARTF_USESHOWWINDOW: int CREATE_NEW_CONSOLE: int CREATE_NEW_PROCESS_GROUP: int if sys.version_info >= (3, 7): ABOVE_NORMAL_PRIORITY_CLASS: int BELOW_NORMAL_PRIORITY_CLASS: int HIGH_PRIORITY_CLASS: int IDLE_PRIORITY_CLASS: int NORMAL_PRIORITY_CLASS: int REALTIME_PRIORITY_CLASS: int CREATE_NO_WINDOW: int DETACHED_PROCESS: int CREATE_DEFAULT_ERROR_MODE: int CREATE_BREAKAWAY_FROM_JOB: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/html/0000775000175000017500000000000013577125145022066 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/html/__init__.pyi0000664000175000017500000000017213577124116024345 0ustar davedave00000000000000from typing import AnyStr def escape(s: AnyStr, quote: bool = ...) -> AnyStr: ... def unescape(s: AnyStr) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/html/parser.pyi0000664000175000017500000000201413577124116024077 0ustar davedave00000000000000from typing import List, Optional, Tuple from _markupbase import ParserBase class HTMLParser(ParserBase): def __init__(self, *, convert_charrefs: bool = ...) -> None: ... def feed(self, feed: str) -> None: ... def close(self) -> None: ... def reset(self) -> None: ... def getpos(self) -> Tuple[int, int]: ... def get_starttag_text(self) -> Optional[str]: ... def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: ... def handle_endtag(self, tag: str) -> None: ... def handle_startendtag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: ... def handle_data(self, data: str) -> None: ... def handle_entityref(self, name: str) -> None: ... def handle_charref(self, name: str) -> None: ... def handle_comment(self, data: str) -> None: ... def handle_decl(self, decl: str) -> None: ... def handle_pi(self, data: str) -> None: ... def unknown_decl(self, data: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/html/entities.pyi0000664000175000017500000000021013577124116024423 0ustar davedave00000000000000from typing import Dict name2codepoint: Dict[str, int] html5: Dict[str, str] codepoint2name: Dict[int, str] entitydefs: Dict[str, str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/symbol.pyi0000664000175000017500000000266413577124116023157 0ustar davedave00000000000000# Stubs for symbol (Python 3) import sys from typing import Dict single_input: int file_input: int eval_input: int decorator: int decorators: int decorated: int async_funcdef: int funcdef: int parameters: int typedargslist: int tfpdef: int varargslist: int vfpdef: int stmt: int simple_stmt: int small_stmt: int expr_stmt: int if sys.version_info >= (3, 6): annassign: int testlist_star_expr: int augassign: int del_stmt: int pass_stmt: int flow_stmt: int break_stmt: int continue_stmt: int return_stmt: int yield_stmt: int raise_stmt: int import_stmt: int import_name: int import_from: int import_as_name: int dotted_as_name: int import_as_names: int dotted_as_names: int dotted_name: int global_stmt: int nonlocal_stmt: int assert_stmt: int compound_stmt: int async_stmt: int if_stmt: int while_stmt: int for_stmt: int try_stmt: int with_stmt: int with_item: int except_clause: int suite: int test: int test_nocond: int lambdef: int lambdef_nocond: int or_test: int and_test: int not_test: int comparison: int comp_op: int star_expr: int expr: int xor_expr: int and_expr: int shift_expr: int arith_expr: int term: int factor: int power: int atom_expr: int atom: int testlist_comp: int trailer: int subscriptlist: int subscript: int sliceop: int exprlist: int testlist: int dictorsetmaker: int classdef: int arglist: int argument: int comp_iter: int comp_for: int comp_if: int encoding_decl: int yield_expr: int yield_arg: int sym_name: Dict[int, str] jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/shlex.pyi0000664000175000017500000000302013577124116022760 0ustar davedave00000000000000from typing import List, Tuple, Any, TextIO, Union, Optional, Iterable, TypeVar import sys def split(s: str, comments: bool = ..., posix: bool = ...) -> List[str]: ... if sys.version_info >= (3, 8): def join(split_command: Iterable[str]) -> str: ... def quote(s: str) -> str: ... _SLT = TypeVar('_SLT', bound=shlex) class shlex(Iterable[str]): commenters: str wordchars: str whitespace: str escape: str quotes: str escapedquotes: str whitespace_split: bool infile: str instream: TextIO source: str debug: int lineno: int token: str eof: str if sys.version_info >= (3, 6): punctuation_chars: str if sys.version_info >= (3, 6): def __init__(self, instream: Union[str, TextIO] = ..., infile: Optional[str] = ..., posix: bool = ..., punctuation_chars: Union[bool, str] = ...) -> None: ... else: def __init__(self, instream: Union[str, TextIO] = ..., infile: Optional[str] = ..., posix: bool = ...) -> None: ... def get_token(self) -> str: ... def push_token(self, tok: str) -> None: ... def read_token(self) -> str: ... def sourcehook(self, filename: str) -> Tuple[str, TextIO]: ... # TODO argument types def push_source(self, newstream: Any, newfile: Any = ...) -> None: ... def pop_source(self) -> None: ... def error_leader(self, infile: str = ..., lineno: int = ...) -> None: ... def __iter__(self: _SLT) -> _SLT: ... def __next__(self) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/signal.pyi0000664000175000017500000000645113577124116023125 0ustar davedave00000000000000"""Stub file for the 'signal' module.""" from enum import IntEnum from typing import Any, Callable, Tuple, Union, Optional, Iterable, Set from types import FrameType class ItimerError(IOError): ... ITIMER_PROF: int ITIMER_REAL: int ITIMER_VIRTUAL: int NSIG: int class Signals(IntEnum): SIGABRT: int SIGALRM: int SIGBREAK: int # Windows SIGBUS: int SIGCHLD: int SIGCLD: int SIGCONT: int SIGEMT: int SIGFPE: int SIGHUP: int SIGILL: int SIGINFO: int SIGINT: int SIGIO: int SIGIOT: int SIGKILL: int SIGPIPE: int SIGPOLL: int SIGPROF: int SIGPWR: int SIGQUIT: int SIGRTMAX: int SIGRTMIN: int SIGSEGV: int SIGSTOP: int SIGSYS: int SIGTERM: int SIGTRAP: int SIGTSTP: int SIGTTIN: int SIGTTOU: int SIGURG: int SIGUSR1: int SIGUSR2: int SIGVTALRM: int SIGWINCH: int SIGXCPU: int SIGXFSZ: int class Handlers(IntEnum): SIG_DFL: int SIG_IGN: int SIG_DFL = Handlers.SIG_DFL SIG_IGN = Handlers.SIG_IGN class Sigmasks(IntEnum): SIG_BLOCK: int SIG_UNBLOCK: int SIG_SETMASK: int SIG_BLOCK = Sigmasks.SIG_BLOCK SIG_UNBLOCK = Sigmasks.SIG_UNBLOCK SIG_SETMASK = Sigmasks.SIG_SETMASK _SIGNUM = Union[int, Signals] _HANDLER = Union[Callable[[Signals, FrameType], None], int, Handlers, None] SIGABRT: Signals SIGALRM: Signals SIGBREAK: Signals # Windows SIGBUS: Signals SIGCHLD: Signals SIGCLD: Signals SIGCONT: Signals SIGEMT: Signals SIGFPE: Signals SIGHUP: Signals SIGILL: Signals SIGINFO: Signals SIGINT: Signals SIGIO: Signals SIGIOT: Signals SIGKILL: Signals SIGPIPE: Signals SIGPOLL: Signals SIGPROF: Signals SIGPWR: Signals SIGQUIT: Signals SIGRTMAX: Signals SIGRTMIN: Signals SIGSEGV: Signals SIGSTOP: Signals SIGSYS: Signals SIGTERM: Signals SIGTRAP: Signals SIGTSTP: Signals SIGTTIN: Signals SIGTTOU: Signals SIGURG: Signals SIGUSR1: Signals SIGUSR2: Signals SIGVTALRM: Signals SIGWINCH: Signals SIGXCPU: Signals SIGXFSZ: Signals # Windows CTRL_C_EVENT: int CTRL_BREAK_EVENT: int class struct_siginfo(Tuple[int, int, int, int, int, int, int]): def __init__(self, sequence: Iterable[int]) -> None: ... @property def si_signo(self) -> int: ... @property def si_code(self) -> int: ... @property def si_errno(self) -> int: ... @property def si_pid(self) -> int: ... @property def si_uid(self) -> int: ... @property def si_status(self) -> int: ... @property def si_band(self) -> int: ... def alarm(time: int) -> int: ... def default_int_handler(signum: int, frame: FrameType) -> None: ... def getitimer(which: int) -> Tuple[float, float]: ... def getsignal(signalnum: _SIGNUM) -> _HANDLER: ... def pause() -> None: ... def pthread_kill(thread_id: int, signum: int) -> None: ... def pthread_sigmask(how: int, mask: Iterable[int]) -> Set[_SIGNUM]: ... def set_wakeup_fd(fd: int) -> int: ... def setitimer(which: int, seconds: float, interval: float = ...) -> Tuple[float, float]: ... def siginterrupt(signalnum: int, flag: bool) -> None: ... def signal(signalnum: _SIGNUM, handler: _HANDLER) -> _HANDLER: ... def sigpending() -> Any: ... def sigtimedwait(sigset: Iterable[int], timeout: float) -> Optional[struct_siginfo]: ... def sigwait(sigset: Iterable[int]) -> _SIGNUM: ... def sigwaitinfo(sigset: Iterable[int]) -> struct_siginfo: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_threading_local.pyi0000664000175000017500000000107213577124116025120 0ustar davedave00000000000000# Source: https://github.com/python/cpython/blob/master/Lib/_threading_local.py from typing import Any, Dict, Tuple from weakref import ReferenceType localdict = Dict[Any, Any] class _localimpl: key: str dicts: Dict[int, Tuple[ReferenceType[Any], localdict]] def __init__(self) -> None: ... def get_dict(self) -> localdict: ... def create_dict(self) -> localdict: ... class local: def __getattribute__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __delattr__(self, name: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/selectors.pyi0000664000175000017500000000703613577124116023653 0ustar davedave00000000000000# Stubs for selector # See https://docs.python.org/3/library/selectors.html from abc import ABCMeta, abstractmethod from typing import Any, List, Mapping, NamedTuple, Optional, Protocol, Tuple, Union class _HasFileno(Protocol): def fileno(self) -> int: ... # Type aliases added mainly to preserve some context _FileObject = Union[int, _HasFileno] _FileDescriptor = int _EventMask = int EVENT_READ: _EventMask EVENT_WRITE: _EventMask class SelectorKey(NamedTuple): fileobj: _FileObject fd: _FileDescriptor events: _EventMask data: Any class BaseSelector(metaclass=ABCMeta): @abstractmethod def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... @abstractmethod def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def modify(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... @abstractmethod def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def close(self) -> None: ... def get_key(self, fileobj: _FileObject) -> SelectorKey: ... @abstractmethod def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... def __enter__(self) -> BaseSelector: ... def __exit__(self, *args: Any) -> None: ... class SelectSelector(BaseSelector): def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... class PollSelector(BaseSelector): def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... class EpollSelector(BaseSelector): def fileno(self) -> int: ... def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... class DevpollSelector(BaseSelector): def fileno(self) -> int: ... def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... class KqueueSelector(BaseSelector): def fileno(self) -> int: ... def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... class DefaultSelector(BaseSelector): def register(self, fileobj: _FileObject, events: _EventMask, data: Any = ...) -> SelectorKey: ... def unregister(self, fileobj: _FileObject) -> SelectorKey: ... def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ... def get_map(self) -> Mapping[_FileObject, SelectorKey]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/reprlib.pyi0000664000175000017500000000235313577124116023304 0ustar davedave00000000000000# Stubs for reprlib (Python 3) from array import array from typing import Any, Callable, Deque, Dict, FrozenSet, List, Set, Tuple _ReprFunc = Callable[[Any], str] def recursive_repr(fillvalue: str = ...) -> Callable[[_ReprFunc], _ReprFunc]: ... class Repr: maxlevel: int maxdict: int maxlist: int maxtuple: int maxset: int maxfrozenset: int maxdeque: int maxarray: int maxlong: int maxstring: int maxother: int def __init__(self) -> None: ... def repr(self, x: Any) -> str: ... def repr1(self, x: Any, level: int) -> str: ... def repr_tuple(self, x: Tuple[Any, ...], level: int) -> str: ... def repr_list(self, x: List[Any], level: int) -> str: ... def repr_array(self, x: array[Any], level: int) -> str: ... def repr_set(self, x: Set[Any], level: int) -> str: ... def repr_frozenset(self, x: FrozenSet[Any], level: int) -> str: ... def repr_deque(self, x: Deque[Any], level: int) -> str: ... def repr_dict(self, x: Dict[Any, Any], level: int) -> str: ... def repr_str(self, x: str, level: int) -> str: ... def repr_int(self, x: int, level: int) -> str: ... def repr_instance(self, x: Any, level: int) -> str: ... aRepr: Repr def repr(x: object) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/posix.pyi0000664000175000017500000000427213577124116023011 0ustar davedave00000000000000# Stubs for posix # NOTE: These are incomplete! import sys from typing import List, NamedTuple, Optional, overload from os import stat_result as stat_result if sys.version_info >= (3, 6): from builtins import _PathLike # See comment in builtins class uname_result(NamedTuple): sysname: str nodename: str release: str version: str machine: str class times_result(NamedTuple): user: float system: float children_user: float children_system: float elapsed: float class waitid_result(NamedTuple): si_pid: int si_uid: int si_signo: int si_status: int si_code: int class sched_param(NamedTuple): sched_priority: int EX_CANTCREAT: int EX_CONFIG: int EX_DATAERR: int EX_IOERR: int EX_NOHOST: int EX_NOINPUT: int EX_NOPERM: int EX_NOTFOUND: int EX_NOUSER: int EX_OK: int EX_OSERR: int EX_OSFILE: int EX_PROTOCOL: int EX_SOFTWARE: int EX_TEMPFAIL: int EX_UNAVAILABLE: int EX_USAGE: int F_OK: int R_OK: int W_OK: int X_OK: int if sys.version_info >= (3, 6): GRND_NONBLOCK: int GRND_RANDOM: int NGROUPS_MAX: int O_APPEND: int O_ACCMODE: int O_ASYNC: int O_CREAT: int O_DIRECT: int O_DIRECTORY: int O_DSYNC: int O_EXCL: int O_LARGEFILE: int O_NDELAY: int O_NOATIME: int O_NOCTTY: int O_NOFOLLOW: int O_NONBLOCK: int O_RDONLY: int O_RDWR: int O_RSYNC: int O_SYNC: int O_TRUNC: int O_WRONLY: int ST_APPEND: int ST_MANDLOCK: int ST_NOATIME: int ST_NODEV: int ST_NODIRATIME: int ST_NOEXEC: int ST_NOSUID: int ST_RDONLY: int ST_RELATIME: int ST_SYNCHRONOUS: int ST_WRITE: int TMP_MAX: int WCONTINUED: int WCOREDUMP: int WEXITSTATUS: int WIFCONTINUED: int WIFEXITED: int WIFSIGNALED: int WIFSTOPPED: int WNOHANG: int WSTOPSIG: int WTERMSIG: int WUNTRACED: int if sys.version_info >= (3, 6): @overload def listdir(path: Optional[str] = ...) -> List[str]: ... @overload def listdir(path: bytes) -> List[bytes]: ... @overload def listdir(path: int) -> List[str]: ... @overload def listdir(path: _PathLike[str]) -> List[str]: ... else: @overload def listdir(path: Optional[str] = ...) -> List[str]: ... @overload def listdir(path: bytes) -> List[bytes]: ... @overload def listdir(path: int) -> List[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/configparser.pyi0000664000175000017500000002026713577124116024333 0ustar davedave00000000000000# Based on http://docs.python.org/3.5/library/configparser.html and on # reading configparser.py. import sys from typing import (AbstractSet, MutableMapping, Mapping, Dict, Sequence, List, Union, Iterable, Iterator, Callable, Any, IO, overload, Optional, Pattern, Type, TypeVar, ClassVar) # Types only used in type comments only from typing import Optional, Tuple # noqa if sys.version_info >= (3, 6): from os import PathLike # Internal type aliases _section = Mapping[str, str] _parser = MutableMapping[str, _section] _converter = Callable[[str], Any] _converters = Dict[str, _converter] _T = TypeVar('_T') if sys.version_info >= (3, 7): _Path = Union[str, bytes, PathLike[str]] elif sys.version_info >= (3, 6): _Path = Union[str, PathLike[str]] else: _Path = str DEFAULTSECT: str MAX_INTERPOLATION_DEPTH: int class Interpolation: def before_get(self, parser: _parser, section: str, option: str, value: str, defaults: _section) -> str: ... def before_set(self, parser: _parser, section: str, option: str, value: str) -> str: ... def before_read(self, parser: _parser, section: str, option: str, value: str) -> str: ... def before_write(self, parser: _parser, section: str, option: str, value: str) -> str: ... class BasicInterpolation(Interpolation): ... class ExtendedInterpolation(Interpolation): ... class LegacyInterpolation(Interpolation): ... class RawConfigParser(_parser): BOOLEAN_STATES: ClassVar[Mapping[str, bool]] = ... # Undocumented def __init__(self, defaults: Optional[_section] = ..., dict_type: Type[Mapping[str, str]] = ..., allow_no_value: bool = ..., *, delimiters: Sequence[str] = ..., comment_prefixes: Sequence[str] = ..., inline_comment_prefixes: Optional[Sequence[str]] = ..., strict: bool = ..., empty_lines_in_values: bool = ..., default_section: str = ..., interpolation: Optional[Interpolation] = ...) -> None: ... def __len__(self) -> int: ... def __getitem__(self, section: str) -> SectionProxy: ... def __setitem__(self, section: str, options: _section) -> None: ... def __delitem__(self, section: str) -> None: ... def __iter__(self) -> Iterator[str]: ... def defaults(self) -> _section: ... def sections(self) -> List[str]: ... def add_section(self, section: str) -> None: ... def has_section(self, section: str) -> bool: ... def options(self, section: str) -> List[str]: ... def has_option(self, section: str, option: str) -> bool: ... def read(self, filenames: Union[_Path, Iterable[_Path]], encoding: Optional[str] = ...) -> List[str]: ... def read_file(self, f: Iterable[str], source: Optional[str] = ...) -> None: ... def read_string(self, string: str, source: str = ...) -> None: ... def read_dict(self, dictionary: Mapping[str, Mapping[str, Any]], source: str = ...) -> None: ... def readfp(self, fp: Iterable[str], filename: Optional[str] = ...) -> None: ... # These get* methods are partially applied (with the same names) in # SectionProxy; the stubs should be kept updated together def getint(self, section: str, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: int = ...) -> int: ... def getfloat(self, section: str, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: float = ...) -> float: ... def getboolean(self, section: str, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: bool = ...) -> bool: ... def _get_conv(self, section: str, option: str, conv: Callable[[str], _T], *, raw: bool = ..., vars: Optional[_section] = ..., fallback: _T = ...) -> _T: ... # This is incompatible with MutableMapping so we ignore the type @overload # type: ignore def get(self, section: str, option: str, *, raw: bool = ..., vars: Optional[_section] = ...) -> str: ... @overload def get(self, section: str, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: _T) -> Union[str, _T]: ... @overload def items(self, *, raw: bool = ..., vars: Optional[_section] = ...) -> AbstractSet[Tuple[str, SectionProxy]]: ... @overload def items(self, section: str, raw: bool = ..., vars: Optional[_section] = ...) -> List[Tuple[str, str]]: ... def set(self, section: str, option: str, value: str) -> None: ... def write(self, fileobject: IO[str], space_around_delimiters: bool = ...) -> None: ... def remove_option(self, section: str, option: str) -> bool: ... def remove_section(self, section: str) -> bool: ... def optionxform(self, option: str) -> str: ... class ConfigParser(RawConfigParser): def __init__(self, defaults: Optional[_section] = ..., dict_type: Type[Mapping[str, str]] = ..., allow_no_value: bool = ..., delimiters: Sequence[str] = ..., comment_prefixes: Sequence[str] = ..., inline_comment_prefixes: Optional[Sequence[str]] = ..., strict: bool = ..., empty_lines_in_values: bool = ..., default_section: str = ..., interpolation: Optional[Interpolation] = ..., converters: _converters = ...) -> None: ... class SafeConfigParser(ConfigParser): ... class SectionProxy(MutableMapping[str, str]): def __init__(self, parser: RawConfigParser, name: str) -> None: ... def __getitem__(self, key: str) -> str: ... def __setitem__(self, key: str, value: str) -> None: ... def __delitem__(self, key: str) -> None: ... def __contains__(self, key: object) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[str]: ... @property def parser(self) -> RawConfigParser: ... @property def name(self) -> str: ... def get(self, option: str, fallback: Optional[str] = ..., *, raw: bool = ..., vars: Optional[_section] = ..., **kwargs: Any) -> str: ... # type: ignore # These are partially-applied version of the methods with the same names in # RawConfigParser; the stubs should be kept updated together def getint(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: int = ...) -> int: ... def getfloat(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: float = ...) -> float: ... def getboolean(self, option: str, *, raw: bool = ..., vars: Optional[_section] = ..., fallback: bool = ...) -> bool: ... # SectionProxy can have arbitrary attributes when custon converters are used def __getattr__(self, key: str) -> Callable[..., Any]: ... class ConverterMapping(MutableMapping[str, Optional[_converter]]): GETTERCRE: Pattern[Any] def __init__(self, parser: RawConfigParser) -> None: ... def __getitem__(self, key: str) -> _converter: ... def __setitem__(self, key: str, value: Optional[_converter]) -> None: ... def __delitem__(self, key: str) -> None: ... def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... class Error(Exception): ... class NoSectionError(Error): ... class DuplicateSectionError(Error): section: str source: Optional[str] lineno: Optional[int] class DuplicateOptionError(Error): section: str option: str source: Optional[str] lineno: Optional[int] class NoOptionError(Error): section: str option: str class InterpolationError(Error): section: str option: str class InterpolationDepthError(InterpolationError): ... class InterpolationMissingOptionError(InterpolationError): reference: str class InterpolationSyntaxError(InterpolationError): ... class ParsingError(Error): source: str errors: Sequence[Tuple[int, str]] class MissingSectionHeaderError(ParsingError): lineno: int line: str jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/nturl2path.pyi0000664000175000017500000000011413577124116023741 0ustar davedave00000000000000def url2pathname(url: str) -> str: ... def pathname2url(p: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/nntplib.pyi0000664000175000017500000001021013577124116023302 0ustar davedave00000000000000# Stubs for nntplib (Python 3) import datetime import socket import ssl from typing import Any, Dict, IO, Iterable, List, NamedTuple, Optional, Tuple, TypeVar, Union _SelfT = TypeVar('_SelfT', bound=_NNTPBase) _File = Union[IO[bytes], bytes, str, None] class NNTPError(Exception): response: str class NNTPReplyError(NNTPError): ... class NNTPTemporaryError(NNTPError): ... class NNTPPermanentError(NNTPError): ... class NNTPProtocolError(NNTPError): ... class NNTPDataError(NNTPError): ... NNTP_PORT: int NNTP_SSL_PORT: int class GroupInfo(NamedTuple): group: str last: str first: str flag: str class ArticleInfo(NamedTuple): number: int message_id: str lines: List[bytes] def decode_header(header_str: str) -> str: ... class _NNTPBase: encoding: str errors: str host: str file: IO[bytes] debugging: int welcome: str readermode_afterauth: bool tls_on: bool authenticated: bool nntp_implementation: str nntp_version: int def __init__(self, file: IO[bytes], host: str, readermode: Optional[bool] = ..., timeout: float = ...) -> None: ... def __enter__(self: _SelfT) -> _SelfT: ... def __exit__(self, *args: Any) -> None: ... def getwelcome(self) -> str: ... def getcapabilities(self) -> Dict[str, List[str]]: ... def set_debuglevel(self, level: int) -> None: ... def debug(self, level: int) -> None: ... def capabilities(self) -> Tuple[str, Dict[str, List[str]]]: ... def newgroups(self, date: Union[datetime.date, datetime.datetime], *, file: _File = ...) -> Tuple[str, List[str]]: ... def newnews(self, group: str, date: Union[datetime.date, datetime.datetime], *, file: _File = ...) -> Tuple[str, List[str]]: ... def list(self, group_pattern: Optional[str] = ..., *, file: _File = ...) -> Tuple[str, List[str]]: ... def description(self, group: str) -> str: ... def descriptions(self, group_pattern: str) -> Tuple[str, Dict[str, str]]: ... def group(self, name: str) -> Tuple[str, int, int, int, str]: ... def help(self, *, file: _File = ...) -> Tuple[str, List[str]]: ... def stat(self, message_spec: Any = ...) -> Tuple[str, int, str]: ... def next(self) -> Tuple[str, int, str]: ... def last(self) -> Tuple[str, int, str]: ... def head(self, message_spec: Any = ..., *, file: _File = ...) -> Tuple[str, ArticleInfo]: ... def body(self, message_spec: Any = ..., *, file: _File = ...) -> Tuple[str, ArticleInfo]: ... def article(self, message_spec: Any = ..., *, file: _File = ...) -> Tuple[str, ArticleInfo]: ... def slave(self) -> str: ... def xhdr(self, hdr: str, str: Any, *, file: _File = ...) -> Tuple[str, List[str]]: ... def xover(self, start: int, end: int, *, file: _File = ...) -> Tuple[str, List[Tuple[int, Dict[str, str]]]]: ... def over(self, message_spec: Union[None, str, List[Any], Tuple[Any, ...]], *, file: _File = ...) -> Tuple[str, List[Tuple[int, Dict[str, str]]]]: ... def xgtitle(self, group: str, *, file: _File = ...) -> Tuple[str, List[Tuple[str, str]]]: ... def xpath(self, id: Any) -> Tuple[str, str]: ... def date(self) -> Tuple[str, datetime.datetime]: ... def post(self, data: Union[bytes, Iterable[bytes]]) -> str: ... def ihave(self, message_id: Any, data: Union[bytes, Iterable[bytes]]) -> str: ... def quit(self) -> str: ... def login(self, user: Optional[str] = ..., password: Optional[str] = ..., usenetrc: bool = ...) -> None: ... def starttls(self, ssl_context: Optional[ssl.SSLContext] = ...) -> None: ... class NNTP(_NNTPBase): port: int sock: socket.socket def __init__(self, host: str, port: int = ..., user: Optional[str] = ..., password: Optional[str] = ..., readermode: Optional[bool] = ..., usenetrc: bool = ..., timeout: float = ...) -> None: ... class NNTP_SSL(_NNTPBase): sock: socket.socket def __init__(self, host: str, port: int = ..., user: Optional[str] = ..., password: Optional[str] = ..., ssl_context: Optional[ssl.SSLContext] = ..., readermode: Optional[bool] = ..., usenetrc: bool = ..., timeout: float = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/faulthandler.pyi0000664000175000017500000000124713577124116024317 0ustar davedave00000000000000import sys from typing import Union, Protocol class _HasFileno(Protocol): def fileno(self) -> int: ... _File = Union[_HasFileno, int] def cancel_dump_traceback_later() -> None: ... def disable() -> None: ... def dump_traceback(file: _File = ..., all_threads: bool = ...) -> None: ... def dump_traceback_later(timeout: float, repeat: bool = ..., file: _File = ..., exit: bool = ...) -> None: ... def enable(file: _File = ..., all_threads: bool = ...) -> None: ... def is_enabled() -> bool: ... if sys.platform != "win32": def register(signum: int, file: _File = ..., all_threads: bool = ..., chain: bool = ...) -> None: ... def unregister(signum: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/random.pyi0000664000175000017500000000663313577124116023132 0ustar davedave00000000000000# Stubs for random # Ron Murawski # Updated by Jukka Lehtosalo # based on http://docs.python.org/3.2/library/random.html # ----- random classes ----- import _random import sys from typing import Any, TypeVar, Sequence, List, Callable, AbstractSet, Union, Optional, Tuple _T = TypeVar('_T') class Random(_random.Random): def __init__(self, x: Any = ...) -> None: ... def seed(self, a: Any = ..., version: int = ...) -> None: ... def getstate(self) -> Tuple[Any, ...]: ... def setstate(self, state: Tuple[Any, ...]) -> None: ... def getrandbits(self, k: int) -> int: ... def randrange(self, start: int, stop: Union[int, None] = ..., step: int = ...) -> int: ... def randint(self, a: int, b: int) -> int: ... def choice(self, seq: Sequence[_T]) -> _T: ... if sys.version_info >= (3, 6): def choices(self, population: Sequence[_T], weights: Optional[Sequence[float]] = ..., *, cum_weights: Optional[Sequence[float]] = ..., k: int = ...) -> List[_T]: ... def shuffle(self, x: List[Any], random: Union[Callable[[], float], None] = ...) -> None: ... def sample(self, population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ... def random(self) -> float: ... def uniform(self, a: float, b: float) -> float: ... def triangular(self, low: float = ..., high: float = ..., mode: float = ...) -> float: ... def betavariate(self, alpha: float, beta: float) -> float: ... def expovariate(self, lambd: float) -> float: ... def gammavariate(self, alpha: float, beta: float) -> float: ... def gauss(self, mu: float, sigma: float) -> float: ... def lognormvariate(self, mu: float, sigma: float) -> float: ... def normalvariate(self, mu: float, sigma: float) -> float: ... def vonmisesvariate(self, mu: float, kappa: float) -> float: ... def paretovariate(self, alpha: float) -> float: ... def weibullvariate(self, alpha: float, beta: float) -> float: ... # SystemRandom is not implemented for all OS's; good on Windows & Linux class SystemRandom(Random): ... # ----- random function stubs ----- def seed(a: Any = ..., version: int = ...) -> None: ... def getstate() -> object: ... def setstate(state: object) -> None: ... def getrandbits(k: int) -> int: ... def randrange(start: int, stop: Union[None, int] = ..., step: int = ...) -> int: ... def randint(a: int, b: int) -> int: ... def choice(seq: Sequence[_T]) -> _T: ... if sys.version_info >= (3, 6): def choices(population: Sequence[_T], weights: Optional[Sequence[float]] = ..., *, cum_weights: Optional[Sequence[float]] = ..., k: int = ...) -> List[_T]: ... def shuffle(x: List[Any], random: Union[Callable[[], float], None] = ...) -> None: ... def sample(population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ... def random() -> float: ... def uniform(a: float, b: float) -> float: ... def triangular(low: float = ..., high: float = ..., mode: float = ...) -> float: ... def betavariate(alpha: float, beta: float) -> float: ... def expovariate(lambd: float) -> float: ... def gammavariate(alpha: float, beta: float) -> float: ... def gauss(mu: float, sigma: float) -> float: ... def lognormvariate(mu: float, sigma: float) -> float: ... def normalvariate(mu: float, sigma: float) -> float: ... def vonmisesvariate(mu: float, kappa: float) -> float: ... def paretovariate(alpha: float) -> float: ... def weibullvariate(alpha: float, beta: float) -> float: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/glob.pyi0000664000175000017500000000120013577124116022556 0ustar davedave00000000000000# Stubs for glob # Based on http://docs.python.org/3/library/glob.html from typing import List, Iterator, AnyStr, Union import sys if sys.version_info >= (3, 6): def glob0(dirname: AnyStr, pattern: AnyStr) -> List[AnyStr]: ... else: def glob0(dirname: AnyStr, basename: AnyStr) -> List[AnyStr]: ... def glob1(dirname: AnyStr, pattern: AnyStr) -> List[AnyStr]: ... def glob(pathname: AnyStr, *, recursive: bool = ...) -> List[AnyStr]: ... def iglob(pathname: AnyStr, *, recursive: bool = ...) -> Iterator[AnyStr]: ... def escape(pathname: AnyStr) -> AnyStr: ... def has_magic(s: Union[str, bytes]) -> bool: ... # undocumented jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_imp.pyi0000664000175000017500000000131513577124116022566 0ustar davedave00000000000000# Stubs for _imp (Python 3.6) import types from typing import Any, List from importlib.machinery import ModuleSpec def create_builtin(spec: ModuleSpec) -> types.ModuleType: ... def create_dynamic(spec: ModuleSpec, file: Any = ...) -> None: ... def acquire_lock() -> None: ... def exec_builtin(mod: types.ModuleType) -> int: ... def exec_dynamic(mod: types.ModuleType) -> int: ... def extension_suffixes() -> List[str]: ... def get_frozen_object(name: str) -> types.CodeType: ... def init_frozen(name: str) -> types.ModuleType: ... def is_builtin(name: str) -> int: ... def is_frozen(name: str) -> bool: ... def is_frozen_package(name: str) -> bool: ... def lock_held() -> bool: ... def release_lock() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/0000775000175000017500000000000013577125145023304 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/__init__.pyi0000664000175000017500000000000013577124116025551 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/futures/0000775000175000017500000000000013577125145025001 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/futures/__init__.pyi0000664000175000017500000000015413577124116027260 0ustar davedave00000000000000from ._base import * # noqa: F403 from .thread import * # noqa: F403 from .process import * # noqa: F403 jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/futures/_base.pyi0000664000175000017500000000752313577124116026601 0ustar davedave00000000000000import threading from logging import Logger from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Optional, Set, List from types import TracebackType import sys FIRST_COMPLETED: str FIRST_EXCEPTION: str ALL_COMPLETED: str PENDING: str RUNNING: str CANCELLED: str CANCELLED_AND_NOTIFIED: str FINISHED: str LOGGER: Logger class Error(Exception): ... class CancelledError(Error): ... class TimeoutError(Error): ... if sys.version_info >= (3, 7): class BrokenExecutor(RuntimeError): ... _T = TypeVar('_T') class Future(Generic[_T]): def __init__(self) -> None: ... def cancel(self) -> bool: ... def cancelled(self) -> bool: ... def running(self) -> bool: ... def done(self) -> bool: ... def add_done_callback(self, fn: Callable[[Future[_T]], Any]) -> None: ... def result(self, timeout: Optional[float] = ...) -> _T: ... def set_running_or_notify_cancel(self) -> bool: ... def set_result(self, result: _T) -> None: ... if sys.version_info >= (3,): def exception(self, timeout: Optional[float] = ...) -> Optional[BaseException]: ... def set_exception(self, exception: Optional[BaseException]) -> None: ... else: def exception(self, timeout: Optional[float] = ...) -> Any: ... def exception_info(self, timeout: Optional[float] = ...) -> Tuple[Any, Optional[TracebackType]]: ... def set_exception(self, exception: Any) -> None: ... def set_exception_info(self, exception: Any, traceback: Optional[TracebackType]) -> None: ... class Executor: def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ... if sys.version_info >= (3, 5): def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...) -> Iterator[_T]: ... else: def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,) -> Iterator[_T]: ... def shutdown(self, wait: bool = ...) -> None: ... def __enter__(self: _T) -> _T: ... def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Optional[bool]: ... def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ... def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]], Set[Future[_T]]]: ... class _Waiter: event: threading.Event finished_futures: List[Future[Any]] def __init__(self) -> None: ... def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _AsCompletedWaiter(_Waiter): lock: threading.Lock def __init__(self) -> None: ... def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _FirstCompletedWaiter(_Waiter): def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _AllCompletedWaiter(_Waiter): num_pending_calls: int stop_on_exception: bool lock: threading.Lock def __init__(self, num_pending_calls: int, stop_on_exception: bool) -> None: ... def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _AcquireFutures: futures: Iterable[Future[Any]] def __init__(self, futures: Iterable[Future[Any]]) -> None: ... def __enter__(self) -> None: ... def __exit__(self, *args: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/futures/process.pyi0000664000175000017500000000127313577124116027202 0ustar davedave00000000000000from typing import Any, Callable, Optional, Tuple from ._base import Executor import sys EXTRA_QUEUED_CALLS: Any if sys.version_info >= (3,): class BrokenProcessPool(RuntimeError): ... if sys.version_info >= (3, 7): from multiprocessing.context import BaseContext class ProcessPoolExecutor(Executor): def __init__(self, max_workers: Optional[int] = ..., mp_context: Optional[BaseContext] = ..., initializer: Optional[Callable[..., None]] = ..., initargs: Tuple[Any, ...] = ...) -> None: ... else: class ProcessPoolExecutor(Executor): def __init__(self, max_workers: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/concurrent/futures/thread.pyi0000664000175000017500000000221213577124116026765 0ustar davedave00000000000000from typing import Any, Callable, Iterable, Mapping, Optional, Tuple, TypeVar, Generic from ._base import Executor, Future import sys if sys.version_info >= (3, 7): from ._base import BrokenExecutor class BrokenThreadPool(BrokenExecutor): ... _S = TypeVar('_S') class ThreadPoolExecutor(Executor): if sys.version_info >= (3, 7): def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ..., initializer: Optional[Callable[..., None]] = ..., initargs: Tuple[Any, ...] = ...) -> None: ... elif sys.version_info >= (3, 6) or sys.version_info < (3,): def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ...) -> None: ... else: def __init__(self, max_workers: Optional[int] = ...) -> None: ... class _WorkItem(Generic[_S]): future: Future[_S] fn: Callable[..., _S] args: Iterable[Any] kwargs: Mapping[str, Any] def __init__(self, future: Future[_S], fn: Callable[..., _S], args: Iterable[Any], kwargs: Mapping[str, Any]) -> None: ... def run(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/compileall.pyi0000664000175000017500000000427513577124116023773 0ustar davedave00000000000000# Stubs for compileall (Python 3) import os import sys from typing import Any, Optional, Union, Pattern if sys.version_info < (3, 6): _Path = Union[str, bytes] _SuccessType = bool else: _Path = Union[str, bytes, os.PathLike] _SuccessType = int if sys.version_info >= (3, 7): from py_compile import PycInvalidationMode def compile_dir( dir: _Path, maxlevels: int = ..., ddir: Optional[_Path] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ..., legacy: bool = ..., optimize: int = ..., workers: int = ..., invalidation_mode: Optional[PycInvalidationMode] = ..., ) -> _SuccessType: ... def compile_file( fullname: _Path, ddir: Optional[_Path] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ..., legacy: bool = ..., optimize: int = ..., invalidation_mode: Optional[PycInvalidationMode] = ..., ) -> _SuccessType: ... def compile_path( skip_curdir: bool = ..., maxlevels: int = ..., force: bool = ..., quiet: int = ..., legacy: bool = ..., optimize: int = ..., invalidation_mode: Optional[PycInvalidationMode] = ..., ) -> _SuccessType: ... else: # rx can be any object with a 'search' method; once we have Protocols we can change the type def compile_dir( dir: _Path, maxlevels: int = ..., ddir: Optional[_Path] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ..., legacy: bool = ..., optimize: int = ..., workers: int = ..., ) -> _SuccessType: ... def compile_file( fullname: _Path, ddir: Optional[_Path] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ..., legacy: bool = ..., optimize: int = ..., ) -> _SuccessType: ... def compile_path( skip_curdir: bool = ..., maxlevels: int = ..., force: bool = ..., quiet: int = ..., legacy: bool = ..., optimize: int = ..., ) -> _SuccessType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/0000775000175000017500000000000013577125145023001 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/__init__.pyi0000664000175000017500000000201213577124116025253 0ustar davedave00000000000000# Stubs for unittest from typing import Iterable, List, Optional, Type, Union from types import ModuleType from unittest.async_case import * from unittest.case import * from unittest.loader import * from unittest.result import * from unittest.runner import * from unittest.signals import * from unittest.suite import * # not really documented class TestProgram: result: TestResult def runTests(self) -> None: ... # undocumented def main(module: Union[None, str, ModuleType] = ..., defaultTest: Union[str, Iterable[str], None] = ..., argv: Optional[List[str]] = ..., testRunner: Union[Type[TestRunner], TestRunner, None] = ..., testLoader: TestLoader = ..., exit: bool = ..., verbosity: int = ..., failfast: Optional[bool] = ..., catchbreak: Optional[bool] = ..., buffer: Optional[bool] = ..., warnings: Optional[str] = ...) -> TestProgram: ... def load_tests(loader: TestLoader, tests: TestSuite, pattern: Optional[str]) -> TestSuite: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/case.pyi0000664000175000017500000003131213577124116024434 0ustar davedave00000000000000import datetime import logging import sys import unittest.result from types import TracebackType from typing import ( Any, AnyStr, Callable, Container, ContextManager, Dict, FrozenSet, Generic, Iterable, List, Mapping, NoReturn, Optional, overload, Pattern, Sequence, Set, Tuple, Type, TypeVar, Union, ) _E = TypeVar('_E', bound=BaseException) _FT = TypeVar('_FT', bound=Callable[..., Any]) if sys.version_info >= (3, 8): def addModuleCleanup(__function: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... def doModuleCleanups() -> None: ... def expectedFailure(func: _FT) -> _FT: ... def skip(reason: str) -> Callable[[_FT], _FT]: ... def skipIf(condition: object, reason: str) -> Callable[[_FT], _FT]: ... def skipUnless(condition: object, reason: str) -> Callable[[_FT], _FT]: ... class SkipTest(Exception): def __init__(self, reason: str) -> None: ... class TestCase: failureException: Type[BaseException] longMessage: bool maxDiff: Optional[int] # undocumented _testMethodName: str # undocumented _testMethodDoc: str def __init__(self, methodName: str = ...) -> None: ... def setUp(self) -> None: ... def tearDown(self) -> None: ... @classmethod def setUpClass(cls) -> None: ... @classmethod def tearDownClass(cls) -> None: ... def run(self, result: Optional[unittest.result.TestResult] = ...) -> Optional[unittest.result.TestResult]: ... def __call__(self, result: Optional[unittest.result.TestResult] = ...) -> Optional[unittest.result.TestResult]: ... def skipTest(self, reason: Any) -> None: ... def subTest(self, msg: Any = ..., **params: Any) -> ContextManager[None]: ... def debug(self) -> None: ... def _addSkip( self, result: unittest.result.TestResult, test_case: unittest.case.TestCase, reason: str ) -> None: ... def assertEqual(self, first: Any, second: Any, msg: Any = ...) -> None: ... def assertNotEqual(self, first: Any, second: Any, msg: Any = ...) -> None: ... def assertTrue(self, expr: Any, msg: Any = ...) -> None: ... def assertFalse(self, expr: Any, msg: Any = ...) -> None: ... def assertIs(self, expr1: Any, expr2: Any, msg: Any = ...) -> None: ... def assertIsNot(self, expr1: Any, expr2: Any, msg: Any = ...) -> None: ... def assertIsNone(self, obj: Any, msg: Any = ...) -> None: ... def assertIsNotNone(self, obj: Any, msg: Any = ...) -> None: ... def assertIn(self, member: Any, container: Union[Iterable[Any], Container[Any]], msg: Any = ...) -> None: ... def assertNotIn(self, member: Any, container: Union[Iterable[Any], Container[Any]], msg: Any = ...) -> None: ... def assertIsInstance(self, obj: Any, cls: Union[type, Tuple[type, ...]], msg: Any = ...) -> None: ... def assertNotIsInstance(self, obj: Any, cls: Union[type, Tuple[type, ...]], msg: Any = ...) -> None: ... def assertGreater(self, a: Any, b: Any, msg: Any = ...) -> None: ... def assertGreaterEqual(self, a: Any, b: Any, msg: Any = ...) -> None: ... def assertLess(self, a: Any, b: Any, msg: Any = ...) -> None: ... def assertLessEqual(self, a: Any, b: Any, msg: Any = ...) -> None: ... @overload def assertRaises(self, # type: ignore expected_exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]], callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertRaises(self, expected_exception: Union[Type[_E], Tuple[Type[_E], ...]], msg: Any = ...) -> _AssertRaisesContext[_E]: ... @overload def assertRaisesRegex(self, # type: ignore expected_exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]], expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]], callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertRaisesRegex(self, expected_exception: Union[Type[_E], Tuple[Type[_E], ...]], expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]], msg: Any = ...) -> _AssertRaisesContext[_E]: ... @overload def assertWarns(self, # type: ignore expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]], callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertWarns(self, expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]], msg: Any = ...) -> _AssertWarnsContext: ... @overload def assertWarnsRegex(self, # type: ignore expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]], expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]], callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertWarnsRegex(self, expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]], expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]], msg: Any = ...) -> _AssertWarnsContext: ... def assertLogs( self, logger: Optional[Union[str, logging.Logger]] = ..., level: Union[int, str, None] = ... ) -> _AssertLogsContext: ... @overload def assertAlmostEqual(self, first: float, second: float, places: int = ..., msg: Any = ..., delta: float = ...) -> None: ... @overload def assertAlmostEqual(self, first: datetime.datetime, second: datetime.datetime, places: int = ..., msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: float, second: float, *, msg: Any = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: float, second: float, *, msg: Any = ..., delta: float = ...) -> None: ... @overload def assertNotAlmostEqual(self, first: datetime.datetime, second: datetime.datetime, places: int = ..., msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... def assertRegex(self, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Any = ...) -> None: ... def assertNotRegex(self, text: AnyStr, unexpected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Any = ...) -> None: ... def assertCountEqual(self, first: Iterable[Any], second: Iterable[Any], msg: Any = ...) -> None: ... def addTypeEqualityFunc(self, typeobj: Type[Any], function: Callable[..., None]) -> None: ... def assertMultiLineEqual(self, first: str, second: str, msg: Any = ...) -> None: ... def assertSequenceEqual(self, seq1: Sequence[Any], seq2: Sequence[Any], msg: Any = ..., seq_type: Type[Sequence[Any]] = ...) -> None: ... def assertListEqual(self, list1: List[Any], list2: List[Any], msg: Any = ...) -> None: ... def assertTupleEqual(self, tuple1: Tuple[Any, ...], tuple2: Tuple[Any, ...], msg: Any = ...) -> None: ... def assertSetEqual(self, set1: Union[Set[Any], FrozenSet[Any]], set2: Union[Set[Any], FrozenSet[Any]], msg: Any = ...) -> None: ... def assertDictEqual(self, d1: Dict[Any, Any], d2: Dict[Any, Any], msg: Any = ...) -> None: ... def fail(self, msg: Any = ...) -> NoReturn: ... def countTestCases(self) -> int: ... def defaultTestResult(self) -> unittest.result.TestResult: ... def id(self) -> str: ... def shortDescription(self) -> Optional[str]: ... def addCleanup(self, function: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... def doCleanups(self) -> None: ... if sys.version_info >= (3, 8): @classmethod def addClassCleanup(cls, __function: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @classmethod def doClassCleanups(cls) -> None: ... def _formatMessage(self, msg: Optional[str], standardMsg: str) -> str: ... # undocumented def _getAssertEqualityFunc(self, first: Any, second: Any) -> Callable[..., None]: ... # undocumented # below is deprecated def failUnlessEqual(self, first: Any, second: Any, msg: Any = ...) -> None: ... def assertEquals(self, first: Any, second: Any, msg: Any = ...) -> None: ... def failIfEqual(self, first: Any, second: Any, msg: Any = ...) -> None: ... def assertNotEquals(self, first: Any, second: Any, msg: Any = ...) -> None: ... def failUnless(self, expr: bool, msg: Any = ...) -> None: ... def assert_(self, expr: bool, msg: Any = ...) -> None: ... def failIf(self, expr: bool, msg: Any = ...) -> None: ... @overload def failUnlessRaises(self, # type: ignore exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]], callable: Callable[..., Any] = ..., *args: Any, **kwargs: Any) -> None: ... @overload def failUnlessRaises(self, exception: Union[Type[_E], Tuple[Type[_E], ...]], msg: Any = ...) -> _AssertRaisesContext[_E]: ... def failUnlessAlmostEqual(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... def assertAlmostEquals(self, first: float, second: float, places: int = ..., msg: Any = ..., delta: float = ...) -> None: ... def failIfAlmostEqual(self, first: float, second: float, places: int = ..., msg: Any = ...) -> None: ... def assertNotAlmostEquals(self, first: float, second: float, places: int = ..., msg: Any = ..., delta: float = ...) -> None: ... def assertRegexpMatches(self, text: AnyStr, regex: Union[AnyStr, Pattern[AnyStr]], msg: Any = ...) -> None: ... @overload def assertRaisesRegexp(self, # type: ignore exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]], expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]], callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... @overload def assertRaisesRegexp(self, exception: Union[Type[_E], Tuple[Type[_E], ...]], expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]], msg: Any = ...) -> _AssertRaisesContext[_E]: ... def assertDictContainsSubset(self, expected: Mapping[Any, Any], actual: Mapping[Any, Any], msg: object = ...) -> None: ... class FunctionTestCase(TestCase): def __init__(self, testFunc: Callable[[], None], setUp: Optional[Callable[[], None]] = ..., tearDown: Optional[Callable[[], None]] = ..., description: Optional[str] = ...) -> None: ... class _AssertRaisesContext(Generic[_E]): exception: _E def __enter__(self) -> _AssertRaisesContext[_E]: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> bool: ... class _AssertWarnsContext: warning: Warning filename: str lineno: int def __enter__(self) -> _AssertWarnsContext: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ... class _AssertLogsContext: records: List[logging.LogRecord] output: List[str] def __enter__(self) -> _AssertLogsContext: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/signals.pyi0000664000175000017500000000060413577124116025161 0ustar davedave00000000000000from typing import Any, Callable, overload, TypeVar import unittest.result _F = TypeVar('_F', bound=Callable[..., Any]) def installHandler() -> None: ... def registerResult(result: unittest.result.TestResult) -> None: ... def removeResult(result: unittest.result.TestResult) -> bool: ... @overload def removeHandler() -> None: ... @overload def removeHandler(function: _F) -> _F: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/async_case.pyi0000664000175000017500000000056313577124116025635 0ustar davedave00000000000000import sys from typing import Any, Awaitable, Callable from .case import TestCase if sys.version_info >= (3, 8): class IsolatedAsyncioTestCase(TestCase): async def asyncSetUp(self) -> None: ... async def asyncTearDown(self) -> None: ... def addAsyncCleanup(self, __func: Callable[..., Awaitable[Any]], *args: Any, **kwargs: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/mock.pyi0000664000175000017500000001227013577124116024454 0ustar davedave00000000000000# Stubs for mock import sys from typing import Any, List, Optional, Text, Tuple, Type, TypeVar _T = TypeVar("_T") FILTER_DIR: Any class _slotted: ... class _SentinelObject: name: Any def __init__(self, name: Any) -> None: ... class _Sentinel: def __init__(self) -> None: ... def __getattr__(self, name: str) -> Any: ... sentinel: Any DEFAULT: Any class _CallList(List[_T]): def __contains__(self, value: Any) -> bool: ... class _MockIter: obj: Any def __init__(self, obj: Any) -> None: ... def __iter__(self) -> Any: ... def __next__(self) -> Any: ... class Base: def __init__(self, *args: Any, **kwargs: Any) -> None: ... # TODO: Defining this and other mock classes as classes in this stub causes # many false positives with mypy and production code. See if we can # improve mypy somehow and use a class with an "Any" base class. NonCallableMock = Any class CallableMixin(Base): side_effect: Any def __init__(self, spec: Optional[Any] = ..., side_effect: Optional[Any] = ..., return_value: Any = ..., wraps: Optional[Any] = ..., name: Optional[Any] = ..., spec_set: Optional[Any] = ..., parent: Optional[Any] = ..., _spec_state: Optional[Any] = ..., _new_name: Any = ..., _new_parent: Optional[Any] = ..., **kwargs: Any) -> None: ... def __call__(_mock_self, *args: Any, **kwargs: Any) -> Any: ... Mock = Any class _patch: attribute_name: Any getter: Any attribute: Any new: Any new_callable: Any spec: Any create: bool has_local: Any spec_set: Any autospec: Any kwargs: Any additional_patchers: Any def __init__(self, getter: Any, attribute: Any, new: Any, spec: Any, create: Any, spec_set: Any, autospec: Any, new_callable: Any, kwargs: Any) -> None: ... def copy(self) -> Any: ... def __call__(self, func: Any) -> Any: ... def decorate_class(self, klass: Any) -> Any: ... def decorate_callable(self, func: Any) -> Any: ... def get_original(self) -> Any: ... target: Any temp_original: Any is_local: Any def __enter__(self) -> Any: ... def __exit__(self, *exc_info: Any) -> Any: ... def start(self) -> Any: ... def stop(self) -> Any: ... class _patch_dict: in_dict: Any values: Any clear: Any def __init__(self, in_dict: Any, values: Any = ..., clear: Any = ..., **kwargs: Any) -> None: ... def __call__(self, f: Any) -> Any: ... def decorate_class(self, klass: Any) -> Any: ... def __enter__(self) -> Any: ... def __exit__(self, *args: Any) -> Any: ... start: Any stop: Any class _patcher: TEST_PREFIX: str dict: Type[_patch_dict] def __call__(self, target: Any, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ... def object(self, target: Any, attribute: Text, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ... def multiple(self, target: Any, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ... def stopall(self) -> None: ... patch: _patcher class MagicMixin: def __init__(self, *args: Any, **kw: Any) -> None: ... NonCallableMagicMock = Any MagicMock = Any if sys.version_info >= (3, 8): AsyncMock = Any class MagicProxy: name: Any parent: Any def __init__(self, name: Any, parent: Any) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def create_mock(self) -> Any: ... def __get__(self, obj: Any, _type: Optional[Any] = ...) -> Any: ... class _ANY: def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... ANY: Any class _Call(Tuple[Any, ...]): def __new__(cls, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> Any: ... name: Any parent: Any from_kall: Any def __init__(self, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> None: ... def __eq__(self, other: Any) -> bool: ... __ne__: Any def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __getattr__(self, attr: Any) -> Any: ... def count(self, *args: Any, **kwargs: Any) -> Any: ... def index(self, *args: Any, **kwargs: Any) -> Any: ... def call_list(self) -> Any: ... call: Any def create_autospec(spec: Any, spec_set: Any = ..., instance: Any = ..., _parent: Optional[Any] = ..., _name: Optional[Any] = ..., **kwargs: Any) -> Any: ... class _SpecState: spec: Any ids: Any spec_set: Any parent: Any instance: Any name: Any def __init__(self, spec: Any, spec_set: Any = ..., parent: Optional[Any] = ..., name: Optional[Any] = ..., ids: Optional[Any] = ..., instance: Any = ...) -> None: ... def mock_open(mock: Optional[Any] = ..., read_data: Any = ...) -> Any: ... PropertyMock = Any if sys.version_info >= (3, 7): def seal(mock: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/util.pyi0000664000175000017500000000163113577124116024477 0ustar davedave00000000000000# undocumented from typing import Any, List, Sequence, Tuple, TypeVar _T = TypeVar('_T') _Mismatch = Tuple[_T, _T, int] _MAX_LENGTH: int _PLACEHOLDER_LEN: int _MIN_BEGIN_LEN: int _MIN_END_LEN: int _MIN_COMMON_LEN: int _MIN_DIFF_LEN: int def _shorten(s: str, prefixlen: int, suffixlen: int) -> str: ... def _common_shorten_repr(*args: str) -> Tuple[str]: ... def safe_repr(obj: object, short: bool = ...) -> str: ... def strclass(cls: type) -> str: ... def sorted_list_difference(expected: Sequence[_T], actual: Sequence[_T]) -> Tuple[List[_T], List[_T]]: ... def unorderable_list_difference(expected: Sequence[_T], actual: Sequence[_T]) -> Tuple[List[_T], List[_T]]: ... def three_way_cmp(x: Any, y: Any) -> int: ... def _count_diff_all_purpose(actual: Sequence[_T], expected: Sequence[_T]) -> List[_Mismatch[_T]]: ... def _count_diff_hashable(actual: Sequence[_T], expected: Sequence[_T]) -> List[_Mismatch[_T]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/runner.pyi0000664000175000017500000000227213577124116025035 0ustar davedave00000000000000from typing import Callable, Optional, TextIO, Tuple, Type, Union import unittest.case import unittest.result import unittest.suite _ResultClassType = Callable[[TextIO, bool, int], unittest.result.TestResult] class TextTestResult(unittest.result.TestResult): separator1: str separator2: str def __init__(self, stream: TextIO, descriptions: bool, verbosity: int) -> None: ... def getDescription(self, test: unittest.case.TestCase) -> str: ... def printErrors(self) -> None: ... def printErrorList(self, flavour: str, errors: Tuple[unittest.case.TestCase, str]) -> None: ... class TestRunner: def run(self, test: Union[unittest.suite.TestSuite, unittest.case.TestCase]) -> unittest.result.TestResult: ... class TextTestRunner(TestRunner): def __init__( self, stream: Optional[TextIO] = ..., descriptions: bool = ..., verbosity: int = ..., failfast: bool = ..., buffer: bool = ..., resultclass: Optional[_ResultClassType] = ..., warnings: Optional[Type[Warning]] = ..., *, tb_locals: bool = ..., ) -> None: ... def _makeResult(self) -> unittest.result.TestResult: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/result.pyi0000664000175000017500000000312113577124116025034 0ustar davedave00000000000000from typing import List, Optional, Tuple, Type from types import TracebackType import unittest.case _SysExcInfoType = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] class TestResult: errors: List[Tuple[unittest.case.TestCase, str]] failures: List[Tuple[unittest.case.TestCase, str]] skipped: List[Tuple[unittest.case.TestCase, str]] expectedFailures: List[Tuple[unittest.case.TestCase, str]] unexpectedSuccesses: List[unittest.case.TestCase] shouldStop: bool testsRun: int buffer: bool failfast: bool tb_locals: bool def wasSuccessful(self) -> bool: ... def stop(self) -> None: ... def startTest(self, test: unittest.case.TestCase) -> None: ... def stopTest(self, test: unittest.case.TestCase) -> None: ... def startTestRun(self) -> None: ... def stopTestRun(self) -> None: ... def addError(self, test: unittest.case.TestCase, err: _SysExcInfoType) -> None: ... def addFailure(self, test: unittest.case.TestCase, err: _SysExcInfoType) -> None: ... def addSuccess(self, test: unittest.case.TestCase) -> None: ... def addSkip(self, test: unittest.case.TestCase, reason: str) -> None: ... def addExpectedFailure(self, test: unittest.case.TestCase, err: _SysExcInfoType) -> None: ... def addUnexpectedSuccess(self, test: unittest.case.TestCase) -> None: ... def addSubTest(self, test: unittest.case.TestCase, subtest: unittest.case.TestCase, outcome: Optional[_SysExcInfoType]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/loader.pyi0000664000175000017500000000230613577124116024770 0ustar davedave00000000000000import unittest.case import unittest.suite import unittest.result from types import ModuleType from typing import Any, Callable, List, Optional, Sequence, Type class TestLoader: errors: List[Type[BaseException]] testMethodPrefix: str sortTestMethodsUsing: Callable[[str, str], bool] suiteClass: Callable[[List[unittest.case.TestCase]], unittest.suite.TestSuite] def loadTestsFromTestCase(self, testCaseClass: Type[unittest.case.TestCase]) -> unittest.suite.TestSuite: ... def loadTestsFromModule(self, module: ModuleType, *, pattern: Any = ...) -> unittest.suite.TestSuite: ... def loadTestsFromName(self, name: str, module: Optional[ModuleType] = ...) -> unittest.suite.TestSuite: ... def loadTestsFromNames(self, names: Sequence[str], module: Optional[ModuleType] = ...) -> unittest.suite.TestSuite: ... def getTestCaseNames(self, testCaseClass: Type[unittest.case.TestCase]) -> Sequence[str]: ... def discover(self, start_dir: str, pattern: str = ..., top_level_dir: Optional[str] = ...) -> unittest.suite.TestSuite: ... defaultTestLoader: TestLoader jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/unittest/suite.pyi0000664000175000017500000000142713577124116024656 0ustar davedave00000000000000from typing import Iterable, Iterator, List, Union import unittest.case import unittest.result _TestType = Union[unittest.case.TestCase, TestSuite] class BaseTestSuite(Iterable[_TestType]): _tests: List[unittest.case.TestCase] _removed_tests: int def __init__(self, tests: Iterable[_TestType] = ...) -> None: ... def __call__(self, result: unittest.result.TestResult) -> unittest.result.TestResult: ... def addTest(self, test: _TestType) -> None: ... def addTests(self, tests: Iterable[_TestType]) -> None: ... def run(self, result: unittest.result.TestResult) -> unittest.result.TestResult: ... def debug(self) -> None: ... def countTestCases(self) -> int: ... def __iter__(self) -> Iterator[_TestType]: ... class TestSuite(BaseTestSuite): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_stat.pyi0000664000175000017500000000230613577124116022755 0ustar davedave00000000000000"""Stub file for the '_stat' module.""" SF_APPEND: int SF_ARCHIVED: int SF_IMMUTABLE: int SF_NOUNLINK: int SF_SNAPSHOT: int ST_ATIME: int ST_CTIME: int ST_DEV: int ST_GID: int ST_INO: int ST_MODE: int ST_MTIME: int ST_NLINK: int ST_SIZE: int ST_UID: int S_ENFMT: int S_IEXEC: int S_IFBLK: int S_IFCHR: int S_IFDIR: int S_IFDOOR: int S_IFIFO: int S_IFLNK: int S_IFPORT: int S_IFREG: int S_IFSOCK: int S_IFWHT: int S_IREAD: int S_IRGRP: int S_IROTH: int S_IRUSR: int S_IRWXG: int S_IRWXO: int S_IRWXU: int S_ISGID: int S_ISUID: int S_ISVTX: int S_IWGRP: int S_IWOTH: int S_IWRITE: int S_IWUSR: int S_IXGRP: int S_IXOTH: int S_IXUSR: int UF_APPEND: int UF_COMPRESSED: int UF_HIDDEN: int UF_IMMUTABLE: int UF_NODUMP: int UF_NOUNLINK: int UF_OPAQUE: int def S_IMODE(mode: int) -> int: ... def S_IFMT(mode: int) -> int: ... def S_ISBLK(mode: int) -> bool: ... def S_ISCHR(mode: int) -> bool: ... def S_ISDIR(mode: int) -> bool: ... def S_ISDOOR(mode: int) -> bool: ... def S_ISFIFO(mode: int) -> bool: ... def S_ISLNK(mode: int) -> bool: ... def S_ISPORT(mode: int) -> bool: ... def S_ISREG(mode: int) -> bool: ... def S_ISSOCK(mode: int) -> bool: ... def S_ISWHT(mode: int) -> bool: ... def filemode(mode: int) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/heapq.pyi0000664000175000017500000000134113577124116022737 0ustar davedave00000000000000# Stubs for heapq # Based on http://docs.python.org/3.2/library/heapq.html from typing import TypeVar, List, Iterable, Any, Callable, Optional _T = TypeVar('_T') def heappush(heap: List[_T], item: _T) -> None: ... def heappop(heap: List[_T]) -> _T: ... def heappushpop(heap: List[_T], item: _T) -> _T: ... def heapify(x: List[_T]) -> None: ... def heapreplace(heap: List[_T], item: _T) -> _T: ... def merge(*iterables: Iterable[_T], key: Callable[[_T], Any] = ..., reverse: bool = ...) -> Iterable[_T]: ... def nlargest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], Any]] = ...) -> List[_T]: ... def nsmallest(n: int, iterable: Iterable[_T], key: Callable[[_T], Any] = ...) -> List[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/zipapp.pyi0000664000175000017500000000122713577124116023147 0ustar davedave00000000000000# Stubs for zipapp (Python 3.5+) from pathlib import Path import sys from typing import BinaryIO, Callable, Optional, Union _Path = Union[str, Path, BinaryIO] class ZipAppError(Exception): ... if sys.version_info >= (3, 7): def create_archive(source: _Path, target: Optional[_Path] = ..., interpreter: Optional[str] = ..., main: Optional[str] = ..., filter: Optional[Callable[[Path], bool]] = ..., compressed: bool = ...) -> None: ... else: def create_archive(source: _Path, target: Optional[_Path] = ..., interpreter: Optional[str] = ..., main: Optional[str] = ...) -> None: ... def get_interpreter(archive: _Path) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/msvcrt.pyi0000664000175000017500000000022413577124116023156 0ustar davedave00000000000000# Stubs for msvcrt # NOTE: These are incomplete! def get_osfhandle(file: int) -> int: ... def open_osfhandle(handle: int, flags: int) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/abc.pyi0000664000175000017500000000114513577124116022370 0ustar davedave00000000000000from typing import Any, Callable, Type, TypeVar # Stubs for abc. _T = TypeVar('_T') _FuncT = TypeVar('_FuncT', bound=Callable[..., Any]) # Thesee definitions have special processing in mypy class ABCMeta(type): def register(cls: ABCMeta, subclass: Type[_T]) -> Type[_T]: ... def abstractmethod(callable: _FuncT) -> _FuncT: ... class abstractproperty(property): ... # These two are deprecated and not supported by mypy def abstractstaticmethod(callable: _FuncT) -> _FuncT: ... def abstractclassmethod(callable: _FuncT) -> _FuncT: ... class ABC(metaclass=ABCMeta): ... def get_cache_token() -> object: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/runpy.pyi0000664000175000017500000000126613577124116023024 0ustar davedave00000000000000from types import ModuleType from typing import Dict, Optional, Any class _TempModule: mod_name: str = ... module: ModuleType = ... def __init__(self, mod_name): ... def __enter__(self): ... def __exit__(self, *args): ... class _ModifiedArgv0: value: Any = ... def __init__(self, value): ... def __enter__(self): ... def __exit__(self, *args): ... def run_module(mod_name: str, init_globals: Optional[Dict[str, Any]] = ..., run_name: Optional[str] = ..., alter_sys: bool = ...): ... def run_path(path_name: str, init_globals: Optional[Dict[str, Any]] = ..., run_name: str = ...): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/collections/0000775000175000017500000000000013577125145023440 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/collections/__init__.pyi0000664000175000017500000003413713577124116025727 0ustar davedave00000000000000# These are not exported. import sys import typing from typing import ( TypeVar, Generic, Dict, overload, List, Tuple, Any, Type, Optional, Union ) # These are exported. from . import abc from typing import ( AsyncIterable as AsyncIterable, AsyncIterator as AsyncIterator, Awaitable as Awaitable, Callable as Callable, Container as Container, Coroutine as Coroutine, Hashable as Hashable, Iterable as Iterable, Iterator as Iterator, Sized as Sized, Generator as Generator, ByteString as ByteString, Reversible as Reversible, Mapping as Mapping, MappingView as MappingView, ItemsView as ItemsView, KeysView as KeysView, ValuesView as ValuesView, MutableMapping as MutableMapping, Sequence as Sequence, MutableSequence as MutableSequence, MutableSet as MutableSet, AbstractSet as Set, ) if sys.version_info >= (3, 6): from typing import ( Collection as Collection, AsyncGenerator as AsyncGenerator, ) _S = TypeVar('_S') _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') # namedtuple is special-cased in the type checker; the initializer is ignored. if sys.version_info >= (3, 7): def namedtuple( typename: str, field_names: Union[str, Iterable[str]], *, rename: bool = ..., module: Optional[str] = ..., defaults: Optional[Iterable[Any]] = ..., ) -> Type[Tuple[Any, ...]]: ... elif sys.version_info >= (3, 6): def namedtuple( typename: str, field_names: Union[str, Iterable[str]], *, verbose: bool = ..., rename: bool = ..., module: Optional[str] = ..., ) -> Type[Tuple[Any, ...]]: ... else: def namedtuple( typename: str, field_names: Union[str, Iterable[str]], verbose: bool = ..., rename: bool = ..., ) -> Type[Tuple[Any, ...]]: ... class UserDict(MutableMapping[_KT, _VT]): data: Dict[_KT, _VT] def __init__(self, dict: Optional[Mapping[_KT, _VT]] = ..., **kwargs: _VT) -> None: ... def __len__(self) -> int: ... def __getitem__(self, key: _KT) -> _VT: ... def __setitem__(self, key: _KT, item: _VT) -> None: ... def __delitem__(self, key: _KT) -> None: ... def __iter__(self) -> Iterator[_KT]: ... def __contains__(self, key: object) -> bool: ... def copy(self: _S) -> _S: ... @classmethod def fromkeys(cls: Type[_S], iterable: Iterable[_KT], value: Optional[_VT] = ...) -> _S: ... class UserList(MutableSequence[_T]): data: List[_T] def __init__(self, initlist: Optional[Iterable[_T]] = ...) -> None: ... def __lt__(self, other: object) -> bool: ... def __le__(self, other: object) -> bool: ... def __gt__(self, other: object) -> bool: ... def __ge__(self, other: object) -> bool: ... def __contains__(self, item: object) -> bool: ... def __len__(self) -> int: ... @overload def __getitem__(self, i: int) -> _T: ... @overload def __getitem__(self, i: slice) -> MutableSequence[_T]: ... @overload def __setitem__(self, i: int, o: _T) -> None: ... @overload def __setitem__(self, i: slice, o: Iterable[_T]) -> None: ... def __delitem__(self, i: Union[int, slice]) -> None: ... def __add__(self: _S, other: Iterable[_T]) -> _S: ... def __iadd__(self: _S, other: Iterable[_T]) -> _S: ... def __mul__(self: _S, n: int) -> _S: ... def __imul__(self: _S, n: int) -> _S: ... def append(self, item: _T) -> None: ... def insert(self, i: int, item: _T) -> None: ... def pop(self, i: int = ...) -> _T: ... def remove(self, item: _T) -> None: ... def clear(self) -> None: ... def copy(self: _S) -> _S: ... def count(self, item: _T) -> int: ... def index(self, item: _T, *args: Any) -> int: ... def reverse(self) -> None: ... def sort(self, *args: Any, **kwds: Any) -> None: ... def extend(self, other: Iterable[_T]) -> None: ... _UserStringT = TypeVar('_UserStringT', bound=UserString) class UserString(Sequence[str]): data: str def __init__(self, seq: object) -> None: ... def __int__(self) -> int: ... def __float__(self) -> float: ... def __complex__(self) -> complex: ... def __getnewargs__(self) -> Tuple[str]: ... def __lt__(self, string: Union[str, UserString]) -> bool: ... def __le__(self, string: Union[str, UserString]) -> bool: ... def __gt__(self, string: Union[str, UserString]) -> bool: ... def __ge__(self, string: Union[str, UserString]) -> bool: ... def __contains__(self, char: object) -> bool: ... def __len__(self) -> int: ... # It should return a str to implement Sequence correctly, but it doesn't. def __getitem__(self: _UserStringT, i: Union[int, slice]) -> _UserStringT: ... # type: ignore def __add__(self: _UserStringT, other: object) -> _UserStringT: ... def __mul__(self: _UserStringT, n: int) -> _UserStringT: ... def __mod__(self: _UserStringT, args: Any) -> _UserStringT: ... def capitalize(self: _UserStringT) -> _UserStringT: ... def casefold(self: _UserStringT) -> _UserStringT: ... def center(self: _UserStringT, width: int, *args: Any) -> _UserStringT: ... def count(self, sub: Union[str, UserString], start: int = ..., end: int = ...) -> int: ... def encode(self: _UserStringT, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> _UserStringT: ... def endswith(self, suffix: Union[str, Tuple[str, ...]], start: int = ..., end: int = ...) -> bool: ... def expandtabs(self: _UserStringT, tabsize: int = ...) -> _UserStringT: ... def find(self, sub: Union[str, UserString], start: int = ..., end: int = ...) -> int: ... def format(self, *args: Any, **kwds: Any) -> str: ... def format_map(self, mapping: Mapping[str, Any]) -> str: ... def index(self, sub: str, start: int = ..., end: int = ...) -> int: ... def isalpha(self) -> bool: ... def isalnum(self) -> bool: ... def isdecimal(self) -> bool: ... def isdigit(self) -> bool: ... def isidentifier(self) -> bool: ... def islower(self) -> bool: ... def isnumeric(self) -> bool: ... def isprintable(self) -> bool: ... def isspace(self) -> bool: ... def istitle(self) -> bool: ... def isupper(self) -> bool: ... def join(self, seq: Iterable[str]) -> str: ... def ljust(self: _UserStringT, width: int, *args: Any) -> _UserStringT: ... def lower(self: _UserStringT) -> _UserStringT: ... def lstrip(self: _UserStringT, chars: Optional[str] = ...) -> _UserStringT: ... @staticmethod @overload def maketrans(x: Union[Dict[int, _T], Dict[str, _T], Dict[Union[str, int], _T]]) -> Dict[int, _T]: ... @staticmethod @overload def maketrans(x: str, y: str, z: str = ...) -> Dict[int, Union[int, None]]: ... def partition(self, sep: str) -> Tuple[str, str, str]: ... def replace(self: _UserStringT, old: Union[str, UserString], new: Union[str, UserString], maxsplit: int = ...) -> _UserStringT: ... def rfind(self, sub: Union[str, UserString], start: int = ..., end: int = ...) -> int: ... def rindex(self, sub: Union[str, UserString], start: int = ..., end: int = ...) -> int: ... def rjust(self: _UserStringT, width: int, *args: Any) -> _UserStringT: ... def rpartition(self, sep: str) -> Tuple[str, str, str]: ... def rstrip(self: _UserStringT, chars: Optional[str] = ...) -> _UserStringT: ... def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... def splitlines(self, keepends: bool = ...) -> List[str]: ... def startswith(self, prefix: Union[str, Tuple[str, ...]], start: int = ..., end: int = ...) -> bool: ... def strip(self: _UserStringT, chars: Optional[str] = ...) -> _UserStringT: ... def swapcase(self: _UserStringT) -> _UserStringT: ... def title(self: _UserStringT) -> _UserStringT: ... def translate(self: _UserStringT, *args: Any) -> _UserStringT: ... def upper(self: _UserStringT) -> _UserStringT: ... def zfill(self: _UserStringT, width: int) -> _UserStringT: ... # Technically, deque only derives from MutableSequence in 3.5 (before then, the insert and index # methods did not exist). # But in practice it's not worth losing sleep over. class deque(MutableSequence[_T], Generic[_T]): @property def maxlen(self) -> Optional[int]: ... def __init__(self, iterable: Iterable[_T] = ..., maxlen: Optional[int] = ...) -> None: ... def append(self, x: _T) -> None: ... def appendleft(self, x: _T) -> None: ... def clear(self) -> None: ... def copy(self) -> deque[_T]: ... def count(self, x: _T) -> int: ... def extend(self, iterable: Iterable[_T]) -> None: ... def extendleft(self, iterable: Iterable[_T]) -> None: ... def insert(self, i: int, x: _T) -> None: ... def index(self, x: _T, start: int = ..., stop: int = ...) -> int: ... def pop(self, i: int = ...) -> _T: ... def popleft(self) -> _T: ... def remove(self, value: _T) -> None: ... def reverse(self) -> None: ... def rotate(self, n: int) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... def __hash__(self) -> int: ... # These methods of deque don't really take slices, but we need to # define them as taking a slice to satisfy MutableSequence. @overload def __getitem__(self, index: int) -> _T: ... @overload def __getitem__(self, s: slice) -> MutableSequence[_T]: ... @overload def __setitem__(self, i: int, x: _T) -> None: ... @overload def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... @overload def __delitem__(self, i: int) -> None: ... @overload def __delitem__(self, s: slice) -> None: ... def __contains__(self, o: object) -> bool: ... def __reversed__(self) -> Iterator[_T]: ... def __iadd__(self: _S, iterable: Iterable[_T]) -> _S: ... def __add__(self, other: deque[_T]) -> deque[_T]: ... def __mul__(self, other: int) -> deque[_T]: ... def __imul__(self, other: int) -> None: ... class Counter(Dict[_T, int], Generic[_T]): @overload def __init__(self, **kwargs: int) -> None: ... @overload def __init__(self, mapping: Mapping[_T, int]) -> None: ... @overload def __init__(self, iterable: Iterable[_T]) -> None: ... def copy(self: _S) -> _S: ... def elements(self) -> Iterator[_T]: ... def most_common(self, n: Optional[int] = ...) -> List[Tuple[_T, int]]: ... @overload def subtract(self, __mapping: Mapping[_T, int]) -> None: ... @overload def subtract(self, iterable: Iterable[_T]) -> None: ... # The Iterable[Tuple[...]] argument type is not actually desirable # (the tuples will be added as keys, breaking type safety) but # it's included so that the signature is compatible with # Dict.update. Not sure if we should use '# type: ignore' instead # and omit the type from the union. @overload def update(self, __m: Mapping[_T, int], **kwargs: int) -> None: ... @overload def update(self, __m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: int) -> None: ... @overload def update(self, **kwargs: int) -> None: ... def __add__(self, other: Counter[_T]) -> Counter[_T]: ... def __sub__(self, other: Counter[_T]) -> Counter[_T]: ... def __and__(self, other: Counter[_T]) -> Counter[_T]: ... def __or__(self, other: Counter[_T]) -> Counter[_T]: ... def __pos__(self) -> Counter[_T]: ... def __neg__(self) -> Counter[_T]: ... def __iadd__(self, other: Counter[_T]) -> Counter[_T]: ... def __isub__(self, other: Counter[_T]) -> Counter[_T]: ... def __iand__(self, other: Counter[_T]) -> Counter[_T]: ... def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... class _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]): def __reversed__(self) -> Iterator[_KT]: ... class _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]): def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ... class _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]): def __reversed__(self) -> Iterator[_VT]: ... class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]): def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ... def move_to_end(self, key: _KT, last: bool = ...) -> None: ... def copy(self: _S) -> _S: ... def __reversed__(self) -> Iterator[_KT]: ... def keys(self) -> _OrderedDictKeysView[_KT]: ... def items(self) -> _OrderedDictItemsView[_KT, _VT]: ... def values(self) -> _OrderedDictValuesView[_VT]: ... class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]): default_factory: Optional[Callable[[], _VT]] @overload def __init__(self, **kwargs: _VT) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]]) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], **kwargs: _VT) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], map: Mapping[_KT, _VT]) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], map: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], iterable: Iterable[Tuple[_KT, _VT]]) -> None: ... @overload def __init__(self, default_factory: Optional[Callable[[], _VT]], iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... def __missing__(self, key: _KT) -> _VT: ... # TODO __reversed__ def copy(self: _S) -> _S: ... class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]): def __init__(self, *maps: Mapping[_KT, _VT]) -> None: ... @property def maps(self) -> List[Mapping[_KT, _VT]]: ... def new_child(self, m: Mapping[_KT, _VT] = ...) -> typing.ChainMap[_KT, _VT]: ... @property def parents(self) -> typing.ChainMap[_KT, _VT]: ... def __setitem__(self, k: _KT, v: _VT) -> None: ... def __delitem__(self, v: _KT) -> None: ... def __getitem__(self, k: _KT) -> _VT: ... def __iter__(self) -> Iterator[_KT]: ... def __len__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/collections/abc.pyi0000664000175000017500000000166113577124116024711 0ustar davedave00000000000000# Stubs for collections.abc (introduced from Python 3.3) # # https://docs.python.org/3.3/whatsnew/3.3.html#collections import sys from . import ( AsyncIterable as AsyncIterable, AsyncIterator as AsyncIterator, Awaitable as Awaitable, ByteString as ByteString, Container as Container, Coroutine as Coroutine, Generator as Generator, Hashable as Hashable, Iterable as Iterable, Iterator as Iterator, Sized as Sized, Callable as Callable, Mapping as Mapping, MutableMapping as MutableMapping, Sequence as Sequence, MutableSequence as MutableSequence, Set as Set, MutableSet as MutableSet, MappingView as MappingView, ItemsView as ItemsView, KeysView as KeysView, ValuesView as ValuesView, ) if sys.version_info >= (3, 6): from . import ( Collection as Collection, Reversible as Reversible, AsyncGenerator as AsyncGenerator, ) jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/statistics.pyi0000664000175000017500000000551213577124116024037 0ustar davedave00000000000000# Stubs for statistics from decimal import Decimal from fractions import Fraction import sys from typing import Any, Iterable, List, Optional, SupportsFloat, Type, TypeVar, Union _T = TypeVar("_T") # Most functions in this module accept homogeneous collections of one of these types _Number = TypeVar('_Number', float, Decimal, Fraction) class StatisticsError(ValueError): ... if sys.version_info >= (3, 8): def fmean(data: Iterable[SupportsFloat]) -> float: ... def geometric_mean(data: Iterable[SupportsFloat]) -> float: ... def mean(data: Iterable[_Number]) -> _Number: ... if sys.version_info >= (3, 6): def harmonic_mean(data: Iterable[_Number]) -> _Number: ... def median(data: Iterable[_Number]) -> _Number: ... def median_low(data: Iterable[_Number]) -> _Number: ... def median_high(data: Iterable[_Number]) -> _Number: ... def median_grouped(data: Iterable[_Number]) -> _Number: ... def mode(data: Iterable[_Number]) -> _Number: ... if sys.version_info >= (3, 8): def multimode(data: Iterable[_T]) -> List[_T]: ... def pstdev(data: Iterable[_Number], mu: Optional[_Number] = ...) -> _Number: ... def pvariance(data: Iterable[_Number], mu: Optional[_Number] = ...) -> _Number: ... if sys.version_info >= (3, 8): def quantiles(data: Iterable[_Number], *, n: int = ..., method: str = ...) -> List[_Number]: ... def stdev(data: Iterable[_Number], xbar: Optional[_Number] = ...) -> _Number: ... def variance(data: Iterable[_Number], xbar: Optional[_Number] = ...) -> _Number: ... if sys.version_info >= (3, 8): class NormalDist: def __init__(self, mu: float = ..., sigma: float = ...) -> None: ... @property def mean(self) -> float: ... @property def median(self) -> float: ... @property def mode(self) -> float: ... @property def stdev(self) -> float: ... @property def variance(self) -> float: ... @classmethod def from_samples(cls: Type[_T], data: Iterable[SupportsFloat]) -> _T: ... def samples(self, n: int, *, seed: Optional[Any]) -> List[float]: ... def pdf(self, x: float) -> float: ... def cdf(self, x: float) -> float: ... def inv_cdf(self, p: float) -> float: ... def overlap(self, other: NormalDist) -> float: ... def quantiles(self, n: int = ...) -> List[float]: ... def __add__(self, x2: Union[float, NormalDist]) -> NormalDist: ... def __sub__(self, x2: Union[float, NormalDist]) -> NormalDist: ... def __mul__(self, x2: float) -> NormalDist: ... def __truediv__(self, x2: float) -> NormalDist: ... def __pos__(self) -> NormalDist: ... def __neg__(self) -> NormalDist: ... __radd__ = __add__ def __rsub__(self, x2: Union[float, NormalDist]) -> NormalDist: ... __rmul__ = __mul__ def __hash__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/socketserver.pyi0000664000175000017500000000755613577124116024376 0ustar davedave00000000000000# NB: SocketServer.pyi and socketserver.pyi must remain consistent! # Stubs for socketserver from typing import Any, BinaryIO, Callable, Optional, Tuple, Type, Text, Union from socket import SocketType import sys import types class BaseServer: address_family: int RequestHandlerClass: Callable[..., BaseRequestHandler] server_address: Tuple[str, int] socket: SocketType allow_reuse_address: bool request_queue_size: int socket_type: int timeout: Optional[float] def __init__(self, server_address: Any, RequestHandlerClass: Callable[..., BaseRequestHandler]) -> None: ... def fileno(self) -> int: ... def handle_request(self) -> None: ... def serve_forever(self, poll_interval: float = ...) -> None: ... def shutdown(self) -> None: ... def server_close(self) -> None: ... def finish_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ... def get_request(self) -> None: ... def handle_error(self, request: bytes, client_address: Tuple[str, int]) -> None: ... def handle_timeout(self) -> None: ... def process_request(self, request: bytes, client_address: Tuple[str, int]) -> None: ... def server_activate(self) -> None: ... def server_bind(self) -> None: ... def verify_request(self, request: bytes, client_address: Tuple[str, int]) -> bool: ... if sys.version_info >= (3, 6): def __enter__(self) -> BaseServer: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]) -> None: ... if sys.version_info >= (3, 3): def service_actions(self) -> None: ... class TCPServer(BaseServer): def __init__(self, server_address: Tuple[str, int], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... class UDPServer(BaseServer): def __init__(self, server_address: Tuple[str, int], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... if sys.platform != 'win32': class UnixStreamServer(BaseServer): def __init__(self, server_address: Union[Text, bytes], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... class UnixDatagramServer(BaseServer): def __init__(self, server_address: Union[Text, bytes], RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... class ForkingMixIn: ... class ThreadingMixIn: ... class ForkingTCPServer(ForkingMixIn, TCPServer): ... class ForkingUDPServer(ForkingMixIn, UDPServer): ... class ThreadingTCPServer(ThreadingMixIn, TCPServer): ... class ThreadingUDPServer(ThreadingMixIn, UDPServer): ... if sys.platform != 'win32': class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ... class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ... class BaseRequestHandler: # Those are technically of types, respectively: # * Union[SocketType, Tuple[bytes, SocketType]] # * Union[Tuple[str, int], str] # But there are some concerns that having unions here would cause # too much inconvenience to people using it (see # https://github.com/python/typeshed/pull/384#issuecomment-234649696) request: Any client_address: Any server: BaseServer def setup(self) -> None: ... def handle(self) -> None: ... def finish(self) -> None: ... class StreamRequestHandler(BaseRequestHandler): rfile: BinaryIO wfile: BinaryIO class DatagramRequestHandler(BaseRequestHandler): rfile: BinaryIO wfile: BinaryIO jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_tracemalloc.pyi0000664000175000017500000000114113577124116024264 0ustar davedave00000000000000"""Stub file for the '_tracemalloc' module.""" # This is an autogenerated file. It serves as a starting point # for a more precise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. from typing import Any, Tuple def _get_object_traceback(*args, **kwargs) -> Any: ... def _get_traces() -> Any: ... def clear_traces() -> None: ... def get_traceback_limit() -> int: ... def get_traced_memory() -> Tuple[Any, ...]: ... def get_tracemalloc_memory() -> Any: ... def is_tracing() -> bool: ... def start(*args, **kwargs) -> None: ... def stop() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/0000775000175000017500000000000013577125145022211 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/__init__.pyi0000664000175000017500000000142513577124116024472 0ustar davedave00000000000000# Stubs for email (Python 3.4) from typing import Callable, IO from email.message import Message from email.policy import Policy def message_from_string(s: str, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ... def message_from_bytes(s: bytes, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ... def message_from_file(fp: IO[str], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ... def message_from_binary_file(fp: IO[bytes], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ... # Names in __all__ with no definition: # base64mime # charset # encoders # errors # feedparser # generator # header # iterators # message # mime # parser # quoprimime # utils jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/message.pyi0000664000175000017500000001173413577124116024363 0ustar davedave00000000000000# Stubs for email.message (Python 3.4) from typing import ( List, Optional, Union, Tuple, TypeVar, Generator, Sequence, Iterator, Any ) from email.charset import Charset from email.errors import MessageDefect from email.header import Header from email.policy import Policy from email.contentmanager import ContentManager _T = TypeVar('_T') _PayloadType = Union[List[Message], str, bytes] _CharsetType = Union[Charset, str, None] _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] _ParamType = Union[str, Tuple[Optional[str], Optional[str], str]] _HeaderType = Any class Message: preamble: Optional[str] epilogue: Optional[str] defects: List[MessageDefect] def __str__(self) -> str: ... def is_multipart(self) -> bool: ... def set_unixfrom(self, unixfrom: str) -> None: ... def get_unixfrom(self) -> Optional[str]: ... def attach(self, payload: Message) -> None: ... def get_payload(self, i: int = ..., decode: bool = ...) -> Any: ... # returns Optional[_PayloadType] def set_payload(self, payload: _PayloadType, charset: _CharsetType = ...) -> None: ... def set_charset(self, charset: _CharsetType) -> None: ... def get_charset(self) -> _CharsetType: ... def __len__(self) -> int: ... def __contains__(self, name: str) -> bool: ... def __getitem__(self, name: str) -> _HeaderType: ... def __setitem__(self, name: str, val: _HeaderType) -> None: ... def __delitem__(self, name: str) -> None: ... def keys(self) -> List[str]: ... def values(self) -> List[_HeaderType]: ... def items(self) -> List[Tuple[str, _HeaderType]]: ... def get(self, name: str, failobj: _T = ...) -> Union[_HeaderType, _T]: ... def get_all(self, name: str, failobj: _T = ...) -> Union[List[_HeaderType], _T]: ... def add_header(self, _name: str, _value: str, **_params: _ParamsType) -> None: ... def replace_header(self, _name: str, _value: _HeaderType) -> None: ... def get_content_type(self) -> str: ... def get_content_maintype(self) -> str: ... def get_content_subtype(self) -> str: ... def get_default_type(self) -> str: ... def set_default_type(self, ctype: str) -> None: ... def get_params(self, failobj: _T = ..., header: str = ..., unquote: bool = ...) -> Union[List[Tuple[str, str]], _T]: ... def get_param(self, param: str, failobj: _T = ..., header: str = ..., unquote: bool = ...) -> Union[_T, _ParamType]: ... def del_param(self, param: str, header: str = ..., requote: bool = ...) -> None: ... def set_type(self, type: str, header: str = ..., requote: bool = ...) -> None: ... def get_filename(self, failobj: _T = ...) -> Union[_T, str]: ... def get_boundary(self, failobj: _T = ...) -> Union[_T, str]: ... def set_boundary(self, boundary: str) -> None: ... def get_content_charset(self, failobj: _T = ...) -> Union[_T, str]: ... def get_charsets(self, failobj: _T = ...) -> Union[_T, List[str]]: ... def walk(self) -> Generator[Message, None, None]: ... def get_content_disposition(self) -> Optional[str]: ... def as_string(self, unixfrom: bool = ..., maxheaderlen: int = ..., policy: Optional[Policy] = ...) -> str: ... def as_bytes(self, unixfrom: bool = ..., policy: Optional[Policy] = ...) -> bytes: ... def __bytes__(self) -> bytes: ... def set_param(self, param: str, value: str, header: str = ..., requote: bool = ..., charset: str = ..., language: str = ..., replace: bool = ...) -> None: ... def __init__(self, policy: Policy = ...) -> None: ... class MIMEPart(Message): def get_body(self, preferencelist: Sequence[str] = ...) -> Optional[Message]: ... def iter_attachments(self) -> Iterator[Message]: ... def iter_parts(self) -> Iterator[Message]: ... def get_content(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> Any: ... def set_content(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ... def make_related(self, boundary: Optional[str] = ...) -> None: ... def make_alternative(self, boundary: Optional[str] = ...) -> None: ... def make_mixed(self, boundary: Optional[str] = ...) -> None: ... def add_related(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ... def add_alternative(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ... def add_attachment(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ... def clear(self) -> None: ... def clear_content(self) -> None: ... def is_attachment(self) -> bool: ... class EmailMessage(MIMEPart): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/contentmanager.pyi0000664000175000017500000000110413577124116025732 0ustar davedave00000000000000# Stubs for email.contentmanager (Python 3.4) from typing import Any, Callable from email.message import Message class ContentManager: def __init__(self) -> None: ... def get_content(self, msg: Message, *args: Any, **kw: Any) -> Any: ... def set_content(self, msg: Message, obj: Any, *args: Any, **kw: Any) -> Any: ... def add_get_handler(self, key: str, handler: Callable[..., Any]) -> None: ... def add_set_handler(self, typekey: type, handler: Callable[..., Any]) -> None: ... raw_data_manager: ContentManager jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/generator.pyi0000664000175000017500000000214613577124116024722 0ustar davedave00000000000000# Stubs for email.generator (Python 3.4) from typing import BinaryIO, TextIO, Optional from email.message import Message from email.policy import Policy class Generator: def clone(self, fp: TextIO) -> Generator: ... def write(self, s: str) -> None: ... def __init__(self, outfp: TextIO, mangle_from_: bool = ..., maxheaderlen: int = ..., *, policy: Policy = ...) -> None: ... def flatten(self, msg: Message, unixfrom: bool = ..., linesep: Optional[str] = ...) -> None: ... class BytesGenerator: def clone(self, fp: BinaryIO) -> BytesGenerator: ... def write(self, s: str) -> None: ... def __init__(self, outfp: BinaryIO, mangle_from_: bool = ..., maxheaderlen: int = ..., *, policy: Policy = ...) -> None: ... def flatten(self, msg: Message, unixfrom: bool = ..., linesep: Optional[str] = ...) -> None: ... class DecodedGenerator(Generator): def __init__(self, outfp: TextIO, mangle_from_: bool = ..., maxheaderlen: int = ..., *, fmt: Optional[str] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/utils.pyi0000664000175000017500000000313613577124116024074 0ustar davedave00000000000000# Stubs for email.utils (Python 3.4) from typing import List, Optional, Tuple, Union from email.charset import Charset import datetime _ParamType = Union[str, Tuple[Optional[str], Optional[str], str]] _PDTZ = Tuple[int, int, int, int, int, int, int, int, int, Optional[int]] def quote(str: str) -> str: ... def unquote(str: str) -> str: ... def parseaddr(address: Optional[str]) -> Tuple[str, str]: ... def formataddr(pair: Tuple[Optional[str], str], charset: Union[str, Charset] = ...) -> str: ... def getaddresses(fieldvalues: List[str]) -> List[Tuple[str, str]]: ... def parsedate(date: str) -> Optional[Tuple[int, int, int, int, int, int, int, int, int]]: ... def parsedate_tz(date: str) -> Optional[_PDTZ]: ... def parsedate_to_datetime(date: str) -> datetime.datetime: ... def mktime_tz(tuple: _PDTZ) -> int: ... def formatdate(timeval: Optional[float] = ..., localtime: bool = ..., usegmt: bool = ...) -> str: ... def format_datetime(dt: datetime.datetime, usegmt: bool = ...) -> str: ... def localtime(dt: Optional[datetime.datetime] = ...) -> datetime.datetime: ... def make_msgid(idstring: Optional[str] = ..., domain: Optional[str] = ...) -> str: ... def decode_rfc2231(s: str) -> Tuple[Optional[str], Optional[str], str]: ... def encode_rfc2231(s: str, charset: Optional[str] = ..., language: Optional[str] = ...) -> str: ... def collapse_rfc2231_value(value: _ParamType, errors: str = ..., fallback_charset: str = ...) -> str: ... def decode_params( params: List[Tuple[str, str]] ) -> List[Tuple[str, _ParamType]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/iterators.pyi0000664000175000017500000000051713577124116024750 0ustar davedave00000000000000# Stubs for email.iterators (Python 3.4) from typing import Iterator, Optional from email.message import Message def body_line_iterator(msg: Message, decode: bool = ...) -> Iterator[str]: ... def typed_subpart_iterator(msg: Message, maintype: str = ..., subtype: Optional[str] = ...) -> Iterator[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/header.pyi0000664000175000017500000000216713577124116024167 0ustar davedave00000000000000# Stubs for email.header (Python 3.4) from typing import Union, Optional, Any, List, Tuple from email.charset import Charset class Header: def __init__(self, s: Union[bytes, str, None] = ..., charset: Union[Charset, str, None] = ..., maxlinelen: Optional[int] = ..., header_name: Optional[str] = ..., continuation_ws: str = ..., errors: str = ...) -> None: ... def append(self, s: Union[bytes, str], charset: Union[Charset, str, None] = ..., errors: str = ...) -> None: ... def encode(self, splitchars: str = ..., maxlinelen: Optional[int] = ..., linesep: str = ...) -> str: ... def __str__(self) -> str: ... def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... def decode_header(header: Union[Header, str]) -> List[Tuple[bytes, Optional[str]]]: ... def make_header(decoded_seq: List[Tuple[bytes, Optional[str]]], maxlinelen: Optional[int] = ..., header_name: Optional[str] = ..., continuation_ws: str = ...) -> Header: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/encoders.pyi0000664000175000017500000000037713577124116024542 0ustar davedave00000000000000# Stubs for email.encoders (Python 3.4) from email.message import Message def encode_base64(msg: Message) -> None: ... def encode_quopri(msg: Message) -> None: ... def encode_7or8bit(msg: Message) -> None: ... def encode_noop(msg: Message) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/feedparser.pyi0000664000175000017500000000107413577124116025053 0ustar davedave00000000000000# Stubs for email.feedparser (Python 3.4) from typing import Callable from email.message import Message from email.policy import Policy class FeedParser: def __init__(self, _factory: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def feed(self, data: str) -> None: ... def close(self) -> Message: ... class BytesFeedParser: def __init__(self, _factory: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def feed(self, data: str) -> None: ... def close(self) -> Message: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/headerregistry.pyi0000664000175000017500000000564113577124116025760 0ustar davedave00000000000000# Stubs for email.headerregistry (Python 3.4) from datetime import datetime as _datetime from typing import Dict, Tuple, Optional, Any, Union, Mapping from email.errors import MessageDefect from email.policy import Policy class BaseHeader(str): @property def name(self) -> str: ... @property def defects(self) -> Tuple[MessageDefect, ...]: ... @property def max_count(self) -> Optional[int]: ... def __new__(cls, name: str, value: Any) -> BaseHeader: ... def init(self, *args: Any, **kw: Any) -> None: ... def fold(self, *, policy: Policy) -> str: ... class UnstructuredHeader: @classmethod def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ... class UniqueUnstructuredHeader(UnstructuredHeader): ... class DateHeader: datetime: _datetime @classmethod def parse(cls, string: Union[str, _datetime], kwds: Dict[str, Any]) -> None: ... class UniqueDateHeader(DateHeader): ... class AddressHeader: groups: Tuple[Group, ...] addresses: Tuple[Address, ...] @classmethod def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ... class UniqueAddressHeader(AddressHeader): ... class SingleAddressHeader(AddressHeader): @property def address(self) -> Address: ... class UniqueSingleAddressHeader(SingleAddressHeader): ... class MIMEVersionHeader: version: Optional[str] major: Optional[int] minor: Optional[int] @classmethod def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ... class ParameterizedMIMEHeader: params: Mapping[str, Any] @classmethod def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ... class ContentTypeHeader(ParameterizedMIMEHeader): content_type: str maintype: str subtype: str class ContentDispositionHeader(ParameterizedMIMEHeader): content_disposition: str class ContentTransferEncodingHeader: cte: str @classmethod def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ... class HeaderRegistry: def __init__(self, base_class: BaseHeader = ..., default_class: BaseHeader = ..., use_default_map: bool = ...) -> None: ... def map_to_type(self, name: str, cls: BaseHeader) -> None: ... def __getitem__(self, name: str) -> BaseHeader: ... def __call__(self, name: str, value: Any) -> BaseHeader: ... class Address: display_name: str username: str domain: str @property def addr_spec(self) -> str: ... def __init__(self, display_name: str = ..., username: Optional[str] = ..., domain: Optional[str] = ..., addr_spec: Optional[str] = ...) -> None: ... def __str__(self) -> str: ... class Group: display_name: Optional[str] addresses: Tuple[Address, ...] def __init__(self, display_name: Optional[str] = ..., addresses: Optional[Tuple[Address, ...]] = ...) -> None: ... def __str__(self) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/parser.pyi0000664000175000017500000000263313577124116024231 0ustar davedave00000000000000# Stubs for email.parser (Python 3.4) import email.feedparser from email.message import Message from email.policy import Policy from typing import BinaryIO, Callable, TextIO FeedParser = email.feedparser.FeedParser BytesFeedParser = email.feedparser.BytesFeedParser class Parser: def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ... def parsestr(self, text: str, headersonly: bool = ...) -> Message: ... class HeaderParser(Parser): def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ... def parsestr(self, text: str, headersonly: bool = ...) -> Message: ... class BytesHeaderParser(BytesParser): def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ... def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ... class BytesParser: def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ... def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ... def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/charset.pyi0000664000175000017500000000220413577124116024360 0ustar davedave00000000000000# Stubs for email.charset (Python 3.4) from typing import List, Optional, Iterator, Any QP: int # undocumented BASE64: int # undocumented SHORTEST: int # undocumented class Charset: input_charset: str header_encoding: int body_encoding: int output_charset: Optional[str] input_codec: Optional[str] output_codec: Optional[str] def __init__(self, input_charset: str = ...) -> None: ... def get_body_encoding(self) -> str: ... def get_output_charset(self) -> Optional[str]: ... def header_encode(self, string: str) -> str: ... def header_encode_lines(self, string: str, maxlengths: Iterator[int]) -> List[str]: ... def body_encode(self, string: str) -> str: ... def __str__(self) -> str: ... def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... def add_charset(charset: str, header_enc: Optional[int] = ..., body_enc: Optional[int] = ..., output_charset: Optional[str] = ...) -> None: ... def add_alias(alias: str, canonical: str) -> None: ... def add_codec(charset: str, codecname: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/0000775000175000017500000000000013577125145023140 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/__init__.pyi0000664000175000017500000000000013577124116025405 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/message.pyi0000664000175000017500000000036213577124116025305 0ustar davedave00000000000000# Stubs for email.mime.message (Python 3.4) from email.message import Message from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart): def __init__(self, _msg: Message, _subtype: str = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/application.pyi0000664000175000017500000000070413577124116026164 0ustar davedave00000000000000# Stubs for email.mime.application (Python 3.4) from typing import Callable, Optional, Tuple, Union from email.mime.nonmultipart import MIMENonMultipart _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] class MIMEApplication(MIMENonMultipart): def __init__(self, _data: Union[str, bytes], _subtype: str = ..., _encoder: Callable[[MIMEApplication], None] = ..., **_params: _ParamsType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/base.pyi0000664000175000017500000000047513577124116024600 0ustar davedave00000000000000# Stubs for email.mime.base (Python 3.4) from typing import Optional, Tuple, Union import email.message _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] class MIMEBase(email.message.Message): def __init__(self, _maintype: str, _subtype: str, **_params: _ParamsType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/image.pyi0000664000175000017500000000070113577124116024740 0ustar davedave00000000000000# Stubs for email.mime.image (Python 3.4) from typing import Callable, Optional, Tuple, Union from email.mime.nonmultipart import MIMENonMultipart _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] class MIMEImage(MIMENonMultipart): def __init__(self, _imagedata: Union[str, bytes], _subtype: Optional[str] = ..., _encoder: Callable[[MIMEImage], None] = ..., **_params: _ParamsType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/nonmultipart.pyi0000664000175000017500000000017613577124116026420 0ustar davedave00000000000000# Stubs for email.mime.nonmultipart (Python 3.4) from email.mime.base import MIMEBase class MIMENonMultipart(MIMEBase): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/audio.pyi0000664000175000017500000000070113577124116024757 0ustar davedave00000000000000# Stubs for email.mime.audio (Python 3.4) from typing import Callable, Optional, Tuple, Union from email.mime.nonmultipart import MIMENonMultipart _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] class MIMEAudio(MIMENonMultipart): def __init__(self, _audiodata: Union[str, bytes], _subtype: Optional[str] = ..., _encoder: Callable[[MIMEAudio], None] = ..., **_params: _ParamsType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/text.pyi0000664000175000017500000000042313577124116024643 0ustar davedave00000000000000# Stubs for email.mime.text (Python 3.4) from typing import Optional from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): def __init__(self, _text: str, _subtype: str = ..., _charset: Optional[str] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/mime/multipart.pyi0000664000175000017500000000071213577124116025701 0ustar davedave00000000000000# Stubs for email.mime.multipart (Python 3.4) from typing import Optional, Sequence, Tuple, Union from email.message import Message from email.mime.base import MIMEBase _ParamsType = Union[str, None, Tuple[str, Optional[str], str]] class MIMEMultipart(MIMEBase): def __init__(self, _subtype: str = ..., boundary: Optional[str] = ..., _subparts: Optional[Sequence[Message]] = ..., **_params: _ParamsType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/policy.pyi0000664000175000017500000000441413577124116024233 0ustar davedave00000000000000# Stubs for email.policy (Python 3.4) from abc import abstractmethod from typing import Any, List, Optional, Tuple, Union, Callable from email.message import Message from email.errors import MessageDefect from email.header import Header from email.contentmanager import ContentManager class Policy: max_line_length: Optional[int] linesep: str cte_type: str raise_on_defect: bool mange_from: bool def __init__(self, **kw: Any) -> None: ... def clone(self, **kw: Any) -> Policy: ... def handle_defect(self, obj: Message, defect: MessageDefect) -> None: ... def register_defect(self, obj: Message, defect: MessageDefect) -> None: ... def header_max_count(self, name: str) -> Optional[int]: ... @abstractmethod def header_source_parse(self, sourcelines: List[str]) -> str: ... @abstractmethod def header_store_parse(self, name: str, value: str) -> Tuple[str, str]: ... @abstractmethod def header_fetch_parse(self, name: str, value: str) -> str: ... @abstractmethod def fold(self, name: str, value: str) -> str: ... @abstractmethod def fold_binary(self, name: str, value: str) -> bytes: ... class Compat32(Policy): def header_source_parse(self, sourcelines: List[str]) -> str: ... def header_store_parse(self, name: str, value: str) -> Tuple[str, str]: ... def header_fetch_parse(self, name: str, value: str) -> Union[str, Header]: ... # type: ignore def fold(self, name: str, value: str) -> str: ... def fold_binary(self, name: str, value: str) -> bytes: ... compat32: Compat32 class EmailPolicy(Policy): utf8: bool refold_source: str header_factory: Callable[[str, str], str] content_manager: ContentManager def header_source_parse(self, sourcelines: List[str]) -> str: ... def header_store_parse(self, name: str, value: str) -> Tuple[str, str]: ... def header_fetch_parse(self, name: str, value: str) -> str: ... def fold(self, name: str, value: str) -> str: ... def fold_binary(self, name: str, value: str) -> bytes: ... default: EmailPolicy SMTP: EmailPolicy SMTPUTF8: EmailPolicy HTTP: EmailPolicy strict: EmailPolicy jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/email/errors.pyi0000664000175000017500000000153713577124116024253 0ustar davedave00000000000000# Stubs for email.errors (Python 3.4) class MessageError(Exception): ... class MessageParseError(MessageError): ... class HeaderParseError(MessageParseError): ... class BoundaryError(MessageParseError): ... class MultipartConversionError(MessageError, TypeError): ... class MessageDefect(ValueError): ... class NoBoundaryInMultipartDefect(MessageDefect): ... class StartBoundaryNotFoundDefect(MessageDefect): ... class FirstHeaderLineIsContinuationDefect(MessageDefect): ... class MisplacedEnvelopeHeaderDefect(MessageDefect): ... class MalformedHeaderDefect(MessageDefect): ... class MultipartInvariantViolationDefect(MessageDefect): ... class InvalidBase64PaddingDefect(MessageDefect): ... class InvalidBase64CharactersDefect(MessageDefect): ... class CloseBoundaryNotFoundDefect(MessageDefect): ... class MissingHeaderBodySeparatorDefect(MessageDefect): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/inspect.pyi0000664000175000017500000002344613577124116023320 0ustar davedave00000000000000import sys from typing import (AbstractSet, Any, Callable, Dict, Generator, List, Mapping, NamedTuple, Optional, Sequence, Tuple, Type, Union, ) from types import (CodeType, FrameType, FunctionType, MethodType, ModuleType, TracebackType, ) from collections import OrderedDict # # Types and members # class EndOfBlock(Exception): ... class BlockFinder: indent: int islambda: bool started: bool passline: bool indecorator: bool decoratorhasargs: bool last: int def tokeneater(self, type: int, token: str, srow_scol: Tuple[int, int], erow_ecol: Tuple[int, int], line: str) -> None: ... CO_OPTIMIZED: int CO_NEWLOCALS: int CO_VARARGS: int CO_VARKEYWORDS: int CO_NESTED: int CO_GENERATOR: int CO_NOFREE: int CO_COROUTINE: int CO_ITERABLE_COROUTINE: int if sys.version_info >= (3, 6): CO_ASYNC_GENERATOR: int TPFLAGS_IS_ABSTRACT: int if sys.version_info < (3, 6): class ModuleInfo(NamedTuple): name: str suffix: str mode: str module_type: int def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ... def getmembers(object: object, predicate: Optional[Callable[[Any], bool]] = ..., ) -> List[Tuple[str, Any]]: ... def getmodulename(path: str) -> Optional[str]: ... def ismodule(object: object) -> bool: ... def isclass(object: object) -> bool: ... def ismethod(object: object) -> bool: ... def isfunction(object: object) -> bool: ... def isgeneratorfunction(object: object) -> bool: ... def isgenerator(object: object) -> bool: ... def iscoroutinefunction(object: object) -> bool: ... def iscoroutine(object: object) -> bool: ... def isawaitable(object: object) -> bool: ... if sys.version_info >= (3, 6): def isasyncgenfunction(object: object) -> bool: ... def isasyncgen(object: object) -> bool: ... def istraceback(object: object) -> bool: ... def isframe(object: object) -> bool: ... def iscode(object: object) -> bool: ... def isbuiltin(object: object) -> bool: ... def isroutine(object: object) -> bool: ... def isabstract(object: object) -> bool: ... def ismethoddescriptor(object: object) -> bool: ... def isdatadescriptor(object: object) -> bool: ... def isgetsetdescriptor(object: object) -> bool: ... def ismemberdescriptor(object: object) -> bool: ... # # Retrieving source code # _SourceObjectType = Union[ModuleType, Type[Any], MethodType, FunctionType, TracebackType, FrameType, CodeType, Callable[..., Any]] def findsource(object: _SourceObjectType) -> Tuple[List[str], int]: ... def getabsfile(object: _SourceObjectType) -> str: ... def getblock(lines: Sequence[str]) -> Sequence[str]: ... def getdoc(object: object) -> Optional[str]: ... def getcomments(object: object) -> Optional[str]: ... def getfile(object: _SourceObjectType) -> str: ... def getmodule(object: object) -> Optional[ModuleType]: ... def getsourcefile(object: _SourceObjectType) -> Optional[str]: ... def getsourcelines(object: _SourceObjectType) -> Tuple[List[str], int]: ... def getsource(object: _SourceObjectType) -> str: ... def cleandoc(doc: str) -> str: ... def indentsize(line: str) -> int: ... # # Introspecting callables with the Signature object # def signature(callable: Callable[..., Any], *, follow_wrapped: bool = ...) -> Signature: ... class Signature: def __init__(self, parameters: Optional[Sequence[Parameter]] = ..., *, return_annotation: Any = ...) -> None: ... # TODO: can we be more specific here? empty: object = ... parameters: Mapping[str, Parameter] # TODO: can we be more specific here? return_annotation: Any def bind(self, *args: Any, **kwargs: Any) -> BoundArguments: ... def bind_partial(self, *args: Any, **kwargs: Any) -> BoundArguments: ... def replace(self, *, parameters: Optional[Sequence[Parameter]] = ..., return_annotation: Any = ...) -> Signature: ... @classmethod def from_callable(cls, obj: Callable[..., Any], *, follow_wrapped: bool = ...) -> Signature: ... # The name is the same as the enum's name in CPython class _ParameterKind: ... class Parameter: def __init__(self, name: str, kind: _ParameterKind, *, default: Any = ..., annotation: Any = ...) -> None: ... empty: Any = ... name: str default: Any annotation: Any kind: _ParameterKind POSITIONAL_ONLY: _ParameterKind = ... POSITIONAL_OR_KEYWORD: _ParameterKind = ... VAR_POSITIONAL: _ParameterKind = ... KEYWORD_ONLY: _ParameterKind = ... VAR_KEYWORD: _ParameterKind = ... def replace(self, *, name: Optional[str] = ..., kind: Optional[_ParameterKind] = ..., default: Any = ..., annotation: Any = ...) -> Parameter: ... class BoundArguments: arguments: OrderedDict[str, Any] args: Tuple[Any, ...] kwargs: Dict[str, Any] signature: Signature def apply_defaults(self) -> None: ... # # Classes and functions # # TODO: The actual return type should be List[_ClassTreeItem] but mypy doesn't # seem to be supporting this at the moment: # _ClassTreeItem = Union[List[_ClassTreeItem], Tuple[type, Tuple[type, ...]]] def getclasstree(classes: List[type], unique: bool = ...) -> Any: ... class ArgSpec(NamedTuple): args: List[str] varargs: str keywords: str defaults: Tuple[Any, ...] class Arguments(NamedTuple): args: List[str] varargs: Optional[str] varkw: Optional[str] def getargs(co: CodeType) -> Arguments: ... def getargspec(func: object) -> ArgSpec: ... class FullArgSpec(NamedTuple): args: List[str] varargs: Optional[str] varkw: Optional[str] defaults: Optional[Tuple[Any, ...]] kwonlyargs: List[str] kwonlydefaults: Optional[Dict[str, Any]] annotations: Dict[str, Any] def getfullargspec(func: object) -> FullArgSpec: ... class ArgInfo(NamedTuple): args: List[str] varargs: Optional[str] keywords: Optional[str] locals: Dict[str, Any] def getargvalues(frame: FrameType) -> ArgInfo: ... def formatannotation(annotation: object, base_module: Optional[str] = ...) -> str: ... def formatannotationrelativeto(object: object) -> Callable[[object], str]: ... def formatargspec(args: List[str], varargs: Optional[str] = ..., varkw: Optional[str] = ..., defaults: Optional[Tuple[Any, ...]] = ..., kwonlyargs: Optional[List[str]] = ..., kwonlydefaults: Optional[Dict[str, Any]] = ..., annotations: Dict[str, Any] = ..., formatarg: Callable[[str], str] = ..., formatvarargs: Callable[[str], str] = ..., formatvarkw: Callable[[str], str] = ..., formatvalue: Callable[[Any], str] = ..., formatreturns: Callable[[Any], str] = ..., formatannotations: Callable[[Any], str] = ..., ) -> str: ... def formatargvalues(args: List[str], varargs: Optional[str] = ..., varkw: Optional[str] = ..., locals: Optional[Dict[str, Any]] = ..., formatarg: Optional[Callable[[str], str]] = ..., formatvarargs: Optional[Callable[[str], str]] = ..., formatvarkw: Optional[Callable[[str], str]] = ..., formatvalue: Optional[Callable[[Any], str]] = ..., ) -> str: ... def getmro(cls: type) -> Tuple[type, ...]: ... def getcallargs(func: Callable[..., Any], *args: Any, **kwds: Any) -> Dict[str, Any]: ... class ClosureVars(NamedTuple): nonlocals: Mapping[str, Any] globals: Mapping[str, Any] builtins: Mapping[str, Any] unbound: AbstractSet[str] def getclosurevars(func: Callable[..., Any]) -> ClosureVars: ... def unwrap(func: Callable[..., Any], *, stop: Optional[Callable[[Any], Any]] = ...) -> Any: ... # # The interpreter stack # class Traceback(NamedTuple): filename: str lineno: int function: str code_context: Optional[List[str]] index: Optional[int] # type: ignore class FrameInfo(NamedTuple): frame: FrameType filename: str lineno: int function: str code_context: Optional[List[str]] index: Optional[int] # type: ignore def getframeinfo(frame: Union[FrameType, TracebackType], context: int = ...) -> Traceback: ... def getouterframes(frame: Any, context: int = ...) -> List[FrameInfo]: ... def getinnerframes(traceback: TracebackType, context: int = ...) -> List[FrameInfo]: ... def getlineno(frame: FrameType) -> int: ... def currentframe() -> Optional[FrameType]: ... def stack(context: int = ...) -> List[FrameInfo]: ... def trace(context: int = ...) -> List[FrameInfo]: ... # # Fetching attributes statically # def getattr_static(obj: object, attr: str, default: Optional[Any] = ...) -> Any: ... # # Current State of Generators and Coroutines # # TODO In the next two blocks of code, can we be more specific regarding the # type of the "enums"? GEN_CREATED: str GEN_RUNNING: str GEN_SUSPENDED: str GEN_CLOSED: str def getgeneratorstate(generator: Generator[Any, Any, Any]) -> str: ... CORO_CREATED: str CORO_RUNNING: str CORO_SUSPENDED: str CORO_CLOSED: str # TODO can we be more specific than "object"? def getcoroutinestate(coroutine: object) -> str: ... def getgeneratorlocals(generator: Generator[Any, Any, Any]) -> Dict[str, Any]: ... # TODO can we be more specific than "object"? def getcoroutinelocals(coroutine: object) -> Dict[str, Any]: ... class Attribute(NamedTuple): name: str kind: str defining_class: type object: object def classify_class_attrs(cls: type) -> List[Attribute]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/getpass.pyi0000664000175000017500000000031313577124116023305 0ustar davedave00000000000000# Stubs for getpass from typing import Optional, TextIO def getpass(prompt: str = ..., stream: Optional[TextIO] = ...) -> str: ... def getuser() -> str: ... class GetPassWarning(UserWarning): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/queue.pyi0000664000175000017500000000320613577124116022767 0ustar davedave00000000000000# Stubs for queue # NOTE: These are incomplete! from threading import Condition, Lock from typing import Any, Deque, TypeVar, Generic, Optional import sys _T = TypeVar('_T') class Empty(Exception): ... class Full(Exception): ... class Queue(Generic[_T]): maxsize: int mutex: Lock # undocumented not_empty: Condition # undocumented not_full: Condition # undocumented all_tasks_done: Condition # undocumented unfinished_tasks: int # undocumented queue: Deque[Any] # undocumented def __init__(self, maxsize: int = ...) -> None: ... def _init(self, maxsize: int) -> None: ... def empty(self) -> bool: ... def full(self) -> bool: ... def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ... def get_nowait(self) -> _T: ... def _get(self) -> _T: ... def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ... def put_nowait(self, item: _T) -> None: ... def _put(self, item: _T) -> None: ... def join(self) -> None: ... def qsize(self) -> int: ... def _qsize(self) -> int: ... def task_done(self) -> None: ... class PriorityQueue(Queue[_T]): ... class LifoQueue(Queue[_T]): ... if sys.version_info >= (3, 7): class SimpleQueue(Generic[_T]): def __init__(self) -> None: ... def empty(self) -> bool: ... def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ... def get_nowait(self) -> _T: ... def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ... def put_nowait(self, item: _T) -> None: ... def qsize(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_markupbase.pyi0000664000175000017500000000040113577124116024126 0ustar davedave00000000000000from typing import Tuple class ParserBase: def __init__(self) -> None: ... def error(self, message: str) -> None: ... def reset(self) -> None: ... def getpos(self) -> Tuple[int, int]: ... def unknown_decl(self, data: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/sre_parse.pyi0000664000175000017500000000653313577124116023634 0ustar davedave00000000000000# Source: https://github.com/python/cpython/blob/master/Lib/sre_parse.py from typing import ( Any, Dict, FrozenSet, Iterable, List, Match, Optional, Pattern as _Pattern, Tuple, Union ) import sys from sre_constants import _NamedIntConstant as NIC, error as _Error SPECIAL_CHARS: str REPEAT_CHARS: str DIGITS: FrozenSet[str] OCTDIGITS: FrozenSet[str] HEXDIGITS: FrozenSet[str] ASCIILETTERS: FrozenSet[str] WHITESPACE: FrozenSet[str] ESCAPES: Dict[str, Tuple[NIC, int]] CATEGORIES: Dict[str, Union[Tuple[NIC, NIC], Tuple[NIC, List[Tuple[NIC, NIC]]]]] FLAGS: Dict[str, int] GLOBAL_FLAGS: int class Verbose(Exception): ... class _State: flags: int groupdict: Dict[str, int] groupwidths: List[Optional[int]] lookbehindgroups: Optional[int] def __init__(self) -> None: ... @property def groups(self) -> int: ... def opengroup(self, name: str = ...) -> int: ... def closegroup(self, gid: int, p: SubPattern) -> None: ... def checkgroup(self, gid: int) -> bool: ... def checklookbehindgroup(self, gid: int, source: Tokenizer) -> None: ... if sys.version_info >= (3, 8): State = _State else: Pattern = _State _OpSubpatternType = Tuple[Optional[int], int, int, SubPattern] _OpGroupRefExistsType = Tuple[int, SubPattern, SubPattern] _OpInType = List[Tuple[NIC, int]] _OpBranchType = Tuple[None, List[SubPattern]] _AvType = Union[_OpInType, _OpBranchType, Iterable[SubPattern], _OpGroupRefExistsType, _OpSubpatternType] _CodeType = Tuple[NIC, _AvType] class SubPattern: data: List[_CodeType] width: Optional[int] if sys.version_info >= (3, 8): state: State def __init__(self, state: State, data: List[_CodeType] = ...) -> None: ... else: pattern: Pattern def __init__(self, pattern: Pattern, data: List[_CodeType] = ...) -> None: ... def dump(self, level: int = ...) -> None: ... def __len__(self) -> int: ... def __delitem__(self, index: Union[int, slice]) -> None: ... def __getitem__(self, index: Union[int, slice]) -> Union[SubPattern, _CodeType]: ... def __setitem__(self, index: Union[int, slice], code: _CodeType) -> None: ... def insert(self, index: int, code: _CodeType) -> None: ... def append(self, code: _CodeType) -> None: ... def getwidth(self) -> int: ... class Tokenizer: istext: bool string: Any decoded_string: str index: int next: Optional[str] def __init__(self, string: Any) -> None: ... def match(self, char: str) -> bool: ... def get(self) -> Optional[str]: ... def getwhile(self, n: int, charset: Iterable[str]) -> str: ... def getuntil(self, terminator: str) -> str: ... @property def pos(self) -> int: ... def tell(self) -> int: ... def seek(self, index: int) -> None: ... def error(self, msg: str, offset: int = ...) -> _Error: ... def fix_flags(src: Union[str, bytes], flag: int) -> int: ... _TemplateType = Tuple[List[Tuple[int, int]], List[str]] if sys.version_info >= (3, 8): def parse(str: str, flags: int = ..., state: State = ...) -> SubPattern: ... def parse_template(source: str, state: _Pattern[Any]) -> _TemplateType: ... else: def parse(str: str, flags: int = ..., pattern: Pattern = ...) -> SubPattern: ... def parse_template(source: str, pattern: _Pattern[Any]) -> _TemplateType: ... def expand_template(template: _TemplateType, match: Match[Any]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/hashlib.pyi0000664000175000017500000000446113577124116023261 0ustar davedave00000000000000# Stubs for hashlib import sys from typing import AbstractSet, Optional, Union _DataType = Union[bytes, bytearray, memoryview] class _Hash(object): digest_size: int block_size: int # [Python documentation note] Changed in version 3.4: The name attribute has # been present in CPython since its inception, but until Python 3.4 was not # formally specified, so may not exist on some platforms name: str def __init__(self, data: _DataType = ...) -> None: ... def copy(self) -> _Hash: ... def digest(self) -> bytes: ... def hexdigest(self) -> str: ... def update(self, arg: _DataType) -> None: ... def md5(arg: _DataType = ...) -> _Hash: ... def sha1(arg: _DataType = ...) -> _Hash: ... def sha224(arg: _DataType = ...) -> _Hash: ... def sha256(arg: _DataType = ...) -> _Hash: ... def sha384(arg: _DataType = ...) -> _Hash: ... def sha512(arg: _DataType = ...) -> _Hash: ... def new(name: str, data: _DataType = ...) -> _Hash: ... algorithms_guaranteed: AbstractSet[str] algorithms_available: AbstractSet[str] def pbkdf2_hmac(hash_name: str, password: _DataType, salt: _DataType, iterations: int, dklen: Optional[int] = ...) -> bytes: ... if sys.version_info >= (3, 6): class _VarLenHash(object): digest_size: int block_size: int name: str def __init__(self, data: _DataType = ...) -> None: ... def copy(self) -> _VarLenHash: ... def digest(self, length: int) -> bytes: ... def hexdigest(self, length: int) -> str: ... def update(self, arg: _DataType) -> None: ... sha3_224 = _Hash sha3_256 = _Hash sha3_384 = _Hash sha3_512 = _Hash shake_128 = _VarLenHash shake_256 = _VarLenHash def scrypt(password: _DataType, *, salt: _DataType, n: int, r: int, p: int, maxmem: int = ..., dklen: int = ...) -> bytes: ... class _BlakeHash(_Hash): MAX_DIGEST_SIZE: int MAX_KEY_SIZE: int PERSON_SIZE: int SALT_SIZE: int def __init__(self, data: _DataType = ..., digest_size: int = ..., key: _DataType = ..., salt: _DataType = ..., person: _DataType = ..., fanout: int = ..., depth: int = ..., leaf_size: int = ..., node_offset: int = ..., node_depth: int = ..., inner_size: int = ..., last_node: bool = ...) -> None: ... blake2b = _BlakeHash blake2s = _BlakeHash jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_operator.pyi0000664000175000017500000000247713577124116023646 0ustar davedave00000000000000# Stubs for _operator (Python 3.5) from typing import AnyStr # In reality the import is the other way around, but this way we can keep the operator stub in 2and3 from operator import ( truth as truth, contains as contains, indexOf as indexOf, countOf as countOf, is_ as is_, is_not as is_not, index as index, add as add, sub as sub, mul as mul, floordiv as floordiv, truediv as truediv, mod as mod, neg as neg, pos as pos, abs as abs, inv as inv, invert as invert, length_hint as length_hint, lshift as lshift, rshift as rshift, not_ as not_, and_ as and_, xor as xor, or_ as or_, iadd as iadd, isub as isub, imul as imul, ifloordiv as ifloordiv, itruediv as itruediv, imod as imod, ilshift as ilshift, irshift as irshift, iand as iand, ixor as ixor, ior as ior, concat as concat, iconcat as iconcat, getitem as getitem, setitem as setitem, delitem as delitem, pow as pow, ipow as ipow, eq as eq, ne as ne, lt as lt, le as le, gt as gt, ge as ge, itemgetter as itemgetter, attrgetter as attrgetter, methodcaller as methodcaller, matmul as matmul, imatmul as imatmul, ) def _compare_digest(a: AnyStr, b: AnyStr) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/pipes.pyi0000664000175000017500000000112313577124116022757 0ustar davedave00000000000000# Stubs for pipes # Based on http://docs.python.org/3.5/library/pipes.html import os class Template: def __init__(self) -> None: ... def reset(self) -> None: ... def clone(self) -> Template: ... def debug(self, flag: bool) -> None: ... def append(self, cmd: str, kind: str) -> None: ... def prepend(self, cmd: str, kind: str) -> None: ... def open(self, file: str, rw: str) -> os._wrap_close: ... def copy(self, file: str, rw: str) -> os._wrap_close: ... # Not documented, but widely used. # Documented as shlex.quote since 3.3. def quote(s: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_json.pyi0000664000175000017500000000164413577124116022757 0ustar davedave00000000000000"""Stub file for the '_json' module.""" from typing import Any, Tuple class make_encoder: sort_keys: Any skipkeys: Any key_separator: Any indent: Any markers: Any default: Any encoder: Any item_separator: Any def __init__(self, markers, default, encoder, indent, key_separator, item_separator, sort_keys, skipkeys, allow_nan) -> None: ... def __call__(self, *args, **kwargs) -> Any: ... class make_scanner: object_hook: Any object_pairs_hook: Any parse_int: Any parse_constant: Any parse_float: Any strict: bool # TODO: 'context' needs the attrs above (ducktype), but not __call__. def __init__(self, context: make_scanner) -> None: ... def __call__(self, string: str, index: int) -> Tuple[Any, int]: ... def encode_basestring_ascii(s: str) -> str: ... def scanstring(string: str, end: int, strict: bool = ...) -> Tuple[str, int]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/enum.pyi0000664000175000017500000000546313577124116022616 0ustar davedave00000000000000# NB: third_party/2/enum.pyi and stdlib/3.4/enum.pyi must remain consistent! import sys from typing import Any, Dict, Iterator, List, Mapping, Type, TypeVar, Union from abc import ABCMeta _T = TypeVar('_T') _S = TypeVar('_S', bound=Type[Enum]) # Note: EnumMeta actually subclasses type directly, not ABCMeta. # This is a temporary workaround to allow multiple creation of enums with builtins # such as str as mixins, which due to the handling of ABCs of builtin types, cause # spurious inconsistent metaclass structure. See #1595. # Structurally: Iterable[T], Reversible[T], Container[T] where T is the enum itself class EnumMeta(ABCMeta): def __iter__(self: Type[_T]) -> Iterator[_T]: ... def __reversed__(self: Type[_T]) -> Iterator[_T]: ... def __contains__(self: Type[_T], member: object) -> bool: ... def __getitem__(self: Type[_T], name: str) -> _T: ... @property def __members__(self: Type[_T]) -> Mapping[str, _T]: ... def __len__(self) -> int: ... class Enum(metaclass=EnumMeta): name: str value: Any _name_: str _value_: Any _member_names_: List[str] # undocumented _member_map_: Dict[str, Enum] # undocumented _value2member_map_: Dict[int, Enum] # undocumented if sys.version_info >= (3, 7): _ignore_: Union[str, List[str]] if sys.version_info >= (3, 6): _order_: str @classmethod def _missing_(cls, value: object) -> Any: ... @staticmethod def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> Any: ... def __new__(cls: Type[_T], value: object) -> _T: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def __dir__(self) -> List[str]: ... def __format__(self, format_spec: str) -> str: ... def __hash__(self) -> Any: ... def __reduce_ex__(self, proto: object) -> Any: ... class IntEnum(int, Enum): value: int def unique(enumeration: _S) -> _S: ... if sys.version_info >= (3, 6): _auto_null: Any # subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto() class auto(IntFlag): value: Any class Flag(Enum): def __contains__(self: _T, other: _T) -> bool: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def __bool__(self) -> bool: ... def __or__(self: _T, other: _T) -> _T: ... def __and__(self: _T, other: _T) -> _T: ... def __xor__(self: _T, other: _T) -> _T: ... def __invert__(self: _T) -> _T: ... class IntFlag(int, Flag): def __or__(self: _T, other: Union[int, _T]) -> _T: ... def __and__(self: _T, other: Union[int, _T]) -> _T: ... def __xor__(self: _T, other: Union[int, _T]) -> _T: ... __ror__ = __or__ __rand__ = __and__ __rxor__ = __xor__ jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/gc.pyi0000664000175000017500000000167013577124116022237 0ustar davedave00000000000000# Stubs for gc import sys from typing import Any, Dict, List, Optional, Tuple DEBUG_COLLECTABLE: int DEBUG_LEAK: int DEBUG_SAVEALL: int DEBUG_STATS: int DEBUG_UNCOLLECTABLE: int callbacks: List[Any] garbage: List[Any] def collect(generations: int = ...) -> int: ... def disable() -> None: ... def enable() -> None: ... def get_count() -> Tuple[int, int, int]: ... def get_debug() -> int: ... if sys.version_info >= (3, 8): def get_objects(generation: Optional[int] = ...) -> List[Any]: ... else: def get_objects() -> List[Any]: ... def get_referents(*objs: Any) -> List[Any]: ... def get_referrers(*objs: Any) -> List[Any]: ... def get_stats() -> List[Dict[str, Any]]: ... def get_threshold() -> Tuple[int, int, int]: ... def is_tracked(obj: Any) -> bool: ... def isenabled() -> bool: ... def set_debug(flags: int) -> None: ... def set_threshold(threshold0: int, threshold1: int = ..., threshold2: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/getopt.pyi0000664000175000017500000000065713577124116023154 0ustar davedave00000000000000# Stubs for getopt # Based on http://docs.python.org/3.2/library/getopt.html from typing import List, Tuple def getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ... def gnu_getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ... class GetoptError(Exception): msg: str opt: str error = GetoptError jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/io.pyi0000664000175000017500000002042213577124116022251 0ustar davedave00000000000000from typing import ( List, BinaryIO, TextIO, Iterator, Union, Optional, Callable, Tuple, Type, Any, IO, Iterable ) import builtins import codecs from mmap import mmap from types import TracebackType from typing import TypeVar _bytearray_like = Union[bytearray, mmap] DEFAULT_BUFFER_SIZE: int SEEK_SET: int SEEK_CUR: int SEEK_END: int _T = TypeVar('_T', bound=IOBase) open = builtins.open BlockingIOError = builtins.BlockingIOError class UnsupportedOperation(OSError, ValueError): ... class IOBase: def __iter__(self) -> Iterator[bytes]: ... def __next__(self) -> bytes: ... def __enter__(self: _T) -> _T: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> Optional[bool]: ... def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def readable(self) -> bool: ... def readlines(self, hint: int = ...) -> List[bytes]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... def writelines(self, lines: Iterable[Union[bytes, bytearray]]) -> None: ... def readline(self, size: int = ...) -> bytes: ... def __del__(self) -> None: ... @property def closed(self) -> bool: ... def _checkClosed(self, msg: Optional[str] = ...) -> None: ... # undocumented class RawIOBase(IOBase): def readall(self) -> bytes: ... def readinto(self, b: bytearray) -> Optional[int]: ... def write(self, b: Union[bytes, bytearray]) -> Optional[int]: ... def read(self, size: int = ...) -> Optional[bytes]: ... class BufferedIOBase(IOBase): raw: RawIOBase # This is not part of the BufferedIOBase API and may not exist on some implementations. def detach(self) -> RawIOBase: ... def readinto(self, b: _bytearray_like) -> int: ... def write(self, b: Union[bytes, bytearray]) -> int: ... def readinto1(self, b: _bytearray_like) -> int: ... def read(self, size: Optional[int] = ...) -> bytes: ... def read1(self, size: int = ...) -> bytes: ... class FileIO(RawIOBase): mode: str name: Union[int, str] def __init__( self, file: Union[str, bytes, int], mode: str = ..., closefd: bool = ..., opener: Optional[Callable[[Union[int, str], str], int]] = ... ) -> None: ... # TODO should extend from BufferedIOBase class BytesIO(BinaryIO): def __init__(self, initial_bytes: bytes = ...) -> None: ... # BytesIO does not contain a "name" field. This workaround is necessary # to allow BytesIO sub-classes to add this field, as it is defined # as a read-only property on IO[]. name: Any def getvalue(self) -> bytes: ... def getbuffer(self) -> memoryview: ... # copied from IOBase def __iter__(self) -> Iterator[bytes]: ... def __next__(self) -> bytes: ... def __enter__(self) -> BytesIO: ... def __exit__(self, t: Optional[Type[BaseException]] = ..., value: Optional[BaseException] = ..., traceback: Optional[TracebackType] = ...) -> Optional[bool]: ... def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def readable(self) -> bool: ... def readlines(self, hint: int = ...) -> List[bytes]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... # TODO should be the next line instead # def writelines(self, lines: List[Union[bytes, bytearray]]) -> None: ... def writelines(self, lines: Any) -> None: ... def readline(self, size: int = ...) -> bytes: ... def __del__(self) -> None: ... closed: bool # copied from BufferedIOBase def detach(self) -> RawIOBase: ... def readinto(self, b: _bytearray_like) -> int: ... def write(self, b: Union[bytes, bytearray]) -> int: ... def readinto1(self, b: _bytearray_like) -> int: ... def read(self, size: Optional[int] = ...) -> bytes: ... def read1(self, size: int = ...) -> bytes: ... class BufferedReader(BufferedIOBase): def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... def peek(self, size: int = ...) -> bytes: ... class BufferedWriter(BufferedIOBase): def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... def flush(self) -> None: ... def write(self, b: Union[bytes, bytearray]) -> int: ... class BufferedRandom(BufferedReader, BufferedWriter): def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... class BufferedRWPair(BufferedIOBase): def __init__(self, reader: RawIOBase, writer: RawIOBase, buffer_size: int = ...) -> None: ... class TextIOBase(IOBase): encoding: str errors: Optional[str] newlines: Union[str, Tuple[str, ...], None] def __iter__(self) -> Iterator[str]: ... # type: ignore def __next__(self) -> str: ... # type: ignore def detach(self) -> IOBase: ... def write(self, s: str) -> int: ... def writelines(self, lines: List[str]) -> None: ... # type: ignore def readline(self, size: int = ...) -> str: ... # type: ignore def readlines(self, hint: int = ...) -> List[str]: ... # type: ignore def read(self, size: Optional[int] = ...) -> str: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... # TODO should extend from TextIOBase class TextIOWrapper(TextIO): line_buffering: bool # TODO uncomment after fixing mypy about using write_through # def __init__(self, buffer: IO[bytes], encoding: str = ..., # errors: Optional[str] = ..., newline: Optional[str] = ..., # line_buffering: bool = ..., write_through: bool = ...) \ # -> None: ... def __init__( self, buffer: IO[bytes], encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., line_buffering: bool = ..., write_through: bool = ... ) -> None: ... # copied from IOBase def __exit__(self, t: Optional[Type[BaseException]] = ..., value: Optional[BaseException] = ..., traceback: Optional[TracebackType] = ...) -> Optional[bool]: ... def close(self) -> None: ... def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def readable(self) -> bool: ... def readlines(self, hint: int = ...) -> List[str]: ... def seekable(self) -> bool: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... # TODO should be the next line instead # def writelines(self, lines: List[str]) -> None: ... def writelines(self, lines: Any) -> None: ... def __del__(self) -> None: ... closed: bool # copied from TextIOBase encoding: str errors: Optional[str] newlines: Union[str, Tuple[str, ...], None] def __iter__(self) -> Iterator[str]: ... def __next__(self) -> str: ... def __enter__(self) -> TextIO: ... def detach(self) -> IOBase: ... def write(self, s: str) -> int: ... def readline(self, size: int = ...) -> str: ... def read(self, size: Optional[int] = ...) -> str: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... class StringIO(TextIOWrapper): def __init__(self, initial_value: str = ..., newline: Optional[str] = ...) -> None: ... # StringIO does not contain a "name" field. This workaround is necessary # to allow StringIO sub-classes to add this field, as it is defined # as a read-only property on IO[]. name: Any def getvalue(self) -> str: ... def __enter__(self) -> StringIO: ... class IncrementalNewlineDecoder(codecs.IncrementalDecoder): def __init__(self, decoder: Optional[codecs.IncrementalDecoder], translate: bool, errors: str = ...) -> None: ... def decode(self, input: Union[bytes, str], final: bool = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/shelve.pyi0000664000175000017500000000305213577124116023130 0ustar davedave00000000000000from typing import Any, Dict, Iterator, Optional, Tuple import collections class Shelf(collections.MutableMapping[Any, Any]): def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ... def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... def __contains__(self, key: Any) -> bool: ... # key should be str, but it would conflict with superclass's type signature def get(self, key: str, default: Any = ...) -> Any: ... def __getitem__(self, key: str) -> Any: ... def __setitem__(self, key: str, value: Any) -> None: ... def __delitem__(self, key: str) -> None: ... def __enter__(self) -> Shelf: ... def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ... def close(self) -> None: ... def __del__(self) -> None: ... def sync(self) -> None: ... class BsdDbShelf(Shelf): def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ... def set_location(self, key: Any) -> Tuple[str, Any]: ... def next(self) -> Tuple[str, Any]: ... def previous(self) -> Tuple[str, Any]: ... def first(self) -> Tuple[str, Any]: ... def last(self) -> Tuple[str, Any]: ... class DbfilenameShelf(Shelf): def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ... def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/resource.pyi0000664000175000017500000000222013577124116023465 0ustar davedave00000000000000# Stubs for resource # NOTE: These are incomplete! from typing import Tuple, Optional, NamedTuple RLIMIT_AS: int RLIMIT_CORE: int RLIMIT_CPU: int RLIMIT_DATA: int RLIMIT_FSIZE: int RLIMIT_MEMLOCK: int RLIMIT_MSGQUEUE: int RLIMIT_NICE: int RLIMIT_NOFILE: int RLIMIT_NPROC: int RLIMIT_OFILE: int RLIMIT_RSS: int RLIMIT_RTPRIO: int RLIMIT_RTTIME: int RLIMIT_SIGPENDING: int RLIMIT_STACK: int RLIM_INFINITY: int RUSAGE_CHILDREN: int RUSAGE_SELF: int RUSAGE_THREAD: int class _RUsage(NamedTuple): ru_utime: float ru_stime: float ru_maxrss: int ru_ixrss: int ru_idrss: int ru_isrss: int ru_minflt: int ru_majflt: int ru_nswap: int ru_inblock: int ru_oublock: int ru_msgsnd: int ru_msgrcv: int ru_nsignals: int ru_nvcsw: int ru_nivcsw: int def getpagesize() -> int: ... def getrlimit(resource: int) -> Tuple[int, int]: ... def getrusage(who: int) -> _RUsage: ... def prlimit(pid: int, resource: int, limits: Optional[Tuple[int, int]]) -> Tuple[int, int]: ... def setrlimit(resource: int, limits: Tuple[int, int]) -> None: ... # NOTE: This is an alias of OSError in Python 3.3. class error(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/itertools.pyi0000664000175000017500000001041613577124116023670 0ustar davedave00000000000000# Stubs for itertools # Based on http://docs.python.org/3.2/library/itertools.html from typing import (Iterator, TypeVar, Iterable, overload, Any, Callable, Tuple, Generic, Optional) import sys _T = TypeVar('_T') _S = TypeVar('_S') _N = TypeVar('_N', int, float) Predicate = Callable[[_T], object] def count(start: _N = ..., step: _N = ...) -> Iterator[_N]: ... # more general types? def cycle(iterable: Iterable[_T]) -> Iterator[_T]: ... @overload def repeat(object: _T) -> Iterator[_T]: ... @overload def repeat(object: _T, times: int) -> Iterator[_T]: ... if sys.version_info >= (3, 8): @overload def accumulate(iterable: Iterable[_T], func: Callable[[_T, _T], _T] = ...) -> Iterator[_T]: ... @overload def accumulate(iterable: Iterable[_T], func: Callable[[_S, _T], _S], initial: Optional[_S]) -> Iterator[_S]: ... else: def accumulate(iterable: Iterable[_T], func: Callable[[_T, _T], _T] = ...) -> Iterator[_T]: ... class chain(Iterator[_T], Generic[_T]): def __init__(self, *iterables: Iterable[_T]) -> None: ... def __next__(self) -> _T: ... def __iter__(self) -> Iterator[_T]: ... @staticmethod def from_iterable(iterable: Iterable[Iterable[_S]]) -> Iterator[_S]: ... def compress(data: Iterable[_T], selectors: Iterable[Any]) -> Iterator[_T]: ... def dropwhile(predicate: Predicate[_T], iterable: Iterable[_T]) -> Iterator[_T]: ... def filterfalse(predicate: Optional[Predicate[_T]], iterable: Iterable[_T]) -> Iterator[_T]: ... @overload def groupby(iterable: Iterable[_T], key: None = ...) -> Iterator[Tuple[_T, Iterator[_T]]]: ... @overload def groupby(iterable: Iterable[_T], key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ... @overload def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ... @overload def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> Iterator[_T]: ... def starmap(func: Callable[..., _S], iterable: Iterable[Iterable[Any]]) -> Iterator[_S]: ... def takewhile(predicate: Predicate[_T], iterable: Iterable[_T]) -> Iterator[_T]: ... def tee(iterable: Iterable[_T], n: int = ...) -> Tuple[Iterator[_T], ...]: ... def zip_longest(*p: Iterable[Any], fillvalue: Any = ...) -> Iterator[Any]: ... _T1 = TypeVar('_T1') _T2 = TypeVar('_T2') _T3 = TypeVar('_T3') _T4 = TypeVar('_T4') _T5 = TypeVar('_T5') _T6 = TypeVar('_T6') @overload def product(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, _T3, _T4]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... @overload def product(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], iter4: Iterable[_T4], iter5: Iterable[_T5], iter6: Iterable[_T6]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ... @overload def product(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any], iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any], iter7: Iterable[Any], *iterables: Iterable[Any]) -> Iterator[Tuple[Any, ...]]: ... @overload def product(*iterables: Iterable[Any], repeat: int = ...) -> Iterator[Tuple[Any, ...]]: ... def permutations(iterable: Iterable[_T], r: Optional[int] = ...) -> Iterator[Tuple[_T, ...]]: ... def combinations(iterable: Iterable[_T], r: int) -> Iterator[Tuple[_T, ...]]: ... def combinations_with_replacement(iterable: Iterable[_T], r: int) -> Iterator[Tuple[_T, ...]]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/stat.pyi0000664000175000017500000000353513577124116022623 0ustar davedave00000000000000# Stubs for stat # Based on http://docs.python.org/3.2/library/stat.html import sys def S_ISDIR(mode: int) -> bool: ... def S_ISCHR(mode: int) -> bool: ... def S_ISBLK(mode: int) -> bool: ... def S_ISREG(mode: int) -> bool: ... def S_ISFIFO(mode: int) -> bool: ... def S_ISLNK(mode: int) -> bool: ... def S_ISSOCK(mode: int) -> bool: ... def S_IMODE(mode: int) -> int: ... def S_IFMT(mode: int) -> int: ... def filemode(mode: int) -> str: ... ST_MODE: int ST_INO: int ST_DEV: int ST_NLINK: int ST_UID: int ST_GID: int ST_SIZE: int ST_ATIME: int ST_MTIME: int ST_CTIME: int S_IFSOCK: int S_IFLNK: int S_IFREG: int S_IFBLK: int S_IFDIR: int S_IFCHR: int S_IFIFO: int S_ISUID: int S_ISGID: int S_ISVTX: int S_IRWXU: int S_IRUSR: int S_IWUSR: int S_IXUSR: int S_IRWXG: int S_IRGRP: int S_IWGRP: int S_IXGRP: int S_IRWXO: int S_IROTH: int S_IWOTH: int S_IXOTH: int S_ENFMT: int S_IREAD: int S_IWRITE: int S_IEXEC: int UF_NODUMP: int UF_IMMUTABLE: int UF_APPEND: int UF_OPAQUE: int UF_NOUNLINK: int if sys.platform == 'darwin': UF_COMPRESSED: int # OS X 10.6+ only UF_HIDDEN: int # OX X 10.5+ only SF_ARCHIVED: int SF_IMMUTABLE: int SF_APPEND: int SF_NOUNLINK: int SF_SNAPSHOT: int FILE_ATTRIBUTE_ARCHIVE: int FILE_ATTRIBUTE_COMPRESSED: int FILE_ATTRIBUTE_DEVICE: int FILE_ATTRIBUTE_DIRECTORY: int FILE_ATTRIBUTE_ENCRYPTED: int FILE_ATTRIBUTE_HIDDEN: int FILE_ATTRIBUTE_INTEGRITY_STREAM: int FILE_ATTRIBUTE_NORMAL: int FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: int FILE_ATTRIBUTE_NO_SCRUB_DATA: int FILE_ATTRIBUTE_OFFLINE: int FILE_ATTRIBUTE_READONLY: int FILE_ATTRIBUTE_REPARSE_POINT: int FILE_ATTRIBUTE_SPARSE_FILE: int FILE_ATTRIBUTE_SYSTEM: int FILE_ATTRIBUTE_TEMPORARY: int FILE_ATTRIBUTE_VIRTUAL: int if sys.platform == "win32" and sys.version_info >= (3, 8): IO_REPARSE_TAG_SYMLINK: int IO_REPARSE_TAG_MOUNT_POINT: int IO_REPARSE_TAG_APPEXECLINK: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/string.pyi0000664000175000017500000000304313577124116023150 0ustar davedave00000000000000# Stubs for string # Based on http://docs.python.org/3.2/library/string.html from typing import Mapping, Sequence, Any, Optional, Union, Tuple, Iterable ascii_letters: str ascii_lowercase: str ascii_uppercase: str digits: str hexdigits: str octdigits: str punctuation: str printable: str whitespace: str def capwords(s: str, sep: str = ...) -> str: ... class Template: template: str def __init__(self, template: str) -> None: ... def substitute(self, mapping: Mapping[str, object] = ..., **kwds: object) -> str: ... def safe_substitute(self, mapping: Mapping[str, object] = ..., **kwds: object) -> str: ... # TODO(MichalPokorny): This is probably badly and/or loosely typed. class Formatter: def format(self, format_string: str, *args: Any, **kwargs: Any) -> str: ... def vformat(self, format_string: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> str: ... def parse(self, format_string: str) -> Iterable[Tuple[str, Optional[str], Optional[str], Optional[str]]]: ... def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ... def get_value(self, key: Union[int, str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ... def check_unused_args(self, used_args: Sequence[Union[int, str]], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ... def format_field(self, value: Any, format_spec: str) -> Any: ... def convert_field(self, value: Any, conversion: str) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/re.pyi0000664000175000017500000001200613577124116022247 0ustar davedave00000000000000# Stubs for re # Ron Murawski # 'bytes' support added by Jukka Lehtosalo # based on: http://docs.python.org/3.2/library/re.html # and http://hg.python.org/cpython/file/618ea5612e83/Lib/re.py import sys from typing import ( List, Iterator, overload, Callable, Tuple, AnyStr, Any, Optional, Union ) # ----- re variables and constants ----- if sys.version_info >= (3, 7): from typing import Pattern as Pattern, Match as Match else: from typing import Pattern, Match if sys.version_info >= (3, 6): import enum class RegexFlag(enum.IntFlag): A: int ASCII: int DEBUG: int I: int IGNORECASE: int L: int LOCALE: int M: int MULTILINE: int S: int DOTALL: int X: int VERBOSE: int U: int UNICODE: int T: int TEMPLATE: int A = RegexFlag.A ASCII = RegexFlag.ASCII DEBUG = RegexFlag.DEBUG I = RegexFlag.I IGNORECASE = RegexFlag.IGNORECASE L = RegexFlag.L LOCALE = RegexFlag.LOCALE M = RegexFlag.M MULTILINE = RegexFlag.MULTILINE S = RegexFlag.S DOTALL = RegexFlag.DOTALL X = RegexFlag.X VERBOSE = RegexFlag.VERBOSE U = RegexFlag.U UNICODE = RegexFlag.UNICODE T = RegexFlag.T TEMPLATE = RegexFlag.TEMPLATE _FlagsType = Union[int, RegexFlag] else: A: int ASCII: int DEBUG: int I: int IGNORECASE: int L: int LOCALE: int M: int MULTILINE: int S: int DOTALL: int X: int VERBOSE: int U: int UNICODE: int T: int TEMPLATE: int _FlagsType = int if sys.version_info < (3, 7): # undocumented _pattern_type: type class error(Exception): ... @overload def compile(pattern: AnyStr, flags: _FlagsType = ...) -> Pattern[AnyStr]: ... @overload def compile(pattern: Pattern[AnyStr], flags: _FlagsType = ...) -> Pattern[AnyStr]: ... @overload def search(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... @overload def search(pattern: Pattern[AnyStr], string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... @overload def match(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... @overload def match(pattern: Pattern[AnyStr], string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... # New in Python 3.4 @overload def fullmatch(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... @overload def fullmatch(pattern: Pattern[AnyStr], string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... @overload def split(pattern: AnyStr, string: AnyStr, maxsplit: int = ..., flags: _FlagsType = ...) -> List[AnyStr]: ... @overload def split(pattern: Pattern[AnyStr], string: AnyStr, maxsplit: int = ..., flags: _FlagsType = ...) -> List[AnyStr]: ... @overload def findall(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> List[Any]: ... @overload def findall(pattern: Pattern[AnyStr], string: AnyStr, flags: _FlagsType = ...) -> List[Any]: ... # Return an iterator yielding match objects over all non-overlapping matches # for the RE pattern in string. The string is scanned left-to-right, and # matches are returned in the order found. Empty matches are included in the # result unless they touch the beginning of another match. @overload def finditer(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> Iterator[Match[AnyStr]]: ... @overload def finditer(pattern: Pattern[AnyStr], string: AnyStr, flags: _FlagsType = ...) -> Iterator[Match[AnyStr]]: ... @overload def sub(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> AnyStr: ... @overload def sub(pattern: AnyStr, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> AnyStr: ... @overload def sub(pattern: Pattern[AnyStr], repl: AnyStr, string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> AnyStr: ... @overload def sub(pattern: Pattern[AnyStr], repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> AnyStr: ... @overload def subn(pattern: AnyStr, repl: AnyStr, string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> Tuple[AnyStr, int]: ... @overload def subn(pattern: AnyStr, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> Tuple[AnyStr, int]: ... @overload def subn(pattern: Pattern[AnyStr], repl: AnyStr, string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> Tuple[AnyStr, int]: ... @overload def subn(pattern: Pattern[AnyStr], repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ..., flags: _FlagsType = ...) -> Tuple[AnyStr, int]: ... def escape(string: AnyStr) -> AnyStr: ... def purge() -> None: ... def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: _FlagsType = ...) -> Pattern[AnyStr]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/atexit.pyi0000664000175000017500000000047113577124116023142 0ustar davedave00000000000000"""Stub file for the 'atexit' module.""" from typing import Any, Callable def _clear() -> None: ... def _ncallbacks() -> int: ... def _run_exitfuncs() -> None: ... def register(func: Callable[..., Any], *args: Any, **kwargs: Any) -> Callable[..., Any]: ... def unregister(func: Callable[..., Any]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/spwd.pyi0000664000175000017500000000046613577124116022625 0ustar davedave00000000000000from typing import List, NamedTuple class struct_spwd(NamedTuple): sp_namp: str sp_pwdp: str sp_lstchg: int sp_min: int sp_max: int sp_warn: int sp_inact: int sp_expire: int sp_flag: int def getspall() -> List[struct_spwd]: ... def getspnam(name: str) -> struct_spwd: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/imp.pyi0000664000175000017500000000413213577124116022427 0ustar davedave00000000000000# Stubs for imp (Python 3.6) import os import sys import types from typing import Any, IO, List, Optional, Tuple, TypeVar, Union from _imp import (lock_held as lock_held, acquire_lock as acquire_lock, release_lock as release_lock, get_frozen_object as get_frozen_object, is_frozen_package as is_frozen_package, init_frozen as init_frozen, is_builtin as is_builtin, is_frozen as is_frozen) from _imp import create_dynamic as create_dynamic _T = TypeVar('_T') if sys.version_info >= (3, 6): _Path = Union[str, os.PathLike[str]] else: _Path = str SEARCH_ERROR: int PY_SOURCE: int PY_COMPILED: int C_EXTENSION: int PY_RESOURCE: int PKG_DIRECTORY: int C_BUILTIN: int PY_FROZEN: int PY_CODERESOURCE: int IMP_HOOK: int def new_module(name: str) -> types.ModuleType: ... def get_magic() -> bytes: ... def get_tag() -> str: ... def cache_from_source(path: _Path, debug_override: Optional[bool] = ...) -> str: ... def source_from_cache(path: _Path) -> str: ... def get_suffixes() -> List[Tuple[str, str, int]]: ... class NullImporter: def __init__(self, path: _Path) -> None: ... def find_module(self, fullname: Any) -> None: ... # PathLike doesn't work for the pathname argument here def load_source(name: str, pathname: str, file: Optional[IO[Any]] = ...) -> types.ModuleType: ... def load_compiled(name: str, pathname: str, file: Optional[IO[Any]] = ...) -> types.ModuleType: ... def load_package(name: str, path: _Path) -> types.ModuleType: ... def load_module(name: str, file: IO[Any], filename: str, details: Tuple[str, str, int]) -> types.ModuleType: ... if sys.version_info >= (3, 6): def find_module(name: str, path: Union[None, List[str], List[os.PathLike[str]], List[_Path]] = ...) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ... else: def find_module(name: str, path: Optional[List[str]] = ...) -> Tuple[IO[Any], str, Tuple[str, str, int]]: ... def reload(module: types.ModuleType) -> types.ModuleType: ... def init_builtin(name: str) -> Optional[types.ModuleType]: ... def load_dynamic(name: str, path: str, file: Optional[IO[Any]] = ...) -> types.ModuleType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/json/0000775000175000017500000000000013577125145022073 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/json/__init__.pyi0000664000175000017500000000433213577124116024354 0ustar davedave00000000000000import sys from typing import Any, IO, Optional, Tuple, Callable, Dict, List, Union, Protocol, Type from .decoder import JSONDecoder as JSONDecoder from .encoder import JSONEncoder as JSONEncoder from .decoder import JSONDecodeError as JSONDecodeError def dumps(obj: Any, skipkeys: bool = ..., ensure_ascii: bool = ..., check_circular: bool = ..., allow_nan: bool = ..., cls: Optional[Type[JSONEncoder]] = ..., indent: Union[None, int, str] = ..., separators: Optional[Tuple[str, str]] = ..., default: Optional[Callable[[Any], Any]] = ..., sort_keys: bool = ..., **kwds: Any) -> str: ... def dump(obj: Any, fp: IO[str], skipkeys: bool = ..., ensure_ascii: bool = ..., check_circular: bool = ..., allow_nan: bool = ..., cls: Optional[Type[JSONEncoder]] = ..., indent: Union[None, int, str] = ..., separators: Optional[Tuple[str, str]] = ..., default: Optional[Callable[[Any], Any]] = ..., sort_keys: bool = ..., **kwds: Any) -> None: ... if sys.version_info >= (3, 6): _LoadsString = Union[str, bytes, bytearray] else: _LoadsString = str def loads(s: _LoadsString, encoding: Any = ..., # ignored and deprecated cls: Optional[Type[JSONDecoder]] = ..., object_hook: Optional[Callable[[Dict[Any, Any]], Any]] = ..., parse_float: Optional[Callable[[str], Any]] = ..., parse_int: Optional[Callable[[str], Any]] = ..., parse_constant: Optional[Callable[[str], Any]] = ..., object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ..., **kwds: Any) -> Any: ... class _Reader(Protocol): def read(self) -> _LoadsString: ... def load(fp: _Reader, cls: Optional[Type[JSONDecoder]] = ..., object_hook: Optional[Callable[[Dict[Any, Any]], Any]] = ..., parse_float: Optional[Callable[[str], Any]] = ..., parse_int: Optional[Callable[[str], Any]] = ..., parse_constant: Optional[Callable[[str], Any]] = ..., object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ..., **kwds: Any) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/json/decoder.pyi0000664000175000017500000000203413577124116024217 0ustar davedave00000000000000from typing import Any, Callable, Dict, List, Optional, Tuple class JSONDecodeError(ValueError): msg: str doc: str pos: int lineno: int colno: int def __init__(self, msg: str, doc: str, pos: int) -> None: ... class JSONDecoder: object_hook: Callable[[Dict[str, Any]], Any] parse_float: Callable[[str], Any] parse_int: Callable[[str], Any] parse_constant = ... # Callable[[str], Any] strict: bool object_pairs_hook: Callable[[List[Tuple[str, Any]]], Any] def __init__(self, object_hook: Optional[Callable[[Dict[str, Any]], Any]] = ..., parse_float: Optional[Callable[[str], Any]] = ..., parse_int: Optional[Callable[[str], Any]] = ..., parse_constant: Optional[Callable[[str], Any]] = ..., strict: bool = ..., object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...) -> None: ... def decode(self, s: str) -> Any: ... def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/json/encoder.pyi0000664000175000017500000000134613577124116024236 0ustar davedave00000000000000from typing import Any, Callable, Iterator, Optional, Tuple class JSONEncoder: item_separator: str key_separator: str skipkeys: bool ensure_ascii: bool check_circular: bool allow_nan: bool sort_keys: bool indent: int def __init__(self, skipkeys: bool = ..., ensure_ascii: bool = ..., check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ..., indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ..., default: Optional[Callable[..., Any]] = ...) -> None: ... def default(self, o: Any) -> Any: ... def encode(self, o: Any) -> str: ... def iterencode(self, o: Any, _one_shot: bool = ...) -> Iterator[str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_winapi.pyi0000664000175000017500000001001213577124116023262 0ustar davedave00000000000000import sys from typing import Any, Union, Tuple, Optional, overload, Dict, NoReturn, Sequence if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal CREATE_NEW_CONSOLE: int CREATE_NEW_PROCESS_GROUP: int DUPLICATE_CLOSE_SOURCE: int DUPLICATE_SAME_ACCESS: int ERROR_ALREADY_EXISTS: int ERROR_BROKEN_PIPE: int ERROR_IO_PENDING: int ERROR_MORE_DATA: int ERROR_NETNAME_DELETED: int ERROR_NO_DATA: int ERROR_NO_SYSTEM_RESOURCES: int ERROR_OPERATION_ABORTED: int ERROR_PIPE_BUSY: int ERROR_PIPE_CONNECTED: int ERROR_SEM_TIMEOUT: int FILE_FLAG_FIRST_PIPE_INSTANCE: int FILE_FLAG_OVERLAPPED: int FILE_GENERIC_READ: int FILE_GENERIC_WRITE: int GENERIC_READ: int GENERIC_WRITE: int INFINITE: int NMPWAIT_WAIT_FOREVER: int NULL: int OPEN_EXISTING: int PIPE_ACCESS_DUPLEX: int PIPE_ACCESS_INBOUND: int PIPE_READMODE_MESSAGE: int PIPE_TYPE_MESSAGE: int PIPE_UNLIMITED_INSTANCES: int PIPE_WAIT: int PROCESS_ALL_ACCESS: int PROCESS_DUP_HANDLE: int STARTF_USESHOWWINDOW: int STARTF_USESTDHANDLES: int STD_ERROR_HANDLE: int STD_INPUT_HANDLE: int STD_OUTPUT_HANDLE: int STILL_ACTIVE: int SW_HIDE: int WAIT_ABANDONED_0: int WAIT_OBJECT_0: int WAIT_TIMEOUT: int def CloseHandle(handle: int) -> None: ... @overload def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ... @overload def ConnectNamedPipe(handle: int, overlapped: Literal[False] = ...) -> None: ... @overload def ConnectNamedPipe(handle: int, overlapped: bool) -> Any: ... def CreateFile(file_name: str, desired_access: int, share_mode: int, security_attributes: int, creation_disposition: int, flags_and_attributes: int, template_file: int) -> int: ... def CreateJunction(src_path: str, dest_path: str) -> None: ... def CreateNamedPipe(name: str, open_mode: int, pipe_mode: int, max_instances: int, out_buffer_size: int, in_buffer_size: int, default_timeout: int, security_attributes: int) -> int: ... def CreatePipe(pipe_attrs: Any, size: int) -> Tuple[int, int]: ... def CreateProcess(application_name: Optional[str], command_line: Optional[str], proc_attrs: Any, thread_attrs: Any, inherit_handles: bool, creation_flags: int, env_mapping: Dict[str, str], cwd: Optional[str], startup_info: Any) -> Tuple[int, int, int, int]: ... def DuplicateHandle(source_process_handle: int, source_handle: int, target_process_handle: int, desired_access: int, inherit_handle: bool, options: int = ...) -> int: ... def ExitProcess(ExitCode: int) -> NoReturn: ... def GetACP() -> int: ... def GetFileType(handle: int) -> int: ... def GetCurrentProcess() -> int: ... def GetExitCodeProcess(process: int) -> int: ... def GetLastError() -> int: ... def GetModuleFileName(module_handle: int) -> str: ... def GetStdHandle(std_handle: int) -> int: ... def GetVersion() -> int: ... def OpenProcess(desired_access: int, inherit_handle: bool, process_id: int) -> int: ... def PeekNamedPipe(handle: int, size: int = ...) -> Union[Tuple[int, int], Tuple[bytes, int, int]]: ... # TODO: once literal types are supported, overload with Literal[True/False] @overload def ReadFile(handle: int, size: int, overlapped: Union[int, bool]) -> Any: ... @overload def ReadFile(handle: int, size: int) -> Tuple[int, int]: ... def SetNamedPipeHandleState(named_pipe: int, mode: Optional[int], max_collection_count: Optional[int], collect_data_timeout: Optional[int]) -> None: ... def TerminateProcess(handle: int, exit_code: int) -> None: ... def WaitForMultipleObjects(handle_seq: Sequence[int], wait_flag: bool, milliseconds: int = ...) -> int: ... def WaitForSingleObject(handle: int, milliseconds: int) -> int: ... def WaitNamedPipe(name: str, timeout: int) -> None: ... # TODO: once literal types are supported, overload with Literal[True/False] @overload def WriteFile(handle: int, buffer: bytes, overlapped: Union[int, bool]) -> Any: ... @overload def WriteFile(handle: int, buffer: bytes) -> Tuple[bytes, int]: ... class Overlapped: event: int = ... def GetOverlappedResult(self, wait: bool) -> Tuple[int, int]: ... def cancel(self) -> None: ... def getbuffer(self) -> Optional[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/smtplib.pyi0000664000175000017500000001274413577124116023324 0ustar davedave00000000000000from email.message import Message as _Message from socket import socket from ssl import SSLContext from types import TracebackType from typing import Any, Dict, List, Optional, Sequence, Tuple, Union, Pattern, Type, Protocol, overload _Reply = Tuple[int, bytes] _SendErrs = Dict[str, _Reply] # Should match source_address for socket.create_connection _SourceAddress = Tuple[Union[bytearray, bytes, str], int] SMTP_PORT: int SMTP_SSL_PORT: int CRLF: str bCRLF: bytes OLDSTYLE_AUTH: Pattern[str] class SMTPException(OSError): ... class SMTPNotSupportedError(SMTPException): ... class SMTPServerDisconnected(SMTPException): ... class SMTPResponseException(SMTPException): smtp_code: int smtp_error: Union[bytes, str] args: Union[Tuple[int, Union[bytes, str]], Tuple[int, bytes, str]] def __init__(self, code: int, msg: Union[bytes, str]) -> None: ... class SMTPSenderRefused(SMTPResponseException): smtp_code: int smtp_error: bytes sender: str args: Tuple[int, bytes, str] def __init__(self, code: int, msg: bytes, sender: str) -> None: ... class SMTPRecipientsRefused(SMTPException): recipients: _SendErrs args: Tuple[_SendErrs] def __init__(self, recipients: _SendErrs) -> None: ... class SMTPDataError(SMTPResponseException): ... class SMTPConnectError(SMTPResponseException): ... class SMTPHeloError(SMTPResponseException): ... class SMTPAuthenticationError(SMTPResponseException): ... def quoteaddr(addrstring: str) -> str: ... def quotedata(data: str) -> str: ... class _AuthObject(Protocol): @overload def __call__(self, challenge: None = ...) -> Optional[str]: ... @overload def __call__(self, challenge: bytes) -> str: ... class SMTP: debuglevel: int = ... sock: Optional[socket] = ... # Type of file should match what socket.makefile() returns file: Optional[Any] = ... helo_resp: Optional[bytes] = ... ehlo_msg: str = ... ehlo_resp: Optional[bytes] = ... does_esmtp: bool = ... default_port: int = ... timeout: float esmtp_features: Dict[str, str] command_encoding: str source_address: Optional[_SourceAddress] local_hostname: str def __init__(self, host: str = ..., port: int = ..., local_hostname: Optional[str] = ..., timeout: float = ..., source_address: Optional[_SourceAddress] = ...) -> None: ... def __enter__(self) -> SMTP: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], tb: Optional[TracebackType]) -> None: ... def set_debuglevel(self, debuglevel: int) -> None: ... def connect(self, host: str = ..., port: int = ..., source_address: Optional[_SourceAddress] = ...) -> _Reply: ... def send(self, s: Union[bytes, str]) -> None: ... def putcmd(self, cmd: str, args: str = ...) -> None: ... def getreply(self) -> _Reply: ... def docmd(self, cmd: str, args: str = ...) -> _Reply: ... def helo(self, name: str = ...) -> _Reply: ... def ehlo(self, name: str = ...) -> _Reply: ... def has_extn(self, opt: str) -> bool: ... def help(self, args: str = ...) -> bytes: ... def rset(self) -> _Reply: ... def noop(self) -> _Reply: ... def mail(self, sender: str, options: Sequence[str] = ...) -> _Reply: ... def rcpt(self, recip: str, options: Sequence[str] = ...) -> _Reply: ... def data(self, msg: Union[bytes, str]) -> _Reply: ... def verify(self, address: str) -> _Reply: ... vrfy = verify def expn(self, address: str) -> _Reply: ... def ehlo_or_helo_if_needed(self) -> None: ... user: str password: str def auth(self, mechanism: str, authobject: _AuthObject, *, initial_response_ok: bool = ...) -> _Reply: ... @overload def auth_cram_md5(self, challenge: None = ...) -> None: ... @overload def auth_cram_md5(self, challenge: bytes) -> str: ... def auth_plain(self, challenge: Optional[bytes] = ...) -> str: ... def auth_login(self, challenge: Optional[bytes] = ...) -> str: ... def login(self, user: str, password: str, *, initial_response_ok: bool = ...) -> _Reply: ... def starttls(self, keyfile: Optional[str] = ..., certfile: Optional[str] = ..., context: Optional[SSLContext] = ...) -> _Reply: ... def sendmail(self, from_addr: str, to_addrs: Union[str, Sequence[str]], msg: Union[bytes, str], mail_options: Sequence[str] = ..., rcpt_options: List[str] = ...) -> _SendErrs: ... def send_message(self, msg: _Message, from_addr: Optional[str] = ..., to_addrs: Optional[Union[str, Sequence[str]]] = ..., mail_options: List[str] = ..., rcpt_options: Sequence[str] = ...) -> _SendErrs: ... def close(self) -> None: ... def quit(self) -> _Reply: ... class SMTP_SSL(SMTP): default_port: int = ... keyfile: Optional[str] certfile: Optional[str] context: SSLContext def __init__(self, host: str = ..., port: int = ..., local_hostname: Optional[str] = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., timeout: float = ..., source_address: Optional[_SourceAddress] = ..., context: Optional[SSLContext] = ...) -> None: ... LMTP_PORT: int class LMTP(SMTP): def __init__(self, host: str = ..., port: int = ..., local_hostname: Optional[str] = ..., source_address: Optional[_SourceAddress] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/lzma.pyi0000664000175000017500000000631113577124116022606 0ustar davedave00000000000000import io import sys from typing import Any, IO, Mapping, Optional, Sequence, Union if sys.version_info >= (3, 6): from os import PathLike _PathOrFile = Union[str, bytes, IO[Any], PathLike[Any]] else: _PathOrFile = Union[str, bytes, IO[Any]] _FilterChain = Sequence[Mapping[str, Any]] FORMAT_AUTO: int FORMAT_XZ: int FORMAT_ALONE: int FORMAT_RAW: int CHECK_NONE: int CHECK_CRC32: int CHECK_CRC64: int CHECK_SHA256: int CHECK_ID_MAX: int CHECK_UNKNOWN: int FILTER_LZMA1: int FILTER_LZMA2: int FILTER_DELTA: int FILTER_X86: int FILTER_IA64: int FILTER_ARM: int FILTER_ARMTHUMB: int FILTER_SPARC: int FILTER_POWERPC: int MF_HC3: int MF_HC4: int MF_BT2: int MF_BT3: int MF_BT4: int MODE_FAST: int MODE_NORMAL: int PRESET_DEFAULT: int PRESET_EXTREME: int # from _lzma.c class LZMADecompressor(object): def __init__(self, format: Optional[int] = ..., memlimit: Optional[int] = ..., filters: Optional[_FilterChain] = ...) -> None: ... def decompress(self, data: bytes, max_length: int = ...) -> bytes: ... @property def check(self) -> int: ... @property def eof(self) -> bool: ... @property def unused_data(self) -> bytes: ... @property def needs_input(self) -> bool: ... # from _lzma.c class LZMACompressor(object): def __init__(self, format: Optional[int] = ..., check: int = ..., preset: Optional[int] = ..., filters: Optional[_FilterChain] = ...) -> None: ... def compress(self, data: bytes) -> bytes: ... def flush(self) -> bytes: ... class LZMAError(Exception): ... class LZMAFile(io.BufferedIOBase, IO[bytes]): # type: ignore # python/mypy#5027 def __init__(self, filename: Optional[_PathOrFile] = ..., mode: str = ..., *, format: Optional[int] = ..., check: int = ..., preset: Optional[int] = ..., filters: Optional[_FilterChain] = ...) -> None: ... def close(self) -> None: ... @property def closed(self) -> bool: ... def fileno(self) -> int: ... def seekable(self) -> bool: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def peek(self, size: int = ...) -> bytes: ... def read(self, size: Optional[int] = ...) -> bytes: ... def read1(self, size: int = ...) -> bytes: ... def readline(self, size: int = ...) -> bytes: ... def write(self, data: bytes) -> int: ... def seek(self, offset: int, whence: int = ...) -> int: ... def tell(self) -> int: ... def open(filename: _PathOrFile, mode: str = ..., *, format: Optional[int] = ..., check: int = ..., preset: Optional[int] = ..., filters: Optional[_FilterChain] = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... def compress(data: bytes, format: int = ..., check: int = ..., preset: Optional[int] = ..., filters: Optional[_FilterChain] = ...) -> bytes: ... def decompress(data: bytes, format: int = ..., memlimit: Optional[int] = ..., filters: Optional[_FilterChain] = ...) -> bytes: ... def is_check_supported(check: int) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/gzip.pyi0000664000175000017500000000400413577124116022611 0ustar davedave00000000000000from typing import Any, IO, Optional from os.path import _PathType import _compression import sys import zlib def open(filename, mode: str = ..., compresslevel: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... class _PaddedFile: file: IO[bytes] def __init__(self, f: IO[bytes], prepend: bytes = ...) -> None: ... def read(self, size: int) -> bytes: ... def prepend(self, prepend: bytes = ...) -> None: ... def seek(self, off: int) -> int: ... def seekable(self) -> bool: ... class GzipFile(_compression.BaseStream): myfileobj: Optional[IO[bytes]] mode: str name: str compress: zlib._Compress fileobj: IO[bytes] def __init__(self, filename: Optional[_PathType] = ..., mode: Optional[str] = ..., compresslevel: int = ..., fileobj: Optional[IO[bytes]] = ..., mtime: Optional[float] = ...) -> None: ... @property def filename(self) -> str: ... @property def mtime(self) -> Optional[int]: ... crc: int def write(self, data: bytes) -> int: ... def read(self, size: Optional[int] = ...) -> bytes: ... def read1(self, size: int = ...) -> bytes: ... def peek(self, n: int) -> bytes: ... @property def closed(self) -> bool: ... def close(self) -> None: ... def flush(self, zlib_mode: int = ...) -> None: ... def fileno(self) -> int: ... def rewind(self) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def seekable(self) -> bool: ... def seek(self, offset: int, whence: int = ...) -> int: ... def readline(self, size: int = ...) -> bytes: ... class _GzipReader(_compression.DecompressReader): def __init__(self, fp: IO[bytes]) -> None: ... def read(self, size: int = ...) -> bytes: ... if sys.version_info >= (3, 8): def compress(data, compresslevel: int = ..., *, mtime: Optional[float] = ...) -> bytes: ... else: def compress(data, compresslevel: int = ...) -> bytes: ... def decompress(data: bytes) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/copyreg.pyi0000664000175000017500000000132613577124116023314 0ustar davedave00000000000000 from typing import TypeVar, Callable, Union, Tuple, Any, Optional, SupportsInt, Hashable, List _Type = TypeVar("_Type", bound=type) _Reduce = Union[Tuple[Callable[..., _Type], Tuple[Any, ...]], Tuple[Callable[..., _Type], Tuple[Any, ...], Optional[Any]]] __all__: List[str] def pickle(ob_type: _Type, pickle_function: Callable[[_Type], Union[str, _Reduce[_Type]]], constructor_ob: Optional[Callable[[_Reduce[_Type]], _Type]] = ...) -> None: ... def constructor(object: Callable[[_Reduce[_Type]], _Type]) -> None: ... def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ... def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ... def clear_extension_cache() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tokenize.pyi0000664000175000017500000000460713577124116023501 0ustar davedave00000000000000from typing import Any, Callable, Generator, Iterable, List, NamedTuple, Optional, Union, Sequence, TextIO, Tuple from builtins import open as _builtin_open import sys from token import * # noqa: F403 if sys.version_info < (3, 7): COMMENT: int NL: int ENCODING: int _Position = Tuple[int, int] class _TokenInfo(NamedTuple): type: int string: str start: _Position end: _Position line: str class TokenInfo(_TokenInfo): @property def exact_type(self) -> int: ... # Backwards compatible tokens can be sequences of a shorter length too _Token = Union[TokenInfo, Sequence[Union[int, str, _Position]]] class TokenError(Exception): ... class StopTokenizing(Exception): ... class Untokenizer: tokens: List[str] prev_row: int prev_col: int encoding: Optional[str] def __init__(self) -> None: ... def add_whitespace(self, start: _Position) -> None: ... def untokenize(self, iterable: Iterable[_Token]) -> str: ... def compat(self, token: Sequence[Union[int, str]], iterable: Iterable[_Token]) -> None: ... def untokenize(iterable: Iterable[_Token]) -> Any: ... def detect_encoding(readline: Callable[[], bytes]) -> Tuple[str, Sequence[bytes]]: ... def tokenize(readline: Callable[[], bytes]) -> Generator[TokenInfo, None, None]: ... def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo, None, None]: ... # undocumented if sys.version_info >= (3, 6): from os import PathLike def open(filename: Union[str, bytes, int, PathLike[Any]]) -> TextIO: ... else: def open(filename: Union[str, bytes, int]) -> TextIO: ... # Names in __all__ with no definition: # AMPER # AMPEREQUAL # ASYNC # AT # ATEQUAL # AWAIT # CIRCUMFLEX # CIRCUMFLEXEQUAL # COLON # COMMA # DEDENT # DOT # DOUBLESLASH # DOUBLESLASHEQUAL # DOUBLESTAR # DOUBLESTAREQUAL # ELLIPSIS # ENDMARKER # EQEQUAL # EQUAL # ERRORTOKEN # GREATER # GREATEREQUAL # INDENT # ISEOF # ISNONTERMINAL # ISTERMINAL # LBRACE # LEFTSHIFT # LEFTSHIFTEQUAL # LESS # LESSEQUAL # LPAR # LSQB # MINEQUAL # MINUS # NAME # NEWLINE # NOTEQUAL # NT_OFFSET # NUMBER # N_TOKENS # OP # PERCENT # PERCENTEQUAL # PLUS # PLUSEQUAL # RARROW # RBRACE # RIGHTSHIFT # RIGHTSHIFTEQUAL # RPAR # RSQB # SEMI # SLASH # SLASHEQUAL # STAR # STAREQUAL # STRING # TILDE # VBAR # VBAREQUAL # tok_name jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_subprocess.pyi0000664000175000017500000000237713577124116024202 0ustar davedave00000000000000# Stubs for _subprocess # NOTE: These are incomplete! from typing import Mapping, Any, Tuple CREATE_NEW_CONSOLE: int CREATE_NEW_PROCESS_GROUP: int STD_INPUT_HANDLE: int STD_OUTPUT_HANDLE: int STD_ERROR_HANDLE: int SW_HIDE: int STARTF_USESTDHANDLES: int STARTF_USESHOWWINDOW: int INFINITE: int DUPLICATE_SAME_ACCESS: int WAIT_OBJECT_0: int # TODO not exported by the Python module class Handle: def Close(self) -> None: ... def GetVersion() -> int: ... def GetExitCodeProcess(handle: Handle) -> int: ... def WaitForSingleObject(handle: Handle, timeout: int) -> int: ... def CreateProcess(executable: str, cmd_line: str, proc_attrs, thread_attrs, inherit: int, flags: int, env_mapping: Mapping[str, str], curdir: str, startupinfo: Any) -> Tuple[Any, Handle, int, int]: ... def GetModuleFileName(module: int) -> str: ... def GetCurrentProcess() -> Handle: ... def DuplicateHandle(source_proc: Handle, source: Handle, target_proc: Handle, target: Any, access: int, inherit: int) -> int: ... def CreatePipe(pipe_attrs, size: int) -> Tuple[Handle, Handle]: ... def GetStdHandle(arg: int) -> int: ... def TerminateProcess(handle: Handle, exit_code: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/sys.pyi0000664000175000017500000001347513577124116022472 0ustar davedave00000000000000# Stubs for sys # Ron Murawski # based on http://docs.python.org/3.2/library/sys.html from typing import ( List, NoReturn, Sequence, Any, Dict, Tuple, TextIO, overload, Optional, Union, TypeVar, Callable, Type ) import sys from types import FrameType, ModuleType, TracebackType from importlib.abc import MetaPathFinder _T = TypeVar('_T') # The following type alias are stub-only and do not exist during runtime _ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType] _OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]] # ----- sys variables ----- abiflags: str argv: List[str] base_exec_prefix: str base_prefix: str byteorder: str builtin_module_names: Sequence[str] # actually a tuple of strings copyright: str # dllhandle = 0 # Windows only dont_write_bytecode: bool __displayhook__: Any # contains the original value of displayhook __excepthook__: Any # contains the original value of excepthook exec_prefix: str executable: str float_repr_style: str hexversion: int last_type: Optional[Type[BaseException]] last_value: Optional[BaseException] last_traceback: Optional[TracebackType] maxsize: int maxunicode: int meta_path: List[MetaPathFinder] modules: Dict[str, ModuleType] path: List[str] path_hooks: List[Any] # TODO precise type; function, path to finder path_importer_cache: Dict[str, Any] # TODO precise type platform: str prefix: str if sys.version_info >= (3, 8): pycache_prefix: Optional[str] ps1: str ps2: str stdin: TextIO stdout: TextIO stderr: TextIO __stdin__: TextIO __stdout__: TextIO __stderr__: TextIO tracebacklimit: int version: str api_version: int warnoptions: Any # Each entry is a tuple of the form (action, message, category, module, # lineno) # winver = '' # Windows only _xoptions: Dict[Any, Any] flags: _flags class _flags: debug: int division_warning: int inspect: int interactive: int optimize: int dont_write_bytecode: int no_user_site: int no_site: int ignore_environment: int verbose: int bytes_warning: int quiet: int hash_randomization: int if sys.version_info >= (3, 7): dev_mode: int utf8_mode: int float_info: _float_info class _float_info: epsilon: float # DBL_EPSILON dig: int # DBL_DIG mant_dig: int # DBL_MANT_DIG max: float # DBL_MAX max_exp: int # DBL_MAX_EXP max_10_exp: int # DBL_MAX_10_EXP min: float # DBL_MIN min_exp: int # DBL_MIN_EXP min_10_exp: int # DBL_MIN_10_EXP radix: int # FLT_RADIX rounds: int # FLT_ROUNDS hash_info: _hash_info class _hash_info: width: int modulus: int inf: int nan: int imag: int implementation: _implementation class _implementation: name: str version: _version_info hexversion: int cache_tag: str int_info: _int_info class _int_info: bits_per_digit: int sizeof_digit: int class _version_info(Tuple[int, int, int, str, int]): major: int minor: int micro: int releaselevel: str serial: int version_info: _version_info def call_tracing(fn: Callable[..., _T], args: Any) -> _T: ... def _clear_type_cache() -> None: ... def _current_frames() -> Dict[int, Any]: ... def _debugmallocstats() -> None: ... def displayhook(value: Optional[int]) -> None: ... def excepthook(type_: Type[BaseException], value: BaseException, traceback: TracebackType) -> None: ... def exc_info() -> _OptExcInfo: ... # sys.exit() accepts an optional argument of anything printable def exit(arg: object = ...) -> NoReturn: ... def getcheckinterval() -> int: ... # deprecated def getdefaultencoding() -> str: ... if sys.platform != 'win32': # Unix only def getdlopenflags() -> int: ... def getfilesystemencoding() -> str: ... def getrefcount(arg: Any) -> int: ... def getrecursionlimit() -> int: ... @overload def getsizeof(obj: object) -> int: ... @overload def getsizeof(obj: object, default: int) -> int: ... def getswitchinterval() -> float: ... @overload def _getframe() -> FrameType: ... @overload def _getframe(depth: int) -> FrameType: ... _ProfileFunc = Callable[[FrameType, str, Any], Any] def getprofile() -> Optional[_ProfileFunc]: ... def setprofile(profilefunc: Optional[_ProfileFunc]) -> None: ... _TraceFunc = Callable[[FrameType, str, Any], Optional[Callable[[FrameType, str, Any], Any]]] def gettrace() -> Optional[_TraceFunc]: ... def settrace(tracefunc: Optional[_TraceFunc]) -> None: ... class _WinVersion(Tuple[int, int, int, int, str, int, int, int, int, Tuple[int, int, int]]): major: int minor: int build: int platform: int service_pack: str service_pack_minor: int service_pack_major: int suite_mast: int product_type: int platform_version: Tuple[int, int, int] def getwindowsversion() -> _WinVersion: ... # Windows only def intern(string: str) -> str: ... def is_finalizing() -> bool: ... if sys.version_info >= (3, 7): __breakpointhook__: Any # contains the original value of breakpointhook def breakpointhook(*args: Any, **kwargs: Any) -> Any: ... def setcheckinterval(interval: int) -> None: ... # deprecated def setdlopenflags(n: int) -> None: ... # Linux only def setrecursionlimit(limit: int) -> None: ... def setswitchinterval(interval: float) -> None: ... def settscdump(on_flag: bool) -> None: ... def gettotalrefcount() -> int: ... # Debug builds only if sys.version_info >= (3, 8): # not exported by sys class UnraisableHookArgs: exc_type: Type[BaseException] exc_value: Optional[BaseException] exc_traceback: Optional[TracebackType] err_msg: Optional[str] object: Optional[object] unraisablehook: Callable[[UnraisableHookArgs], Any] def addaudithook(hook: Callable[[str, Tuple[Any, ...]], Any]) -> None: ... def audit(__event: str, *args: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/functools.pyi0000664000175000017500000000675013577124116023666 0ustar davedave00000000000000import sys from typing import Any, Callable, Generic, Dict, Iterable, Mapping, Optional, Sequence, Tuple, Type, TypeVar, NamedTuple, Union, overload _AnyCallable = Callable[..., Any] _T = TypeVar("_T") _S = TypeVar("_S") @overload def reduce(function: Callable[[_T, _S], _T], sequence: Iterable[_S], initial: _T) -> _T: ... @overload def reduce(function: Callable[[_T, _T], _T], sequence: Iterable[_T]) -> _T: ... class _CacheInfo(NamedTuple): hits: int misses: int maxsize: int currsize: int class _lru_cache_wrapper(Generic[_T]): __wrapped__: Callable[..., _T] def __call__(self, *args: Any, **kwargs: Any) -> _T: ... def cache_info(self) -> _CacheInfo: ... def cache_clear(self) -> None: ... if sys.version_info >= (3, 8): @overload def lru_cache(maxsize: Optional[int] = ..., typed: bool = ...) -> Callable[[Callable[..., _T]], _lru_cache_wrapper[_T]]: ... @overload def lru_cache(maxsize: Callable[..., _T], typed: bool = ...) -> _lru_cache_wrapper[_T]: ... else: def lru_cache(maxsize: Optional[int] = ..., typed: bool = ...) -> Callable[[Callable[..., _T]], _lru_cache_wrapper[_T]]: ... WRAPPER_ASSIGNMENTS: Sequence[str] WRAPPER_UPDATES: Sequence[str] def update_wrapper(wrapper: _AnyCallable, wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _AnyCallable: ... def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> Callable[[_AnyCallable], _AnyCallable]: ... def total_ordering(cls: type) -> type: ... def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], Any]: ... class partial(Generic[_T]): func: Callable[..., _T] args: Tuple[Any, ...] keywords: Dict[str, Any] def __init__(self, func: Callable[..., _T], *args: Any, **kwargs: Any) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> _T: ... # With protocols, this could change into a generic protocol that defines __get__ and returns _T _Descriptor = Any class partialmethod(Generic[_T]): func: Union[Callable[..., _T], _Descriptor] args: Tuple[Any, ...] keywords: Dict[str, Any] @overload def __init__(self, func: Callable[..., _T], *args: Any, **keywords: Any) -> None: ... @overload def __init__(self, func: _Descriptor, *args: Any, **keywords: Any) -> None: ... def __get__(self, obj: Any, cls: Type[Any]) -> Callable[..., _T]: ... @property def __isabstractmethod__(self) -> bool: ... class _SingleDispatchCallable(Generic[_T]): registry: Mapping[Any, Callable[..., _T]] def dispatch(self, cls: Any) -> Callable[..., _T]: ... @overload def register(self, cls: Any) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... @overload def register(self, cls: Any, func: Callable[..., _T]) -> Callable[..., _T]: ... def _clear_cache(self) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> _T: ... def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ... if sys.version_info >= (3, 8): class cached_property(Generic[_S, _T]): func: Callable[[_S], _T] attrname: Optional[str] def __init__(self, func: Callable[[_S], _T]) -> None: ... @overload def __get__(self, instance: None, owner: Optional[Type[_S]] = ...) -> cached_property[_S, _T]: ... @overload def __get__(self, instance: _S, owner: Optional[Type[_S]] = ...) -> _T: ... def __set_name__(self, owner: Type[_S], name: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_ast.pyi0000664000175000017500000001767413577124116022607 0ustar davedave00000000000000import sys import typing from typing import Any, Optional, ClassVar PyCF_ONLY_AST: int if sys.version_info >= (3, 8): PyCF_TYPE_COMMENTS: int PyCF_ALLOW_TOP_LEVEL_AWAIT: int _identifier = str class AST: _attributes: ClassVar[typing.Tuple[str, ...]] _fields: ClassVar[typing.Tuple[str, ...]] def __init__(self, *args: Any, **kwargs: Any) -> None: ... # TODO: Not all nodes have all of the following attributes lineno: int col_offset: int if sys.version_info >= (3, 8): end_lineno: Optional[int] end_col_offset: Optional[int] type_comment: Optional[str] class mod(AST): ... if sys.version_info >= (3, 8): class type_ignore(AST): ... class TypeIgnore(type_ignore): ... class FunctionType(mod): argtypes: typing.List[expr] returns: expr class Module(mod): body: typing.List[stmt] if sys.version_info >= (3, 7): docstring: Optional[str] if sys.version_info >= (3, 8): type_ignores: typing.List[TypeIgnore] class Interactive(mod): body: typing.List[stmt] class Expression(mod): body: expr class Suite(mod): body: typing.List[stmt] class stmt(AST): ... class FunctionDef(stmt): name: _identifier args: arguments body: typing.List[stmt] decorator_list: typing.List[expr] returns: Optional[expr] if sys.version_info >= (3, 7): docstring: Optional[str] class AsyncFunctionDef(stmt): name: _identifier args: arguments body: typing.List[stmt] decorator_list: typing.List[expr] returns: Optional[expr] if sys.version_info >= (3, 7): docstring: Optional[str] class ClassDef(stmt): name: _identifier bases: typing.List[expr] keywords: typing.List[keyword] body: typing.List[stmt] decorator_list: typing.List[expr] if sys.version_info >= (3, 7): docstring: Optional[str] class Return(stmt): value: Optional[expr] class Delete(stmt): targets: typing.List[expr] class Assign(stmt): targets: typing.List[expr] value: expr class AugAssign(stmt): target: expr op: operator value: expr if sys.version_info >= (3, 6): class AnnAssign(stmt): target: expr annotation: expr value: Optional[expr] simple: int class For(stmt): target: expr iter: expr body: typing.List[stmt] orelse: typing.List[stmt] class AsyncFor(stmt): target: expr iter: expr body: typing.List[stmt] orelse: typing.List[stmt] class While(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class If(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class With(stmt): items: typing.List[withitem] body: typing.List[stmt] class AsyncWith(stmt): items: typing.List[withitem] body: typing.List[stmt] class Raise(stmt): exc: Optional[expr] cause: Optional[expr] class Try(stmt): body: typing.List[stmt] handlers: typing.List[ExceptHandler] orelse: typing.List[stmt] finalbody: typing.List[stmt] class Assert(stmt): test: expr msg: Optional[expr] class Import(stmt): names: typing.List[alias] class ImportFrom(stmt): module: Optional[_identifier] names: typing.List[alias] level: int class Global(stmt): names: typing.List[_identifier] class Nonlocal(stmt): names: typing.List[_identifier] class Expr(stmt): value: expr class Pass(stmt): ... class Break(stmt): ... class Continue(stmt): ... class slice(AST): ... _slice = slice # this lets us type the variable named 'slice' below class Slice(slice): lower: Optional[expr] upper: Optional[expr] step: Optional[expr] class ExtSlice(slice): dims: typing.List[slice] class Index(slice): value: expr class expr(AST): ... class BoolOp(expr): op: boolop values: typing.List[expr] class BinOp(expr): left: expr op: operator right: expr class UnaryOp(expr): op: unaryop operand: expr class Lambda(expr): args: arguments body: expr class IfExp(expr): test: expr body: expr orelse: expr class Dict(expr): keys: typing.List[Optional[expr]] values: typing.List[expr] class Set(expr): elts: typing.List[expr] class ListComp(expr): elt: expr generators: typing.List[comprehension] class SetComp(expr): elt: expr generators: typing.List[comprehension] class DictComp(expr): key: expr value: expr generators: typing.List[comprehension] class GeneratorExp(expr): elt: expr generators: typing.List[comprehension] class Await(expr): value: expr class Yield(expr): value: Optional[expr] class YieldFrom(expr): value: expr class Compare(expr): left: expr ops: typing.List[cmpop] comparators: typing.List[expr] class Call(expr): func: expr args: typing.List[expr] keywords: typing.List[keyword] class Num(expr): # Deprecated in 3.8; use Constant n: complex class Str(expr): # Deprecated in 3.8; use Constant s: str if sys.version_info >= (3, 6): class FormattedValue(expr): value: expr conversion: Optional[int] format_spec: Optional[expr] class JoinedStr(expr): values: typing.List[expr] class Bytes(expr): # Deprecated in 3.8; use Constant s: bytes class NameConstant(expr): value: Any if sys.version_info >= (3, 6): class Constant(expr): value: Any # None, str, bytes, bool, int, float, complex, Ellipsis kind: Optional[str] # Aliases for value, for backwards compatibility s: Any n: complex if sys.version_info >= (3, 8): class NamedExpr(expr): target: expr value: expr class Ellipsis(expr): ... class Attribute(expr): value: expr attr: _identifier ctx: expr_context class Subscript(expr): value: expr slice: _slice ctx: expr_context class Starred(expr): value: expr ctx: expr_context class Name(expr): id: _identifier ctx: expr_context class List(expr): elts: typing.List[expr] ctx: expr_context class Tuple(expr): elts: typing.List[expr] ctx: expr_context class expr_context(AST): ... class AugLoad(expr_context): ... class AugStore(expr_context): ... class Del(expr_context): ... class Load(expr_context): ... class Param(expr_context): ... class Store(expr_context): ... class boolop(AST): ... class And(boolop): ... class Or(boolop): ... class operator(AST): ... class Add(operator): ... class BitAnd(operator): ... class BitOr(operator): ... class BitXor(operator): ... class Div(operator): ... class FloorDiv(operator): ... class LShift(operator): ... class Mod(operator): ... class Mult(operator): ... class MatMult(operator): ... class Pow(operator): ... class RShift(operator): ... class Sub(operator): ... class unaryop(AST): ... class Invert(unaryop): ... class Not(unaryop): ... class UAdd(unaryop): ... class USub(unaryop): ... class cmpop(AST): ... class Eq(cmpop): ... class Gt(cmpop): ... class GtE(cmpop): ... class In(cmpop): ... class Is(cmpop): ... class IsNot(cmpop): ... class Lt(cmpop): ... class LtE(cmpop): ... class NotEq(cmpop): ... class NotIn(cmpop): ... class comprehension(AST): target: expr iter: expr ifs: typing.List[expr] if sys.version_info >= (3, 6): is_async: int class excepthandler(AST): ... class ExceptHandler(excepthandler): type: Optional[expr] name: Optional[_identifier] body: typing.List[stmt] class arguments(AST): if sys.version_info >= (3, 8): posonlyargs: typing.List[arg] args: typing.List[arg] vararg: Optional[arg] kwonlyargs: typing.List[arg] kw_defaults: typing.List[expr] kwarg: Optional[arg] defaults: typing.List[expr] class arg(AST): arg: _identifier annotation: Optional[expr] class keyword(AST): arg: Optional[_identifier] value: expr class alias(AST): name: _identifier asname: Optional[_identifier] class withitem(AST): context_expr: expr optional_vars: Optional[expr] jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/0000775000175000017500000000000013577125145022602 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/__init__.pyi0000664000175000017500000006215613577124116025073 0ustar davedave00000000000000import sys from types import TracebackType from typing import Any, Optional, Dict, Callable, Tuple, Type, Union from tkinter.constants import * # noqa: F403 TclError: Any wantobjects: Any TkVersion: Any TclVersion: Any READABLE: Any WRITABLE: Any EXCEPTION: Any class Event: ... def NoDefaultRoot(): ... class Variable: def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def __del__(self): ... def set(self, value): ... initialize: Any def get(self): ... def trace_variable(self, mode, callback): ... trace: Any def trace_vdelete(self, mode, cbname): ... def trace_vinfo(self): ... def __eq__(self, other): ... class StringVar(Variable): def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def get(self): ... class IntVar(Variable): def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def get(self): ... class DoubleVar(Variable): def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def get(self): ... class BooleanVar(Variable): def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def set(self, value): ... initialize: Any def get(self): ... def mainloop(n: int = ...): ... getint: Any getdouble: Any def getboolean(s): ... class Misc: def destroy(self): ... def deletecommand(self, name): ... def tk_strictMotif(self, boolean: Optional[Any] = ...): ... def tk_bisque(self): ... def tk_setPalette(self, *args, **kw): ... def tk_menuBar(self, *args): ... def wait_variable(self, name: str = ...): ... waitvar: Any def wait_window(self, window: Optional[Any] = ...): ... def wait_visibility(self, window: Optional[Any] = ...): ... def setvar(self, name: str = ..., value: str = ...): ... def getvar(self, name: str = ...): ... def getint(self, s): ... def getdouble(self, s): ... def getboolean(self, s): ... def focus_set(self): ... focus: Any def focus_force(self): ... def focus_get(self): ... def focus_displayof(self): ... def focus_lastfor(self): ... def tk_focusFollowsMouse(self): ... def tk_focusNext(self): ... def tk_focusPrev(self): ... def after(self, ms, func: Optional[Any] = ..., *args): ... def after_idle(self, func, *args): ... def after_cancel(self, id): ... def bell(self, displayof: int = ...): ... def clipboard_get(self, **kw): ... def clipboard_clear(self, **kw): ... def clipboard_append(self, string, **kw): ... def grab_current(self): ... def grab_release(self): ... def grab_set(self): ... def grab_set_global(self): ... def grab_status(self): ... def option_add(self, pattern, value, priority: Optional[Any] = ...): ... def option_clear(self): ... def option_get(self, name, className): ... def option_readfile(self, fileName, priority: Optional[Any] = ...): ... def selection_clear(self, **kw): ... def selection_get(self, **kw): ... def selection_handle(self, command, **kw): ... def selection_own(self, **kw): ... def selection_own_get(self, **kw): ... def send(self, interp, cmd, *args): ... def lower(self, belowThis: Optional[Any] = ...): ... def tkraise(self, aboveThis: Optional[Any] = ...): ... lift: Any def winfo_atom(self, name, displayof: int = ...): ... def winfo_atomname(self, id, displayof: int = ...): ... def winfo_cells(self): ... def winfo_children(self): ... def winfo_class(self): ... def winfo_colormapfull(self): ... def winfo_containing(self, rootX, rootY, displayof: int = ...): ... def winfo_depth(self): ... def winfo_exists(self): ... def winfo_fpixels(self, number): ... def winfo_geometry(self): ... def winfo_height(self): ... def winfo_id(self): ... def winfo_interps(self, displayof: int = ...): ... def winfo_ismapped(self): ... def winfo_manager(self): ... def winfo_name(self): ... def winfo_parent(self): ... def winfo_pathname(self, id, displayof: int = ...): ... def winfo_pixels(self, number): ... def winfo_pointerx(self): ... def winfo_pointerxy(self): ... def winfo_pointery(self): ... def winfo_reqheight(self): ... def winfo_reqwidth(self): ... def winfo_rgb(self, color): ... def winfo_rootx(self): ... def winfo_rooty(self): ... def winfo_screen(self): ... def winfo_screencells(self): ... def winfo_screendepth(self): ... def winfo_screenheight(self): ... def winfo_screenmmheight(self): ... def winfo_screenmmwidth(self): ... def winfo_screenvisual(self): ... def winfo_screenwidth(self): ... def winfo_server(self): ... def winfo_toplevel(self): ... def winfo_viewable(self): ... def winfo_visual(self): ... def winfo_visualid(self): ... def winfo_visualsavailable(self, includeids: int = ...): ... def winfo_vrootheight(self): ... def winfo_vrootwidth(self): ... def winfo_vrootx(self): ... def winfo_vrooty(self): ... def winfo_width(self): ... def winfo_x(self): ... def winfo_y(self): ... def update(self): ... def update_idletasks(self): ... def bindtags(self, tagList: Optional[Any] = ...): ... def bind(self, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... def unbind(self, sequence, funcid: Optional[Any] = ...): ... def bind_all(self, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... def unbind_all(self, sequence): ... def bind_class(self, className, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... def unbind_class(self, className, sequence): ... def mainloop(self, n: int = ...): ... def quit(self): ... def nametowidget(self, name): ... register: Any def configure(self, cnf: Optional[Any] = ..., **kw): ... config: Any def cget(self, key): ... __getitem__: Any def __setitem__(self, key, value): ... def keys(self): ... def pack_propagate(self, flag=...): ... propagate: Any def pack_slaves(self): ... slaves: Any def place_slaves(self): ... def grid_anchor(self, anchor: Optional[Any] = ...): ... anchor: Any def grid_bbox(self, column: Optional[Any] = ..., row: Optional[Any] = ..., col2: Optional[Any] = ..., row2: Optional[Any] = ...): ... bbox: Any def grid_columnconfigure(self, index, cnf=..., **kw): ... columnconfigure: Any def grid_location(self, x, y): ... def grid_propagate(self, flag=...): ... def grid_rowconfigure(self, index, cnf=..., **kw): ... rowconfigure: Any def grid_size(self): ... size: Any def grid_slaves(self, row: Optional[Any] = ..., column: Optional[Any] = ...): ... def event_add(self, virtual, *sequences): ... def event_delete(self, virtual, *sequences): ... def event_generate(self, sequence, **kw): ... def event_info(self, virtual: Optional[Any] = ...): ... def image_names(self): ... def image_types(self): ... class CallWrapper: func: Any subst: Any widget: Any def __init__(self, func, subst, widget): ... def __call__(self, *args): ... class XView: def xview(self, *args): ... def xview_moveto(self, fraction): ... def xview_scroll(self, number, what): ... class YView: def yview(self, *args): ... def yview_moveto(self, fraction): ... def yview_scroll(self, number, what): ... class Wm: def wm_aspect(self, minNumer: Optional[Any] = ..., minDenom: Optional[Any] = ..., maxNumer: Optional[Any] = ..., maxDenom: Optional[Any] = ...): ... aspect: Any def wm_attributes(self, *args): ... attributes: Any def wm_client(self, name: Optional[Any] = ...): ... client: Any def wm_colormapwindows(self, *wlist): ... colormapwindows: Any def wm_command(self, value: Optional[Any] = ...): ... command: Any def wm_deiconify(self): ... deiconify: Any def wm_focusmodel(self, model: Optional[Any] = ...): ... focusmodel: Any def wm_forget(self, window): ... forget: Any def wm_frame(self): ... frame: Any def wm_geometry(self, newGeometry: Optional[Any] = ...): ... geometry: Any def wm_grid(self, baseWidth: Optional[Any] = ..., baseHeight: Optional[Any] = ..., widthInc: Optional[Any] = ..., heightInc: Optional[Any] = ...): ... grid: Any def wm_group(self, pathName: Optional[Any] = ...): ... group: Any def wm_iconbitmap(self, bitmap: Optional[Any] = ..., default: Optional[Any] = ...): ... iconbitmap: Any def wm_iconify(self): ... iconify: Any def wm_iconmask(self, bitmap: Optional[Any] = ...): ... iconmask: Any def wm_iconname(self, newName: Optional[Any] = ...): ... iconname: Any def wm_iconphoto(self, default: bool = ..., *args): ... iconphoto: Any def wm_iconposition(self, x: Optional[Any] = ..., y: Optional[Any] = ...): ... iconposition: Any def wm_iconwindow(self, pathName: Optional[Any] = ...): ... iconwindow: Any def wm_manage(self, widget): ... manage: Any def wm_maxsize(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ... maxsize: Any def wm_minsize(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ... minsize: Any def wm_overrideredirect(self, boolean: Optional[Any] = ...): ... overrideredirect: Any def wm_positionfrom(self, who: Optional[Any] = ...): ... positionfrom: Any def wm_protocol(self, name: Optional[Any] = ..., func: Optional[Any] = ...): ... protocol: Any def wm_resizable(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ... resizable: Any def wm_sizefrom(self, who: Optional[Any] = ...): ... sizefrom: Any def wm_state(self, newstate: Optional[Any] = ...): ... state: Any def wm_title(self, string: Optional[Any] = ...): ... title: Any def wm_transient(self, master: Optional[Any] = ...): ... transient: Any def wm_withdraw(self): ... withdraw: Any class Tk(Misc, Wm): master: Optional[Any] children: Dict[str, Any] tk: Any def __init__(self, screenName: Optional[str] = ..., baseName: Optional[str] = ..., className: str = ..., useTk: bool = ..., sync: bool = ..., use: Optional[str] = ...) -> None: ... def loadtk(self) -> None: ... def destroy(self) -> None: ... def readprofile(self, baseName: str, className: str) -> None: ... report_callback_exception: Callable[[Type[BaseException], BaseException, TracebackType], Any] def __getattr__(self, attr: str) -> Any: ... def Tcl(screenName: Optional[Any] = ..., baseName: Optional[Any] = ..., className: str = ..., useTk: bool = ...): ... class Pack: def pack_configure(self, cnf=..., **kw): ... pack: Any def pack_forget(self): ... forget: Any def pack_info(self): ... info: Any propagate: Any slaves: Any class Place: def place_configure(self, cnf=..., **kw): ... place: Any def place_forget(self): ... forget: Any def place_info(self): ... info: Any slaves: Any class Grid: def grid_configure(self, cnf=..., **kw): ... grid: Any bbox: Any columnconfigure: Any def grid_forget(self): ... forget: Any def grid_remove(self): ... def grid_info(self): ... info: Any location: Any propagate: Any rowconfigure: Any size: Any slaves: Any class BaseWidget(Misc): widgetName: Any def __init__(self, master, widgetName, cnf=..., kw=..., extra=...): ... def destroy(self): ... class Widget(BaseWidget, Pack, Place, Grid): ... class Toplevel(BaseWidget, Wm): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Button(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def flash(self): ... def invoke(self): ... class Canvas(Widget, XView, YView): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def addtag(self, *args): ... def addtag_above(self, newtag, tagOrId): ... def addtag_all(self, newtag): ... def addtag_below(self, newtag, tagOrId): ... def addtag_closest(self, newtag, x, y, halo: Optional[Any] = ..., start: Optional[Any] = ...): ... def addtag_enclosed(self, newtag, x1, y1, x2, y2): ... def addtag_overlapping(self, newtag, x1, y1, x2, y2): ... def addtag_withtag(self, newtag, tagOrId): ... def bbox(self, *args): ... def tag_unbind(self, tagOrId, sequence, funcid: Optional[Any] = ...): ... def tag_bind(self, tagOrId, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... def canvasx(self, screenx, gridspacing: Optional[Any] = ...): ... def canvasy(self, screeny, gridspacing: Optional[Any] = ...): ... def coords(self, *args): ... def create_arc(self, *args, **kw): ... def create_bitmap(self, *args, **kw): ... def create_image(self, *args, **kw): ... def create_line(self, *args, **kw): ... def create_oval(self, *args, **kw): ... def create_polygon(self, *args, **kw): ... def create_rectangle(self, *args, **kw): ... def create_text(self, *args, **kw): ... def create_window(self, *args, **kw): ... def dchars(self, *args): ... def delete(self, *args): ... def dtag(self, *args): ... def find(self, *args): ... def find_above(self, tagOrId): ... def find_all(self): ... def find_below(self, tagOrId): ... def find_closest(self, x, y, halo: Optional[Any] = ..., start: Optional[Any] = ...): ... def find_enclosed(self, x1, y1, x2, y2): ... def find_overlapping(self, x1, y1, x2, y2): ... def find_withtag(self, tagOrId): ... def focus(self, *args): ... def gettags(self, *args): ... def icursor(self, *args): ... def index(self, *args): ... def insert(self, *args): ... def itemcget(self, tagOrId, option): ... def itemconfigure(self, tagOrId, cnf: Optional[Any] = ..., **kw): ... itemconfig: Any def tag_lower(self, *args): ... lower: Any def move(self, *args): ... if sys.version_info >= (3, 8): def moveto(self, tagOrId: Union[int, str], x: str = ..., y: str = ...) -> None: ... def postscript(self, cnf=..., **kw): ... def tag_raise(self, *args): ... lift: Any def scale(self, *args): ... def scan_mark(self, x, y): ... def scan_dragto(self, x, y, gain: int = ...): ... def select_adjust(self, tagOrId, index): ... def select_clear(self): ... def select_from(self, tagOrId, index): ... def select_item(self): ... def select_to(self, tagOrId, index): ... def type(self, tagOrId): ... class Checkbutton(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def deselect(self): ... def flash(self): ... def invoke(self): ... def select(self): ... def toggle(self): ... class Entry(Widget, XView): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def delete(self, first, last: Optional[Any] = ...): ... def get(self): ... def icursor(self, index): ... def index(self, index): ... def insert(self, index, string): ... def scan_mark(self, x): ... def scan_dragto(self, x): ... def selection_adjust(self, index): ... select_adjust: Any def selection_clear(self): ... select_clear: Any def selection_from(self, index): ... select_from: Any def selection_present(self): ... select_present: Any def selection_range(self, start, end): ... select_range: Any def selection_to(self, index): ... select_to: Any class Frame(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Label(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Listbox(Widget, XView, YView): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def activate(self, index): ... def bbox(self, index): ... def curselection(self): ... def delete(self, first, last: Optional[Any] = ...): ... def get(self, first, last: Optional[Any] = ...): ... def index(self, index): ... def insert(self, index, *elements): ... def nearest(self, y): ... def scan_mark(self, x, y): ... def scan_dragto(self, x, y): ... def see(self, index): ... def selection_anchor(self, index): ... select_anchor: Any def selection_clear(self, first, last: Optional[Any] = ...): ... # type: ignore select_clear: Any def selection_includes(self, index): ... select_includes: Any def selection_set(self, first, last: Optional[Any] = ...): ... select_set: Any def size(self): ... def itemcget(self, index, option): ... def itemconfigure(self, index, cnf: Optional[Any] = ..., **kw): ... itemconfig: Any class Menu(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def tk_popup(self, x, y, entry: str = ...): ... def tk_bindForTraversal(self): ... def activate(self, index): ... def add(self, itemType, cnf=..., **kw): ... def add_cascade(self, cnf=..., **kw): ... def add_checkbutton(self, cnf=..., **kw): ... def add_command(self, cnf=..., **kw): ... def add_radiobutton(self, cnf=..., **kw): ... def add_separator(self, cnf=..., **kw): ... def insert(self, index, itemType, cnf=..., **kw): ... def insert_cascade(self, index, cnf=..., **kw): ... def insert_checkbutton(self, index, cnf=..., **kw): ... def insert_command(self, index, cnf=..., **kw): ... def insert_radiobutton(self, index, cnf=..., **kw): ... def insert_separator(self, index, cnf=..., **kw): ... def delete(self, index1, index2: Optional[Any] = ...): ... def entrycget(self, index, option): ... def entryconfigure(self, index, cnf: Optional[Any] = ..., **kw): ... entryconfig: Any def index(self, index): ... def invoke(self, index): ... def post(self, x, y): ... def type(self, index): ... def unpost(self): ... def xposition(self, index): ... def yposition(self, index): ... class Menubutton(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Message(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Radiobutton(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def deselect(self): ... def flash(self): ... def invoke(self): ... def select(self): ... class Scale(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def get(self): ... def set(self, value): ... def coords(self, value: Optional[Any] = ...): ... def identify(self, x, y): ... class Scrollbar(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def activate(self, index: Optional[Any] = ...): ... def delta(self, deltax, deltay): ... def fraction(self, x, y): ... def identify(self, x, y): ... def get(self): ... def set(self, first, last): ... class Text(Widget, XView, YView): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def bbox(self, index): ... def compare(self, index1, op, index2): ... def count(self, index1, index2, *args): ... def debug(self, boolean: Optional[Any] = ...): ... def delete(self, index1, index2: Optional[Any] = ...): ... def dlineinfo(self, index): ... def dump(self, index1, index2: Optional[Any] = ..., command: Optional[Any] = ..., **kw): ... def edit(self, *args): ... def edit_modified(self, arg: Optional[Any] = ...): ... def edit_redo(self): ... def edit_reset(self): ... def edit_separator(self): ... def edit_undo(self): ... def get(self, index1, index2: Optional[Any] = ...): ... def image_cget(self, index, option): ... def image_configure(self, index, cnf: Optional[Any] = ..., **kw): ... def image_create(self, index, cnf=..., **kw): ... def image_names(self): ... def index(self, index): ... def insert(self, index, chars, *args): ... def mark_gravity(self, markName, direction: Optional[Any] = ...): ... def mark_names(self): ... def mark_set(self, markName, index): ... def mark_unset(self, *markNames): ... def mark_next(self, index): ... def mark_previous(self, index): ... def peer_create(self, newPathName, cnf=..., **kw): ... def peer_names(self): ... def replace(self, index1, index2, chars, *args): ... def scan_mark(self, x, y): ... def scan_dragto(self, x, y): ... def search(self, pattern, index, stopindex: Optional[Any] = ..., forwards: Optional[Any] = ..., backwards: Optional[Any] = ..., exact: Optional[Any] = ..., regexp: Optional[Any] = ..., nocase: Optional[Any] = ..., count: Optional[Any] = ..., elide: Optional[Any] = ...): ... def see(self, index): ... def tag_add(self, tagName, index1, *args): ... def tag_unbind(self, tagName, sequence, funcid: Optional[Any] = ...): ... def tag_bind(self, tagName, sequence, func, add: Optional[Any] = ...): ... def tag_cget(self, tagName, option): ... def tag_configure(self, tagName, cnf: Optional[Any] = ..., **kw): ... tag_config: Any def tag_delete(self, *tagNames): ... def tag_lower(self, tagName, belowThis: Optional[Any] = ...): ... def tag_names(self, index: Optional[Any] = ...): ... def tag_nextrange(self, tagName, index1, index2: Optional[Any] = ...): ... def tag_prevrange(self, tagName, index1, index2: Optional[Any] = ...): ... def tag_raise(self, tagName, aboveThis: Optional[Any] = ...): ... def tag_ranges(self, tagName): ... def tag_remove(self, tagName, index1, index2: Optional[Any] = ...): ... def window_cget(self, index, option): ... def window_configure(self, index, cnf: Optional[Any] = ..., **kw): ... window_config: Any def window_create(self, index, cnf=..., **kw): ... def window_names(self): ... def yview_pickplace(self, *what): ... class _setit: def __init__(self, var, value, callback: Optional[Any] = ...): ... def __call__(self, *args): ... class OptionMenu(Menubutton): widgetName: Any menuname: Any def __init__(self, master, variable, value, *values, **kwargs): ... def __getitem__(self, name): ... def destroy(self): ... class Image: name: Any tk: Any def __init__(self, imgtype, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ... def __del__(self): ... def __setitem__(self, key, value): ... def __getitem__(self, key): ... def configure(self, **kw): ... config: Any def height(self): ... def type(self): ... def width(self): ... class PhotoImage(Image): def __init__(self, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ... def blank(self): ... def cget(self, option): ... def __getitem__(self, key): ... def copy(self): ... def zoom(self, x, y: str = ...): ... def subsample(self, x, y: str = ...): ... def get(self, x, y): ... def put(self, data, to: Optional[Any] = ...): ... def write(self, filename, format: Optional[Any] = ..., from_coords: Optional[Any] = ...): ... if sys.version_info >= (3, 8): def transparency_get(self, x: int, y: int) -> bool: ... def transparency_set(self, x: int, y: int, boolean: bool) -> None: ... class BitmapImage(Image): def __init__(self, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ... def image_names(): ... def image_types(): ... class Spinbox(Widget, XView): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def bbox(self, index): ... def delete(self, first, last: Optional[Any] = ...): ... def get(self): ... def icursor(self, index): ... def identify(self, x, y): ... def index(self, index): ... def insert(self, index, s): ... def invoke(self, element): ... def scan(self, *args): ... def scan_mark(self, x): ... def scan_dragto(self, x): ... def selection(self, *args: Any) -> Tuple[int, ...]: ... def selection_adjust(self, index): ... def selection_clear(self): ... def selection_element(self, element: Optional[Any] = ...): ... if sys.version_info >= (3, 8): def selection_from(self, index: int) -> None: ... def selection_present(self) -> None: ... def selection_range(self, start: int, end: int) -> None: ... def selection_to(self, index: int) -> None: ... class LabelFrame(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class PanedWindow(Widget): def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def add(self, child, **kw): ... def remove(self, child): ... forget: Any def identify(self, x, y): ... def proxy(self, *args): ... def proxy_coord(self): ... def proxy_forget(self): ... def proxy_place(self, x, y): ... def sash(self, *args): ... def sash_coord(self, index): ... def sash_mark(self, index): ... def sash_place(self, index, x, y): ... def panecget(self, child, option): ... def paneconfigure(self, tagOrId, cnf: Optional[Any] = ..., **kw): ... paneconfig: Any def panes(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/filedialog.pyi0000664000175000017500000000427113577124116025425 0ustar davedave00000000000000from typing import Any, Dict, Optional, Tuple from tkinter import Button, commondialog, Entry, Frame, Listbox, Scrollbar, Toplevel dialogstates: Dict[Any, Tuple[Any, Any]] class FileDialog: title: str = ... master: Any = ... directory: Optional[Any] = ... top: Toplevel = ... botframe: Frame = ... selection: Entry = ... filter: Entry = ... midframe: Entry = ... filesbar: Scrollbar = ... files: Listbox = ... dirsbar: Scrollbar = ... dirs: Listbox = ... ok_button: Button = ... filter_button: Button = ... cancel_button: Button = ... def __init__(self, master, title: Optional[Any] = ...) -> None: ... # title is usually a str or None, but e.g. int doesn't raise en exception either how: Optional[Any] = ... def go(self, dir_or_file: Any = ..., pattern: str = ..., default: str = ..., key: Optional[Any] = ...): ... def quit(self, how: Optional[Any] = ...) -> None: ... def dirs_double_event(self, event) -> None: ... def dirs_select_event(self, event) -> None: ... def files_double_event(self, event) -> None: ... def files_select_event(self, event) -> None: ... def ok_event(self, event) -> None: ... def ok_command(self) -> None: ... def filter_command(self, event: Optional[Any] = ...) -> None: ... def get_filter(self): ... def get_selection(self): ... def cancel_command(self, event: Optional[Any] = ...) -> None: ... def set_filter(self, dir, pat) -> None: ... def set_selection(self, file) -> None: ... class LoadFileDialog(FileDialog): title: str = ... def ok_command(self) -> None: ... class SaveFileDialog(FileDialog): title: str = ... def ok_command(self): ... class _Dialog(commondialog.Dialog): ... class Open(_Dialog): command: str = ... class SaveAs(_Dialog): command: str = ... class Directory(commondialog.Dialog): command: str = ... def askopenfilename(**options): ... def asksaveasfilename(**options): ... def askopenfilenames(**options): ... def askopenfile(mode: str = ..., **options): ... def askopenfiles(mode: str = ..., **options): ... def asksaveasfile(mode: str = ..., **options): ... def askdirectory(**options): ... def test() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/dialog.pyi0000664000175000017500000000044313577124116024562 0ustar davedave00000000000000from typing import Any, Mapping, Optional from tkinter import Widget DIALOG_ICON: str class Dialog(Widget): widgetName: str = ... num: int = ... def __init__(self, master: Optional[Any] = ..., cnf: Mapping[str, Any] = ..., **kw) -> None: ... def destroy(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/commondialog.pyi0000664000175000017500000000042513577124116025773 0ustar davedave00000000000000from typing import Any, Mapping, Optional class Dialog: command: Optional[Any] = ... master: Optional[Any] = ... options: Mapping[str, Any] = ... def __init__(self, master: Optional[Any] = ..., **options) -> None: ... def show(self, **options) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/ttk.pyi0000664000175000017500000001432313577124116024127 0ustar davedave00000000000000import sys from typing import Any, List, Optional import tkinter def tclobjs_to_py(adict): ... def setup_master(master: Optional[Any] = ...): ... class Style: master: Any tk: Any def __init__(self, master: Optional[Any] = ...): ... def configure(self, style, query_opt: Optional[Any] = ..., **kw): ... def map(self, style, query_opt: Optional[Any] = ..., **kw): ... def lookup(self, style, option, state: Optional[Any] = ..., default: Optional[Any] = ...): ... def layout(self, style, layoutspec: Optional[Any] = ...): ... def element_create(self, elementname, etype, *args, **kw): ... def element_names(self): ... def element_options(self, elementname): ... def theme_create(self, themename, parent: Optional[Any] = ..., settings: Optional[Any] = ...): ... def theme_settings(self, themename, settings): ... def theme_names(self): ... def theme_use(self, themename: Optional[Any] = ...): ... class Widget(tkinter.Widget): def __init__(self, master, widgetname, kw: Optional[Any] = ...): ... def identify(self, x, y): ... def instate(self, statespec, callback: Optional[Any] = ..., *args, **kw): ... def state(self, statespec: Optional[Any] = ...): ... class Button(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... def invoke(self): ... class Checkbutton(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... def invoke(self): ... class Entry(Widget, tkinter.Entry): def __init__(self, master: Optional[Any] = ..., widget: Optional[Any] = ..., **kw): ... def bbox(self, index): ... def identify(self, x, y): ... def validate(self): ... class Combobox(Entry): def __init__(self, master: Optional[Any] = ..., **kw): ... def current(self, newindex: Optional[Any] = ...): ... def set(self, value): ... class Frame(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... class Label(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... class Labelframe(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... LabelFrame: Any class Menubutton(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... class Notebook(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... def add(self, child, **kw): ... def forget(self, tab_id): ... def hide(self, tab_id): ... def identify(self, x, y): ... def index(self, tab_id): ... def insert(self, pos, child, **kw): ... def select(self, tab_id: Optional[Any] = ...): ... def tab(self, tab_id, option: Optional[Any] = ..., **kw): ... def tabs(self): ... def enable_traversal(self): ... class Panedwindow(Widget, tkinter.PanedWindow): def __init__(self, master: Optional[Any] = ..., **kw): ... forget: Any def insert(self, pos, child, **kw): ... def pane(self, pane, option: Optional[Any] = ..., **kw): ... def sashpos(self, index, newpos: Optional[Any] = ...): ... PanedWindow: Any class Progressbar(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... def start(self, interval: Optional[Any] = ...): ... def step(self, amount: Optional[Any] = ...): ... def stop(self): ... class Radiobutton(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... def invoke(self): ... class Scale(Widget, tkinter.Scale): def __init__(self, master: Optional[Any] = ..., **kw): ... def configure(self, cnf: Optional[Any] = ..., **kw): ... def get(self, x: Optional[Any] = ..., y: Optional[Any] = ...): ... class Scrollbar(Widget, tkinter.Scrollbar): def __init__(self, master: Optional[Any] = ..., **kw): ... class Separator(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... class Sizegrip(Widget): def __init__(self, master: Optional[Any] = ..., **kw): ... if sys.version_info >= (3, 7): class Spinbox(Entry): def __init__(self, master: Any = ..., **kw: Any) -> None: ... def set(self, value: Any) -> None: ... class Treeview(Widget, tkinter.XView, tkinter.YView): def __init__(self, master: Optional[Any] = ..., **kw): ... def bbox(self, item, column: Optional[Any] = ...): ... def get_children(self, item: Optional[Any] = ...): ... def set_children(self, item, *newchildren): ... def column(self, column, option: Optional[Any] = ..., **kw): ... def delete(self, *items): ... def detach(self, *items): ... def exists(self, item): ... def focus(self, item: Optional[Any] = ...): ... def heading(self, column, option: Optional[Any] = ..., **kw): ... def identify(self, component, x, y): ... def identify_row(self, y): ... def identify_column(self, x): ... def identify_region(self, x, y): ... def identify_element(self, x, y): ... def index(self, item): ... def insert(self, parent, index, iid: Optional[Any] = ..., **kw): ... def item(self, item, option: Optional[Any] = ..., **kw): ... def move(self, item, parent, index): ... reattach: Any def next(self, item): ... def parent(self, item): ... def prev(self, item): ... def see(self, item): ... if sys.version_info >= (3, 8): def selection(self) -> List[Any]: ... else: def selection(self, selop: Optional[Any] = ..., items: Optional[Any] = ...) -> List[Any]: ... def selection_set(self, items): ... def selection_add(self, items): ... def selection_remove(self, items): ... def selection_toggle(self, items): ... def set(self, item, column: Optional[Any] = ..., value: Optional[Any] = ...): ... def tag_bind(self, tagname, sequence: Optional[Any] = ..., callback: Optional[Any] = ...): ... def tag_configure(self, tagname, option: Optional[Any] = ..., **kw): ... def tag_has(self, tagname, item: Optional[Any] = ...): ... class LabeledScale(Frame): label: Any scale: Any def __init__(self, master: Optional[Any] = ..., variable: Optional[Any] = ..., from_: int = ..., to: int = ..., **kw): ... def destroy(self): ... value: Any class OptionMenu(Menubutton): def __init__(self, master, variable, default: Optional[Any] = ..., *values, **kwargs): ... def __getitem__(self, item): ... def set_menu(self, default: Optional[Any] = ..., *values): ... def destroy(self): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/constants.pyi0000664000175000017500000000156013577124116025340 0ustar davedave00000000000000from typing import Any NO: Any YES: Any TRUE: Any FALSE: Any ON: Any OFF: Any N: Any S: Any W: Any E: Any NW: Any SW: Any NE: Any SE: Any NS: Any EW: Any NSEW: Any CENTER: Any NONE: Any X: Any Y: Any BOTH: Any LEFT: Any TOP: Any RIGHT: Any BOTTOM: Any RAISED: Any SUNKEN: Any FLAT: Any RIDGE: Any GROOVE: Any SOLID: Any HORIZONTAL: Any VERTICAL: Any NUMERIC: Any CHAR: Any WORD: Any BASELINE: Any INSIDE: Any OUTSIDE: Any SEL: Any SEL_FIRST: Any SEL_LAST: Any END: Any INSERT: Any CURRENT: Any ANCHOR: Any ALL: Any NORMAL: Any DISABLED: Any ACTIVE: Any HIDDEN: Any CASCADE: Any CHECKBUTTON: Any COMMAND: Any RADIOBUTTON: Any SEPARATOR: Any SINGLE: Any BROWSE: Any MULTIPLE: Any EXTENDED: Any DOTBOX: Any UNDERLINE: Any PIESLICE: Any CHORD: Any ARC: Any FIRST: Any LAST: Any BUTT: Any PROJECTING: Any ROUND: Any BEVEL: Any MITER: Any MOVETO: Any SCROLL: Any UNITS: Any PAGES: Any jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/tkinter/messagebox.pyi0000664000175000017500000000217613577124116025465 0ustar davedave00000000000000from tkinter.commondialog import Dialog from typing import Any, Optional ERROR: str INFO: str QUESTION: str WARNING: str ABORTRETRYIGNORE: str OK: str OKCANCEL: str RETRYCANCEL: str YESNO: str YESNOCANCEL: str ABORT: str RETRY: str IGNORE: str CANCEL: str YES: str NO: str class Message(Dialog): command: str = ... def showinfo(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> str: ... def showwarning(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> str: ... def showerror(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> str: ... def askquestion(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> str: ... def askokcancel(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> bool: ... def askyesno(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> bool: ... def askyesnocancel(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> Optional[bool]: ... def askretrycancel(title: Optional[str] = ..., message: Optional[str] = ..., **options: Any) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/0000775000175000017500000000000013577125145022413 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/__init__.pyi0000664000175000017500000000000013577124116024660 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/request.pyi0000664000175000017500000002342413577124116024630 0ustar davedave00000000000000# Stubs for urllib.request (Python 3.4) from typing import ( Any, Callable, ClassVar, Dict, List, IO, Mapping, Optional, Sequence, Tuple, TypeVar, Union, overload, NoReturn, ) from http.client import HTTPResponse, HTTPMessage, _HTTPConnectionProtocol from http.cookiejar import CookieJar from email.message import Message from urllib.response import addinfourl import ssl import sys import os _T = TypeVar('_T') _UrlopenRet = Any class _HTTPResponse(HTTPResponse): url: str msg: str # type: ignore def urlopen( url: Union[str, Request], data: Optional[bytes] = ..., timeout: Optional[float] = ..., *, cafile: Optional[str] = ..., capath: Optional[str] = ..., cadefault: bool = ..., context: Optional[ssl.SSLContext] = ... ) -> _UrlopenRet: ... def install_opener(opener: OpenerDirector) -> None: ... def build_opener( *handlers: Union[BaseHandler, Callable[[], BaseHandler]] ) -> OpenerDirector: ... def url2pathname(path: str) -> str: ... def pathname2url(path: str) -> str: ... def getproxies() -> Dict[str, str]: ... def parse_http_list(s: str) -> List[str]: ... def parse_keqv_list(l: List[str]) -> Dict[str, str]: ... def proxy_bypass(host: str) -> Any: ... # Undocumented class Request: @property def full_url(self) -> str: ... @full_url.setter def full_url(self, value: str) -> None: ... @full_url.deleter def full_url(self) -> None: ... type: str host: str origin_req_host: str selector: str data: Optional[bytes] headers: Dict[str, str] unverifiable: bool method: Optional[str] def __init__(self, url: str, data: Optional[bytes] = ..., headers: Dict[str, str] = ..., origin_req_host: Optional[str] = ..., unverifiable: bool = ..., method: Optional[str] = ...) -> None: ... def get_method(self) -> str: ... def add_header(self, key: str, val: str) -> None: ... def add_unredirected_header(self, key: str, val: str) -> None: ... def has_header(self, header_name: str) -> bool: ... def remove_header(self, header_name: str) -> None: ... def get_full_url(self) -> str: ... def set_proxy(self, host: str, type: str) -> None: ... @overload def get_header(self, header_name: str) -> Optional[str]: ... @overload def get_header(self, header_name: str, default: _T) -> Union[str, _T]: ... def header_items(self) -> List[Tuple[str, str]]: ... class OpenerDirector: addheaders: List[Tuple[str, str]] def add_handler(self, handler: BaseHandler) -> None: ... def open(self, url: Union[str, Request], data: Optional[bytes] = ..., timeout: Optional[float] = ...) -> _UrlopenRet: ... def error(self, proto: str, *args: Any) -> _UrlopenRet: ... class BaseHandler: handler_order: ClassVar[int] parent: OpenerDirector def add_parent(self, parent: OpenerDirector) -> None: ... def close(self) -> None: ... def http_error_nnn(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> _UrlopenRet: ... class HTTPDefaultErrorHandler(BaseHandler): ... class HTTPRedirectHandler(BaseHandler): def redirect_request(self, req: Request, fp: IO[str], code: int, msg: str, hdrs: Mapping[str, str], newurl: str) -> Optional[Request]: ... def http_error_301(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... def http_error_302(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... def http_error_303(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... def http_error_307(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... class HTTPCookieProcessor(BaseHandler): cookiejar: CookieJar def __init__(self, cookiejar: Optional[CookieJar] = ...) -> None: ... class ProxyHandler(BaseHandler): def __init__(self, proxies: Optional[Dict[str, str]] = ...) -> None: ... # TODO add a method for every (common) proxy protocol class HTTPPasswordMgr: def add_password(self, realm: str, uri: Union[str, Sequence[str]], user: str, passwd: str) -> None: ... def find_user_password(self, realm: str, authuri: str) -> Tuple[Optional[str], Optional[str]]: ... class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr): def add_password(self, realm: str, uri: Union[str, Sequence[str]], user: str, passwd: str) -> None: ... def find_user_password(self, realm: str, authuri: str) -> Tuple[Optional[str], Optional[str]]: ... class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm): def add_password( self, realm: str, uri: Union[str, Sequence[str]], user: str, passwd: str, is_authenticated: bool = ..., ) -> None: ... def update_authenticated(self, uri: Union[str, Sequence[str]], is_authenticated: bool = ...) -> None: ... def is_authenticated(self, authuri: str) -> bool: ... class AbstractBasicAuthHandler: def __init__(self, password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ... def http_error_auth_reqed(self, authreq: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ... class HTTPBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler): def http_error_401(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... class ProxyBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler): def http_error_407(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... class AbstractDigestAuthHandler: def __init__(self, passwd: Optional[HTTPPasswordMgr] = ...) -> None: ... def reset_retry_count(self) -> None: ... def http_error_auth_reqed(self, auth_header: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ... def retry_http_digest_auth(self, req: Request, auth: str) -> Optional[_UrlopenRet]: ... def get_cnonce(self, nonce: str) -> str: ... def get_authorization(self, req: Request, chal: Mapping[str, str]) -> str: ... def get_algorithm_impls(self, algorithm: str) -> Tuple[Callable[[str], str], Callable[[str, str], str]]: ... def get_entity_digest(self, data: Optional[bytes], chal: Mapping[str, str]) -> Optional[str]: ... class HTTPDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): def http_error_401(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): def http_error_407(self, req: Request, fp: IO[str], code: int, msg: int, hdrs: Mapping[str, str]) -> Optional[_UrlopenRet]: ... class AbstractHTTPHandler(BaseHandler): # undocumented def __init__(self, debuglevel: int = ...) -> None: ... def set_http_debuglevel(self, level: int) -> None: ... def do_request_(self, request: Request) -> Request: ... def do_open(self, http_class: _HTTPConnectionProtocol, req: Request, **http_conn_args: Any) -> HTTPResponse: ... class HTTPHandler(AbstractHTTPHandler): def http_open(self, req: Request) -> HTTPResponse: ... def http_request(self, request: Request) -> Request: ... # undocumented class HTTPSHandler(AbstractHTTPHandler): def __init__(self, debuglevel: int = ..., context: Optional[ssl.SSLContext] = ..., check_hostname: Optional[bool] = ...) -> None: ... def https_open(self, req: Request) -> HTTPResponse: ... def https_request(self, request: Request) -> Request: ... # undocumented class FileHandler(BaseHandler): def file_open(self, req: Request) -> addinfourl: ... class DataHandler(BaseHandler): def data_open(self, req: Request) -> addinfourl: ... class FTPHandler(BaseHandler): def ftp_open(self, req: Request) -> addinfourl: ... class CacheFTPHandler(FTPHandler): def setTimeout(self, t: float) -> None: ... def setMaxConns(self, m: int) -> None: ... class UnknownHandler(BaseHandler): def unknown_open(self, req: Request) -> NoReturn: ... class HTTPErrorProcessor(BaseHandler): def http_response(self, request, response) -> _UrlopenRet: ... def https_response(self, request, response) -> _UrlopenRet: ... if sys.version_info >= (3, 6): def urlretrieve(url: str, filename: Optional[Union[str, os.PathLike[Any]]] = ..., reporthook: Optional[Callable[[int, int, int], None]] = ..., data: Optional[bytes] = ...) -> Tuple[str, HTTPMessage]: ... else: def urlretrieve(url: str, filename: Optional[str] = ..., reporthook: Optional[Callable[[int, int, int], None]] = ..., data: Optional[bytes] = ...) -> Tuple[str, HTTPMessage]: ... def urlcleanup() -> None: ... class URLopener: version: ClassVar[str] def __init__(self, proxies: Optional[Dict[str, str]] = ..., **x509: str) -> None: ... def open(self, fullurl: str, data: Optional[bytes] = ...) -> _UrlopenRet: ... def open_unknown(self, fullurl: str, data: Optional[bytes] = ...) -> _UrlopenRet: ... def retrieve(self, url: str, filename: Optional[str] = ..., reporthook: Optional[Callable[[int, int, int], None]] = ..., data: Optional[bytes] = ...) -> Tuple[str, Optional[Message]]: ... class FancyURLopener(URLopener): def prompt_user_passwd(self, host: str, realm: str) -> Tuple[str, str]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/error.pyi0000664000175000017500000000047513577124116024272 0ustar davedave00000000000000from typing import Dict, Union from urllib.response import addinfourl # Stubs for urllib.error class URLError(IOError): reason: Union[str, BaseException] class HTTPError(URLError, addinfourl): code: int def __init__(self, url, code, msg, hdrs, fp) -> None: ... class ContentTooShortError(URLError): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/parse.pyi0000664000175000017500000001105313577124116024245 0ustar davedave00000000000000# Stubs for urllib.parse from typing import Any, List, Dict, Tuple, AnyStr, Generic, overload, Sequence, Mapping, Union, NamedTuple, Callable, Optional _Str = Union[bytes, str] uses_relative: List[str] uses_netloc: List[str] uses_params: List[str] non_hierarchical: List[str] uses_query: List[str] uses_fragment: List[str] scheme_chars: str MAX_CACHE_SIZE: int class _ResultMixinBase(Generic[AnyStr]): def geturl(self) -> AnyStr: ... class _ResultMixinStr(_ResultMixinBase[str]): def encode(self, encoding: str = ..., errors: str = ...) -> _ResultMixinBytes: ... class _ResultMixinBytes(_ResultMixinBase[str]): def decode(self, encoding: str = ..., errors: str = ...) -> _ResultMixinStr: ... class _NetlocResultMixinBase(Generic[AnyStr]): username: Optional[AnyStr] password: Optional[AnyStr] hostname: Optional[AnyStr] port: Optional[int] class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ... class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ... class _DefragResultBase(Tuple[Any, ...], Generic[AnyStr]): url: AnyStr fragment: AnyStr class _SplitResultBase(NamedTuple): scheme: str netloc: str path: str query: str fragment: str class _SplitResultBytesBase(NamedTuple): scheme: bytes netloc: bytes path: bytes query: bytes fragment: bytes class _ParseResultBase(NamedTuple): scheme: str netloc: str path: str params: str query: str fragment: str class _ParseResultBytesBase(NamedTuple): scheme: bytes netloc: bytes path: bytes params: bytes query: bytes fragment: bytes # Structured result objects for string data class DefragResult(_DefragResultBase[str], _ResultMixinStr): ... class SplitResult(_SplitResultBase, _NetlocResultMixinStr): ... class ParseResult(_ParseResultBase, _NetlocResultMixinStr): ... # Structured result objects for bytes data class DefragResultBytes(_DefragResultBase[bytes], _ResultMixinBytes): ... class SplitResultBytes(_SplitResultBytesBase, _NetlocResultMixinBytes): ... class ParseResultBytes(_ParseResultBytesBase, _NetlocResultMixinBytes): ... def parse_qs(qs: Optional[AnyStr], keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> Dict[AnyStr, List[AnyStr]]: ... def parse_qsl(qs: Optional[AnyStr], keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[AnyStr, AnyStr]]: ... @overload def quote(string: str, safe: _Str = ..., encoding: str = ..., errors: str = ...) -> str: ... @overload def quote(string: bytes, safe: _Str = ...) -> str: ... def quote_from_bytes(bs: bytes, safe: _Str = ...) -> str: ... @overload def quote_plus(string: str, safe: _Str = ..., encoding: str = ..., errors: str = ...) -> str: ... @overload def quote_plus(string: bytes, safe: _Str = ...) -> str: ... def unquote(string: str, encoding: str = ..., errors: str = ...) -> str: ... def unquote_to_bytes(string: _Str) -> bytes: ... def unquote_plus(string: str, encoding: str = ..., errors: str = ...) -> str: ... @overload def urldefrag(url: str) -> DefragResult: ... @overload def urldefrag(url: Optional[bytes]) -> DefragResultBytes: ... def urlencode( query: Union[Mapping[Any, Any], Mapping[Any, Sequence[Any]], Sequence[Tuple[Any, Any]], Sequence[Tuple[Any, Sequence[Any]]]], doseq: bool = ..., safe: AnyStr = ..., encoding: str = ..., errors: str = ..., quote_via: Callable[[str, AnyStr, str, str], str] = ..., ) -> str: ... def urljoin(base: AnyStr, url: Optional[AnyStr], allow_fragments: bool = ...) -> AnyStr: ... @overload def urlparse(url: str, scheme: Optional[str] = ..., allow_fragments: bool = ...) -> ParseResult: ... @overload def urlparse(url: Optional[bytes], scheme: Optional[bytes] = ..., allow_fragments: bool = ...) -> ParseResultBytes: ... @overload def urlsplit(url: str, scheme: Optional[str] = ..., allow_fragments: bool = ...) -> SplitResult: ... @overload def urlsplit(url: Optional[bytes], scheme: Optional[bytes] = ..., allow_fragments: bool = ...) -> SplitResultBytes: ... @overload def urlunparse( components: Tuple[Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr]] ) -> AnyStr: ... @overload def urlunparse(components: Sequence[Optional[AnyStr]]) -> AnyStr: ... @overload def urlunsplit(components: Tuple[Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr]]) -> AnyStr: ... @overload def urlunsplit(components: Sequence[Optional[AnyStr]]) -> AnyStr: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/response.pyi0000664000175000017500000000322213577124116024770 0ustar davedave00000000000000# private module, we only expose what's needed from typing import BinaryIO, Iterable, List, Mapping, Optional, Type, TypeVar from email.message import Message from types import TracebackType _AIUT = TypeVar("_AIUT", bound=addbase) class addbase(BinaryIO): def __enter__(self: _AIUT) -> _AIUT: ... def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> None: ... def __iter__(self: _AIUT) -> _AIUT: ... def __next__(self) -> bytes: ... def close(self) -> None: ... # These methods don't actually exist, but the class inherits at runtime from # tempfile._TemporaryFileWrapper, which uses __getattr__ to delegate to the # underlying file object. To satisfy the BinaryIO interface, we pretend that this # class has these additional methods. def fileno(self) -> int: ... def flush(self) -> None: ... def isatty(self) -> bool: ... def read(self, n: int = ...) -> bytes: ... def readable(self) -> bool: ... def readline(self, limit: int = ...) -> bytes: ... def readlines(self, hint: int = ...) -> List[bytes]: ... def seek(self, offset: int, whence: int = ...) -> int: ... def seekable(self) -> bool: ... def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... def write(self, s: bytes) -> int: ... def writelines(self, lines: Iterable[bytes]) -> None: ... class addinfo(addbase): headers: Message def info(self) -> Message: ... class addinfourl(addinfo): url: str code: int def geturl(self) -> str: ... def getcode(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/urllib/robotparser.pyi0000664000175000017500000000126713577124116025503 0ustar davedave00000000000000# Stubs for urllib.robotparser (Python 3.4) from typing import Iterable, NamedTuple, Optional import sys class _RequestRate(NamedTuple): requests: int seconds: int class RobotFileParser: def __init__(self, url: str = ...) -> None: ... def set_url(self, url: str) -> None: ... def read(self) -> None: ... def parse(self, lines: Iterable[str]) -> None: ... def can_fetch(self, user_agent: str, url: str) -> bool: ... def mtime(self) -> int: ... def modified(self) -> None: ... if sys.version_info >= (3, 6): def crawl_delay(self, useragent: str) -> Optional[str]: ... def request_rate(self, useragent: str) -> Optional[_RequestRate]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/fnmatch.pyi0000664000175000017500000000055613577124116023270 0ustar davedave00000000000000# Stubs for fnmatch # Based on http://docs.python.org/3.2/library/fnmatch.html and # python-lib/fnmatch.py from typing import Iterable, List, AnyStr def fnmatch(name: AnyStr, pat: AnyStr) -> bool: ... def fnmatchcase(name: AnyStr, pat: AnyStr) -> bool: ... def filter(names: Iterable[AnyStr], pat: AnyStr) -> List[AnyStr]: ... def translate(pat: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/ast.pyi0000664000175000017500000000443513577124116022437 0ustar davedave00000000000000import sys # Rename typing to _typing, as not to conflict with typing imported # from _ast below when loaded in an unorthodox way by the Dropbox # internal Bazel integration. import typing as _typing from typing import Any, Iterator, Optional, TypeVar, Union, overload # The same unorthodox Bazel integration causes issues with sys, which # is imported in both modules. unfortunately we can't just rename sys, # since mypy only supports version checks with a sys that is named # sys. from _ast import * # type: ignore if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal class NodeVisitor: def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> Any: ... class NodeTransformer(NodeVisitor): def generic_visit(self, node: AST) -> Optional[AST]: ... _T = TypeVar("_T", bound=AST) if sys.version_info >= (3, 8): @overload def parse( source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: Literal["exec"] = ..., type_comments: bool = ..., feature_version: Union[None, int, _typing.Tuple[int, int]] = ..., ) -> Module: ... @overload def parse( source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ..., type_comments: bool = ..., feature_version: Union[None, int, _typing.Tuple[int, int]] = ..., ) -> AST: ... else: @overload def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: Literal["exec"] = ...) -> Module: ... @overload def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> AST: ... def copy_location(new_node: _T, old_node: AST) -> _T: ... def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... def fix_missing_locations(node: _T) -> _T: ... def get_docstring(node: AST, clean: bool = ...) -> str: ... def increment_lineno(node: _T, n: int = ...) -> _T: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[_typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, AST]) -> Any: ... def get_source_segment(source: str, node: AST, *, padded: bool = ...) -> Optional[str]: ... def walk(node: AST) -> Iterator[AST]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/0000775000175000017500000000000013577125145024351 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/__init__.pyi0000664000175000017500000000677013577124116026642 0ustar davedave00000000000000# Stubs for multiprocessing import sys from typing import Any, Callable, Iterable, Mapping, Optional, List, Union, Sequence, Tuple, Type, overload from ctypes import _CData from logging import Logger from multiprocessing import connection, pool, spawn, synchronize from multiprocessing.context import ( AuthenticationError as AuthenticationError, BaseContext, BufferTooShort as BufferTooShort, Process as Process, ProcessError as ProcessError, TimeoutError as TimeoutError, ) from multiprocessing.managers import SyncManager from multiprocessing.process import active_children as active_children, current_process as current_process from multiprocessing.queues import Queue as Queue, SimpleQueue as SimpleQueue, JoinableQueue as JoinableQueue from multiprocessing.spawn import freeze_support as freeze_support from multiprocessing.spawn import set_executable as set_executable if sys.version_info >= (3, 8): from multiprocessing.process import parent_process as parent_process # N.B. The functions below are generated at runtime by partially applying # multiprocessing.context.BaseContext's methods, so the two signatures should # be identical (modulo self). # Sychronization primitives _LockLike = Union[synchronize.Lock, synchronize.RLock] def Barrier(parties: int, action: Optional[Callable[..., Any]] = ..., timeout: Optional[float] = ...) -> synchronize.Barrier: ... def BoundedSemaphore(value: int = ...) -> synchronize.BoundedSemaphore: ... def Condition(lock: Optional[_LockLike] = ...) -> synchronize.Condition: ... def Event(lock: Optional[_LockLike] = ...) -> synchronize.Event: ... def Lock() -> synchronize.Lock: ... def RLock() -> synchronize.RLock: ... def Semaphore(value: int = ...) -> synchronize.Semaphore: ... def Pipe(duplex: bool = ...) -> Tuple[connection.Connection, connection.Connection]: ... def Pool(processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ..., maxtasksperchild: Optional[int] = ...) -> pool.Pool: ... class Array(): value: Any = ... def __init__(self, typecode_or_type: Union[str, Type[_CData]], size_or_initializer: Union[int, Sequence[Any]], *, lock: Union[bool, _LockLike] = ...) -> None: ... def acquire(self) -> bool: ... def release(self) -> bool: ... def get_lock(self) -> _LockLike: ... def get_obj(self) -> Any: ... @overload def __getitem__(self, key: int) -> Any: ... @overload def __getitem__(self, key: slice) -> List[Any]: ... def __getslice__(self, start: int, stop: int) -> Any: ... def __setitem__(self, key: int, value: Any) -> None: ... class Value(): value: Any = ... def __init__(self, typecode_or_type: Union[str, Type[_CData]], *args: Any, lock: Union[bool, _LockLike] = ...) -> None: ... def get_lock(self) -> _LockLike: ... def get_obj(self) -> Any: ... def acquire(self) -> bool: ... def release(self) -> bool: ... # ----- multiprocessing function stubs ----- def allow_connection_pickling() -> None: ... def cpu_count() -> int: ... def get_logger() -> Logger: ... def log_to_stderr(level: Optional[Union[str, int]] = ...) -> Logger: ... def Manager() -> SyncManager: ... def set_forkserver_preload(module_names: List[str]) -> None: ... def get_all_start_methods() -> List[str]: ... def get_context(method: Optional[str] = ...) -> BaseContext: ... def get_start_method(allow_none: bool = ...) -> Optional[str]: ... def set_start_method(method: str, force: Optional[bool] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/queues.pyi0000664000175000017500000000212513577124116026400 0ustar davedave00000000000000from typing import Any, Generic, Optional, TypeVar import queue _T = TypeVar('_T') class Queue(queue.Queue[_T]): # FIXME: `ctx` is a circular dependency and it's not actually optional. # It's marked as such to be able to use the generic Queue in __init__.pyi. def __init__(self, maxsize: int = ..., *, ctx: Any = ...) -> None: ... def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ... def put(self, obj: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ... def qsize(self) -> int: ... def empty(self) -> bool: ... def full(self) -> bool: ... def put_nowait(self, item: _T) -> None: ... def get_nowait(self) -> _T: ... def close(self) -> None: ... def join_thread(self) -> None: ... def cancel_join_thread(self) -> None: ... class JoinableQueue(Queue[_T]): def task_done(self) -> None: ... def join(self) -> None: ... class SimpleQueue(Generic[_T]): def __init__(self, *, ctx: Any = ...) -> None: ... def empty(self) -> bool: ... def get(self) -> _T: ... def put(self, item: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/connection.pyi0000664000175000017500000000405513577124116027234 0ustar davedave00000000000000from typing import Any, Iterable, List, Optional, Tuple, Type, Union import socket import sys import types # https://docs.python.org/3/library/multiprocessing.html#address-formats _Address = Union[str, Tuple[str, int]] class _ConnectionBase: @property def closed(self) -> bool: ... # undocumented @property def readable(self) -> bool: ... # undocumented @property def writable(self) -> bool: ... # undocumented def fileno(self) -> int: ... def close(self) -> None: ... def send_bytes(self, buf: bytes, offset: int = ..., size: Optional[int] = ...) -> None: ... def send(self, obj: Any) -> None: ... def recv_bytes(self, maxlength: Optional[int] = ...) -> bytes: ... def recv_bytes_into(self, buf: Any, offset: int = ...) -> int: ... def recv(self) -> Any: ... def poll(self, timeout: Optional[float] = ...) -> bool: ... class Connection(_ConnectionBase): ... if sys.platform == "win32": class PipeConnection(_ConnectionBase): ... class Listener: def __init__(self, address: Optional[_Address] = ..., family: Optional[str] = ..., backlog: int = ..., authkey: Optional[bytes] = ...) -> None: ... def accept(self) -> Connection: ... def close(self) -> None: ... @property def address(self) -> _Address: ... @property def last_accepted(self) -> Optional[_Address]: ... def __enter__(self) -> Listener: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], exc_tb: Optional[types.TracebackType]) -> None: ... def deliver_challenge(connection: Connection, authkey: bytes) -> None: ... def answer_challenge(connection: Connection, authkey: bytes) -> None: ... def wait(object_list: Iterable[Union[Connection, socket.socket, int]], timeout: Optional[float] = ...) -> List[Union[Connection, socket.socket, int]]: ... def Client(address: _Address, family: Optional[str] = ..., authkey: Optional[bytes] = ...) -> Connection: ... def Pipe(duplex: bool = ...) -> Tuple[Connection, Connection]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/dummy/0000775000175000017500000000000013577125145025504 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/dummy/__init__.pyi0000664000175000017500000000221513577124116027763 0ustar davedave00000000000000from typing import Any, Optional, List import array import threading import weakref from queue import Queue as Queue JoinableQueue = Queue Barrier = threading.Barrier BoundedSemaphore = threading.BoundedSemaphore Condition = threading.Condition Event = threading.Event Lock = threading.Lock RLock = threading.RLock Semaphore = threading.Semaphore class DummyProcess(threading.Thread): _children: weakref.WeakKeyDictionary[Any, Any] _parent: threading.Thread _pid: None _start_called: int exitcode: Optional[int] def __init__(self, group=..., target=..., name=..., args=..., kwargs=...) -> None: ... Process = DummyProcess class Namespace(object): def __init__(self, **kwds) -> None: ... class Value(object): _typecode: Any _value: Any value: Any def __init__(self, typecode, value, lock=...) -> None: ... def Array(typecode, sequence, lock=...) -> array.array[Any]: ... def Manager() -> Any: ... def Pool(processes=..., initializer=..., initargs=...) -> Any: ... def active_children() -> List[Any]: ... def current_process() -> threading.Thread: ... def freeze_support() -> None: ... def shutdown() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/dummy/connection.pyi0000664000175000017500000000211113577124116030356 0ustar davedave00000000000000from typing import Any, List, Optional, Tuple, TypeVar from queue import Queue families: List[None] _TConnection = TypeVar('_TConnection', bound=Connection) _TListener = TypeVar('_TListener', bound=Listener) class Connection(object): _in: Any _out: Any recv: Any recv_bytes: Any send: Any send_bytes: Any def __enter__(self: _TConnection) -> _TConnection: ... def __exit__(self, exc_type, exc_value, exc_tb) -> None: ... def __init__(self, _in, _out) -> None: ... def close(self) -> None: ... def poll(self, timeout: float = ...) -> bool: ... class Listener(object): _backlog_queue: Optional[Queue[Any]] @property def address(self) -> Optional[Queue[Any]]: ... def __enter__(self: _TListener) -> _TListener: ... def __exit__(self, exc_type, exc_value, exc_tb) -> None: ... def __init__(self, address=..., family=..., backlog=...) -> None: ... def accept(self) -> Connection: ... def close(self) -> None: ... def Client(address) -> Connection: ... def Pipe(duplex: bool = ...) -> Tuple[Connection, Connection]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/context.pyi0000664000175000017500000001436113577124116026562 0ustar davedave00000000000000# Stubs for multiprocessing.context from logging import Logger import multiprocessing from multiprocessing import synchronize from multiprocessing import queues from multiprocessing.process import BaseProcess import sys from typing import Any, Callable, Iterable, Optional, List, Mapping, Sequence, Type, Union _LockLike = Union[synchronize.Lock, synchronize.RLock] class ProcessError(Exception): ... class BufferTooShort(ProcessError): ... class TimeoutError(ProcessError): ... class AuthenticationError(ProcessError): ... class BaseContext(object): ProcessError: Type[Exception] BufferTooShort: Type[Exception] TimeoutError: Type[Exception] AuthenticationError: Type[Exception] # N.B. The methods below are applied at runtime to generate # multiprocessing.*, so the signatures should be identical (modulo self). @staticmethod def current_process() -> BaseProcess: ... if sys.version_info >= (3, 8): @staticmethod def parent_process() -> Optional[BaseProcess]: ... @staticmethod def active_children() -> List[BaseProcess]: ... def cpu_count(self) -> int: ... # TODO: change return to SyncManager once a stub exists in multiprocessing.managers def Manager(self) -> Any: ... # TODO: change return to Pipe once a stub exists in multiprocessing.connection def Pipe(self, duplex: bool = ...) -> Any: ... def Barrier(self, parties: int, action: Optional[Callable[..., Any]] = ..., timeout: Optional[float] = ...) -> synchronize.Barrier: ... def BoundedSemaphore(self, value: int = ...) -> synchronize.BoundedSemaphore: ... def Condition(self, lock: Optional[_LockLike] = ...) -> synchronize.Condition: ... def Event(self, lock: Optional[_LockLike] = ...) -> synchronize.Event: ... def Lock(self) -> synchronize.Lock: ... def RLock(self) -> synchronize.RLock: ... def Semaphore(self, value: int = ...) -> synchronize.Semaphore: ... def Queue(self, maxsize: int = ...) -> queues.Queue[Any]: ... def JoinableQueue(self, maxsize: int = ...) -> queues.JoinableQueue[Any]: ... def SimpleQueue(self) -> queues.SimpleQueue[Any]: ... def Pool( self, processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ..., maxtasksperchild: Optional[int] = ... ) -> multiprocessing.pool.Pool: ... # TODO: typecode_or_type param is a ctype with a base class of _SimpleCData or array.typecode Need to figure out # how to handle the ctype # TODO: change return to RawValue once a stub exists in multiprocessing.sharedctypes def RawValue(self, typecode_or_type: Any, *args: Any) -> Any: ... # TODO: typecode_or_type param is a ctype with a base class of _SimpleCData or array.typecode Need to figure out # how to handle the ctype # TODO: change return to RawArray once a stub exists in multiprocessing.sharedctypes def RawArray(self, typecode_or_type: Any, size_or_initializer: Union[int, Sequence[Any]]) -> Any: ... # TODO: typecode_or_type param is a ctype with a base class of _SimpleCData or array.typecode Need to figure out # how to handle the ctype # TODO: change return to Value once a stub exists in multiprocessing.sharedctypes def Value( self, typecode_or_type: Any, *args: Any, lock: bool = ... ) -> Any: ... # TODO: typecode_or_type param is a ctype with a base class of _SimpleCData or array.typecode Need to figure out # how to handle the ctype # TODO: change return to Array once a stub exists in multiprocessing.sharedctypes def Array( self, typecode_or_type: Any, size_or_initializer: Union[int, Sequence[Any]], *, lock: bool = ... ) -> Any: ... def freeze_support(self) -> None: ... def get_logger(self) -> Logger: ... def log_to_stderr(self, level: Optional[str] = ...) -> Logger: ... def allow_connection_pickling(self) -> None: ... def set_executable(self, executable: str) -> None: ... def set_forkserver_preload(self, module_names: List[str]) -> None: ... def get_context(self, method: Optional[str] = ...) -> BaseContext: ... def get_start_method(self, allow_none: bool = ...) -> str: ... def set_start_method(self, method: Optional[str], force: bool = ...) -> None: ... @property def reducer(self) -> str: ... @reducer.setter def reducer(self, reduction: str) -> None: ... def _check_available(self) -> None: ... class Process(BaseProcess): _start_method: Optional[str] @staticmethod def _Popen(process_obj: BaseProcess) -> DefaultContext: ... class DefaultContext(BaseContext): Process: Type[multiprocessing.Process] def __init__(self, context: BaseContext) -> None: ... def get_context(self, method: Optional[str] = ...) -> BaseContext: ... def set_start_method(self, method: Optional[str], force: bool = ...) -> None: ... def get_start_method(self, allow_none: bool = ...) -> str: ... def get_all_start_methods(self) -> List[str]: ... if sys.platform != 'win32': class ForkProcess(BaseProcess): _start_method: str @staticmethod def _Popen(process_obj: BaseProcess) -> Any: ... class SpawnProcess(BaseProcess): _start_method: str @staticmethod def _Popen(process_obj: BaseProcess) -> SpawnProcess: ... class ForkServerProcess(BaseProcess): _start_method: str @staticmethod def _Popen(process_obj: BaseProcess) -> Any: ... class ForkContext(BaseContext): _name: str Process: Type[ForkProcess] class SpawnContext(BaseContext): _name: str Process: Type[SpawnProcess] class ForkServerContext(BaseContext): _name: str Process: Type[ForkServerProcess] else: class SpawnProcess(BaseProcess): _start_method: str @staticmethod def _Popen(process_obj: BaseProcess) -> Any: ... class SpawnContext(BaseContext): _name: str Process: Type[SpawnProcess] def _force_start_method(method: str) -> None: ... def get_spawning_popen() -> Optional[Any]: ... def set_spawning_popen(popen: Any) -> None: ... def assert_spawning(obj: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/pool.pyi0000664000175000017500000000657413577124116026056 0ustar davedave00000000000000from typing import Any, Callable, ContextManager, Iterable, Mapping, Optional, List, TypeVar, Generic, Iterator _PT = TypeVar('_PT', bound=Pool) _S = TypeVar('_S') _T = TypeVar('_T') class ApplyResult(Generic[_T]): def get(self, timeout: Optional[float] = ...) -> _T: ... def wait(self, timeout: Optional[float] = ...) -> None: ... def ready(self) -> bool: ... def successful(self) -> bool: ... # alias created during issue #17805 AsyncResult = ApplyResult class MapResult(ApplyResult[List[_T]]): ... class IMapIterator(Iterator[_T]): def __iter__(self: _S) -> _S: ... def next(self, timeout: Optional[float] = ...) -> _T: ... def __next__(self, timeout: Optional[float] = ...) -> _T: ... class IMapUnorderedIterator(IMapIterator[_T]): ... class Pool(ContextManager[Pool]): def __init__(self, processes: Optional[int] = ..., initializer: Optional[Callable[..., None]] = ..., initargs: Iterable[Any] = ..., maxtasksperchild: Optional[int] = ..., context: Optional[Any] = ...) -> None: ... def apply(self, func: Callable[..., _T], args: Iterable[Any] = ..., kwds: Mapping[str, Any] = ...) -> _T: ... def apply_async(self, func: Callable[..., _T], args: Iterable[Any] = ..., kwds: Mapping[str, Any] = ..., callback: Optional[Callable[[_T], None]] = ..., error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult[_T]: ... def map(self, func: Callable[[_S], _T], iterable: Iterable[_S] = ..., chunksize: Optional[int] = ...) -> List[_T]: ... def map_async(self, func: Callable[[_S], _T], iterable: Iterable[_S] = ..., chunksize: Optional[int] = ..., callback: Optional[Callable[[_T], None]] = ..., error_callback: Optional[Callable[[BaseException], None]] = ...) -> MapResult[_T]: ... def imap(self, func: Callable[[_S], _T], iterable: Iterable[_S] = ..., chunksize: Optional[int] = ...) -> IMapIterator[_T]: ... def imap_unordered(self, func: Callable[[_S], _T], iterable: Iterable[_S] = ..., chunksize: Optional[int] = ...) -> IMapIterator[_T]: ... def starmap(self, func: Callable[..., _T], iterable: Iterable[Iterable[Any]] = ..., chunksize: Optional[int] = ...) -> List[_T]: ... def starmap_async(self, func: Callable[..., _T], iterable: Iterable[Iterable[Any]] = ..., chunksize: Optional[int] = ..., callback: Optional[Callable[[_T], None]] = ..., error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult[List[_T]]: ... def close(self) -> None: ... def terminate(self) -> None: ... def join(self) -> None: ... def __enter__(self: _PT) -> _PT: ... class ThreadPool(Pool, ContextManager[ThreadPool]): def __init__(self, processes: Optional[int] = ..., initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ...) -> None: ... # undocumented RUN: int CLOSE: int TERMINATE: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/process.pyi0000664000175000017500000000216613577124116026554 0ustar davedave00000000000000import sys from typing import Any, Callable, List, Mapping, Optional, Tuple class BaseProcess: name: str daemon: bool authkey: bytes def __init__( self, group: None = ..., target: Optional[Callable[..., Any]] = ..., name: Optional[str] = ..., args: Tuple[Any, ...] = ..., kwargs: Mapping[str, Any] = ..., *, daemon: Optional[bool] = ..., ) -> None: ... def run(self) -> None: ... def start(self) -> None: ... def terminate(self) -> None: ... if sys.version_info >= (3, 7): def kill(self) -> None: ... def close(self) -> None: ... def join(self, timeout: Optional[float] = ...) -> None: ... def is_alive(self) -> bool: ... @property def exitcode(self) -> Optional[int]: ... @property def ident(self) -> Optional[int]: ... @property def pid(self) -> Optional[int]: ... @property def sentinel(self) -> int: ... def current_process() -> BaseProcess: ... def active_children() -> List[BaseProcess]: ... if sys.version_info >= (3, 8): def parent_process() -> Optional[BaseProcess]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/spawn.pyi0000664000175000017500000000125713577124116026226 0ustar davedave00000000000000from typing import Any, Dict, List, Mapping, Optional, Sequence from types import ModuleType WINEXE: bool WINSERVICE: bool def set_executable(exe: str) -> None: ... def get_executable() -> str: ... def is_forking(argv: Sequence[str]) -> bool: ... def freeze_support() -> None: ... def get_command_line(**kwds: Any) -> List[str]: ... def spawn_main(pipe_handle: int, parent_pid: Optional[int] = ..., tracker_fd: Optional[int] = ...) -> None: ... # undocumented def _main(fd: int) -> Any: ... def get_preparation_data(name: str) -> Dict[str, Any]: ... old_main_modules: List[ModuleType] def prepare(data: Mapping[str, Any]) -> None: ... def import_main_path(main_path: str) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/managers.pyi0000664000175000017500000000553113577124116026672 0ustar davedave00000000000000# Stubs for multiprocessing.managers # NOTE: These are incomplete! import queue import sys import threading from typing import ( Any, Callable, ContextManager, Dict, Iterable, Generic, List, Mapping, Optional, Sequence, Tuple, TypeVar, Union, ) from .context import BaseContext if sys.version_info >= (3, 8): from .shared_memory import ShareableList, SharedMemory, _SLT _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') class Namespace: ... _Namespace = Namespace class BaseProxy: ... class ValueProxy(BaseProxy, Generic[_T]): def get(self) -> _T: ... def set(self, value: _T) -> None: ... value: _T # Returned by BaseManager.get_server() class Server: address: Any def serve_forever(self) -> None: ... class BaseManager(ContextManager[BaseManager]): def __init__( self, address: Optional[Any] = ..., authkey: Optional[bytes] = ..., serializer: str = ..., ctx: Optional[BaseContext] = ..., ) -> None: ... def get_server(self) -> Server: ... def connect(self) -> None: ... def start(self, initializer: Optional[Callable[..., Any]] = ..., initargs: Iterable[Any] = ...) -> None: ... def shutdown(self) -> None: ... # only available after start() was called def join(self, timeout: Optional[float] = ...) -> None: ... # undocumented @property def address(self) -> Any: ... @classmethod def register(cls, typeid: str, callable: Optional[Callable[..., Any]] = ..., proxytype: Any = ..., exposed: Optional[Sequence[str]] = ..., method_to_typeid: Optional[Mapping[str, str]] = ..., create_method: bool = ...) -> None: ... class SyncManager(BaseManager, ContextManager[SyncManager]): def BoundedSemaphore(self, value: Any = ...) -> threading.BoundedSemaphore: ... def Condition(self, lock: Any = ...) -> threading.Condition: ... def Event(self) -> threading.Event: ... def Lock(self) -> threading.Lock: ... def Namespace(self) -> _Namespace: ... def Queue(self, maxsize: int = ...) -> queue.Queue[Any]: ... def RLock(self) -> threading.RLock: ... def Semaphore(self, value: Any = ...) -> threading.Semaphore: ... def Array(self, typecode: Any, sequence: Sequence[_T]) -> Sequence[_T]: ... def Value(self, typecode: Any, value: _T) -> ValueProxy[_T]: ... def dict(self, sequence: Mapping[_KT, _VT] = ...) -> Dict[_KT, _VT]: ... def list(self, sequence: Sequence[_T] = ...) -> List[_T]: ... class RemoteError(Exception): ... if sys.version_info >= (3, 8): class SharedMemoryServer(Server): ... class SharedMemoryManager(BaseManager): def get_server(self) -> SharedMemoryServer: ... def SharedMemory(self, size: int) -> SharedMemory: ... def ShareableList(self, sequence: Optional[Iterable[_SLT]]) -> ShareableList[_SLT]: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/synchronize.pyi0000664000175000017500000000403013577124116027441 0ustar davedave00000000000000from typing import Any, Callable, ContextManager, Optional, Union from multiprocessing.context import BaseContext import threading import sys _LockLike = Union[Lock, RLock] class Barrier(threading.Barrier): def __init__(self, parties: int, action: Optional[Callable[..., Any]] = ..., timeout: Optional[float] = ..., * ctx: BaseContext) -> None: ... class BoundedSemaphore(Semaphore): def __init__(self, value: int = ..., *, ctx: BaseContext) -> None: ... class Condition(ContextManager[bool]): def __init__(self, lock: Optional[_LockLike] = ..., *, ctx: BaseContext) -> None: ... if sys.version_info >= (3, 7): def notify(self, n: int = ...) -> None: ... else: def notify(self) -> None: ... def notify_all(self) -> None: ... def wait(self, timeout: Optional[float] = ...) -> bool: ... def wait_for(self, predicate: Callable[[], bool], timeout: Optional[float] = ...) -> bool: ... def acquire(self, block: bool = ..., timeout: Optional[float] = ...) -> bool: ... def release(self) -> None: ... class Event(ContextManager[bool]): def __init__(self, lock: Optional[_LockLike] = ..., *, ctx: BaseContext) -> None: ... def is_set(self) -> bool: ... def set(self) -> None: ... def clear(self) -> None: ... def wait(self, timeout: Optional[float] = ...) -> bool: ... class Lock(SemLock): def __init__(self, *, ctx: BaseContext) -> None: ... class RLock(SemLock): def __init__(self, *, ctx: BaseContext) -> None: ... class Semaphore(SemLock): def __init__(self, value: int = ..., *, ctx: BaseContext) -> None: ... # Not part of public API class SemLock(ContextManager[bool]): def acquire(self, block: bool = ..., timeout: Optional[float] = ...) -> bool: ... def release(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/multiprocessing/shared_memory.pyi0000664000175000017500000000214113577124116027725 0ustar davedave00000000000000import sys from typing import Generic, Iterable, Optional, Tuple, TypeVar _S = TypeVar("_S") _SLT = TypeVar("_SLT", int, float, bool, str, bytes, None) if sys.version_info >= (3, 8): class SharedMemory: def __init__(self, name: Optional[str] = ..., create: bool = ..., size: int = ...) -> None: ... @property def buf(self) -> memoryview: ... @property def name(self) -> str: ... @property def size(self) -> int: ... def close(self) -> None: ... def unlink(self) -> None: ... class ShareableList(Generic[_SLT]): shm: SharedMemory def __init__(self, sequence: Optional[Iterable[_SLT]] = ..., *, name: Optional[str] = ...) -> None: ... def __getitem__(self, position: int) -> _SLT: ... def __setitem__(self, position: int, value: _SLT) -> None: ... def __reduce__(self: _S) -> Tuple[_S, Tuple[_SLT, ...]]: ... def __len__(self) -> int: ... @property def format(self) -> str: ... def count(self, value: _SLT) -> int: ... def index(self, value: _SLT) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/gettext.pyi0000664000175000017500000000577313577124116023342 0ustar davedave00000000000000import sys from typing import overload, Any, Container, IO, Iterable, Optional, Type, TypeVar if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal class NullTranslations: def __init__(self, fp: IO[str] = ...) -> None: ... def _parse(self, fp: IO[str]) -> None: ... def add_fallback(self, fallback: NullTranslations) -> None: ... def gettext(self, message: str) -> str: ... def lgettext(self, message: str) -> str: ... def ngettext(self, singular: str, plural: str, n: int) -> str: ... def lngettext(self, singular: str, plural: str, n: int) -> str: ... def pgettext(self, context: str, message: str) -> str: ... def npgettext(self, context: str, msgid1: str, msgid2: str, n: int) -> str: ... def info(self) -> Any: ... def charset(self) -> Any: ... def output_charset(self) -> Any: ... def set_output_charset(self, charset: str) -> None: ... def install(self, names: Optional[Container[str]] = ...) -> None: ... class GNUTranslations(NullTranslations): LE_MAGIC: int BE_MAGIC: int def find(domain: str, localedir: Optional[str] = ..., languages: Optional[Iterable[str]] = ..., all: bool = ...) -> Any: ... _T = TypeVar('_T') @overload def translation(domain: str, localedir: Optional[str] = ..., languages: Optional[Iterable[str]] = ..., class_: None = ..., fallback: bool = ..., codeset: Optional[str] = ...) -> NullTranslations: ... @overload def translation(domain: str, localedir: Optional[str] = ..., languages: Optional[Iterable[str]] = ..., class_: Type[_T] = ..., fallback: Literal[False] = ..., codeset: Optional[str] = ...) -> _T: ... @overload def translation(domain: str, localedir: Optional[str] = ..., languages: Optional[Iterable[str]] = ..., class_: Type[_T] = ..., fallback: Literal[True] = ..., codeset: Optional[str] = ...) -> Any: ... def install(domain: str, localedir: Optional[str] = ..., codeset: Optional[str] = ..., names: Optional[Container[str]] = ...) -> None: ... def textdomain(domain: Optional[str] = ...) -> str: ... def bindtextdomain(domain: str, localedir: Optional[str] = ...) -> str: ... def bind_textdomain_codeset(domain: str, codeset: Optional[str] = ...) -> str: ... def dgettext(domain: str, message: str) -> str: ... def ldgettext(domain: str, message: str) -> str: ... def dngettext(domain: str, singular: str, plural: str, n: int) -> str: ... def ldngettext(domain: str, singular: str, plural: str, n: int) -> str: ... def gettext(message: str) -> str: ... def lgettext(message: str) -> str: ... def ngettext(singular: str, plural: str, n: int) -> str: ... def lngettext(singular: str, plural: str, n: int) -> str: ... def pgettext(context: str, message: str) -> str: ... def dpgettext(domain: str, context: str, message: str) -> str: ... def npgettext(context: str, msgid1: str, msgid2: str, n: int) -> str: ... def dnpgettext(domain: str, context: str, msgid1: str, msgid2: str, n: int) -> str: ... Catalog = translation jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_thread.pyi0000664000175000017500000000246713577124116023261 0ustar davedave00000000000000# Stubs for _thread import sys from threading import Thread from types import TracebackType from typing import Any, Callable, Dict, NamedTuple, NoReturn, Optional, Tuple, Type error = RuntimeError def _count() -> int: ... _dangling: Any class LockType: def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... def release(self) -> None: ... def locked(self) -> bool: ... def __enter__(self) -> bool: ... def __exit__( self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType], ) -> None: ... def start_new_thread(function: Callable[..., Any], args: Tuple[Any, ...], kwargs: Dict[str, Any] = ...) -> int: ... def interrupt_main() -> None: ... def exit() -> NoReturn: ... def allocate_lock() -> LockType: ... def get_ident() -> int: ... def stack_size(size: int = ...) -> int: ... TIMEOUT_MAX: int if sys.version_info >= (3, 8): def get_native_id() -> int: ... # only available on some platforms class ExceptHookArgs(NamedTuple): exc_type: Type[BaseException] exc_value: Optional[BaseException] exc_traceback: Optional[TracebackType] thread: Optional[Thread] def _ExceptHookArgs(args) -> ExceptHookArgs: ... _excepthook: Callable[[ExceptHookArgs], Any] jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/sre_constants.pyi0000664000175000017500000000651613577124116024537 0ustar davedave00000000000000# Source: https://github.com/python/cpython/blob/master/Lib/sre_constants.py from typing import Any, Dict, List, Optional, Union MAGIC: int class error(Exception): msg: str pattern: Optional[Union[str, bytes]] pos: Optional[int] lineno: int colno: int def __init__(self, msg: str, pattern: Union[str, bytes] = ..., pos: int = ...) -> None: ... class _NamedIntConstant(int): name: Any def __new__(cls, value: int, name: str): ... MAXREPEAT: _NamedIntConstant OPCODES: List[_NamedIntConstant] ATCODES: List[_NamedIntConstant] CHCODES: List[_NamedIntConstant] OP_IGNORE: Dict[_NamedIntConstant, _NamedIntConstant] AT_MULTILINE: Dict[_NamedIntConstant, _NamedIntConstant] AT_LOCALE: Dict[_NamedIntConstant, _NamedIntConstant] AT_UNICODE: Dict[_NamedIntConstant, _NamedIntConstant] CH_LOCALE: Dict[_NamedIntConstant, _NamedIntConstant] CH_UNICODE: Dict[_NamedIntConstant, _NamedIntConstant] SRE_FLAG_TEMPLATE: int SRE_FLAG_IGNORECASE: int SRE_FLAG_LOCALE: int SRE_FLAG_MULTILINE: int SRE_FLAG_DOTALL: int SRE_FLAG_UNICODE: int SRE_FLAG_VERBOSE: int SRE_FLAG_DEBUG: int SRE_FLAG_ASCII: int SRE_INFO_PREFIX: int SRE_INFO_LITERAL: int SRE_INFO_CHARSET: int # Stubgen above; manually defined constants below (dynamic at runtime) # from OPCODES FAILURE: _NamedIntConstant SUCCESS: _NamedIntConstant ANY: _NamedIntConstant ANY_ALL: _NamedIntConstant ASSERT: _NamedIntConstant ASSERT_NOT: _NamedIntConstant AT: _NamedIntConstant BRANCH: _NamedIntConstant CALL: _NamedIntConstant CATEGORY: _NamedIntConstant CHARSET: _NamedIntConstant BIGCHARSET: _NamedIntConstant GROUPREF: _NamedIntConstant GROUPREF_EXISTS: _NamedIntConstant GROUPREF_IGNORE: _NamedIntConstant IN: _NamedIntConstant IN_IGNORE: _NamedIntConstant INFO: _NamedIntConstant JUMP: _NamedIntConstant LITERAL: _NamedIntConstant LITERAL_IGNORE: _NamedIntConstant MARK: _NamedIntConstant MAX_UNTIL: _NamedIntConstant MIN_UNTIL: _NamedIntConstant NOT_LITERAL: _NamedIntConstant NOT_LITERAL_IGNORE: _NamedIntConstant NEGATE: _NamedIntConstant RANGE: _NamedIntConstant REPEAT: _NamedIntConstant REPEAT_ONE: _NamedIntConstant SUBPATTERN: _NamedIntConstant MIN_REPEAT_ONE: _NamedIntConstant RANGE_IGNORE: _NamedIntConstant MIN_REPEAT: _NamedIntConstant MAX_REPEAT: _NamedIntConstant # from ATCODES AT_BEGINNING: _NamedIntConstant AT_BEGINNING_LINE: _NamedIntConstant AT_BEGINNING_STRING: _NamedIntConstant AT_BOUNDARY: _NamedIntConstant AT_NON_BOUNDARY: _NamedIntConstant AT_END: _NamedIntConstant AT_END_LINE: _NamedIntConstant AT_END_STRING: _NamedIntConstant AT_LOC_BOUNDARY: _NamedIntConstant AT_LOC_NON_BOUNDARY: _NamedIntConstant AT_UNI_BOUNDARY: _NamedIntConstant AT_UNI_NON_BOUNDARY: _NamedIntConstant # from CHCODES CATEGORY_DIGIT: _NamedIntConstant CATEGORY_NOT_DIGIT: _NamedIntConstant CATEGORY_SPACE: _NamedIntConstant CATEGORY_NOT_SPACE: _NamedIntConstant CATEGORY_WORD: _NamedIntConstant CATEGORY_NOT_WORD: _NamedIntConstant CATEGORY_LINEBREAK: _NamedIntConstant CATEGORY_NOT_LINEBREAK: _NamedIntConstant CATEGORY_LOC_WORD: _NamedIntConstant CATEGORY_LOC_NOT_WORD: _NamedIntConstant CATEGORY_UNI_DIGIT: _NamedIntConstant CATEGORY_UNI_NOT_DIGIT: _NamedIntConstant CATEGORY_UNI_SPACE: _NamedIntConstant CATEGORY_UNI_NOT_SPACE: _NamedIntConstant CATEGORY_UNI_WORD: _NamedIntConstant CATEGORY_UNI_NOT_WORD: _NamedIntConstant CATEGORY_UNI_LINEBREAK: _NamedIntConstant CATEGORY_UNI_NOT_LINEBREAK: _NamedIntConstant jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/http/0000775000175000017500000000000013577125145022101 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/http/__init__.pyi0000664000175000017500000000323113577124116024357 0ustar davedave00000000000000import sys from enum import IntEnum class HTTPStatus(IntEnum): @property def phrase(self) -> str: ... @property def description(self) -> str: ... CONTINUE: int SWITCHING_PROTOCOLS: int PROCESSING: int OK: int CREATED: int ACCEPTED: int NON_AUTHORITATIVE_INFORMATION: int NO_CONTENT: int RESET_CONTENT: int PARTIAL_CONTENT: int MULTI_STATUS: int ALREADY_REPORTED: int IM_USED: int MULTIPLE_CHOICES: int MOVED_PERMANENTLY: int FOUND: int SEE_OTHER: int NOT_MODIFIED: int USE_PROXY: int TEMPORARY_REDIRECT: int PERMANENT_REDIRECT: int BAD_REQUEST: int UNAUTHORIZED: int PAYMENT_REQUIRED: int FORBIDDEN: int NOT_FOUND: int METHOD_NOT_ALLOWED: int NOT_ACCEPTABLE: int PROXY_AUTHENTICATION_REQUIRED: int REQUEST_TIMEOUT: int CONFLICT: int GONE: int LENGTH_REQUIRED: int PRECONDITION_FAILED: int REQUEST_ENTITY_TOO_LARGE: int REQUEST_URI_TOO_LONG: int UNSUPPORTED_MEDIA_TYPE: int REQUESTED_RANGE_NOT_SATISFIABLE: int EXPECTATION_FAILED: int UNPROCESSABLE_ENTITY: int LOCKED: int FAILED_DEPENDENCY: int UPGRADE_REQUIRED: int PRECONDITION_REQUIRED: int TOO_MANY_REQUESTS: int REQUEST_HEADER_FIELDS_TOO_LARGE: int INTERNAL_SERVER_ERROR: int NOT_IMPLEMENTED: int BAD_GATEWAY: int SERVICE_UNAVAILABLE: int GATEWAY_TIMEOUT: int HTTP_VERSION_NOT_SUPPORTED: int VARIANT_ALSO_NEGOTIATES: int INSUFFICIENT_STORAGE: int LOOP_DETECTED: int NOT_EXTENDED: int NETWORK_AUTHENTICATION_REQUIRED: int if sys.version_info >= (3, 7): MISDIRECTED_REQUEST: int jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/http/server.pyi0000664000175000017500000000615013577124116024131 0ustar davedave00000000000000# Stubs for http.server (Python 3.4) import sys from typing import Any, BinaryIO, Callable, ClassVar, Dict, List, Mapping, Optional, Sequence, Tuple, Union import socketserver import email.message if sys.version_info >= (3, 7): from builtins import _PathLike class HTTPServer(socketserver.TCPServer): server_name: str server_port: int def __init__(self, server_address: Tuple[str, int], RequestHandlerClass: Callable[..., BaseHTTPRequestHandler]) -> None: ... if sys.version_info >= (3, 7): class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer): daemon_threads: bool # undocumented class BaseHTTPRequestHandler: client_address: Tuple[str, int] server: socketserver.BaseServer close_connection: bool requestline: str command: str path: str request_version: str headers: email.message.Message rfile: BinaryIO wfile: BinaryIO server_version: str sys_version: str error_message_format: str error_content_type: str protocol_version: str MessageClass: type responses: Mapping[int, Tuple[str, str]] weekdayname: ClassVar[Sequence[str]] = ... # Undocumented monthname: ClassVar[Sequence[Optional[str]]] = ... # Undocumented def __init__(self, request: bytes, client_address: Tuple[str, int], server: socketserver.BaseServer) -> None: ... def handle(self) -> None: ... def handle_one_request(self) -> None: ... def handle_expect_100(self) -> bool: ... def send_error(self, code: int, message: Optional[str] = ..., explain: Optional[str] = ...) -> None: ... def send_response(self, code: int, message: Optional[str] = ...) -> None: ... def send_header(self, keyword: str, value: str) -> None: ... def send_response_only(self, code: int, message: Optional[str] = ...) -> None: ... def end_headers(self) -> None: ... def flush_headers(self) -> None: ... def log_request(self, code: Union[int, str] = ..., size: Union[int, str] = ...) -> None: ... def log_error(self, format: str, *args: Any) -> None: ... def log_message(self, format: str, *args: Any) -> None: ... def version_string(self) -> str: ... def date_time_string(self, timestamp: Optional[int] = ...) -> str: ... def log_date_time_string(self) -> str: ... def address_string(self) -> str: ... def parse_request(self) -> bool: ... # Undocumented class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): extensions_map: Dict[str, str] if sys.version_info >= (3, 7): def __init__(self, request: bytes, client_address: Tuple[str, int], server: socketserver.BaseServer, directory: Optional[Union[str, _PathLike[str]]]) -> None: ... else: def __init__(self, request: bytes, client_address: Tuple[str, int], server: socketserver.BaseServer) -> None: ... def do_GET(self) -> None: ... def do_HEAD(self) -> None: ... class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): cgi_directories: List[str] def do_POST(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/http/cookiejar.pyi0000664000175000017500000001143013577124116024566 0ustar davedave00000000000000from typing import Dict, Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union, overload from http.client import HTTPResponse from urllib.request import Request _T = TypeVar('_T') class LoadError(OSError): ... class CookieJar(Iterable[Cookie]): def __init__(self, policy: Optional[CookiePolicy] = ...) -> None: ... def add_cookie_header(self, request: Request) -> None: ... def extract_cookies(self, response: HTTPResponse, request: Request) -> None: ... def set_policy(self, policy: CookiePolicy) -> None: ... def make_cookies(self, response: HTTPResponse, request: Request) -> Sequence[Cookie]: ... def set_cookie(self, cookie: Cookie) -> None: ... def set_cookie_if_ok(self, cookie: Cookie, request: Request) -> None: ... def clear(self, domain: str = ..., path: str = ..., name: str = ...) -> None: ... def clear_session_cookies(self) -> None: ... def __iter__(self) -> Iterator[Cookie]: ... def __len__(self) -> int: ... class FileCookieJar(CookieJar): filename: str delayload: bool def __init__(self, filename: str = ..., delayload: bool = ..., policy: Optional[CookiePolicy] = ...) -> None: ... def save(self, filename: Optional[str] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...) -> None: ... def load(self, filename: Optional[str] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...) -> None: ... def revert(self, filename: Optional[str] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...) -> None: ... class MozillaCookieJar(FileCookieJar): ... class LWPCookieJar(FileCookieJar): def as_lwp_str(self, ignore_discard: bool = ..., ignore_expires: bool = ...) -> str: ... # undocumented class CookiePolicy: netscape: bool rfc2965: bool hide_cookie2: bool def set_ok(self, cookie: Cookie, request: Request) -> bool: ... def return_ok(self, cookie: Cookie, request: Request) -> bool: ... def domain_return_ok(self, domain: str, request: Request) -> bool: ... def path_return_ok(self, path: str, request: Request) -> bool: ... class DefaultCookiePolicy(CookiePolicy): rfc2109_as_netscape: bool strict_domain: bool strict_rfc2965_unverifiable: bool strict_ns_unverifiable: bool strict_ns_domain: int strict_ns_set_initial_dollar: bool strict_ns_set_path: bool DomainStrictNoDots: int DomainStrictNonDomain: int DomainRFC2965Match: int DomainLiberal: int DomainStrict: int def __init__(self, blocked_domains: Optional[Sequence[str]] = ..., allowed_domains: Optional[Sequence[str]] = ..., netscape: bool = ..., rfc2965: bool = ..., rfc2109_as_netscape: Optional[bool] = ..., hide_cookie2: bool = ..., strict_domain: bool = ..., strict_rfc2965_unverifiable: bool = ..., strict_ns_unverifiable: bool = ..., strict_ns_domain: int = ..., strict_ns_set_initial_dollar: bool = ..., strict_ns_set_path: bool = ...) -> None: ... def blocked_domains(self) -> Tuple[str, ...]: ... def set_blocked_domains(self, blocked_domains: Sequence[str]) -> None: ... def is_blocked(self, domain: str) -> bool: ... def allowed_domains(self) -> Optional[Tuple[str, ...]]: ... def set_allowed_domains(self, allowed_domains: Optional[Sequence[str]]) -> None: ... def is_not_allowed(self, domain: str) -> bool: ... class Cookie: version: Optional[int] name: str value: Optional[str] port: Optional[str] path: str secure: bool expires: Optional[int] discard: bool comment: Optional[str] comment_url: Optional[str] rfc2109: bool port_specified: bool domain: str # undocumented domain_specified: bool domain_initial_dot: bool def __init__(self, version: Optional[int], name: str, value: Optional[str], # undocumented port: Optional[str], port_specified: bool, domain: str, domain_specified: bool, domain_initial_dot: bool, path: str, path_specified: bool, secure: bool, expires: Optional[int], discard: bool, comment: Optional[str], comment_url: Optional[str], rest: Dict[str, str], rfc2109: bool = ...) -> None: ... def has_nonstandard_attr(self, name: str) -> bool: ... @overload def get_nonstandard_attr(self, name: str) -> Optional[str]: ... @overload def get_nonstandard_attr(self, name: str, default: _T = ...) -> Union[str, _T]: ... def set_nonstandard_attr(self, name: str, value: str) -> None: ... def is_expired(self, now: int = ...) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/http/cookies.pyi0000664000175000017500000000240013577124116024251 0ustar davedave00000000000000# Stubs for http.cookies (Python 3.5) from typing import Generic, Dict, List, Mapping, Optional, TypeVar, Union, Any _DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]] _T = TypeVar('_T') class CookieError(Exception): ... class Morsel(Dict[str, Any], Generic[_T]): value: str coded_value: _T key: str def set(self, key: str, val: str, coded_val: _T) -> None: ... def isReservedKey(self, K: str) -> bool: ... def output(self, attrs: Optional[List[str]] = ..., header: str = ...) -> str: ... def js_output(self, attrs: Optional[List[str]] = ...) -> str: ... def OutputString(self, attrs: Optional[List[str]] = ...) -> str: ... class BaseCookie(Dict[str, Morsel[_T]], Generic[_T]): def __init__(self, input: Optional[_DataType] = ...) -> None: ... def value_decode(self, val: str) -> _T: ... def value_encode(self, val: _T) -> str: ... def output(self, attrs: Optional[List[str]] = ..., header: str = ..., sep: str = ...) -> str: ... def js_output(self, attrs: Optional[List[str]] = ...) -> str: ... def load(self, rawdata: _DataType) -> None: ... def __setitem__(self, key: str, value: Union[str, Morsel[_T]]) -> None: ... class SimpleCookie(BaseCookie[_T], Generic[_T]): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/http/client.pyi0000664000175000017500000001417513577124116024107 0ustar davedave00000000000000from typing import ( Any, Dict, IO, Iterable, List, Iterator, Mapping, Optional, Protocol, Tuple, Type, TypeVar, Union, overload, BinaryIO, ) import email.message import io from socket import socket import sys import ssl import types _DataType = Union[bytes, IO[Any], Iterable[bytes], str] _T = TypeVar('_T') HTTP_PORT: int HTTPS_PORT: int CONTINUE: int SWITCHING_PROTOCOLS: int PROCESSING: int OK: int CREATED: int ACCEPTED: int NON_AUTHORITATIVE_INFORMATION: int NO_CONTENT: int RESET_CONTENT: int PARTIAL_CONTENT: int MULTI_STATUS: int IM_USED: int MULTIPLE_CHOICES: int MOVED_PERMANENTLY: int FOUND: int SEE_OTHER: int NOT_MODIFIED: int USE_PROXY: int TEMPORARY_REDIRECT: int BAD_REQUEST: int UNAUTHORIZED: int PAYMENT_REQUIRED: int FORBIDDEN: int NOT_FOUND: int METHOD_NOT_ALLOWED: int NOT_ACCEPTABLE: int PROXY_AUTHENTICATION_REQUIRED: int REQUEST_TIMEOUT: int CONFLICT: int GONE: int LENGTH_REQUIRED: int PRECONDITION_FAILED: int REQUEST_ENTITY_TOO_LARGE: int REQUEST_URI_TOO_LONG: int UNSUPPORTED_MEDIA_TYPE: int REQUESTED_RANGE_NOT_SATISFIABLE: int EXPECTATION_FAILED: int UNPROCESSABLE_ENTITY: int LOCKED: int FAILED_DEPENDENCY: int UPGRADE_REQUIRED: int PRECONDITION_REQUIRED: int TOO_MANY_REQUESTS: int REQUEST_HEADER_FIELDS_TOO_LARGE: int INTERNAL_SERVER_ERROR: int NOT_IMPLEMENTED: int BAD_GATEWAY: int SERVICE_UNAVAILABLE: int GATEWAY_TIMEOUT: int HTTP_VERSION_NOT_SUPPORTED: int INSUFFICIENT_STORAGE: int NOT_EXTENDED: int NETWORK_AUTHENTICATION_REQUIRED: int responses: Dict[int, str] class HTTPMessage(email.message.Message): ... class HTTPResponse(io.BufferedIOBase, BinaryIO): msg: HTTPMessage headers: HTTPMessage version: int debuglevel: int closed: bool status: int reason: str def __init__(self, sock: socket, debuglevel: int = ..., method: Optional[str] = ..., url: Optional[str] = ...) -> None: ... def read(self, amt: Optional[int] = ...) -> bytes: ... @overload def getheader(self, name: str) -> Optional[str]: ... @overload def getheader(self, name: str, default: _T) -> Union[str, _T]: ... def getheaders(self) -> List[Tuple[str, str]]: ... def fileno(self) -> int: ... def isclosed(self) -> bool: ... def __iter__(self) -> Iterator[bytes]: ... def __enter__(self) -> HTTPResponse: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]) -> Optional[bool]: ... def info(self) -> email.message.Message: ... def geturl(self) -> str: ... def getcode(self) -> int: ... def begin(self) -> None: ... # This is an API stub only for the class below, not a class itself. # urllib.request uses it for a parameter. class _HTTPConnectionProtocol(Protocol): if sys.version_info >= (3, 7): def __call__( self, host: str, port: Optional[int] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ..., blocksize: int = ..., ) -> HTTPConnection: ... else: def __call__( self, host: str, port: Optional[int] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ..., ) -> HTTPConnection: ... class HTTPConnection: timeout: float host: str port: int sock: Any if sys.version_info >= (3, 7): def __init__( self, host: str, port: Optional[int] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ..., blocksize: int = ... ) -> None: ... else: def __init__( self, host: str, port: Optional[int] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ... ) -> None: ... if sys.version_info >= (3, 6): def request(self, method: str, url: str, body: Optional[_DataType] = ..., headers: Mapping[str, str] = ..., *, encode_chunked: bool = ...) -> None: ... else: def request(self, method: str, url: str, body: Optional[_DataType] = ..., headers: Mapping[str, str] = ...) -> None: ... def getresponse(self) -> HTTPResponse: ... def set_debuglevel(self, level: int) -> None: ... def set_tunnel(self, host: str, port: Optional[int] = ..., headers: Optional[Mapping[str, str]] = ...) -> None: ... def connect(self) -> None: ... def close(self) -> None: ... def putrequest(self, method: str, url: str, skip_host: bool = ..., skip_accept_encoding: bool = ...) -> None: ... def putheader(self, header: str, *argument: str) -> None: ... if sys.version_info >= (3, 6): def endheaders(self, message_body: Optional[_DataType] = ..., *, encode_chunked: bool = ...) -> None: ... else: def endheaders(self, message_body: Optional[_DataType] = ...) -> None: ... def send(self, data: _DataType) -> None: ... class HTTPSConnection(HTTPConnection): def __init__(self, host: str, port: Optional[int] = ..., key_file: Optional[str] = ..., cert_file: Optional[str] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ..., *, context: Optional[ssl.SSLContext] = ..., check_hostname: Optional[bool] = ...) -> None: ... class HTTPException(Exception): ... error = HTTPException class NotConnected(HTTPException): ... class InvalidURL(HTTPException): ... class UnknownProtocol(HTTPException): ... class UnknownTransferEncoding(HTTPException): ... class UnimplementedFileMode(HTTPException): ... class IncompleteRead(HTTPException): ... class ImproperConnectionState(HTTPException): ... class CannotSendRequest(ImproperConnectionState): ... class CannotSendHeader(ImproperConnectionState): ... class ResponseNotReady(ImproperConnectionState): ... class BadStatusLine(HTTPException): ... class LineTooLong(HTTPException): ... class RemoteDisconnected(ConnectionResetError, BadStatusLine): ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_importlib_modulespec.pyi0000664000175000017500000000302513577124116026222 0ustar davedave00000000000000# ModuleSpec, ModuleType, Loader are part of a dependency cycle. # They are officially defined/exported in other places: # # - ModuleType in types # - Loader in importlib.abc # - ModuleSpec in importlib.machinery (3.4 and later only) # # _Loader is the PEP-451-defined interface for a loader type/object. from abc import ABCMeta from typing import Any, Dict, List, Optional, Protocol class _Loader(Protocol): def load_module(self, fullname: str) -> ModuleType: ... class ModuleSpec: def __init__(self, name: str, loader: Optional[Loader], *, origin: Optional[str] = ..., loader_state: Any = ..., is_package: Optional[bool] = ...) -> None: ... name: str loader: Optional[_Loader] origin: Optional[str] submodule_search_locations: Optional[List[str]] loader_state: Any cached: Optional[str] parent: Optional[str] has_location: bool class ModuleType: __name__: str __file__: str __dict__: Dict[str, Any] __loader__: Optional[_Loader] __package__: Optional[str] __spec__: Optional[ModuleSpec] def __init__(self, name: str, doc: Optional[str] = ...) -> None: ... class Loader(metaclass=ABCMeta): def load_module(self, fullname: str) -> ModuleType: ... def module_repr(self, module: ModuleType) -> str: ... def create_module(self, spec: ModuleSpec) -> Optional[ModuleType]: ... # Not defined on the actual class for backwards-compatibility reasons, # but expected in new code. def exec_module(self, module: ModuleType) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/types.pyi0000664000175000017500000002354313577124116023015 0ustar davedave00000000000000# Stubs for types # Note, all classes "defined" here require special handling. # TODO parts of this should be conditional on version import sys from typing import ( Any, Awaitable, Callable, Dict, Generic, Iterator, Mapping, Optional, Tuple, TypeVar, Union, overload, Type, Iterable ) # ModuleType is exported from this module, but for circular import # reasons exists in its own stub file (with ModuleSpec and Loader). from _importlib_modulespec import ModuleType as ModuleType # Exported _T = TypeVar('_T') _T_co = TypeVar('_T_co', covariant=True) _T_contra = TypeVar('_T_contra', contravariant=True) _KT = TypeVar('_KT') _VT = TypeVar('_VT') class _Cell: cell_contents: Any class FunctionType: __closure__: Optional[Tuple[_Cell, ...]] __code__: CodeType __defaults__: Optional[Tuple[Any, ...]] __dict__: Dict[str, Any] __globals__: Dict[str, Any] __name__: str __qualname__: str __annotations__: Dict[str, Any] __kwdefaults__: Dict[str, Any] def __init__(self, code: CodeType, globals: Dict[str, Any], name: Optional[str] = ..., argdefs: Optional[Tuple[object, ...]] = ..., closure: Optional[Tuple[_Cell, ...]] = ...) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Optional[object], type: Optional[type]) -> MethodType: ... LambdaType = FunctionType class CodeType: """Create a code object. Not for the faint of heart.""" co_argcount: int if sys.version_info >= (3, 8): co_posonlyargcount: int co_kwonlyargcount: int co_nlocals: int co_stacksize: int co_flags: int co_code: bytes co_consts: Tuple[Any, ...] co_names: Tuple[str, ...] co_varnames: Tuple[str, ...] co_filename: str co_name: str co_firstlineno: int co_lnotab: bytes co_freevars: Tuple[str, ...] co_cellvars: Tuple[str, ...] if sys.version_info >= (3, 8): def __init__( self, argcount: int, posonlyargcount: int, kwonlyargcount: int, nlocals: int, stacksize: int, flags: int, codestring: bytes, constants: Tuple[Any, ...], names: Tuple[str, ...], varnames: Tuple[str, ...], filename: str, name: str, firstlineno: int, lnotab: bytes, freevars: Tuple[str, ...] = ..., cellvars: Tuple[str, ...] = ..., ) -> None: ... else: def __init__( self, argcount: int, kwonlyargcount: int, nlocals: int, stacksize: int, flags: int, codestring: bytes, constants: Tuple[Any, ...], names: Tuple[str, ...], varnames: Tuple[str, ...], filename: str, name: str, firstlineno: int, lnotab: bytes, freevars: Tuple[str, ...] = ..., cellvars: Tuple[str, ...] = ..., ) -> None: ... if sys.version_info >= (3, 8): def replace( self, *, co_argcount: int = ..., co_posonlyargcount: int = ..., co_kwonlyargcount: int = ..., co_nlocals: int = ..., co_stacksize: int = ..., co_flags: int = ..., co_firstlineno: int = ..., co_code: bytes = ..., co_consts: Tuple[Any, ...] = ..., co_names: Tuple[str, ...] = ..., co_varnames: Tuple[str, ...] = ..., co_freevars: Tuple[str, ...] = ..., co_cellvars: Tuple[str, ...] = ..., co_filename: str = ..., co_name: str = ..., co_lnotab: bytes = ..., ) -> CodeType: ... class MappingProxyType(Mapping[_KT, _VT], Generic[_KT, _VT]): def __init__(self, mapping: Mapping[_KT, _VT]) -> None: ... def __getitem__(self, k: _KT) -> _VT: ... def __iter__(self) -> Iterator[_KT]: ... def __len__(self) -> int: ... def copy(self) -> Mapping[_KT, _VT]: ... class SimpleNamespace: def __init__(self, **kwargs: Any) -> None: ... def __getattribute__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ... def __delattr__(self, name: str) -> None: ... class GeneratorType: gi_code: CodeType gi_frame: FrameType gi_running: bool gi_yieldfrom: Optional[GeneratorType] def __iter__(self) -> GeneratorType: ... def __next__(self) -> Any: ... def close(self) -> None: ... def send(self, arg: Any) -> Any: ... @overload def throw(self, val: BaseException) -> Any: ... @overload def throw(self, typ: type, val: BaseException = ..., tb: TracebackType = ...) -> Any: ... if sys.version_info >= (3, 6): class AsyncGeneratorType(Generic[_T_co, _T_contra]): ag_await: Optional[Awaitable[Any]] ag_frame: FrameType ag_running: bool ag_code: CodeType def __aiter__(self) -> Awaitable[AsyncGeneratorType[_T_co, _T_contra]]: ... def __anext__(self) -> Awaitable[_T_co]: ... def asend(self, val: _T_contra) -> Awaitable[_T_co]: ... @overload def athrow(self, val: BaseException) -> Awaitable[_T_co]: ... @overload def athrow(self, typ: Type[BaseException], val: BaseException, tb: TracebackType = ...) -> Awaitable[_T_co]: ... def aclose(self) -> Awaitable[None]: ... class CoroutineType: cr_await: Optional[Any] cr_code: CodeType cr_frame: FrameType cr_running: bool def close(self) -> None: ... def send(self, arg: Any) -> Any: ... @overload def throw(self, val: BaseException) -> Any: ... @overload def throw(self, typ: type, val: BaseException = ..., tb: TracebackType = ...) -> Any: ... class _StaticFunctionType: """Fictional type to correct the type of MethodType.__func__. FunctionType is a descriptor, so mypy follows the descriptor protocol and converts MethodType.__func__ back to MethodType (the return type of FunctionType.__get__). But this is actually a special case; MethodType is implemented in C and its attribute access doesn't go through __getattribute__. By wrapping FunctionType in _StaticFunctionType, we get the right result; similar to wrapping a function in staticmethod() at runtime to prevent it being bound as a method. """ def __get__(self, obj: Optional[object], type: Optional[type]) -> FunctionType: ... class MethodType: __func__: _StaticFunctionType __self__: object __name__: str __qualname__: str def __init__(self, func: Callable[..., Any], obj: object) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class BuiltinFunctionType: __self__: Union[object, ModuleType] __name__: str __qualname__: str def __call__(self, *args: Any, **kwargs: Any) -> Any: ... BuiltinMethodType = BuiltinFunctionType if sys.version_info >= (3, 7): class WrapperDescriptorType: __name__: str __qualname__: str __objclass__: type def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Any, type: type = ...) -> Any: ... class MethodWrapperType: __self__: object __name__: str __qualname__: str __objclass__: type def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... class MethodDescriptorType: __name__: str __qualname__: str __objclass__: type def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Any, type: type = ...) -> Any: ... class ClassMethodDescriptorType: __name__: str __qualname__: str __objclass__: type def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Any, type: type = ...) -> Any: ... class TracebackType: if sys.version_info >= (3, 7): def __init__(self, tb_next: Optional[TracebackType], tb_frame: FrameType, tb_lasti: int, tb_lineno: int) -> None: ... tb_next: Optional[TracebackType] else: @property def tb_next(self) -> Optional[TracebackType]: ... # the rest are read-only even in 3.7 @property def tb_frame(self) -> FrameType: ... @property def tb_lasti(self) -> int: ... @property def tb_lineno(self) -> int: ... class FrameType: f_back: FrameType f_builtins: Dict[str, Any] f_code: CodeType f_globals: Dict[str, Any] f_lasti: int f_lineno: int f_locals: Dict[str, Any] f_trace: Callable[[], None] if sys.version_info >= (3, 7): f_trace_lines: bool f_trace_opcodes: bool def clear(self) -> None: ... class GetSetDescriptorType: __name__: str __objclass__: type def __get__(self, obj: Any, type: type = ...) -> Any: ... def __set__(self, obj: Any) -> None: ... def __delete__(self, obj: Any) -> None: ... class MemberDescriptorType: __name__: str __objclass__: type def __get__(self, obj: Any, type: type = ...) -> Any: ... def __set__(self, obj: Any) -> None: ... def __delete__(self, obj: Any) -> None: ... if sys.version_info >= (3, 7): def new_class(name: str, bases: Iterable[object] = ..., kwds: Dict[str, Any] = ..., exec_body: Callable[[Dict[str, Any]], None] = ...) -> type: ... def resolve_bases(bases: Iterable[object]) -> Tuple[Any, ...]: ... else: def new_class(name: str, bases: Tuple[type, ...] = ..., kwds: Dict[str, Any] = ..., exec_body: Callable[[Dict[str, Any]], None] = ...) -> type: ... def prepare_class(name: str, bases: Tuple[type, ...] = ..., kwds: Dict[str, Any] = ...) -> Tuple[type, Dict[str, Any], Dict[str, Any]]: ... # Actually a different type, but `property` is special and we want that too. DynamicClassAttribute = property def coroutine(f: Callable[..., Any]) -> CoroutineType: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/platform.pyi0000664000175000017500000000346513577124116023476 0ustar davedave00000000000000# Stubs for platform (Python 3.5) from os import devnull as DEV_NULL from typing import Tuple, NamedTuple def libc_ver(executable: str = ..., lib: str = ..., version: str = ..., chunksize: int = ...) -> Tuple[str, str]: ... def linux_distribution(distname: str = ..., version: str = ..., id: str = ..., supported_dists: Tuple[str, ...] = ..., full_distribution_name: bool = ...) -> Tuple[str, str, str]: ... def dist(distname: str = ..., version: str = ..., id: str = ..., supported_dists: Tuple[str, ...] = ...) -> Tuple[str, str, str]: ... def win32_ver(release: str = ..., version: str = ..., csd: str = ..., ptype: str = ...) -> Tuple[str, str, str, str]: ... def mac_ver(release: str = ..., versioninfo: Tuple[str, str, str] = ..., machine: str = ...) -> Tuple[str, Tuple[str, str, str], str]: ... def java_ver(release: str = ..., vendor: str = ..., vminfo: Tuple[str, str, str] = ..., osinfo: Tuple[str, str, str] = ...) -> Tuple[str, str, Tuple[str, str, str], Tuple[str, str, str]]: ... def system_alias(system: str, release: str, version: str) -> Tuple[str, str, str]: ... def architecture(executable: str = ..., bits: str = ..., linkage: str = ...) -> Tuple[str, str]: ... class uname_result(NamedTuple): system: str node: str release: str version: str machine: str processor: str def uname() -> uname_result: ... def system() -> str: ... def node() -> str: ... def release() -> str: ... def version() -> str: ... def machine() -> str: ... def processor() -> str: ... def python_implementation() -> str: ... def python_version() -> str: ... def python_version_tuple() -> Tuple[str, str, str]: ... def python_branch() -> str: ... def python_revision() -> str: ... def python_build() -> Tuple[str, str]: ... def python_compiler() -> str: ... def platform(aliased: bool = ..., terse: bool = ...) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/_posixsubprocess.pyi0000664000175000017500000000113013577124116025247 0ustar davedave00000000000000# Stubs for _posixsubprocess # NOTE: These are incomplete! from typing import Tuple, Sequence, Callable def cloexec_pipe() -> Tuple[int, int]: ... def fork_exec(args: Sequence[str], executable_list: Sequence[bytes], close_fds: bool, fds_to_keep: Sequence[int], cwd: str, env_list: Sequence[bytes], p2cread: int, p2cwrite: int, c2pred: int, c2pwrite: int, errread: int, errwrite: int, errpipe_read: int, errpipe_write: int, restore_signals: int, start_new_session: int, preexec_fn: Callable[[], None]) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/stdlib/3/fcntl.pyi0000664000175000017500000000337413577124116022757 0ustar davedave00000000000000# Stubs for fcntl from io import IOBase from typing import Any, IO, Union FASYNC: int FD_CLOEXEC: int DN_ACCESS: int DN_ATTRIB: int DN_CREATE: int DN_DELETE: int DN_MODIFY: int DN_MULTISHOT: int DN_RENAME: int F_DUPFD: int F_DUPFD_CLOEXEC: int F_FULLFSYNC: int F_EXLCK: int F_GETFD: int F_GETFL: int F_GETLEASE: int F_GETLK: int F_GETLK64: int F_GETOWN: int F_NOCACHE: int F_GETSIG: int F_NOTIFY: int F_RDLCK: int F_SETFD: int F_SETFL: int F_SETLEASE: int F_SETLK: int F_SETLK64: int F_SETLKW: int F_SETLKW64: int F_SETOWN: int F_SETSIG: int F_SHLCK: int F_UNLCK: int F_WRLCK: int I_ATMARK: int I_CANPUT: int I_CKBAND: int I_FDINSERT: int I_FIND: int I_FLUSH: int I_FLUSHBAND: int I_GETBAND: int I_GETCLTIME: int I_GETSIG: int I_GRDOPT: int I_GWROPT: int I_LINK: int I_LIST: int I_LOOK: int I_NREAD: int I_PEEK: int I_PLINK: int I_POP: int I_PUNLINK: int I_PUSH: int I_RECVFD: int I_SENDFD: int I_SETCLTIME: int I_SETSIG: int I_SRDOPT: int I_STR: int I_SWROPT: int I_UNLINK: int LOCK_EX: int LOCK_MAND: int LOCK_NB: int LOCK_READ: int LOCK_RW: int LOCK_SH: int LOCK_UN: int LOCK_WRITE: int _AnyFile = Union[int, IO[Any], IOBase] # TODO All these return either int or bytes depending on the value of # cmd (not on the type of arg). def fcntl(fd: _AnyFile, cmd: int, arg: Union[int, bytes] = ...) -> Any: ... # TODO This function accepts any object supporting a buffer interface, # as arg, is there a better way to express this than bytes? def ioctl(fd: _AnyFile, request: int, arg: Union[int, bytes] = ..., mutate_flag: bool = ...) -> Any: ... def flock(fd: _AnyFile, operation: int) -> None: ... def lockf(fd: _AnyFile, cmd: int, len: int = ..., start: int = ..., whence: int = ...) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/LICENSE0000664000175000017500000003056213577124116020507 0ustar davedave00000000000000The "typeshed" project is licensed under the terms of the Apache license, as reproduced below. = = = = = Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. = = = = = Parts of typeshed are licensed under different licenses (like the MIT license), reproduced below. = = = = = The MIT License Copyright (c) 2015 Jukka Lehtosalo and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. = = = = = jedi-0.15.2/jedi/third_party/typeshed/third_party/0000775000175000017500000000000013577125145022030 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/0000775000175000017500000000000013577125145022737 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/0000775000175000017500000000000013577125145024217 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/__init__.pyi0000664000175000017500000000015513577124116026477 0ustar davedave00000000000000# Names in __all__ with no definition: # Cipher # Hash # Protocol # PublicKey # Signature # Util jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/0000775000175000017500000000000013577125145025431 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/__init__.pyi0000664000175000017500000000021613577124116027707 0ustar davedave00000000000000# Names in __all__ with no definition: # AES # ARC2 # ARC4 # Blowfish # CAST # DES # DES3 # PKCS1_OAEP # PKCS1_v1_5 # XOR jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/blockalgo.pyi0000664000175000017500000000064113577124116030107 0ustar davedave00000000000000from typing import Any, Union, Text MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int class BlockAlgo: mode: int block_size: int IV: Any def __init__(self, factory: Any, key: Union[bytes, Text], *args, **kwargs) -> None: ... def encrypt(self, plaintext: Union[bytes, Text]) -> bytes: ... def decrypt(self, ciphertext: bytes) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/PKCS1_OAEP.pyi0000664000175000017500000000077013577124116027602 0ustar davedave00000000000000from typing import Any, Optional, Union, Text from Crypto.PublicKey.RSA import _RSAobj class PKCS1OAEP_Cipher: def __init__(self, key: _RSAobj, hashAlgo: Any, mgfunc: Any, label: Any) -> None: ... def can_encrypt(self): ... def can_decrypt(self): ... def encrypt(self, message: Union[bytes, Text]) -> bytes: ... def decrypt(self, ct: bytes) -> bytes: ... def new(key: _RSAobj, hashAlgo: Optional[Any] = ..., mgfunc: Optional[Any] = ..., label: Any = ...) -> PKCS1OAEP_Cipher: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/XOR.pyi0000664000175000017500000000063413577124116026624 0ustar davedave00000000000000from typing import Any, Union, Text __revision__: str class XORCipher: block_size: int key_size: int def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def encrypt(self, plaintext: Union[bytes, Text]) -> bytes: ... def decrypt(self, ciphertext: bytes) -> bytes: ... def new(key: Union[bytes, Text], *args, **kwargs) -> XORCipher: ... block_size: int key_size: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/CAST.pyi0000664000175000017500000000062513577124116026706 0ustar davedave00000000000000from typing import Any, Union, Text from .blockalgo import BlockAlgo __revision__: str class CAST128Cipher(BlockAlgo): def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def new(key: Union[bytes, Text], *args, **kwargs) -> CAST128Cipher: ... MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int block_size: int key_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/ARC4.pyi0000664000175000017500000000056013577124116026643 0ustar davedave00000000000000from typing import Any, Union, Text __revision__: str class ARC4Cipher: block_size: int key_size: int def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def encrypt(self, plaintext): ... def decrypt(self, ciphertext): ... def new(key: Union[bytes, Text], *args, **kwargs) -> ARC4Cipher: ... block_size: int key_size: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/DES.pyi0000664000175000017500000000061513577124116026566 0ustar davedave00000000000000from typing import Any, Union, Text from .blockalgo import BlockAlgo __revision__: str class DESCipher(BlockAlgo): def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def new(key: Union[bytes, Text], *args, **kwargs) -> DESCipher: ... MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int block_size: int key_size: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/AES.pyi0000664000175000017500000000061513577124116026563 0ustar davedave00000000000000from typing import Any, Union, Text from .blockalgo import BlockAlgo __revision__: str class AESCipher(BlockAlgo): def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def new(key: Union[bytes, Text], *args, **kwargs) -> AESCipher: ... MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int block_size: int key_size: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/DES3.pyi0000664000175000017500000000062013577124116026645 0ustar davedave00000000000000from typing import Any, Union, Text from .blockalgo import BlockAlgo __revision__: str class DES3Cipher(BlockAlgo): def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def new(key: Union[bytes, Text], *args, **kwargs) -> DES3Cipher: ... MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int block_size: int key_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/ARC2.pyi0000664000175000017500000000061513577124116026642 0ustar davedave00000000000000from typing import Any, Union, Text from .blockalgo import BlockAlgo __revision__: str class RC2Cipher(BlockAlgo): def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def new(key: Union[bytes, Text], *args, **kwargs) -> RC2Cipher: ... MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int block_size: int key_size: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/Blowfish.pyi0000664000175000017500000000062713577124116027733 0ustar davedave00000000000000from typing import Any, Union, Text from .blockalgo import BlockAlgo __revision__: str class BlowfishCipher(BlockAlgo): def __init__(self, key: Union[bytes, Text], *args, **kwargs) -> None: ... def new(key: Union[bytes, Text], *args, **kwargs) -> BlowfishCipher: ... MODE_ECB: int MODE_CBC: int MODE_CFB: int MODE_PGP: int MODE_OFB: int MODE_CTR: int MODE_OPENPGP: int block_size: int key_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Cipher/PKCS1_v1_5.pyi0000664000175000017500000000063613577124116027631 0ustar davedave00000000000000from typing import Any, Union, Text from Crypto.PublicKey.RSA import _RSAobj class PKCS115_Cipher: def __init__(self, key: _RSAobj) -> None: ... def can_encrypt(self) -> bool: ... def can_decrypt(self) -> bool: ... rf: Any def encrypt(self, message: Union[bytes, Text]) -> bytes: ... def decrypt(self, ct: bytes, sentinel: Any) -> bytes: ... def new(key: _RSAobj) -> PKCS115_Cipher: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/pct_warnings.pyi0000664000175000017500000000063413577124116027440 0ustar davedave00000000000000class CryptoWarning(Warning): ... class CryptoDeprecationWarning(DeprecationWarning, CryptoWarning): ... class CryptoRuntimeWarning(RuntimeWarning, CryptoWarning): ... class RandomPool_DeprecationWarning(CryptoDeprecationWarning): ... class ClockRewindWarning(CryptoRuntimeWarning): ... class GetRandomNumber_DeprecationWarning(CryptoDeprecationWarning): ... class PowmInsecureWarning(CryptoRuntimeWarning): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/0000775000175000017500000000000013577125145026160 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/__init__.pyi0000664000175000017500000000010413577124116030432 0ustar davedave00000000000000# Names in __all__ with no definition: # PKCS1_PSS # PKCS1_v1_5 jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/PKCS1_PSS.pyi0000664000175000017500000000043613577124116030251 0ustar davedave00000000000000from typing import Any, Optional class PSS_SigScheme: def __init__(self, key, mgfunc, saltLen) -> None: ... def can_sign(self): ... def sign(self, mhash): ... def verify(self, mhash, S): ... def new(key, mgfunc: Optional[Any] = ..., saltLen: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Signature/PKCS1_v1_5.pyi0000664000175000017500000000026413577124116030355 0ustar davedave00000000000000class PKCS115_SigScheme: def __init__(self, key) -> None: ... def can_sign(self): ... def sign(self, mhash): ... def verify(self, mhash, S): ... def new(key): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/0000775000175000017500000000000013577125145026020 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/__init__.pyi0000664000175000017500000000011513577124116030274 0ustar davedave00000000000000# Names in __all__ with no definition: # AllOrNothing # Chaffing # KDF jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/AllOrNothing.pyi0000664000175000017500000000040613577124116031100 0ustar davedave00000000000000from typing import Any, Optional __revision__: str def isInt(x): ... class AllOrNothing: def __init__(self, ciphermodule, mode: Optional[Any] = ..., IV: Optional[Any] = ...) -> None: ... def digest(self, text): ... def undigest(self, blocks): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/KDF.pyi0000664000175000017500000000041713577124116027146 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash import SHA as SHA1 __revision__: str def PBKDF1(password, salt, dkLen, count: int = ..., hashAlgo: Optional[Any] = ...): ... def PBKDF2(password, salt, dkLen: int = ..., count: int = ..., prf: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Protocol/Chaffing.pyi0000664000175000017500000000022013577124116030237 0ustar davedave00000000000000__revision__: str class Chaff: def __init__(self, factor: float = ..., blocksper: int = ...) -> None: ... def chaff(self, blocks): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/0000775000175000017500000000000013577125145026106 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/__init__.pyi0000664000175000017500000000010313577124116030357 0ustar davedave00000000000000# Names in __all__ with no definition: # DSA # ElGamal # RSA jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/DSA.pyi0000664000175000017500000000134513577124116027240 0ustar davedave00000000000000from typing import Any, Optional from .pubkey import pubkey class _DSAobj(pubkey): keydata: Any implementation: Any key: Any def __init__(self, implementation, key) -> None: ... def __getattr__(self, attrname): ... def sign(self, M, K): ... def verify(self, M, signature): ... def has_private(self): ... def size(self): ... def can_blind(self): ... def can_encrypt(self): ... def can_sign(self): ... def publickey(self): ... class DSAImplementation: error: Any def __init__(self, **kwargs) -> None: ... def generate(self, bits, randfunc: Optional[Any] = ..., progress_func: Optional[Any] = ...): ... def construct(self, tup): ... generate: Any construct: Any error: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/RSA.pyi0000664000175000017500000000210413577124116027250 0ustar davedave00000000000000from typing import Any, Optional, Union, Text from .pubkey import pubkey class _RSAobj(pubkey): keydata: Any implementation: Any key: Any def __init__(self, implementation, key, randfunc: Optional[Any] = ...) -> None: ... def __getattr__(self, attrname): ... def encrypt(self, plaintext, K): ... def decrypt(self, ciphertext): ... def sign(self, M, K): ... def verify(self, M, signature): ... def has_private(self): ... def size(self): ... def can_blind(self): ... def can_encrypt(self): ... def can_sign(self): ... def publickey(self): ... def exportKey(self, format: str = ..., passphrase: Optional[Any] = ..., pkcs: int = ...): ... class RSAImplementation: error: Any def __init__(self, **kwargs) -> None: ... def generate(self, bits, randfunc: Optional[Any] = ..., progress_func: Optional[Any] = ..., e: int = ...): ... def construct(self, tup): ... def importKey(self, externKey: Any, passphrase: Union[None, bytes, Text] = ...) -> _RSAobj: ... generate: Any construct: Any importKey: Any error: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/ElGamal.pyi0000664000175000017500000000102313577124116030124 0ustar davedave00000000000000from typing import Any, Optional from Crypto.PublicKey.pubkey import pubkey from Crypto.PublicKey.pubkey import * # noqa: F403 class error(Exception): ... def generate(bits, randfunc, progress_func: Optional[Any] = ...): ... def construct(tup): ... class ElGamalobj(pubkey): keydata: Any def encrypt(self, plaintext, K): ... def decrypt(self, ciphertext): ... def sign(self, M, K): ... def verify(self, M, signature): ... def size(self): ... def has_private(self): ... def publickey(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/pubkey.pyi0000664000175000017500000000114313577124116030124 0ustar davedave00000000000000from Crypto.Util.number import * # noqa: F403 __revision__: str class pubkey: def __init__(self) -> None: ... def encrypt(self, plaintext, K): ... def decrypt(self, ciphertext): ... def sign(self, M, K): ... def verify(self, M, signature): ... def validate(self, M, signature): ... def blind(self, M, B): ... def unblind(self, M, B): ... def can_sign(self): ... def can_encrypt(self): ... def can_blind(self): ... def size(self): ... def has_private(self): ... def publickey(self): ... def __eq__(self, other): ... def __ne__(self, other): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/0000775000175000017500000000000013577125145025134 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/__init__.pyi0000664000175000017500000000013713577124116027414 0ustar davedave00000000000000# Names in __all__ with no definition: # RFC1751 # asn1 # number # randpool # strxor jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/asn1.pyi0000664000175000017500000000260413577124116026520 0ustar davedave00000000000000from typing import Any, Optional class DerObject: typeTags: Any typeTag: Any payload: Any def __init__(self, ASN1Type: Optional[Any] = ..., payload: Any = ...) -> None: ... def isType(self, ASN1Type): ... def encode(self): ... def decode(self, derEle, noLeftOvers: int = ...): ... class DerInteger(DerObject): value: Any def __init__(self, value: int = ...) -> None: ... payload: Any def encode(self): ... def decode(self, derEle, noLeftOvers: int = ...): ... class DerSequence(DerObject): def __init__(self, startSeq: Optional[Any] = ...) -> None: ... def __delitem__(self, n): ... def __getitem__(self, n): ... def __setitem__(self, key, value): ... def __setslice__(self, i, j, sequence): ... def __delslice__(self, i, j): ... def __getslice__(self, i, j): ... def __len__(self): ... def append(self, item): ... def hasInts(self): ... def hasOnlyInts(self): ... payload: Any def encode(self): ... def decode(self, derEle, noLeftOvers: int = ...): ... class DerOctetString(DerObject): payload: Any def __init__(self, value: Any = ...) -> None: ... def decode(self, derEle, noLeftOvers: int = ...): ... class DerNull(DerObject): def __init__(self) -> None: ... class DerObjectId(DerObject): def __init__(self) -> None: ... def decode(self, derEle, noLeftOvers: int = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/Counter.pyi0000664000175000017500000000033013577124116027267 0ustar davedave00000000000000from typing import Any def new(nbits, prefix: Any = ..., suffix: Any = ..., initial_value: int = ..., overflow: int = ..., little_endian: bool = ..., allow_wraparound: bool = ..., disable_shortcut: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/strxor.pyi0000664000175000017500000000010413577124116027210 0ustar davedave00000000000000def strxor(*args, **kwargs): ... def strxor_c(*args, **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/RFC1751.pyi0000664000175000017500000000017613577124116026610 0ustar davedave00000000000000from typing import Any __revision__: str binary: Any def key_to_english(key): ... def english_to_key(s): ... wordlist: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/number.pyi0000664000175000017500000000144113577124116027144 0ustar davedave00000000000000from typing import Any, Optional from warnings import warn as _warn __revision__: str bignum: Any def size(N): ... def getRandomNumber(N, randfunc: Optional[Any] = ...): ... def getRandomInteger(N, randfunc: Optional[Any] = ...): ... def getRandomRange(a, b, randfunc: Optional[Any] = ...): ... def getRandomNBitInteger(N, randfunc: Optional[Any] = ...): ... def GCD(x, y): ... def inverse(u, v): ... def getPrime(N, randfunc: Optional[Any] = ...): ... def getStrongPrime(N, e: int = ..., false_positive_prob: float = ..., randfunc: Optional[Any] = ...): ... def isPrime(N, false_positive_prob: float = ..., randfunc: Optional[Any] = ...): ... def long_to_bytes(n, blocksize: int = ...): ... def bytes_to_long(s): ... def long2str(n, blocksize: int = ...): ... def str2long(s): ... sieve_base: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Util/randpool.pyi0000664000175000017500000000102513577124116027470 0ustar davedave00000000000000from typing import Any, Optional __revision__: str class RandomPool: bytes: Any bits: Any entropy: Any def __init__(self, numbytes: int = ..., cipher: Optional[Any] = ..., hash: Optional[Any] = ..., file: Optional[Any] = ...) -> None: ... def get_bytes(self, N): ... def randomize(self, N: int = ...): ... def stir(self, s: str = ...): ... def stir_n(self, N: int = ...): ... def add_event(self, s: str = ...): ... def getBytes(self, N): ... def addEvent(self, event, s: str = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/0000775000175000017500000000000013577125145025102 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/HMAC.pyi0000664000175000017500000000064413577124116026336 0ustar davedave00000000000000from typing import Any, Optional digest_size: Any class HMAC: digest_size: Any digestmod: Any outer: Any inner: Any def __init__(self, key, msg: Optional[Any] = ..., digestmod: Optional[Any] = ...) -> None: ... def update(self, msg): ... def copy(self): ... def digest(self): ... def hexdigest(self): ... def new(key, msg: Optional[Any] = ..., digestmod: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/__init__.pyi0000664000175000017500000000020713577124116027360 0ustar davedave00000000000000# Names in __all__ with no definition: # HMAC # MD2 # MD4 # MD5 # RIPEMD # SHA # SHA224 # SHA256 # SHA384 # SHA512 jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/MD2.pyi0000664000175000017500000000050713577124116026206 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class MD2Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/hashalgo.pyi0000664000175000017500000000051013577124116027404 0ustar davedave00000000000000from typing import Any, Optional class HashAlgo: digest_size: Any block_size: Any def __init__(self, hashFactory, data: Optional[Any] = ...) -> None: ... def update(self, data): ... def digest(self): ... def hexdigest(self): ... def copy(self): ... def new(self, data: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA.pyi0000664000175000017500000000051013577124116026231 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class SHA1Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA256.pyi0000664000175000017500000000051213577124116026470 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class SHA256Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/MD4.pyi0000664000175000017500000000050713577124116026210 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class MD4Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA224.pyi0000664000175000017500000000051213577124116026463 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class SHA224Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA512.pyi0000664000175000017500000000051213577124116026463 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class SHA512Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/MD5.pyi0000664000175000017500000000050713577124116026211 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class MD5Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/SHA384.pyi0000664000175000017500000000051213577124116026472 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class SHA384Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Hash/RIPEMD.pyi0000664000175000017500000000051513577124116026603 0ustar davedave00000000000000from typing import Any, Optional from Crypto.Hash.hashalgo import HashAlgo class RIPEMD160Hash(HashAlgo): oid: Any digest_size: int block_size: int def __init__(self, data: Optional[Any] = ...) -> None: ... def new(self, data: Optional[Any] = ...): ... def new(data: Optional[Any] = ...): ... digest_size: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/0000775000175000017500000000000013577125145025437 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/__init__.pyi0000664000175000017500000000003613577124116027715 0ustar davedave00000000000000def new(*args, **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/0000775000175000017500000000000013577125145026327 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/__init__.pyi0000664000175000017500000000002213577124116030600 0ustar davedave00000000000000__revision__: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/fallback.pyi0000664000175000017500000000016413577124116030607 0ustar davedave00000000000000from .rng_base import BaseRNG class PythonOSURandomRNG(BaseRNG): name: str def __init__(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/rng_base.pyi0000664000175000017500000000040313577124116030624 0ustar davedave00000000000000__revision__: str class BaseRNG: closed: bool def __init__(self) -> None: ... def __del__(self): ... def __enter__(self): ... def __exit__(self): ... def close(self): ... def flush(self): ... def read(self, N: int = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/OSRNG/posix.pyi0000664000175000017500000000025613577124116030214 0ustar davedave00000000000000from typing import Any, Optional from .rng_base import BaseRNG class DevURandomRNG(BaseRNG): name: str def __init__(self, devname: Optional[Any] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/random.pyi0000664000175000017500000000066313577124116027444 0ustar davedave00000000000000from typing import Any, Optional class StrongRandom: def __init__(self, rng: Optional[Any] = ..., randfunc: Optional[Any] = ...) -> None: ... def getrandbits(self, k): ... def randrange(self, *args): ... def randint(self, a, b): ... def choice(self, seq): ... def shuffle(self, x): ... def sample(self, population, k): ... getrandbits: Any randrange: Any randint: Any choice: Any shuffle: Any sample: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/0000775000175000017500000000000013577125145027055 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/__init__.pyi0000664000175000017500000000000013577124116031322 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/SHAd256.pyi0000664000175000017500000000047213577124116030614 0ustar davedave00000000000000from typing import Any, Optional class _SHAd256: digest_size: Any def __init__(self, internal_api_check, sha256_hash_obj) -> None: ... def copy(self): ... def digest(self): ... def hexdigest(self): ... def update(self, data): ... digest_size: Any def new(data: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/FortunaGenerator.pyi0000664000175000017500000000054513577124116033066 0ustar davedave00000000000000from typing import Any __revision__: str class AESGenerator: block_size: Any key_size: int max_blocks_per_request: Any counter: Any key: Any block_size_shift: Any blocks_per_key: Any max_bytes_per_request: Any def __init__(self) -> None: ... def reseed(self, seed): ... def pseudo_random_data(self, bytes): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/Crypto/Random/Fortuna/FortunaAccumulator.pyi0000664000175000017500000000107213577124116033413 0ustar davedave00000000000000from typing import Any __revision__: str class FortunaPool: digest_size: Any def __init__(self) -> None: ... def append(self, data): ... def digest(self): ... def hexdigest(self): ... length: int def reset(self): ... def which_pools(r): ... class FortunaAccumulator: min_pool_size: int reseed_interval: float reseed_count: int generator: Any last_reseed: Any pools: Any def __init__(self) -> None: ... def random_data(self, bytes): ... def add_random_event(self, source_number, pool_number, data): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pyre_extensions.pyi0000664000175000017500000000041313577124116026713 0ustar davedave00000000000000from typing import Any, List, Optional, Type, TypeVar _T = TypeVar("_T") def none_throws(optional: Optional[_T], message: str = ...) -> _T: ... def safe_cast(new_type: Type[_T], value: Any) -> _T: ... def ParameterSpecification(__name: str) -> List[Type[Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/bleach/0000775000175000017500000000000013577125145024155 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/bleach/__init__.pyi0000664000175000017500000000155513577124116026442 0ustar davedave00000000000000from typing import Any, Container, Iterable, Optional, Text from bleach.linkifier import DEFAULT_CALLBACKS as DEFAULT_CALLBACKS, Linker as Linker from bleach.sanitizer import ( ALLOWED_ATTRIBUTES as ALLOWED_ATTRIBUTES, ALLOWED_PROTOCOLS as ALLOWED_PROTOCOLS, ALLOWED_STYLES as ALLOWED_STYLES, ALLOWED_TAGS as ALLOWED_TAGS, Cleaner as Cleaner, ) from .linkifier import _Callback __releasedate__: Text __version__: Text VERSION: Any # packaging.version.Version def clean( text: Text, tags: Container[Text] = ..., attributes: Any = ..., styles: Container[Text] = ..., protocols: Container[Text] = ..., strip: bool = ..., strip_comments: bool = ..., ) -> Text: ... def linkify( text: Text, callbacks: Iterable[_Callback] = ..., skip_tags: Optional[Container[Text]] = ..., parse_email: bool = ..., ) -> Text: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/bleach/callbacks.pyi0000664000175000017500000000031613577124116026614 0ustar davedave00000000000000from typing import MutableMapping, Any, Text _Attrs = MutableMapping[Any, Text] def nofollow(attrs: _Attrs, new: bool = ...) -> _Attrs: ... def target_blank(attrs: _Attrs, new: bool = ...) -> _Attrs: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/bleach/utils.pyi0000664000175000017500000000043613577124116026040 0ustar davedave00000000000000from collections import OrderedDict from typing import overload, Mapping, Any, Text @overload def alphabetize_attributes(attrs: None) -> None: ... @overload def alphabetize_attributes(attrs: Mapping[Any, Text]) -> OrderedDict[Any, Text]: ... def force_unicode(text: Text) -> Text: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/bleach/sanitizer.pyi0000664000175000017500000000220213577124116026701 0ustar davedave00000000000000from typing import Any, Callable, Container, Dict, Iterable, List, Optional, Pattern, Text, Type, Union ALLOWED_TAGS: List[Text] ALLOWED_ATTRIBUTES: Dict[Text, List[Text]] ALLOWED_STYLES: List[Text] ALLOWED_PROTOCOLS: List[Text] INVISIBLE_CHARACTERS: Text INVISIBLE_CHARACTERS_RE: Pattern[Text] INVISIBLE_REPLACEMENT_CHAR: Text # A html5lib Filter class _Filter = Any class Cleaner(object): def __init__( self, tags: Container[Text] = ..., attributes: Any = ..., styles: Container[Text] = ..., protocols: Container[Text] = ..., strip: bool = ..., strip_comments: bool = ..., filters: Optional[Iterable[_Filter]] = ..., ) -> None: ... def clean(self, text: Text) -> Text: ... _AttributeFilter = Callable[[Text, Text, Text], bool] _AttributeDict = Dict[Text, Union[Container[Text], _AttributeFilter]] def attribute_filter_factory(attributes: Union[_AttributeFilter, _AttributeDict, Container[Text]]) -> _AttributeFilter: ... class BleachSanitizerFilter(object): # TODO: derives from html5lib.sanitizer.Filter def __getattr__(self, item: str) -> Any: ... # incomplete jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/bleach/linkifier.pyi0000664000175000017500000000172213577124116026653 0ustar davedave00000000000000from typing import Any, Container, Iterable, List, MutableMapping, Optional, Pattern, Protocol, Text _Attrs = MutableMapping[Any, Text] class _Callback(Protocol): def __call__(self, attrs: _Attrs, new: bool = ...) -> _Attrs: ... DEFAULT_CALLBACKS: List[_Callback] TLDS: List[Text] def build_url_re(tlds: Iterable[Text] = ..., protocols: Iterable[Text] = ...) -> Pattern[Text]: ... URL_RE: Pattern[Text] PROTO_RE: Pattern[Text] EMAIL_RE: Pattern[Text] class Linker(object): def __init__( self, callbacks: Iterable[_Callback] = ..., skip_tags: Optional[Container[Text]] = ..., parse_email: bool = ..., url_re: Pattern[Text] = ..., email_re: Pattern[Text] = ..., recognized_tags: Optional[Container[Text]] = ..., ) -> None: ... def linkify(self, text: Text) -> Text: ... class LinkifyFilter(object): # TODO: derives from html5lib.Filter def __getattr__(self, item: str) -> Any: ... # incomplete jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/0000775000175000017500000000000013577125145024213 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/__init__.pyi0000664000175000017500000000000013577124116026460 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/0000775000175000017500000000000013577125145026053 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/__init__.pyi0000664000175000017500000000002313577124116030325 0ustar davedave00000000000000__version__: bytes jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/message.pyi0000664000175000017500000000404613577124116030223 0ustar davedave00000000000000import sys from typing import Any, Sequence, Optional, Tuple, Type, TypeVar, Union from .descriptor import DescriptorBase, FieldDescriptor class Error(Exception): ... class DecodeError(Error): ... class EncodeError(Error): ... class _ExtensionDict: def __getitem__(self, extension_handle: DescriptorBase) -> Any: ... def __setitem__(self, extension_handle: DescriptorBase, value: Any) -> None: ... _T = TypeVar("_T") if sys.version_info < (3,): _Serialized = Union[bytes, buffer, unicode] else: _Serialized = bytes class Message: DESCRIPTOR: Any def __deepcopy__(self, memo=...): ... def __eq__(self, other_msg): ... def __ne__(self, other_msg): ... def MergeFrom(self, other_msg: Message) -> None: ... def CopyFrom(self, other_msg: Message) -> None: ... def Clear(self) -> None: ... def SetInParent(self) -> None: ... def IsInitialized(self) -> bool: ... def MergeFromString(self, serialized: _Serialized) -> int: ... def ParseFromString(self, serialized: _Serialized) -> None: ... def SerializeToString(self, deterministic: bool = ...) -> bytes: ... def SerializePartialToString(self, deterministic: bool = ...) -> bytes: ... def ListFields(self) -> Sequence[Tuple[FieldDescriptor, Any]]: ... def HasExtension(self, extension_handle): ... def ClearExtension(self, extension_handle): ... def ByteSize(self) -> int: ... @classmethod def FromString(cls: Type[_T], s: _Serialized) -> _T: ... @property def Extensions(self) -> _ExtensionDict: ... # Intentionally left out typing on these three methods, because they are # stringly typed and it is not useful to call them on a Message directly. # We prefer more specific typing on individual subclasses of Message # See https://github.com/dropbox/mypy-protobuf/issues/62 for details def HasField(self, field_name: Any) -> bool: ... def ClearField(self, field_name: Any) -> None: ... def WhichOneof(self, oneof_group: Any) -> Any: ... # TODO: check kwargs def __init__(self, **kwargs) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/reflection.pyi0000664000175000017500000000034613577124116030730 0ustar davedave00000000000000class GeneratedProtocolMessageType(type): def __new__(cls, name, bases, dictionary): ... def __init__(self, name, bases, dictionary) -> None: ... def ParseMessage(descriptor, byte_str): ... def MakeClass(descriptor): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/util/0000775000175000017500000000000013577125145027030 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/util/__init__.pyi0000664000175000017500000000000013577124116031275 0ustar davedave00000000000000././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.0000664000175000017500000003225713577124116033431 0ustar davedave00000000000000from google.protobuf.any_pb2 import Any from google.protobuf.duration_pb2 import Duration from google.protobuf.field_mask_pb2 import FieldMask from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from google.protobuf.struct_pb2 import ListValue, Struct, Value from google.protobuf.timestamp_pb2 import Timestamp from google.protobuf.unittest_pb2 import TestAllExtensions from google.protobuf.wrappers_pb2 import ( BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, StringValue, UInt32Value, UInt64Value, ) from typing import Iterable, List, Mapping, MutableMapping, Optional, Text, Tuple, cast class EnumType(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> EnumType: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[EnumType]: ... @classmethod def items(cls) -> List[Tuple[bytes, EnumType]]: ... FOO: EnumType BAR: EnumType class MessageType(Message): value: int def __init__(self, value: Optional[int] = ...) -> None: ... class TestMessage(Message): bool_value: bool int32_value: int int64_value: int uint32_value: int uint64_value: int float_value: float double_value: float string_value: Text bytes_value: bytes enum_value: EnumType repeated_bool_value: RepeatedScalarFieldContainer[bool] repeated_int32_value: RepeatedScalarFieldContainer[int] repeated_int64_value: RepeatedScalarFieldContainer[int] repeated_uint32_value: RepeatedScalarFieldContainer[int] repeated_uint64_value: RepeatedScalarFieldContainer[int] repeated_float_value: RepeatedScalarFieldContainer[float] repeated_double_value: RepeatedScalarFieldContainer[float] repeated_string_value: RepeatedScalarFieldContainer[Text] repeated_bytes_value: RepeatedScalarFieldContainer[bytes] repeated_enum_value: RepeatedScalarFieldContainer[EnumType] @property def message_value(self) -> MessageType: ... @property def repeated_message_value(self) -> RepeatedCompositeFieldContainer[MessageType]: ... def __init__( self, bool_value: Optional[bool] = ..., int32_value: Optional[int] = ..., int64_value: Optional[int] = ..., uint32_value: Optional[int] = ..., uint64_value: Optional[int] = ..., float_value: Optional[float] = ..., double_value: Optional[float] = ..., string_value: Optional[Text] = ..., bytes_value: Optional[bytes] = ..., enum_value: Optional[EnumType] = ..., message_value: Optional[MessageType] = ..., repeated_bool_value: Optional[Iterable[bool]] = ..., repeated_int32_value: Optional[Iterable[int]] = ..., repeated_int64_value: Optional[Iterable[int]] = ..., repeated_uint32_value: Optional[Iterable[int]] = ..., repeated_uint64_value: Optional[Iterable[int]] = ..., repeated_float_value: Optional[Iterable[float]] = ..., repeated_double_value: Optional[Iterable[float]] = ..., repeated_string_value: Optional[Iterable[Text]] = ..., repeated_bytes_value: Optional[Iterable[bytes]] = ..., repeated_enum_value: Optional[Iterable[EnumType]] = ..., repeated_message_value: Optional[Iterable[MessageType]] = ..., ) -> None: ... class TestOneof(Message): oneof_int32_value: int oneof_string_value: Text oneof_bytes_value: bytes oneof_enum_value: EnumType @property def oneof_message_value(self) -> MessageType: ... def __init__( self, oneof_int32_value: Optional[int] = ..., oneof_string_value: Optional[Text] = ..., oneof_bytes_value: Optional[bytes] = ..., oneof_enum_value: Optional[EnumType] = ..., oneof_message_value: Optional[MessageType] = ..., ) -> None: ... class TestMap(Message): class BoolMapEntry(Message): key: bool value: int def __init__(self, key: Optional[bool] = ..., value: Optional[int] = ...) -> None: ... class Int32MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Int64MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Uint32MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Uint64MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class StringMapEntry(Message): key: Text value: int def __init__(self, key: Optional[Text] = ..., value: Optional[int] = ...) -> None: ... @property def bool_map(self) -> MutableMapping[bool, int]: ... @property def int32_map(self) -> MutableMapping[int, int]: ... @property def int64_map(self) -> MutableMapping[int, int]: ... @property def uint32_map(self) -> MutableMapping[int, int]: ... @property def uint64_map(self) -> MutableMapping[int, int]: ... @property def string_map(self) -> MutableMapping[Text, int]: ... def __init__( self, bool_map: Optional[Mapping[bool, int]] = ..., int32_map: Optional[Mapping[int, int]] = ..., int64_map: Optional[Mapping[int, int]] = ..., uint32_map: Optional[Mapping[int, int]] = ..., uint64_map: Optional[Mapping[int, int]] = ..., string_map: Optional[Mapping[Text, int]] = ..., ) -> None: ... class TestNestedMap(Message): class BoolMapEntry(Message): key: bool value: int def __init__(self, key: Optional[bool] = ..., value: Optional[int] = ...) -> None: ... class Int32MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Int64MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Uint32MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Uint64MapEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class StringMapEntry(Message): key: Text value: int def __init__(self, key: Optional[Text] = ..., value: Optional[int] = ...) -> None: ... class MapMapEntry(Message): key: Text @property def value(self) -> TestNestedMap: ... def __init__(self, key: Optional[Text] = ..., value: Optional[TestNestedMap] = ...) -> None: ... @property def bool_map(self) -> MutableMapping[bool, int]: ... @property def int32_map(self) -> MutableMapping[int, int]: ... @property def int64_map(self) -> MutableMapping[int, int]: ... @property def uint32_map(self) -> MutableMapping[int, int]: ... @property def uint64_map(self) -> MutableMapping[int, int]: ... @property def string_map(self) -> MutableMapping[Text, int]: ... @property def map_map(self) -> MutableMapping[Text, TestNestedMap]: ... def __init__( self, bool_map: Optional[Mapping[bool, int]] = ..., int32_map: Optional[Mapping[int, int]] = ..., int64_map: Optional[Mapping[int, int]] = ..., uint32_map: Optional[Mapping[int, int]] = ..., uint64_map: Optional[Mapping[int, int]] = ..., string_map: Optional[Mapping[Text, int]] = ..., map_map: Optional[Mapping[Text, TestNestedMap]] = ..., ) -> None: ... class TestWrapper(Message): @property def bool_value(self) -> BoolValue: ... @property def int32_value(self) -> Int32Value: ... @property def int64_value(self) -> Int64Value: ... @property def uint32_value(self) -> UInt32Value: ... @property def uint64_value(self) -> UInt64Value: ... @property def float_value(self) -> FloatValue: ... @property def double_value(self) -> DoubleValue: ... @property def string_value(self) -> StringValue: ... @property def bytes_value(self) -> BytesValue: ... @property def repeated_bool_value(self) -> RepeatedCompositeFieldContainer[BoolValue]: ... @property def repeated_int32_value(self) -> RepeatedCompositeFieldContainer[Int32Value]: ... @property def repeated_int64_value(self) -> RepeatedCompositeFieldContainer[Int64Value]: ... @property def repeated_uint32_value(self) -> RepeatedCompositeFieldContainer[UInt32Value]: ... @property def repeated_uint64_value(self) -> RepeatedCompositeFieldContainer[UInt64Value]: ... @property def repeated_float_value(self) -> RepeatedCompositeFieldContainer[FloatValue]: ... @property def repeated_double_value(self) -> RepeatedCompositeFieldContainer[DoubleValue]: ... @property def repeated_string_value(self) -> RepeatedCompositeFieldContainer[StringValue]: ... @property def repeated_bytes_value(self) -> RepeatedCompositeFieldContainer[BytesValue]: ... def __init__( self, bool_value: Optional[BoolValue] = ..., int32_value: Optional[Int32Value] = ..., int64_value: Optional[Int64Value] = ..., uint32_value: Optional[UInt32Value] = ..., uint64_value: Optional[UInt64Value] = ..., float_value: Optional[FloatValue] = ..., double_value: Optional[DoubleValue] = ..., string_value: Optional[StringValue] = ..., bytes_value: Optional[BytesValue] = ..., repeated_bool_value: Optional[Iterable[BoolValue]] = ..., repeated_int32_value: Optional[Iterable[Int32Value]] = ..., repeated_int64_value: Optional[Iterable[Int64Value]] = ..., repeated_uint32_value: Optional[Iterable[UInt32Value]] = ..., repeated_uint64_value: Optional[Iterable[UInt64Value]] = ..., repeated_float_value: Optional[Iterable[FloatValue]] = ..., repeated_double_value: Optional[Iterable[DoubleValue]] = ..., repeated_string_value: Optional[Iterable[StringValue]] = ..., repeated_bytes_value: Optional[Iterable[BytesValue]] = ..., ) -> None: ... class TestTimestamp(Message): @property def value(self) -> Timestamp: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[Timestamp]: ... def __init__(self, value: Optional[Timestamp] = ..., repeated_value: Optional[Iterable[Timestamp]] = ...) -> None: ... class TestDuration(Message): @property def value(self) -> Duration: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[Duration]: ... def __init__(self, value: Optional[Duration] = ..., repeated_value: Optional[Iterable[Duration]] = ...) -> None: ... class TestFieldMask(Message): @property def value(self) -> FieldMask: ... def __init__(self, value: Optional[FieldMask] = ...) -> None: ... class TestStruct(Message): @property def value(self) -> Struct: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[Struct]: ... def __init__(self, value: Optional[Struct] = ..., repeated_value: Optional[Iterable[Struct]] = ...) -> None: ... class TestAny(Message): @property def value(self) -> Any: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[Any]: ... def __init__(self, value: Optional[Any] = ..., repeated_value: Optional[Iterable[Any]] = ...) -> None: ... class TestValue(Message): @property def value(self) -> Value: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[Value]: ... def __init__(self, value: Optional[Value] = ..., repeated_value: Optional[Iterable[Value]] = ...) -> None: ... class TestListValue(Message): @property def value(self) -> ListValue: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[ListValue]: ... def __init__(self, value: Optional[ListValue] = ..., repeated_value: Optional[Iterable[ListValue]] = ...) -> None: ... class TestBoolValue(Message): class BoolMapEntry(Message): key: bool value: int def __init__(self, key: Optional[bool] = ..., value: Optional[int] = ...) -> None: ... bool_value: bool @property def bool_map(self) -> MutableMapping[bool, int]: ... def __init__(self, bool_value: Optional[bool] = ..., bool_map: Optional[Mapping[bool, int]] = ...) -> None: ... class TestCustomJsonName(Message): value: int def __init__(self, value: Optional[int] = ...) -> None: ... class TestExtensions(Message): @property def extensions(self) -> TestAllExtensions: ... def __init__(self, extensions: Optional[TestAllExtensions] = ...) -> None: ... class TestEnumValue(Message): enum_value1: EnumType enum_value2: EnumType enum_value3: EnumType def __init__( self, enum_value1: Optional[EnumType] = ..., enum_value2: Optional[EnumType] = ..., enum_value3: Optional[EnumType] = ... ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/type_pb2.pyi0000664000175000017500000001111313577124116030314 0ustar davedave00000000000000from google.protobuf.any_pb2 import Any from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from google.protobuf.source_context_pb2 import SourceContext from typing import Iterable, List, Optional, Text, Tuple, cast class Syntax(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> Syntax: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[Syntax]: ... @classmethod def items(cls) -> List[Tuple[bytes, Syntax]]: ... SYNTAX_PROTO2: Syntax SYNTAX_PROTO3: Syntax class Type(Message): name: Text oneofs: RepeatedScalarFieldContainer[Text] syntax: Syntax @property def fields(self) -> RepeatedCompositeFieldContainer[Field]: ... @property def options(self) -> RepeatedCompositeFieldContainer[Option]: ... @property def source_context(self) -> SourceContext: ... def __init__( self, name: Optional[Text] = ..., fields: Optional[Iterable[Field]] = ..., oneofs: Optional[Iterable[Text]] = ..., options: Optional[Iterable[Option]] = ..., source_context: Optional[SourceContext] = ..., syntax: Optional[Syntax] = ..., ) -> None: ... class Field(Message): class Kind(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> Field.Kind: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[Field.Kind]: ... @classmethod def items(cls) -> List[Tuple[bytes, Field.Kind]]: ... TYPE_UNKNOWN: Field.Kind TYPE_DOUBLE: Field.Kind TYPE_FLOAT: Field.Kind TYPE_INT64: Field.Kind TYPE_UINT64: Field.Kind TYPE_INT32: Field.Kind TYPE_FIXED64: Field.Kind TYPE_FIXED32: Field.Kind TYPE_BOOL: Field.Kind TYPE_STRING: Field.Kind TYPE_GROUP: Field.Kind TYPE_MESSAGE: Field.Kind TYPE_BYTES: Field.Kind TYPE_UINT32: Field.Kind TYPE_ENUM: Field.Kind TYPE_SFIXED32: Field.Kind TYPE_SFIXED64: Field.Kind TYPE_SINT32: Field.Kind TYPE_SINT64: Field.Kind class Cardinality(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> Field.Cardinality: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[Field.Cardinality]: ... @classmethod def items(cls) -> List[Tuple[bytes, Field.Cardinality]]: ... CARDINALITY_UNKNOWN: Field.Cardinality CARDINALITY_OPTIONAL: Field.Cardinality CARDINALITY_REQUIRED: Field.Cardinality CARDINALITY_REPEATED: Field.Cardinality kind: Field.Kind cardinality: Field.Cardinality number: int name: Text type_url: Text oneof_index: int packed: bool json_name: Text default_value: Text @property def options(self) -> RepeatedCompositeFieldContainer[Option]: ... def __init__( self, kind: Optional[Field.Kind] = ..., cardinality: Optional[Field.Cardinality] = ..., number: Optional[int] = ..., name: Optional[Text] = ..., type_url: Optional[Text] = ..., oneof_index: Optional[int] = ..., packed: Optional[bool] = ..., options: Optional[Iterable[Option]] = ..., json_name: Optional[Text] = ..., default_value: Optional[Text] = ..., ) -> None: ... class Enum(Message): name: Text syntax: Syntax @property def enumvalue(self) -> RepeatedCompositeFieldContainer[EnumValue]: ... @property def options(self) -> RepeatedCompositeFieldContainer[Option]: ... @property def source_context(self) -> SourceContext: ... def __init__( self, name: Optional[Text] = ..., enumvalue: Optional[Iterable[EnumValue]] = ..., options: Optional[Iterable[Option]] = ..., source_context: Optional[SourceContext] = ..., syntax: Optional[Syntax] = ..., ) -> None: ... class EnumValue(Message): name: Text number: int @property def options(self) -> RepeatedCompositeFieldContainer[Option]: ... def __init__( self, name: Optional[Text] = ..., number: Optional[int] = ..., options: Optional[Iterable[Option]] = ... ) -> None: ... class Option(Message): name: Text @property def value(self) -> Any: ... def __init__(self, name: Optional[Text] = ..., value: Optional[Any] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/symbol_database.pyi0000664000175000017500000000121013577124116031716 0ustar davedave00000000000000from typing import Dict, Iterable, Type from .descriptor import EnumDescriptor, FileDescriptor from .message import Message from .message_factory import MessageFactory class SymbolDatabase(MessageFactory): def RegisterMessage(self, message: Type[Message]) -> Type[Message]: ... def RegisterEnumDescriptor(self, enum_descriptor: Type[EnumDescriptor]) -> EnumDescriptor: ... def RegisterFileDescriptor(self, file_descriptor: Type[FileDescriptor]) -> FileDescriptor: ... def GetSymbol(self, symbol: bytes) -> Type[Message]: ... def GetMessages(self, files: Iterable[bytes]) -> Dict[bytes, Type[Message]]: ... def Default(): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/0000775000175000017500000000000013577125145027667 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/__init__.pyi0000664000175000017500000000000013577124116032134 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/decoder.pyi0000664000175000017500000000153413577124116032017 0ustar davedave00000000000000from typing import Any def ReadTag(buffer, pos): ... def EnumDecoder(field_number, is_repeated, is_packed, key, new_default): ... Int32Decoder: Any Int64Decoder: Any UInt32Decoder: Any UInt64Decoder: Any SInt32Decoder: Any SInt64Decoder: Any Fixed32Decoder: Any Fixed64Decoder: Any SFixed32Decoder: Any SFixed64Decoder: Any FloatDecoder: Any DoubleDecoder: Any BoolDecoder: Any def StringDecoder(field_number, is_repeated, is_packed, key, new_default): ... def BytesDecoder(field_number, is_repeated, is_packed, key, new_default): ... def GroupDecoder(field_number, is_repeated, is_packed, key, new_default): ... def MessageDecoder(field_number, is_repeated, is_packed, key, new_default): ... MESSAGE_SET_ITEM_TAG: Any def MessageSetItemDecoder(extensions_by_number): ... def MapDecoder(field_descriptor, new_default, is_message_map): ... SkipField: Any ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/message_listener.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/message_listener.py0000664000175000017500000000022413577124116033565 0ustar davedave00000000000000class MessageListener(object): def Modified(self) -> None: ... class NullMessageListener(MessageListener): def Modified(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/encoder.pyi0000664000175000017500000000202513577124116032025 0ustar davedave00000000000000from typing import Any Int32Sizer: Any UInt32Sizer: Any SInt32Sizer: Any Fixed32Sizer: Any Fixed64Sizer: Any BoolSizer: Any def StringSizer(field_number, is_repeated, is_packed): ... def BytesSizer(field_number, is_repeated, is_packed): ... def GroupSizer(field_number, is_repeated, is_packed): ... def MessageSizer(field_number, is_repeated, is_packed): ... def MessageSetItemSizer(field_number): ... def MapSizer(field_descriptor): ... def TagBytes(field_number, wire_type): ... Int32Encoder: Any UInt32Encoder: Any SInt32Encoder: Any Fixed32Encoder: Any Fixed64Encoder: Any SFixed32Encoder: Any SFixed64Encoder: Any FloatEncoder: Any DoubleEncoder: Any def BoolEncoder(field_number, is_repeated, is_packed): ... def StringEncoder(field_number, is_repeated, is_packed): ... def BytesEncoder(field_number, is_repeated, is_packed): ... def GroupEncoder(field_number, is_repeated, is_packed): ... def MessageEncoder(field_number, is_repeated, is_packed): ... def MessageSetItemEncoder(field_number): ... def MapEncoder(field_descriptor): ... ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/well_known_types.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/well_known_types.py0000664000175000017500000000716013577124116033645 0ustar davedave00000000000000from typing import Any, Optional from datetime import datetime class Error(Exception): ... class ParseError(Error): ... # This is named 'Any' in the original, but that conflicts with typing.Any, # and we really only need this file to mix in. class Any_: type_url: Any = ... value: Any = ... def Pack(self, msg: Any, type_url_prefix: bytes = ..., deterministic: Optional[Any] = ...) -> None: ... def Unpack(self, msg: Any): ... def TypeName(self): ... def Is(self, descriptor: Any): ... class Timestamp: def ToJsonString(self) -> str: ... seconds: Any = ... nanos: Any = ... def FromJsonString(self, value: Any) -> None: ... def GetCurrentTime(self) -> None: ... def ToNanoseconds(self): ... def ToMicroseconds(self): ... def ToMilliseconds(self): ... def ToSeconds(self): ... def FromNanoseconds(self, nanos: Any) -> None: ... def FromMicroseconds(self, micros: Any) -> None: ... def FromMilliseconds(self, millis: Any) -> None: ... def FromSeconds(self, seconds: Any) -> None: ... def ToDatetime(self) -> datetime: ... def FromDatetime(self, dt: datetime) -> None: ... class Duration: def ToJsonString(self) -> str: ... seconds: Any = ... nanos: Any = ... def FromJsonString(self, value: Any) -> None: ... def ToNanoseconds(self): ... def ToMicroseconds(self): ... def ToMilliseconds(self): ... def ToSeconds(self): ... def FromNanoseconds(self, nanos: Any) -> None: ... def FromMicroseconds(self, micros: Any) -> None: ... def FromMilliseconds(self, millis: Any) -> None: ... def FromSeconds(self, seconds: Any) -> None: ... def ToTimedelta(self): ... def FromTimedelta(self, td: Any) -> None: ... class FieldMask: def ToJsonString(self) -> str: ... def FromJsonString(self, value: Any) -> None: ... def IsValidForDescriptor(self, message_descriptor: Any): ... def AllFieldsFromDescriptor(self, message_descriptor: Any) -> None: ... def CanonicalFormFromMask(self, mask: Any) -> None: ... def Union(self, mask1: Any, mask2: Any) -> None: ... def Intersect(self, mask1: Any, mask2: Any) -> None: ... def MergeMessage( self, source: Any, destination: Any, replace_message_field: bool = ..., replace_repeated_field: bool = ... ) -> None: ... class _FieldMaskTree: def __init__(self, field_mask: Optional[Any] = ...) -> None: ... def MergeFromFieldMask(self, field_mask: Any) -> None: ... def AddPath(self, path: Any): ... def ToFieldMask(self, field_mask: Any) -> None: ... def IntersectPath(self, path: Any, intersection: Any): ... def AddLeafNodes(self, prefix: Any, node: Any) -> None: ... def MergeMessage(self, source: Any, destination: Any, replace_message: Any, replace_repeated: Any) -> None: ... class Struct: def __getitem__(self, key: Any): ... def __contains__(self, item: Any): ... def __setitem__(self, key: Any, value: Any) -> None: ... def __delitem__(self, key: Any) -> None: ... def __len__(self): ... def __iter__(self): ... def keys(self): ... def values(self): ... def items(self): ... def get_or_create_list(self, key: Any): ... def get_or_create_struct(self, key: Any): ... def update(self, dictionary: Any) -> None: ... class ListValue: def __len__(self): ... def append(self, value: Any) -> None: ... def extend(self, elem_seq: Any) -> None: ... def __getitem__(self, index: Any): ... def __setitem__(self, index: Any, value: Any) -> None: ... def __delitem__(self, key: Any) -> None: ... def items(self) -> None: ... def add_struct(self): ... def add_list(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/containers.pyi0000664000175000017500000000520113577124116032552 0ustar davedave00000000000000from google.protobuf.descriptor import Descriptor from google.protobuf.internal.message_listener import MessageListener from google.protobuf.message import Message from typing import Sequence, TypeVar, Generic, Any, Iterator, Iterable, Union, Optional, Callable, overload, List _T = TypeVar("_T") class BaseContainer(Sequence[_T]): def __init__(self, message_listener: MessageListener) -> None: ... def __len__(self) -> int: ... def __ne__(self, other: object) -> bool: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def sort(self, *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> None: ... @overload def __getitem__(self, key: int) -> _T: ... @overload def __getitem__(self, key: slice) -> List[_T]: ... class RepeatedScalarFieldContainer(BaseContainer[_T]): def __init__(self, message_listener: MessageListener, message_descriptor: Descriptor) -> None: ... def append(self, value: _T) -> None: ... def insert(self, key: int, value: _T) -> None: ... def extend(self, elem_seq: Optional[Iterable[_T]]) -> None: ... def MergeFrom(self, other: RepeatedScalarFieldContainer[_T]) -> None: ... def remove(self, elem: _T) -> None: ... def pop(self, key: int = ...) -> _T: ... @overload def __setitem__(self, key: int, value: _T) -> None: ... @overload def __setitem__(self, key: slice, value: Iterable[_T]) -> None: ... def __getslice__(self, start: int, stop: int) -> List[_T]: ... def __setslice__(self, start: int, stop: int, values: Iterable[_T]) -> None: ... def __delitem__(self, key: Union[int, slice]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __eq__(self, other: object) -> bool: ... class RepeatedCompositeFieldContainer(BaseContainer[_T]): def __init__(self, message_listener: MessageListener, type_checker: Any) -> None: ... def add(self, **kwargs: Any) -> _T: ... def append(self, value: _T) -> None: ... def insert(self, key: int, value: _T) -> None: ... def extend(self, elem_seq: Iterable[_T]) -> None: ... def MergeFrom(self, other: RepeatedCompositeFieldContainer[_T]) -> None: ... def remove(self, elem: _T) -> None: ... def pop(self, key: int = ...) -> _T: ... def __getslice__(self, start: int, stop: int) -> List[_T]: ... def __delitem__(self, key: Union[int, slice]) -> None: ... def __delslice__(self, start: int, stop: int) -> None: ... def __eq__(self, other: object) -> bool: ... # Classes not yet typed class Mapping(Any): ... class MutableMapping(Mapping): ... class ScalarMap(MutableMapping): ... class MessageMap(MutableMapping): ... ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/enum_type_wrapper.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/enum_type_wrapper.p0000664000175000017500000000054513577124116033616 0ustar davedave00000000000000from typing import Any, List, Tuple class EnumTypeWrapper(object): def __init__(self, enum_type: Any) -> None: ... def Name(self, number: int) -> bytes: ... def Value(self, name: bytes) -> int: ... def keys(self) -> List[bytes]: ... def values(self) -> List[int]: ... @classmethod def items(cls) -> List[Tuple[bytes, int]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/internal/wire_format.pyi0000664000175000017500000000302213577124116032722 0ustar davedave00000000000000from typing import Any TAG_TYPE_BITS: Any TAG_TYPE_MASK: Any WIRETYPE_VARINT: Any WIRETYPE_FIXED64: Any WIRETYPE_LENGTH_DELIMITED: Any WIRETYPE_START_GROUP: Any WIRETYPE_END_GROUP: Any WIRETYPE_FIXED32: Any INT32_MAX: Any INT32_MIN: Any UINT32_MAX: Any INT64_MAX: Any INT64_MIN: Any UINT64_MAX: Any FORMAT_UINT32_LITTLE_ENDIAN: Any FORMAT_UINT64_LITTLE_ENDIAN: Any FORMAT_FLOAT_LITTLE_ENDIAN: Any FORMAT_DOUBLE_LITTLE_ENDIAN: Any def PackTag(field_number, wire_type): ... def UnpackTag(tag): ... def ZigZagEncode(value): ... def ZigZagDecode(value): ... def Int32ByteSize(field_number, int32): ... def Int32ByteSizeNoTag(int32): ... def Int64ByteSize(field_number, int64): ... def UInt32ByteSize(field_number, uint32): ... def UInt64ByteSize(field_number, uint64): ... def SInt32ByteSize(field_number, int32): ... def SInt64ByteSize(field_number, int64): ... def Fixed32ByteSize(field_number, fixed32): ... def Fixed64ByteSize(field_number, fixed64): ... def SFixed32ByteSize(field_number, sfixed32): ... def SFixed64ByteSize(field_number, sfixed64): ... def FloatByteSize(field_number, flt): ... def DoubleByteSize(field_number, double): ... def BoolByteSize(field_number, b): ... def EnumByteSize(field_number, enum): ... def StringByteSize(field_number, string): ... def BytesByteSize(field_number, b): ... def GroupByteSize(field_number, message): ... def MessageByteSize(field_number, message): ... def MessageSetItemByteSize(field_number, msg): ... def TagByteSize(field_number): ... NON_PACKABLE_TYPES: Any def IsTypePackable(field_type): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/empty_pb2.pyi0000664000175000017500000000015013577124116030470 0ustar davedave00000000000000from google.protobuf.message import Message class Empty(Message): def __init__(self,) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_import_pb2.pyi0000664000175000017500000000203213577124116032604 0ustar davedave00000000000000from google.protobuf.message import Message from typing import List, Optional, Tuple, cast class ImportEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ImportEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ImportEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, ImportEnum]]: ... IMPORT_FOO: ImportEnum IMPORT_BAR: ImportEnum IMPORT_BAZ: ImportEnum class ImportEnumForMap(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ImportEnumForMap: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ImportEnumForMap]: ... @classmethod def items(cls) -> List[Tuple[bytes, ImportEnumForMap]]: ... UNKNOWN: ImportEnumForMap FOO: ImportEnumForMap BAR: ImportEnumForMap class ImportMessage(Message): d: int def __init__(self, d: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/descriptor.pyi0000664000175000017500000001576513577124116030767 0ustar davedave00000000000000from typing import Any from .message import Message from .descriptor_pb2 import ( EnumOptions, EnumValueOptions, FieldOptions, FileOptions, MessageOptions, MethodOptions, OneofOptions, ServiceOptions, ) class Error(Exception): ... class TypeTransformationError(Error): ... class DescriptorMetaclass(type): def __instancecheck__(self, obj): ... class DescriptorBase(metaclass=DescriptorMetaclass): has_options: Any def __init__(self, options, options_class_name) -> None: ... def GetOptions(self): ... class _NestedDescriptorBase(DescriptorBase): name: Any full_name: Any file: Any containing_type: Any def __init__( self, options, options_class_name, name, full_name, file, containing_type, serialized_start=..., serialized_end=... ) -> None: ... def GetTopLevelContainingType(self): ... def CopyToProto(self, proto): ... class Descriptor(_NestedDescriptorBase): def __new__( cls, name, full_name, filename, containing_type, fields, nested_types, enum_types, extensions, options=..., is_extendable=..., extension_ranges=..., oneofs=..., file=..., serialized_start=..., serialized_end=..., syntax=..., ): ... fields: Any fields_by_number: Any fields_by_name: Any nested_types: Any nested_types_by_name: Any enum_types: Any enum_types_by_name: Any enum_values_by_name: Any extensions: Any extensions_by_name: Any is_extendable: Any extension_ranges: Any oneofs: Any oneofs_by_name: Any syntax: Any def __init__( self, name, full_name, filename, containing_type, fields, nested_types, enum_types, extensions, options=..., is_extendable=..., extension_ranges=..., oneofs=..., file=..., serialized_start=..., serialized_end=..., syntax=..., ) -> None: ... def EnumValueName(self, enum, value): ... def CopyToProto(self, proto): ... def GetOptions(self) -> MessageOptions: ... class FieldDescriptor(DescriptorBase): TYPE_DOUBLE: Any TYPE_FLOAT: Any TYPE_INT64: Any TYPE_UINT64: Any TYPE_INT32: Any TYPE_FIXED64: Any TYPE_FIXED32: Any TYPE_BOOL: Any TYPE_STRING: Any TYPE_GROUP: Any TYPE_MESSAGE: Any TYPE_BYTES: Any TYPE_UINT32: Any TYPE_ENUM: Any TYPE_SFIXED32: Any TYPE_SFIXED64: Any TYPE_SINT32: Any TYPE_SINT64: Any MAX_TYPE: Any CPPTYPE_INT32: Any CPPTYPE_INT64: Any CPPTYPE_UINT32: Any CPPTYPE_UINT64: Any CPPTYPE_DOUBLE: Any CPPTYPE_FLOAT: Any CPPTYPE_BOOL: Any CPPTYPE_ENUM: Any CPPTYPE_STRING: Any CPPTYPE_MESSAGE: Any MAX_CPPTYPE: Any LABEL_OPTIONAL: Any LABEL_REQUIRED: Any LABEL_REPEATED: Any MAX_LABEL: Any MAX_FIELD_NUMBER: Any FIRST_RESERVED_FIELD_NUMBER: Any LAST_RESERVED_FIELD_NUMBER: Any def __new__( cls, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=..., file=..., has_default_value=..., containing_oneof=..., ): ... name: Any full_name: Any index: Any number: Any type: Any cpp_type: Any label: Any has_default_value: Any default_value: Any containing_type: Any message_type: Any enum_type: Any is_extension: Any extension_scope: Any containing_oneof: Any def __init__( self, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=..., file=..., has_default_value=..., containing_oneof=..., ) -> None: ... @staticmethod def ProtoTypeToCppProtoType(proto_type): ... def GetOptions(self) -> FieldOptions: ... class EnumDescriptor(_NestedDescriptorBase): def __new__( cls, name, full_name, filename, values, containing_type=..., options=..., file=..., serialized_start=..., serialized_end=..., ): ... values: Any values_by_name: Any values_by_number: Any def __init__( self, name, full_name, filename, values, containing_type=..., options=..., file=..., serialized_start=..., serialized_end=..., ) -> None: ... def CopyToProto(self, proto): ... def GetOptions(self) -> EnumOptions: ... class EnumValueDescriptor(DescriptorBase): def __new__(cls, name, index, number, type=..., options=...): ... name: Any index: Any number: Any type: Any def __init__(self, name, index, number, type=..., options=...) -> None: ... def GetOptions(self) -> EnumValueOptions: ... class OneofDescriptor: def __new__(cls, name, full_name, index, containing_type, fields): ... name: Any full_name: Any index: Any containing_type: Any fields: Any def __init__(self, name, full_name, index, containing_type, fields) -> None: ... def GetOptions(self) -> OneofOptions: ... class ServiceDescriptor(_NestedDescriptorBase): index: Any methods: Any methods_by_name: Any def __init__( self, name, full_name, index, methods, options=..., file=..., serialized_start=..., serialized_end=... ) -> None: ... def FindMethodByName(self, name): ... def CopyToProto(self, proto): ... def GetOptions(self) -> ServiceOptions: ... class MethodDescriptor(DescriptorBase): name: Any full_name: Any index: Any containing_service: Any input_type: Any output_type: Any def __init__(self, name, full_name, index, containing_service, input_type, output_type, options=...) -> None: ... def GetOptions(self) -> MethodOptions: ... class FileDescriptor(DescriptorBase): def __new__( cls, name, package, options=..., serialized_pb=..., dependencies=..., public_dependencies=..., syntax=..., pool=... ): ... _options: Any pool: Any message_types_by_name: Any name: Any package: Any syntax: Any serialized_pb: Any enum_types_by_name: Any extensions_by_name: Any services_by_name: Any dependencies: Any public_dependencies: Any def __init__( self, name, package, options=..., serialized_pb=..., dependencies=..., public_dependencies=..., syntax=..., pool=... ) -> None: ... def CopyToProto(self, proto): ... def GetOptions(self) -> FileOptions: ... def MakeDescriptor(desc_proto, package=..., build_file_if_cpp=..., syntax=...): ... def _ParseOptions(message: Message, string: bytes) -> Message: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/descriptor_pb2.pyi0000664000175000017500000004352513577124116031525 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from typing import Iterable, List, Optional, Text, Tuple, cast class FileDescriptorSet(Message): @property def file(self) -> RepeatedCompositeFieldContainer[FileDescriptorProto]: ... def __init__(self, file: Optional[Iterable[FileDescriptorProto]] = ...) -> None: ... class FileDescriptorProto(Message): name: Text package: Text dependency: RepeatedScalarFieldContainer[Text] public_dependency: RepeatedScalarFieldContainer[int] weak_dependency: RepeatedScalarFieldContainer[int] syntax: Text @property def message_type(self) -> RepeatedCompositeFieldContainer[DescriptorProto]: ... @property def enum_type(self) -> RepeatedCompositeFieldContainer[EnumDescriptorProto]: ... @property def service(self) -> RepeatedCompositeFieldContainer[ServiceDescriptorProto]: ... @property def extension(self) -> RepeatedCompositeFieldContainer[FieldDescriptorProto]: ... @property def options(self) -> FileOptions: ... @property def source_code_info(self) -> SourceCodeInfo: ... def __init__( self, name: Optional[Text] = ..., package: Optional[Text] = ..., dependency: Optional[Iterable[Text]] = ..., public_dependency: Optional[Iterable[int]] = ..., weak_dependency: Optional[Iterable[int]] = ..., message_type: Optional[Iterable[DescriptorProto]] = ..., enum_type: Optional[Iterable[EnumDescriptorProto]] = ..., service: Optional[Iterable[ServiceDescriptorProto]] = ..., extension: Optional[Iterable[FieldDescriptorProto]] = ..., options: Optional[FileOptions] = ..., source_code_info: Optional[SourceCodeInfo] = ..., syntax: Optional[Text] = ..., ) -> None: ... class DescriptorProto(Message): class ExtensionRange(Message): start: int end: int @property def options(self) -> ExtensionRangeOptions: ... def __init__( self, start: Optional[int] = ..., end: Optional[int] = ..., options: Optional[ExtensionRangeOptions] = ... ) -> None: ... class ReservedRange(Message): start: int end: int def __init__(self, start: Optional[int] = ..., end: Optional[int] = ...) -> None: ... name: Text reserved_name: RepeatedScalarFieldContainer[Text] @property def field(self) -> RepeatedCompositeFieldContainer[FieldDescriptorProto]: ... @property def extension(self) -> RepeatedCompositeFieldContainer[FieldDescriptorProto]: ... @property def nested_type(self) -> RepeatedCompositeFieldContainer[DescriptorProto]: ... @property def enum_type(self) -> RepeatedCompositeFieldContainer[EnumDescriptorProto]: ... @property def extension_range(self) -> RepeatedCompositeFieldContainer[DescriptorProto.ExtensionRange]: ... @property def oneof_decl(self) -> RepeatedCompositeFieldContainer[OneofDescriptorProto]: ... @property def options(self) -> MessageOptions: ... @property def reserved_range(self) -> RepeatedCompositeFieldContainer[DescriptorProto.ReservedRange]: ... def __init__( self, name: Optional[Text] = ..., field: Optional[Iterable[FieldDescriptorProto]] = ..., extension: Optional[Iterable[FieldDescriptorProto]] = ..., nested_type: Optional[Iterable[DescriptorProto]] = ..., enum_type: Optional[Iterable[EnumDescriptorProto]] = ..., extension_range: Optional[Iterable[DescriptorProto.ExtensionRange]] = ..., oneof_decl: Optional[Iterable[OneofDescriptorProto]] = ..., options: Optional[MessageOptions] = ..., reserved_range: Optional[Iterable[DescriptorProto.ReservedRange]] = ..., reserved_name: Optional[Iterable[Text]] = ..., ) -> None: ... class ExtensionRangeOptions(Message): @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__(self, uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ...) -> None: ... class FieldDescriptorProto(Message): class Type(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> FieldDescriptorProto.Type: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[FieldDescriptorProto.Type]: ... @classmethod def items(cls) -> List[Tuple[bytes, FieldDescriptorProto.Type]]: ... TYPE_DOUBLE: FieldDescriptorProto.Type TYPE_FLOAT: FieldDescriptorProto.Type TYPE_INT64: FieldDescriptorProto.Type TYPE_UINT64: FieldDescriptorProto.Type TYPE_INT32: FieldDescriptorProto.Type TYPE_FIXED64: FieldDescriptorProto.Type TYPE_FIXED32: FieldDescriptorProto.Type TYPE_BOOL: FieldDescriptorProto.Type TYPE_STRING: FieldDescriptorProto.Type TYPE_GROUP: FieldDescriptorProto.Type TYPE_MESSAGE: FieldDescriptorProto.Type TYPE_BYTES: FieldDescriptorProto.Type TYPE_UINT32: FieldDescriptorProto.Type TYPE_ENUM: FieldDescriptorProto.Type TYPE_SFIXED32: FieldDescriptorProto.Type TYPE_SFIXED64: FieldDescriptorProto.Type TYPE_SINT32: FieldDescriptorProto.Type TYPE_SINT64: FieldDescriptorProto.Type class Label(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> FieldDescriptorProto.Label: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[FieldDescriptorProto.Label]: ... @classmethod def items(cls) -> List[Tuple[bytes, FieldDescriptorProto.Label]]: ... LABEL_OPTIONAL: FieldDescriptorProto.Label LABEL_REQUIRED: FieldDescriptorProto.Label LABEL_REPEATED: FieldDescriptorProto.Label name: Text number: int label: FieldDescriptorProto.Label type: FieldDescriptorProto.Type type_name: Text extendee: Text default_value: Text oneof_index: int json_name: Text @property def options(self) -> FieldOptions: ... def __init__( self, name: Optional[Text] = ..., number: Optional[int] = ..., label: Optional[FieldDescriptorProto.Label] = ..., type: Optional[FieldDescriptorProto.Type] = ..., type_name: Optional[Text] = ..., extendee: Optional[Text] = ..., default_value: Optional[Text] = ..., oneof_index: Optional[int] = ..., json_name: Optional[Text] = ..., options: Optional[FieldOptions] = ..., ) -> None: ... class OneofDescriptorProto(Message): name: Text @property def options(self) -> OneofOptions: ... def __init__(self, name: Optional[Text] = ..., options: Optional[OneofOptions] = ...) -> None: ... class EnumDescriptorProto(Message): class EnumReservedRange(Message): start: int end: int def __init__(self, start: Optional[int] = ..., end: Optional[int] = ...) -> None: ... name: Text reserved_name: RepeatedScalarFieldContainer[Text] @property def value(self) -> RepeatedCompositeFieldContainer[EnumValueDescriptorProto]: ... @property def options(self) -> EnumOptions: ... @property def reserved_range(self) -> RepeatedCompositeFieldContainer[EnumDescriptorProto.EnumReservedRange]: ... def __init__( self, name: Optional[Text] = ..., value: Optional[Iterable[EnumValueDescriptorProto]] = ..., options: Optional[EnumOptions] = ..., reserved_range: Optional[Iterable[EnumDescriptorProto.EnumReservedRange]] = ..., reserved_name: Optional[Iterable[Text]] = ..., ) -> None: ... class EnumValueDescriptorProto(Message): name: Text number: int @property def options(self) -> EnumValueOptions: ... def __init__( self, name: Optional[Text] = ..., number: Optional[int] = ..., options: Optional[EnumValueOptions] = ... ) -> None: ... class ServiceDescriptorProto(Message): name: Text @property def method(self) -> RepeatedCompositeFieldContainer[MethodDescriptorProto]: ... @property def options(self) -> ServiceOptions: ... def __init__( self, name: Optional[Text] = ..., method: Optional[Iterable[MethodDescriptorProto]] = ..., options: Optional[ServiceOptions] = ..., ) -> None: ... class MethodDescriptorProto(Message): name: Text input_type: Text output_type: Text client_streaming: bool server_streaming: bool @property def options(self) -> MethodOptions: ... def __init__( self, name: Optional[Text] = ..., input_type: Optional[Text] = ..., output_type: Optional[Text] = ..., options: Optional[MethodOptions] = ..., client_streaming: Optional[bool] = ..., server_streaming: Optional[bool] = ..., ) -> None: ... class FileOptions(Message): class OptimizeMode(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> FileOptions.OptimizeMode: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[FileOptions.OptimizeMode]: ... @classmethod def items(cls) -> List[Tuple[bytes, FileOptions.OptimizeMode]]: ... SPEED: FileOptions.OptimizeMode CODE_SIZE: FileOptions.OptimizeMode LITE_RUNTIME: FileOptions.OptimizeMode java_package: Text java_outer_classname: Text java_multiple_files: bool java_generate_equals_and_hash: bool java_string_check_utf8: bool optimize_for: FileOptions.OptimizeMode go_package: Text cc_generic_services: bool java_generic_services: bool py_generic_services: bool php_generic_services: bool deprecated: bool cc_enable_arenas: bool objc_class_prefix: Text csharp_namespace: Text swift_prefix: Text php_class_prefix: Text php_namespace: Text @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, java_package: Optional[Text] = ..., java_outer_classname: Optional[Text] = ..., java_multiple_files: Optional[bool] = ..., java_generate_equals_and_hash: Optional[bool] = ..., java_string_check_utf8: Optional[bool] = ..., optimize_for: Optional[FileOptions.OptimizeMode] = ..., go_package: Optional[Text] = ..., cc_generic_services: Optional[bool] = ..., java_generic_services: Optional[bool] = ..., py_generic_services: Optional[bool] = ..., php_generic_services: Optional[bool] = ..., deprecated: Optional[bool] = ..., cc_enable_arenas: Optional[bool] = ..., objc_class_prefix: Optional[Text] = ..., csharp_namespace: Optional[Text] = ..., swift_prefix: Optional[Text] = ..., php_class_prefix: Optional[Text] = ..., php_namespace: Optional[Text] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... class MessageOptions(Message): message_set_wire_format: bool no_standard_descriptor_accessor: bool deprecated: bool map_entry: bool @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, message_set_wire_format: Optional[bool] = ..., no_standard_descriptor_accessor: Optional[bool] = ..., deprecated: Optional[bool] = ..., map_entry: Optional[bool] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... class FieldOptions(Message): class CType(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> FieldOptions.CType: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[FieldOptions.CType]: ... @classmethod def items(cls) -> List[Tuple[bytes, FieldOptions.CType]]: ... STRING: FieldOptions.CType CORD: FieldOptions.CType STRING_PIECE: FieldOptions.CType class JSType(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> FieldOptions.JSType: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[FieldOptions.JSType]: ... @classmethod def items(cls) -> List[Tuple[bytes, FieldOptions.JSType]]: ... JS_NORMAL: FieldOptions.JSType JS_STRING: FieldOptions.JSType JS_NUMBER: FieldOptions.JSType ctype: FieldOptions.CType packed: bool jstype: FieldOptions.JSType lazy: bool deprecated: bool weak: bool @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, ctype: Optional[FieldOptions.CType] = ..., packed: Optional[bool] = ..., jstype: Optional[FieldOptions.JSType] = ..., lazy: Optional[bool] = ..., deprecated: Optional[bool] = ..., weak: Optional[bool] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... class OneofOptions(Message): @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__(self, uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ...) -> None: ... class EnumOptions(Message): allow_alias: bool deprecated: bool @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, allow_alias: Optional[bool] = ..., deprecated: Optional[bool] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... class EnumValueOptions(Message): deprecated: bool @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, deprecated: Optional[bool] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ... ) -> None: ... class ServiceOptions(Message): deprecated: bool @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, deprecated: Optional[bool] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ... ) -> None: ... class MethodOptions(Message): class IdempotencyLevel(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> MethodOptions.IdempotencyLevel: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[MethodOptions.IdempotencyLevel]: ... @classmethod def items(cls) -> List[Tuple[bytes, MethodOptions.IdempotencyLevel]]: ... IDEMPOTENCY_UNKNOWN: MethodOptions.IdempotencyLevel NO_SIDE_EFFECTS: MethodOptions.IdempotencyLevel IDEMPOTENT: MethodOptions.IdempotencyLevel deprecated: bool idempotency_level: MethodOptions.IdempotencyLevel @property def uninterpreted_option(self) -> RepeatedCompositeFieldContainer[UninterpretedOption]: ... def __init__( self, deprecated: Optional[bool] = ..., idempotency_level: Optional[MethodOptions.IdempotencyLevel] = ..., uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... class UninterpretedOption(Message): class NamePart(Message): name_part: Text is_extension: bool def __init__(self, name_part: Text, is_extension: bool) -> None: ... identifier_value: Text positive_int_value: int negative_int_value: int double_value: float string_value: bytes aggregate_value: Text @property def name(self) -> RepeatedCompositeFieldContainer[UninterpretedOption.NamePart]: ... def __init__( self, name: Optional[Iterable[UninterpretedOption.NamePart]] = ..., identifier_value: Optional[Text] = ..., positive_int_value: Optional[int] = ..., negative_int_value: Optional[int] = ..., double_value: Optional[float] = ..., string_value: Optional[bytes] = ..., aggregate_value: Optional[Text] = ..., ) -> None: ... class SourceCodeInfo(Message): class Location(Message): path: RepeatedScalarFieldContainer[int] span: RepeatedScalarFieldContainer[int] leading_comments: Text trailing_comments: Text leading_detached_comments: RepeatedScalarFieldContainer[Text] def __init__( self, path: Optional[Iterable[int]] = ..., span: Optional[Iterable[int]] = ..., leading_comments: Optional[Text] = ..., trailing_comments: Optional[Text] = ..., leading_detached_comments: Optional[Iterable[Text]] = ..., ) -> None: ... @property def location(self) -> RepeatedCompositeFieldContainer[SourceCodeInfo.Location]: ... def __init__(self, location: Optional[Iterable[SourceCodeInfo.Location]] = ...) -> None: ... class GeneratedCodeInfo(Message): class Annotation(Message): path: RepeatedScalarFieldContainer[int] source_file: Text begin: int end: int def __init__( self, path: Optional[Iterable[int]] = ..., source_file: Optional[Text] = ..., begin: Optional[int] = ..., end: Optional[int] = ..., ) -> None: ... @property def annotation(self) -> RepeatedCompositeFieldContainer[GeneratedCodeInfo.Annotation]: ... def __init__(self, annotation: Optional[Iterable[GeneratedCodeInfo.Annotation]] = ...) -> None: ... ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb0000664000175000017500000000052013577124116033756 0ustar davedave00000000000000from google.protobuf.message import Message from typing import Optional class TestMessageSet(Message): def __init__(self,) -> None: ... class TestMessageSetWireFormatContainer(Message): @property def message_set(self) -> TestMessageSet: ... def __init__(self, message_set: Optional[TestMessageSet] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_pb2.pyi0000664000175000017500000011773113577124116031227 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from google.protobuf.unittest_import_pb2 import ImportEnum, ImportMessage from google.protobuf.unittest_import_public_pb2 import PublicImportMessage from typing import Iterable, List, Mapping, MutableMapping, Optional, Text, Tuple, cast class ForeignEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ForeignEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ForeignEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, ForeignEnum]]: ... FOREIGN_FOO: ForeignEnum FOREIGN_BAR: ForeignEnum FOREIGN_BAZ: ForeignEnum class TestEnumWithDupValue(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestEnumWithDupValue: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestEnumWithDupValue]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestEnumWithDupValue]]: ... FOO1: TestEnumWithDupValue BAR1: TestEnumWithDupValue BAZ: TestEnumWithDupValue FOO2: TestEnumWithDupValue BAR2: TestEnumWithDupValue class TestSparseEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestSparseEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestSparseEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestSparseEnum]]: ... SPARSE_A: TestSparseEnum SPARSE_B: TestSparseEnum SPARSE_C: TestSparseEnum SPARSE_D: TestSparseEnum SPARSE_E: TestSparseEnum SPARSE_F: TestSparseEnum SPARSE_G: TestSparseEnum class TestAllTypes(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestAllTypes.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestAllTypes.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestAllTypes.NestedEnum]]: ... FOO: TestAllTypes.NestedEnum BAR: TestAllTypes.NestedEnum BAZ: TestAllTypes.NestedEnum NEG: TestAllTypes.NestedEnum class NestedMessage(Message): bb: int def __init__(self, bb: Optional[int] = ...) -> None: ... class OptionalGroup(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... class RepeatedGroup(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... optional_int32: int optional_int64: int optional_uint32: int optional_uint64: int optional_sint32: int optional_sint64: int optional_fixed32: int optional_fixed64: int optional_sfixed32: int optional_sfixed64: int optional_float: float optional_double: float optional_bool: bool optional_string: Text optional_bytes: bytes optional_nested_enum: TestAllTypes.NestedEnum optional_foreign_enum: ForeignEnum optional_import_enum: ImportEnum optional_string_piece: Text optional_cord: Text repeated_int32: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_uint32: RepeatedScalarFieldContainer[int] repeated_uint64: RepeatedScalarFieldContainer[int] repeated_sint32: RepeatedScalarFieldContainer[int] repeated_sint64: RepeatedScalarFieldContainer[int] repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_sfixed32: RepeatedScalarFieldContainer[int] repeated_sfixed64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_double: RepeatedScalarFieldContainer[float] repeated_bool: RepeatedScalarFieldContainer[bool] repeated_string: RepeatedScalarFieldContainer[Text] repeated_bytes: RepeatedScalarFieldContainer[bytes] repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] repeated_import_enum: RepeatedScalarFieldContainer[ImportEnum] repeated_string_piece: RepeatedScalarFieldContainer[Text] repeated_cord: RepeatedScalarFieldContainer[Text] default_int32: int default_int64: int default_uint32: int default_uint64: int default_sint32: int default_sint64: int default_fixed32: int default_fixed64: int default_sfixed32: int default_sfixed64: int default_float: float default_double: float default_bool: bool default_string: Text default_bytes: bytes default_nested_enum: TestAllTypes.NestedEnum default_foreign_enum: ForeignEnum default_import_enum: ImportEnum default_string_piece: Text default_cord: Text oneof_uint32: int oneof_string: Text oneof_bytes: bytes @property def optionalgroup(self) -> TestAllTypes.OptionalGroup: ... @property def optional_nested_message(self) -> TestAllTypes.NestedMessage: ... @property def optional_foreign_message(self) -> ForeignMessage: ... @property def optional_import_message(self) -> ImportMessage: ... @property def optional_public_import_message(self) -> PublicImportMessage: ... @property def optional_lazy_message(self) -> TestAllTypes.NestedMessage: ... @property def repeatedgroup(self) -> RepeatedCompositeFieldContainer[TestAllTypes.RepeatedGroup]: ... @property def repeated_nested_message(self) -> RepeatedCompositeFieldContainer[TestAllTypes.NestedMessage]: ... @property def repeated_foreign_message(self) -> RepeatedCompositeFieldContainer[ForeignMessage]: ... @property def repeated_import_message(self) -> RepeatedCompositeFieldContainer[ImportMessage]: ... @property def repeated_lazy_message(self) -> RepeatedCompositeFieldContainer[TestAllTypes.NestedMessage]: ... @property def oneof_nested_message(self) -> TestAllTypes.NestedMessage: ... def __init__( self, optional_int32: Optional[int] = ..., optional_int64: Optional[int] = ..., optional_uint32: Optional[int] = ..., optional_uint64: Optional[int] = ..., optional_sint32: Optional[int] = ..., optional_sint64: Optional[int] = ..., optional_fixed32: Optional[int] = ..., optional_fixed64: Optional[int] = ..., optional_sfixed32: Optional[int] = ..., optional_sfixed64: Optional[int] = ..., optional_float: Optional[float] = ..., optional_double: Optional[float] = ..., optional_bool: Optional[bool] = ..., optional_string: Optional[Text] = ..., optional_bytes: Optional[bytes] = ..., optionalgroup: Optional[TestAllTypes.OptionalGroup] = ..., optional_nested_message: Optional[TestAllTypes.NestedMessage] = ..., optional_foreign_message: Optional[ForeignMessage] = ..., optional_import_message: Optional[ImportMessage] = ..., optional_nested_enum: Optional[TestAllTypes.NestedEnum] = ..., optional_foreign_enum: Optional[ForeignEnum] = ..., optional_import_enum: Optional[ImportEnum] = ..., optional_string_piece: Optional[Text] = ..., optional_cord: Optional[Text] = ..., optional_public_import_message: Optional[PublicImportMessage] = ..., optional_lazy_message: Optional[TestAllTypes.NestedMessage] = ..., repeated_int32: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_uint32: Optional[Iterable[int]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., repeated_sint32: Optional[Iterable[int]] = ..., repeated_sint64: Optional[Iterable[int]] = ..., repeated_fixed32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_sfixed32: Optional[Iterable[int]] = ..., repeated_sfixed64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_double: Optional[Iterable[float]] = ..., repeated_bool: Optional[Iterable[bool]] = ..., repeated_string: Optional[Iterable[Text]] = ..., repeated_bytes: Optional[Iterable[bytes]] = ..., repeatedgroup: Optional[Iterable[TestAllTypes.RepeatedGroup]] = ..., repeated_nested_message: Optional[Iterable[TestAllTypes.NestedMessage]] = ..., repeated_foreign_message: Optional[Iterable[ForeignMessage]] = ..., repeated_import_message: Optional[Iterable[ImportMessage]] = ..., repeated_nested_enum: Optional[Iterable[TestAllTypes.NestedEnum]] = ..., repeated_foreign_enum: Optional[Iterable[ForeignEnum]] = ..., repeated_import_enum: Optional[Iterable[ImportEnum]] = ..., repeated_string_piece: Optional[Iterable[Text]] = ..., repeated_cord: Optional[Iterable[Text]] = ..., repeated_lazy_message: Optional[Iterable[TestAllTypes.NestedMessage]] = ..., default_int32: Optional[int] = ..., default_int64: Optional[int] = ..., default_uint32: Optional[int] = ..., default_uint64: Optional[int] = ..., default_sint32: Optional[int] = ..., default_sint64: Optional[int] = ..., default_fixed32: Optional[int] = ..., default_fixed64: Optional[int] = ..., default_sfixed32: Optional[int] = ..., default_sfixed64: Optional[int] = ..., default_float: Optional[float] = ..., default_double: Optional[float] = ..., default_bool: Optional[bool] = ..., default_string: Optional[Text] = ..., default_bytes: Optional[bytes] = ..., default_nested_enum: Optional[TestAllTypes.NestedEnum] = ..., default_foreign_enum: Optional[ForeignEnum] = ..., default_import_enum: Optional[ImportEnum] = ..., default_string_piece: Optional[Text] = ..., default_cord: Optional[Text] = ..., oneof_uint32: Optional[int] = ..., oneof_nested_message: Optional[TestAllTypes.NestedMessage] = ..., oneof_string: Optional[Text] = ..., oneof_bytes: Optional[bytes] = ..., ) -> None: ... class NestedTestAllTypes(Message): @property def child(self) -> NestedTestAllTypes: ... @property def payload(self) -> TestAllTypes: ... @property def repeated_child(self) -> RepeatedCompositeFieldContainer[NestedTestAllTypes]: ... def __init__( self, child: Optional[NestedTestAllTypes] = ..., payload: Optional[TestAllTypes] = ..., repeated_child: Optional[Iterable[NestedTestAllTypes]] = ..., ) -> None: ... class TestDeprecatedFields(Message): deprecated_int32: int deprecated_int32_in_oneof: int def __init__(self, deprecated_int32: Optional[int] = ..., deprecated_int32_in_oneof: Optional[int] = ...) -> None: ... class TestDeprecatedMessage(Message): def __init__(self,) -> None: ... class ForeignMessage(Message): c: int d: int def __init__(self, c: Optional[int] = ..., d: Optional[int] = ...) -> None: ... class TestReservedFields(Message): def __init__(self,) -> None: ... class TestAllExtensions(Message): def __init__(self,) -> None: ... class OptionalGroup_extension(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... class RepeatedGroup_extension(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... class TestGroup(Message): class OptionalGroup(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... optional_foreign_enum: ForeignEnum @property def optionalgroup(self) -> TestGroup.OptionalGroup: ... def __init__( self, optionalgroup: Optional[TestGroup.OptionalGroup] = ..., optional_foreign_enum: Optional[ForeignEnum] = ... ) -> None: ... class TestGroupExtension(Message): def __init__(self,) -> None: ... class TestNestedExtension(Message): class OptionalGroup_extension(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... def __init__(self,) -> None: ... class TestRequired(Message): a: int dummy2: int b: int dummy4: int dummy5: int dummy6: int dummy7: int dummy8: int dummy9: int dummy10: int dummy11: int dummy12: int dummy13: int dummy14: int dummy15: int dummy16: int dummy17: int dummy18: int dummy19: int dummy20: int dummy21: int dummy22: int dummy23: int dummy24: int dummy25: int dummy26: int dummy27: int dummy28: int dummy29: int dummy30: int dummy31: int dummy32: int c: int def __init__( self, a: int, b: int, c: int, dummy2: Optional[int] = ..., dummy4: Optional[int] = ..., dummy5: Optional[int] = ..., dummy6: Optional[int] = ..., dummy7: Optional[int] = ..., dummy8: Optional[int] = ..., dummy9: Optional[int] = ..., dummy10: Optional[int] = ..., dummy11: Optional[int] = ..., dummy12: Optional[int] = ..., dummy13: Optional[int] = ..., dummy14: Optional[int] = ..., dummy15: Optional[int] = ..., dummy16: Optional[int] = ..., dummy17: Optional[int] = ..., dummy18: Optional[int] = ..., dummy19: Optional[int] = ..., dummy20: Optional[int] = ..., dummy21: Optional[int] = ..., dummy22: Optional[int] = ..., dummy23: Optional[int] = ..., dummy24: Optional[int] = ..., dummy25: Optional[int] = ..., dummy26: Optional[int] = ..., dummy27: Optional[int] = ..., dummy28: Optional[int] = ..., dummy29: Optional[int] = ..., dummy30: Optional[int] = ..., dummy31: Optional[int] = ..., dummy32: Optional[int] = ..., ) -> None: ... class TestRequiredForeign(Message): dummy: int @property def optional_message(self) -> TestRequired: ... @property def repeated_message(self) -> RepeatedCompositeFieldContainer[TestRequired]: ... def __init__( self, optional_message: Optional[TestRequired] = ..., repeated_message: Optional[Iterable[TestRequired]] = ..., dummy: Optional[int] = ..., ) -> None: ... class TestRequiredMessage(Message): @property def optional_message(self) -> TestRequired: ... @property def repeated_message(self) -> RepeatedCompositeFieldContainer[TestRequired]: ... @property def required_message(self) -> TestRequired: ... def __init__( self, required_message: TestRequired, optional_message: Optional[TestRequired] = ..., repeated_message: Optional[Iterable[TestRequired]] = ..., ) -> None: ... class TestForeignNested(Message): @property def foreign_nested(self) -> TestAllTypes.NestedMessage: ... def __init__(self, foreign_nested: Optional[TestAllTypes.NestedMessage] = ...) -> None: ... class TestEmptyMessage(Message): def __init__(self,) -> None: ... class TestEmptyMessageWithExtensions(Message): def __init__(self,) -> None: ... class TestMultipleExtensionRanges(Message): def __init__(self,) -> None: ... class TestReallyLargeTagNumber(Message): a: int bb: int def __init__(self, a: Optional[int] = ..., bb: Optional[int] = ...) -> None: ... class TestRecursiveMessage(Message): i: int @property def a(self) -> TestRecursiveMessage: ... def __init__(self, a: Optional[TestRecursiveMessage] = ..., i: Optional[int] = ...) -> None: ... class TestMutualRecursionA(Message): class SubMessage(Message): @property def b(self) -> TestMutualRecursionB: ... def __init__(self, b: Optional[TestMutualRecursionB] = ...) -> None: ... class SubGroup(Message): @property def sub_message(self) -> TestMutualRecursionA.SubMessage: ... @property def not_in_this_scc(self) -> TestAllTypes: ... def __init__( self, sub_message: Optional[TestMutualRecursionA.SubMessage] = ..., not_in_this_scc: Optional[TestAllTypes] = ... ) -> None: ... @property def bb(self) -> TestMutualRecursionB: ... @property def subgroup(self) -> TestMutualRecursionA.SubGroup: ... def __init__( self, bb: Optional[TestMutualRecursionB] = ..., subgroup: Optional[TestMutualRecursionA.SubGroup] = ... ) -> None: ... class TestMutualRecursionB(Message): optional_int32: int @property def a(self) -> TestMutualRecursionA: ... def __init__(self, a: Optional[TestMutualRecursionA] = ..., optional_int32: Optional[int] = ...) -> None: ... class TestIsInitialized(Message): class SubMessage(Message): class SubGroup(Message): i: int def __init__(self, i: int) -> None: ... @property def subgroup(self) -> TestIsInitialized.SubMessage.SubGroup: ... def __init__(self, subgroup: Optional[TestIsInitialized.SubMessage.SubGroup] = ...) -> None: ... @property def sub_message(self) -> TestIsInitialized.SubMessage: ... def __init__(self, sub_message: Optional[TestIsInitialized.SubMessage] = ...) -> None: ... class TestDupFieldNumber(Message): class Foo(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... class Bar(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... a: int @property def foo(self) -> TestDupFieldNumber.Foo: ... @property def bar(self) -> TestDupFieldNumber.Bar: ... def __init__( self, a: Optional[int] = ..., foo: Optional[TestDupFieldNumber.Foo] = ..., bar: Optional[TestDupFieldNumber.Bar] = ... ) -> None: ... class TestEagerMessage(Message): @property def sub_message(self) -> TestAllTypes: ... def __init__(self, sub_message: Optional[TestAllTypes] = ...) -> None: ... class TestLazyMessage(Message): @property def sub_message(self) -> TestAllTypes: ... def __init__(self, sub_message: Optional[TestAllTypes] = ...) -> None: ... class TestNestedMessageHasBits(Message): class NestedMessage(Message): nestedmessage_repeated_int32: RepeatedScalarFieldContainer[int] @property def nestedmessage_repeated_foreignmessage(self) -> RepeatedCompositeFieldContainer[ForeignMessage]: ... def __init__( self, nestedmessage_repeated_int32: Optional[Iterable[int]] = ..., nestedmessage_repeated_foreignmessage: Optional[Iterable[ForeignMessage]] = ..., ) -> None: ... @property def optional_nested_message(self) -> TestNestedMessageHasBits.NestedMessage: ... def __init__(self, optional_nested_message: Optional[TestNestedMessageHasBits.NestedMessage] = ...) -> None: ... class TestCamelCaseFieldNames(Message): PrimitiveField: int StringField: Text EnumField: ForeignEnum StringPieceField: Text CordField: Text RepeatedPrimitiveField: RepeatedScalarFieldContainer[int] RepeatedStringField: RepeatedScalarFieldContainer[Text] RepeatedEnumField: RepeatedScalarFieldContainer[ForeignEnum] RepeatedStringPieceField: RepeatedScalarFieldContainer[Text] RepeatedCordField: RepeatedScalarFieldContainer[Text] @property def MessageField(self) -> ForeignMessage: ... @property def RepeatedMessageField(self) -> RepeatedCompositeFieldContainer[ForeignMessage]: ... def __init__( self, PrimitiveField: Optional[int] = ..., StringField: Optional[Text] = ..., EnumField: Optional[ForeignEnum] = ..., MessageField: Optional[ForeignMessage] = ..., StringPieceField: Optional[Text] = ..., CordField: Optional[Text] = ..., RepeatedPrimitiveField: Optional[Iterable[int]] = ..., RepeatedStringField: Optional[Iterable[Text]] = ..., RepeatedEnumField: Optional[Iterable[ForeignEnum]] = ..., RepeatedMessageField: Optional[Iterable[ForeignMessage]] = ..., RepeatedStringPieceField: Optional[Iterable[Text]] = ..., RepeatedCordField: Optional[Iterable[Text]] = ..., ) -> None: ... class TestFieldOrderings(Message): class NestedMessage(Message): oo: int bb: int def __init__(self, oo: Optional[int] = ..., bb: Optional[int] = ...) -> None: ... my_string: Text my_int: int my_float: float @property def optional_nested_message(self) -> TestFieldOrderings.NestedMessage: ... def __init__( self, my_string: Optional[Text] = ..., my_int: Optional[int] = ..., my_float: Optional[float] = ..., optional_nested_message: Optional[TestFieldOrderings.NestedMessage] = ..., ) -> None: ... class TestExtensionOrderings1(Message): my_string: Text def __init__(self, my_string: Optional[Text] = ...) -> None: ... class TestExtensionOrderings2(Message): class TestExtensionOrderings3(Message): my_string: Text def __init__(self, my_string: Optional[Text] = ...) -> None: ... my_string: Text def __init__(self, my_string: Optional[Text] = ...) -> None: ... class TestExtremeDefaultValues(Message): escaped_bytes: bytes large_uint32: int large_uint64: int small_int32: int small_int64: int really_small_int32: int really_small_int64: int utf8_string: Text zero_float: float one_float: float small_float: float negative_one_float: float negative_float: float large_float: float small_negative_float: float inf_double: float neg_inf_double: float nan_double: float inf_float: float neg_inf_float: float nan_float: float cpp_trigraph: Text string_with_zero: Text bytes_with_zero: bytes string_piece_with_zero: Text cord_with_zero: Text replacement_string: Text def __init__( self, escaped_bytes: Optional[bytes] = ..., large_uint32: Optional[int] = ..., large_uint64: Optional[int] = ..., small_int32: Optional[int] = ..., small_int64: Optional[int] = ..., really_small_int32: Optional[int] = ..., really_small_int64: Optional[int] = ..., utf8_string: Optional[Text] = ..., zero_float: Optional[float] = ..., one_float: Optional[float] = ..., small_float: Optional[float] = ..., negative_one_float: Optional[float] = ..., negative_float: Optional[float] = ..., large_float: Optional[float] = ..., small_negative_float: Optional[float] = ..., inf_double: Optional[float] = ..., neg_inf_double: Optional[float] = ..., nan_double: Optional[float] = ..., inf_float: Optional[float] = ..., neg_inf_float: Optional[float] = ..., nan_float: Optional[float] = ..., cpp_trigraph: Optional[Text] = ..., string_with_zero: Optional[Text] = ..., bytes_with_zero: Optional[bytes] = ..., string_piece_with_zero: Optional[Text] = ..., cord_with_zero: Optional[Text] = ..., replacement_string: Optional[Text] = ..., ) -> None: ... class SparseEnumMessage(Message): sparse_enum: TestSparseEnum def __init__(self, sparse_enum: Optional[TestSparseEnum] = ...) -> None: ... class OneString(Message): data: Text def __init__(self, data: Optional[Text] = ...) -> None: ... class MoreString(Message): data: RepeatedScalarFieldContainer[Text] def __init__(self, data: Optional[Iterable[Text]] = ...) -> None: ... class OneBytes(Message): data: bytes def __init__(self, data: Optional[bytes] = ...) -> None: ... class MoreBytes(Message): data: RepeatedScalarFieldContainer[bytes] def __init__(self, data: Optional[Iterable[bytes]] = ...) -> None: ... class Int32Message(Message): data: int def __init__(self, data: Optional[int] = ...) -> None: ... class Uint32Message(Message): data: int def __init__(self, data: Optional[int] = ...) -> None: ... class Int64Message(Message): data: int def __init__(self, data: Optional[int] = ...) -> None: ... class Uint64Message(Message): data: int def __init__(self, data: Optional[int] = ...) -> None: ... class BoolMessage(Message): data: bool def __init__(self, data: Optional[bool] = ...) -> None: ... class TestOneof(Message): class FooGroup(Message): a: int b: Text def __init__(self, a: Optional[int] = ..., b: Optional[Text] = ...) -> None: ... foo_int: int foo_string: Text @property def foo_message(self) -> TestAllTypes: ... @property def foogroup(self) -> TestOneof.FooGroup: ... def __init__( self, foo_int: Optional[int] = ..., foo_string: Optional[Text] = ..., foo_message: Optional[TestAllTypes] = ..., foogroup: Optional[TestOneof.FooGroup] = ..., ) -> None: ... class TestOneofBackwardsCompatible(Message): class FooGroup(Message): a: int b: Text def __init__(self, a: Optional[int] = ..., b: Optional[Text] = ...) -> None: ... foo_int: int foo_string: Text @property def foo_message(self) -> TestAllTypes: ... @property def foogroup(self) -> TestOneofBackwardsCompatible.FooGroup: ... def __init__( self, foo_int: Optional[int] = ..., foo_string: Optional[Text] = ..., foo_message: Optional[TestAllTypes] = ..., foogroup: Optional[TestOneofBackwardsCompatible.FooGroup] = ..., ) -> None: ... class TestOneof2(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestOneof2.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestOneof2.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestOneof2.NestedEnum]]: ... FOO: TestOneof2.NestedEnum BAR: TestOneof2.NestedEnum BAZ: TestOneof2.NestedEnum class FooGroup(Message): a: int b: Text def __init__(self, a: Optional[int] = ..., b: Optional[Text] = ...) -> None: ... class NestedMessage(Message): qux_int: int corge_int: RepeatedScalarFieldContainer[int] def __init__(self, qux_int: Optional[int] = ..., corge_int: Optional[Iterable[int]] = ...) -> None: ... foo_int: int foo_string: Text foo_cord: Text foo_string_piece: Text foo_bytes: bytes foo_enum: TestOneof2.NestedEnum bar_int: int bar_string: Text bar_cord: Text bar_string_piece: Text bar_bytes: bytes bar_enum: TestOneof2.NestedEnum baz_int: int baz_string: Text @property def foo_message(self) -> TestOneof2.NestedMessage: ... @property def foogroup(self) -> TestOneof2.FooGroup: ... @property def foo_lazy_message(self) -> TestOneof2.NestedMessage: ... def __init__( self, foo_int: Optional[int] = ..., foo_string: Optional[Text] = ..., foo_cord: Optional[Text] = ..., foo_string_piece: Optional[Text] = ..., foo_bytes: Optional[bytes] = ..., foo_enum: Optional[TestOneof2.NestedEnum] = ..., foo_message: Optional[TestOneof2.NestedMessage] = ..., foogroup: Optional[TestOneof2.FooGroup] = ..., foo_lazy_message: Optional[TestOneof2.NestedMessage] = ..., bar_int: Optional[int] = ..., bar_string: Optional[Text] = ..., bar_cord: Optional[Text] = ..., bar_string_piece: Optional[Text] = ..., bar_bytes: Optional[bytes] = ..., bar_enum: Optional[TestOneof2.NestedEnum] = ..., baz_int: Optional[int] = ..., baz_string: Optional[Text] = ..., ) -> None: ... class TestRequiredOneof(Message): class NestedMessage(Message): required_double: float def __init__(self, required_double: float) -> None: ... foo_int: int foo_string: Text @property def foo_message(self) -> TestRequiredOneof.NestedMessage: ... def __init__( self, foo_int: Optional[int] = ..., foo_string: Optional[Text] = ..., foo_message: Optional[TestRequiredOneof.NestedMessage] = ..., ) -> None: ... class TestPackedTypes(Message): packed_int32: RepeatedScalarFieldContainer[int] packed_int64: RepeatedScalarFieldContainer[int] packed_uint32: RepeatedScalarFieldContainer[int] packed_uint64: RepeatedScalarFieldContainer[int] packed_sint32: RepeatedScalarFieldContainer[int] packed_sint64: RepeatedScalarFieldContainer[int] packed_fixed32: RepeatedScalarFieldContainer[int] packed_fixed64: RepeatedScalarFieldContainer[int] packed_sfixed32: RepeatedScalarFieldContainer[int] packed_sfixed64: RepeatedScalarFieldContainer[int] packed_float: RepeatedScalarFieldContainer[float] packed_double: RepeatedScalarFieldContainer[float] packed_bool: RepeatedScalarFieldContainer[bool] packed_enum: RepeatedScalarFieldContainer[ForeignEnum] def __init__( self, packed_int32: Optional[Iterable[int]] = ..., packed_int64: Optional[Iterable[int]] = ..., packed_uint32: Optional[Iterable[int]] = ..., packed_uint64: Optional[Iterable[int]] = ..., packed_sint32: Optional[Iterable[int]] = ..., packed_sint64: Optional[Iterable[int]] = ..., packed_fixed32: Optional[Iterable[int]] = ..., packed_fixed64: Optional[Iterable[int]] = ..., packed_sfixed32: Optional[Iterable[int]] = ..., packed_sfixed64: Optional[Iterable[int]] = ..., packed_float: Optional[Iterable[float]] = ..., packed_double: Optional[Iterable[float]] = ..., packed_bool: Optional[Iterable[bool]] = ..., packed_enum: Optional[Iterable[ForeignEnum]] = ..., ) -> None: ... class TestUnpackedTypes(Message): unpacked_int32: RepeatedScalarFieldContainer[int] unpacked_int64: RepeatedScalarFieldContainer[int] unpacked_uint32: RepeatedScalarFieldContainer[int] unpacked_uint64: RepeatedScalarFieldContainer[int] unpacked_sint32: RepeatedScalarFieldContainer[int] unpacked_sint64: RepeatedScalarFieldContainer[int] unpacked_fixed32: RepeatedScalarFieldContainer[int] unpacked_fixed64: RepeatedScalarFieldContainer[int] unpacked_sfixed32: RepeatedScalarFieldContainer[int] unpacked_sfixed64: RepeatedScalarFieldContainer[int] unpacked_float: RepeatedScalarFieldContainer[float] unpacked_double: RepeatedScalarFieldContainer[float] unpacked_bool: RepeatedScalarFieldContainer[bool] unpacked_enum: RepeatedScalarFieldContainer[ForeignEnum] def __init__( self, unpacked_int32: Optional[Iterable[int]] = ..., unpacked_int64: Optional[Iterable[int]] = ..., unpacked_uint32: Optional[Iterable[int]] = ..., unpacked_uint64: Optional[Iterable[int]] = ..., unpacked_sint32: Optional[Iterable[int]] = ..., unpacked_sint64: Optional[Iterable[int]] = ..., unpacked_fixed32: Optional[Iterable[int]] = ..., unpacked_fixed64: Optional[Iterable[int]] = ..., unpacked_sfixed32: Optional[Iterable[int]] = ..., unpacked_sfixed64: Optional[Iterable[int]] = ..., unpacked_float: Optional[Iterable[float]] = ..., unpacked_double: Optional[Iterable[float]] = ..., unpacked_bool: Optional[Iterable[bool]] = ..., unpacked_enum: Optional[Iterable[ForeignEnum]] = ..., ) -> None: ... class TestPackedExtensions(Message): def __init__(self,) -> None: ... class TestUnpackedExtensions(Message): def __init__(self,) -> None: ... class TestDynamicExtensions(Message): class DynamicEnumType(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestDynamicExtensions.DynamicEnumType: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestDynamicExtensions.DynamicEnumType]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestDynamicExtensions.DynamicEnumType]]: ... DYNAMIC_FOO: TestDynamicExtensions.DynamicEnumType DYNAMIC_BAR: TestDynamicExtensions.DynamicEnumType DYNAMIC_BAZ: TestDynamicExtensions.DynamicEnumType class DynamicMessageType(Message): dynamic_field: int def __init__(self, dynamic_field: Optional[int] = ...) -> None: ... scalar_extension: int enum_extension: ForeignEnum dynamic_enum_extension: TestDynamicExtensions.DynamicEnumType repeated_extension: RepeatedScalarFieldContainer[Text] packed_extension: RepeatedScalarFieldContainer[int] @property def message_extension(self) -> ForeignMessage: ... @property def dynamic_message_extension(self) -> TestDynamicExtensions.DynamicMessageType: ... def __init__( self, scalar_extension: Optional[int] = ..., enum_extension: Optional[ForeignEnum] = ..., dynamic_enum_extension: Optional[TestDynamicExtensions.DynamicEnumType] = ..., message_extension: Optional[ForeignMessage] = ..., dynamic_message_extension: Optional[TestDynamicExtensions.DynamicMessageType] = ..., repeated_extension: Optional[Iterable[Text]] = ..., packed_extension: Optional[Iterable[int]] = ..., ) -> None: ... class TestRepeatedScalarDifferentTagSizes(Message): repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_int32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_uint64: RepeatedScalarFieldContainer[int] def __init__( self, repeated_fixed32: Optional[Iterable[int]] = ..., repeated_int32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., ) -> None: ... class TestParsingMerge(Message): class RepeatedFieldsGenerator(Message): class Group1(Message): @property def field1(self) -> TestAllTypes: ... def __init__(self, field1: Optional[TestAllTypes] = ...) -> None: ... class Group2(Message): @property def field1(self) -> TestAllTypes: ... def __init__(self, field1: Optional[TestAllTypes] = ...) -> None: ... @property def field1(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... @property def field2(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... @property def field3(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... @property def group1(self) -> RepeatedCompositeFieldContainer[TestParsingMerge.RepeatedFieldsGenerator.Group1]: ... @property def group2(self) -> RepeatedCompositeFieldContainer[TestParsingMerge.RepeatedFieldsGenerator.Group2]: ... @property def ext1(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... @property def ext2(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... def __init__( self, field1: Optional[Iterable[TestAllTypes]] = ..., field2: Optional[Iterable[TestAllTypes]] = ..., field3: Optional[Iterable[TestAllTypes]] = ..., group1: Optional[Iterable[TestParsingMerge.RepeatedFieldsGenerator.Group1]] = ..., group2: Optional[Iterable[TestParsingMerge.RepeatedFieldsGenerator.Group2]] = ..., ext1: Optional[Iterable[TestAllTypes]] = ..., ext2: Optional[Iterable[TestAllTypes]] = ..., ) -> None: ... class OptionalGroup(Message): @property def optional_group_all_types(self) -> TestAllTypes: ... def __init__(self, optional_group_all_types: Optional[TestAllTypes] = ...) -> None: ... class RepeatedGroup(Message): @property def repeated_group_all_types(self) -> TestAllTypes: ... def __init__(self, repeated_group_all_types: Optional[TestAllTypes] = ...) -> None: ... @property def required_all_types(self) -> TestAllTypes: ... @property def optional_all_types(self) -> TestAllTypes: ... @property def repeated_all_types(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... @property def optionalgroup(self) -> TestParsingMerge.OptionalGroup: ... @property def repeatedgroup(self) -> RepeatedCompositeFieldContainer[TestParsingMerge.RepeatedGroup]: ... def __init__( self, required_all_types: TestAllTypes, optional_all_types: Optional[TestAllTypes] = ..., repeated_all_types: Optional[Iterable[TestAllTypes]] = ..., optionalgroup: Optional[TestParsingMerge.OptionalGroup] = ..., repeatedgroup: Optional[Iterable[TestParsingMerge.RepeatedGroup]] = ..., ) -> None: ... class TestCommentInjectionMessage(Message): a: Text def __init__(self, a: Optional[Text] = ...) -> None: ... class FooRequest(Message): def __init__(self,) -> None: ... class FooResponse(Message): def __init__(self,) -> None: ... class FooClientMessage(Message): def __init__(self,) -> None: ... class FooServerMessage(Message): def __init__(self,) -> None: ... class BarRequest(Message): def __init__(self,) -> None: ... class BarResponse(Message): def __init__(self,) -> None: ... class TestJsonName(Message): field_name1: int fieldName2: int FieldName3: int _field_name4: int FIELD_NAME5: int field_name6: int def __init__( self, field_name1: Optional[int] = ..., fieldName2: Optional[int] = ..., FieldName3: Optional[int] = ..., _field_name4: Optional[int] = ..., FIELD_NAME5: Optional[int] = ..., field_name6: Optional[int] = ..., ) -> None: ... class TestHugeFieldNumbers(Message): class OptionalGroup(Message): group_a: int def __init__(self, group_a: Optional[int] = ...) -> None: ... class StringStringMapEntry(Message): key: Text value: Text def __init__(self, key: Optional[Text] = ..., value: Optional[Text] = ...) -> None: ... optional_int32: int fixed_32: int repeated_int32: RepeatedScalarFieldContainer[int] packed_int32: RepeatedScalarFieldContainer[int] optional_enum: ForeignEnum optional_string: Text optional_bytes: bytes oneof_uint32: int oneof_string: Text oneof_bytes: bytes @property def optional_message(self) -> ForeignMessage: ... @property def optionalgroup(self) -> TestHugeFieldNumbers.OptionalGroup: ... @property def string_string_map(self) -> MutableMapping[Text, Text]: ... @property def oneof_test_all_types(self) -> TestAllTypes: ... def __init__( self, optional_int32: Optional[int] = ..., fixed_32: Optional[int] = ..., repeated_int32: Optional[Iterable[int]] = ..., packed_int32: Optional[Iterable[int]] = ..., optional_enum: Optional[ForeignEnum] = ..., optional_string: Optional[Text] = ..., optional_bytes: Optional[bytes] = ..., optional_message: Optional[ForeignMessage] = ..., optionalgroup: Optional[TestHugeFieldNumbers.OptionalGroup] = ..., string_string_map: Optional[Mapping[Text, Text]] = ..., oneof_uint32: Optional[int] = ..., oneof_test_all_types: Optional[TestAllTypes] = ..., oneof_string: Optional[Text] = ..., oneof_bytes: Optional[bytes] = ..., ) -> None: ... class TestExtensionInsideTable(Message): field1: int field2: int field3: int field4: int field6: int field7: int field8: int field9: int field10: int def __init__( self, field1: Optional[int] = ..., field2: Optional[int] = ..., field3: Optional[int] = ..., field4: Optional[int] = ..., field6: Optional[int] = ..., field7: Optional[int] = ..., field8: Optional[int] = ..., field9: Optional[int] = ..., field10: Optional[int] = ..., ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/compiler/0000775000175000017500000000000013577125145027665 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/compiler/__init__.pyi0000664000175000017500000000000013577124116032132 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi0000664000175000017500000000307113577124116032447 0ustar davedave00000000000000from google.protobuf.descriptor_pb2 import FileDescriptorProto from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from typing import Iterable, Optional, Text class Version(Message): major: int minor: int patch: int suffix: Text def __init__( self, major: Optional[int] = ..., minor: Optional[int] = ..., patch: Optional[int] = ..., suffix: Optional[Text] = ... ) -> None: ... class CodeGeneratorRequest(Message): file_to_generate: RepeatedScalarFieldContainer[Text] parameter: Text @property def proto_file(self) -> RepeatedCompositeFieldContainer[FileDescriptorProto]: ... @property def compiler_version(self) -> Version: ... def __init__( self, file_to_generate: Optional[Iterable[Text]] = ..., parameter: Optional[Text] = ..., proto_file: Optional[Iterable[FileDescriptorProto]] = ..., compiler_version: Optional[Version] = ..., ) -> None: ... class CodeGeneratorResponse(Message): class File(Message): name: Text insertion_point: Text content: Text def __init__( self, name: Optional[Text] = ..., insertion_point: Optional[Text] = ..., content: Optional[Text] = ... ) -> None: ... error: Text @property def file(self) -> RepeatedCompositeFieldContainer[CodeGeneratorResponse.File]: ... def __init__(self, error: Optional[Text] = ..., file: Optional[Iterable[CodeGeneratorResponse.File]] = ...) -> None: ... ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_generic_services_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_generic_services0000664000175000017500000000104013577124116033740 0ustar davedave00000000000000from google.protobuf.message import Message from typing import List, Optional, Tuple, cast class TestEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestEnum]]: ... FOO: TestEnum class TestMessage(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/struct_pb2.pyi0000664000175000017500000000343413577124116030666 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer from google.protobuf.internal import well_known_types from google.protobuf.message import Message from typing import Iterable, List, Mapping, MutableMapping, Optional, Text, Tuple, cast class NullValue(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> NullValue: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[NullValue]: ... @classmethod def items(cls) -> List[Tuple[bytes, NullValue]]: ... NULL_VALUE: NullValue class Struct(Message, well_known_types.Struct): class FieldsEntry(Message): key: Text @property def value(self) -> Value: ... def __init__(self, key: Optional[Text] = ..., value: Optional[Value] = ...) -> None: ... @property def fields(self) -> MutableMapping[Text, Value]: ... def __init__(self, fields: Optional[Mapping[Text, Value]] = ...) -> None: ... class _Value(Message): null_value: NullValue number_value: float string_value: Text bool_value: bool @property def struct_value(self) -> Struct: ... @property def list_value(self) -> ListValue: ... def __init__( self, null_value: Optional[NullValue] = ..., number_value: Optional[float] = ..., string_value: Optional[Text] = ..., bool_value: Optional[bool] = ..., struct_value: Optional[Struct] = ..., list_value: Optional[ListValue] = ..., ) -> None: ... Value = _Value class ListValue(Message, well_known_types.ListValue): @property def values(self) -> RepeatedCompositeFieldContainer[Value]: ... def __init__(self, values: Optional[Iterable[Value]] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/any_pb2.pyi0000664000175000017500000000046713577124116030134 0ustar davedave00000000000000from google.protobuf.message import Message from google.protobuf.internal import well_known_types from typing import Optional, Text class Any(Message, well_known_types.Any_): type_url: Text value: bytes def __init__(self, type_url: Optional[Text] = ..., value: Optional[bytes] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/timestamp_pb2.pyi0000664000175000017500000000046413577124116031345 0ustar davedave00000000000000from google.protobuf.message import Message from google.protobuf.internal import well_known_types from typing import Optional class Timestamp(Message, well_known_types.Timestamp): seconds: int nanos: int def __init__(self, seconds: Optional[int] = ..., nanos: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/test_messages_proto3_pb2.pyi0000664000175000017500000004567013577124116033526 0ustar davedave00000000000000from google.protobuf.any_pb2 import Any from google.protobuf.duration_pb2 import Duration from google.protobuf.field_mask_pb2 import FieldMask from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from google.protobuf.struct_pb2 import Struct, Value from google.protobuf.timestamp_pb2 import Timestamp from google.protobuf.wrappers_pb2 import ( BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, StringValue, UInt32Value, UInt64Value, ) from typing import Iterable, List, Mapping, MutableMapping, Optional, Text, Tuple, cast class ForeignEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ForeignEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ForeignEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, ForeignEnum]]: ... FOREIGN_FOO: ForeignEnum FOREIGN_BAR: ForeignEnum FOREIGN_BAZ: ForeignEnum class TestAllTypesProto3(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestAllTypesProto3.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestAllTypesProto3.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestAllTypesProto3.NestedEnum]]: ... FOO: TestAllTypesProto3.NestedEnum BAR: TestAllTypesProto3.NestedEnum BAZ: TestAllTypesProto3.NestedEnum NEG: TestAllTypesProto3.NestedEnum class NestedMessage(Message): a: int @property def corecursive(self) -> TestAllTypesProto3: ... def __init__(self, a: Optional[int] = ..., corecursive: Optional[TestAllTypesProto3] = ...) -> None: ... class MapInt32Int32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt64Int64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint32Uint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint64Uint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint32Sint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint64Sint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed32Fixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed64Fixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed32Sfixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed64Sfixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt32FloatEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapInt32DoubleEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapBoolBoolEntry(Message): key: bool value: bool def __init__(self, key: Optional[bool] = ..., value: Optional[bool] = ...) -> None: ... class MapStringStringEntry(Message): key: Text value: Text def __init__(self, key: Optional[Text] = ..., value: Optional[Text] = ...) -> None: ... class MapStringBytesEntry(Message): key: Text value: bytes def __init__(self, key: Optional[Text] = ..., value: Optional[bytes] = ...) -> None: ... class MapStringNestedMessageEntry(Message): key: Text @property def value(self) -> TestAllTypesProto3.NestedMessage: ... def __init__(self, key: Optional[Text] = ..., value: Optional[TestAllTypesProto3.NestedMessage] = ...) -> None: ... class MapStringForeignMessageEntry(Message): key: Text @property def value(self) -> ForeignMessage: ... def __init__(self, key: Optional[Text] = ..., value: Optional[ForeignMessage] = ...) -> None: ... class MapStringNestedEnumEntry(Message): key: Text value: TestAllTypesProto3.NestedEnum def __init__(self, key: Optional[Text] = ..., value: Optional[TestAllTypesProto3.NestedEnum] = ...) -> None: ... class MapStringForeignEnumEntry(Message): key: Text value: ForeignEnum def __init__(self, key: Optional[Text] = ..., value: Optional[ForeignEnum] = ...) -> None: ... optional_int32: int optional_int64: int optional_uint32: int optional_uint64: int optional_sint32: int optional_sint64: int optional_fixed32: int optional_fixed64: int optional_sfixed32: int optional_sfixed64: int optional_float: float optional_double: float optional_bool: bool optional_string: Text optional_bytes: bytes optional_nested_enum: TestAllTypesProto3.NestedEnum optional_foreign_enum: ForeignEnum optional_string_piece: Text optional_cord: Text repeated_int32: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_uint32: RepeatedScalarFieldContainer[int] repeated_uint64: RepeatedScalarFieldContainer[int] repeated_sint32: RepeatedScalarFieldContainer[int] repeated_sint64: RepeatedScalarFieldContainer[int] repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_sfixed32: RepeatedScalarFieldContainer[int] repeated_sfixed64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_double: RepeatedScalarFieldContainer[float] repeated_bool: RepeatedScalarFieldContainer[bool] repeated_string: RepeatedScalarFieldContainer[Text] repeated_bytes: RepeatedScalarFieldContainer[bytes] repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypesProto3.NestedEnum] repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] repeated_string_piece: RepeatedScalarFieldContainer[Text] repeated_cord: RepeatedScalarFieldContainer[Text] oneof_uint32: int oneof_string: Text oneof_bytes: bytes oneof_bool: bool oneof_uint64: int oneof_float: float oneof_double: float oneof_enum: TestAllTypesProto3.NestedEnum fieldname1: int field_name2: int _field_name3: int field__name4_: int field0name5: int field_0_name6: int fieldName7: int FieldName8: int field_Name9: int Field_Name10: int FIELD_NAME11: int FIELD_name12: int __field_name13: int __Field_name14: int field__name15: int field__Name16: int field_name17__: int Field_name18__: int @property def optional_nested_message(self) -> TestAllTypesProto3.NestedMessage: ... @property def optional_foreign_message(self) -> ForeignMessage: ... @property def recursive_message(self) -> TestAllTypesProto3: ... @property def repeated_nested_message(self) -> RepeatedCompositeFieldContainer[TestAllTypesProto3.NestedMessage]: ... @property def repeated_foreign_message(self) -> RepeatedCompositeFieldContainer[ForeignMessage]: ... @property def map_int32_int32(self) -> MutableMapping[int, int]: ... @property def map_int64_int64(self) -> MutableMapping[int, int]: ... @property def map_uint32_uint32(self) -> MutableMapping[int, int]: ... @property def map_uint64_uint64(self) -> MutableMapping[int, int]: ... @property def map_sint32_sint32(self) -> MutableMapping[int, int]: ... @property def map_sint64_sint64(self) -> MutableMapping[int, int]: ... @property def map_fixed32_fixed32(self) -> MutableMapping[int, int]: ... @property def map_fixed64_fixed64(self) -> MutableMapping[int, int]: ... @property def map_sfixed32_sfixed32(self) -> MutableMapping[int, int]: ... @property def map_sfixed64_sfixed64(self) -> MutableMapping[int, int]: ... @property def map_int32_float(self) -> MutableMapping[int, float]: ... @property def map_int32_double(self) -> MutableMapping[int, float]: ... @property def map_bool_bool(self) -> MutableMapping[bool, bool]: ... @property def map_string_string(self) -> MutableMapping[Text, Text]: ... @property def map_string_bytes(self) -> MutableMapping[Text, bytes]: ... @property def map_string_nested_message(self) -> MutableMapping[Text, TestAllTypesProto3.NestedMessage]: ... @property def map_string_foreign_message(self) -> MutableMapping[Text, ForeignMessage]: ... @property def map_string_nested_enum(self) -> MutableMapping[Text, TestAllTypesProto3.NestedEnum]: ... @property def map_string_foreign_enum(self) -> MutableMapping[Text, ForeignEnum]: ... @property def oneof_nested_message(self) -> TestAllTypesProto3.NestedMessage: ... @property def optional_bool_wrapper(self) -> BoolValue: ... @property def optional_int32_wrapper(self) -> Int32Value: ... @property def optional_int64_wrapper(self) -> Int64Value: ... @property def optional_uint32_wrapper(self) -> UInt32Value: ... @property def optional_uint64_wrapper(self) -> UInt64Value: ... @property def optional_float_wrapper(self) -> FloatValue: ... @property def optional_double_wrapper(self) -> DoubleValue: ... @property def optional_string_wrapper(self) -> StringValue: ... @property def optional_bytes_wrapper(self) -> BytesValue: ... @property def repeated_bool_wrapper(self) -> RepeatedCompositeFieldContainer[BoolValue]: ... @property def repeated_int32_wrapper(self) -> RepeatedCompositeFieldContainer[Int32Value]: ... @property def repeated_int64_wrapper(self) -> RepeatedCompositeFieldContainer[Int64Value]: ... @property def repeated_uint32_wrapper(self) -> RepeatedCompositeFieldContainer[UInt32Value]: ... @property def repeated_uint64_wrapper(self) -> RepeatedCompositeFieldContainer[UInt64Value]: ... @property def repeated_float_wrapper(self) -> RepeatedCompositeFieldContainer[FloatValue]: ... @property def repeated_double_wrapper(self) -> RepeatedCompositeFieldContainer[DoubleValue]: ... @property def repeated_string_wrapper(self) -> RepeatedCompositeFieldContainer[StringValue]: ... @property def repeated_bytes_wrapper(self) -> RepeatedCompositeFieldContainer[BytesValue]: ... @property def optional_duration(self) -> Duration: ... @property def optional_timestamp(self) -> Timestamp: ... @property def optional_field_mask(self) -> FieldMask: ... @property def optional_struct(self) -> Struct: ... @property def optional_any(self) -> Any: ... @property def optional_value(self) -> Value: ... @property def repeated_duration(self) -> RepeatedCompositeFieldContainer[Duration]: ... @property def repeated_timestamp(self) -> RepeatedCompositeFieldContainer[Timestamp]: ... @property def repeated_fieldmask(self) -> RepeatedCompositeFieldContainer[FieldMask]: ... @property def repeated_struct(self) -> RepeatedCompositeFieldContainer[Struct]: ... @property def repeated_any(self) -> RepeatedCompositeFieldContainer[Any]: ... @property def repeated_value(self) -> RepeatedCompositeFieldContainer[Value]: ... def __init__( self, optional_int32: Optional[int] = ..., optional_int64: Optional[int] = ..., optional_uint32: Optional[int] = ..., optional_uint64: Optional[int] = ..., optional_sint32: Optional[int] = ..., optional_sint64: Optional[int] = ..., optional_fixed32: Optional[int] = ..., optional_fixed64: Optional[int] = ..., optional_sfixed32: Optional[int] = ..., optional_sfixed64: Optional[int] = ..., optional_float: Optional[float] = ..., optional_double: Optional[float] = ..., optional_bool: Optional[bool] = ..., optional_string: Optional[Text] = ..., optional_bytes: Optional[bytes] = ..., optional_nested_message: Optional[TestAllTypesProto3.NestedMessage] = ..., optional_foreign_message: Optional[ForeignMessage] = ..., optional_nested_enum: Optional[TestAllTypesProto3.NestedEnum] = ..., optional_foreign_enum: Optional[ForeignEnum] = ..., optional_string_piece: Optional[Text] = ..., optional_cord: Optional[Text] = ..., recursive_message: Optional[TestAllTypesProto3] = ..., repeated_int32: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_uint32: Optional[Iterable[int]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., repeated_sint32: Optional[Iterable[int]] = ..., repeated_sint64: Optional[Iterable[int]] = ..., repeated_fixed32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_sfixed32: Optional[Iterable[int]] = ..., repeated_sfixed64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_double: Optional[Iterable[float]] = ..., repeated_bool: Optional[Iterable[bool]] = ..., repeated_string: Optional[Iterable[Text]] = ..., repeated_bytes: Optional[Iterable[bytes]] = ..., repeated_nested_message: Optional[Iterable[TestAllTypesProto3.NestedMessage]] = ..., repeated_foreign_message: Optional[Iterable[ForeignMessage]] = ..., repeated_nested_enum: Optional[Iterable[TestAllTypesProto3.NestedEnum]] = ..., repeated_foreign_enum: Optional[Iterable[ForeignEnum]] = ..., repeated_string_piece: Optional[Iterable[Text]] = ..., repeated_cord: Optional[Iterable[Text]] = ..., map_int32_int32: Optional[Mapping[int, int]] = ..., map_int64_int64: Optional[Mapping[int, int]] = ..., map_uint32_uint32: Optional[Mapping[int, int]] = ..., map_uint64_uint64: Optional[Mapping[int, int]] = ..., map_sint32_sint32: Optional[Mapping[int, int]] = ..., map_sint64_sint64: Optional[Mapping[int, int]] = ..., map_fixed32_fixed32: Optional[Mapping[int, int]] = ..., map_fixed64_fixed64: Optional[Mapping[int, int]] = ..., map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ..., map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ..., map_int32_float: Optional[Mapping[int, float]] = ..., map_int32_double: Optional[Mapping[int, float]] = ..., map_bool_bool: Optional[Mapping[bool, bool]] = ..., map_string_string: Optional[Mapping[Text, Text]] = ..., map_string_bytes: Optional[Mapping[Text, bytes]] = ..., map_string_nested_message: Optional[Mapping[Text, TestAllTypesProto3.NestedMessage]] = ..., map_string_foreign_message: Optional[Mapping[Text, ForeignMessage]] = ..., map_string_nested_enum: Optional[Mapping[Text, TestAllTypesProto3.NestedEnum]] = ..., map_string_foreign_enum: Optional[Mapping[Text, ForeignEnum]] = ..., oneof_uint32: Optional[int] = ..., oneof_nested_message: Optional[TestAllTypesProto3.NestedMessage] = ..., oneof_string: Optional[Text] = ..., oneof_bytes: Optional[bytes] = ..., oneof_bool: Optional[bool] = ..., oneof_uint64: Optional[int] = ..., oneof_float: Optional[float] = ..., oneof_double: Optional[float] = ..., oneof_enum: Optional[TestAllTypesProto3.NestedEnum] = ..., optional_bool_wrapper: Optional[BoolValue] = ..., optional_int32_wrapper: Optional[Int32Value] = ..., optional_int64_wrapper: Optional[Int64Value] = ..., optional_uint32_wrapper: Optional[UInt32Value] = ..., optional_uint64_wrapper: Optional[UInt64Value] = ..., optional_float_wrapper: Optional[FloatValue] = ..., optional_double_wrapper: Optional[DoubleValue] = ..., optional_string_wrapper: Optional[StringValue] = ..., optional_bytes_wrapper: Optional[BytesValue] = ..., repeated_bool_wrapper: Optional[Iterable[BoolValue]] = ..., repeated_int32_wrapper: Optional[Iterable[Int32Value]] = ..., repeated_int64_wrapper: Optional[Iterable[Int64Value]] = ..., repeated_uint32_wrapper: Optional[Iterable[UInt32Value]] = ..., repeated_uint64_wrapper: Optional[Iterable[UInt64Value]] = ..., repeated_float_wrapper: Optional[Iterable[FloatValue]] = ..., repeated_double_wrapper: Optional[Iterable[DoubleValue]] = ..., repeated_string_wrapper: Optional[Iterable[StringValue]] = ..., repeated_bytes_wrapper: Optional[Iterable[BytesValue]] = ..., optional_duration: Optional[Duration] = ..., optional_timestamp: Optional[Timestamp] = ..., optional_field_mask: Optional[FieldMask] = ..., optional_struct: Optional[Struct] = ..., optional_any: Optional[Any] = ..., optional_value: Optional[Value] = ..., repeated_duration: Optional[Iterable[Duration]] = ..., repeated_timestamp: Optional[Iterable[Timestamp]] = ..., repeated_fieldmask: Optional[Iterable[FieldMask]] = ..., repeated_struct: Optional[Iterable[Struct]] = ..., repeated_any: Optional[Iterable[Any]] = ..., repeated_value: Optional[Iterable[Value]] = ..., fieldname1: Optional[int] = ..., field_name2: Optional[int] = ..., _field_name3: Optional[int] = ..., field__name4_: Optional[int] = ..., field0name5: Optional[int] = ..., field_0_name6: Optional[int] = ..., fieldName7: Optional[int] = ..., FieldName8: Optional[int] = ..., field_Name9: Optional[int] = ..., Field_Name10: Optional[int] = ..., FIELD_NAME11: Optional[int] = ..., FIELD_name12: Optional[int] = ..., __field_name13: Optional[int] = ..., __Field_name14: Optional[int] = ..., field__name15: Optional[int] = ..., field__Name16: Optional[int] = ..., field_name17__: Optional[int] = ..., Field_name18__: Optional[int] = ..., ) -> None: ... class ForeignMessage(Message): c: int def __init__(self, c: Optional[int] = ...) -> None: ... ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.py0000664000175000017500000002601113577124116033520 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from google.protobuf.unittest_import_pb2 import ImportMessage from google.protobuf.unittest_import_public_pb2 import PublicImportMessage from typing import Iterable, List, Optional, Text, Tuple, cast class ForeignEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ForeignEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ForeignEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, ForeignEnum]]: ... FOREIGN_ZERO: ForeignEnum FOREIGN_FOO: ForeignEnum FOREIGN_BAR: ForeignEnum FOREIGN_BAZ: ForeignEnum class TestAllTypes(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestAllTypes.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestAllTypes.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestAllTypes.NestedEnum]]: ... ZERO: TestAllTypes.NestedEnum FOO: TestAllTypes.NestedEnum BAR: TestAllTypes.NestedEnum BAZ: TestAllTypes.NestedEnum NEG: TestAllTypes.NestedEnum class NestedMessage(Message): bb: int def __init__(self, bb: Optional[int] = ...) -> None: ... optional_int32: int optional_int64: int optional_uint32: int optional_uint64: int optional_sint32: int optional_sint64: int optional_fixed32: int optional_fixed64: int optional_sfixed32: int optional_sfixed64: int optional_float: float optional_double: float optional_bool: bool optional_string: Text optional_bytes: bytes optional_nested_enum: TestAllTypes.NestedEnum optional_foreign_enum: ForeignEnum optional_string_piece: Text optional_cord: Text repeated_int32: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_uint32: RepeatedScalarFieldContainer[int] repeated_uint64: RepeatedScalarFieldContainer[int] repeated_sint32: RepeatedScalarFieldContainer[int] repeated_sint64: RepeatedScalarFieldContainer[int] repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_sfixed32: RepeatedScalarFieldContainer[int] repeated_sfixed64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_double: RepeatedScalarFieldContainer[float] repeated_bool: RepeatedScalarFieldContainer[bool] repeated_string: RepeatedScalarFieldContainer[Text] repeated_bytes: RepeatedScalarFieldContainer[bytes] repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] repeated_string_piece: RepeatedScalarFieldContainer[Text] repeated_cord: RepeatedScalarFieldContainer[Text] oneof_uint32: int oneof_string: Text oneof_bytes: bytes @property def optional_nested_message(self) -> TestAllTypes.NestedMessage: ... @property def optional_foreign_message(self) -> ForeignMessage: ... @property def optional_import_message(self) -> ImportMessage: ... @property def optional_public_import_message(self) -> PublicImportMessage: ... @property def optional_lazy_message(self) -> TestAllTypes.NestedMessage: ... @property def optional_lazy_import_message(self) -> ImportMessage: ... @property def repeated_nested_message(self) -> RepeatedCompositeFieldContainer[TestAllTypes.NestedMessage]: ... @property def repeated_foreign_message(self) -> RepeatedCompositeFieldContainer[ForeignMessage]: ... @property def repeated_import_message(self) -> RepeatedCompositeFieldContainer[ImportMessage]: ... @property def repeated_lazy_message(self) -> RepeatedCompositeFieldContainer[TestAllTypes.NestedMessage]: ... @property def oneof_nested_message(self) -> TestAllTypes.NestedMessage: ... def __init__( self, optional_int32: Optional[int] = ..., optional_int64: Optional[int] = ..., optional_uint32: Optional[int] = ..., optional_uint64: Optional[int] = ..., optional_sint32: Optional[int] = ..., optional_sint64: Optional[int] = ..., optional_fixed32: Optional[int] = ..., optional_fixed64: Optional[int] = ..., optional_sfixed32: Optional[int] = ..., optional_sfixed64: Optional[int] = ..., optional_float: Optional[float] = ..., optional_double: Optional[float] = ..., optional_bool: Optional[bool] = ..., optional_string: Optional[Text] = ..., optional_bytes: Optional[bytes] = ..., optional_nested_message: Optional[TestAllTypes.NestedMessage] = ..., optional_foreign_message: Optional[ForeignMessage] = ..., optional_import_message: Optional[ImportMessage] = ..., optional_nested_enum: Optional[TestAllTypes.NestedEnum] = ..., optional_foreign_enum: Optional[ForeignEnum] = ..., optional_string_piece: Optional[Text] = ..., optional_cord: Optional[Text] = ..., optional_public_import_message: Optional[PublicImportMessage] = ..., optional_lazy_message: Optional[TestAllTypes.NestedMessage] = ..., optional_lazy_import_message: Optional[ImportMessage] = ..., repeated_int32: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_uint32: Optional[Iterable[int]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., repeated_sint32: Optional[Iterable[int]] = ..., repeated_sint64: Optional[Iterable[int]] = ..., repeated_fixed32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_sfixed32: Optional[Iterable[int]] = ..., repeated_sfixed64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_double: Optional[Iterable[float]] = ..., repeated_bool: Optional[Iterable[bool]] = ..., repeated_string: Optional[Iterable[Text]] = ..., repeated_bytes: Optional[Iterable[bytes]] = ..., repeated_nested_message: Optional[Iterable[TestAllTypes.NestedMessage]] = ..., repeated_foreign_message: Optional[Iterable[ForeignMessage]] = ..., repeated_import_message: Optional[Iterable[ImportMessage]] = ..., repeated_nested_enum: Optional[Iterable[TestAllTypes.NestedEnum]] = ..., repeated_foreign_enum: Optional[Iterable[ForeignEnum]] = ..., repeated_string_piece: Optional[Iterable[Text]] = ..., repeated_cord: Optional[Iterable[Text]] = ..., repeated_lazy_message: Optional[Iterable[TestAllTypes.NestedMessage]] = ..., oneof_uint32: Optional[int] = ..., oneof_nested_message: Optional[TestAllTypes.NestedMessage] = ..., oneof_string: Optional[Text] = ..., oneof_bytes: Optional[bytes] = ..., ) -> None: ... class TestPackedTypes(Message): packed_int32: RepeatedScalarFieldContainer[int] packed_int64: RepeatedScalarFieldContainer[int] packed_uint32: RepeatedScalarFieldContainer[int] packed_uint64: RepeatedScalarFieldContainer[int] packed_sint32: RepeatedScalarFieldContainer[int] packed_sint64: RepeatedScalarFieldContainer[int] packed_fixed32: RepeatedScalarFieldContainer[int] packed_fixed64: RepeatedScalarFieldContainer[int] packed_sfixed32: RepeatedScalarFieldContainer[int] packed_sfixed64: RepeatedScalarFieldContainer[int] packed_float: RepeatedScalarFieldContainer[float] packed_double: RepeatedScalarFieldContainer[float] packed_bool: RepeatedScalarFieldContainer[bool] packed_enum: RepeatedScalarFieldContainer[ForeignEnum] def __init__( self, packed_int32: Optional[Iterable[int]] = ..., packed_int64: Optional[Iterable[int]] = ..., packed_uint32: Optional[Iterable[int]] = ..., packed_uint64: Optional[Iterable[int]] = ..., packed_sint32: Optional[Iterable[int]] = ..., packed_sint64: Optional[Iterable[int]] = ..., packed_fixed32: Optional[Iterable[int]] = ..., packed_fixed64: Optional[Iterable[int]] = ..., packed_sfixed32: Optional[Iterable[int]] = ..., packed_sfixed64: Optional[Iterable[int]] = ..., packed_float: Optional[Iterable[float]] = ..., packed_double: Optional[Iterable[float]] = ..., packed_bool: Optional[Iterable[bool]] = ..., packed_enum: Optional[Iterable[ForeignEnum]] = ..., ) -> None: ... class TestUnpackedTypes(Message): repeated_int32: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_uint32: RepeatedScalarFieldContainer[int] repeated_uint64: RepeatedScalarFieldContainer[int] repeated_sint32: RepeatedScalarFieldContainer[int] repeated_sint64: RepeatedScalarFieldContainer[int] repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_sfixed32: RepeatedScalarFieldContainer[int] repeated_sfixed64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_double: RepeatedScalarFieldContainer[float] repeated_bool: RepeatedScalarFieldContainer[bool] repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] def __init__( self, repeated_int32: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_uint32: Optional[Iterable[int]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., repeated_sint32: Optional[Iterable[int]] = ..., repeated_sint64: Optional[Iterable[int]] = ..., repeated_fixed32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_sfixed32: Optional[Iterable[int]] = ..., repeated_sfixed64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_double: Optional[Iterable[float]] = ..., repeated_bool: Optional[Iterable[bool]] = ..., repeated_nested_enum: Optional[Iterable[TestAllTypes.NestedEnum]] = ..., ) -> None: ... class NestedTestAllTypes(Message): @property def child(self) -> NestedTestAllTypes: ... @property def payload(self) -> TestAllTypes: ... @property def repeated_child(self) -> RepeatedCompositeFieldContainer[NestedTestAllTypes]: ... def __init__( self, child: Optional[NestedTestAllTypes] = ..., payload: Optional[TestAllTypes] = ..., repeated_child: Optional[Iterable[NestedTestAllTypes]] = ..., ) -> None: ... class ForeignMessage(Message): c: int def __init__(self, c: Optional[int] = ...) -> None: ... class TestEmptyMessage(Message): def __init__(self,) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_arena_pb2.pyi0000664000175000017500000002327513577124116033070 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from google.protobuf.unittest_arena_pb2 import ArenaMessage from google.protobuf.unittest_import_pb2 import ImportEnum, ImportMessage from google.protobuf.unittest_import_public_pb2 import PublicImportMessage from typing import Iterable, List, Optional, Text, Tuple, cast class ForeignEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ForeignEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ForeignEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, ForeignEnum]]: ... FOREIGN_FOO: ForeignEnum FOREIGN_BAR: ForeignEnum FOREIGN_BAZ: ForeignEnum class TestAllTypes(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestAllTypes.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestAllTypes.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestAllTypes.NestedEnum]]: ... FOO: TestAllTypes.NestedEnum BAR: TestAllTypes.NestedEnum BAZ: TestAllTypes.NestedEnum NEG: TestAllTypes.NestedEnum class NestedMessage(Message): bb: int def __init__(self, bb: Optional[int] = ...) -> None: ... class OptionalGroup(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... class RepeatedGroup(Message): a: int def __init__(self, a: Optional[int] = ...) -> None: ... optional_int32: int optional_int64: int optional_uint32: int optional_uint64: int optional_sint32: int optional_sint64: int optional_fixed32: int optional_fixed64: int optional_sfixed32: int optional_sfixed64: int optional_float: float optional_double: float optional_bool: bool optional_string: Text optional_bytes: bytes optional_nested_enum: TestAllTypes.NestedEnum optional_foreign_enum: ForeignEnum optional_import_enum: ImportEnum optional_string_piece: Text optional_cord: Text repeated_int32: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_uint32: RepeatedScalarFieldContainer[int] repeated_uint64: RepeatedScalarFieldContainer[int] repeated_sint32: RepeatedScalarFieldContainer[int] repeated_sint64: RepeatedScalarFieldContainer[int] repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_sfixed32: RepeatedScalarFieldContainer[int] repeated_sfixed64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_double: RepeatedScalarFieldContainer[float] repeated_bool: RepeatedScalarFieldContainer[bool] repeated_string: RepeatedScalarFieldContainer[Text] repeated_bytes: RepeatedScalarFieldContainer[bytes] repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] repeated_import_enum: RepeatedScalarFieldContainer[ImportEnum] repeated_string_piece: RepeatedScalarFieldContainer[Text] repeated_cord: RepeatedScalarFieldContainer[Text] default_int32: int default_int64: int default_uint32: int default_uint64: int default_sint32: int default_sint64: int default_fixed32: int default_fixed64: int default_sfixed32: int default_sfixed64: int default_float: float default_double: float default_bool: bool default_string: Text default_bytes: bytes default_nested_enum: TestAllTypes.NestedEnum default_foreign_enum: ForeignEnum default_import_enum: ImportEnum default_string_piece: Text default_cord: Text oneof_uint32: int oneof_string: Text oneof_bytes: bytes @property def optionalgroup(self) -> TestAllTypes.OptionalGroup: ... @property def optional_nested_message(self) -> TestAllTypes.NestedMessage: ... @property def optional_foreign_message(self) -> ForeignMessage: ... @property def optional_import_message(self) -> ImportMessage: ... @property def optional_public_import_message(self) -> PublicImportMessage: ... @property def optional_message(self) -> TestAllTypes.NestedMessage: ... @property def repeatedgroup(self) -> RepeatedCompositeFieldContainer[TestAllTypes.RepeatedGroup]: ... @property def repeated_nested_message(self) -> RepeatedCompositeFieldContainer[TestAllTypes.NestedMessage]: ... @property def repeated_foreign_message(self) -> RepeatedCompositeFieldContainer[ForeignMessage]: ... @property def repeated_import_message(self) -> RepeatedCompositeFieldContainer[ImportMessage]: ... @property def repeated_lazy_message(self) -> RepeatedCompositeFieldContainer[TestAllTypes.NestedMessage]: ... @property def oneof_nested_message(self) -> TestAllTypes.NestedMessage: ... @property def lazy_oneof_nested_message(self) -> TestAllTypes.NestedMessage: ... def __init__( self, optional_int32: Optional[int] = ..., optional_int64: Optional[int] = ..., optional_uint32: Optional[int] = ..., optional_uint64: Optional[int] = ..., optional_sint32: Optional[int] = ..., optional_sint64: Optional[int] = ..., optional_fixed32: Optional[int] = ..., optional_fixed64: Optional[int] = ..., optional_sfixed32: Optional[int] = ..., optional_sfixed64: Optional[int] = ..., optional_float: Optional[float] = ..., optional_double: Optional[float] = ..., optional_bool: Optional[bool] = ..., optional_string: Optional[Text] = ..., optional_bytes: Optional[bytes] = ..., optionalgroup: Optional[TestAllTypes.OptionalGroup] = ..., optional_nested_message: Optional[TestAllTypes.NestedMessage] = ..., optional_foreign_message: Optional[ForeignMessage] = ..., optional_import_message: Optional[ImportMessage] = ..., optional_nested_enum: Optional[TestAllTypes.NestedEnum] = ..., optional_foreign_enum: Optional[ForeignEnum] = ..., optional_import_enum: Optional[ImportEnum] = ..., optional_string_piece: Optional[Text] = ..., optional_cord: Optional[Text] = ..., optional_public_import_message: Optional[PublicImportMessage] = ..., optional_message: Optional[TestAllTypes.NestedMessage] = ..., repeated_int32: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_uint32: Optional[Iterable[int]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., repeated_sint32: Optional[Iterable[int]] = ..., repeated_sint64: Optional[Iterable[int]] = ..., repeated_fixed32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_sfixed32: Optional[Iterable[int]] = ..., repeated_sfixed64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_double: Optional[Iterable[float]] = ..., repeated_bool: Optional[Iterable[bool]] = ..., repeated_string: Optional[Iterable[Text]] = ..., repeated_bytes: Optional[Iterable[bytes]] = ..., repeatedgroup: Optional[Iterable[TestAllTypes.RepeatedGroup]] = ..., repeated_nested_message: Optional[Iterable[TestAllTypes.NestedMessage]] = ..., repeated_foreign_message: Optional[Iterable[ForeignMessage]] = ..., repeated_import_message: Optional[Iterable[ImportMessage]] = ..., repeated_nested_enum: Optional[Iterable[TestAllTypes.NestedEnum]] = ..., repeated_foreign_enum: Optional[Iterable[ForeignEnum]] = ..., repeated_import_enum: Optional[Iterable[ImportEnum]] = ..., repeated_string_piece: Optional[Iterable[Text]] = ..., repeated_cord: Optional[Iterable[Text]] = ..., repeated_lazy_message: Optional[Iterable[TestAllTypes.NestedMessage]] = ..., default_int32: Optional[int] = ..., default_int64: Optional[int] = ..., default_uint32: Optional[int] = ..., default_uint64: Optional[int] = ..., default_sint32: Optional[int] = ..., default_sint64: Optional[int] = ..., default_fixed32: Optional[int] = ..., default_fixed64: Optional[int] = ..., default_sfixed32: Optional[int] = ..., default_sfixed64: Optional[int] = ..., default_float: Optional[float] = ..., default_double: Optional[float] = ..., default_bool: Optional[bool] = ..., default_string: Optional[Text] = ..., default_bytes: Optional[bytes] = ..., default_nested_enum: Optional[TestAllTypes.NestedEnum] = ..., default_foreign_enum: Optional[ForeignEnum] = ..., default_import_enum: Optional[ImportEnum] = ..., default_string_piece: Optional[Text] = ..., default_cord: Optional[Text] = ..., oneof_uint32: Optional[int] = ..., oneof_nested_message: Optional[TestAllTypes.NestedMessage] = ..., oneof_string: Optional[Text] = ..., oneof_bytes: Optional[bytes] = ..., lazy_oneof_nested_message: Optional[TestAllTypes.NestedMessage] = ..., ) -> None: ... class ForeignMessage(Message): c: int def __init__(self, c: Optional[int] = ...) -> None: ... class TestNoArenaMessage(Message): @property def arena_message(self) -> ArenaMessage: ... def __init__(self, arena_message: Optional[ArenaMessage] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/message_factory.pyi0000664000175000017500000000100313577124116031740 0ustar davedave00000000000000from typing import Any, Dict, Iterable, Optional, Type from .message import Message from .descriptor import Descriptor from .descriptor_pool import DescriptorPool class MessageFactory: pool: Any def __init__(self, pool: Optional[DescriptorPool] = ...) -> None: ... def GetPrototype(self, descriptor: Descriptor) -> Type[Message]: ... def GetMessages(self, files: Iterable[bytes]) -> Dict[bytes, Type[Message]]: ... def GetMessages(file_protos: Iterable[bytes]) -> Dict[bytes, Type[Message]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/service.pyi0000664000175000017500000000253313577124116030236 0ustar davedave00000000000000from concurrent.futures import Future from typing import Callable, Optional, Text, Type from google.protobuf.descriptor import MethodDescriptor, ServiceDescriptor from google.protobuf.message import Message class RpcException(Exception): ... class Service: @staticmethod def GetDescriptor() -> ServiceDescriptor: ... def CallMethod( self, method_descriptor: MethodDescriptor, rpc_controller: RpcController, request: Message, done: Optional[Callable[[Message], None]], ) -> Optional[Future[Message]]: ... def GetRequestClass(self, method_descriptor: MethodDescriptor) -> Type[Message]: ... def GetResponseClass(self, method_descriptor: MethodDescriptor) -> Type[Message]: ... class RpcController: def Reset(self) -> None: ... def Failed(self) -> bool: ... def ErrorText(self) -> Optional[Text]: ... def StartCancel(self) -> None: ... def SetFailed(self, reason: Text) -> None: ... def IsCanceled(self) -> bool: ... def NotifyOnCancel(self, callback: Callable[[], None]) -> None: ... class RpcChannel: def CallMethod( self, method_descriptor: MethodDescriptor, rpc_controller: RpcController, request: Message, response_class: Type[Message], done: Optional[Callable[[Message], None]], ) -> Optional[Future[Message]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/test_messages_proto2_pb2.pyi0000664000175000017500000003606513577124116033523 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message import builtins from typing import Iterable, List, Mapping, MutableMapping, Optional, Text, Tuple, cast class ForeignEnumProto2(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> ForeignEnumProto2: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[ForeignEnumProto2]: ... @classmethod def items(cls) -> List[Tuple[bytes, ForeignEnumProto2]]: ... FOREIGN_FOO: ForeignEnumProto2 FOREIGN_BAR: ForeignEnumProto2 FOREIGN_BAZ: ForeignEnumProto2 class TestAllTypesProto2(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestAllTypesProto2.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestAllTypesProto2.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestAllTypesProto2.NestedEnum]]: ... FOO: TestAllTypesProto2.NestedEnum BAR: TestAllTypesProto2.NestedEnum BAZ: TestAllTypesProto2.NestedEnum NEG: TestAllTypesProto2.NestedEnum class NestedMessage(Message): a: int @property def corecursive(self) -> TestAllTypesProto2: ... def __init__(self, a: Optional[int] = ..., corecursive: Optional[TestAllTypesProto2] = ...) -> None: ... class MapInt32Int32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt64Int64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint32Uint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint64Uint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint32Sint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint64Sint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed32Fixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed64Fixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed32Sfixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed64Sfixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt32FloatEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapInt32DoubleEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapBoolBoolEntry(Message): key: bool value: bool def __init__(self, key: Optional[bool] = ..., value: Optional[bool] = ...) -> None: ... class MapStringStringEntry(Message): key: Text value: Text def __init__(self, key: Optional[Text] = ..., value: Optional[Text] = ...) -> None: ... class MapStringBytesEntry(Message): key: Text value: bytes def __init__(self, key: Optional[Text] = ..., value: Optional[bytes] = ...) -> None: ... class MapStringNestedMessageEntry(Message): key: Text @property def value(self) -> TestAllTypesProto2.NestedMessage: ... def __init__(self, key: Optional[Text] = ..., value: Optional[TestAllTypesProto2.NestedMessage] = ...) -> None: ... class MapStringForeignMessageEntry(Message): key: Text @property def value(self) -> ForeignMessageProto2: ... def __init__(self, key: Optional[Text] = ..., value: Optional[ForeignMessageProto2] = ...) -> None: ... class MapStringNestedEnumEntry(Message): key: Text value: TestAllTypesProto2.NestedEnum def __init__(self, key: Optional[Text] = ..., value: Optional[TestAllTypesProto2.NestedEnum] = ...) -> None: ... class MapStringForeignEnumEntry(Message): key: Text value: ForeignEnumProto2 def __init__(self, key: Optional[Text] = ..., value: Optional[ForeignEnumProto2] = ...) -> None: ... class Data(Message): group_int32: int group_uint32: int def __init__(self, group_int32: Optional[int] = ..., group_uint32: Optional[int] = ...) -> None: ... class MessageSetCorrect(Message): def __init__(self,) -> None: ... class MessageSetCorrectExtension1(Message): bytes: Text def __init__(self, bytes: Optional[Text] = ...) -> None: ... class MessageSetCorrectExtension2(Message): i: int def __init__(self, i: Optional[int] = ...) -> None: ... optional_int32: int optional_int64: int optional_uint32: int optional_uint64: int optional_sint32: int optional_sint64: int optional_fixed32: int optional_fixed64: int optional_sfixed32: int optional_sfixed64: int optional_float: float optional_double: float optional_bool: bool optional_string: Text optional_bytes: bytes optional_nested_enum: TestAllTypesProto2.NestedEnum optional_foreign_enum: ForeignEnumProto2 optional_string_piece: Text optional_cord: Text repeated_int32: RepeatedScalarFieldContainer[int] repeated_int64: RepeatedScalarFieldContainer[int] repeated_uint32: RepeatedScalarFieldContainer[int] repeated_uint64: RepeatedScalarFieldContainer[int] repeated_sint32: RepeatedScalarFieldContainer[int] repeated_sint64: RepeatedScalarFieldContainer[int] repeated_fixed32: RepeatedScalarFieldContainer[int] repeated_fixed64: RepeatedScalarFieldContainer[int] repeated_sfixed32: RepeatedScalarFieldContainer[int] repeated_sfixed64: RepeatedScalarFieldContainer[int] repeated_float: RepeatedScalarFieldContainer[float] repeated_double: RepeatedScalarFieldContainer[float] repeated_bool: RepeatedScalarFieldContainer[bool] repeated_string: RepeatedScalarFieldContainer[Text] repeated_bytes: RepeatedScalarFieldContainer[bytes] repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypesProto2.NestedEnum] repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnumProto2] repeated_string_piece: RepeatedScalarFieldContainer[Text] repeated_cord: RepeatedScalarFieldContainer[Text] oneof_uint32: int oneof_string: Text oneof_bytes: bytes oneof_bool: bool oneof_uint64: int oneof_float: float oneof_double: float oneof_enum: TestAllTypesProto2.NestedEnum fieldname1: int field_name2: int _field_name3: int field__name4_: int field0name5: int field_0_name6: int fieldName7: int FieldName8: int field_Name9: int Field_Name10: int FIELD_NAME11: int FIELD_name12: int __field_name13: int __Field_name14: int field__name15: int field__Name16: int field_name17__: int Field_name18__: int @property def optional_nested_message(self) -> TestAllTypesProto2.NestedMessage: ... @property def optional_foreign_message(self) -> ForeignMessageProto2: ... @property def recursive_message(self) -> TestAllTypesProto2: ... @property def repeated_nested_message(self) -> RepeatedCompositeFieldContainer[TestAllTypesProto2.NestedMessage]: ... @property def repeated_foreign_message(self) -> RepeatedCompositeFieldContainer[ForeignMessageProto2]: ... @property def map_int32_int32(self) -> MutableMapping[int, int]: ... @property def map_int64_int64(self) -> MutableMapping[int, int]: ... @property def map_uint32_uint32(self) -> MutableMapping[int, int]: ... @property def map_uint64_uint64(self) -> MutableMapping[int, int]: ... @property def map_sint32_sint32(self) -> MutableMapping[int, int]: ... @property def map_sint64_sint64(self) -> MutableMapping[int, int]: ... @property def map_fixed32_fixed32(self) -> MutableMapping[int, int]: ... @property def map_fixed64_fixed64(self) -> MutableMapping[int, int]: ... @property def map_sfixed32_sfixed32(self) -> MutableMapping[int, int]: ... @property def map_sfixed64_sfixed64(self) -> MutableMapping[int, int]: ... @property def map_int32_float(self) -> MutableMapping[int, float]: ... @property def map_int32_double(self) -> MutableMapping[int, float]: ... @property def map_bool_bool(self) -> MutableMapping[bool, bool]: ... @property def map_string_string(self) -> MutableMapping[Text, Text]: ... @property def map_string_bytes(self) -> MutableMapping[Text, bytes]: ... @property def map_string_nested_message(self) -> MutableMapping[Text, TestAllTypesProto2.NestedMessage]: ... @property def map_string_foreign_message(self) -> MutableMapping[Text, ForeignMessageProto2]: ... @property def map_string_nested_enum(self) -> MutableMapping[Text, TestAllTypesProto2.NestedEnum]: ... @property def map_string_foreign_enum(self) -> MutableMapping[Text, ForeignEnumProto2]: ... @property def oneof_nested_message(self) -> TestAllTypesProto2.NestedMessage: ... @property def data(self) -> TestAllTypesProto2.Data: ... def __init__( self, optional_int32: Optional[int] = ..., optional_int64: Optional[int] = ..., optional_uint32: Optional[int] = ..., optional_uint64: Optional[int] = ..., optional_sint32: Optional[int] = ..., optional_sint64: Optional[int] = ..., optional_fixed32: Optional[int] = ..., optional_fixed64: Optional[int] = ..., optional_sfixed32: Optional[int] = ..., optional_sfixed64: Optional[int] = ..., optional_float: Optional[float] = ..., optional_double: Optional[float] = ..., optional_bool: Optional[bool] = ..., optional_string: Optional[Text] = ..., optional_bytes: Optional[bytes] = ..., optional_nested_message: Optional[TestAllTypesProto2.NestedMessage] = ..., optional_foreign_message: Optional[ForeignMessageProto2] = ..., optional_nested_enum: Optional[TestAllTypesProto2.NestedEnum] = ..., optional_foreign_enum: Optional[ForeignEnumProto2] = ..., optional_string_piece: Optional[Text] = ..., optional_cord: Optional[Text] = ..., recursive_message: Optional[TestAllTypesProto2] = ..., repeated_int32: Optional[Iterable[int]] = ..., repeated_int64: Optional[Iterable[int]] = ..., repeated_uint32: Optional[Iterable[int]] = ..., repeated_uint64: Optional[Iterable[int]] = ..., repeated_sint32: Optional[Iterable[int]] = ..., repeated_sint64: Optional[Iterable[int]] = ..., repeated_fixed32: Optional[Iterable[int]] = ..., repeated_fixed64: Optional[Iterable[int]] = ..., repeated_sfixed32: Optional[Iterable[int]] = ..., repeated_sfixed64: Optional[Iterable[int]] = ..., repeated_float: Optional[Iterable[float]] = ..., repeated_double: Optional[Iterable[float]] = ..., repeated_bool: Optional[Iterable[bool]] = ..., repeated_string: Optional[Iterable[Text]] = ..., repeated_bytes: Optional[Iterable[bytes]] = ..., repeated_nested_message: Optional[Iterable[TestAllTypesProto2.NestedMessage]] = ..., repeated_foreign_message: Optional[Iterable[ForeignMessageProto2]] = ..., repeated_nested_enum: Optional[Iterable[TestAllTypesProto2.NestedEnum]] = ..., repeated_foreign_enum: Optional[Iterable[ForeignEnumProto2]] = ..., repeated_string_piece: Optional[Iterable[Text]] = ..., repeated_cord: Optional[Iterable[Text]] = ..., map_int32_int32: Optional[Mapping[int, int]] = ..., map_int64_int64: Optional[Mapping[int, int]] = ..., map_uint32_uint32: Optional[Mapping[int, int]] = ..., map_uint64_uint64: Optional[Mapping[int, int]] = ..., map_sint32_sint32: Optional[Mapping[int, int]] = ..., map_sint64_sint64: Optional[Mapping[int, int]] = ..., map_fixed32_fixed32: Optional[Mapping[int, int]] = ..., map_fixed64_fixed64: Optional[Mapping[int, int]] = ..., map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ..., map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ..., map_int32_float: Optional[Mapping[int, float]] = ..., map_int32_double: Optional[Mapping[int, float]] = ..., map_bool_bool: Optional[Mapping[bool, bool]] = ..., map_string_string: Optional[Mapping[Text, Text]] = ..., map_string_bytes: Optional[Mapping[Text, bytes]] = ..., map_string_nested_message: Optional[Mapping[Text, TestAllTypesProto2.NestedMessage]] = ..., map_string_foreign_message: Optional[Mapping[Text, ForeignMessageProto2]] = ..., map_string_nested_enum: Optional[Mapping[Text, TestAllTypesProto2.NestedEnum]] = ..., map_string_foreign_enum: Optional[Mapping[Text, ForeignEnumProto2]] = ..., oneof_uint32: Optional[int] = ..., oneof_nested_message: Optional[TestAllTypesProto2.NestedMessage] = ..., oneof_string: Optional[Text] = ..., oneof_bytes: Optional[bytes] = ..., oneof_bool: Optional[bool] = ..., oneof_uint64: Optional[int] = ..., oneof_float: Optional[float] = ..., oneof_double: Optional[float] = ..., oneof_enum: Optional[TestAllTypesProto2.NestedEnum] = ..., data: Optional[TestAllTypesProto2.Data] = ..., fieldname1: Optional[int] = ..., field_name2: Optional[int] = ..., _field_name3: Optional[int] = ..., field__name4_: Optional[int] = ..., field0name5: Optional[int] = ..., field_0_name6: Optional[int] = ..., fieldName7: Optional[int] = ..., FieldName8: Optional[int] = ..., field_Name9: Optional[int] = ..., Field_Name10: Optional[int] = ..., FIELD_NAME11: Optional[int] = ..., FIELD_name12: Optional[int] = ..., __field_name13: Optional[int] = ..., __Field_name14: Optional[int] = ..., field__name15: Optional[int] = ..., field__Name16: Optional[int] = ..., field_name17__: Optional[int] = ..., Field_name18__: Optional[int] = ..., ) -> None: ... class ForeignMessageProto2(Message): c: int def __init__(self, c: Optional[int] = ...) -> None: ... ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_arena_import_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_no_arena_import_pb20000664000175000017500000000027313577124116033653 0ustar davedave00000000000000from google.protobuf.message import Message from typing import Optional class ImportNoArenaNestedMessage(Message): d: int def __init__(self, d: Optional[int] = ...) -> None: ... ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_custom_options_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_custom_options_pb2.0000664000175000017500000001703013577124116033641 0ustar davedave00000000000000from google.protobuf.descriptor_pb2 import FileOptions from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer from google.protobuf.message import Message from typing import Iterable, List, Optional, Text, Tuple, cast class MethodOpt1(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> MethodOpt1: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[MethodOpt1]: ... @classmethod def items(cls) -> List[Tuple[bytes, MethodOpt1]]: ... METHODOPT1_VAL1: MethodOpt1 METHODOPT1_VAL2: MethodOpt1 class AggregateEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> AggregateEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[AggregateEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, AggregateEnum]]: ... VALUE: AggregateEnum class TestMessageWithCustomOptions(Message): class AnEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> TestMessageWithCustomOptions.AnEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[TestMessageWithCustomOptions.AnEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, TestMessageWithCustomOptions.AnEnum]]: ... ANENUM_VAL1: TestMessageWithCustomOptions.AnEnum ANENUM_VAL2: TestMessageWithCustomOptions.AnEnum field1: Text oneof_field: int def __init__(self, field1: Optional[Text] = ..., oneof_field: Optional[int] = ...) -> None: ... class CustomOptionFooRequest(Message): def __init__(self,) -> None: ... class CustomOptionFooResponse(Message): def __init__(self,) -> None: ... class CustomOptionFooClientMessage(Message): def __init__(self,) -> None: ... class CustomOptionFooServerMessage(Message): def __init__(self,) -> None: ... class DummyMessageContainingEnum(Message): class TestEnumType(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> DummyMessageContainingEnum.TestEnumType: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[DummyMessageContainingEnum.TestEnumType]: ... @classmethod def items(cls) -> List[Tuple[bytes, DummyMessageContainingEnum.TestEnumType]]: ... TEST_OPTION_ENUM_TYPE1: DummyMessageContainingEnum.TestEnumType TEST_OPTION_ENUM_TYPE2: DummyMessageContainingEnum.TestEnumType def __init__(self,) -> None: ... class DummyMessageInvalidAsOptionType(Message): def __init__(self,) -> None: ... class CustomOptionMinIntegerValues(Message): def __init__(self,) -> None: ... class CustomOptionMaxIntegerValues(Message): def __init__(self,) -> None: ... class CustomOptionOtherValues(Message): def __init__(self,) -> None: ... class SettingRealsFromPositiveInts(Message): def __init__(self,) -> None: ... class SettingRealsFromNegativeInts(Message): def __init__(self,) -> None: ... class ComplexOptionType1(Message): foo: int foo2: int foo3: int foo4: RepeatedScalarFieldContainer[int] def __init__( self, foo: Optional[int] = ..., foo2: Optional[int] = ..., foo3: Optional[int] = ..., foo4: Optional[Iterable[int]] = ... ) -> None: ... class ComplexOptionType2(Message): class ComplexOptionType4(Message): waldo: int def __init__(self, waldo: Optional[int] = ...) -> None: ... baz: int @property def bar(self) -> ComplexOptionType1: ... @property def fred(self) -> ComplexOptionType2.ComplexOptionType4: ... @property def barney(self) -> RepeatedCompositeFieldContainer[ComplexOptionType2.ComplexOptionType4]: ... def __init__( self, bar: Optional[ComplexOptionType1] = ..., baz: Optional[int] = ..., fred: Optional[ComplexOptionType2.ComplexOptionType4] = ..., barney: Optional[Iterable[ComplexOptionType2.ComplexOptionType4]] = ..., ) -> None: ... class ComplexOptionType3(Message): class ComplexOptionType5(Message): plugh: int def __init__(self, plugh: Optional[int] = ...) -> None: ... qux: int @property def complexoptiontype5(self) -> ComplexOptionType3.ComplexOptionType5: ... def __init__( self, qux: Optional[int] = ..., complexoptiontype5: Optional[ComplexOptionType3.ComplexOptionType5] = ... ) -> None: ... class ComplexOpt6(Message): xyzzy: int def __init__(self, xyzzy: Optional[int] = ...) -> None: ... class VariousComplexOptions(Message): def __init__(self,) -> None: ... class AggregateMessageSet(Message): def __init__(self,) -> None: ... class AggregateMessageSetElement(Message): s: Text def __init__(self, s: Optional[Text] = ...) -> None: ... class Aggregate(Message): i: int s: Text @property def sub(self) -> Aggregate: ... @property def file(self) -> FileOptions: ... @property def mset(self) -> AggregateMessageSet: ... def __init__( self, i: Optional[int] = ..., s: Optional[Text] = ..., sub: Optional[Aggregate] = ..., file: Optional[FileOptions] = ..., mset: Optional[AggregateMessageSet] = ..., ) -> None: ... class AggregateMessage(Message): fieldname: int def __init__(self, fieldname: Optional[int] = ...) -> None: ... class NestedOptionType(Message): class NestedEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> NestedOptionType.NestedEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[NestedOptionType.NestedEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, NestedOptionType.NestedEnum]]: ... NESTED_ENUM_VALUE: NestedOptionType.NestedEnum class NestedMessage(Message): nested_field: int def __init__(self, nested_field: Optional[int] = ...) -> None: ... def __init__(self,) -> None: ... class OldOptionType(Message): class TestEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> OldOptionType.TestEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[OldOptionType.TestEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, OldOptionType.TestEnum]]: ... OLD_VALUE: OldOptionType.TestEnum value: OldOptionType.TestEnum def __init__(self, value: OldOptionType.TestEnum) -> None: ... class NewOptionType(Message): class TestEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> NewOptionType.TestEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[NewOptionType.TestEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, NewOptionType.TestEnum]]: ... OLD_VALUE: NewOptionType.TestEnum NEW_VALUE: NewOptionType.TestEnum value: NewOptionType.TestEnum def __init__(self, value: NewOptionType.TestEnum) -> None: ... class TestMessageWithRequiredEnumOption(Message): def __init__(self,) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/duration_pb2.pyi0000664000175000017500000000046213577124116031165 0ustar davedave00000000000000from google.protobuf.message import Message from google.protobuf.internal import well_known_types from typing import Optional class Duration(Message, well_known_types.Duration): seconds: int nanos: int def __init__(self, seconds: Optional[int] = ..., nanos: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/field_mask_pb2.pyi0000664000175000017500000000061413577124116031435 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedScalarFieldContainer from google.protobuf.internal import well_known_types from google.protobuf.message import Message from typing import Iterable, Optional, Text class FieldMask(Message, well_known_types.FieldMask): paths: RepeatedScalarFieldContainer[Text] def __init__(self, paths: Optional[Iterable[Text]] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/map_proto2_unittest_pb2.pyi0000664000175000017500000001777213577124116033375 0ustar davedave00000000000000from google.protobuf.message import Message from google.protobuf.unittest_import_pb2 import ImportEnumForMap from typing import List, Mapping, MutableMapping, Optional, Text, Tuple, cast class Proto2MapEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> Proto2MapEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[Proto2MapEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, Proto2MapEnum]]: ... PROTO2_MAP_ENUM_FOO: Proto2MapEnum PROTO2_MAP_ENUM_BAR: Proto2MapEnum PROTO2_MAP_ENUM_BAZ: Proto2MapEnum class Proto2MapEnumPlusExtra(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> Proto2MapEnumPlusExtra: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[Proto2MapEnumPlusExtra]: ... @classmethod def items(cls) -> List[Tuple[bytes, Proto2MapEnumPlusExtra]]: ... E_PROTO2_MAP_ENUM_FOO: Proto2MapEnumPlusExtra E_PROTO2_MAP_ENUM_BAR: Proto2MapEnumPlusExtra E_PROTO2_MAP_ENUM_BAZ: Proto2MapEnumPlusExtra E_PROTO2_MAP_ENUM_EXTRA: Proto2MapEnumPlusExtra class TestEnumMap(Message): class KnownMapFieldEntry(Message): key: int value: Proto2MapEnum def __init__(self, key: Optional[int] = ..., value: Optional[Proto2MapEnum] = ...) -> None: ... class UnknownMapFieldEntry(Message): key: int value: Proto2MapEnum def __init__(self, key: Optional[int] = ..., value: Optional[Proto2MapEnum] = ...) -> None: ... @property def known_map_field(self) -> MutableMapping[int, Proto2MapEnum]: ... @property def unknown_map_field(self) -> MutableMapping[int, Proto2MapEnum]: ... def __init__( self, known_map_field: Optional[Mapping[int, Proto2MapEnum]] = ..., unknown_map_field: Optional[Mapping[int, Proto2MapEnum]] = ..., ) -> None: ... class TestEnumMapPlusExtra(Message): class KnownMapFieldEntry(Message): key: int value: Proto2MapEnumPlusExtra def __init__(self, key: Optional[int] = ..., value: Optional[Proto2MapEnumPlusExtra] = ...) -> None: ... class UnknownMapFieldEntry(Message): key: int value: Proto2MapEnumPlusExtra def __init__(self, key: Optional[int] = ..., value: Optional[Proto2MapEnumPlusExtra] = ...) -> None: ... @property def known_map_field(self) -> MutableMapping[int, Proto2MapEnumPlusExtra]: ... @property def unknown_map_field(self) -> MutableMapping[int, Proto2MapEnumPlusExtra]: ... def __init__( self, known_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]] = ..., unknown_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]] = ..., ) -> None: ... class TestImportEnumMap(Message): class ImportEnumAmpEntry(Message): key: int value: ImportEnumForMap def __init__(self, key: Optional[int] = ..., value: Optional[ImportEnumForMap] = ...) -> None: ... @property def import_enum_amp(self) -> MutableMapping[int, ImportEnumForMap]: ... def __init__(self, import_enum_amp: Optional[Mapping[int, ImportEnumForMap]] = ...) -> None: ... class TestIntIntMap(Message): class MEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... @property def m(self) -> MutableMapping[int, int]: ... def __init__(self, m: Optional[Mapping[int, int]] = ...) -> None: ... class TestMaps(Message): class MInt32Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MInt64Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MUint32Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MUint64Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MSint32Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MSint64Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MFixed32Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MFixed64Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MSfixed32Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MSfixed64Entry(Message): key: int @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MBoolEntry(Message): key: bool @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[bool] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... class MStringEntry(Message): key: Text @property def value(self) -> TestIntIntMap: ... def __init__(self, key: Optional[Text] = ..., value: Optional[TestIntIntMap] = ...) -> None: ... @property def m_int32(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_int64(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_uint32(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_uint64(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_sint32(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_sint64(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_fixed32(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_fixed64(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_sfixed32(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_sfixed64(self) -> MutableMapping[int, TestIntIntMap]: ... @property def m_bool(self) -> MutableMapping[bool, TestIntIntMap]: ... @property def m_string(self) -> MutableMapping[Text, TestIntIntMap]: ... def __init__( self, m_int32: Optional[Mapping[int, TestIntIntMap]] = ..., m_int64: Optional[Mapping[int, TestIntIntMap]] = ..., m_uint32: Optional[Mapping[int, TestIntIntMap]] = ..., m_uint64: Optional[Mapping[int, TestIntIntMap]] = ..., m_sint32: Optional[Mapping[int, TestIntIntMap]] = ..., m_sint64: Optional[Mapping[int, TestIntIntMap]] = ..., m_fixed32: Optional[Mapping[int, TestIntIntMap]] = ..., m_fixed64: Optional[Mapping[int, TestIntIntMap]] = ..., m_sfixed32: Optional[Mapping[int, TestIntIntMap]] = ..., m_sfixed64: Optional[Mapping[int, TestIntIntMap]] = ..., m_bool: Optional[Mapping[bool, TestIntIntMap]] = ..., m_string: Optional[Mapping[Text, TestIntIntMap]] = ..., ) -> None: ... class TestSubmessageMaps(Message): @property def m(self) -> TestMaps: ... def __init__(self, m: Optional[TestMaps] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/map_unittest_pb2.pyi0000664000175000017500000004012113577124116032050 0ustar davedave00000000000000from google.protobuf.message import Message from google.protobuf.unittest_no_arena_pb2 import ForeignMessage from google.protobuf.unittest_pb2 import ForeignMessage as ForeignMessage1, TestAllTypes, TestRequired from typing import List, Mapping, MutableMapping, Optional, Text, Tuple, cast class MapEnum(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> MapEnum: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[MapEnum]: ... @classmethod def items(cls) -> List[Tuple[bytes, MapEnum]]: ... MAP_ENUM_FOO: MapEnum MAP_ENUM_BAR: MapEnum MAP_ENUM_BAZ: MapEnum class TestMap(Message): class MapInt32Int32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt64Int64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint32Uint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint64Uint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint32Sint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint64Sint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed32Fixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed64Fixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed32Sfixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed64Sfixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt32FloatEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapInt32DoubleEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapBoolBoolEntry(Message): key: bool value: bool def __init__(self, key: Optional[bool] = ..., value: Optional[bool] = ...) -> None: ... class MapStringStringEntry(Message): key: Text value: Text def __init__(self, key: Optional[Text] = ..., value: Optional[Text] = ...) -> None: ... class MapInt32BytesEntry(Message): key: int value: bytes def __init__(self, key: Optional[int] = ..., value: Optional[bytes] = ...) -> None: ... class MapInt32EnumEntry(Message): key: int value: MapEnum def __init__(self, key: Optional[int] = ..., value: Optional[MapEnum] = ...) -> None: ... class MapInt32ForeignMessageEntry(Message): key: int @property def value(self) -> ForeignMessage1: ... def __init__(self, key: Optional[int] = ..., value: Optional[ForeignMessage1] = ...) -> None: ... class MapStringForeignMessageEntry(Message): key: Text @property def value(self) -> ForeignMessage1: ... def __init__(self, key: Optional[Text] = ..., value: Optional[ForeignMessage1] = ...) -> None: ... class MapInt32AllTypesEntry(Message): key: int @property def value(self) -> TestAllTypes: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestAllTypes] = ...) -> None: ... @property def map_int32_int32(self) -> MutableMapping[int, int]: ... @property def map_int64_int64(self) -> MutableMapping[int, int]: ... @property def map_uint32_uint32(self) -> MutableMapping[int, int]: ... @property def map_uint64_uint64(self) -> MutableMapping[int, int]: ... @property def map_sint32_sint32(self) -> MutableMapping[int, int]: ... @property def map_sint64_sint64(self) -> MutableMapping[int, int]: ... @property def map_fixed32_fixed32(self) -> MutableMapping[int, int]: ... @property def map_fixed64_fixed64(self) -> MutableMapping[int, int]: ... @property def map_sfixed32_sfixed32(self) -> MutableMapping[int, int]: ... @property def map_sfixed64_sfixed64(self) -> MutableMapping[int, int]: ... @property def map_int32_float(self) -> MutableMapping[int, float]: ... @property def map_int32_double(self) -> MutableMapping[int, float]: ... @property def map_bool_bool(self) -> MutableMapping[bool, bool]: ... @property def map_string_string(self) -> MutableMapping[Text, Text]: ... @property def map_int32_bytes(self) -> MutableMapping[int, bytes]: ... @property def map_int32_enum(self) -> MutableMapping[int, MapEnum]: ... @property def map_int32_foreign_message(self) -> MutableMapping[int, ForeignMessage1]: ... @property def map_string_foreign_message(self) -> MutableMapping[Text, ForeignMessage1]: ... @property def map_int32_all_types(self) -> MutableMapping[int, TestAllTypes]: ... def __init__( self, map_int32_int32: Optional[Mapping[int, int]] = ..., map_int64_int64: Optional[Mapping[int, int]] = ..., map_uint32_uint32: Optional[Mapping[int, int]] = ..., map_uint64_uint64: Optional[Mapping[int, int]] = ..., map_sint32_sint32: Optional[Mapping[int, int]] = ..., map_sint64_sint64: Optional[Mapping[int, int]] = ..., map_fixed32_fixed32: Optional[Mapping[int, int]] = ..., map_fixed64_fixed64: Optional[Mapping[int, int]] = ..., map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ..., map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ..., map_int32_float: Optional[Mapping[int, float]] = ..., map_int32_double: Optional[Mapping[int, float]] = ..., map_bool_bool: Optional[Mapping[bool, bool]] = ..., map_string_string: Optional[Mapping[Text, Text]] = ..., map_int32_bytes: Optional[Mapping[int, bytes]] = ..., map_int32_enum: Optional[Mapping[int, MapEnum]] = ..., map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]] = ..., map_string_foreign_message: Optional[Mapping[Text, ForeignMessage1]] = ..., map_int32_all_types: Optional[Mapping[int, TestAllTypes]] = ..., ) -> None: ... class TestMapSubmessage(Message): @property def test_map(self) -> TestMap: ... def __init__(self, test_map: Optional[TestMap] = ...) -> None: ... class TestMessageMap(Message): class MapInt32MessageEntry(Message): key: int @property def value(self) -> TestAllTypes: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestAllTypes] = ...) -> None: ... @property def map_int32_message(self) -> MutableMapping[int, TestAllTypes]: ... def __init__(self, map_int32_message: Optional[Mapping[int, TestAllTypes]] = ...) -> None: ... class TestSameTypeMap(Message): class Map1Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class Map2Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... @property def map1(self) -> MutableMapping[int, int]: ... @property def map2(self) -> MutableMapping[int, int]: ... def __init__(self, map1: Optional[Mapping[int, int]] = ..., map2: Optional[Mapping[int, int]] = ...) -> None: ... class TestRequiredMessageMap(Message): class MapFieldEntry(Message): key: int @property def value(self) -> TestRequired: ... def __init__(self, key: Optional[int] = ..., value: Optional[TestRequired] = ...) -> None: ... @property def map_field(self) -> MutableMapping[int, TestRequired]: ... def __init__(self, map_field: Optional[Mapping[int, TestRequired]] = ...) -> None: ... class TestArenaMap(Message): class MapInt32Int32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt64Int64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint32Uint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapUint64Uint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint32Sint32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSint64Sint64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed32Fixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapFixed64Fixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed32Sfixed32Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapSfixed64Sfixed64Entry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... class MapInt32FloatEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapInt32DoubleEntry(Message): key: int value: float def __init__(self, key: Optional[int] = ..., value: Optional[float] = ...) -> None: ... class MapBoolBoolEntry(Message): key: bool value: bool def __init__(self, key: Optional[bool] = ..., value: Optional[bool] = ...) -> None: ... class MapStringStringEntry(Message): key: Text value: Text def __init__(self, key: Optional[Text] = ..., value: Optional[Text] = ...) -> None: ... class MapInt32BytesEntry(Message): key: int value: bytes def __init__(self, key: Optional[int] = ..., value: Optional[bytes] = ...) -> None: ... class MapInt32EnumEntry(Message): key: int value: MapEnum def __init__(self, key: Optional[int] = ..., value: Optional[MapEnum] = ...) -> None: ... class MapInt32ForeignMessageEntry(Message): key: int @property def value(self) -> ForeignMessage1: ... def __init__(self, key: Optional[int] = ..., value: Optional[ForeignMessage1] = ...) -> None: ... class MapInt32ForeignMessageNoArenaEntry(Message): key: int @property def value(self) -> ForeignMessage: ... def __init__(self, key: Optional[int] = ..., value: Optional[ForeignMessage] = ...) -> None: ... @property def map_int32_int32(self) -> MutableMapping[int, int]: ... @property def map_int64_int64(self) -> MutableMapping[int, int]: ... @property def map_uint32_uint32(self) -> MutableMapping[int, int]: ... @property def map_uint64_uint64(self) -> MutableMapping[int, int]: ... @property def map_sint32_sint32(self) -> MutableMapping[int, int]: ... @property def map_sint64_sint64(self) -> MutableMapping[int, int]: ... @property def map_fixed32_fixed32(self) -> MutableMapping[int, int]: ... @property def map_fixed64_fixed64(self) -> MutableMapping[int, int]: ... @property def map_sfixed32_sfixed32(self) -> MutableMapping[int, int]: ... @property def map_sfixed64_sfixed64(self) -> MutableMapping[int, int]: ... @property def map_int32_float(self) -> MutableMapping[int, float]: ... @property def map_int32_double(self) -> MutableMapping[int, float]: ... @property def map_bool_bool(self) -> MutableMapping[bool, bool]: ... @property def map_string_string(self) -> MutableMapping[Text, Text]: ... @property def map_int32_bytes(self) -> MutableMapping[int, bytes]: ... @property def map_int32_enum(self) -> MutableMapping[int, MapEnum]: ... @property def map_int32_foreign_message(self) -> MutableMapping[int, ForeignMessage1]: ... @property def map_int32_foreign_message_no_arena(self) -> MutableMapping[int, ForeignMessage]: ... def __init__( self, map_int32_int32: Optional[Mapping[int, int]] = ..., map_int64_int64: Optional[Mapping[int, int]] = ..., map_uint32_uint32: Optional[Mapping[int, int]] = ..., map_uint64_uint64: Optional[Mapping[int, int]] = ..., map_sint32_sint32: Optional[Mapping[int, int]] = ..., map_sint64_sint64: Optional[Mapping[int, int]] = ..., map_fixed32_fixed32: Optional[Mapping[int, int]] = ..., map_fixed64_fixed64: Optional[Mapping[int, int]] = ..., map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ..., map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ..., map_int32_float: Optional[Mapping[int, float]] = ..., map_int32_double: Optional[Mapping[int, float]] = ..., map_bool_bool: Optional[Mapping[bool, bool]] = ..., map_string_string: Optional[Mapping[Text, Text]] = ..., map_int32_bytes: Optional[Mapping[int, bytes]] = ..., map_int32_enum: Optional[Mapping[int, MapEnum]] = ..., map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]] = ..., map_int32_foreign_message_no_arena: Optional[Mapping[int, ForeignMessage]] = ..., ) -> None: ... class MessageContainingEnumCalledType(Message): class Type(int): @classmethod def Name(cls, number: int) -> bytes: ... @classmethod def Value(cls, name: bytes) -> MessageContainingEnumCalledType.Type: ... @classmethod def keys(cls) -> List[bytes]: ... @classmethod def values(cls) -> List[MessageContainingEnumCalledType.Type]: ... @classmethod def items(cls) -> List[Tuple[bytes, MessageContainingEnumCalledType.Type]]: ... TYPE_FOO: MessageContainingEnumCalledType.Type class TypeEntry(Message): key: Text @property def value(self) -> MessageContainingEnumCalledType: ... def __init__(self, key: Optional[Text] = ..., value: Optional[MessageContainingEnumCalledType] = ...) -> None: ... @property def type(self) -> MutableMapping[Text, MessageContainingEnumCalledType]: ... def __init__(self, type: Optional[Mapping[Text, MessageContainingEnumCalledType]] = ...) -> None: ... class MessageContainingMapCalledEntry(Message): class EntryEntry(Message): key: int value: int def __init__(self, key: Optional[int] = ..., value: Optional[int] = ...) -> None: ... @property def entry(self) -> MutableMapping[int, int]: ... def __init__(self, entry: Optional[Mapping[int, int]] = ...) -> None: ... class TestRecursiveMapMessage(Message): class AEntry(Message): key: Text @property def value(self) -> TestRecursiveMapMessage: ... def __init__(self, key: Optional[Text] = ..., value: Optional[TestRecursiveMapMessage] = ...) -> None: ... @property def a(self) -> MutableMapping[Text, TestRecursiveMapMessage]: ... def __init__(self, a: Optional[Mapping[Text, TestRecursiveMapMessage]] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_arena_pb2.pyi0000664000175000017500000000150313577124116032362 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer from google.protobuf.message import Message from google.protobuf.unittest_no_arena_import_pb2 import ImportNoArenaNestedMessage from typing import Iterable, Optional class NestedMessage(Message): d: int def __init__(self, d: Optional[int] = ...) -> None: ... class ArenaMessage(Message): @property def repeated_nested_message(self) -> RepeatedCompositeFieldContainer[NestedMessage]: ... @property def repeated_import_no_arena_message(self) -> RepeatedCompositeFieldContainer[ImportNoArenaNestedMessage]: ... def __init__( self, repeated_nested_message: Optional[Iterable[NestedMessage]] = ..., repeated_import_no_arena_message: Optional[Iterable[ImportNoArenaNestedMessage]] = ..., ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/json_format.pyi0000664000175000017500000000162113577124116031114 0ustar davedave00000000000000import sys from typing import Any, Dict, Text, TypeVar, Union from google.protobuf.message import Message _MessageVar = TypeVar("_MessageVar", bound=Message) class Error(Exception): ... class ParseError(Error): ... class SerializeToJsonError(Error): ... def MessageToJson( message: Message, including_default_value_fields: bool = ..., preserving_proto_field_name: bool = ..., indent: int = ..., sort_keys: bool = ..., use_integers_for_enums: bool = ..., ) -> str: ... def MessageToDict( message: Message, including_default_value_fields: bool = ..., preserving_proto_field_name: bool = ..., use_integers_for_enums: bool = ..., ) -> Dict[Text, Any]: ... def Parse(text: Union[bytes, Text], message: _MessageVar, ignore_unknown_fields: bool = ...) -> _MessageVar: ... def ParseDict(js_dict: Any, message: _MessageVar, ignore_unknown_fields: bool = ...) -> _MessageVar: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_mset_pb2.pyi0000664000175000017500000000200313577124116032240 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer from google.protobuf.message import Message from google.protobuf.unittest_mset_wire_format_pb2 import TestMessageSet import builtins from typing import Iterable, Optional, Text class TestMessageSetContainer(Message): @property def message_set(self) -> TestMessageSet: ... def __init__(self, message_set: Optional[TestMessageSet] = ...) -> None: ... class TestMessageSetExtension1(Message): i: int def __init__(self, i: Optional[int] = ...) -> None: ... class TestMessageSetExtension2(Message): str: Text def __init__(self, bytes: Optional[Text] = ...) -> None: ... class RawMessageSet(Message): class Item(Message): type_id: int message: bytes def __init__(self, type_id: int, message: bytes) -> None: ... @property def item(self) -> RepeatedCompositeFieldContainer[RawMessageSet.Item]: ... def __init__(self, item: Optional[Iterable[RawMessageSet.Item]] = ...) -> None: ... ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_import_public_pb2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/unittest_import_public_pb2.p0000664000175000017500000000026413577124116033605 0ustar davedave00000000000000from google.protobuf.message import Message from typing import Optional class PublicImportMessage(Message): e: int def __init__(self, e: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/descriptor_pool.pyi0000664000175000017500000000135013577124116032001 0ustar davedave00000000000000from typing import Any, Optional class DescriptorPool: def __new__(cls, descriptor_db: Optional[Any] = ...): ... def __init__(self, descriptor_db: Optional[Any] = ...) -> None: ... def Add(self, file_desc_proto): ... def AddSerializedFile(self, serialized_file_desc_proto): ... def AddDescriptor(self, desc): ... def AddEnumDescriptor(self, enum_desc): ... def AddFileDescriptor(self, file_desc): ... def FindFileByName(self, file_name): ... def FindFileContainingSymbol(self, symbol): ... def FindMessageTypeByName(self, full_name): ... def FindEnumTypeByName(self, full_name): ... def FindFieldByName(self, full_name): ... def FindExtensionByName(self, full_name): ... def Default(): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/api_pb2.pyi0000664000175000017500000000342613577124116030114 0ustar davedave00000000000000from google.protobuf.internal.containers import RepeatedCompositeFieldContainer from google.protobuf.message import Message from google.protobuf.source_context_pb2 import SourceContext from google.protobuf.type_pb2 import Option, Syntax from typing import Iterable, Optional, Text class Api(Message): name: Text version: Text syntax: Syntax @property def methods(self) -> RepeatedCompositeFieldContainer[Method]: ... @property def options(self) -> RepeatedCompositeFieldContainer[Option]: ... @property def source_context(self) -> SourceContext: ... @property def mixins(self) -> RepeatedCompositeFieldContainer[Mixin]: ... def __init__( self, name: Optional[Text] = ..., methods: Optional[Iterable[Method]] = ..., options: Optional[Iterable[Option]] = ..., version: Optional[Text] = ..., source_context: Optional[SourceContext] = ..., mixins: Optional[Iterable[Mixin]] = ..., syntax: Optional[Syntax] = ..., ) -> None: ... class Method(Message): name: Text request_type_url: Text request_streaming: bool response_type_url: Text response_streaming: bool syntax: Syntax @property def options(self) -> RepeatedCompositeFieldContainer[Option]: ... def __init__( self, name: Optional[Text] = ..., request_type_url: Optional[Text] = ..., request_streaming: Optional[bool] = ..., response_type_url: Optional[Text] = ..., response_streaming: Optional[bool] = ..., options: Optional[Iterable[Option]] = ..., syntax: Optional[Syntax] = ..., ) -> None: ... class Mixin(Message): name: Text root: Text def __init__(self, name: Optional[Text] = ..., root: Optional[Text] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/source_context_pb2.pyi0000664000175000017500000000030613577124116032401 0ustar davedave00000000000000from google.protobuf.message import Message from typing import Optional, Text class SourceContext(Message): file_name: Text def __init__(self, file_name: Optional[Text] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/wrappers_pb2.pyi0000664000175000017500000000204413577124116031201 0ustar davedave00000000000000from google.protobuf.message import Message from typing import Optional, Text class DoubleValue(Message): value: float def __init__(self, value: Optional[float] = ...) -> None: ... class FloatValue(Message): value: float def __init__(self, value: Optional[float] = ...) -> None: ... class Int64Value(Message): value: int def __init__(self, value: Optional[int] = ...) -> None: ... class UInt64Value(Message): value: int def __init__(self, value: Optional[int] = ...) -> None: ... class Int32Value(Message): value: int def __init__(self, value: Optional[int] = ...) -> None: ... class UInt32Value(Message): value: int def __init__(self, value: Optional[int] = ...) -> None: ... class BoolValue(Message): value: bool def __init__(self, value: Optional[bool] = ...) -> None: ... class StringValue(Message): value: Text def __init__(self, value: Optional[Text] = ...) -> None: ... class BytesValue(Message): value: bytes def __init__(self, value: Optional[bytes] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/google/protobuf/any_test_pb2.pyi0000664000175000017500000000105513577124116031165 0ustar davedave00000000000000from google.protobuf.any_pb2 import Any from google.protobuf.internal.containers import RepeatedCompositeFieldContainer from google.protobuf.message import Message from typing import Iterable, Optional class TestAny(Message): int32_value: int @property def any_value(self) -> Any: ... @property def repeated_any_value(self) -> RepeatedCompositeFieldContainer[Any]: ... def __init__( self, int32_value: Optional[int] = ..., any_value: Optional[Any] = ..., repeated_any_value: Optional[Iterable[Any]] = ... ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/0000775000175000017500000000000013577125145023702 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/__init__.pyi0000664000175000017500000001551213577124116026165 0ustar davedave00000000000000from typing import Any, Optional, Text import logging from .s3.connection import S3Connection Version: Any UserAgent: Any config: Any BUCKET_NAME_RE: Any TOO_LONG_DNS_NAME_COMP: Any GENERATION_RE: Any VERSION_RE: Any ENDPOINTS_PATH: Any def init_logging(): ... class NullHandler(logging.Handler): def emit(self, record): ... log: Any perflog: Any def set_file_logger(name, filepath, level: Any = ..., format_string: Optional[Any] = ...): ... def set_stream_logger(name, level: Any = ..., format_string: Optional[Any] = ...): ... def connect_sqs(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_s3(aws_access_key_id: Optional[Text] = ..., aws_secret_access_key: Optional[Text] = ..., **kwargs) -> S3Connection: ... def connect_gs(gs_access_key_id: Optional[Any] = ..., gs_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_ec2(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_elb(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_autoscale(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudwatch(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_sdb(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_fps(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_mturk(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudfront(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_vpc(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_rds(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_rds2(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_emr(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_sns(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_iam(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_route53(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudformation(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_euca(host: Optional[Any] = ..., aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., port: int = ..., path: str = ..., is_secure: bool = ..., **kwargs): ... def connect_glacier(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_ec2_endpoint(url, aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_walrus(host: Optional[Any] = ..., aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., port: int = ..., path: str = ..., is_secure: bool = ..., **kwargs): ... def connect_ses(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_sts(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_ia(ia_access_key_id: Optional[Any] = ..., ia_secret_access_key: Optional[Any] = ..., is_secure: bool = ..., **kwargs): ... def connect_dynamodb(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_swf(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudsearch(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudsearch2(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., sign_request: bool = ..., **kwargs): ... def connect_cloudsearchdomain(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_beanstalk(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_elastictranscoder(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_opsworks(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_redshift(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_support(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudtrail(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_directconnect(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_kinesis(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_logs(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_route53domains(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cognito_identity(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cognito_sync(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_kms(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_awslambda(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_codedeploy(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_configservice(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_cloudhsm(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_ec2containerservice(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def connect_machinelearning(aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., **kwargs): ... def storage_uri(uri_str, default_scheme: str = ..., debug: int = ..., validate: bool = ..., bucket_storage_uri_class: Any = ..., suppress_consec_slashes: bool = ..., is_latest: bool = ...): ... def storage_uri_for_key(key): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/plugin.pyi0000664000175000017500000000035313577124116025721 0ustar davedave00000000000000from typing import Any, Optional class Plugin: capability: Any @classmethod def is_capable(cls, requested_capability): ... def get_plugin(cls, requested_capability: Optional[Any] = ...): ... def load_plugins(config): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/connection.pyi0000664000175000017500000001215613577124116026566 0ustar davedave00000000000000from typing import Any, Dict, Optional, Text from six.moves import http_client HAVE_HTTPS_CONNECTION: bool ON_APP_ENGINE: Any PORTS_BY_SECURITY: Any DEFAULT_CA_CERTS_FILE: Any class HostConnectionPool: queue: Any def __init__(self) -> None: ... def size(self): ... def put(self, conn): ... def get(self): ... def clean(self): ... class ConnectionPool: CLEAN_INTERVAL: float STALE_DURATION: float host_to_pool: Any last_clean_time: float mutex: Any def __init__(self) -> None: ... def size(self): ... def get_http_connection(self, host, port, is_secure): ... def put_http_connection(self, host, port, is_secure, conn): ... def clean(self): ... class HTTPRequest: method: Any protocol: Any host: Any port: Any path: Any auth_path: Any params: Any headers: Any body: Any def __init__(self, method, protocol, host, port, path, auth_path, params, headers, body) -> None: ... def authorize(self, connection, **kwargs): ... class HTTPResponse(http_client.HTTPResponse): def __init__(self, *args, **kwargs) -> None: ... def read(self, amt: Optional[Any] = ...): ... class AWSAuthConnection: suppress_consec_slashes: Any num_retries: int is_secure: Any https_validate_certificates: Any ca_certificates_file: Any port: Any http_exceptions: Any http_unretryable_exceptions: Any socket_exception_values: Any https_connection_factory: Any protocol: str host: Any path: Any debug: Any host_header: Any http_connection_kwargs: Any provider: Any auth_service_name: Any request_hook: Any def __init__(self, host, aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., is_secure: bool = ..., port: Optional[Any] = ..., proxy: Optional[Any] = ..., proxy_port: Optional[Any] = ..., proxy_user: Optional[Any] = ..., proxy_pass: Optional[Any] = ..., debug: int = ..., https_connection_factory: Optional[Any] = ..., path: str = ..., provider: str = ..., security_token: Optional[Any] = ..., suppress_consec_slashes: bool = ..., validate_certs: bool = ..., profile_name: Optional[Any] = ...) -> None: ... auth_region_name: Any @property def connection(self): ... @property def aws_access_key_id(self): ... @property def gs_access_key_id(self) -> Any: ... access_key: Any @property def aws_secret_access_key(self): ... @property def gs_secret_access_key(self): ... secret_key: Any @property def profile_name(self): ... def get_path(self, path: str = ...): ... def server_name(self, port: Optional[Any] = ...): ... proxy: Any proxy_port: Any proxy_user: Any proxy_pass: Any no_proxy: Any use_proxy: Any def handle_proxy(self, proxy, proxy_port, proxy_user, proxy_pass): ... def get_http_connection(self, host, port, is_secure): ... def skip_proxy(self, host): ... def new_http_connection(self, host, port, is_secure): ... def put_http_connection(self, host, port, is_secure, connection): ... def proxy_ssl(self, host: Optional[Any] = ..., port: Optional[Any] = ...): ... def prefix_proxy_to_path(self, path, host: Optional[Any] = ...): ... def get_proxy_auth_header(self): ... def get_proxy_url_with_auth(self): ... def set_host_header(self, request): ... def set_request_hook(self, hook): ... def build_base_http_request(self, method, path, auth_path, params: Optional[Any] = ..., headers: Optional[Any] = ..., data: str = ..., host: Optional[Any] = ...): ... def make_request(self, method, path, headers: Optional[Any] = ..., data: str = ..., host: Optional[Any] = ..., auth_path: Optional[Any] = ..., sender: Optional[Any] = ..., override_num_retries: Optional[Any] = ..., params: Optional[Any] = ..., retry_handler: Optional[Any] = ...): ... def close(self): ... class AWSQueryConnection(AWSAuthConnection): APIVersion: str ResponseError: Any def __init__(self, aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., is_secure: bool = ..., port: Optional[Any] = ..., proxy: Optional[Any] = ..., proxy_port: Optional[Any] = ..., proxy_user: Optional[Any] = ..., proxy_pass: Optional[Any] = ..., host: Optional[Any] = ..., debug: int = ..., https_connection_factory: Optional[Any] = ..., path: str = ..., security_token: Optional[Any] = ..., validate_certs: bool = ..., profile_name: Optional[Any] = ..., provider: str = ...) -> None: ... def get_utf8_value(self, value): ... def make_request(self, action, params: Optional[Any] = ..., path: str = ..., verb: str = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237 def build_list_params(self, params, items, label): ... def build_complex_list_params(self, params, items, label, names): ... def get_list(self, action, params, markers, path: str = ..., parent: Optional[Any] = ..., verb: str = ...): ... def get_object(self, action, params, cls, path: str = ..., parent: Optional[Any] = ..., verb: str = ...): ... def get_status(self, action, params, path: str = ..., parent: Optional[Any] = ..., verb: str = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/auth.pyi0000664000175000017500000001005413577124116025363 0ustar davedave00000000000000from typing import Any, Optional from boto.auth_handler import AuthHandler SIGV4_DETECT: Any class HmacKeys: host: Any def __init__(self, host, config, provider) -> None: ... def update_provider(self, provider): ... def algorithm(self): ... def sign_string(self, string_to_sign): ... class AnonAuthHandler(AuthHandler, HmacKeys): capability: Any def __init__(self, host, config, provider) -> None: ... def add_auth(self, http_request, **kwargs): ... class HmacAuthV1Handler(AuthHandler, HmacKeys): capability: Any def __init__(self, host, config, provider) -> None: ... def update_provider(self, provider): ... def add_auth(self, http_request, **kwargs): ... class HmacAuthV2Handler(AuthHandler, HmacKeys): capability: Any def __init__(self, host, config, provider) -> None: ... def update_provider(self, provider): ... def add_auth(self, http_request, **kwargs): ... class HmacAuthV3Handler(AuthHandler, HmacKeys): capability: Any def __init__(self, host, config, provider) -> None: ... def add_auth(self, http_request, **kwargs): ... class HmacAuthV3HTTPHandler(AuthHandler, HmacKeys): capability: Any def __init__(self, host, config, provider) -> None: ... def headers_to_sign(self, http_request): ... def canonical_headers(self, headers_to_sign): ... def string_to_sign(self, http_request): ... def add_auth(self, req, **kwargs): ... class HmacAuthV4Handler(AuthHandler, HmacKeys): capability: Any service_name: Any region_name: Any def __init__(self, host, config, provider, service_name: Optional[Any] = ..., region_name: Optional[Any] = ...) -> None: ... def headers_to_sign(self, http_request): ... def host_header(self, host, http_request): ... def query_string(self, http_request): ... def canonical_query_string(self, http_request): ... def canonical_headers(self, headers_to_sign): ... def signed_headers(self, headers_to_sign): ... def canonical_uri(self, http_request): ... def payload(self, http_request): ... def canonical_request(self, http_request): ... def scope(self, http_request): ... def split_host_parts(self, host): ... def determine_region_name(self, host): ... def determine_service_name(self, host): ... def credential_scope(self, http_request): ... def string_to_sign(self, http_request, canonical_request): ... def signature(self, http_request, string_to_sign): ... def add_auth(self, req, **kwargs): ... class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler): capability: Any region_name: Any def __init__(self, *args, **kwargs) -> None: ... def clean_region_name(self, region_name): ... def canonical_uri(self, http_request): ... def canonical_query_string(self, http_request): ... def host_header(self, host, http_request): ... def headers_to_sign(self, http_request): ... def determine_region_name(self, host): ... def determine_service_name(self, host): ... def mangle_path_and_params(self, req): ... def payload(self, http_request): ... def add_auth(self, req, **kwargs): ... def presign(self, req, expires, iso_date: Optional[Any] = ...): ... class STSAnonHandler(AuthHandler): capability: Any def add_auth(self, http_request, **kwargs): ... class QuerySignatureHelper(HmacKeys): def add_auth(self, http_request, **kwargs): ... class QuerySignatureV0AuthHandler(QuerySignatureHelper, AuthHandler): SignatureVersion: int capability: Any class QuerySignatureV1AuthHandler(QuerySignatureHelper, AuthHandler): SignatureVersion: int capability: Any def __init__(self, *args, **kw) -> None: ... class QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler): SignatureVersion: int capability: Any class POSTPathQSV2AuthHandler(QuerySignatureV2AuthHandler, AuthHandler): capability: Any def add_auth(self, req, **kwargs): ... def get_auth_handler(host, config, provider, requested_capability: Optional[Any] = ...): ... def detect_potential_sigv4(func): ... def detect_potential_s3sigv4(func): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/utils.pyi0000664000175000017500000001407113577124116025565 0ustar davedave00000000000000import datetime import logging.handlers import subprocess import sys import time import boto.connection from typing import ( Any, Callable, ContextManager, Dict, IO, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union, ) _KT = TypeVar('_KT') _VT = TypeVar('_VT') if sys.version_info >= (3,): # TODO move _StringIO definition into boto.compat once stubs exist and rename to StringIO import io _StringIO = io.StringIO from hashlib import _Hash _HashType = _Hash from email.message import Message as _Message else: # TODO move _StringIO definition into boto.compat once stubs exist and rename to StringIO import StringIO _StringIO = StringIO.StringIO[Any] from hashlib import _hash _HashType = _hash # TODO use email.message.Message once stubs exist _Message = Any _Provider = Any # TODO replace this with boto.provider.Provider once stubs exist _LockType = Any # TODO replace this with _thread.LockType once stubs exist JSONDecodeError: Type[ValueError] qsa_of_interest: List[str] def unquote_v(nv: str) -> Union[str, Tuple[str, str]]: ... def canonical_string( method: str, path: str, headers: Mapping[str, Optional[str]], expires: Optional[int] = ..., provider: Optional[_Provider] = ..., ) -> str: ... def merge_meta( headers: Mapping[str, str], metadata: Mapping[str, str], provider: Optional[_Provider] = ..., ) -> Mapping[str, str]: ... def get_aws_metadata( headers: Mapping[str, str], provider: Optional[_Provider] = ..., ) -> Mapping[str, str]: ... def retry_url( url: str, retry_on_404: bool = ..., num_retries: int = ..., timeout: Optional[int] = ..., ) -> str: ... class LazyLoadMetadata(Dict[_KT, _VT]): def __init__( self, url: str, num_retries: int, timeout: Optional[int] = ..., ) -> None: ... def get_instance_metadata( version: str = ..., url: str = ..., data: str = ..., timeout: Optional[int] = ..., num_retries: int = ..., ) -> Optional[LazyLoadMetadata[Any, Any]]: ... def get_instance_identity( version: str = ..., url: str = ..., timeout: Optional[int] = ..., num_retries: int = ..., ) -> Optional[Mapping[str, Any]]: ... def get_instance_userdata( version: str = ..., sep: Optional[str] = ..., url: str = ..., timeout: Optional[int] = ..., num_retries: int = ..., ) -> Mapping[str, str]: ... ISO8601: str ISO8601_MS: str RFC1123: str LOCALE_LOCK: _LockType def setlocale(name: Union[str, Tuple[str, str]]) -> ContextManager[str]: ... def get_ts(ts: Optional[time.struct_time] = ...) -> str: ... def parse_ts(ts: str) -> datetime.datetime: ... def find_class(module_name: str, class_name: Optional[str] = ...) -> Optional[Type[Any]]: ... def update_dme(username: str, password: str, dme_id: str, ip_address: str) -> str: ... def fetch_file( uri: str, file: Optional[IO[str]] = ..., username: Optional[str] = ..., password: Optional[str] = ..., ) -> Optional[IO[str]]: ... class ShellCommand: exit_code: int command: subprocess._CMD log_fp: _StringIO wait: bool fail_fast: bool def __init__( self, command: subprocess._CMD, wait: bool = ..., fail_fast: bool = ..., cwd: Optional[subprocess._TXT] = ..., ) -> None: ... process: subprocess.Popen[Any] def run(self, cwd: Optional[subprocess._CMD] = ...) -> Optional[int]: ... def setReadOnly(self, value) -> None: ... def getStatus(self) -> Optional[int]: ... status: Optional[int] def getOutput(self) -> str: ... output: str class AuthSMTPHandler(logging.handlers.SMTPHandler): username: str password: str def __init__( self, mailhost: str, username: str, password: str, fromaddr: str, toaddrs: Sequence[str], subject: str, ) -> None: ... class LRUCache(Dict[_KT, _VT]): class _Item: previous: Optional[LRUCache._Item] next: Optional[LRUCache._Item] key = ... value = ... def __init__(self, key, value) -> None: ... _dict: Dict[_KT, LRUCache._Item] capacity: int head: Optional[LRUCache._Item] tail: Optional[LRUCache._Item] def __init__(self, capacity: int) -> None: ... # This exists to work around Password.str's name shadowing the str type _str = str class Password: hashfunc: Callable[[bytes], _HashType] str: Optional[_str] def __init__( self, str: Optional[_str] = ..., hashfunc: Optional[Callable[[bytes], _HashType]] = ..., ) -> None: ... def set(self, value: Union[bytes, _str]) -> None: ... def __eq__(self, other: Any) -> bool: ... def __len__(self) -> int: ... def notify( subject: str, body: Optional[str] = ..., html_body: Optional[Union[Sequence[str], str]] = ..., to_string: Optional[str] = ..., attachments: Optional[Iterable[_Message]] = ..., append_instance_id: bool = ..., ) -> None: ... def get_utf8_value(value: str) -> bytes: ... def mklist(value: Any) -> List[Any]: ... def pythonize_name(name: str) -> str: ... def write_mime_multipart( content: List[Tuple[str, str]], compress: bool = ..., deftype: str = ..., delimiter: str = ..., ) -> str: ... def guess_mime_type(content: str, deftype: str) -> str: ... def compute_md5( fp: IO[Any], buf_size: int = ..., size: Optional[int] = ..., ) -> Tuple[str, str, int]: ... def compute_hash( fp: IO[Any], buf_size: int = ..., size: Optional[int] = ..., hash_algorithm: Any = ..., ) -> Tuple[str, str, int]: ... def find_matching_headers(name: str, headers: Mapping[str, Optional[str]]) -> List[str]: ... def merge_headers_by_name(name: str, headers: Mapping[str, Optional[str]]) -> str: ... class RequestHook: def handle_request_data( self, request: boto.connection.HTTPRequest, response: boto.connection.HTTPResponse, error: bool = ..., ) -> Any: ... def host_is_ipv6(hostname: str) -> bool: ... def parse_host(hostname: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/elb/0000775000175000017500000000000013577125145024444 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/elb/__init__.pyi0000664000175000017500000000465713577124116026737 0ustar davedave00000000000000from typing import Any from boto.connection import AWSQueryConnection RegionData: Any def regions(): ... def connect_to_region(region_name, **kw_params): ... class ELBConnection(AWSQueryConnection): APIVersion: Any DefaultRegionName: Any DefaultRegionEndpoint: Any region: Any def __init__(self, aws_access_key_id=..., aws_secret_access_key=..., is_secure=..., port=..., proxy=..., proxy_port=..., proxy_user=..., proxy_pass=..., debug=..., https_connection_factory=..., region=..., path=..., security_token=..., validate_certs=..., profile_name=...) -> None: ... def build_list_params(self, params, items, label): ... def get_all_load_balancers(self, load_balancer_names=..., marker=...): ... def create_load_balancer(self, name, zones, listeners=..., subnets=..., security_groups=..., scheme=..., complex_listeners=...): ... def create_load_balancer_listeners(self, name, listeners=..., complex_listeners=...): ... def delete_load_balancer(self, name): ... def delete_load_balancer_listeners(self, name, ports): ... def enable_availability_zones(self, load_balancer_name, zones_to_add): ... def disable_availability_zones(self, load_balancer_name, zones_to_remove): ... def modify_lb_attribute(self, load_balancer_name, attribute, value): ... def get_all_lb_attributes(self, load_balancer_name): ... def get_lb_attribute(self, load_balancer_name, attribute): ... def register_instances(self, load_balancer_name, instances): ... def deregister_instances(self, load_balancer_name, instances): ... def describe_instance_health(self, load_balancer_name, instances=...): ... def configure_health_check(self, name, health_check): ... def set_lb_listener_SSL_certificate(self, lb_name, lb_port, ssl_certificate_id): ... def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name): ... def create_lb_cookie_stickiness_policy(self, cookie_expiration_period, lb_name, policy_name): ... def create_lb_policy(self, lb_name, policy_name, policy_type, policy_attributes): ... def delete_lb_policy(self, lb_name, policy_name): ... def set_lb_policies_of_listener(self, lb_name, lb_port, policies): ... def set_lb_policies_of_backend_server(self, lb_name, instance_port, policies): ... def apply_security_groups_to_lb(self, name, security_groups): ... def attach_lb_to_subnets(self, name, subnets): ... def detach_lb_from_subnets(self, name, subnets): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/0000775000175000017500000000000013577125145024227 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/__init__.pyi0000664000175000017500000000075713577124116026517 0ustar davedave00000000000000from typing import Optional from .connection import S3Connection from boto.connection import AWSAuthConnection from boto.regioninfo import RegionInfo from typing import List, Type, Text class S3RegionInfo(RegionInfo): def connect(self, name: Optional[Text] = ..., endpoint: Optional[str] = ..., connection_cls: Optional[Type[AWSAuthConnection]] = ..., **kw_params) -> S3Connection: ... def regions() -> List[S3RegionInfo]: ... def connect_to_region(region_name: Text, **kw_params): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/key.pyi0000664000175000017500000002016513577124116025543 0ustar davedave00000000000000from typing import Any, Callable, Dict, Optional, Text, Union, overload class Key: DefaultContentType: str RestoreBody: str BufferSize: Any base_user_settable_fields: Any base_fields: Any bucket: Any name: str metadata: Any cache_control: Any content_type: Any content_encoding: Any content_disposition: Any content_language: Any filename: Any etag: Any is_latest: bool last_modified: Any owner: Any path: Any resp: Any mode: Any size: Any version_id: Any source_version_id: Any delete_marker: bool encrypted: Any ongoing_restore: Any expiry_date: Any local_hashes: Any def __init__(self, bucket: Optional[Any] = ..., name: Optional[Any] = ...) -> None: ... def __iter__(self): ... @property def provider(self): ... key: Any md5: Any base64md5: Any storage_class: Any def get_md5_from_hexdigest(self, md5_hexdigest): ... def handle_encryption_headers(self, resp): ... def handle_version_headers(self, resp, force: bool = ...): ... def handle_restore_headers(self, response): ... def handle_addl_headers(self, headers): ... def open_read( self, headers: Optional[Dict[Text, Text]] = ..., query_args: str = ..., override_num_retries: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., ): ... def open_write(self, headers: Optional[Dict[Text, Text]] = ..., override_num_retries: Optional[Any] = ...): ... def open( self, mode: str = ..., headers: Optional[Dict[Text, Text]] = ..., query_args: Optional[Any] = ..., override_num_retries: Optional[Any] = ..., ): ... closed: bool def close(self, fast: bool = ...): ... def next(self): ... __next__: Any def read(self, size: int = ...): ... def change_storage_class(self, new_storage_class, dst_bucket: Optional[Any] = ..., validate_dst_bucket: bool = ...): ... def copy( self, dst_bucket, dst_key, metadata: Optional[Any] = ..., reduced_redundancy: bool = ..., preserve_acl: bool = ..., encrypt_key: bool = ..., validate_dst_bucket: bool = ..., ): ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def exists(self, headers: Optional[Dict[Text, Text]] = ...): ... def delete(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_metadata(self, name): ... def set_metadata(self, name, value): ... def update_metadata(self, d): ... def set_acl(self, acl_str, headers: Optional[Dict[Text, Text]] = ...): ... def get_acl(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_xml_acl(self, headers: Optional[Dict[Text, Text]] = ...): ... def set_xml_acl(self, acl_str, headers: Optional[Dict[Text, Text]] = ...): ... def set_canned_acl(self, acl_str, headers: Optional[Dict[Text, Text]] = ...): ... def get_redirect(self): ... def set_redirect(self, redirect_location, headers: Optional[Dict[Text, Text]] = ...): ... def make_public(self, headers: Optional[Dict[Text, Text]] = ...): ... def generate_url( self, expires_in, method: str = ..., headers: Optional[Dict[Text, Text]] = ..., query_auth: bool = ..., force_http: bool = ..., response_headers: Optional[Dict[Text, Text]] = ..., expires_in_absolute: bool = ..., version_id: Optional[Any] = ..., policy: Optional[Any] = ..., reduced_redundancy: bool = ..., encrypt_key: bool = ..., ): ... def send_file( self, fp, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., query_args: Optional[Any] = ..., chunked_transfer: bool = ..., size: Optional[Any] = ..., ): ... def should_retry(self, response, chunked_transfer: bool = ...): ... def compute_md5(self, fp, size: Optional[Any] = ...): ... def set_contents_from_stream( self, fp, headers: Optional[Dict[Text, Text]] = ..., replace: bool = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., policy: Optional[Any] = ..., reduced_redundancy: bool = ..., query_args: Optional[Any] = ..., size: Optional[Any] = ..., ): ... def set_contents_from_file( self, fp, headers: Optional[Dict[Text, Text]] = ..., replace: bool = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., policy: Optional[Any] = ..., md5: Optional[Any] = ..., reduced_redundancy: bool = ..., query_args: Optional[Any] = ..., encrypt_key: bool = ..., size: Optional[Any] = ..., rewind: bool = ..., ): ... def set_contents_from_filename( self, filename, headers: Optional[Dict[Text, Text]] = ..., replace: bool = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., policy: Optional[Any] = ..., md5: Optional[Any] = ..., reduced_redundancy: bool = ..., encrypt_key: bool = ..., ): ... def set_contents_from_string( self, string_data: Union[Text, bytes], headers: Optional[Dict[Text, Text]] = ..., replace: bool = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., policy: Optional[Any] = ..., md5: Optional[Any] = ..., reduced_redundancy: bool = ..., encrypt_key: bool = ..., ) -> None: ... def get_file( self, fp, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., torrent: bool = ..., version_id: Optional[Any] = ..., override_num_retries: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., ): ... def get_torrent_file( self, fp, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ... ): ... def get_contents_to_file( self, fp, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., torrent: bool = ..., version_id: Optional[Any] = ..., res_download_handler: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., ): ... def get_contents_to_filename( self, filename, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., torrent: bool = ..., version_id: Optional[Any] = ..., res_download_handler: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., ): ... @overload def get_contents_as_string( self, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., torrent: bool = ..., version_id: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., encoding: None = ..., ) -> bytes: ... @overload def get_contents_as_string( self, headers: Optional[Dict[Text, Text]] = ..., cb: Optional[Callable[[int, int], Any]] = ..., num_cb: int = ..., torrent: bool = ..., version_id: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., *, encoding: Text, ) -> Text: ... def add_email_grant(self, permission, email_address, headers: Optional[Dict[Text, Text]] = ...): ... def add_user_grant( self, permission, user_id, headers: Optional[Dict[Text, Text]] = ..., display_name: Optional[Any] = ... ): ... def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: Optional[Dict[Text, Text]] = ...): ... def restore(self, days, headers: Optional[Dict[Text, Text]] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/bucketlogging.pyi0000664000175000017500000000062013577124116027571 0ustar davedave00000000000000from typing import Any, Optional class BucketLogging: target: Any prefix: Any grants: Any def __init__(self, target: Optional[Any] = ..., prefix: Optional[Any] = ..., grants: Optional[Any] = ...) -> None: ... def add_grant(self, grant): ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/cors.pyi0000664000175000017500000000170213577124116025715 0ustar davedave00000000000000from typing import Any, List, Optional class CORSRule: allowed_method: Any allowed_origin: Any id: Any allowed_header: Any max_age_seconds: Any expose_header: Any def __init__(self, allowed_method: Optional[Any] = ..., allowed_origin: Optional[Any] = ..., id: Optional[Any] = ..., allowed_header: Optional[Any] = ..., max_age_seconds: Optional[Any] = ..., expose_header: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self) -> str: ... class CORSConfiguration(List[CORSRule]): def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self) -> str: ... def add_rule(self, allowed_method, allowed_origin, id: Optional[Any] = ..., allowed_header: Optional[Any] = ..., max_age_seconds: Optional[Any] = ..., expose_header: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/bucket.pyi0000664000175000017500000001753613577124116026240 0ustar davedave00000000000000from .bucketlistresultset import BucketListResultSet from .connection import S3Connection from .key import Key from typing import Any, Dict, Optional, Text, Type, List class S3WebsiteEndpointTranslate: trans_region: Dict[str, str] @classmethod def translate_region(self, reg: Text) -> str: ... S3Permissions: List[str] class Bucket: LoggingGroup: str BucketPaymentBody: str VersioningBody: str VersionRE: str MFADeleteRE: str name: Text connection: S3Connection key_class: Type[Key] def __init__(self, connection: Optional[S3Connection] = ..., name: Optional[Text] = ..., key_class: Type[Key] = ...) -> None: ... def __iter__(self): ... def __contains__(self, key_name) -> bool: ... def startElement(self, name, attrs, connection): ... creation_date: Any def endElement(self, name, value, connection): ... def set_key_class(self, key_class): ... def lookup(self, key_name, headers: Optional[Dict[Text, Text]] = ...): ... def get_key(self, key_name, headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ..., response_headers: Optional[Dict[Text, Text]] = ..., validate: bool = ...) -> Key: ... def list(self, prefix: Text = ..., delimiter: Text = ..., marker: Text = ..., headers: Optional[Dict[Text, Text]] = ..., encoding_type: Optional[Any] = ...) -> BucketListResultSet: ... def list_versions(self, prefix: str = ..., delimiter: str = ..., key_marker: str = ..., version_id_marker: str = ..., headers: Optional[Dict[Text, Text]] = ..., encoding_type: Optional[Text] = ...) -> BucketListResultSet: ... def list_multipart_uploads(self, key_marker: str = ..., upload_id_marker: str = ..., headers: Optional[Dict[Text, Text]] = ..., encoding_type: Optional[Any] = ...): ... def validate_kwarg_names(self, kwargs, names): ... def get_all_keys(self, headers: Optional[Dict[Text, Text]] = ..., **params): ... def get_all_versions(self, headers: Optional[Dict[Text, Text]] = ..., **params): ... def validate_get_all_versions_params(self, params): ... def get_all_multipart_uploads(self, headers: Optional[Dict[Text, Text]] = ..., **params): ... def new_key(self, key_name: Optional[Any] = ...): ... def generate_url(self, expires_in, method: str = ..., headers: Optional[Dict[Text, Text]] = ..., force_http: bool = ..., response_headers: Optional[Dict[Text, Text]] = ..., expires_in_absolute: bool = ...): ... def delete_keys(self, keys, quiet: bool = ..., mfa_token: Optional[Any] = ..., headers: Optional[Dict[Text, Text]] = ...): ... def delete_key(self, key_name, headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ..., mfa_token: Optional[Any] = ...): ... def copy_key(self, new_key_name, src_bucket_name, src_key_name, metadata: Optional[Any] = ..., src_version_id: Optional[Any] = ..., storage_class: str = ..., preserve_acl: bool = ..., encrypt_key: bool = ..., headers: Optional[Dict[Text, Text]] = ..., query_args: Optional[Any] = ...): ... def set_canned_acl(self, acl_str, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ...): ... def get_xml_acl(self, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ...): ... def set_xml_acl(self, acl_str, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ..., query_args: str = ...): ... def set_acl(self, acl_or_str, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ...): ... def get_acl(self, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ...): ... def set_subresource(self, subresource, value, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ...): ... def get_subresource(self, subresource, key_name: str = ..., headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ...): ... def make_public(self, recursive: bool = ..., headers: Optional[Dict[Text, Text]] = ...): ... def add_email_grant(self, permission, email_address, recursive: bool = ..., headers: Optional[Dict[Text, Text]] = ...): ... def add_user_grant(self, permission, user_id, recursive: bool = ..., headers: Optional[Dict[Text, Text]] = ..., display_name: Optional[Any] = ...): ... def list_grants(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_location(self): ... def set_xml_logging(self, logging_str, headers: Optional[Dict[Text, Text]] = ...): ... def enable_logging(self, target_bucket, target_prefix: str = ..., grants: Optional[Any] = ..., headers: Optional[Dict[Text, Text]] = ...): ... def disable_logging(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_logging_status(self, headers: Optional[Dict[Text, Text]] = ...): ... def set_as_logging_target(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_request_payment(self, headers: Optional[Dict[Text, Text]] = ...): ... def set_request_payment(self, payer: str = ..., headers: Optional[Dict[Text, Text]] = ...): ... def configure_versioning(self, versioning, mfa_delete: bool = ..., mfa_token: Optional[Any] = ..., headers: Optional[Dict[Text, Text]] = ...): ... def get_versioning_status(self, headers: Optional[Dict[Text, Text]] = ...): ... def configure_lifecycle(self, lifecycle_config, headers: Optional[Dict[Text, Text]] = ...): ... def get_lifecycle_config(self, headers: Optional[Dict[Text, Text]] = ...): ... def delete_lifecycle_configuration(self, headers: Optional[Dict[Text, Text]] = ...): ... def configure_website(self, suffix: Optional[Any] = ..., error_key: Optional[Any] = ..., redirect_all_requests_to: Optional[Any] = ..., routing_rules: Optional[Any] = ..., headers: Optional[Dict[Text, Text]] = ...): ... def set_website_configuration(self, config, headers: Optional[Dict[Text, Text]] = ...): ... def set_website_configuration_xml(self, xml, headers: Optional[Dict[Text, Text]] = ...): ... def get_website_configuration(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_website_configuration_obj(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_website_configuration_with_xml(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_website_configuration_xml(self, headers: Optional[Dict[Text, Text]] = ...): ... def delete_website_configuration(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_website_endpoint(self): ... def get_policy(self, headers: Optional[Dict[Text, Text]] = ...): ... def set_policy(self, policy, headers: Optional[Dict[Text, Text]] = ...): ... def delete_policy(self, headers: Optional[Dict[Text, Text]] = ...): ... def set_cors_xml(self, cors_xml, headers: Optional[Dict[Text, Text]] = ...): ... def set_cors(self, cors_config, headers: Optional[Dict[Text, Text]] = ...): ... def get_cors_xml(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_cors(self, headers: Optional[Dict[Text, Text]] = ...): ... def delete_cors(self, headers: Optional[Dict[Text, Text]] = ...): ... def initiate_multipart_upload(self, key_name, headers: Optional[Dict[Text, Text]] = ..., reduced_redundancy: bool = ..., metadata: Optional[Any] = ..., encrypt_key: bool = ..., policy: Optional[Any] = ...): ... def complete_multipart_upload(self, key_name, upload_id, xml_body, headers: Optional[Dict[Text, Text]] = ...): ... def cancel_multipart_upload(self, key_name, upload_id, headers: Optional[Dict[Text, Text]] = ...): ... def delete(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_tags(self): ... def get_xml_tags(self): ... def set_xml_tags(self, tag_str, headers: Optional[Dict[Text, Text]] = ..., query_args: str = ...): ... def set_tags(self, tags, headers: Optional[Dict[Text, Text]] = ...): ... def delete_tags(self, headers: Optional[Dict[Text, Text]] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/multidelete.pyi0000664000175000017500000000176613577124116027276 0ustar davedave00000000000000from typing import Any, Optional class Deleted: key: Any version_id: Any delete_marker: Any delete_marker_version_id: Any def __init__(self, key: Optional[Any] = ..., version_id: Optional[Any] = ..., delete_marker: bool = ..., delete_marker_version_id: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class Error: key: Any version_id: Any code: Any message: Any def __init__(self, key: Optional[Any] = ..., version_id: Optional[Any] = ..., code: Optional[Any] = ..., message: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class MultiDeleteResult: bucket: Any deleted: Any errors: Any def __init__(self, bucket: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/deletemarker.pyi0000664000175000017500000000055613577124116027421 0ustar davedave00000000000000from typing import Any, Optional class DeleteMarker: bucket: Any name: Any version_id: Any is_latest: bool last_modified: Any owner: Any def __init__(self, bucket: Optional[Any] = ..., name: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/connection.pyi0000664000175000017500000001040213577124116027103 0ustar davedave00000000000000from .bucket import Bucket from typing import Any, Dict, Optional, Text, Type from boto.connection import AWSAuthConnection from boto.exception import BotoClientError def check_lowercase_bucketname(n): ... def assert_case_insensitive(f): ... class _CallingFormat: def get_bucket_server(self, server, bucket): ... def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ... def build_host(self, server, bucket): ... def build_auth_path(self, bucket, key: str = ...): ... def build_path_base(self, bucket, key: str = ...): ... class SubdomainCallingFormat(_CallingFormat): def get_bucket_server(self, server, bucket): ... class VHostCallingFormat(_CallingFormat): def get_bucket_server(self, server, bucket): ... class OrdinaryCallingFormat(_CallingFormat): def get_bucket_server(self, server, bucket): ... def build_path_base(self, bucket, key: str = ...): ... class ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat): def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ... class Location: DEFAULT: str EU: str EUCentral1: str USWest: str USWest2: str SAEast: str APNortheast: str APSoutheast: str APSoutheast2: str CNNorth1: str class NoHostProvided: ... class HostRequiredError(BotoClientError): ... class S3Connection(AWSAuthConnection): DefaultHost: Any DefaultCallingFormat: Any QueryString: str calling_format: Any bucket_class: Type[Bucket] anon: Any def __init__(self, aws_access_key_id: Optional[Any] = ..., aws_secret_access_key: Optional[Any] = ..., is_secure: bool = ..., port: Optional[Any] = ..., proxy: Optional[Any] = ..., proxy_port: Optional[Any] = ..., proxy_user: Optional[Any] = ..., proxy_pass: Optional[Any] = ..., host: Any = ..., debug: int = ..., https_connection_factory: Optional[Any] = ..., calling_format: Any = ..., path: str = ..., provider: str = ..., bucket_class: Type[Bucket] = ..., security_token: Optional[Any] = ..., suppress_consec_slashes: bool = ..., anon: bool = ..., validate_certs: Optional[Any] = ..., profile_name: Optional[Any] = ...) -> None: ... def __iter__(self): ... def __contains__(self, bucket_name): ... def set_bucket_class(self, bucket_class: Type[Bucket]) -> None: ... def build_post_policy(self, expiration_time, conditions): ... def build_post_form_args(self, bucket_name, key, expires_in: int = ..., acl: Optional[Any] = ..., success_action_redirect: Optional[Any] = ..., max_content_length: Optional[Any] = ..., http_method: str = ..., fields: Optional[Any] = ..., conditions: Optional[Any] = ..., storage_class: str = ..., server_side_encryption: Optional[Any] = ...): ... def generate_url_sigv4(self, expires_in, method, bucket: str = ..., key: str = ..., headers: Optional[Dict[Text, Text]] = ..., force_http: bool = ..., response_headers: Optional[Dict[Text, Text]] = ..., version_id: Optional[Any] = ..., iso_date: Optional[Any] = ...): ... def generate_url(self, expires_in, method, bucket: str = ..., key: str = ..., headers: Optional[Dict[Text, Text]] = ..., query_auth: bool = ..., force_http: bool = ..., response_headers: Optional[Dict[Text, Text]] = ..., expires_in_absolute: bool = ..., version_id: Optional[Any] = ...): ... def get_all_buckets(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_canonical_user_id(self, headers: Optional[Dict[Text, Text]] = ...): ... def get_bucket(self, bucket_name: Text, validate: bool = ..., headers: Optional[Dict[Text, Text]] = ...) -> Bucket: ... def head_bucket(self, bucket_name, headers: Optional[Dict[Text, Text]] = ...): ... def lookup(self, bucket_name, validate: bool = ..., headers: Optional[Dict[Text, Text]] = ...): ... def create_bucket(self, bucket_name, headers: Optional[Dict[Text, Text]] = ..., location: Any = ..., policy: Optional[Any] = ...): ... def delete_bucket(self, bucket, headers: Optional[Dict[Text, Text]] = ...): ... def make_request(self, method, bucket: str = ..., key: str = ..., headers: Optional[Any] = ..., data: str = ..., query_args: Optional[Any] = ..., sender: Optional[Any] = ..., override_num_retries: Optional[Any] = ..., retry_handler: Optional[Any] = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237 jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/keyfile.pyi0000664000175000017500000000125413577124116026401 0ustar davedave00000000000000from typing import Any class KeyFile: key: Any location: int closed: bool softspace: int mode: str encoding: str errors: str newlines: str name: Any def __init__(self, key) -> None: ... def tell(self): ... def seek(self, pos, whence: Any = ...): ... def read(self, size): ... def close(self): ... def isatty(self): ... def getkey(self): ... def write(self, buf): ... def fileno(self): ... def flush(self): ... def next(self): ... def readinto(self): ... def readline(self): ... def readlines(self): ... def truncate(self): ... def writelines(self): ... def xreadlines(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/tagging.pyi0000664000175000017500000000135413577124116026372 0ustar davedave00000000000000from typing import Any, List, Optional class Tag: key: Any value: Any def __init__(self, key: Optional[Any] = ..., value: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... def __eq__(self, other): ... class TagSet(List[Tag]): def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def add_tag(self, key, value): ... def to_xml(self): ... class Tags(List[TagSet]): def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... def add_tag_set(self, tag_set): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/lifecycle.pyi0000664000175000017500000000352213577124116026710 0ustar davedave00000000000000from typing import Any, List, Optional class Rule: id: Any prefix: Any status: Any expiration: Any transition: Any def __init__(self, id: Optional[Any] = ..., prefix: Optional[Any] = ..., status: Optional[Any] = ..., expiration: Optional[Any] = ..., transition: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... class Expiration: days: Any date: Any def __init__(self, days: Optional[Any] = ..., date: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... class Transition: days: Any date: Any storage_class: Any def __init__(self, days: Optional[Any] = ..., date: Optional[Any] = ..., storage_class: Optional[Any] = ...) -> None: ... def to_xml(self): ... class Transitions(List[Transition]): transition_properties: int current_transition_property: int temp_days: Any temp_date: Any temp_storage_class: Any def __init__(self) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... def add_transition(self, days: Optional[Any] = ..., date: Optional[Any] = ..., storage_class: Optional[Any] = ...): ... @property def days(self): ... @property def date(self): ... @property def storage_class(self): ... class Lifecycle(List[Rule]): def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... def add_rule(self, id: Optional[Any] = ..., prefix: str = ..., status: str = ..., expiration: Optional[Any] = ..., transition: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/acl.pyi0000664000175000017500000000312613577124116025510 0ustar davedave00000000000000from .connection import S3Connection from .user import User from typing import Any, Dict, Optional, List, Text, Union CannedACLStrings: List[str] class Policy: parent: Any namespace: Any acl: ACL def __init__(self, parent: Optional[Any] = ...) -> None: ... owner: User def startElement(self, name: Text, attrs: Dict[str, Any], connection: S3Connection) -> Union[None, User, ACL]: ... def endElement(self, name: Text, value: Any, connection: S3Connection) -> None: ... def to_xml(self) -> str: ... class ACL: policy: Policy grants: List[Grant] def __init__(self, policy: Optional[Policy] = ...) -> None: ... def add_grant(self, grant: Grant) -> None: ... def add_email_grant(self, permission: Text, email_address: Text) -> None: ... def add_user_grant(self, permission: Text, user_id: Text, display_name: Optional[Text] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name: Text, value: Any, connection: S3Connection) -> None: ... def to_xml(self) -> str: ... class Grant: NameSpace: Text permission: Text id: Text display_name: Text uri: Text email_address: Text type: Text def __init__(self, permission: Optional[Text] = ..., type: Optional[Text] = ..., id: Optional[Text] = ..., display_name: Optional[Text] = ..., uri: Optional[Text] = ..., email_address: Optional[Text] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name: Text, value: Any, connection: S3Connection) -> None: ... def to_xml(self) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/user.pyi0000664000175000017500000000055213577124116025727 0ustar davedave00000000000000from typing import Any, Optional class User: type: Any id: Any display_name: Any def __init__(self, parent: Optional[Any] = ..., id: str = ..., display_name: str = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self, element_name: str = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/website.pyi0000664000175000017500000000467413577124116026424 0ustar davedave00000000000000from typing import Any, List, Optional def tag(key, value): ... class WebsiteConfiguration: suffix: Any error_key: Any redirect_all_requests_to: Any routing_rules: Any def __init__(self, suffix: Optional[Any] = ..., error_key: Optional[Any] = ..., redirect_all_requests_to: Optional[Any] = ..., routing_rules: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... class _XMLKeyValue: translator: Any container: Any def __init__(self, translator, container: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... class RedirectLocation(_XMLKeyValue): TRANSLATOR: Any hostname: Any protocol: Any def __init__(self, hostname: Optional[Any] = ..., protocol: Optional[Any] = ...) -> None: ... def to_xml(self): ... class RoutingRules(List[RoutingRule]): def add_rule(self, rule: RoutingRule) -> RoutingRules: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... class RoutingRule: condition: Any redirect: Any def __init__(self, condition: Optional[Any] = ..., redirect: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def to_xml(self): ... @classmethod def when(cls, key_prefix: Optional[Any] = ..., http_error_code: Optional[Any] = ...): ... def then_redirect(self, hostname: Optional[Any] = ..., protocol: Optional[Any] = ..., replace_key: Optional[Any] = ..., replace_key_prefix: Optional[Any] = ..., http_redirect_code: Optional[Any] = ...): ... class Condition(_XMLKeyValue): TRANSLATOR: Any key_prefix: Any http_error_code: Any def __init__(self, key_prefix: Optional[Any] = ..., http_error_code: Optional[Any] = ...) -> None: ... def to_xml(self): ... class Redirect(_XMLKeyValue): TRANSLATOR: Any hostname: Any protocol: Any replace_key: Any replace_key_prefix: Any http_redirect_code: Any def __init__(self, hostname: Optional[Any] = ..., protocol: Optional[Any] = ..., replace_key: Optional[Any] = ..., replace_key_prefix: Optional[Any] = ..., http_redirect_code: Optional[Any] = ...) -> None: ... def to_xml(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/prefix.pyi0000664000175000017500000000050413577124116026243 0ustar davedave00000000000000from typing import Any, Optional class Prefix: bucket: Any name: Any def __init__(self, bucket: Optional[Any] = ..., name: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... @property def provider(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/multipart.pyi0000664000175000017500000000345113577124116026773 0ustar davedave00000000000000from typing import Any, Optional class CompleteMultiPartUpload: bucket: Any location: Any bucket_name: Any key_name: Any etag: Any version_id: Any encrypted: Any def __init__(self, bucket: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class Part: bucket: Any part_number: Any last_modified: Any etag: Any size: Any def __init__(self, bucket: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def part_lister(mpupload, part_number_marker: Optional[Any] = ...): ... class MultiPartUpload: bucket: Any bucket_name: Any key_name: Any id: Any initiator: Any owner: Any storage_class: Any initiated: Any part_number_marker: Any next_part_number_marker: Any max_parts: Any is_truncated: bool def __init__(self, bucket: Optional[Any] = ...) -> None: ... def __iter__(self): ... def to_xml(self): ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def get_all_parts(self, max_parts: Optional[Any] = ..., part_number_marker: Optional[Any] = ..., encoding_type: Optional[Any] = ...): ... def upload_part_from_file(self, fp, part_num, headers: Optional[Any] = ..., replace: bool = ..., cb: Optional[Any] = ..., num_cb: int = ..., md5: Optional[Any] = ..., size: Optional[Any] = ...): ... def copy_part_from_key(self, src_bucket_name, src_key_name, part_num, start: Optional[Any] = ..., end: Optional[Any] = ..., src_version_id: Optional[Any] = ..., headers: Optional[Any] = ...): ... def complete_upload(self): ... def cancel_upload(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/s3/bucketlistresultset.pyi0000664000175000017500000000341313577124116031074 0ustar davedave00000000000000from .bucket import Bucket from .key import Key from typing import Any, Iterable, Iterator, Optional def bucket_lister(bucket, prefix: str = ..., delimiter: str = ..., marker: str = ..., headers: Optional[Any] = ..., encoding_type: Optional[Any] = ...): ... class BucketListResultSet(Iterable[Key]): bucket: Any prefix: Any delimiter: Any marker: Any headers: Any encoding_type: Any def __init__(self, bucket: Optional[Any] = ..., prefix: str = ..., delimiter: str = ..., marker: str = ..., headers: Optional[Any] = ..., encoding_type: Optional[Any] = ...) -> None: ... def __iter__(self) -> Iterator[Key]: ... def versioned_bucket_lister(bucket, prefix: str = ..., delimiter: str = ..., key_marker: str = ..., version_id_marker: str = ..., headers: Optional[Any] = ..., encoding_type: Optional[Any] = ...): ... class VersionedBucketListResultSet: bucket: Any prefix: Any delimiter: Any key_marker: Any version_id_marker: Any headers: Any encoding_type: Any def __init__(self, bucket: Optional[Any] = ..., prefix: str = ..., delimiter: str = ..., key_marker: str = ..., version_id_marker: str = ..., headers: Optional[Any] = ..., encoding_type: Optional[Any] = ...) -> None: ... def __iter__(self) -> Iterator[Key]: ... def multipart_upload_lister(bucket, key_marker: str = ..., upload_id_marker: str = ..., headers: Optional[Any] = ..., encoding_type: Optional[Any] = ...): ... class MultiPartUploadListResultSet: bucket: Any key_marker: Any upload_id_marker: Any headers: Any encoding_type: Any def __init__(self, bucket: Optional[Any] = ..., key_marker: str = ..., upload_id_marker: str = ..., headers: Optional[Any] = ..., encoding_type: Optional[Any] = ...) -> None: ... def __iter__(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/kms/0000775000175000017500000000000013577125145024474 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/kms/__init__.pyi0000664000175000017500000000023413577124116026752 0ustar davedave00000000000000from typing import List import boto.regioninfo def regions() -> List[boto.regioninfo.RegionInfo]: ... def connect_to_region(region_name, **kw_params): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/kms/layer1.pyi0000664000175000017500000000705513577124116026420 0ustar davedave00000000000000from typing import Any, Dict, List, Mapping, Optional, Type from boto.connection import AWSQueryConnection class KMSConnection(AWSQueryConnection): APIVersion: str DefaultRegionName: str DefaultRegionEndpoint: str ServiceName: str TargetPrefix: str ResponseError: Type[Exception] region: Any def __init__(self, **kwargs) -> None: ... def create_alias(self, alias_name: str, target_key_id: str) -> Optional[Dict[str, Any]]: ... def create_grant(self, key_id: str, grantee_principal: str, retiring_principal: Optional[str] = ..., operations: Optional[List[str]] = ..., constraints: Optional[Dict[str, Dict[str, str]]] = ..., grant_tokens: Optional[List[str]] = ...) -> Optional[Dict[str, Any]]: ... def create_key(self, policy: Optional[str] = ..., description: Optional[str] = ..., key_usage: Optional[str] = ...) -> Optional[Dict[str, Any]]: ... def decrypt(self, ciphertext_blob: bytes, encryption_context: Optional[Mapping[str, Any]] = ..., grant_tokens: Optional[List[str]] = ...) -> Optional[Dict[str, Any]]: ... def delete_alias(self, alias_name: str) -> Optional[Dict[str, Any]]: ... def describe_key(self, key_id: str) -> Optional[Dict[str, Any]]: ... def disable_key(self, key_id: str) -> Optional[Dict[str, Any]]: ... def disable_key_rotation(self, key_id: str) -> Optional[Dict[str, Any]]: ... def enable_key(self, key_id: str) -> Optional[Dict[str, Any]]: ... def enable_key_rotation(self, key_id: str) -> Optional[Dict[str, Any]]: ... def encrypt(self, key_id: str, plaintext: bytes, encryption_context: Optional[Mapping[str, Any]] = ..., grant_tokens: Optional[List[str]] = ...) -> Optional[Dict[str, Any]]: ... def generate_data_key(self, key_id: str, encryption_context: Optional[Mapping[str, Any]] = ..., number_of_bytes: Optional[int] = ..., key_spec: Optional[str] = ..., grant_tokens: Optional[List[str]] = ...) -> Optional[Dict[str, Any]]: ... def generate_data_key_without_plaintext(self, key_id: str, encryption_context: Optional[Mapping[str, Any]] = ..., key_spec: Optional[str] = ..., number_of_bytes: Optional[int] = ..., grant_tokens: Optional[List[str]] = ...) -> Optional[Dict[str, Any]]: ... def generate_random(self, number_of_bytes: Optional[int] = ...) -> Optional[Dict[str, Any]]: ... def get_key_policy(self, key_id: str, policy_name: str) -> Optional[Dict[str, Any]]: ... def get_key_rotation_status(self, key_id: str) -> Optional[Dict[str, Any]]: ... def list_aliases(self, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ... def list_grants(self, key_id: str, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ... def list_key_policies(self, key_id: str, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ... def list_keys(self, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ... def put_key_policy(self, key_id: str, policy_name: str, policy: str) -> Optional[Dict[str, Any]]: ... def re_encrypt(self, ciphertext_blob: bytes, destination_key_id: str, source_encryption_context: Optional[Mapping[str, Any]] = ..., destination_encryption_context: Optional[Mapping[str, Any]] = ..., grant_tokens: Optional[List[str]] = ...) -> Optional[Dict[str, Any]]: ... def retire_grant(self, grant_token: str) -> Optional[Dict[str, Any]]: ... def revoke_grant(self, key_id: str, grant_id: str) -> Optional[Dict[str, Any]]: ... def update_key_description(self, key_id: str, description: str) -> Optional[Dict[str, Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/kms/exceptions.pyi0000664000175000017500000000147513577124116027404 0ustar davedave00000000000000from boto.exception import BotoServerError class InvalidGrantTokenException(BotoServerError): ... class DisabledException(BotoServerError): ... class LimitExceededException(BotoServerError): ... class DependencyTimeoutException(BotoServerError): ... class InvalidMarkerException(BotoServerError): ... class AlreadyExistsException(BotoServerError): ... class InvalidCiphertextException(BotoServerError): ... class KeyUnavailableException(BotoServerError): ... class InvalidAliasNameException(BotoServerError): ... class UnsupportedOperationException(BotoServerError): ... class InvalidArnException(BotoServerError): ... class KMSInternalException(BotoServerError): ... class InvalidKeyUsageException(BotoServerError): ... class MalformedPolicyDocumentException(BotoServerError): ... class NotFoundException(BotoServerError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/ec2/0000775000175000017500000000000013577125145024353 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/ec2/__init__.pyi0000664000175000017500000000025213577124116026631 0ustar davedave00000000000000from typing import Any RegionData: Any def regions(**kw_params): ... def connect_to_region(region_name, **kw_params): ... def get_region(region_name, **kw_params): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/compat.pyi0000664000175000017500000000047113577124116025707 0ustar davedave00000000000000import sys from typing import Any from base64 import encodestring as encodebytes from six.moves import http_client expanduser: Any if sys.version_info >= (3, 0): StandardError = Exception else: from __builtin__ import StandardError as StandardError long_type: Any unquote_str: Any parse_qs_safe: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/regioninfo.pyi0000664000175000017500000000121613577124116026561 0ustar davedave00000000000000from typing import Any, Optional def load_endpoint_json(path): ... def merge_endpoints(defaults, additions): ... def load_regions(): ... def get_regions(service_name, region_cls: Optional[Any] = ..., connection_cls: Optional[Any] = ...): ... class RegionInfo: connection: Any name: Any endpoint: Any connection_cls: Any def __init__(self, connection: Optional[Any] = ..., name: Optional[Any] = ..., endpoint: Optional[Any] = ..., connection_cls: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... def connect(self, **kw_params): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/exception.pyi0000664000175000017500000001073013577124116026421 0ustar davedave00000000000000from typing import Any, Optional from boto.compat import StandardError class BotoClientError(StandardError): reason: Any def __init__(self, reason, *args) -> None: ... class SDBPersistenceError(StandardError): ... class StoragePermissionsError(BotoClientError): ... class S3PermissionsError(StoragePermissionsError): ... class GSPermissionsError(StoragePermissionsError): ... class BotoServerError(StandardError): status: Any reason: Any body: Any request_id: Any error_code: Any message: str box_usage: Any def __init__(self, status, reason, body: Optional[Any] = ..., *args) -> None: ... def __getattr__(self, name): ... def __setattr__(self, name, value): ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class ConsoleOutput: parent: Any instance_id: Any timestamp: Any comment: Any output: Any def __init__(self, parent: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class StorageCreateError(BotoServerError): bucket: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def endElement(self, name, value, connection): ... class S3CreateError(StorageCreateError): ... class GSCreateError(StorageCreateError): ... class StorageCopyError(BotoServerError): ... class S3CopyError(StorageCopyError): ... class GSCopyError(StorageCopyError): ... class SQSError(BotoServerError): detail: Any type: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class SQSDecodeError(BotoClientError): message: Any def __init__(self, reason, message) -> None: ... class StorageResponseError(BotoServerError): resource: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class S3ResponseError(StorageResponseError): ... class GSResponseError(StorageResponseError): ... class EC2ResponseError(BotoServerError): errors: Any def __init__(self, status, reason, body: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... request_id: Any def endElement(self, name, value, connection): ... class JSONResponseError(BotoServerError): status: Any reason: Any body: Any error_message: Any error_code: Any def __init__(self, status, reason, body: Optional[Any] = ..., *args) -> None: ... class DynamoDBResponseError(JSONResponseError): ... class SWFResponseError(JSONResponseError): ... class EmrResponseError(BotoServerError): ... class _EC2Error: connection: Any error_code: Any error_message: Any def __init__(self, connection: Optional[Any] = ...) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... class SDBResponseError(BotoServerError): ... class AWSConnectionError(BotoClientError): ... class StorageDataError(BotoClientError): ... class S3DataError(StorageDataError): ... class GSDataError(StorageDataError): ... class InvalidUriError(Exception): message: Any def __init__(self, message) -> None: ... class InvalidAclError(Exception): message: Any def __init__(self, message) -> None: ... class InvalidCorsError(Exception): message: Any def __init__(self, message) -> None: ... class NoAuthHandlerFound(Exception): ... class InvalidLifecycleConfigError(Exception): message: Any def __init__(self, message) -> None: ... class ResumableTransferDisposition: START_OVER: str WAIT_BEFORE_RETRY: str ABORT_CUR_PROCESS: str ABORT: str class ResumableUploadException(Exception): message: Any disposition: Any def __init__(self, message, disposition) -> None: ... class ResumableDownloadException(Exception): message: Any disposition: Any def __init__(self, message, disposition) -> None: ... class TooManyRecordsException(Exception): message: Any def __init__(self, message) -> None: ... class PleaseRetryException(Exception): message: Any response: Any def __init__(self, message, response: Optional[Any] = ...) -> None: ... class InvalidInstanceMetadataError(Exception): MSG: str def __init__(self, msg) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/boto/auth_handler.pyi0000664000175000017500000000037213577124116027062 0ustar davedave00000000000000from typing import Any from boto.plugin import Plugin class NotReadyToAuthenticate(Exception): ... class AuthHandler(Plugin): capability: Any def __init__(self, host, config, provider) -> None: ... def add_auth(self, http_request): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/0000775000175000017500000000000013577125145024114 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/__init__.pyi0000664000175000017500000000253313577124116026376 0ustar davedave00000000000000from jinja2.environment import Environment as Environment, Template as Template from jinja2.loaders import BaseLoader as BaseLoader, FileSystemLoader as FileSystemLoader, PackageLoader as PackageLoader, DictLoader as DictLoader, FunctionLoader as FunctionLoader, PrefixLoader as PrefixLoader, ChoiceLoader as ChoiceLoader, ModuleLoader as ModuleLoader from jinja2.bccache import BytecodeCache as BytecodeCache, FileSystemBytecodeCache as FileSystemBytecodeCache, MemcachedBytecodeCache as MemcachedBytecodeCache from jinja2.runtime import Undefined as Undefined, DebugUndefined as DebugUndefined, StrictUndefined as StrictUndefined, make_logging_undefined as make_logging_undefined from jinja2.exceptions import TemplateError as TemplateError, UndefinedError as UndefinedError, TemplateNotFound as TemplateNotFound, TemplatesNotFound as TemplatesNotFound, TemplateSyntaxError as TemplateSyntaxError, TemplateAssertionError as TemplateAssertionError from jinja2.filters import environmentfilter as environmentfilter, contextfilter as contextfilter, evalcontextfilter as evalcontextfilter from jinja2.utils import Markup as Markup, escape as escape, clear_caches as clear_caches, environmentfunction as environmentfunction, evalcontextfunction as evalcontextfunction, contextfunction as contextfunction, is_undefined as is_undefined, select_autoescape as select_autoescape jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/compiler.pyi0000664000175000017500000001433213577124116026451 0ustar davedave00000000000000from typing import Any, Optional from keyword import iskeyword as is_python_keyword from jinja2.visitor import NodeVisitor operators: Any dict_item_iter: str unoptimize_before_dead_code: bool def generate(node, environment, name, filename, stream: Optional[Any] = ..., defer_init: bool = ...): ... def has_safe_repr(value): ... def find_undeclared(nodes, names): ... class Identifiers: declared: Any outer_undeclared: Any undeclared: Any declared_locally: Any declared_parameter: Any def __init__(self) -> None: ... def add_special(self, name): ... def is_declared(self, name): ... def copy(self): ... class Frame: eval_ctx: Any identifiers: Any toplevel: bool rootlevel: bool require_output_check: Any buffer: Any block: Any assigned_names: Any parent: Any def __init__(self, eval_ctx, parent: Optional[Any] = ...) -> None: ... def copy(self): ... def inspect(self, nodes): ... def find_shadowed(self, extra: Any = ...): ... def inner(self): ... def soft(self): ... __copy__: Any class VisitorExit(RuntimeError): ... class DependencyFinderVisitor(NodeVisitor): filters: Any tests: Any def __init__(self) -> None: ... def visit_Filter(self, node): ... def visit_Test(self, node): ... def visit_Block(self, node): ... class UndeclaredNameVisitor(NodeVisitor): names: Any undeclared: Any def __init__(self, names) -> None: ... def visit_Name(self, node): ... def visit_Block(self, node): ... class FrameIdentifierVisitor(NodeVisitor): identifiers: Any def __init__(self, identifiers) -> None: ... def visit_Name(self, node): ... def visit_If(self, node): ... def visit_Macro(self, node): ... def visit_Import(self, node): ... def visit_FromImport(self, node): ... def visit_Assign(self, node): ... def visit_For(self, node): ... def visit_CallBlock(self, node): ... def visit_FilterBlock(self, node): ... def visit_AssignBlock(self, node): ... def visit_Scope(self, node): ... def visit_Block(self, node): ... class CompilerExit(Exception): ... class CodeGenerator(NodeVisitor): environment: Any name: Any filename: Any stream: Any created_block_context: bool defer_init: Any import_aliases: Any blocks: Any extends_so_far: int has_known_extends: bool code_lineno: int tests: Any filters: Any debug_info: Any def __init__(self, environment, name, filename, stream: Optional[Any] = ..., defer_init: bool = ...) -> None: ... def fail(self, msg, lineno): ... def temporary_identifier(self): ... def buffer(self, frame): ... def return_buffer_contents(self, frame): ... def indent(self): ... def outdent(self, step: int = ...): ... def start_write(self, frame, node: Optional[Any] = ...): ... def end_write(self, frame): ... def simple_write(self, s, frame, node: Optional[Any] = ...): ... def blockvisit(self, nodes, frame): ... def write(self, x): ... def writeline(self, x, node: Optional[Any] = ..., extra: int = ...): ... def newline(self, node: Optional[Any] = ..., extra: int = ...): ... def signature(self, node, frame, extra_kwargs: Optional[Any] = ...): ... def pull_locals(self, frame): ... def pull_dependencies(self, nodes): ... def unoptimize_scope(self, frame): ... def push_scope(self, frame, extra_vars: Any = ...): ... def pop_scope(self, aliases, frame): ... def function_scoping(self, node, frame, children: Optional[Any] = ..., find_special: bool = ...): ... def macro_body(self, node, frame, children: Optional[Any] = ...): ... def macro_def(self, node, frame): ... def position(self, node): ... def visit_Template(self, node, frame: Optional[Any] = ...): ... def visit_Block(self, node, frame): ... def visit_Extends(self, node, frame): ... def visit_Include(self, node, frame): ... def visit_Import(self, node, frame): ... def visit_FromImport(self, node, frame): ... def visit_For(self, node, frame): ... def visit_If(self, node, frame): ... def visit_Macro(self, node, frame): ... def visit_CallBlock(self, node, frame): ... def visit_FilterBlock(self, node, frame): ... def visit_ExprStmt(self, node, frame): ... def visit_Output(self, node, frame): ... def make_assignment_frame(self, frame): ... def export_assigned_vars(self, frame, assignment_frame): ... def visit_Assign(self, node, frame): ... def visit_AssignBlock(self, node, frame): ... def visit_Name(self, node, frame): ... def visit_Const(self, node, frame): ... def visit_TemplateData(self, node, frame): ... def visit_Tuple(self, node, frame): ... def visit_List(self, node, frame): ... def visit_Dict(self, node, frame): ... def binop(self, interceptable: bool = ...): ... def uaop(self, interceptable: bool = ...): ... visit_Add: Any visit_Sub: Any visit_Mul: Any visit_Div: Any visit_FloorDiv: Any visit_Pow: Any visit_Mod: Any visit_And: Any visit_Or: Any visit_Pos: Any visit_Neg: Any visit_Not: Any def visit_Concat(self, node, frame): ... def visit_Compare(self, node, frame): ... def visit_Operand(self, node, frame): ... def visit_Getattr(self, node, frame): ... def visit_Getitem(self, node, frame): ... def visit_Slice(self, node, frame): ... def visit_Filter(self, node, frame): ... def visit_Test(self, node, frame): ... def visit_CondExpr(self, node, frame): ... def visit_Call(self, node, frame, forward_caller: bool = ...): ... def visit_Keyword(self, node, frame): ... def visit_MarkSafe(self, node, frame): ... def visit_MarkSafeIfAutoescape(self, node, frame): ... def visit_EnvironmentAttribute(self, node, frame): ... def visit_ExtensionAttribute(self, node, frame): ... def visit_ImportedName(self, node, frame): ... def visit_InternalName(self, node, frame): ... def visit_ContextReference(self, node, frame): ... def visit_Continue(self, node, frame): ... def visit_Break(self, node, frame): ... def visit_Scope(self, node, frame): ... def visit_EvalContextModifier(self, node, frame): ... def visit_ScopedEvalContextModifier(self, node, frame): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/_compat.pyi0000664000175000017500000000120413577124116026253 0ustar davedave00000000000000from typing import Any, Optional import sys if sys.version_info[0] >= 3: from io import BytesIO from urllib.parse import quote_from_bytes as url_quote else: from cStringIO import StringIO as BytesIO from urllib import quote as url_quote PY2: Any PYPY: Any unichr: Any range_type: Any text_type: Any string_types: Any integer_types: Any iterkeys: Any itervalues: Any iteritems: Any NativeStringIO: Any def reraise(tp, value, tb: Optional[Any] = ...): ... ifilter: Any imap: Any izip: Any intern: Any implements_iterator: Any implements_to_string: Any encode_filename: Any get_next: Any def with_metaclass(meta, *bases): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/optimizer.pyi0000664000175000017500000000122413577124116026655 0ustar davedave00000000000000from typing import Any from jinja2.visitor import NodeTransformer def optimize(node, environment): ... class Optimizer(NodeTransformer): environment: Any def __init__(self, environment) -> None: ... def visit_If(self, node): ... def fold(self, node): ... visit_Add: Any visit_Sub: Any visit_Mul: Any visit_Div: Any visit_FloorDiv: Any visit_Pow: Any visit_Mod: Any visit_And: Any visit_Or: Any visit_Pos: Any visit_Neg: Any visit_Not: Any visit_Compare: Any visit_Getitem: Any visit_Getattr: Any visit_Call: Any visit_Filter: Any visit_Test: Any visit_CondExpr: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/loaders.pyi0000664000175000017500000000525513577124116026274 0ustar davedave00000000000000from typing import Any, Callable, Iterable, List, Optional, Text, Tuple, Union from types import ModuleType from .environment import Environment def split_template_path(template: Text) -> List[Text]: ... class BaseLoader: has_source_access: bool def get_source(self, environment, template): ... def list_templates(self): ... def load(self, environment, name, globals: Optional[Any] = ...): ... class FileSystemLoader(BaseLoader): searchpath: Text encoding: Any followlinks: Any def __init__(self, searchpath: Union[Text, Iterable[Text]], encoding: Text = ..., followlinks: bool = ...) -> None: ... def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ... def list_templates(self): ... class PackageLoader(BaseLoader): encoding: Text manager: Any filesystem_bound: Any provider: Any package_path: Any def __init__(self, package_name: Text, package_path: Text = ..., encoding: Text = ...) -> None: ... def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ... def list_templates(self): ... class DictLoader(BaseLoader): mapping: Any def __init__(self, mapping) -> None: ... def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ... def list_templates(self): ... class FunctionLoader(BaseLoader): load_func: Any def __init__(self, load_func) -> None: ... def get_source( self, environment: Environment, template: Text, ) -> Tuple[Text, Optional[Text], Optional[Callable[..., Any]]]: ... class PrefixLoader(BaseLoader): mapping: Any delimiter: Any def __init__(self, mapping, delimiter: str = ...) -> None: ... def get_loader(self, template): ... def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ... def load(self, environment, name, globals: Optional[Any] = ...): ... def list_templates(self): ... class ChoiceLoader(BaseLoader): loaders: Any def __init__(self, loaders) -> None: ... def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ... def load(self, environment, name, globals: Optional[Any] = ...): ... def list_templates(self): ... class _TemplateModule(ModuleType): ... class ModuleLoader(BaseLoader): has_source_access: bool module: Any package_name: Any def __init__(self, path) -> None: ... @staticmethod def get_template_key(name): ... @staticmethod def get_module_filename(name): ... def load(self, environment, name, globals: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/lexer.pyi0000664000175000017500000000531413577124116025756 0ustar davedave00000000000000from typing import Any, Optional, Tuple whitespace_re: Any string_re: Any integer_re: Any name_re: Any float_re: Any newline_re: Any TOKEN_ADD: Any TOKEN_ASSIGN: Any TOKEN_COLON: Any TOKEN_COMMA: Any TOKEN_DIV: Any TOKEN_DOT: Any TOKEN_EQ: Any TOKEN_FLOORDIV: Any TOKEN_GT: Any TOKEN_GTEQ: Any TOKEN_LBRACE: Any TOKEN_LBRACKET: Any TOKEN_LPAREN: Any TOKEN_LT: Any TOKEN_LTEQ: Any TOKEN_MOD: Any TOKEN_MUL: Any TOKEN_NE: Any TOKEN_PIPE: Any TOKEN_POW: Any TOKEN_RBRACE: Any TOKEN_RBRACKET: Any TOKEN_RPAREN: Any TOKEN_SEMICOLON: Any TOKEN_SUB: Any TOKEN_TILDE: Any TOKEN_WHITESPACE: Any TOKEN_FLOAT: Any TOKEN_INTEGER: Any TOKEN_NAME: Any TOKEN_STRING: Any TOKEN_OPERATOR: Any TOKEN_BLOCK_BEGIN: Any TOKEN_BLOCK_END: Any TOKEN_VARIABLE_BEGIN: Any TOKEN_VARIABLE_END: Any TOKEN_RAW_BEGIN: Any TOKEN_RAW_END: Any TOKEN_COMMENT_BEGIN: Any TOKEN_COMMENT_END: Any TOKEN_COMMENT: Any TOKEN_LINESTATEMENT_BEGIN: Any TOKEN_LINESTATEMENT_END: Any TOKEN_LINECOMMENT_BEGIN: Any TOKEN_LINECOMMENT_END: Any TOKEN_LINECOMMENT: Any TOKEN_DATA: Any TOKEN_INITIAL: Any TOKEN_EOF: Any operators: Any reverse_operators: Any operator_re: Any ignored_tokens: Any ignore_if_empty: Any def describe_token(token): ... def describe_token_expr(expr): ... def count_newlines(value): ... def compile_rules(environment): ... class Failure: message: Any error_class: Any def __init__(self, message, cls: Any = ...) -> None: ... def __call__(self, lineno, filename): ... class Token(Tuple[int, Any, Any]): lineno: Any type: Any value: Any def __new__(cls, lineno, type, value): ... def test(self, expr): ... def test_any(self, *iterable): ... class TokenStreamIterator: stream: Any def __init__(self, stream) -> None: ... def __iter__(self): ... def __next__(self): ... class TokenStream: name: Any filename: Any closed: bool current: Any def __init__(self, generator, name, filename) -> None: ... def __iter__(self): ... def __bool__(self): ... __nonzero__: Any eos: Any def push(self, token): ... def look(self): ... def skip(self, n: int = ...): ... def next_if(self, expr): ... def skip_if(self, expr): ... def __next__(self): ... def close(self): ... def expect(self, expr): ... def get_lexer(environment): ... class Lexer: newline_sequence: Any keep_trailing_newline: Any rules: Any def __init__(self, environment) -> None: ... def tokenize(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...): ... def wrap(self, stream, name: Optional[Any] = ..., filename: Optional[Any] = ...): ... def tokeniter(self, source, name, filename: Optional[Any] = ..., state: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/utils.pyi0000664000175000017500000000375313577124116026004 0ustar davedave00000000000000from typing import Any, Callable, Iterable, Optional from markupsafe import Markup as Markup, escape as escape, soft_unicode as soft_unicode missing: Any internal_code: Any concat: Any def contextfunction(f): ... def evalcontextfunction(f): ... def environmentfunction(f): ... def internalcode(f): ... def is_undefined(obj): ... def select_autoescape(enabled_extensions: Iterable[str] = ..., disabled_extensions: Iterable[str] = ..., default_for_string: bool = ..., default: bool = ...) -> Callable[[str], bool]: ... def consume(iterable): ... def clear_caches(): ... def import_string(import_name, silent: bool = ...): ... def open_if_exists(filename, mode: str = ...): ... def object_type_repr(obj): ... def pformat(obj, verbose: bool = ...): ... def urlize(text, trim_url_limit: Optional[Any] = ..., nofollow: bool = ..., target: Optional[Any] = ...): ... def generate_lorem_ipsum(n: int = ..., html: bool = ..., min: int = ..., max: int = ...): ... def unicode_urlencode(obj, charset: str = ..., for_qs: bool = ...): ... class LRUCache: capacity: Any def __init__(self, capacity) -> None: ... def __getnewargs__(self): ... def copy(self): ... def get(self, key, default: Optional[Any] = ...): ... def setdefault(self, key, default: Optional[Any] = ...): ... def clear(self): ... def __contains__(self, key): ... def __len__(self): ... def __getitem__(self, key): ... def __setitem__(self, key, value): ... def __delitem__(self, key): ... def items(self): ... def iteritems(self): ... def values(self): ... def itervalue(self): ... def keys(self): ... def iterkeys(self): ... __iter__: Any def __reversed__(self): ... __copy__: Any class Cycler: items: Any def __init__(self, *items) -> None: ... pos: int def reset(self): ... @property def current(self): ... def __next__(self): ... class Joiner: sep: Any used: bool def __init__(self, sep: str = ...) -> None: ... def __call__(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/environment.pyi0000664000175000017500000001745213577124116027211 0ustar davedave00000000000000import sys from typing import Any, Callable, Dict, Iterator, List, Optional, Text, Type, Union from .bccache import BytecodeCache from .loaders import BaseLoader from .runtime import Context, Undefined if sys.version_info >= (3, 6): from typing import Awaitable, AsyncIterator def get_spontaneous_environment(*args): ... def create_cache(size): ... def copy_cache(cache): ... def load_extensions(environment, extensions): ... class Environment: sandboxed: bool overlayed: bool linked_to: Any shared: bool exception_handler: Any exception_formatter: Any code_generator_class: Any context_class: Any block_start_string: Text block_end_string: Text variable_start_string: Text variable_end_string: Text comment_start_string: Text comment_end_string: Text line_statement_prefix: Text line_comment_prefix: Text trim_blocks: bool lstrip_blocks: Any newline_sequence: Text keep_trailing_newline: bool undefined: Type[Undefined] optimized: bool finalize: Callable[..., Any] autoescape: Any filters: Any tests: Any globals: Dict[str, Any] loader: BaseLoader cache: Any bytecode_cache: BytecodeCache auto_reload: bool extensions: List[Any] def __init__( self, block_start_string: Text = ..., block_end_string: Text = ..., variable_start_string: Text = ..., variable_end_string: Text = ..., comment_start_string: Any = ..., comment_end_string: Text = ..., line_statement_prefix: Text = ..., line_comment_prefix: Text = ..., trim_blocks: bool = ..., lstrip_blocks: bool = ..., newline_sequence: Text = ..., keep_trailing_newline: bool = ..., extensions: List[Any] = ..., optimized: bool = ..., undefined: Type[Undefined] = ..., finalize: Optional[Callable[..., Any]] = ..., autoescape: Union[bool, Callable[[str], bool]] = ..., loader: Optional[BaseLoader] = ..., cache_size: int = ..., auto_reload: bool = ..., bytecode_cache: Optional[BytecodeCache] = ..., enable_async: bool = ..., ) -> None: ... def add_extension(self, extension): ... def extend(self, **attributes): ... def overlay( self, block_start_string: Text = ..., block_end_string: Text = ..., variable_start_string: Text = ..., variable_end_string: Text = ..., comment_start_string: Any = ..., comment_end_string: Text = ..., line_statement_prefix: Text = ..., line_comment_prefix: Text = ..., trim_blocks: bool = ..., lstrip_blocks: bool = ..., extensions: List[Any] = ..., optimized: bool = ..., undefined: Type[Undefined] = ..., finalize: Callable[..., Any] = ..., autoescape: bool = ..., loader: Optional[BaseLoader] = ..., cache_size: int = ..., auto_reload: bool = ..., bytecode_cache: Optional[BytecodeCache] = ..., ): ... lexer: Any def iter_extensions(self): ... def getitem(self, obj, argument): ... def getattr(self, obj, attribute): ... def call_filter(self, name, value, args: Optional[Any] = ..., kwargs: Optional[Any] = ..., context: Optional[Any] = ..., eval_ctx: Optional[Any] = ...): ... def call_test(self, name, value, args: Optional[Any] = ..., kwargs: Optional[Any] = ...): ... def parse(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ...): ... def lex(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ...): ... def preprocess(self, source: Text, name: Optional[Any] = ..., filename: Optional[Any] = ...): ... def compile(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., raw: bool = ..., defer_init: bool = ...): ... def compile_expression(self, source: Text, undefined_to_none: bool = ...): ... def compile_templates(self, target, extensions: Optional[Any] = ..., filter_func: Optional[Any] = ..., zip: str = ..., log_function: Optional[Any] = ..., ignore_errors: bool = ..., py_compile: bool = ...): ... def list_templates(self, extensions: Optional[Any] = ..., filter_func: Optional[Any] = ...): ... def handle_exception(self, exc_info: Optional[Any] = ..., rendered: bool = ..., source_hint: Optional[Any] = ...): ... def join_path(self, template: Union[Template, Text], parent: Text) -> Text: ... def get_template(self, name: Union[Template, Text], parent: Optional[Text] = ..., globals: Optional[Any] = ...) -> Template: ... def select_template(self, names: List[Union[Template, Text]], parent: Optional[Text] = ..., globals: Optional[Dict[str, Any]] = ...) -> Template: ... def get_or_select_template(self, template_name_or_list: Union[Union[Template, Text], List[Union[Template, Text]]], parent: Optional[Text] = ..., globals: Optional[Dict[str, Any]] = ...) -> Template: ... def from_string(self, source: Text, globals: Optional[Dict[str, Any]] = ..., template_class: Optional[Type[Template]] = ...) -> Template: ... def make_globals(self, d: Optional[Dict[str, Any]]) -> Dict[str, Any]: ... # Frequently added extensions are included here: # from InternationalizationExtension: def install_gettext_translations(self, translations: Any, newstyle: Optional[bool]): ... def install_null_translations(self, newstyle: Optional[bool]): ... def install_gettext_callables(self, gettext: Callable[..., Any], ngettext: Callable[..., Any], newstyle: Optional[bool]): ... def uninstall_gettext_translations(self, translations: Any): ... def extract_translations(self, source: Any, gettext_functions: Any): ... newstyle_gettext: bool class Template: def __new__(cls, source, block_start_string: Any = ..., block_end_string: Any = ..., variable_start_string: Any = ..., variable_end_string: Any = ..., comment_start_string: Any = ..., comment_end_string: Any = ..., line_statement_prefix: Any = ..., line_comment_prefix: Any = ..., trim_blocks: Any = ..., lstrip_blocks: Any = ..., newline_sequence: Any = ..., keep_trailing_newline: Any = ..., extensions: Any = ..., optimized: bool = ..., undefined: Any = ..., finalize: Optional[Any] = ..., autoescape: bool = ...): ... environment: Environment = ... @classmethod def from_code(cls, environment, code, globals, uptodate: Optional[Any] = ...): ... @classmethod def from_module_dict(cls, environment, module_dict, globals): ... def render(self, *args, **kwargs) -> Text: ... def stream(self, *args, **kwargs) -> TemplateStream: ... def generate(self, *args, **kwargs) -> Iterator[Text]: ... def new_context(self, vars: Optional[Dict[str, Any]] = ..., shared: bool = ..., locals: Optional[Dict[str, Any]] = ...) -> Context: ... def make_module(self, vars: Optional[Dict[str, Any]] = ..., shared: bool = ..., locals: Optional[Dict[str, Any]] = ...) -> Context: ... @property def module(self) -> Any: ... def get_corresponding_lineno(self, lineno): ... @property def is_up_to_date(self) -> bool: ... @property def debug_info(self): ... if sys.version_info >= (3, 6): def render_async(self, *args, **kwargs) -> Awaitable[Text]: ... def generate_async(self, *args, **kwargs) -> AsyncIterator[Text]: ... class TemplateModule: __name__: Any def __init__(self, template, context) -> None: ... def __html__(self): ... class TemplateExpression: def __init__(self, template, undefined_to_none) -> None: ... def __call__(self, *args, **kwargs): ... class TemplateStream: def __init__(self, gen) -> None: ... def dump(self, fp, encoding: Optional[Text] = ..., errors: Text = ...): ... buffered: bool def disable_buffering(self) -> None: ... def enable_buffering(self, size: int = ...) -> None: ... def __iter__(self): ... def __next__(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/meta.pyi0000664000175000017500000000052213577124116025561 0ustar davedave00000000000000from typing import Any from jinja2.compiler import CodeGenerator class TrackingCodeGenerator(CodeGenerator): undeclared_identifiers: Any def __init__(self, environment) -> None: ... def write(self, x): ... def pull_locals(self, frame): ... def find_undeclared_variables(ast): ... def find_referenced_templates(ast): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/runtime.pyi0000664000175000017500000000657113577124116026330 0ustar davedave00000000000000from typing import Any, Dict, Optional, Text, Union from jinja2.utils import Markup as Markup, escape as escape, missing as missing, concat as concat from jinja2.exceptions import TemplateRuntimeError as TemplateRuntimeError, TemplateNotFound as TemplateNotFound from jinja2.environment import Environment to_string: Any identity: Any def markup_join(seq): ... def unicode_join(seq): ... class TemplateReference: def __init__(self, context) -> None: ... def __getitem__(self, name): ... class Context: parent: Union[Context, Dict[str, Any]] vars: Dict[str, Any] environment: Environment eval_ctx: Any exported_vars: Any name: Text blocks: Dict[str, Any] def __init__(self, environment: Environment, parent: Union[Context, Dict[str, Any]], name: Text, blocks: Dict[str, Any]) -> None: ... def super(self, name, current): ... def get(self, key, default: Optional[Any] = ...): ... def resolve(self, key): ... def get_exported(self): ... def get_all(self): ... def call(__self, __obj, *args, **kwargs): ... def derived(self, locals: Optional[Any] = ...): ... keys: Any values: Any items: Any iterkeys: Any itervalues: Any iteritems: Any def __contains__(self, name): ... def __getitem__(self, key): ... class BlockReference: name: Any def __init__(self, name, context, stack, depth) -> None: ... @property def super(self): ... def __call__(self): ... class LoopContext: index0: int depth0: Any def __init__(self, iterable, recurse: Optional[Any] = ..., depth0: int = ...) -> None: ... def cycle(self, *args): ... first: Any last: Any index: Any revindex: Any revindex0: Any depth: Any def __len__(self): ... def __iter__(self): ... def loop(self, iterable): ... __call__: Any @property def length(self): ... class LoopContextIterator: context: Any def __init__(self, context) -> None: ... def __iter__(self): ... def __next__(self): ... class Macro: name: Any arguments: Any defaults: Any catch_kwargs: Any catch_varargs: Any caller: Any def __init__(self, environment, func, name, arguments, defaults, catch_kwargs, catch_varargs, caller) -> None: ... def __call__(self, *args, **kwargs): ... class Undefined: def __init__(self, hint: Optional[Any] = ..., obj: Any = ..., name: Optional[Any] = ..., exc: Any = ...) -> None: ... def __getattr__(self, name): ... __add__: Any __radd__: Any __mul__: Any __rmul__: Any __div__: Any __rdiv__: Any __truediv__: Any __rtruediv__: Any __floordiv__: Any __rfloordiv__: Any __mod__: Any __rmod__: Any __pos__: Any __neg__: Any __call__: Any __getitem__: Any __lt__: Any __le__: Any __gt__: Any __ge__: Any __int__: Any __float__: Any __complex__: Any __pow__: Any __rpow__: Any def __eq__(self, other): ... def __ne__(self, other): ... def __hash__(self): ... def __len__(self): ... def __iter__(self): ... def __nonzero__(self): ... __bool__: Any def make_logging_undefined(logger: Optional[Any] = ..., base: Optional[Any] = ...): ... class DebugUndefined(Undefined): ... class StrictUndefined(Undefined): __iter__: Any __len__: Any __nonzero__: Any __eq__: Any __ne__: Any __bool__: Any __hash__: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/nodes.pyi0000664000175000017500000001204613577124116025747 0ustar davedave00000000000000from typing import Any, Optional class Impossible(Exception): ... class NodeType(type): def __new__(cls, name, bases, d): ... class EvalContext: environment: Any autoescape: Any volatile: bool def __init__(self, environment, template_name: Optional[Any] = ...) -> None: ... def save(self): ... def revert(self, old): ... def get_eval_context(node, ctx): ... class Node: fields: Any attributes: Any abstract: bool def __init__(self, *fields, **attributes) -> None: ... def iter_fields(self, exclude: Optional[Any] = ..., only: Optional[Any] = ...): ... def iter_child_nodes(self, exclude: Optional[Any] = ..., only: Optional[Any] = ...): ... def find(self, node_type): ... def find_all(self, node_type): ... def set_ctx(self, ctx): ... def set_lineno(self, lineno, override: bool = ...): ... def set_environment(self, environment): ... def __eq__(self, other): ... def __ne__(self, other): ... __hash__: Any class Stmt(Node): abstract: bool class Helper(Node): abstract: bool class Template(Node): fields: Any class Output(Stmt): fields: Any class Extends(Stmt): fields: Any class For(Stmt): fields: Any class If(Stmt): fields: Any class Macro(Stmt): fields: Any class CallBlock(Stmt): fields: Any class FilterBlock(Stmt): fields: Any class Block(Stmt): fields: Any class Include(Stmt): fields: Any class Import(Stmt): fields: Any class FromImport(Stmt): fields: Any class ExprStmt(Stmt): fields: Any class Assign(Stmt): fields: Any class AssignBlock(Stmt): fields: Any class Expr(Node): abstract: bool def as_const(self, eval_ctx: Optional[Any] = ...): ... def can_assign(self): ... class BinExpr(Expr): fields: Any operator: Any abstract: bool def as_const(self, eval_ctx: Optional[Any] = ...): ... class UnaryExpr(Expr): fields: Any operator: Any abstract: bool def as_const(self, eval_ctx: Optional[Any] = ...): ... class Name(Expr): fields: Any def can_assign(self): ... class Literal(Expr): abstract: bool class Const(Literal): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... @classmethod def from_untrusted(cls, value, lineno: Optional[Any] = ..., environment: Optional[Any] = ...): ... class TemplateData(Literal): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Tuple(Literal): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... def can_assign(self): ... class List(Literal): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Dict(Literal): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Pair(Helper): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Keyword(Helper): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class CondExpr(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Filter(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Test(Expr): fields: Any class Call(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Getitem(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... def can_assign(self): ... class Getattr(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... def can_assign(self): ... class Slice(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Concat(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Compare(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class Operand(Helper): fields: Any class Mul(BinExpr): operator: str class Div(BinExpr): operator: str class FloorDiv(BinExpr): operator: str class Add(BinExpr): operator: str class Sub(BinExpr): operator: str class Mod(BinExpr): operator: str class Pow(BinExpr): operator: str class And(BinExpr): operator: str def as_const(self, eval_ctx: Optional[Any] = ...): ... class Or(BinExpr): operator: str def as_const(self, eval_ctx: Optional[Any] = ...): ... class Not(UnaryExpr): operator: str class Neg(UnaryExpr): operator: str class Pos(UnaryExpr): operator: str class EnvironmentAttribute(Expr): fields: Any class ExtensionAttribute(Expr): fields: Any class ImportedName(Expr): fields: Any class InternalName(Expr): fields: Any def __init__(self) -> None: ... class MarkSafe(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class MarkSafeIfAutoescape(Expr): fields: Any def as_const(self, eval_ctx: Optional[Any] = ...): ... class ContextReference(Expr): ... class Continue(Stmt): ... class Break(Stmt): ... class Scope(Stmt): fields: Any class EvalContextModifier(Stmt): fields: Any class ScopedEvalContextModifier(EvalContextModifier): fields: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/filters.pyi0000664000175000017500000000457113577124116026313 0ustar davedave00000000000000from typing import Any, NamedTuple, Optional def contextfilter(f): ... def evalcontextfilter(f): ... def environmentfilter(f): ... def make_attrgetter(environment, attribute): ... def do_forceescape(value): ... def do_urlencode(value): ... def do_replace(eval_ctx, s, old, new, count: Optional[Any] = ...): ... def do_upper(s): ... def do_lower(s): ... def do_xmlattr(_eval_ctx, d, autospace: bool = ...): ... def do_capitalize(s): ... def do_title(s): ... def do_dictsort(value, case_sensitive: bool = ..., by: str = ...): ... def do_sort(environment, value, reverse: bool = ..., case_sensitive: bool = ..., attribute: Optional[Any] = ...): ... def do_default(value, default_value: str = ..., boolean: bool = ...): ... def do_join(eval_ctx, value, d: str = ..., attribute: Optional[Any] = ...): ... def do_center(value, width: int = ...): ... def do_first(environment, seq): ... def do_last(environment, seq): ... def do_random(environment, seq): ... def do_filesizeformat(value, binary: bool = ...): ... def do_pprint(value, verbose: bool = ...): ... def do_urlize(eval_ctx, value, trim_url_limit: Optional[Any] = ..., nofollow: bool = ..., target: Optional[Any] = ...): ... def do_indent(s, width: int = ..., indentfirst: bool = ...): ... def do_truncate(s, length: int = ..., killwords: bool = ..., end: str = ...): ... def do_wordwrap(environment, s, width: int = ..., break_long_words: bool = ..., wrapstring: Optional[Any] = ...): ... def do_wordcount(s): ... def do_int(value, default: int = ..., base: int = ...): ... def do_float(value, default: float = ...): ... def do_format(value, *args, **kwargs): ... def do_trim(value): ... def do_striptags(value): ... def do_slice(value, slices, fill_with: Optional[Any] = ...): ... def do_batch(value, linecount, fill_with: Optional[Any] = ...): ... def do_round(value, precision: int = ..., method: str = ...): ... def do_groupby(environment, value, attribute): ... class _GroupTuple(NamedTuple): grouper: Any list: Any def do_sum(environment, iterable, attribute: Optional[Any] = ..., start: int = ...): ... def do_list(value): ... def do_mark_safe(value): ... def do_mark_unsafe(value): ... def do_reverse(value): ... def do_attr(environment, obj, name): ... def do_map(*args, **kwargs): ... def do_select(*args, **kwargs): ... def do_reject(*args, **kwargs): ... def do_selectattr(*args, **kwargs): ... def do_rejectattr(*args, **kwargs): ... FILTERS: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/tests.pyi0000664000175000017500000000106113577124116025774 0ustar davedave00000000000000from typing import Any number_re: Any regex_type: Any test_callable: Any def test_odd(value): ... def test_even(value): ... def test_divisibleby(value, num): ... def test_defined(value): ... def test_undefined(value): ... def test_none(value): ... def test_lower(value): ... def test_upper(value): ... def test_string(value): ... def test_mapping(value): ... def test_number(value): ... def test_sequence(value): ... def test_equalto(value, other): ... def test_sameas(value, other): ... def test_iterable(value): ... def test_escaped(value): ... TESTS: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/debug.pyi0000664000175000017500000000177213577124116025731 0ustar davedave00000000000000from typing import Any, Optional tproxy: Any raise_helper: str class TracebackFrameProxy: tb: Any def __init__(self, tb) -> None: ... @property def tb_next(self): ... def set_next(self, next): ... @property def is_jinja_frame(self): ... def __getattr__(self, name): ... def make_frame_proxy(frame): ... class ProcessedTraceback: exc_type: Any exc_value: Any frames: Any def __init__(self, exc_type, exc_value, frames) -> None: ... def render_as_text(self, limit: Optional[Any] = ...): ... def render_as_html(self, full: bool = ...): ... @property def is_template_syntax_error(self): ... @property def exc_info(self): ... @property def standard_exc_info(self): ... def make_traceback(exc_info, source_hint: Optional[Any] = ...): ... def translate_syntax_error(error, source: Optional[Any] = ...): ... def translate_exception(exc_info, initial_skip: int = ...): ... def fake_exc_info(exc_info, filename, lineno): ... tb_set_next: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/_stringdefs.pyi0000664000175000017500000000055013577124116027143 0ustar davedave00000000000000from typing import Any Cc: str Cf: str Cn: str Co: str Cs: Any Ll: str Lm: str Lo: str Lt: str Lu: str Mc: str Me: str Mn: str Nd: str Nl: str No: str Pc: str Pd: str Pe: str Pf: str Pi: str Po: str Ps: str Sc: str Sk: str Sm: str So: str Zl: str Zp: str Zs: str cats: Any def combine(*args): ... xid_start: str xid_continue: str def allexcept(*args): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/exceptions.pyi0000664000175000017500000000203213577124116027012 0ustar davedave00000000000000from typing import Any, Optional, Text class TemplateError(Exception): def __init__(self, message: Optional[Text] = ...) -> None: ... @property def message(self): ... def __unicode__(self): ... class TemplateNotFound(IOError, LookupError, TemplateError): message: Any name: Any templates: Any def __init__(self, name, message: Optional[Text] = ...) -> None: ... class TemplatesNotFound(TemplateNotFound): templates: Any def __init__(self, names: Any = ..., message: Optional[Text] = ...) -> None: ... class TemplateSyntaxError(TemplateError): lineno: int name: Text filename: Text source: Text translated: bool def __init__(self, message: Text, lineno: int, name: Optional[Text] = ..., filename: Optional[Text] = ...) -> None: ... class TemplateAssertionError(TemplateSyntaxError): ... class TemplateRuntimeError(TemplateError): ... class UndefinedError(TemplateRuntimeError): ... class SecurityError(TemplateRuntimeError): ... class FilterArgumentError(TemplateRuntimeError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/parser.pyi0000664000175000017500000000472313577124116026136 0ustar davedave00000000000000from typing import Any, Optional class Parser: environment: Any stream: Any name: Any filename: Any closed: bool extensions: Any def __init__(self, environment, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...) -> None: ... def fail(self, msg, lineno: Optional[Any] = ..., exc: Any = ...): ... def fail_unknown_tag(self, name, lineno: Optional[Any] = ...): ... def fail_eof(self, end_tokens: Optional[Any] = ..., lineno: Optional[Any] = ...): ... def is_tuple_end(self, extra_end_rules: Optional[Any] = ...): ... def free_identifier(self, lineno: Optional[Any] = ...): ... def parse_statement(self): ... def parse_statements(self, end_tokens, drop_needle: bool = ...): ... def parse_set(self): ... def parse_for(self): ... def parse_if(self): ... def parse_block(self): ... def parse_extends(self): ... def parse_import_context(self, node, default): ... def parse_include(self): ... def parse_import(self): ... def parse_from(self): ... def parse_signature(self, node): ... def parse_call_block(self): ... def parse_filter_block(self): ... def parse_macro(self): ... def parse_print(self): ... def parse_assign_target(self, with_tuple: bool = ..., name_only: bool = ..., extra_end_rules: Optional[Any] = ...): ... def parse_expression(self, with_condexpr: bool = ...): ... def parse_condexpr(self): ... def parse_or(self): ... def parse_and(self): ... def parse_not(self): ... def parse_compare(self): ... def parse_add(self): ... def parse_sub(self): ... def parse_concat(self): ... def parse_mul(self): ... def parse_div(self): ... def parse_floordiv(self): ... def parse_mod(self): ... def parse_pow(self): ... def parse_unary(self, with_filter: bool = ...): ... def parse_primary(self): ... def parse_tuple(self, simplified: bool = ..., with_condexpr: bool = ..., extra_end_rules: Optional[Any] = ..., explicit_parentheses: bool = ...): ... def parse_list(self): ... def parse_dict(self): ... def parse_postfix(self, node): ... def parse_filter_expr(self, node): ... def parse_subscript(self, node): ... def parse_subscribed(self): ... def parse_call(self, node): ... def parse_filter(self, node, start_inline: bool = ...): ... def parse_test(self, node): ... def subparse(self, end_tokens: Optional[Any] = ...): ... def parse(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/bccache.pyi0000664000175000017500000000256413577124116026213 0ustar davedave00000000000000from typing import Any, Optional marshal_dump: Any marshal_load: Any bc_version: int bc_magic: Any class Bucket: environment: Any key: Any checksum: Any def __init__(self, environment, key, checksum) -> None: ... code: Any def reset(self): ... def load_bytecode(self, f): ... def write_bytecode(self, f): ... def bytecode_from_string(self, string): ... def bytecode_to_string(self): ... class BytecodeCache: def load_bytecode(self, bucket): ... def dump_bytecode(self, bucket): ... def clear(self): ... def get_cache_key(self, name, filename: Optional[Any] = ...): ... def get_source_checksum(self, source): ... def get_bucket(self, environment, name, filename, source): ... def set_bucket(self, bucket): ... class FileSystemBytecodeCache(BytecodeCache): directory: Any pattern: Any def __init__(self, directory: Optional[Any] = ..., pattern: str = ...) -> None: ... def load_bytecode(self, bucket): ... def dump_bytecode(self, bucket): ... def clear(self): ... class MemcachedBytecodeCache(BytecodeCache): client: Any prefix: Any timeout: Any ignore_memcache_errors: Any def __init__(self, client, prefix: str = ..., timeout: Optional[Any] = ..., ignore_memcache_errors: bool = ...) -> None: ... def load_bytecode(self, bucket): ... def dump_bytecode(self, bucket): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/visitor.pyi0000664000175000017500000000046213577124116026335 0ustar davedave00000000000000class NodeVisitor: def get_visitor(self, node): ... def visit(self, node, *args, **kwargs): ... def generic_visit(self, node, *args, **kwargs): ... class NodeTransformer(NodeVisitor): def generic_visit(self, node, *args, **kwargs): ... def visit_list(self, node, *args, **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/sandbox.pyi0000664000175000017500000000217113577124116026273 0ustar davedave00000000000000from typing import Any from jinja2.environment import Environment MAX_RANGE: int UNSAFE_FUNCTION_ATTRIBUTES: Any UNSAFE_METHOD_ATTRIBUTES: Any UNSAFE_GENERATOR_ATTRIBUTES: Any def safe_range(*args): ... def unsafe(f): ... def is_internal_attribute(obj, attr): ... def modifies_known_mutable(obj, attr): ... class SandboxedEnvironment(Environment): sandboxed: bool default_binop_table: Any default_unop_table: Any intercepted_binops: Any intercepted_unops: Any def intercept_unop(self, operator): ... binop_table: Any unop_table: Any def __init__(self, *args, **kwargs) -> None: ... def is_safe_attribute(self, obj, attr, value): ... def is_safe_callable(self, obj): ... def call_binop(self, context, operator, left, right): ... def call_unop(self, context, operator, arg): ... def getitem(self, obj, argument): ... def getattr(self, obj, attribute): ... def unsafe_undefined(self, obj, attribute): ... def call(__self, __context, __obj, *args, **kwargs): ... class ImmutableSandboxedEnvironment(SandboxedEnvironment): def is_safe_attribute(self, obj, attr, value): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/ext.pyi0000664000175000017500000000312513577124116025435 0ustar davedave00000000000000from typing import Any, Optional GETTEXT_FUNCTIONS: Any class ExtensionRegistry(type): def __new__(cls, name, bases, d): ... class Extension: tags: Any priority: int environment: Any def __init__(self, environment) -> None: ... def bind(self, environment): ... def preprocess(self, source, name, filename: Optional[Any] = ...): ... def filter_stream(self, stream): ... def parse(self, parser): ... def attr(self, name, lineno: Optional[Any] = ...): ... def call_method(self, name, args: Optional[Any] = ..., kwargs: Optional[Any] = ..., dyn_args: Optional[Any] = ..., dyn_kwargs: Optional[Any] = ..., lineno: Optional[Any] = ...): ... class InternationalizationExtension(Extension): tags: Any def __init__(self, environment) -> None: ... def parse(self, parser): ... class ExprStmtExtension(Extension): tags: Any def parse(self, parser): ... class LoopControlExtension(Extension): tags: Any def parse(self, parser): ... class WithExtension(Extension): tags: Any def parse(self, parser): ... class AutoEscapeExtension(Extension): tags: Any def parse(self, parser): ... def extract_from_ast(node, gettext_functions: Any = ..., babel_style: bool = ...): ... class _CommentFinder: tokens: Any comment_tags: Any offset: int last_lineno: int def __init__(self, tokens, comment_tags) -> None: ... def find_backwards(self, offset): ... def find_comments(self, lineno): ... def babel_extract(fileobj, keywords, comment_tags, options): ... i18n: Any do: Any loopcontrols: Any with_: Any autoescape: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/constants.pyi0000664000175000017500000000002713577124116026647 0ustar davedave00000000000000LOREM_IPSUM_WORDS: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/jinja2/defaults.pyi0000664000175000017500000000100313577124116026435 0ustar davedave00000000000000from typing import Any from jinja2.filters import FILTERS as DEFAULT_FILTERS from jinja2.tests import TESTS as DEFAULT_TESTS BLOCK_START_STRING: str BLOCK_END_STRING: str VARIABLE_START_STRING: str VARIABLE_END_STRING: str COMMENT_START_STRING: str COMMENT_END_STRING: str LINE_STATEMENT_PREFIX: Any LINE_COMMENT_PREFIX: Any TRIM_BLOCKS: bool LSTRIP_BLOCKS: bool NEWLINE_SEQUENCE: str KEEP_TRAILING_NEWLINE: bool DEFAULT_NAMESPACE: Any # Names in __all__ with no definition: # DEFAULT_FILTERS # DEFAULT_TESTS jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/first.pyi0000664000175000017500000000074213577124116024611 0ustar davedave00000000000000from typing import Any, Callable, Iterable, Optional, overload, TypeVar, Union _T = TypeVar('_T') _S = TypeVar('_S') @overload def first(iterable: Iterable[_T]) -> Optional[_T]: ... @overload def first(iterable: Iterable[_T], default: _S) -> Union[_T, _S]: ... @overload def first(iterable: Iterable[_T], default: _S, key: Optional[Callable[[_T], Any]]) -> Union[_T, _S]: ... @overload def first(iterable: Iterable[_T], *, key: Optional[Callable[[_T], Any]]) -> Optional[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/emoji.pyi0000664000175000017500000000061313577124116024562 0ustar davedave00000000000000from typing import Tuple, Pattern, List, Dict, Union, Text _DEFAULT_DELIMITER: str def emojize( string: str, use_aliases: bool = ..., delimiters: Tuple[str, str] = ... ) -> str: ... def demojize( string: str, delimiters: Tuple[str, str] = ... ) -> str: ... def get_emoji_regexp() -> Pattern[Text]: ... def emoji_lis(string: str) -> List[Dict[str, Union[int, str]]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/itsdangerous.pyi0000664000175000017500000002020313577124116026163 0ustar davedave00000000000000from datetime import datetime from typing import Any, Callable, IO, Mapping, MutableMapping, Optional, Tuple, Union, Text, Generator _serializer = Any # must be an object that has "dumps" and "loads" attributes (e.g. the json module) def want_bytes(s: Union[Text, bytes], encoding: Text = ..., errors: Text = ...) -> bytes: ... class BadData(Exception): message: str def __init__(self, message: str) -> None: ... class BadPayload(BadData): original_error: Optional[Exception] def __init__(self, message: str, original_error: Optional[Exception] = ...) -> None: ... class BadSignature(BadData): payload: Optional[Any] def __init__(self, message: str, payload: Optional[Any] = ...) -> None: ... class BadTimeSignature(BadSignature): date_signed: Optional[int] def __init__(self, message: str, payload: Optional[Any] = ..., date_signed: Optional[int] = ...) -> None: ... class BadHeader(BadSignature): header: Any original_error: Any def __init__(self, message, payload: Optional[Any] = ..., header: Optional[Any] = ..., original_error: Optional[Any] = ...) -> None: ... class SignatureExpired(BadTimeSignature): ... def base64_encode(string: Union[Text, bytes]) -> bytes: ... def base64_decode(string: Union[Text, bytes]) -> bytes: ... class SigningAlgorithm(object): def get_signature(self, key: bytes, value: bytes) -> bytes: ... def verify_signature(self, key: bytes, value: bytes, sig: bytes) -> bool: ... class NoneAlgorithm(SigningAlgorithm): def get_signature(self, key: bytes, value: bytes) -> bytes: ... class HMACAlgorithm(SigningAlgorithm): default_digest_method: Callable[..., Any] digest_method: Callable[..., Any] def __init__(self, digest_method: Optional[Callable[..., Any]] = ...) -> None: ... def get_signature(self, key: bytes, value: bytes) -> bytes: ... class Signer(object): default_digest_method: Callable[..., Any] = ... default_key_derivation: str = ... secret_key: bytes sep: bytes salt: Union[Text, bytes] key_derivation: str digest_method: Callable[..., Any] algorithm: SigningAlgorithm def __init__(self, secret_key: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., sep: Optional[Union[Text, bytes]] = ..., key_derivation: Optional[str] = ..., digest_method: Optional[Callable[..., Any]] = ..., algorithm: Optional[SigningAlgorithm] = ...) -> None: ... def derive_key(self) -> bytes: ... def get_signature(self, value: Union[Text, bytes]) -> bytes: ... def sign(self, value: Union[Text, bytes]) -> bytes: ... def verify_signature(self, value: bytes, sig: Union[Text, bytes]) -> bool: ... def unsign(self, signed_value: Union[Text, bytes]) -> bytes: ... def validate(self, signed_value: Union[Text, bytes]) -> bool: ... class TimestampSigner(Signer): def get_timestamp(self) -> int: ... def timestamp_to_datetime(self, ts: float) -> datetime: ... def sign(self, value: Union[Text, bytes]) -> bytes: ... def unsign(self, value: Union[Text, bytes], max_age: Optional[int] = ..., return_timestamp: bool = ...) -> Any: ... # morally -> Union[bytes, Tuple[bytes, datetime]] def validate(self, signed_value: Union[Text, bytes], max_age: Optional[int] = ...) -> bool: ... class Serializer(object): default_serializer: _serializer = ... default_signer: Callable[..., Signer] = ... secret_key: bytes salt: bytes serializer: _serializer is_text_serializer: bool signer: Callable[..., Signer] signer_kwargs: MutableMapping[str, Any] def __init__(self, secret_key: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping[str, Any]] = ...) -> None: ... def load_payload(self, payload: bytes, serializer: Optional[_serializer] = ...) -> Any: ... def dump_payload(self, obj: Any) -> bytes: ... def make_signer(self, salt: Optional[Union[Text, bytes]] = ...) -> Signer: ... def iter_unsigners(self, salt: Optional[Union[Text, bytes]] = ...) -> Generator[Any, None, None]: ... def dumps(self, obj: Any, salt: Optional[Union[Text, bytes]] = ...) -> Any: ... # morally -> Union[str, bytes] def dump(self, obj: Any, f: IO[Any], salt: Optional[Union[Text, bytes]] = ...) -> None: ... def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...) -> Any: ... def load(self, f: IO[Any], salt: Optional[Union[Text, bytes]] = ...): ... def loads_unsafe(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...) -> Tuple[bool, Optional[Any]]: ... def load_unsafe(self, f: IO[Any], salt: Optional[Union[Text, bytes]] = ...) -> Tuple[bool, Optional[Any]]: ... class TimedSerializer(Serializer): def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., max_age: Optional[int] = ..., return_timestamp: bool = ...) -> Any: ... # morally -> Union[Any, Tuple[Any, datetime]] def loads_unsafe(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., max_age: Optional[int] = ...) -> Tuple[bool, Any]: ... class JSONWebSignatureSerializer(Serializer): jws_algorithms: MutableMapping[Text, SigningAlgorithm] = ... default_algorithm: Text = ... default_serializer: Any = ... algorithm_name: Text algorithm: SigningAlgorithm def __init__(self, secret_key: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping[str, Any]] = ..., algorithm_name: Optional[Text] = ...) -> None: ... def load_payload(self, payload: Union[Text, bytes], serializer: Optional[_serializer] = ..., return_header: bool = ...) -> Any: ... # morally -> Union[Any, Tuple[Any, MutableMapping[str, Any]]] def dump_payload(self, header: Mapping[str, Any], obj: Any) -> bytes: ... # type: ignore def make_algorithm(self, algorithm_name: Text) -> SigningAlgorithm: ... def make_signer(self, salt: Optional[Union[Text, bytes]] = ..., algorithm: SigningAlgorithm = ...) -> Signer: ... def make_header(self, header_fields: Optional[Mapping[str, Any]]) -> MutableMapping[str, Any]: ... def dumps(self, obj: Any, salt: Optional[Union[Text, bytes]] = ..., header_fields: Optional[Mapping[str, Any]] = ...) -> bytes: ... def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., return_header: bool = ...) -> Any: ... # morally -> Union[Any, Tuple[Any, MutableMapping[str, Any]]] def loads_unsafe(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., return_header: bool = ...) -> Tuple[bool, Any]: ... class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer): DEFAULT_EXPIRES_IN: int = ... expires_in: int def __init__(self, secret_key: Union[Text, bytes], expires_in: Optional[int] = ..., salt: Optional[Union[Text, bytes]] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping[str, Any]] = ..., algorithm_name: Optional[Text] = ...) -> None: ... def make_header(self, header_fields: Optional[Mapping[str, Any]]) -> MutableMapping[str, Any]: ... def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., return_header: bool = ...) -> Any: ... # morally -> Union[Any, Tuple[Any, MutableMapping[str, Any]]] def get_issue_date(self, header: Mapping[str, Any]) -> Optional[datetime]: ... def now(self) -> int: ... class _URLSafeSerializerMixin(object): default_serializer: _serializer = ... def load_payload(self, payload: bytes, serializer: Optional[_serializer] = ...) -> Any: ... def dump_payload(self, obj: Any) -> bytes: ... class URLSafeSerializer(_URLSafeSerializerMixin, Serializer): ... class URLSafeTimedSerializer(_URLSafeSerializerMixin, TimedSerializer): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/termcolor.pyi0000664000175000017500000000070413577124116025466 0ustar davedave00000000000000# Stub for termcolor: https://pypi.python.org/pypi/termcolor from typing import Any, Iterable, Optional, Text def colored( text: Text, color: Optional[Text] = ..., on_color: Optional[Text] = ..., attrs: Optional[Iterable[Text]] = ..., ) -> Text: ... def cprint( text: Text, color: Optional[Text] = ..., on_color: Optional[Text] = ..., attrs: Optional[Iterable[Text]] = ..., **kwargs: Any, ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/croniter.pyi0000664000175000017500000000360013577124116025303 0ustar davedave00000000000000import datetime from typing import Any, Dict, Iterator, List, Optional, Text, Tuple, Type, TypeVar, Union _RetType = Union[Type[float], Type[datetime.datetime]] _SelfT = TypeVar('_SelfT', bound=croniter) class CroniterError(ValueError): ... class CroniterBadCronError(CroniterError): ... class CroniterBadDateError(CroniterError): ... class CroniterNotAlphaError(CroniterError): ... class croniter(Iterator[Any]): MONTHS_IN_YEAR: int RANGES: Tuple[Tuple[int, int], ...] DAYS: Tuple[int, ...] ALPHACONV: Tuple[Dict[str, Any], ...] LOWMAP: Tuple[Dict[int, Any], ...] bad_length: str tzinfo: Optional[datetime.tzinfo] cur: float expanded: List[List[str]] start_time: float dst_start_time: float nth_weekday_of_month: Dict[str, Any] def __init__(self, expr_format: Text, start_time: Optional[Union[float, datetime.datetime]] = ..., ret_type: Optional[_RetType] = ...) -> None: ... # Most return value depend on ret_type, which can be passed in both as a method argument and as # a constructor argument. def get_next(self, ret_type: Optional[_RetType] = ...) -> Any: ... def get_prev(self, ret_type: Optional[_RetType] = ...) -> Any: ... def get_current(self, ret_type: Optional[_RetType] = ...) -> Any: ... def __iter__(self: _SelfT) -> _SelfT: ... def __next__(self, ret_type: Optional[_RetType] = ...) -> Any: ... def next(self, ret_type: Optional[_RetType] = ...) -> Any: ... def all_next(self, ret_type: Optional[_RetType] = ...) -> Iterator[Any]: ... def all_prev(self, ret_type: Optional[_RetType] = ...) -> Iterator[Any]: ... def iter(self, ret_type: Optional[_RetType] = ...) -> Iterator[Any]: ... def is_leap(self, year: int) -> bool: ... @classmethod def expand(cls, expr_format: Text) -> Tuple[List[List[str]], Dict[str, Any]]: ... @classmethod def is_valid(cls, expression: Text) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/0000775000175000017500000000000013577125145024037 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/__init__.pyi0000664000175000017500000000425113577124116026320 0ustar davedave00000000000000# Stubs for flask (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .app import Flask as Flask from .blueprints import Blueprint as Blueprint from .config import Config as Config from .ctx import after_this_request as after_this_request from .ctx import copy_current_request_context as copy_current_request_context from .ctx import has_app_context as has_app_context from .ctx import has_request_context as has_request_context from .globals import current_app as current_app from .globals import g as g from .globals import request as request from .globals import session as session from .helpers import flash as flash from .helpers import get_flashed_messages as get_flashed_messages from .helpers import get_template_attribute as get_template_attribute from .helpers import make_response as make_response from .helpers import safe_join as safe_join from .helpers import send_file as send_file from .helpers import send_from_directory as send_from_directory from .helpers import stream_with_context as stream_with_context from .helpers import url_for as url_for from .json import jsonify as jsonify from .signals import appcontext_popped as appcontext_popped from .signals import appcontext_pushed as appcontext_pushed from .signals import appcontext_tearing_down as appcontext_tearing_down from .signals import before_render_template as before_render_template from .signals import got_request_exception as got_request_exception from .signals import message_flashed as message_flashed from .signals import request_finished as request_finished from .signals import request_started as request_started from .signals import request_tearing_down as request_tearing_down from .signals import signals_available as signals_available from .signals import template_rendered as template_rendered from .templating import render_template as render_template from .templating import render_template_string as render_template_string from .wrappers import Request as Request from .wrappers import Response as Response from werkzeug.exceptions import abort as abort from werkzeug.utils import redirect as redirect from jinja2 import Markup as Markup from jinja2 import escape as escape jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/ctx.pyi0000664000175000017500000000303313577124116025354 0ustar davedave00000000000000# Stubs for flask.ctx (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .globals import _app_ctx_stack, _request_ctx_stack from .signals import appcontext_popped, appcontext_pushed from typing import Any, Optional class _AppCtxGlobals: def get(self, name: Any, default: Optional[Any] = ...): ... def pop(self, name: Any, default: Any = ...): ... def setdefault(self, name: Any, default: Optional[Any] = ...): ... def __contains__(self, item: Any): ... def __iter__(self): ... def after_this_request(f: Any): ... def copy_current_request_context(f: Any): ... def has_request_context(): ... def has_app_context(): ... class AppContext: app: Any = ... url_adapter: Any = ... g: Any = ... def __init__(self, app: Any) -> None: ... def push(self) -> None: ... def pop(self, exc: Any = ...) -> None: ... def __enter__(self): ... def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ... class RequestContext: app: Any = ... request: Any = ... url_adapter: Any = ... flashes: Any = ... session: Any = ... preserved: bool = ... def __init__(self, app: Any, environ: Any, request: Optional[Any] = ...) -> None: ... g: Any = ... def copy(self): ... def match_request(self) -> None: ... def push(self) -> None: ... def pop(self, exc: Any = ...) -> None: ... def auto_pop(self, exc: Any) -> None: ... def __enter__(self): ... def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/testing.pyi0000664000175000017500000000273413577124116026242 0ustar davedave00000000000000# Stubs for flask.testing (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from click import BaseCommand from click.testing import CliRunner, Result from typing import Any, IO, Iterable, Mapping, Optional, Text, TypeVar, Union from werkzeug.test import Client def make_test_environ_builder(app: Any, path: str = ..., base_url: Optional[Any] = ..., subdomain: Optional[Any] = ..., url_scheme: Optional[Any] = ..., *args: Any, **kwargs: Any): ... # Response type for the client below. # By default _R is Tuple[Iterable[Any], Union[Text, int], werkzeug.datastructures.Headers], however # most commonly it is wrapped in a Reponse object. _R = TypeVar('_R') class FlaskClient(Client[_R]): preserve_context: bool = ... environ_base: Any = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... def session_transaction(self, *args: Any, **kwargs: Any) -> None: ... def __enter__(self): ... def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ... class FlaskCliRunner(CliRunner): app: Any = ... def __init__(self, app: Any, **kwargs: Any) -> None: ... def invoke( self, cli: Optional[BaseCommand] = ..., args: Optional[Union[str, Iterable[str]]] = ..., input: Optional[Union[bytes, IO[Any], Text]] = ..., env: Optional[Mapping[str, str]] = ..., catch_exceptions: bool = ..., color: bool = ..., **extra: Any, ) -> Result: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/signals.pyi0000664000175000017500000000150413577124116026217 0ustar davedave00000000000000# Stubs for flask.signals (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional signals_available: bool class Namespace: def signal(self, name: Any, doc: Optional[Any] = ...): ... class _FakeSignal: name: Any = ... __doc__: Any = ... def __init__(self, name: Any, doc: Optional[Any] = ...) -> None: ... send: Any = ... connect: Any = ... disconnect: Any = ... has_receivers_for: Any = ... receivers_for: Any = ... temporarily_connected_to: Any = ... connected_to: Any = ... template_rendered: Any before_render_template: Any request_started: Any request_finished: Any request_tearing_down: Any got_request_exception: Any appcontext_tearing_down: Any appcontext_pushed: Any appcontext_popped: Any message_flashed: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/globals.pyi0000664000175000017500000000066613577124116026212 0ustar davedave00000000000000# Stubs for flask.globals (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .app import Flask from .wrappers import Request from typing import Any from werkzeug.local import LocalStack class _FlaskLocalProxy(Flask): def _get_current_object(self) -> Flask: ... _request_ctx_stack: LocalStack _app_ctx_stack: LocalStack current_app: _FlaskLocalProxy request: Request session: Any g: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/blueprints.pyi0000664000175000017500000000656213577124116026757 0ustar davedave00000000000000# Stubs for flask.blueprints (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .helpers import _PackageBoundObject from .app import _ViewFunc from typing import Any, Callable, Optional, Type, TypeVar, Union _T = TypeVar('_T') _VT = TypeVar('_VT', bound=_ViewFunc) class BlueprintSetupState: app: Any = ... blueprint: Any = ... options: Any = ... first_registration: Any = ... subdomain: Any = ... url_prefix: Any = ... url_defaults: Any = ... def __init__(self, blueprint: Any, app: Any, options: Any, first_registration: Any) -> None: ... def add_url_rule(self, rule: str, endpoint: Optional[str] = ..., view_func: _ViewFunc = ..., **options: Any) -> None: ... class Blueprint(_PackageBoundObject): warn_on_modifications: bool = ... json_encoder: Any = ... json_decoder: Any = ... import_name: str = ... template_folder: Optional[str] = ... root_path: str = ... name: str = ... url_prefix: Optional[str] = ... subdomain: Optional[str] = ... static_folder: Optional[str] = ... static_url_path: Optional[str] = ... deferred_functions: Any = ... url_values_defaults: Any = ... def __init__(self, name: str, import_name: str, static_folder: Optional[str] = ..., static_url_path: Optional[str] = ..., template_folder: Optional[str] = ..., url_prefix: Optional[str] = ..., subdomain: Optional[str] = ..., url_defaults: Optional[Any] = ..., root_path: Optional[str] = ...) -> None: ... def record(self, func: Any) -> None: ... def record_once(self, func: Any): ... def make_setup_state(self, app: Any, options: Any, first_registration: bool = ...): ... def register(self, app: Any, options: Any, first_registration: bool = ...) -> None: ... def route(self, rule: str, **options: Any) -> Callable[[_VT], _VT]: ... def add_url_rule(self, rule: str, endpoint: Optional[str] = ..., view_func: _ViewFunc = ..., **options: Any) -> None: ... def endpoint(self, endpoint: str) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... def app_template_filter(self, name: Optional[Any] = ...): ... def add_app_template_filter(self, f: Any, name: Optional[Any] = ...) -> None: ... def app_template_test(self, name: Optional[Any] = ...): ... def add_app_template_test(self, f: Any, name: Optional[Any] = ...) -> None: ... def app_template_global(self, name: Optional[Any] = ...): ... def add_app_template_global(self, f: Any, name: Optional[Any] = ...) -> None: ... def before_request(self, f: Any): ... def before_app_request(self, f: Any): ... def before_app_first_request(self, f: Any): ... def after_request(self, f: Any): ... def after_app_request(self, f: Any): ... def teardown_request(self, f: Any): ... def teardown_app_request(self, f: Any): ... def context_processor(self, f: Any): ... def app_context_processor(self, f: Any): ... def app_errorhandler(self, code: Any): ... def url_value_preprocessor(self, f: Any): ... def url_defaults(self, f: Any): ... def app_url_value_preprocessor(self, f: Any): ... def app_url_defaults(self, f: Any): ... def errorhandler(self, code_or_exception: Union[int, Type[Exception]]) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... def register_error_handler(self, code_or_exception: Union[int, Type[Exception]], f: Callable[..., Any]) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/wrappers.pyi0000664000175000017500000000234513577124116026426 0ustar davedave00000000000000# Stubs for flask.wrappers (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Dict, Optional from werkzeug.exceptions import HTTPException from werkzeug.routing import Rule from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase class JSONMixin: @property def is_json(self) -> bool: ... @property def json(self): ... def get_json(self, force: bool = ..., silent: bool = ..., cache: bool = ...): ... def on_json_loading_failed(self, e: Any) -> None: ... class Request(RequestBase, JSONMixin): url_rule: Optional[Rule] = ... view_args: Dict[str, Any] = ... routing_exception: Optional[HTTPException] = ... # Request is making the max_content_length readonly, where it was not the # case in its supertype. # We would require something like https://github.com/python/typing/issues/241 @property def max_content_length(self) -> Optional[int]: ... # type: ignore @property def endpoint(self) -> Optional[str]: ... @property def blueprint(self) -> Optional[str]: ... class Response(ResponseBase, JSONMixin): default_mimetype: str = ... @property def max_cookie_size(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/app.pyi0000664000175000017500000002066713577124116025352 0ustar davedave00000000000000# Stubs for flask.app (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .blueprints import Blueprint from .config import Config, ConfigAttribute from .ctx import AppContext, RequestContext, _AppCtxGlobals from .globals import _request_ctx_stack, g, request, session from .helpers import _PackageBoundObject, find_package, get_debug_flag, get_env, get_flashed_messages, get_load_dotenv, locked_cached_property, url_for from .logging import create_logger from .sessions import SecureCookieSessionInterface from .signals import appcontext_tearing_down, got_request_exception, request_finished, request_started, request_tearing_down from .templating import DispatchingJinjaLoader, Environment from .wrappers import Request, Response from .testing import FlaskClient from types import TracebackType from typing import ( Any, Callable, ContextManager, Dict, List, Optional, Type, TypeVar, Union, Text, Tuple, NoReturn, Iterable, ByteString ) from datetime import timedelta def setupmethod(f: Any): ... _T = TypeVar('_T') _ExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] _StartResponse = Callable[[str, List[Tuple[str, str]], Optional[_ExcInfo]], Callable[[bytes], Any]] _WSGICallable = Callable[[Dict[Text, Any], _StartResponse], Iterable[bytes]] _Status = Union[str, int] _Headers = Union[Dict[Any, Any], List[Tuple[Any, Any]]] _Body = Union[Text, ByteString, Dict[Text, Any], Response, _WSGICallable] _ViewFuncReturnType = Union[ _Body, Tuple[_Body, _Status, _Headers], Tuple[_Body, _Status], Tuple[_Body, _Headers], ] _ViewFunc = Union[ Callable[..., NoReturn], Callable[..., _ViewFuncReturnType], ] _VT = TypeVar('_VT', bound=_ViewFunc) class Flask(_PackageBoundObject): request_class: type = ... response_class: type = ... jinja_environment: type = ... app_ctx_globals_class: type = ... config_class: Type[Config] = ... testing: Any = ... secret_key: Union[Text, bytes, None] = ... session_cookie_name: Any = ... permanent_session_lifetime: timedelta = ... send_file_max_age_default: timedelta = ... use_x_sendfile: Any = ... json_encoder: Any = ... json_decoder: Any = ... jinja_options: Any = ... default_config: Any = ... url_rule_class: type = ... test_client_class: type = ... test_cli_runner_class: type = ... session_interface: Any = ... import_name: str = ... template_folder: str = ... root_path: Optional[Union[str, Text]] = ... static_url_path: Any = ... static_folder: Optional[str] = ... instance_path: Union[str, Text] = ... config: Config = ... view_functions: Any = ... error_handler_spec: Any = ... url_build_error_handlers: Any = ... before_request_funcs: Dict[Optional[str], List[Callable[[], Any]]] = ... before_first_request_funcs: List[Callable[[], None]] = ... after_request_funcs: Dict[Optional[str], List[Callable[[Response], Response]]] = ... teardown_request_funcs: Dict[Optional[str], List[Callable[[Optional[Exception]], Any]]] = ... teardown_appcontext_funcs: List[Callable[[Optional[Exception]], Any]] = ... url_value_preprocessors: Any = ... url_default_functions: Any = ... template_context_processors: Any = ... shell_context_processors: Any = ... blueprints: Any = ... extensions: Any = ... url_map: Any = ... subdomain_matching: Any = ... cli: Any = ... def __init__(self, import_name: str, static_url_path: Optional[str] = ..., static_folder: Optional[str] = ..., static_host: Optional[str] = ..., host_matching: bool = ..., subdomain_matching: bool = ..., template_folder: str = ..., instance_path: Optional[str] = ..., instance_relative_config: bool = ..., root_path: Optional[str] = ...) -> None: ... @property def name(self) -> str: ... @property def propagate_exceptions(self) -> bool: ... @property def preserve_context_on_exception(self): ... @property def logger(self): ... @property def jinja_env(self): ... @property def got_first_request(self) -> bool: ... def make_config(self, instance_relative: bool = ...): ... def auto_find_instance_path(self): ... def open_instance_resource(self, resource: Union[str, Text], mode: str = ...): ... templates_auto_reload: Any = ... def create_jinja_environment(self): ... def create_global_jinja_loader(self): ... def select_jinja_autoescape(self, filename: Any): ... def update_template_context(self, context: Any) -> None: ... def make_shell_context(self): ... env: Optional[str] = ... debug: bool = ... def run(self, host: Optional[str] = ..., port: Optional[Union[int, str]] = ..., debug: Optional[bool] = ..., load_dotenv: bool = ..., **options: Any) -> None: ... def test_client(self, use_cookies: bool = ..., **kwargs: Any) -> FlaskClient[Response]: ... def test_cli_runner(self, **kwargs: Any): ... def open_session(self, request: Any): ... def save_session(self, session: Any, response: Any): ... def make_null_session(self): ... def register_blueprint(self, blueprint: Blueprint, **options: Any) -> None: ... def iter_blueprints(self): ... def add_url_rule(self, rule: str, endpoint: Optional[str] = ..., view_func: _ViewFunc = ..., provide_automatic_options: Optional[bool] = ..., **options: Any) -> None: ... def route(self, rule: str, **options: Any) -> Callable[[_VT], _VT]: ... def endpoint(self, endpoint: str) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... def errorhandler(self, code_or_exception: Union[int, Type[Exception]]) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... def register_error_handler(self, code_or_exception: Union[int, Type[Exception]], f: Callable[..., Any]) -> None: ... def template_filter(self, name: Optional[Any] = ...): ... def add_template_filter(self, f: Any, name: Optional[Any] = ...) -> None: ... def template_test(self, name: Optional[Any] = ...): ... def add_template_test(self, f: Any, name: Optional[Any] = ...) -> None: ... def template_global(self, name: Optional[Any] = ...): ... def add_template_global(self, f: Any, name: Optional[Any] = ...) -> None: ... def before_request(self, f: Callable[[], _T]) -> Callable[[], _T]: ... def before_first_request(self, f: Callable[[], _T]) -> Callable[[], _T]: ... def after_request(self, f: Callable[[Response], Response]) -> Callable[[Response], Response]: ... def teardown_request(self, f: Callable[[Optional[Exception]], _T]) -> Callable[[Optional[Exception]], _T]: ... def teardown_appcontext(self, f: Callable[[Optional[Exception]], _T]) -> Callable[[Optional[Exception]], _T]: ... def context_processor(self, f: Any): ... def shell_context_processor(self, f: Any): ... def url_value_preprocessor(self, f: Any): ... def url_defaults(self, f: Any): ... def handle_http_exception(self, e: Any): ... def trap_http_exception(self, e: Any): ... def handle_user_exception(self, e: Any): ... def handle_exception(self, e: Any): ... def log_exception(self, exc_info: Any) -> None: ... def raise_routing_exception(self, request: Any) -> None: ... def dispatch_request(self): ... def full_dispatch_request(self): ... def finalize_request(self, rv: Any, from_error_handler: bool = ...): ... def try_trigger_before_first_request_functions(self): ... def make_default_options_response(self): ... def should_ignore_error(self, error: Any): ... def make_response(self, rv: Any): ... def create_url_adapter(self, request: Any): ... def inject_url_defaults(self, endpoint: Any, values: Any) -> None: ... def handle_url_build_error(self, error: Any, endpoint: Any, values: Any): ... def preprocess_request(self): ... def process_response(self, response: Any): ... def do_teardown_request(self, exc: Any = ...) -> None: ... def do_teardown_appcontext(self, exc: Any = ...) -> None: ... def app_context(self): ... def request_context(self, environ: Any): ... def test_request_context(self, *args: Any, **kwargs: Any) -> ContextManager[RequestContext]: ... def wsgi_app(self, environ: Any, start_response: Any): ... def __call__(self, environ: Any, start_response: Any): ... # These are not preset at runtime but we add them since monkeypatching this # class is quite common. def __setattr__(self, name: str, value: Any): ... def __getattr__(self, name: str): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/debughelpers.pyi0000664000175000017500000000132713577124116027233 0ustar davedave00000000000000# Stubs for flask.debughelpers (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .app import Flask from .blueprints import Blueprint from .globals import _request_ctx_stack from typing import Any class UnexpectedUnicodeError(AssertionError, UnicodeError): ... class DebugFilesKeyError(KeyError, AssertionError): msg: Any = ... def __init__(self, request: Any, key: Any) -> None: ... class FormDataRoutingRedirect(AssertionError): def __init__(self, request: Any) -> None: ... def attach_enctype_error_multidict(request: Any): ... def explain_template_loading_attempts(app: Any, template: Any, attempts: Any) -> None: ... def explain_ignored_app_run() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/cli.pyi0000664000175000017500000000444613577124116025336 0ustar davedave00000000000000# Stubs for flask.cli (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. import click from .globals import current_app from .helpers import get_debug_flag, get_env, get_load_dotenv from typing import Any, Optional class NoAppException(click.UsageError): ... def find_best_app(script_info: Any, module: Any): ... def call_factory(script_info: Any, app_factory: Any, arguments: Any = ...): ... def find_app_by_string(script_info: Any, module: Any, app_name: Any): ... def prepare_import(path: Any): ... def locate_app(script_info: Any, module_name: Any, app_name: Any, raise_if_not_found: bool = ...): ... def get_version(ctx: Any, param: Any, value: Any): ... version_option: Any class DispatchingApp: loader: Any = ... def __init__(self, loader: Any, use_eager_loading: bool = ...) -> None: ... def __call__(self, environ: Any, start_response: Any): ... class ScriptInfo: app_import_path: Any = ... create_app: Any = ... data: Any = ... def __init__(self, app_import_path: Optional[Any] = ..., create_app: Optional[Any] = ...) -> None: ... def load_app(self): ... pass_script_info: Any def with_appcontext(f: Any): ... class AppGroup(click.Group): def command(self, *args: Any, **kwargs: Any): ... def group(self, *args: Any, **kwargs: Any): ... class FlaskGroup(AppGroup): create_app: Any = ... load_dotenv: Any = ... def __init__(self, add_default_commands: bool = ..., create_app: Optional[Any] = ..., add_version_option: bool = ..., load_dotenv: bool = ..., **extra: Any) -> None: ... def get_command(self, ctx: Any, name: Any): ... def list_commands(self, ctx: Any): ... def main(self, *args: Any, **kwargs: Any): ... def load_dotenv(path: Optional[Any] = ...): ... def show_server_banner(env: Any, debug: Any, app_import_path: Any, eager_loading: Any): ... class CertParamType(click.ParamType): name: str = ... path_type: Any = ... def __init__(self) -> None: ... def convert(self, value: Any, param: Any, ctx: Any): ... def run_command(info: Any, host: Any, port: Any, reload: Any, debugger: Any, eager_loading: Any, with_threads: Any, cert: Any) -> None: ... def shell_command() -> None: ... def routes_command(sort: Any, all_methods: Any): ... cli: Any def main(as_module: bool = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/views.pyi0000664000175000017500000000124313577124116025714 0ustar davedave00000000000000# Stubs for flask.views (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .globals import request from typing import Any http_method_funcs: Any class View: methods: Any = ... provide_automatic_options: Any = ... decorators: Any = ... def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ... @classmethod def as_view(cls, name: Any, *class_args: Any, **class_kwargs: Any): ... class MethodViewType(type): def __init__(self, name: Any, bases: Any, d: Any) -> None: ... class MethodView(View, metaclass=MethodViewType): def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/sessions.pyi0000664000175000017500000000412713577124116026431 0ustar davedave00000000000000# Stubs for flask.sessions (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from abc import ABCMeta from typing import Any, MutableMapping, Optional from werkzeug.datastructures import CallbackDict class SessionMixin(MutableMapping[str, Any], metaclass=ABCMeta): @property def permanent(self): ... @permanent.setter def permanent(self, value: Any) -> None: ... new: bool = ... modified: bool = ... accessed: bool = ... class SecureCookieSession(CallbackDict[str, Any], SessionMixin): modified: bool = ... accessed: bool = ... def __init__(self, initial: Optional[Any] = ...) -> None: ... def __getitem__(self, key: Any): ... def get(self, key: Any, default: Optional[Any] = ...): ... def setdefault(self, key: Any, default: Optional[Any] = ...): ... class NullSession(SecureCookieSession): __setitem__: Any = ... __delitem__: Any = ... clear: Any = ... pop: Any = ... popitem: Any = ... update: Any = ... setdefault: Any = ... class SessionInterface: null_session_class: Any = ... pickle_based: bool = ... def make_null_session(self, app: Any): ... def is_null_session(self, obj: Any): ... def get_cookie_domain(self, app: Any): ... def get_cookie_path(self, app: Any): ... def get_cookie_httponly(self, app: Any): ... def get_cookie_secure(self, app: Any): ... def get_cookie_samesite(self, app: Any): ... def get_expiration_time(self, app: Any, session: Any): ... def should_set_cookie(self, app: Any, session: Any): ... def open_session(self, app: Any, request: Any) -> None: ... def save_session(self, app: Any, session: Any, response: Any) -> None: ... session_json_serializer: Any class SecureCookieSessionInterface(SessionInterface): salt: str = ... digest_method: Any = ... key_derivation: str = ... serializer: Any = ... session_class: Any = ... def get_signing_serializer(self, app: Any): ... def open_session(self, app: Any, request: Any): ... def save_session(self, app: Any, session: Any, response: Any): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/templating.pyi0000664000175000017500000000152513577124116026726 0ustar davedave00000000000000# Stubs for flask.templating (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .globals import _app_ctx_stack, _request_ctx_stack from .signals import before_render_template, template_rendered from jinja2 import BaseLoader, Environment as BaseEnvironment from typing import Any, Text, Iterable, Union class Environment(BaseEnvironment): app: Any = ... def __init__(self, app: Any, **options: Any) -> None: ... class DispatchingJinjaLoader(BaseLoader): app: Any = ... def __init__(self, app: Any) -> None: ... def get_source(self, environment: Any, template: Any): ... def list_templates(self): ... def render_template( template_name_or_list: Union[Text, Iterable[Text]], **context: Any ) -> Text: ... def render_template_string(source: Text, **context: Any) -> Text: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/json/0000775000175000017500000000000013577125145025010 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/json/__init__.pyi0000664000175000017500000000126113577124116027267 0ustar davedave00000000000000# Stubs for flask.json (Python 3.6) import json as _json from typing import Any from jinja2 import Markup class JSONEncoder(_json.JSONEncoder): def default(self, o: Any): ... class JSONDecoder(_json.JSONDecoder): ... def detect_encoding(data: bytes) -> str: ... # undocumented def dumps(obj: Any, **kwargs: Any): ... def dump(obj: Any, fp: Any, **kwargs: Any) -> None: ... def loads(s: Any, **kwargs: Any): ... def load(fp: Any, **kwargs: Any): ... def htmlsafe_dumps(obj: Any, **kwargs: Any): ... def htmlsafe_dump(obj: Any, fp: Any, **kwargs: Any) -> None: ... def jsonify(*args: Any, **kwargs: Any): ... def tojson_filter(obj: Any, **kwargs: Any) -> Markup: ... # undocumented jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/json/tag.pyi0000664000175000017500000000376513577124116026316 0ustar davedave00000000000000# Stubs for flask.json.tag (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional class JSONTag: key: Any = ... serializer: Any = ... def __init__(self, serializer: Any) -> None: ... def check(self, value: Any) -> None: ... def to_json(self, value: Any) -> None: ... def to_python(self, value: Any) -> None: ... def tag(self, value: Any): ... class TagDict(JSONTag): key: str = ... def check(self, value: Any): ... def to_json(self, value: Any): ... def to_python(self, value: Any): ... class PassDict(JSONTag): def check(self, value: Any): ... def to_json(self, value: Any): ... tag: Any = ... class TagTuple(JSONTag): key: str = ... def check(self, value: Any): ... def to_json(self, value: Any): ... def to_python(self, value: Any): ... class PassList(JSONTag): def check(self, value: Any): ... def to_json(self, value: Any): ... tag: Any = ... class TagBytes(JSONTag): key: str = ... def check(self, value: Any): ... def to_json(self, value: Any): ... def to_python(self, value: Any): ... class TagMarkup(JSONTag): key: str = ... def check(self, value: Any): ... def to_json(self, value: Any): ... def to_python(self, value: Any): ... class TagUUID(JSONTag): key: str = ... def check(self, value: Any): ... def to_json(self, value: Any): ... def to_python(self, value: Any): ... class TagDateTime(JSONTag): key: str = ... def check(self, value: Any): ... def to_json(self, value: Any): ... def to_python(self, value: Any): ... class TaggedJSONSerializer: default_tags: Any = ... tags: Any = ... order: Any = ... def __init__(self) -> None: ... def register(self, tag_class: Any, force: bool = ..., index: Optional[Any] = ...) -> None: ... def tag(self, value: Any): ... def untag(self, value: Any): ... def dumps(self, value: Any): ... def loads(self, value: Any): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/helpers.pyi0000664000175000017500000000407213577124116026224 0ustar davedave00000000000000# Stubs for flask.helpers (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .globals import _app_ctx_stack, _request_ctx_stack, current_app, request, session from .signals import message_flashed from typing import Any, Optional def get_env(): ... def get_debug_flag(): ... def get_load_dotenv(default: bool = ...): ... def stream_with_context(generator_or_function: Any): ... def make_response(*args: Any): ... def url_for(endpoint: Any, **values: Any): ... def get_template_attribute(template_name: Any, attribute: Any): ... def flash(message: Any, category: str = ...) -> None: ... def get_flashed_messages(with_categories: bool = ..., category_filter: Any = ...): ... def send_file(filename_or_fp: Any, mimetype: Optional[Any] = ..., as_attachment: bool = ..., attachment_filename: Optional[Any] = ..., add_etags: bool = ..., cache_timeout: Optional[Any] = ..., conditional: bool = ..., last_modified: Optional[Any] = ...): ... def safe_join(directory: Any, *pathnames: Any): ... def send_from_directory(directory: Any, filename: Any, **options: Any): ... def get_root_path(import_name: Any): ... def find_package(import_name: Any): ... class locked_cached_property: __name__: Any = ... __module__: Any = ... __doc__: Any = ... func: Any = ... lock: Any = ... def __init__(self, func: Any, name: Optional[Any] = ..., doc: Optional[Any] = ...) -> None: ... def __get__(self, obj: Any, type: Optional[Any] = ...): ... class _PackageBoundObject: import_name: Any = ... template_folder: Any = ... root_path: Any = ... def __init__(self, import_name: Any, template_folder: Optional[Any] = ..., root_path: Optional[Any] = ...) -> None: ... static_folder: Any = ... static_url_path: Any = ... @property def has_static_folder(self): ... def jinja_loader(self): ... def get_send_file_max_age(self, filename: Any): ... def send_static_file(self, filename: Any): ... def open_resource(self, resource: Any, mode: str = ...): ... def total_seconds(td: Any): ... def is_ip(value: Any): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/logging.pyi0000664000175000017500000000045113577124116026205 0ustar davedave00000000000000# Stubs for flask.logging (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .globals import request from typing import Any def wsgi_errors_stream(): ... def has_level_handler(logger: Any): ... default_handler: Any def create_logger(app: Any): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/flask/config.pyi0000664000175000017500000000173413577124116026031 0ustar davedave00000000000000# Stubs for flask.config (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional, Dict class ConfigAttribute: __name__: Any = ... get_converter: Any = ... def __init__(self, name: Any, get_converter: Optional[Any] = ...) -> None: ... def __get__(self, obj: Any, type: Optional[Any] = ...): ... def __set__(self, obj: Any, value: Any) -> None: ... class Config(Dict[str, Any]): root_path: Any = ... def __init__(self, root_path: Any, defaults: Optional[Any] = ...) -> None: ... def from_envvar(self, variable_name: Any, silent: bool = ...): ... def from_pyfile(self, filename: Any, silent: bool = ...): ... def from_object(self, obj: Any) -> None: ... def from_json(self, filename: Any, silent: bool = ...): ... def from_mapping(self, *mapping: Any, **kwargs: Any): ... def get_namespace(self, namespace: Any, lowercase: bool = ..., trim_namespace: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/mypy_extensions.pyi0000664000175000017500000000400313577124116026731 0ustar davedave00000000000000import abc import sys from typing import ( Dict, Type, TypeVar, Optional, Union, Any, Generic, Mapping, ItemsView, KeysView, ValuesView, Callable, ) _T = TypeVar('_T') _U = TypeVar('_U') # Internal mypy fallback type for all typed dicts (does not exist at runtime) class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): def copy(self: _T) -> _T: ... # Using NoReturn so that only calls using mypy plugin hook that specialize the signature # can go through. def setdefault(self, k: NoReturn, default: object) -> object: ... # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. def pop(self, k: NoReturn, default: _T = ...) -> object: ... def update(self: _T, __m: _T) -> None: ... if sys.version_info < (3, 0): def has_key(self, k: str) -> bool: ... def viewitems(self) -> ItemsView[str, object]: ... def viewkeys(self) -> KeysView[str]: ... def viewvalues(self) -> ValuesView[object]: ... def __delitem__(self, k: NoReturn) -> None: ... def TypedDict(typename: str, fields: Dict[str, Type[_T]], total: bool = ...) -> Type[Dict[str, Any]]: ... def Arg(type: _T = ..., name: Optional[str] = ...) -> _T: ... def DefaultArg(type: _T = ..., name: Optional[str] = ...) -> _T: ... def NamedArg(type: _T = ..., name: Optional[str] = ...) -> _T: ... def DefaultNamedArg(type: _T = ..., name: Optional[str] = ...) -> _T: ... def VarArg(type: _T = ...) -> _T: ... def KwArg(type: _T = ...) -> _T: ... # Return type that indicates a function does not return. # This type is equivalent to the None type, but the no-op Union is necessary to # distinguish the None type from the None value. NoReturn = Union[None] # Deprecated: Use typing.NoReturn instead. # This is intended as a class decorator, but mypy rejects abstract classes # when a Type[_T] is expected, so we can't give it the type we want def trait(cls: Any) -> Any: ... def mypyc_attr(*attrs: str, **kwattrs: object) -> Callable[[_T], _T]: ... class FlexibleAlias(Generic[_T, _U]): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/characteristic/0000775000175000017500000000000013577125145025727 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/characteristic/__init__.pyi0000664000175000017500000000245313577124116030212 0ustar davedave00000000000000from typing import Sequence, Callable, Union, Any, Optional, AnyStr, TypeVar, Type, Dict def with_repr(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... def with_cmp(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... def with_init(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... def immutable(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... def strip_leading_underscores(attribute_name: AnyStr) -> AnyStr: ... NOTHING = Any _T = TypeVar('_T') def attributes( attrs: Sequence[Union[AnyStr, Attribute]], apply_with_cmp: bool = ..., apply_with_init: bool = ..., apply_with_repr: bool = ..., apply_immutable: bool = ..., store_attributes: Optional[Callable[[type, Attribute], Any]] = ..., **kw: Optional[Dict[Any, Any]]) -> Callable[[Type[_T]], Type[_T]]: ... class Attribute: def __init__( self, name: AnyStr, exclude_from_cmp: bool = ..., exclude_from_init: bool = ..., exclude_from_repr: bool = ..., exclude_from_immutable: bool = ..., default_value: Any = ..., default_factory: Optional[Callable[[None], Any]] = ..., instance_of: Optional[Any] = ..., init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/markupsafe/0000775000175000017500000000000013577125145025075 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/markupsafe/__init__.pyi0000664000175000017500000000541113577124116027355 0ustar davedave00000000000000import sys from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Text, Tuple, Union from collections import Mapping from markupsafe._compat import text_type import string from markupsafe._native import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode class Markup(text_type): def __new__(cls, base: Text = ..., encoding: Optional[Text] = ..., errors: Text = ...) -> Markup: ... def __html__(self) -> Markup: ... def __add__(self, other: text_type) -> Markup: ... def __radd__(self, other: text_type) -> Markup: ... def __mul__(self, num: int) -> Markup: ... def __rmul__(self, num: int) -> Markup: ... def __mod__(self, *args: Any) -> Markup: ... def join(self, seq: Iterable[text_type]): ... def split(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ... def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ... def splitlines(self, keepends: bool = ...) -> List[text_type]: ... def unescape(self) -> Text: ... def striptags(self) -> Text: ... @classmethod def escape(cls, s: text_type) -> Markup: ... def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ... def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ... def format(self, *args, **kwargs) -> Markup: ... def __html_format__(self, format_spec) -> Markup: ... def __getslice__(self, start: int, stop: int) -> Markup: ... def __getitem__(self, i: Union[int, slice]) -> Markup: ... def capitalize(self) -> Markup: ... def title(self) -> Markup: ... def lower(self) -> Markup: ... def upper(self) -> Markup: ... def swapcase(self) -> Markup: ... def replace(self, old: text_type, new: text_type, count: int = ...) -> Markup: ... def ljust(self, width: int, fillchar: text_type = ...) -> Markup: ... def rjust(self, width: int, fillchar: text_type = ...) -> Markup: ... def lstrip(self, chars: Optional[text_type] = ...) -> Markup: ... def rstrip(self, chars: Optional[text_type] = ...) -> Markup: ... def strip(self, chars: Optional[text_type] = ...) -> Markup: ... def center(self, width: int, fillchar: text_type = ...) -> Markup: ... def zfill(self, width: int) -> Markup: ... def translate(self, table: Union[Mapping[int, Union[int, text_type, None]], Sequence[Union[int, text_type, None]]]) -> Markup: ... def expandtabs(self, tabsize: int = ...) -> Markup: ... class EscapeFormatter(string.Formatter): escape: Callable[[text_type], Markup] def __init__(self, escape: Callable[[text_type], Markup]) -> None: ... def format_field(self, value: text_type, format_spec: text_type) -> Markup: ... if sys.version_info >= (3,): soft_str = soft_unicode jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/markupsafe/_compat.pyi0000664000175000017500000000067013577124116027242 0ustar davedave00000000000000import sys from typing import Any, Iterator, Mapping, Text, Tuple, TypeVar _K = TypeVar('_K') _V = TypeVar('_V') PY2: bool def iteritems(d: Mapping[_K, _V]) -> Iterator[Tuple[_K, _V]]: ... if sys.version_info >= (3,): text_type = str string_types = str, unichr = chr int_types = int, else: from __builtin__ import unichr as unichr text_type = unicode string_types = (str, unicode) int_types = (int, long) jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/markupsafe/_speedups.pyi0000664000175000017500000000037713577124116027613 0ustar davedave00000000000000from . import Markup from ._compat import text_type, string_types from typing import Union, Text def escape(s: Union[Markup, Text]) -> Markup: ... def escape_silent(s: Union[None, Markup, Text]) -> Markup: ... def soft_unicode(s: Text) -> text_type: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/markupsafe/_native.pyi0000664000175000017500000000037713577124116027251 0ustar davedave00000000000000from . import Markup from ._compat import text_type, string_types from typing import Union, Text def escape(s: Union[Markup, Text]) -> Markup: ... def escape_silent(s: Union[None, Markup, Text]) -> Markup: ... def soft_unicode(s: Text) -> text_type: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/markupsafe/_constants.pyi0000664000175000017500000000010313577124116027762 0ustar davedave00000000000000from typing import Any, Dict, Text HTML_ENTITIES: Dict[Text, int] jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/mock.pyi0000664000175000017500000001227013577124116024412 0ustar davedave00000000000000# Stubs for mock import sys from typing import Any, List, Optional, Text, Tuple, Type, TypeVar _T = TypeVar("_T") FILTER_DIR: Any class _slotted: ... class _SentinelObject: name: Any def __init__(self, name: Any) -> None: ... class _Sentinel: def __init__(self) -> None: ... def __getattr__(self, name: str) -> Any: ... sentinel: Any DEFAULT: Any class _CallList(List[_T]): def __contains__(self, value: Any) -> bool: ... class _MockIter: obj: Any def __init__(self, obj: Any) -> None: ... def __iter__(self) -> Any: ... def __next__(self) -> Any: ... class Base: def __init__(self, *args: Any, **kwargs: Any) -> None: ... # TODO: Defining this and other mock classes as classes in this stub causes # many false positives with mypy and production code. See if we can # improve mypy somehow and use a class with an "Any" base class. NonCallableMock = Any class CallableMixin(Base): side_effect: Any def __init__(self, spec: Optional[Any] = ..., side_effect: Optional[Any] = ..., return_value: Any = ..., wraps: Optional[Any] = ..., name: Optional[Any] = ..., spec_set: Optional[Any] = ..., parent: Optional[Any] = ..., _spec_state: Optional[Any] = ..., _new_name: Any = ..., _new_parent: Optional[Any] = ..., **kwargs: Any) -> None: ... def __call__(_mock_self, *args: Any, **kwargs: Any) -> Any: ... Mock = Any class _patch: attribute_name: Any getter: Any attribute: Any new: Any new_callable: Any spec: Any create: bool has_local: Any spec_set: Any autospec: Any kwargs: Any additional_patchers: Any def __init__(self, getter: Any, attribute: Any, new: Any, spec: Any, create: Any, spec_set: Any, autospec: Any, new_callable: Any, kwargs: Any) -> None: ... def copy(self) -> Any: ... def __call__(self, func: Any) -> Any: ... def decorate_class(self, klass: Any) -> Any: ... def decorate_callable(self, func: Any) -> Any: ... def get_original(self) -> Any: ... target: Any temp_original: Any is_local: Any def __enter__(self) -> Any: ... def __exit__(self, *exc_info: Any) -> Any: ... def start(self) -> Any: ... def stop(self) -> Any: ... class _patch_dict: in_dict: Any values: Any clear: Any def __init__(self, in_dict: Any, values: Any = ..., clear: Any = ..., **kwargs: Any) -> None: ... def __call__(self, f: Any) -> Any: ... def decorate_class(self, klass: Any) -> Any: ... def __enter__(self) -> Any: ... def __exit__(self, *args: Any) -> Any: ... start: Any stop: Any class _patcher: TEST_PREFIX: str dict: Type[_patch_dict] def __call__(self, target: Any, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ... def object(self, target: Any, attribute: Text, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ... def multiple(self, target: Any, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ... def stopall(self) -> None: ... patch: _patcher class MagicMixin: def __init__(self, *args: Any, **kw: Any) -> None: ... NonCallableMagicMock = Any MagicMock = Any if sys.version_info >= (3, 8): AsyncMock = Any class MagicProxy: name: Any parent: Any def __init__(self, name: Any, parent: Any) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def create_mock(self) -> Any: ... def __get__(self, obj: Any, _type: Optional[Any] = ...) -> Any: ... class _ANY: def __eq__(self, other: Any) -> bool: ... def __ne__(self, other: Any) -> bool: ... ANY: Any class _Call(Tuple[Any, ...]): def __new__(cls, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> Any: ... name: Any parent: Any from_kall: Any def __init__(self, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> None: ... def __eq__(self, other: Any) -> bool: ... __ne__: Any def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __getattr__(self, attr: Any) -> Any: ... def count(self, *args: Any, **kwargs: Any) -> Any: ... def index(self, *args: Any, **kwargs: Any) -> Any: ... def call_list(self) -> Any: ... call: Any def create_autospec(spec: Any, spec_set: Any = ..., instance: Any = ..., _parent: Optional[Any] = ..., _name: Optional[Any] = ..., **kwargs: Any) -> Any: ... class _SpecState: spec: Any ids: Any spec_set: Any parent: Any instance: Any name: Any def __init__(self, spec: Any, spec_set: Any = ..., parent: Optional[Any] = ..., name: Optional[Any] = ..., ids: Optional[Any] = ..., instance: Any = ...) -> None: ... def mock_open(mock: Optional[Any] = ..., read_data: Any = ...) -> Any: ... PropertyMock = Any if sys.version_info >= (3, 7): def seal(mock: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/backports_abc.pyi0000664000175000017500000000033413577124116026254 0ustar davedave00000000000000from typing import Any def mk_gen(): ... def mk_awaitable(): ... def mk_coroutine(): ... Generator: Any Awaitable: Any Coroutine: Any def isawaitable(obj): ... PATCHED: Any def patch(patch_inspect: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/0000775000175000017500000000000013577125145024612 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/__init__.pyi0000664000175000017500000000165413577124116027077 0ustar davedave00000000000000# Stubs for requests (based on version 2.6.0, Python 3) from typing import Any from . import models from . import api from . import sessions from . import status_codes from . import exceptions from . import packages import logging __title__: Any __build__: Any __license__: Any __copyright__: Any __version__: Any Request = models.Request Response = models.Response PreparedRequest = models.PreparedRequest request = api.request get = api.get head = api.head post = api.post patch = api.patch put = api.put delete = api.delete options = api.options session = sessions.session Session = sessions.Session codes = status_codes.codes RequestException = exceptions.RequestException Timeout = exceptions.Timeout URLRequired = exceptions.URLRequired TooManyRedirects = exceptions.TooManyRedirects HTTPError = exceptions.HTTPError ConnectionError = exceptions.ConnectionError class NullHandler(logging.Handler): def emit(self, record): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/structures.pyi0000664000175000017500000000171013577124116027554 0ustar davedave00000000000000from typing import Any, Dict, Iterable, Iterator, Mapping, MutableMapping, Optional, Tuple, TypeVar, Union, Generic _VT = TypeVar('_VT') class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]): def __init__(self, data: Optional[Union[Mapping[str, _VT], Iterable[Tuple[str, _VT]]]] = ..., **kwargs: _VT) -> None: ... def lower_items(self) -> Iterator[Tuple[str, _VT]]: ... def __setitem__(self, key: str, value: _VT) -> None: ... def __getitem__(self, key: str) -> _VT: ... def __delitem__(self, key: str) -> None: ... def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... def copy(self) -> CaseInsensitiveDict[_VT]: ... class LookupDict(Dict[str, _VT]): name: Any def __init__(self, name: Any = ...) -> None: ... def __getitem__(self, key: str) -> Optional[_VT]: ... # type: ignore def __getattr__(self, attr: str) -> _VT: ... def __setattr__(self, attr: str, value: _VT) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/models.pyi0000664000175000017500000001124713577124116026622 0ustar davedave00000000000000# Stubs for requests.models (Python 3) from typing import (Any, Dict, Iterator, List, MutableMapping, Optional, Text, Union) import datetime import types from . import hooks from . import structures from . import auth from . import cookies from .cookies import RequestsCookieJar from .packages.urllib3 import fields from .packages.urllib3 import filepost from .packages.urllib3 import util from .packages.urllib3 import exceptions as urllib3_exceptions from . import exceptions from . import utils from . import compat from . import status_codes default_hooks = hooks.default_hooks CaseInsensitiveDict = structures.CaseInsensitiveDict HTTPBasicAuth = auth.HTTPBasicAuth cookiejar_from_dict = cookies.cookiejar_from_dict get_cookie_header = cookies.get_cookie_header RequestField = fields.RequestField encode_multipart_formdata = filepost.encode_multipart_formdata parse_url = util.parse_url DecodeError = urllib3_exceptions.DecodeError ReadTimeoutError = urllib3_exceptions.ReadTimeoutError ProtocolError = urllib3_exceptions.ProtocolError LocationParseError = urllib3_exceptions.LocationParseError HTTPError = exceptions.HTTPError MissingSchema = exceptions.MissingSchema InvalidURL = exceptions.InvalidURL ChunkedEncodingError = exceptions.ChunkedEncodingError ContentDecodingError = exceptions.ContentDecodingError ConnectionError = exceptions.ConnectionError StreamConsumedError = exceptions.StreamConsumedError guess_filename = utils.guess_filename get_auth_from_url = utils.get_auth_from_url requote_uri = utils.requote_uri stream_decode_response_unicode = utils.stream_decode_response_unicode to_key_val_list = utils.to_key_val_list parse_header_links = utils.parse_header_links iter_slices = utils.iter_slices guess_json_utf = utils.guess_json_utf super_len = utils.super_len to_native_string = utils.to_native_string codes = status_codes.codes REDIRECT_STATI: Any DEFAULT_REDIRECT_LIMIT: Any CONTENT_CHUNK_SIZE: Any ITER_CHUNK_SIZE: Any json_dumps: Any class RequestEncodingMixin: @property def path_url(self): ... class RequestHooksMixin: def register_hook(self, event, hook): ... def deregister_hook(self, event, hook): ... class Request(RequestHooksMixin): hooks: Any method: Any url: Any headers: Any files: Any data: Any json: Any params: Any auth: Any cookies: Any def __init__(self, method=..., url=..., headers=..., files=..., data=..., params=..., auth=..., cookies=..., hooks=..., json=...) -> None: ... def prepare(self): ... class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): method: Optional[Union[str, Text]] url: Optional[Union[str, Text]] headers: CaseInsensitiveDict[str] body: Optional[Union[bytes, Text]] hooks: Any def __init__(self) -> None: ... def prepare(self, method=..., url=..., headers=..., files=..., data=..., params=..., auth=..., cookies=..., hooks=..., json=...): ... def copy(self): ... def prepare_method(self, method): ... def prepare_url(self, url, params): ... def prepare_headers(self, headers): ... def prepare_body(self, data, files, json=...): ... def prepare_content_length(self, body): ... def prepare_auth(self, auth, url=...): ... def prepare_cookies(self, cookies): ... def prepare_hooks(self, hooks): ... class Response: __attrs__: Any status_code: int headers: MutableMapping[str, str] raw: Any url: str encoding: str history: List[Response] reason: str cookies: RequestsCookieJar elapsed: datetime.timedelta request: PreparedRequest def __init__(self) -> None: ... def __bool__(self) -> bool: ... def __nonzero__(self) -> bool: ... def __iter__(self) -> Iterator[bytes]: ... def __enter__(self) -> Response: ... def __exit__(self, *args: Any) -> None: ... @property def next(self) -> Optional[PreparedRequest]: ... @property def ok(self) -> bool: ... @property def is_redirect(self) -> bool: ... @property def is_permanent_redirect(self) -> bool: ... @property def apparent_encoding(self) -> str: ... def iter_content(self, chunk_size: Optional[int] = ..., decode_unicode: bool = ...) -> Iterator[Any]: ... def iter_lines(self, chunk_size: Optional[int] = ..., decode_unicode: bool = ..., delimiter: Union[Text, bytes] = ...) -> Iterator[Any]: ... @property def content(self) -> bytes: ... @property def text(self) -> str: ... def json(self, **kwargs) -> Any: ... @property def links(self) -> Dict[Any, Any]: ... def raise_for_status(self) -> None: ... def close(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/auth.pyi0000664000175000017500000000230713577124116026275 0ustar davedave00000000000000# Stubs for requests.auth (Python 3) from typing import Any, Text, Union from . import compat from . import cookies from . import models from . import utils from . import status_codes extract_cookies_to_jar = cookies.extract_cookies_to_jar parse_dict_header = utils.parse_dict_header to_native_string = utils.to_native_string codes = status_codes.codes CONTENT_TYPE_FORM_URLENCODED: Any CONTENT_TYPE_MULTI_PART: Any def _basic_auth_str(username: Union[bytes, Text], password: Union[bytes, Text]) -> str: ... class AuthBase: def __call__(self, r: models.PreparedRequest) -> models.PreparedRequest: ... class HTTPBasicAuth(AuthBase): username: Any password: Any def __init__(self, username, password) -> None: ... def __call__(self, r): ... class HTTPProxyAuth(HTTPBasicAuth): def __call__(self, r): ... class HTTPDigestAuth(AuthBase): username: Any password: Any last_nonce: Any nonce_count: Any chal: Any pos: Any num_401_calls: Any def __init__(self, username, password) -> None: ... def build_digest_header(self, method, url): ... def handle_redirect(self, r, **kwargs): ... def handle_401(self, r, **kwargs): ... def __call__(self, r): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/status_codes.pyi0000664000175000017500000000010613577124116030027 0ustar davedave00000000000000from typing import Any from .structures import LookupDict codes: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/utils.pyi0000664000175000017500000000315113577124116026472 0ustar davedave00000000000000# Stubs for requests.utils (Python 3) from typing import Any from . import compat from . import cookies from . import structures from . import exceptions OrderedDict = compat.OrderedDict RequestsCookieJar = cookies.RequestsCookieJar cookiejar_from_dict = cookies.cookiejar_from_dict CaseInsensitiveDict = structures.CaseInsensitiveDict InvalidURL = exceptions.InvalidURL NETRC_FILES: Any DEFAULT_CA_BUNDLE_PATH: Any def dict_to_sequence(d): ... def super_len(o): ... def get_netrc_auth(url): ... def guess_filename(obj): ... def from_key_val_list(value): ... def to_key_val_list(value): ... def parse_list_header(value): ... def parse_dict_header(value): ... def unquote_header_value(value, is_filename=...): ... def dict_from_cookiejar(cj): ... def add_dict_to_cookiejar(cj, cookie_dict): ... def get_encodings_from_content(content): ... def get_encoding_from_headers(headers): ... def stream_decode_response_unicode(iterator, r): ... def iter_slices(string, slice_length): ... def get_unicode_from_response(r): ... UNRESERVED_SET: Any def unquote_unreserved(uri): ... def requote_uri(uri): ... def address_in_network(ip, net): ... def dotted_netmask(mask): ... def is_ipv4_address(string_ip): ... def is_valid_cidr(string_network): ... def set_environ(env_name, value): ... def should_bypass_proxies(url): ... def get_environ_proxies(url): ... def default_user_agent(name=...): ... def default_headers(): ... def parse_header_links(value): ... def guess_json_utf(data): ... def prepend_scheme_if_needed(url, new_scheme): ... def get_auth_from_url(url): ... def to_native_string(string, encoding=...): ... def urldefragauth(url): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/compat.pyi0000664000175000017500000000017313577124116026616 0ustar davedave00000000000000# Stubs for requests.compat (Python 3.4) from typing import Any import collections OrderedDict = collections.OrderedDict jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/adapters.pyi0000664000175000017500000000606313577124116027142 0ustar davedave00000000000000# Stubs for requests.adapters (Python 3) from typing import Any, Container, Union, Text, Tuple, Optional, Mapping from . import models from .packages.urllib3 import poolmanager from .packages.urllib3 import response from .packages.urllib3.util import retry from . import compat from . import utils from . import structures from .packages.urllib3 import exceptions as urllib3_exceptions from . import cookies from . import exceptions from . import auth PreparedRequest = models.PreparedRequest Response = models.Response PoolManager = poolmanager.PoolManager proxy_from_url = poolmanager.proxy_from_url HTTPResponse = response.HTTPResponse Retry = retry.Retry DEFAULT_CA_BUNDLE_PATH = utils.DEFAULT_CA_BUNDLE_PATH get_encoding_from_headers = utils.get_encoding_from_headers prepend_scheme_if_needed = utils.prepend_scheme_if_needed get_auth_from_url = utils.get_auth_from_url urldefragauth = utils.urldefragauth CaseInsensitiveDict = structures.CaseInsensitiveDict ConnectTimeoutError = urllib3_exceptions.ConnectTimeoutError MaxRetryError = urllib3_exceptions.MaxRetryError ProtocolError = urllib3_exceptions.ProtocolError ReadTimeoutError = urllib3_exceptions.ReadTimeoutError ResponseError = urllib3_exceptions.ResponseError extract_cookies_to_jar = cookies.extract_cookies_to_jar ConnectionError = exceptions.ConnectionError ConnectTimeout = exceptions.ConnectTimeout ReadTimeout = exceptions.ReadTimeout SSLError = exceptions.SSLError ProxyError = exceptions.ProxyError RetryError = exceptions.RetryError DEFAULT_POOLBLOCK: Any DEFAULT_POOLSIZE: Any DEFAULT_RETRIES: Any class BaseAdapter: def __init__(self) -> None: ... def send(self, request: PreparedRequest, stream: bool = ..., timeout: Union[None, float, Tuple[float, float]] = ..., verify: Union[bool, str] = ..., cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]] = ..., proxies: Optional[Mapping[str, str]] = ...) -> Response: ... def close(self) -> None: ... class HTTPAdapter(BaseAdapter): __attrs__: Any max_retries: Any config: Any proxy_manager: Any def __init__(self, pool_connections=..., pool_maxsize=..., max_retries=..., pool_block=...) -> None: ... poolmanager: Any def init_poolmanager(self, connections, maxsize, block=..., **pool_kwargs): ... def proxy_manager_for(self, proxy, **proxy_kwargs): ... def cert_verify(self, conn, url, verify, cert): ... def build_response(self, req, resp): ... def get_connection(self, url, proxies=...): ... def close(self): ... def request_url(self, request, proxies): ... def add_headers(self, request, **kwargs): ... def proxy_headers(self, proxy): ... def send(self, request: PreparedRequest, stream: bool = ..., timeout: Union[None, float, Tuple[float, float]] = ..., verify: Union[bool, str] = ..., cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]] = ..., proxies: Optional[Mapping[str, str]] = ...) -> Response: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/0000775000175000017500000000000013577125145026370 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/__init__.pyi0000664000175000017500000000023613577124116030650 0ustar davedave00000000000000class VendorAlias: def __init__(self, package_names) -> None: ... def find_module(self, fullname, path=...): ... def load_module(self, name): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/0000775000175000017500000000000013577125145027744 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/__init__.pyi0000664000175000017500000000162213577124116032224 0ustar davedave00000000000000from typing import Any from . import connectionpool from . import filepost from . import poolmanager from . import response from .util import request as _request from .util import url from .util import timeout from .util import retry import logging __license__: Any HTTPConnectionPool = connectionpool.HTTPConnectionPool HTTPSConnectionPool = connectionpool.HTTPSConnectionPool connection_from_url = connectionpool.connection_from_url encode_multipart_formdata = filepost.encode_multipart_formdata PoolManager = poolmanager.PoolManager ProxyManager = poolmanager.ProxyManager proxy_from_url = poolmanager.proxy_from_url HTTPResponse = response.HTTPResponse make_headers = _request.make_headers get_host = url.get_host Timeout = timeout.Timeout Retry = retry.Retry class NullHandler(logging.Handler): def emit(self, record): ... def add_stderr_logger(level=...): ... def disable_warnings(category=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/request.pyi0000664000175000017500000000101013577124116032144 0ustar davedave00000000000000from typing import Any class RequestMethods: headers: Any def __init__(self, headers=...) -> None: ... def urlopen(self, method, url, body=..., headers=..., encode_multipart=..., multipart_boundary=..., **kw): ... def request(self, method, url, fields=..., headers=..., **urlopen_kw): ... def request_encode_url(self, method, url, fields=..., **urlopen_kw): ... def request_encode_body(self, method, url, fields=..., headers=..., encode_multipart=..., multipart_boundary=..., **urlopen_kw): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/contrib/0000775000175000017500000000000013577125145031404 5ustar davedave00000000000000././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/contrib/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/contrib/__init__.p0000664000175000017500000000000013577124116033307 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/0000775000175000017500000000000013577125145030721 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/__init__.pyi0000664000175000017500000000126413577124116033203 0ustar davedave00000000000000from . import connection from . import request from . import response from . import ssl_ from . import timeout from . import retry from . import url import ssl is_connection_dropped = connection.is_connection_dropped make_headers = request.make_headers is_fp_closed = response.is_fp_closed SSLContext = ssl.SSLContext HAS_SNI = ssl_.HAS_SNI assert_fingerprint = ssl_.assert_fingerprint resolve_cert_reqs = ssl_.resolve_cert_reqs resolve_ssl_version = ssl_.resolve_ssl_version ssl_wrap_socket = ssl_.ssl_wrap_socket current_time = timeout.current_time Timeout = timeout.Timeout Retry = retry.Retry get_host = url.get_host parse_url = url.parse_url split_first = url.split_first Url = url.Url jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/request.pyi0000664000175000017500000000033413577124116033131 0ustar davedave00000000000000from typing import Any # from ..packages import six # b = six.b ACCEPT_ENCODING: Any def make_headers(keep_alive=..., accept_encoding=..., user_agent=..., basic_auth=..., proxy_basic_auth=..., disable_cache=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/response.pyi0000664000175000017500000000003313577124116033273 0ustar davedave00000000000000def is_fp_closed(obj): ... ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/connection.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/connection.py0000664000175000017500000000027413577124116033432 0ustar davedave00000000000000from typing import Any poll: Any select: Any HAS_IPV6: bool def is_connection_dropped(conn): ... def create_connection(address, timeout=..., source_address=..., socket_options=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/retry.pyi0000664000175000017500000000211113577124116032601 0ustar davedave00000000000000from typing import Any from .. import exceptions from .. import packages ConnectTimeoutError = exceptions.ConnectTimeoutError MaxRetryError = exceptions.MaxRetryError ProtocolError = exceptions.ProtocolError ReadTimeoutError = exceptions.ReadTimeoutError ResponseError = exceptions.ResponseError log: Any class Retry: DEFAULT_METHOD_WHITELIST: Any BACKOFF_MAX: Any total: Any connect: Any read: Any redirect: Any status_forcelist: Any method_whitelist: Any backoff_factor: Any raise_on_redirect: Any def __init__(self, total=..., connect=..., read=..., redirect=..., method_whitelist=..., status_forcelist=..., backoff_factor=..., raise_on_redirect=..., _observed_errors=...) -> None: ... def new(self, **kw): ... @classmethod def from_int(cls, retries, redirect=..., default=...): ... def get_backoff_time(self): ... def sleep(self): ... def is_forced_retry(self, method, status_code): ... def is_exhausted(self): ... def increment(self, method=..., url=..., response=..., error=..., _pool=..., _stacktrace=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/url.pyi0000664000175000017500000000075313577124116032250 0ustar davedave00000000000000from typing import Any from .. import exceptions LocationParseError = exceptions.LocationParseError url_attrs: Any class Url: slots: Any def __new__(cls, scheme=..., auth=..., host=..., port=..., path=..., query=..., fragment=...): ... @property def hostname(self): ... @property def request_uri(self): ... @property def netloc(self): ... @property def url(self): ... def split_first(s, delims): ... def parse_url(url): ... def get_host(url): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/timeout.pyi0000664000175000017500000000076213577124116033134 0ustar davedave00000000000000from typing import Any from .. import exceptions TimeoutStateError = exceptions.TimeoutStateError def current_time(): ... class Timeout: DEFAULT_TIMEOUT: Any total: Any def __init__(self, total=..., connect=..., read=...) -> None: ... @classmethod def from_float(cls, timeout): ... def clone(self): ... def start_connect(self): ... def get_connect_duration(self): ... @property def connect_timeout(self): ... @property def read_timeout(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/util/ssl_.pyi0000664000175000017500000000123713577124116032404 0ustar davedave00000000000000from typing import Any from .. import exceptions import ssl SSLError = exceptions.SSLError InsecurePlatformWarning = exceptions.InsecurePlatformWarning SSLContext = ssl.SSLContext HAS_SNI: Any create_default_context: Any OP_NO_SSLv2: Any OP_NO_SSLv3: Any OP_NO_COMPRESSION: Any def assert_fingerprint(cert, fingerprint): ... def resolve_cert_reqs(candidate): ... def resolve_ssl_version(candidate): ... def create_urllib3_context(ssl_version=..., cert_reqs=..., options=..., ciphers=...): ... def ssl_wrap_socket(sock, keyfile=..., certfile=..., cert_reqs=..., ca_certs=..., server_hostname=..., ssl_version=..., ciphers=..., ssl_context=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/response.pyi0000664000175000017500000000324113577124116032322 0ustar davedave00000000000000from typing import Any import io from . import _collections from . import exceptions from .connection import HTTPException as HTTPException, BaseSSLError as BaseSSLError from .util import response HTTPHeaderDict = _collections.HTTPHeaderDict ProtocolError = exceptions.ProtocolError DecodeError = exceptions.DecodeError ReadTimeoutError = exceptions.ReadTimeoutError binary_type = bytes # six.binary_type PY3 = True # six.PY3 is_fp_closed = response.is_fp_closed class DeflateDecoder: def __init__(self) -> None: ... def __getattr__(self, name): ... def decompress(self, data): ... class GzipDecoder: def __init__(self) -> None: ... def __getattr__(self, name): ... def decompress(self, data): ... class HTTPResponse(io.IOBase): CONTENT_DECODERS: Any REDIRECT_STATUSES: Any headers: Any status: Any version: Any reason: Any strict: Any decode_content: Any def __init__(self, body=..., headers=..., status=..., version=..., reason=..., strict=..., preload_content=..., decode_content=..., original_response=..., pool=..., connection=...) -> None: ... def get_redirect_location(self): ... def release_conn(self): ... @property def data(self): ... def tell(self): ... def read(self, amt=..., decode_content=..., cache_content=...): ... def stream(self, amt=..., decode_content=...): ... @classmethod def from_httplib(cls, r, **response_kw): ... def getheaders(self): ... def getheader(self, name, default=...): ... def close(self): ... @property def closed(self): ... def fileno(self): ... def flush(self): ... def readable(self): ... def readinto(self, b): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/connection.pyi0000664000175000017500000000401013577124116032616 0ustar davedave00000000000000# Stubs for requests.packages.urllib3.connection (Python 3.4) import sys from typing import Any from . import packages import ssl from . import exceptions from .packages import ssl_match_hostname from .util import ssl_ from . import util if sys.version_info < (3, 0): from httplib import HTTPConnection as _HTTPConnection from httplib import HTTPException as HTTPException class ConnectionError(Exception): ... else: from http.client import HTTPConnection as _HTTPConnection from http.client import HTTPException as HTTPException from builtins import ConnectionError as ConnectionError class DummyConnection: ... BaseSSLError = ssl.SSLError ConnectTimeoutError = exceptions.ConnectTimeoutError SystemTimeWarning = exceptions.SystemTimeWarning SecurityWarning = exceptions.SecurityWarning match_hostname = ssl_match_hostname.match_hostname resolve_cert_reqs = ssl_.resolve_cert_reqs resolve_ssl_version = ssl_.resolve_ssl_version ssl_wrap_socket = ssl_.ssl_wrap_socket assert_fingerprint = ssl_.assert_fingerprint connection = util.connection port_by_scheme: Any RECENT_DATE: Any class HTTPConnection(_HTTPConnection): default_port: Any default_socket_options: Any is_verified: Any source_address: Any socket_options: Any def __init__(self, *args, **kw) -> None: ... def connect(self): ... class HTTPSConnection(HTTPConnection): default_port: Any key_file: Any cert_file: Any def __init__(self, host, port=..., key_file=..., cert_file=..., strict=..., timeout=..., **kw) -> None: ... sock: Any def connect(self): ... class VerifiedHTTPSConnection(HTTPSConnection): cert_reqs: Any ca_certs: Any ssl_version: Any assert_fingerprint: Any key_file: Any cert_file: Any assert_hostname: Any def set_cert(self, key_file=..., cert_file=..., cert_reqs=..., ca_certs=..., assert_hostname=..., assert_fingerprint=...): ... sock: Any auto_open: Any is_verified: Any def connect(self): ... UnverifiedHTTPSConnection = HTTPSConnection jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/fields.pyi0000664000175000017500000000101413577124116031726 0ustar davedave00000000000000# Stubs for requests.packages.urllib3.fields (Python 3.4) from typing import Any from . import packages def guess_content_type(filename, default=...): ... def format_header_param(name, value): ... class RequestField: data: Any headers: Any def __init__(self, name, data, filename=..., headers=...) -> None: ... @classmethod def from_tuples(cls, fieldname, value): ... def render_headers(self): ... def make_multipart(self, content_disposition=..., content_type=..., content_location=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/filepost.pyi0000664000175000017500000000050713577124116032313 0ustar davedave00000000000000from typing import Any from . import packages # from .packages import six from . import fields # six = packages.six # b = six.b RequestField = fields.RequestField writer: Any def choose_boundary(): ... def iter_field_objects(fields): ... def iter_fields(fields): ... def encode_multipart_formdata(fields, boundary=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/_collections.pyi0000664000175000017500000000277713577124116033156 0ustar davedave00000000000000from typing import Any, NoReturn, TypeVar from collections import MutableMapping _KT = TypeVar("_KT") _VT = TypeVar("_VT") class RLock: def __enter__(self): ... def __exit__(self, exc_type, exc_value, traceback): ... class RecentlyUsedContainer(MutableMapping[_KT, _VT]): ContainerCls: Any dispose_func: Any lock: Any def __init__(self, maxsize=..., dispose_func=...) -> None: ... def __getitem__(self, key): ... def __setitem__(self, key, value): ... def __delitem__(self, key): ... def __len__(self): ... def __iter__(self): ... def clear(self): ... def keys(self): ... class HTTPHeaderDict(MutableMapping[str, str]): def __init__(self, headers=..., **kwargs) -> None: ... def __setitem__(self, key, val): ... def __getitem__(self, key): ... def __delitem__(self, key): ... def __contains__(self, key): ... def __eq__(self, other): ... def __iter__(self) -> NoReturn: ... def __len__(self) -> int: ... def __ne__(self, other): ... values: Any get: Any update: Any iterkeys: Any itervalues: Any def pop(self, key, default=...): ... def discard(self, key): ... def add(self, key, val): ... def extend(self, *args, **kwargs): ... def getlist(self, key): ... getheaders: Any getallmatchingheaders: Any iget: Any def copy(self): ... def iteritems(self): ... def itermerged(self): ... def items(self): ... @classmethod def from_httplib(cls, message, duplicates=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/connectionpool.pyi0000664000175000017500000000556613577124116033531 0ustar davedave00000000000000from typing import Any from . import exceptions from .packages import ssl_match_hostname from . import packages from .connection import ( HTTPException as HTTPException, BaseSSLError as BaseSSLError, ConnectionError as ConnectionError, ) from . import request from . import response from . import connection from .util import connection as _connection from .util import retry from .util import timeout from .util import url ClosedPoolError = exceptions.ClosedPoolError ProtocolError = exceptions.ProtocolError EmptyPoolError = exceptions.EmptyPoolError HostChangedError = exceptions.HostChangedError LocationValueError = exceptions.LocationValueError MaxRetryError = exceptions.MaxRetryError ProxyError = exceptions.ProxyError ReadTimeoutError = exceptions.ReadTimeoutError SSLError = exceptions.SSLError TimeoutError = exceptions.TimeoutError InsecureRequestWarning = exceptions.InsecureRequestWarning CertificateError = ssl_match_hostname.CertificateError port_by_scheme = connection.port_by_scheme DummyConnection = connection.DummyConnection HTTPConnection = connection.HTTPConnection HTTPSConnection = connection.HTTPSConnection VerifiedHTTPSConnection = connection.VerifiedHTTPSConnection RequestMethods = request.RequestMethods HTTPResponse = response.HTTPResponse is_connection_dropped = _connection.is_connection_dropped Retry = retry.Retry Timeout = timeout.Timeout get_host = url.get_host xrange: Any log: Any class ConnectionPool: scheme: Any QueueCls: Any host: Any port: Any def __init__(self, host, port=...) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_val, exc_tb): ... def close(self): ... class HTTPConnectionPool(ConnectionPool, RequestMethods): scheme: Any ConnectionCls: Any strict: Any timeout: Any retries: Any pool: Any block: Any proxy: Any proxy_headers: Any num_connections: Any num_requests: Any conn_kw: Any def __init__(self, host, port=..., strict=..., timeout=..., maxsize=..., block=..., headers=..., retries=..., _proxy=..., _proxy_headers=..., **conn_kw) -> None: ... def close(self): ... def is_same_host(self, url): ... def urlopen(self, method, url, body=..., headers=..., retries=..., redirect=..., assert_same_host=..., timeout=..., pool_timeout=..., release_conn=..., **response_kw): ... class HTTPSConnectionPool(HTTPConnectionPool): scheme: Any ConnectionCls: Any key_file: Any cert_file: Any cert_reqs: Any ca_certs: Any ssl_version: Any assert_hostname: Any assert_fingerprint: Any def __init__(self, host, port=..., strict=..., timeout=..., maxsize=..., block=..., headers=..., retries=..., _proxy=..., _proxy_headers=..., key_file=..., cert_file=..., cert_reqs=..., ca_certs=..., ssl_version=..., assert_hostname=..., assert_fingerprint=..., **conn_kw) -> None: ... def connection_from_url(url, **kw): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/0000775000175000017500000000000013577125145031522 5ustar davedave00000000000000././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/__init__.0000664000175000017500000000000013577124116033245 0ustar davedave00000000000000././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match_hostname/jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match0000775000175000017500000000000013577125145033420 5ustar davedave00000000000000././@LongLink0000000000000000000000000000017300000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match0000664000175000017500000000013013577124116033411 0ustar davedave00000000000000import ssl CertificateError = ssl.CertificateError match_hostname = ssl.match_hostname ././@LongLink0000000000000000000000000000020200000000000011207 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/packages/ssl_match0000664000175000017500000000012113577124116033411 0ustar davedave00000000000000class CertificateError(ValueError): ... def match_hostname(cert, hostname): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/exceptions.pyi0000664000175000017500000000260513577124116032650 0ustar davedave00000000000000from typing import Any class HTTPError(Exception): ... class HTTPWarning(Warning): ... class PoolError(HTTPError): pool: Any def __init__(self, pool, message) -> None: ... def __reduce__(self): ... class RequestError(PoolError): url: Any def __init__(self, pool, url, message) -> None: ... def __reduce__(self): ... class SSLError(HTTPError): ... class ProxyError(HTTPError): ... class DecodeError(HTTPError): ... class ProtocolError(HTTPError): ... ConnectionError: Any class MaxRetryError(RequestError): reason: Any def __init__(self, pool, url, reason=...) -> None: ... class HostChangedError(RequestError): retries: Any def __init__(self, pool, url, retries=...) -> None: ... class TimeoutStateError(HTTPError): ... class TimeoutError(HTTPError): ... class ReadTimeoutError(TimeoutError, RequestError): ... class ConnectTimeoutError(TimeoutError): ... class EmptyPoolError(PoolError): ... class ClosedPoolError(PoolError): ... class LocationValueError(ValueError, HTTPError): ... class LocationParseError(LocationValueError): location: Any def __init__(self, location) -> None: ... class ResponseError(HTTPError): GENERIC_ERROR: Any SPECIFIC_ERROR: Any class SecurityWarning(HTTPWarning): ... class InsecureRequestWarning(SecurityWarning): ... class SystemTimeWarning(SecurityWarning): ... class InsecurePlatformWarning(SecurityWarning): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/packages/urllib3/poolmanager.pyi0000664000175000017500000000243413577124116032773 0ustar davedave00000000000000from typing import Any from .request import RequestMethods class PoolManager(RequestMethods): proxy: Any connection_pool_kw: Any pools: Any def __init__(self, num_pools=..., headers=..., **connection_pool_kw) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_val, exc_tb): ... def clear(self): ... def connection_from_host(self, host, port=..., scheme=...): ... def connection_from_url(self, url): ... # TODO: This was the original signature -- copied another one from base class to fix complaint. # def urlopen(self, method, url, redirect=True, **kw): ... def urlopen(self, method, url, body=..., headers=..., encode_multipart=..., multipart_boundary=..., **kw): ... class ProxyManager(PoolManager): proxy: Any proxy_headers: Any def __init__(self, proxy_url, num_pools=..., headers=..., proxy_headers=..., **connection_pool_kw) -> None: ... def connection_from_host(self, host, port=..., scheme=...): ... # TODO: This was the original signature -- copied another one from base class to fix complaint. # def urlopen(self, method, url, redirect=True, **kw): ... def urlopen(self, method, url, body=..., headers=..., encode_multipart=..., multipart_boundary=..., **kw): ... def proxy_from_url(url, **kw): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/exceptions.pyi0000664000175000017500000000175313577124116027521 0ustar davedave00000000000000# Stubs for requests.exceptions (Python 3) from typing import Any from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): response: Any request: Any def __init__(self, *args, **kwargs) -> None: ... class HTTPError(RequestException): ... class ConnectionError(RequestException): ... class ProxyError(ConnectionError): ... class SSLError(ConnectionError): ... class Timeout(RequestException): ... class ConnectTimeout(ConnectionError, Timeout): ... class ReadTimeout(Timeout): ... class URLRequired(RequestException): ... class TooManyRedirects(RequestException): ... class MissingSchema(RequestException, ValueError): ... class InvalidSchema(RequestException, ValueError): ... class InvalidURL(RequestException, ValueError): ... class ChunkedEncodingError(RequestException): ... class ContentDecodingError(RequestException, BaseHTTPError): ... class StreamConsumedError(RequestException, TypeError): ... class RetryError(RequestException): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/sessions.pyi0000664000175000017500000001163413577124116027205 0ustar davedave00000000000000# Stubs for requests.sessions (Python 3) from typing import Any, Union, List, MutableMapping, Text, Optional, IO, Tuple, Callable, Iterable from . import adapters from . import auth as _auth from . import compat from . import cookies from . import models from .models import Response from . import hooks from . import utils from . import exceptions from .packages.urllib3 import _collections from . import structures from . import status_codes BaseAdapter = adapters.BaseAdapter OrderedDict = compat.OrderedDict cookiejar_from_dict = cookies.cookiejar_from_dict extract_cookies_to_jar = cookies.extract_cookies_to_jar RequestsCookieJar = cookies.RequestsCookieJar merge_cookies = cookies.merge_cookies Request = models.Request PreparedRequest = models.PreparedRequest DEFAULT_REDIRECT_LIMIT = models.DEFAULT_REDIRECT_LIMIT default_hooks = hooks.default_hooks dispatch_hook = hooks.dispatch_hook to_key_val_list = utils.to_key_val_list default_headers = utils.default_headers to_native_string = utils.to_native_string TooManyRedirects = exceptions.TooManyRedirects InvalidSchema = exceptions.InvalidSchema ChunkedEncodingError = exceptions.ChunkedEncodingError ContentDecodingError = exceptions.ContentDecodingError RecentlyUsedContainer = _collections.RecentlyUsedContainer CaseInsensitiveDict = structures.CaseInsensitiveDict HTTPAdapter = adapters.HTTPAdapter requote_uri = utils.requote_uri get_environ_proxies = utils.get_environ_proxies get_netrc_auth = utils.get_netrc_auth should_bypass_proxies = utils.should_bypass_proxies get_auth_from_url = utils.get_auth_from_url codes = status_codes.codes REDIRECT_STATI = models.REDIRECT_STATI REDIRECT_CACHE_SIZE: Any def merge_setting(request_setting, session_setting, dict_class=...): ... def merge_hooks(request_hooks, session_hooks, dict_class=...): ... class SessionRedirectMixin: def resolve_redirects(self, resp, req, stream=..., timeout=..., verify=..., cert=..., proxies=...): ... def rebuild_auth(self, prepared_request, response): ... def rebuild_proxies(self, prepared_request, proxies): ... _Data = Union[None, Text, bytes, MutableMapping[str, Any], MutableMapping[Text, Any], Iterable[Tuple[Text, Optional[Text]]], IO] _Hook = Callable[[Response], Any] _Hooks = MutableMapping[Text, List[_Hook]] _HooksInput = MutableMapping[Text, Union[Iterable[_Hook], _Hook]] class Session(SessionRedirectMixin): __attrs__: Any headers: CaseInsensitiveDict[Text] auth: Union[None, Tuple[Text, Text], _auth.AuthBase, Callable[[Request], Request]] proxies: MutableMapping[Text, Text] hooks: _Hooks params: Union[bytes, MutableMapping[Text, Text]] stream: bool verify: Union[None, bool, Text] cert: Union[None, Text, Tuple[Text, Text]] max_redirects: int trust_env: bool cookies: RequestsCookieJar adapters: MutableMapping[Any, Any] redirect_cache: RecentlyUsedContainer[Any, Any] def __init__(self) -> None: ... def __enter__(self) -> Session: ... def __exit__(self, *args) -> None: ... def prepare_request(self, request): ... def request(self, method: str, url: Union[str, bytes, Text], params: Union[None, bytes, MutableMapping[Text, Text]] = ..., data: _Data = ..., headers: Optional[MutableMapping[Text, Text]] = ..., cookies: Union[None, RequestsCookieJar, MutableMapping[Text, Text]] = ..., files: Optional[MutableMapping[Text, IO[Any]]] = ..., auth: Union[None, Tuple[Text, Text], _auth.AuthBase, Callable[[Request], Request]] = ..., timeout: Union[None, float, Tuple[float, float]] = ..., allow_redirects: Optional[bool] = ..., proxies: Optional[MutableMapping[Text, Text]] = ..., hooks: Optional[_HooksInput] = ..., stream: Optional[bool] = ..., verify: Union[None, bool, Text] = ..., cert: Union[Text, Tuple[Text, Text], None] = ..., json: Optional[Any] = ..., ) -> Response: ... def get(self, url: Union[Text, bytes], **kwargs) -> Response: ... def options(self, url: Union[Text, bytes], **kwargs) -> Response: ... def head(self, url: Union[Text, bytes], **kwargs) -> Response: ... def post(self, url: Union[Text, bytes], data: _Data = ..., json: Optional[Any] = ..., **kwargs) -> Response: ... def put(self, url: Union[Text, bytes], data: _Data = ..., **kwargs) -> Response: ... def patch(self, url: Union[Text, bytes], data: _Data = ..., **kwargs) -> Response: ... def delete(self, url: Union[Text, bytes], **kwargs) -> Response: ... def send(self, request, **kwargs): ... def merge_environment_settings(self, url, proxies, stream, verify, cert): ... def get_adapter(self, url): ... def close(self) -> None: ... def mount(self, prefix: Union[Text, bytes], adapter: BaseAdapter) -> None: ... def session() -> Session: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/api.pyi0000664000175000017500000000250113577124116026101 0ustar davedave00000000000000# Stubs for requests.api (Python 3) import sys from typing import Optional, Union, Any, Iterable, Mapping, MutableMapping, Tuple, IO, Text from .models import Response from .sessions import _Data _ParamsMappingValueType = Union[Text, bytes, int, float, Iterable[Union[Text, bytes, int, float]]] def request(method: str, url: str, **kwargs) -> Response: ... def get( url: Union[Text, bytes], params: Optional[ Union[ Mapping[Union[Text, bytes, int, float], _ParamsMappingValueType], Union[Text, bytes], Tuple[Union[Text, bytes, int, float], _ParamsMappingValueType], Mapping[Text, _ParamsMappingValueType], Mapping[bytes, _ParamsMappingValueType], Mapping[int, _ParamsMappingValueType], Mapping[float, _ParamsMappingValueType], ] ] = ..., **kwargs, ) -> Response: ... def options(url: Union[Text, bytes], **kwargs) -> Response: ... def head(url: Union[Text, bytes], **kwargs) -> Response: ... def post(url: Union[Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ... def put(url: Union[Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ... def patch(url: Union[Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ... def delete(url: Union[Text, bytes], **kwargs) -> Response: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/cookies.pyi0000664000175000017500000000404413577124116026770 0ustar davedave00000000000000# Stubs for requests.cookies (Python 3) import sys from typing import Any, MutableMapping import collections from . import compat if sys.version_info < (3, 0): from cookielib import CookieJar else: from http.cookiejar import CookieJar class MockRequest: type: Any def __init__(self, request) -> None: ... def get_type(self): ... def get_host(self): ... def get_origin_req_host(self): ... def get_full_url(self): ... def is_unverifiable(self): ... def has_header(self, name): ... def get_header(self, name, default=...): ... def add_header(self, key, val): ... def add_unredirected_header(self, name, value): ... def get_new_headers(self): ... @property def unverifiable(self): ... @property def origin_req_host(self): ... @property def host(self): ... class MockResponse: def __init__(self, headers) -> None: ... def info(self): ... def getheaders(self, name): ... def extract_cookies_to_jar(jar, request, response): ... def get_cookie_header(jar, request): ... def remove_cookie_by_name(cookiejar, name, domain=..., path=...): ... class CookieConflictError(RuntimeError): ... class RequestsCookieJar(CookieJar, MutableMapping[Any, Any]): def get(self, name, default=..., domain=..., path=...): ... def set(self, name, value, **kwargs): ... def iterkeys(self): ... def keys(self): ... def itervalues(self): ... def values(self): ... def iteritems(self): ... def items(self): ... def list_domains(self): ... def list_paths(self): ... def multiple_domains(self): ... def get_dict(self, domain=..., path=...): ... def __getitem__(self, name): ... def __setitem__(self, name, value): ... def __delitem__(self, name): ... def set_cookie(self, cookie, *args, **kwargs): ... def update(self, other): ... def copy(self): ... def create_cookie(name, value, **kwargs): ... def morsel_to_cookie(morsel): ... def cookiejar_from_dict(cookie_dict, cookiejar=..., overwrite=...): ... def merge_cookies(cookiejar, cookies): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/requests/hooks.pyi0000664000175000017500000000023413577124116026454 0ustar davedave00000000000000# Stubs for requests.hooks (Python 3) from typing import Any HOOKS: Any def default_hooks(): ... def dispatch_hook(key, hooks, hook_data, **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/singledispatch.pyi0000664000175000017500000000117413577124116026463 0ustar davedave00000000000000from typing import Any, Callable, Generic, Mapping, Optional, TypeVar, overload _T = TypeVar("_T") class _SingleDispatchCallable(Generic[_T]): registry: Mapping[Any, Callable[..., _T]] def dispatch(self, cls: Any) -> Callable[..., _T]: ... @overload def register(self, cls: Any) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... @overload def register(self, cls: Any, func: Callable[..., _T]) -> Callable[..., _T]: ... def _clear_cache(self) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> _T: ... def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/atomicwrites/0000775000175000017500000000000013577125145025451 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/atomicwrites/__init__.pyi0000664000175000017500000000154613577124116027736 0ustar davedave00000000000000from typing import Any, AnyStr, Callable, ContextManager, Generic, IO, Optional, Text, Type, Union def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ... def move_atomic(src: AnyStr, dst: AnyStr) -> None: ... class AtomicWriter(object): def __init__(self, path: Union[Text, bytes], mode: Text = ..., overwrite: bool = ...) -> None: ... def open(self) -> ContextManager[IO[Any]]: ... def _open(self, get_fileobject: Callable[..., IO[AnyStr]]) -> ContextManager[IO[AnyStr]]: ... def get_fileobject(self, dir: Union[None, Text, bytes] = ..., **kwargs: Any) -> IO[Any]: ... def sync(self, f: IO[Any]) -> None: ... def commit(self, f: IO[Any]) -> None: ... def rollback(self, f: IO[Any]) -> None: ... def atomic_write( path: Union[Text, bytes], writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object, ) -> ContextManager[IO[Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/0000775000175000017500000000000013577125145024702 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/__init__.pyi0000664000175000017500000000026213577124116027161 0ustar davedave00000000000000from typing import Text from maxminddb import reader def open_database(database: Text, mode: int = ...) -> reader.Reader: ... def Reader(database: Text) -> reader.Reader: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/decoder.pyi0000664000175000017500000000032713577124116027031 0ustar davedave00000000000000from typing import Any, Tuple class Decoder: def __init__(self, database_buffer: bytes, pointer_base: int = ..., pointer_test: bool = ...) -> None: ... def decode(self, offset: int) -> Tuple[Any, int]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/reader.pyi0000664000175000017500000000231713577124116026667 0ustar davedave00000000000000from ipaddress import IPv4Address, IPv6Address from types import TracebackType from typing import Any, Mapping, Optional, Sequence, Text, Tuple, Type, Union class Reader: closed: bool = ... def __init__(self, database: bytes, mode: int = ...) -> None: ... def metadata(self) -> Metadata: ... def get(self, ip_address: Union[Text, IPv4Address, IPv6Address]) -> Optional[Any]: ... def get_with_prefix_len(self, ip_address: Union[Text, IPv4Address, IPv6Address]) -> Tuple[Optional[Any], int]: ... def close(self) -> None: ... def __enter__(self) -> Reader: ... def __exit__(self, exc_type: Optional[Type[BaseException]] = ..., exc_val: Optional[BaseException] = ..., exc_tb: Optional[TracebackType] = ...) -> None: ... class Metadata: node_count: int = ... record_size: int = ... ip_version: int = ... database_type: Text = ... languages: Sequence[Text] = ... binary_format_major_version: int = ... binary_format_minor_version: int = ... build_epoch: int = ... description: Mapping[Text, Text] = ... def __init__(self, **kwargs: Any) -> None: ... @property def node_byte_size(self) -> int: ... @property def search_tree_size(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/const.pyi0000664000175000017500000000020213577124116026542 0ustar davedave00000000000000MODE_AUTO: int = ... MODE_MMAP_EXT: int = ... MODE_MMAP: int = ... MODE_FILE: int = ... MODE_MEMORY: int = ... MODE_FD: int = ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/extension.pyi0000664000175000017500000000214213577124116027435 0ustar davedave00000000000000from typing import Any, Mapping, Sequence, Text from maxminddb.errors import InvalidDatabaseError as InvalidDatabaseError class Reader: closed: bool = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... def close(self, *args: Any, **kwargs: Any) -> Any: ... def get(self, *args: Any, **kwargs: Any) -> Any: ... def metadata(self, *args: Any, **kwargs: Any) -> Any: ... def __enter__(self, *args: Any, **kwargs: Any) -> Any: ... def __exit__(self, *args: Any, **kwargs: Any) -> Any: ... class extension: @property def node_count(self) -> int: ... @property def record_size(self) -> int: ... @property def ip_version(self) -> int: ... @property def database_type(self) -> Text: ... @property def languages(self) -> Sequence[Text]: ... @property def binary_format_major_version(self) -> int: ... @property def binary_format_minor_version(self) -> int: ... @property def build_epoch(self) -> int: ... @property def description(self) -> Mapping[Text, Text]: ... def __init__(self, **kwargs: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/compat.pyi0000664000175000017500000000036213577124116026706 0ustar davedave00000000000000from ipaddress import IPv4Address, IPv6Address from typing import Any def compat_ip_address(address: object) -> Any: ... def int_from_byte(x: int) -> int: ... def int_from_bytes(x: bytes) -> int: ... def byte_from_int(x: int) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/maxminddb/errors.pyi0000664000175000017500000000005613577124116026737 0ustar davedave00000000000000class InvalidDatabaseError(RuntimeError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/tabulate.pyi0000664000175000017500000000265713577124116025272 0ustar davedave00000000000000# Stub for tabulate: https://github.com/astanin/python-tabulate from typing import Any, Callable, Container, Iterable, List, Mapping, NamedTuple, Optional, Sequence, Union PRESERVE_WHITESPACE: bool WIDE_CHARS_MODE: bool tabulate_formats: List[str] class Line(NamedTuple): begin: str hline: str sep: str end: str class DataRow(NamedTuple): begin: str sep: str end: str _TableFormatLine = Union[None, Line, Callable[[List[int], List[str]], str]] _TableFormatRow = Union[None, DataRow, Callable[[List[Any], List[int], List[str]], str]] class TableFormat(NamedTuple): lineabove: _TableFormatLine linebelowheader: _TableFormatLine linebetweenrows: _TableFormatLine linebelow: _TableFormatLine headerrow: _TableFormatRow datarow: _TableFormatRow padding: int with_header_hide: Optional[Container[str]] def simple_separated_format(separator: str) -> TableFormat: ... def tabulate( tabular_data: Union[Mapping[str, Iterable[Any]], Iterable[Iterable[Any]]], headers: Union[str, Sequence[str]] = ..., tablefmt: Union[str, TableFormat] = ..., floatfmt: Union[str, Iterable[str]] = ..., numalign: Optional[str] = ..., stralign: Optional[str] = ..., missingval: Union[str, Iterable[str]] = ..., showindex: Union[str, bool, Iterable[Any]] = ..., disable_numparse: Union[bool, Iterable[int]] = ..., colalign: Optional[Iterable[Optional[str]]] = ..., ) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/simplejson/0000775000175000017500000000000013577125145025122 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/simplejson/__init__.pyi0000664000175000017500000000103313577124116027376 0ustar davedave00000000000000from typing import Any, IO, Text, Union from simplejson.scanner import JSONDecodeError as JSONDecodeError from simplejson.decoder import JSONDecoder as JSONDecoder from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as JSONEncoderForHTML _LoadsString = Union[Text, bytes, bytearray] def dumps(obj: Any, *args: Any, **kwds: Any) -> str: ... def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... def loads(s: _LoadsString, **kwds: Any) -> Any: ... def load(fp: IO[str], **kwds: Any) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/simplejson/decoder.pyi0000664000175000017500000000035213577124116027247 0ustar davedave00000000000000from typing import Any, Match class JSONDecoder(object): def __init__(self, **kwargs): ... def decode(self, s: str, _w: Match[str], _PY3: bool): ... def raw_decode(self, s: str, idx: int, _w: Match[str], _PY3: bool): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/simplejson/encoder.pyi0000664000175000017500000000041413577124116027260 0ustar davedave00000000000000from typing import Any, IO class JSONEncoder(object): def __init__(self, *args, **kwargs): ... def encode(self, o: Any): ... def default(self, o: Any): ... def iterencode(self, o: Any, _one_shot: bool): ... class JSONEncoderForHTML(JSONEncoder): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/simplejson/scanner.pyi0000664000175000017500000000040613577124116027273 0ustar davedave00000000000000from typing import Optional class JSONDecodeError(ValueError): msg: str = ... doc: str = ... pos: int = ... end: Optional[int] = ... lineno: int = ... colno: int = ... endlineno: Optional[int] = ... endcolno: Optional[int] = ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/0000775000175000017500000000000013577125145024550 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/__init__.pyi0000664000175000017500000000002113577124116027020 0ustar davedave00000000000000__license__: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/indexes.pyi0000664000175000017500000000172613577124116026735 0ustar davedave00000000000000from typing import Any, Optional class IndexMeta(type): def __init__(self, name, bases, attrs) -> None: ... class Index(metaclass=IndexMeta): Meta: Any def __init__(self) -> None: ... @classmethod def count(cls, hash_key, consistent_read: bool = ..., **filters) -> int: ... @classmethod def query(self, hash_key, scan_index_forward: Optional[Any] = ..., consistent_read: bool = ..., limit: Optional[Any] = ..., last_evaluated_key: Optional[Any] = ..., attributes_to_get: Optional[Any] = ..., **filters): ... class GlobalSecondaryIndex(Index): ... class LocalSecondaryIndex(Index): ... class Projection(object): projection_type: Any non_key_attributes: Any class KeysOnlyProjection(Projection): projection_type: Any class IncludeProjection(Projection): projection_type: Any non_key_attributes: Any def __init__(self, non_attr_keys: Optional[Any] = ...) -> None: ... class AllProjection(Projection): projection_type: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/models.pyi0000664000175000017500000001230313577124116026552 0ustar davedave00000000000000from .attributes import Attribute from .exceptions import DoesNotExist as DoesNotExist from typing import Any, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Tuple, Type, TypeVar, Text, Union log: Any class DefaultMeta: ... class ResultSet(object): results: Any operation: Any arguments: Any def __init__(self, results, operation, arguments) -> None: ... def __iter__(self): ... class MetaModel(type): def __init__(self, name: Text, bases: Tuple[type, ...], attrs: Dict[Any, Any]) -> None: ... _T = TypeVar('_T', bound='Model') KeyType = Union[Text, bytes, float, int, Tuple[Any, ...]] class Model(metaclass=MetaModel): DoesNotExist = DoesNotExist attribute_values: Dict[Text, Any] def __init__(self, hash_key: Optional[KeyType] = ..., range_key: Optional[Any] = ..., **attrs) -> None: ... @classmethod def has_map_or_list_attributes(cls: Type[_T]) -> bool: ... @classmethod def batch_get(cls: Type[_T], items: Iterable[Union[KeyType, Iterable[KeyType]]], consistent_read: Optional[bool] = ..., attributes_to_get: Optional[Sequence[Text]] = ...) -> Iterator[_T]: ... @classmethod def batch_write(cls: Type[_T], auto_commit: bool = ...) -> BatchWrite[_T]: ... def delete(self, condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values) -> Any: ... def update(self, attributes: Optional[Dict[Text, Dict[Text, Any]]] = ..., actions: Optional[List[Any]] = ..., condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values) -> Any: ... def update_item(self, attribute: Text, value: Optional[Any] = ..., action: Optional[Text] = ..., conditional_operator: Optional[Text] = ..., **expected_values): ... def save(self, condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values) -> Dict[str, Any]: ... def refresh(self, consistent_read: bool = ...): ... @classmethod def get(cls: Type[_T], hash_key: KeyType, range_key: Optional[KeyType] = ..., consistent_read: bool = ...) -> _T: ... @classmethod def from_raw_data(cls: Type[_T], data) -> _T: ... @classmethod def count(cls: Type[_T], hash_key: Optional[KeyType] = ..., consistent_read: bool = ..., index_name: Optional[Text] = ..., limit: Optional[int] = ..., **filters) -> int: ... @classmethod def query(cls: Type[_T], hash_key: KeyType, consistent_read: bool = ..., index_name: Optional[Text] = ..., scan_index_forward: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., limit: Optional[int] = ..., last_evaluated_key: Optional[Any] = ..., attributes_to_get: Optional[Iterable[Text]] = ..., page_size: Optional[int] = ..., **filters) -> Iterator[_T]: ... @classmethod def rate_limited_scan( cls: Type[_T], # TODO: annotate Condition class filter_condition: Optional[Any] = ..., attributes_to_get: Optional[Sequence[Text]] = ..., segment: Optional[int] = ..., total_segments: Optional[int] = ..., limit: Optional[int] = ..., conditional_operator: Optional[Text] = ..., last_evaluated_key: Optional[Any] = ..., page_size: Optional[int] = ..., timeout_seconds: Optional[int] = ..., read_capacity_to_consume_per_second: int = ..., allow_rate_limited_scan_without_consumed_capacity: Optional[bool] = ..., max_sleep_between_retry: int = ..., max_consecutive_exceptions: int = ..., consistent_read: Optional[bool] = ..., index_name: Optional[str] = ..., **filters: Any ) -> Iterator[_T]: ... @classmethod def scan(cls: Type[_T], segment: Optional[int] = ..., total_segments: Optional[int] = ..., limit: Optional[int] = ..., conditional_operator: Optional[Text] = ..., last_evaluated_key: Optional[Any] = ..., page_size: Optional[int] = ..., **filters) -> Iterator[_T]: ... @classmethod def exists(cls: Type[_T]) -> bool: ... @classmethod def delete_table(cls): ... @classmethod def describe_table(cls): ... @classmethod def create_table(cls: Type[_T], wait: bool = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ...): ... @classmethod def dumps(cls): ... @classmethod def dump(cls, filename): ... @classmethod def loads(cls, data): ... @classmethod def load(cls, filename): ... @classmethod def add_throttle_record(cls, records): ... @classmethod def get_throttle(cls): ... @classmethod def get_attributes(cls) -> Dict[str, Attribute[Any]]: ... @classmethod def _get_attributes(cls) -> Dict[str, Attribute[Any]]: ... class ModelContextManager(Generic[_T]): model: Type[_T] auto_commit: bool max_operations: int pending_operations: List[Dict[Text, Any]] def __init__(self, model: Type[_T], auto_commit: bool = ...) -> None: ... def __enter__(self) -> ModelContextManager[_T]: ... class BatchWrite(Generic[_T], ModelContextManager[_T]): def save(self, put_item: _T) -> None: ... def delete(self, del_item: _T) -> None: ... def __enter__(self) -> BatchWrite[_T]: ... def __exit__(self, exc_type, exc_val, exc_tb) -> None: ... pending_operations: Any def commit(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/throttle.pyi0000664000175000017500000000073013577124116027135 0ustar davedave00000000000000from typing import Any, Optional log: Any class ThrottleBase: capacity: Any window: Any records: Any sleep_interval: Any def __init__(self, capacity, window: int = ..., initial_sleep: Optional[Any] = ...) -> None: ... def add_record(self, record): ... def throttle(self): ... class NoThrottle(ThrottleBase): def __init__(self) -> None: ... def add_record(self, record): ... class Throttle(ThrottleBase): def throttle(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/exceptions.pyi0000664000175000017500000000156713577124116027462 0ustar davedave00000000000000from typing import Any, Optional, Text class PynamoDBException(Exception): msg: str cause: Any def __init__(self, msg: Optional[Text] = ..., cause: Optional[Exception] = ...) -> None: ... class PynamoDBConnectionError(PynamoDBException): ... class DeleteError(PynamoDBConnectionError): ... class QueryError(PynamoDBConnectionError): ... class ScanError(PynamoDBConnectionError): ... class PutError(PynamoDBConnectionError): ... class UpdateError(PynamoDBConnectionError): ... class GetError(PynamoDBConnectionError): ... class TableError(PynamoDBConnectionError): ... class DoesNotExist(PynamoDBException): ... class TableDoesNotExist(PynamoDBException): def __init__(self, table_name) -> None: ... class VerboseClientError(Exception): MSG_TEMPLATE: Any def __init__(self, error_response, operation_name, verbose_properties: Optional[Any] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/0000775000175000017500000000000013577125145026707 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/__init__.pyi0000664000175000017500000000020713577124116031165 0ustar davedave00000000000000from pynamodb.connection.base import Connection as Connection from pynamodb.connection.table import TableConnection as TableConnection jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/base.pyi0000664000175000017500000001307013577124116030342 0ustar davedave00000000000000from typing import Any, Dict, Optional, Text BOTOCORE_EXCEPTIONS: Any log: Any class MetaTable: data: Dict[Any, Any] def __init__(self, data: Dict[Any, Any]) -> None: ... @property def range_keyname(self) -> Optional[Text]: ... @property def hash_keyname(self) -> Text: ... def get_index_hash_keyname(self, index_name: Text) -> Optional[Text]: ... def get_item_attribute_map(self, attributes, item_key: Any = ..., pythonic_key: bool = ...): ... def get_attribute_type(self, attribute_name, value: Optional[Any] = ...): ... def get_identifier_map(self, hash_key, range_key: Optional[Any] = ..., key: Any = ...): ... def get_exclusive_start_key_map(self, exclusive_start_key): ... class Connection: host: Any region: Any session_cls: Any def __init__(self, region: Optional[Any] = ..., host: Optional[Any] = ..., session_cls: Optional[Any] = ..., request_timeout_seconds: Optional[Any] = ..., max_retry_attempts: Optional[Any] = ..., base_backoff_ms: Optional[Any] = ...) -> None: ... def dispatch(self, operation_name, operation_kwargs): ... @property def session(self): ... @property def requests_session(self): ... @property def client(self): ... def get_meta_table(self, table_name: Text, refresh: bool = ...): ... def create_table(self, table_name: Text, attribute_definitions: Optional[Any] = ..., key_schema: Optional[Any] = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_indexes: Optional[Any] = ..., local_secondary_indexes: Optional[Any] = ..., stream_specification: Optional[Any] = ...): ... def delete_table(self, table_name: Text): ... def update_table(self, table_name: Text, read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_index_updates: Optional[Any] = ...): ... def list_tables(self, exclusive_start_table_name: Optional[Any] = ..., limit: Optional[Any] = ...): ... def describe_table(self, table_name: Text): ... def get_conditional_operator(self, operator): ... def get_item_attribute_map(self, table_name: Text, attributes, item_key: Any = ..., pythonic_key: bool = ...): ... def get_expected_map(self, table_name: Text, expected): ... def parse_attribute(self, attribute, return_type: bool = ...): ... def get_attribute_type(self, table_name: Text, attribute_name, value: Optional[Any] = ...): ... def get_identifier_map(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., key: Any = ...): ... def get_query_filter_map(self, table_name: Text, query_filters): ... def get_consumed_capacity_map(self, return_consumed_capacity): ... def get_return_values_map(self, return_values): ... def get_item_collection_map(self, return_item_collection_metrics): ... def get_exclusive_start_key_map(self, table_name: Text, exclusive_start_key): ... def delete_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ... def update_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., attribute_updates: Optional[Any] = ..., expected: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ..., return_values: Optional[Any] = ...): ... def put_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., attributes: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ... def batch_write_item(self, table_name: Text, put_items: Optional[Any] = ..., delete_items: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ... def batch_get_item(self, table_name: Text, keys, consistent_read: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., attributes_to_get: Optional[Any] = ...): ... def get_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., consistent_read: bool = ..., attributes_to_get: Optional[Any] = ...): ... def scan(self, table_name: Text, attributes_to_get: Optional[Any] = ..., limit: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., scan_filter: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., exclusive_start_key: Optional[Any] = ..., segment: Optional[Any] = ..., total_segments: Optional[Any] = ...): ... def query(self, table_name: Text, hash_key, attributes_to_get: Optional[Any] = ..., consistent_read: bool = ..., exclusive_start_key: Optional[Any] = ..., index_name: Optional[Any] = ..., key_conditions: Optional[Any] = ..., query_filters: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., limit: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., scan_index_forward: Optional[Any] = ..., select: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/util.pyi0000664000175000017500000000010313577124116030376 0ustar davedave00000000000000from typing import Text def pythonic(var_name: Text) -> Text: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/connection/table.pyi0000664000175000017500000000605513577124116030524 0ustar davedave00000000000000from typing import Any, Optional class TableConnection: table_name: Any connection: Any def __init__(self, table_name, region: Optional[Any] = ..., host: Optional[Any] = ..., session_cls: Optional[Any] = ..., request_timeout_seconds: Optional[Any] = ..., max_retry_attempts: Optional[Any] = ..., base_backoff_ms: Optional[Any] = ...) -> None: ... def delete_item(self, hash_key, range_key: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ... def update_item(self, hash_key, range_key: Optional[Any] = ..., attribute_updates: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ..., return_values: Optional[Any] = ...): ... def put_item(self, hash_key, range_key: Optional[Any] = ..., attributes: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ... def batch_write_item(self, put_items: Optional[Any] = ..., delete_items: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ... def batch_get_item(self, keys, consistent_read: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., attributes_to_get: Optional[Any] = ...): ... def get_item(self, hash_key, range_key: Optional[Any] = ..., consistent_read: bool = ..., attributes_to_get: Optional[Any] = ...): ... def scan(self, attributes_to_get: Optional[Any] = ..., limit: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., scan_filter: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., segment: Optional[Any] = ..., total_segments: Optional[Any] = ..., exclusive_start_key: Optional[Any] = ...): ... def query(self, hash_key, attributes_to_get: Optional[Any] = ..., consistent_read: bool = ..., exclusive_start_key: Optional[Any] = ..., index_name: Optional[Any] = ..., key_conditions: Optional[Any] = ..., query_filters: Optional[Any] = ..., limit: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., scan_index_forward: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., select: Optional[Any] = ...): ... def describe_table(self): ... def delete_table(self): ... def update_table(self, read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_index_updates: Optional[Any] = ...): ... def create_table(self, attribute_definitions: Optional[Any] = ..., key_schema: Optional[Any] = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_indexes: Optional[Any] = ..., local_secondary_indexes: Optional[Any] = ..., stream_specification: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/attributes.pyi0000664000175000017500000001014213577124116027454 0ustar davedave00000000000000from typing import Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Text, Type, TypeVar, Union, Set from datetime import datetime _T = TypeVar('_T') _KT = TypeVar('_KT') _VT = TypeVar('_VT') _MT = TypeVar('_MT', bound=MapAttribute[Any, Any]) class Attribute(Generic[_T]): attr_name: Optional[Text] attr_type: Text null: bool default: Any is_hash_key: bool is_range_key: bool def __init__(self, hash_key: bool = ..., range_key: bool = ..., null: Optional[bool] = ..., default: Optional[Union[_T, Callable[..., _T]]] = ..., attr_name: Optional[Text] = ...) -> None: ... def __set__(self, instance: Any, value: Optional[_T]) -> None: ... def serialize(self, value: Any) -> Any: ... def deserialize(self, value: Any) -> Any: ... def get_value(self, value: Any) -> Any: ... def between(self, lower: Any, upper: Any) -> Any: ... def is_in(self, *values: Any) -> Any: ... def exists(self) -> Any: ... def does_not_exist(self) -> Any: ... def is_type(self) -> Any: ... def startswith(self, prefix: str) -> Any: ... def contains(self, item: Any) -> Any: ... def append(self, other: Any) -> Any: ... def prepend(self, other: Any) -> Any: ... def set(self, value: Any) -> Any: ... def remove(self) -> Any: ... def add(self, *values: Any) -> Any: ... def delete(self, *values: Any) -> Any: ... class SetMixin(object): def serialize(self, value): ... def deserialize(self, value): ... class BinaryAttribute(Attribute[bytes]): def __get__(self, instance: Any, owner: Any) -> bytes: ... class BinarySetAttribute(SetMixin, Attribute[Set[bytes]]): def __get__(self, instance: Any, owner: Any) -> Set[bytes]: ... class UnicodeSetAttribute(SetMixin, Attribute[Set[Text]]): def element_serialize(self, value: Any) -> Any: ... def element_deserialize(self, value: Any) -> Any: ... def __get__(self, instance: Any, owner: Any) -> Set[Text]: ... class UnicodeAttribute(Attribute[Text]): def __get__(self, instance: Any, owner: Any) -> Text: ... class JSONAttribute(Attribute[Any]): def __get__(self, instance: Any, owner: Any) -> Any: ... class LegacyBooleanAttribute(Attribute[bool]): def __get__(self, instance: Any, owner: Any) -> bool: ... class BooleanAttribute(Attribute[bool]): def __get__(self, instance: Any, owner: Any) -> bool: ... class NumberSetAttribute(SetMixin, Attribute[Set[float]]): def __get__(self, instance: Any, owner: Any) -> Set[float]: ... class NumberAttribute(Attribute[float]): def __get__(self, instance: Any, owner: Any) -> float: ... class UTCDateTimeAttribute(Attribute[datetime]): def __get__(self, instance: Any, owner: Any) -> datetime: ... class NullAttribute(Attribute[None]): def __get__(self, instance: Any, owner: Any) -> None: ... class MapAttributeMeta(type): def __init__(self, name, bases, attrs) -> None: ... class MapAttribute(Generic[_KT, _VT], Attribute[Mapping[_KT, _VT]], metaclass=MapAttributeMeta): attribute_values: Any def __init__(self, hash_key: bool = ..., range_key: bool = ..., null: Optional[bool] = ..., default: Optional[Union[Any, Callable[..., Any]]] = ..., attr_name: Optional[Text] = ..., **attrs) -> None: ... def __iter__(self) -> Iterable[_VT]: ... def __getattr__(self, attr: str) -> _VT: ... def __getitem__(self, item: _KT) -> _VT: ... def __set__(self, instance: Any, value: Union[None, MapAttribute[_KT, _VT], Mapping[_KT, _VT]]) -> None: ... def __get__(self: _MT, instance: Any, owner: Any) -> _MT: ... def is_type_safe(self, key: Any, value: Any) -> bool: ... def validate(self) -> bool: ... class ListAttribute(Generic[_T], Attribute[List[_T]]): element_type: Any def __init__(self, hash_key: bool = ..., range_key: bool = ..., null: Optional[bool] = ..., default: Optional[Union[Any, Callable[..., Any]]] = ..., attr_name: Optional[Text] = ..., of: Optional[Type[_T]] = ...) -> None: ... def __get__(self, instance: Any, owner: Any) -> List[_T]: ... DESERIALIZE_CLASS_MAP: Dict[Text, Attribute[Any]] SERIALIZE_CLASS_MAP: Dict[Type[Any], Attribute[Any]] SERIALIZE_KEY_MAP: Dict[Type[Any], Text] jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/constants.pyi0000664000175000017500000000573613577124116027317 0ustar davedave00000000000000from typing import Any BATCH_WRITE_ITEM: str DESCRIBE_TABLE: str BATCH_GET_ITEM: str CREATE_TABLE: str UPDATE_TABLE: str DELETE_TABLE: str LIST_TABLES: str UPDATE_ITEM: str DELETE_ITEM: str GET_ITEM: str PUT_ITEM: str QUERY: str SCAN: str GLOBAL_SECONDARY_INDEX_UPDATES: str RETURN_ITEM_COLL_METRICS: str EXCLUSIVE_START_TABLE_NAME: str RETURN_CONSUMED_CAPACITY: str COMPARISON_OPERATOR: str SCAN_INDEX_FORWARD: str ATTR_DEFINITIONS: str ATTR_VALUE_LIST: str TABLE_DESCRIPTION: str UNPROCESSED_KEYS: str UNPROCESSED_ITEMS: str CONSISTENT_READ: str DELETE_REQUEST: str RETURN_VALUES: str REQUEST_ITEMS: str ATTRS_TO_GET: str ATTR_UPDATES: str TABLE_STATUS: str SCAN_FILTER: str TABLE_NAME: str KEY_SCHEMA: str ATTR_NAME: str ATTR_TYPE: str ITEM_COUNT: str CAMEL_COUNT: str PUT_REQUEST: str INDEX_NAME: str ATTRIBUTES: str TABLE_KEY: str RESPONSES: str RANGE_KEY: str KEY_TYPE: str ACTION: str UPDATE: str EXISTS: str SELECT: str ACTIVE: str LIMIT: str ITEMS: str ITEM: str KEYS: str UTC: str KEY: str DEFAULT_ENCODING: str DEFAULT_REGION: str DATETIME_FORMAT: str SERVICE_NAME: str HTTP_OK: int HTTP_BAD_REQUEST: int PROVISIONED_THROUGHPUT: str READ_CAPACITY_UNITS: str WRITE_CAPACITY_UNITS: str STRING_SHORT: str STRING_SET_SHORT: str NUMBER_SHORT: str NUMBER_SET_SHORT: str BINARY_SHORT: str BINARY_SET_SHORT: str MAP_SHORT: str LIST_SHORT: str BOOLEAN: str BOOLEAN_SHORT: str STRING: str STRING_SET: str NUMBER: str NUMBER_SET: str BINARY: str BINARY_SET: str MAP: str LIST: str SHORT_ATTR_TYPES: Any ATTR_TYPE_MAP: Any LOCAL_SECONDARY_INDEX: str LOCAL_SECONDARY_INDEXES: str GLOBAL_SECONDARY_INDEX: str GLOBAL_SECONDARY_INDEXES: str PROJECTION: str PROJECTION_TYPE: str NON_KEY_ATTRIBUTES: str KEYS_ONLY: str ALL: str INCLUDE: str STREAM_VIEW_TYPE: str STREAM_SPECIFICATION: str STREAM_ENABLED: str STREAM_NEW_IMAGE: str STREAM_OLD_IMAGE: str STREAM_NEW_AND_OLD_IMAGE: str STREAM_KEYS_ONLY: str EXCLUSIVE_START_KEY: str LAST_EVALUATED_KEY: str QUERY_FILTER: str BEGINS_WITH: str BETWEEN: str EQ: str NE: str LE: str LT: str GE: str GT: str IN: str KEY_CONDITIONS: str COMPARISON_OPERATOR_VALUES: Any QUERY_OPERATOR_MAP: Any NOT_NULL: str NULL: str CONTAINS: str NOT_CONTAINS: str ALL_ATTRIBUTES: str ALL_PROJECTED_ATTRIBUTES: str SPECIFIC_ATTRIBUTES: str COUNT: str SELECT_VALUES: Any SCAN_OPERATOR_MAP: Any QUERY_FILTER_OPERATOR_MAP: Any DELETE_FILTER_OPERATOR_MAP: Any UPDATE_FILTER_OPERATOR_MAP: Any PUT_FILTER_OPERATOR_MAP: Any SEGMENT: str TOTAL_SEGMENTS: str SCAN_FILTER_VALUES: Any QUERY_FILTER_VALUES: Any DELETE_FILTER_VALUES: Any VALUE: str EXPECTED: str CONSUMED_CAPACITY: str CAPACITY_UNITS: str INDEXES: str TOTAL: str NONE: str RETURN_CONSUMED_CAPACITY_VALUES: Any SIZE: str RETURN_ITEM_COLL_METRICS_VALUES: Any ALL_OLD: str UPDATED_OLD: str ALL_NEW: str UPDATED_NEW: str RETURN_VALUES_VALUES: Any PUT: str DELETE: str ADD: str ATTR_UPDATE_ACTIONS: Any BATCH_GET_PAGE_LIMIT: int BATCH_WRITE_PAGE_LIMIT: int META_CLASS_NAME: str REGION: str HOST: str CONDITIONAL_OPERATOR: str AND: str OR: str CONDITIONAL_OPERATORS: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/types.pyi0000664000175000017500000000007113577124116026432 0ustar davedave00000000000000STRING: str NUMBER: str BINARY: str HASH: str RANGE: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pynamodb/settings.pyi0000664000175000017500000000022113577124116027123 0ustar davedave00000000000000from typing import Any log: Any default_settings_dict: Any OVERRIDE_SETTINGS_PATH: Any override_settings: Any def get_settings_value(key): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/certifi.pyi0000664000175000017500000000003013577124116025075 0ustar davedave00000000000000def where() -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/typing_extensions.pyi0000664000175000017500000000525113577124116027253 0ustar davedave00000000000000import abc import sys from typing import Callable from typing import ClassVar as ClassVar from typing import ContextManager as ContextManager from typing import Counter as Counter from typing import DefaultDict as DefaultDict from typing import Deque as Deque from typing import NewType as NewType from typing import NoReturn as NoReturn from typing import overload as overload from typing import Text as Text from typing import Type as Type from typing import TYPE_CHECKING as TYPE_CHECKING from typing import TypeVar, Any, Mapping, ItemsView, KeysView, Optional, ValuesView, Dict, Type _T = TypeVar('_T') _F = TypeVar('_F', bound=Callable[..., Any]) _TC = TypeVar('_TC', bound=Type[object]) class _SpecialForm: def __getitem__(self, typeargs: Any) -> Any: ... def runtime_checkable(cls: _TC) -> _TC: ... # This alias for above is kept here for backwards compatibility. runtime = runtime_checkable Protocol: _SpecialForm = ... Final: _SpecialForm = ... def final(f: _F) -> _F: ... Literal: _SpecialForm = ... def IntVar(__name: str) -> Any: ... # returns a new TypeVar # Internal mypy fallback type for all typed dicts (does not exist at runtime) class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): def copy(self: _T) -> _T: ... # Using NoReturn so that only calls using mypy plugin hook that specialize the signature # can go through. def setdefault(self, k: NoReturn, default: object) -> object: ... # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. def pop(self, k: NoReturn, default: _T = ...) -> object: ... def update(self: _T, __m: _T) -> None: ... if sys.version_info < (3, 0): def has_key(self, k: str) -> bool: ... def viewitems(self) -> ItemsView[str, object]: ... def viewkeys(self) -> KeysView[str]: ... def viewvalues(self) -> ValuesView[object]: ... def __delitem__(self, k: NoReturn) -> None: ... # TypedDict is a (non-subscriptable) special form. TypedDict: object = ... if sys.version_info >= (3, 3): from typing import ChainMap as ChainMap if sys.version_info >= (3, 5): from typing import AsyncIterable as AsyncIterable from typing import AsyncIterator as AsyncIterator from typing import AsyncContextManager as AsyncContextManager from typing import Awaitable as Awaitable from typing import Coroutine as Coroutine if sys.version_info >= (3, 6): from typing import AsyncGenerator as AsyncGenerator def get_type_hints( obj: Callable[..., Any], globalns: Optional[Dict[str, Any]] = ..., localns: Optional[Dict[str, Any]] = ..., include_extras: bool = ... ) -> Dict[str, Any]: ... Annotated: _SpecialForm = ... _AnnotatedAlias: Any = ... # undocumented jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/decorator.pyi0000664000175000017500000000536713577124116025454 0ustar davedave00000000000000import sys from typing import Any, Callable, Dict, Iterator, List, NamedTuple, Optional, Pattern, Text, Tuple, TypeVar _C = TypeVar("_C", bound=Callable[..., Any]) _Func = TypeVar("_Func", bound=Callable[..., Any]) _T = TypeVar("_T") def get_init(cls): ... if sys.version_info >= (3,): from inspect import iscoroutinefunction as iscoroutinefunction from inspect import getfullargspec as getfullargspec else: class FullArgSpec(NamedTuple): args: List[str] varargs: Optional[str] varkw: Optional[str] defaults: Tuple[Any, ...] kwonlyargs: List[str] kwonlydefaults: Dict[str, Any] annotations: Dict[str, Any] def iscoroutinefunction(f: Callable[..., Any]) -> bool: ... def getfullargspec(func: Any) -> FullArgSpec: ... if sys.version_info >= (3, 2): from contextlib import _GeneratorContextManager else: from contextlib import GeneratorContextManager as _GeneratorContextManager DEF: Pattern[str] class FunctionMaker(object): args: List[Text] varargs: Optional[Text] varkw: Optional[Text] defaults: Tuple[Any, ...] kwonlyargs: List[Text] kwonlydefaults: Optional[Text] shortsignature: Optional[Text] name: Text doc: Optional[Text] module: Optional[Text] annotations: Dict[Text, Any] signature: Text dict: Dict[Text, Any] def __init__( self, func: Optional[Callable[..., Any]] = ..., name: Optional[Text] = ..., signature: Optional[Text] = ..., defaults: Optional[Tuple[Any, ...]] = ..., doc: Optional[Text] = ..., module: Optional[Text] = ..., funcdict: Optional[Dict[Text, Any]] = ... ) -> None: ... def update(self, func: Any, **kw: Any) -> None: ... def make( self, src_templ: Text, evaldict: Optional[Dict[Text, Any]] = ..., addsource: bool = ..., **attrs: Any ) -> Callable[..., Any]: ... @classmethod def create( cls, obj: Any, body: Text, evaldict: Dict[Text, Any], defaults: Optional[Tuple[Any, ...]] = ..., doc: Optional[Text] = ..., module: Optional[Text] = ..., addsource: bool = ..., **attrs: Any ) -> Callable[..., Any]: ... def decorate(func: _Func, caller: Callable[..., Any], extras: Any = ...) -> _Func: ... def decorator(caller: Callable[..., Any], _func: Optional[Callable[..., Any]] = ...) -> Callable[[Callable[..., Any]], Callable[..., Any]]: ... class ContextManager(_GeneratorContextManager[_T]): def __call__(self, func: _C) -> _C: ... def contextmanager(func: Callable[..., Iterator[_T]]) -> Callable[..., ContextManager[_T]]: ... def dispatch_on(*dispatch_args: Any) -> Callable[[Callable[..., Any]], Callable[..., Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pycurl.pyi0000664000175000017500000003063113577124116025000 0ustar davedave00000000000000# TODO(MichalPokorny): more precise types from typing import Any, List, Tuple GLOBAL_ACK_EINTR: int GLOBAL_ALL: int GLOBAL_DEFAULT: int GLOBAL_NOTHING: int GLOBAL_SSL: int GLOBAL_WIN32: int def global_init(option: int) -> None: ... def global_cleanup() -> None: ... version: str def version_info() -> Tuple[int, str, int, str, int, str, int, str, Tuple[str, ...], Any, int, Any]: ... class error(Exception): ... class Curl(object): def close(self) -> None: ... def setopt(self, option: int, value: Any) -> None: ... def perform(self) -> None: ... def getinfo(self, info: Any) -> Any: ... def reset(self) -> None: ... def unsetopt(self, option: int) -> Any: ... def pause(self, bitmask: Any) -> Any: ... def errstr(self) -> str: ... # TODO(MichalPokorny): wat? USERPWD: int class CurlMulti(object): def close(self) -> None: ... def add_handle(self, obj: Curl) -> None: ... def remove_handle(self, obj: Curl) -> None: ... def perform(self) -> Tuple[Any, int]: ... def fdset(self) -> Tuple[List[Any], List[Any], List[Any]]: ... def select(self, timeout: float = ...) -> int: ... def info_read(self, max_objects: int = ...) -> Tuple[int, List[Any], List[Any]]: ... class CurlShare(object): def close(self) -> None: ... def setopt(self, option: int, value: Any) -> Any: ... ACCEPTTIMEOUT_MS: int ACCEPT_ENCODING: int ADDRESS_SCOPE: int APPCONNECT_TIME: int APPEND: int AUTOREFERER: int BUFFERSIZE: int CAINFO: int CAPATH: int CLOSESOCKETFUNCTION: int COMPILE_DATE: str COMPILE_LIBCURL_VERSION_NUM: int COMPILE_PY_VERSION_HEX: int CONDITION_UNMET: int CONNECTTIMEOUT: int CONNECTTIMEOUT_MS: int CONNECT_ONLY: int CONNECT_TIME: int CONTENT_LENGTH_DOWNLOAD: int CONTENT_LENGTH_UPLOAD: int CONTENT_TYPE: int COOKIE: int COOKIEFILE: int COOKIEJAR: int COOKIELIST: int COOKIESESSION: int COPYPOSTFIELDS: int CRLF: int CRLFILE: int CSELECT_ERR: int CSELECT_IN: int CSELECT_OUT: int CURL_HTTP_VERSION_1_0: int CURL_HTTP_VERSION_1_1: int CURL_HTTP_VERSION_2: int CURL_HTTP_VERSION_2_0: int CURL_HTTP_VERSION_LAST: int CURL_HTTP_VERSION_NONE: int CUSTOMREQUEST: int DEBUGFUNCTION: int DIRLISTONLY: int DNS_CACHE_TIMEOUT: int DNS_SERVERS: int DNS_USE_GLOBAL_CACHE: int EFFECTIVE_URL: int EGDSOCKET: int ENCODING: int EXPECT_100_TIMEOUT_MS: int FAILONERROR: int FILE: int FOLLOWLOCATION: int FORBID_REUSE: int FORM_BUFFER: int FORM_BUFFERPTR: int FORM_CONTENTS: int FORM_CONTENTTYPE: int FORM_FILE: int FORM_FILENAME: int FRESH_CONNECT: int FTPAPPEND: int FTPAUTH_DEFAULT: int FTPAUTH_SSL: int FTPAUTH_TLS: int FTPLISTONLY: int FTPMETHOD_DEFAULT: int FTPMETHOD_MULTICWD: int FTPMETHOD_NOCWD: int FTPMETHOD_SINGLECWD: int FTPPORT: int FTPSSLAUTH: int FTPSSL_ALL: int FTPSSL_CONTROL: int FTPSSL_NONE: int FTPSSL_TRY: int FTP_ACCOUNT: int FTP_ALTERNATIVE_TO_USER: int FTP_CREATE_MISSING_DIRS: int FTP_ENTRY_PATH: int FTP_FILEMETHOD: int FTP_RESPONSE_TIMEOUT: int FTP_SKIP_PASV_IP: int FTP_SSL: int FTP_SSL_CCC: int FTP_USE_EPRT: int FTP_USE_EPSV: int FTP_USE_PRET: int GSSAPI_DELEGATION: int GSSAPI_DELEGATION_FLAG: int GSSAPI_DELEGATION_NONE: int GSSAPI_DELEGATION_POLICY_FLAG: int HEADER: int HEADERFUNCTION: int HEADEROPT: int HEADER_SEPARATE: int HEADER_SIZE: int HEADER_UNIFIED: int HTTP200ALIASES: int HTTPAUTH: int HTTPAUTH_ANY: int HTTPAUTH_ANYSAFE: int HTTPAUTH_AVAIL: int HTTPAUTH_BASIC: int HTTPAUTH_DIGEST: int HTTPAUTH_DIGEST_IE: int HTTPAUTH_GSSNEGOTIATE: int HTTPAUTH_NEGOTIATE: int HTTPAUTH_NONE: int HTTPAUTH_NTLM: int HTTPAUTH_NTLM_WB: int HTTPAUTH_ONLY: int HTTPGET: int HTTPHEADER: int HTTPPOST: int HTTPPROXYTUNNEL: int HTTP_CODE: int HTTP_CONNECTCODE: int HTTP_CONTENT_DECODING: int HTTP_TRANSFER_DECODING: int HTTP_VERSION: int IGNORE_CONTENT_LENGTH: int INFILE: int INFILESIZE: int INFILESIZE_LARGE: int INFOTYPE_DATA_IN: int INFOTYPE_DATA_OUT: int INFOTYPE_HEADER_IN: int INFOTYPE_HEADER_OUT: int INFOTYPE_SSL_DATA_IN: int INFOTYPE_SSL_DATA_OUT: int INFOTYPE_TEXT: int INFO_CERTINFO: int INFO_COOKIELIST: int INFO_FILETIME: int INFO_RTSP_CLIENT_CSEQ: int INFO_RTSP_CSEQ_RECV: int INFO_RTSP_SERVER_CSEQ: int INFO_RTSP_SESSION_ID: int INTERFACE: int IOCMD_NOP: int IOCMD_RESTARTREAD: int IOCTLDATA: int IOCTLFUNCTION: int IOE_FAILRESTART: int IOE_OK: int IOE_UNKNOWNCMD: int IPRESOLVE: int IPRESOLVE_V4: int IPRESOLVE_V6: int IPRESOLVE_WHATEVER: int ISSUERCERT: int KEYPASSWD: int KHMATCH_MISMATCH: int KHMATCH_MISSING: int KHMATCH_OK: int KHSTAT_DEFER: int KHSTAT_FINE: int KHSTAT_FINE_ADD_TO_FILE: int KHSTAT_REJECT: int KHTYPE_DSS: int KHTYPE_RSA: int KHTYPE_RSA1: int KHTYPE_UNKNOWN: int KRB4LEVEL: int KRBLEVEL: int LASTSOCKET: int LOCALPORT: int LOCALPORTRANGE: int LOCAL_IP: int LOCAL_PORT: int LOCK_DATA_COOKIE: int LOCK_DATA_DNS: int LOCK_DATA_SSL_SESSION: int LOGIN_OPTIONS: int LOW_SPEED_LIMIT: int LOW_SPEED_TIME: int MAIL_AUTH: int MAIL_FROM: int MAIL_RCPT: int MAXCONNECTS: int MAXFILESIZE: int MAXFILESIZE_LARGE: int MAXREDIRS: int MAX_RECV_SPEED_LARGE: int MAX_SEND_SPEED_LARGE: int M_CHUNK_LENGTH_PENALTY_SIZE: int M_CONTENT_LENGTH_PENALTY_SIZE: int M_MAXCONNECTS: int M_MAX_HOST_CONNECTIONS: int M_MAX_PIPELINE_LENGTH: int M_MAX_TOTAL_CONNECTIONS: int M_PIPELINING: int M_PIPELINING_SERVER_BL: int M_PIPELINING_SITE_BL: int M_SOCKETFUNCTION: int M_TIMERFUNCTION: int NAMELOOKUP_TIME: int NETRC: int NETRC_FILE: int NETRC_IGNORED: int NETRC_OPTIONAL: int NETRC_REQUIRED: int NEW_DIRECTORY_PERMS: int NEW_FILE_PERMS: int NOBODY: int NOPROGRESS: int NOPROXY: int NOSIGNAL: int NUM_CONNECTS: int OPENSOCKETFUNCTION: int OPT_CERTINFO: int OPT_FILETIME: int OS_ERRNO: int PASSWORD: int PATH_AS_IS: int PAUSE_ALL: int PAUSE_CONT: int PAUSE_RECV: int PAUSE_SEND: int PINNEDPUBLICKEY: int PIPEWAIT: int PIPE_HTTP1: int PIPE_MULTIPLEX: int PIPE_NOTHING: int POLL_IN: int POLL_INOUT: int POLL_NONE: int POLL_OUT: int POLL_REMOVE: int PORT: int POST: int POST301: int POSTFIELDS: int POSTFIELDSIZE: int POSTFIELDSIZE_LARGE: int POSTQUOTE: int POSTREDIR: int PREQUOTE: int PRETRANSFER_TIME: int PRIMARY_IP: int PRIMARY_PORT: int PROGRESSFUNCTION: int PROTOCOLS: int PROTO_ALL: int PROTO_DICT: int PROTO_FILE: int PROTO_FTP: int PROTO_FTPS: int PROTO_GOPHER: int PROTO_HTTP: int PROTO_HTTPS: int PROTO_IMAP: int PROTO_IMAPS: int PROTO_LDAP: int PROTO_LDAPS: int PROTO_POP3: int PROTO_POP3S: int PROTO_RTMP: int PROTO_RTMPE: int PROTO_RTMPS: int PROTO_RTMPT: int PROTO_RTMPTE: int PROTO_RTMPTS: int PROTO_RTSP: int PROTO_SCP: int PROTO_SFTP: int PROTO_SMB: int PROTO_SMBS: int PROTO_SMTP: int PROTO_SMTPS: int PROTO_TELNET: int PROTO_TFTP: int PROXY: int PROXYAUTH: int PROXYAUTH_AVAIL: int PROXYHEADER: int PROXYPASSWORD: int PROXYPORT: int PROXYTYPE: int PROXYTYPE_HTTP: int PROXYTYPE_HTTP_1_0: int PROXYTYPE_SOCKS4: int PROXYTYPE_SOCKS4A: int PROXYTYPE_SOCKS5: int PROXYTYPE_SOCKS5_HOSTNAME: int PROXYUSERNAME: int PROXYUSERPWD: int PROXY_SERVICE_NAME: int PROXY_TRANSFER_MODE: int PUT: int QUOTE: int RANDOM_FILE: int RANGE: int READDATA: int READFUNCTION: int READFUNC_ABORT: int READFUNC_PAUSE: int REDIRECT_COUNT: int REDIRECT_TIME: int REDIRECT_URL: int REDIR_POST_301: int REDIR_POST_302: int REDIR_POST_303: int REDIR_POST_ALL: int REDIR_PROTOCOLS: int REFERER: int REQUEST_SIZE: int RESOLVE: int RESPONSE_CODE: int RESUME_FROM: int RESUME_FROM_LARGE: int SASL_IR: int SEEKFUNCTION: int SEEKFUNC_CANTSEEK: int SEEKFUNC_FAIL: int SEEKFUNC_OK: int SERVICE_NAME: int SHARE: int SH_SHARE: int SH_UNSHARE: int SIZE_DOWNLOAD: int SIZE_UPLOAD: int SOCKET_TIMEOUT: int SOCKOPTFUNCTION: int SOCKOPT_ALREADY_CONNECTED: int SOCKOPT_ERROR: int SOCKOPT_OK: int SOCKS5_GSSAPI_NEC: int SOCKS5_GSSAPI_SERVICE: int SOCKTYPE_ACCEPT: int SOCKTYPE_IPCXN: int SPEED_DOWNLOAD: int SPEED_UPLOAD: int SSH_AUTH_ANY: int SSH_AUTH_DEFAULT: int SSH_AUTH_HOST: int SSH_AUTH_KEYBOARD: int SSH_AUTH_NONE: int SSH_AUTH_PASSWORD: int SSH_AUTH_PUBLICKEY: int SSH_AUTH_TYPES: int SSH_HOST_PUBLIC_KEY_MD5: int SSH_KEYFUNCTION: int SSH_KNOWNHOSTS: int SSH_PRIVATE_KEYFILE: int SSH_PUBLIC_KEYFILE: int SSLCERT: int SSLCERTPASSWD: int SSLCERTTYPE: int SSLENGINE: int SSLENGINE_DEFAULT: int SSLKEY: int SSLKEYPASSWD: int SSLKEYTYPE: int SSLOPT_ALLOW_BEAST: int SSLVERSION: int SSLVERSION_DEFAULT: int SSLVERSION_SSLv2: int SSLVERSION_SSLv3: int SSLVERSION_TLSv1: int SSLVERSION_TLSv1_0: int SSLVERSION_TLSv1_1: int SSLVERSION_TLSv1_2: int SSL_CIPHER_LIST: int SSL_ENABLE_ALPN: int SSL_ENABLE_NPN: int SSL_ENGINES: int SSL_FALSESTART: int SSL_OPTIONS: int SSL_SESSIONID_CACHE: int SSL_VERIFYHOST: int SSL_VERIFYPEER: int SSL_VERIFYRESULT: int SSL_VERIFYSTATUS: int STARTTRANSFER_TIME: int STDERR: int TCP_KEEPALIVE: int TCP_KEEPIDLE: int TCP_KEEPINTVL: int TCP_NODELAY: int TELNETOPTIONS: int TFTP_BLKSIZE: int TIMECONDITION: int TIMECONDITION_IFMODSINCE: int TIMECONDITION_IFUNMODSINCE: int TIMECONDITION_LASTMOD: int TIMECONDITION_NONE: int TIMEOUT: int TIMEOUT_MS: int TIMEVALUE: int TLSAUTH_PASSWORD: int TLSAUTH_TYPE: int TLSAUTH_USERNAME: int TOTAL_TIME: int TRANSFERTEXT: int TRANSFER_ENCODING: int UNIX_SOCKET_PATH: int UNRESTRICTED_AUTH: int UPLOAD: int URL: int USERAGENT: int USERNAME: int USERPWD: int USESSL_ALL: int USESSL_CONTROL: int USESSL_NONE: int USESSL_TRY: int USE_SSL: int VERBOSE: int VERSION_ASYNCHDNS: int VERSION_CONV: int VERSION_CURLDEBUG: int VERSION_DEBUG: int VERSION_GSSAPI: int VERSION_GSSNEGOTIATE: int VERSION_HTTP2: int VERSION_IDN: int VERSION_IPV6: int VERSION_KERBEROS4: int VERSION_KERBEROS5: int VERSION_LARGEFILE: int VERSION_LIBZ: int VERSION_NTLM: int VERSION_NTLM_WB: int VERSION_SPNEGO: int VERSION_SSL: int VERSION_SSPI: int VERSION_TLSAUTH_SRP: int VERSION_UNIX_SOCKETS: int WILDCARDMATCH: int WRITEDATA: int WRITEFUNCTION: int WRITEFUNC_PAUSE: int WRITEHEADER: int XFERINFOFUNCTION: int XOAUTH2_BEARER: int E_ABORTED_BY_CALLBACK: int E_AGAIN: int E_ALREADY_COMPLETE: int E_BAD_CALLING_ORDER: int E_BAD_CONTENT_ENCODING: int E_BAD_DOWNLOAD_RESUME: int E_BAD_FUNCTION_ARGUMENT: int E_BAD_PASSWORD_ENTERED: int E_CALL_MULTI_PERFORM: int E_CHUNK_FAILED: int E_CONV_FAILED: int E_CONV_REQD: int E_COULDNT_CONNECT: int E_COULDNT_RESOLVE_HOST: int E_COULDNT_RESOLVE_PROXY: int E_FAILED_INIT: int E_FILESIZE_EXCEEDED: int E_FILE_COULDNT_READ_FILE: int E_FTP_ACCEPT_FAILED: int E_FTP_ACCEPT_TIMEOUT: int E_FTP_ACCESS_DENIED: int E_FTP_BAD_DOWNLOAD_RESUME: int E_FTP_BAD_FILE_LIST: int E_FTP_CANT_GET_HOST: int E_FTP_CANT_RECONNECT: int E_FTP_COULDNT_GET_SIZE: int E_FTP_COULDNT_RETR_FILE: int E_FTP_COULDNT_SET_ASCII: int E_FTP_COULDNT_SET_BINARY: int E_FTP_COULDNT_SET_TYPE: int E_FTP_COULDNT_STOR_FILE: int E_FTP_COULDNT_USE_REST: int E_FTP_PARTIAL_FILE: int E_FTP_PORT_FAILED: int E_FTP_PRET_FAILED: int E_FTP_QUOTE_ERROR: int E_FTP_SSL_FAILED: int E_FTP_USER_PASSWORD_INCORRECT: int E_FTP_WEIRD_227_FORMAT: int E_FTP_WEIRD_PASS_REPLY: int E_FTP_WEIRD_PASV_REPLY: int E_FTP_WEIRD_SERVER_REPLY: int E_FTP_WEIRD_USER_REPLY: int E_FTP_WRITE_ERROR: int E_FUNCTION_NOT_FOUND: int E_GOT_NOTHING: int E_HTTP2: int E_HTTP_NOT_FOUND: int E_HTTP_PORT_FAILED: int E_HTTP_POST_ERROR: int E_HTTP_RANGE_ERROR: int E_HTTP_RETURNED_ERROR: int E_INTERFACE_FAILED: int E_LDAP_CANNOT_BIND: int E_LDAP_INVALID_URL: int E_LDAP_SEARCH_FAILED: int E_LIBRARY_NOT_FOUND: int E_LOGIN_DENIED: int E_MALFORMAT_USER: int E_MULTI_ADDED_ALREADY: int E_MULTI_BAD_EASY_HANDLE: int E_MULTI_BAD_HANDLE: int E_MULTI_BAD_SOCKET: int E_MULTI_CALL_MULTI_PERFORM: int E_MULTI_CALL_MULTI_SOCKET: int E_MULTI_INTERNAL_ERROR: int E_MULTI_OK: int E_MULTI_OUT_OF_MEMORY: int E_MULTI_UNKNOWN_OPTION: int E_NOT_BUILT_IN: int E_NO_CONNECTION_AVAILABLE: int E_OK: int E_OPERATION_TIMEDOUT: int E_OPERATION_TIMEOUTED: int E_OUT_OF_MEMORY: int E_PARTIAL_FILE: int E_PEER_FAILED_VERIFICATION: int E_QUOTE_ERROR: int E_RANGE_ERROR: int E_READ_ERROR: int E_RECV_ERROR: int E_REMOTE_ACCESS_DENIED: int E_REMOTE_DISK_FULL: int E_REMOTE_FILE_EXISTS: int E_REMOTE_FILE_NOT_FOUND: int E_RTSP_CSEQ_ERROR: int E_RTSP_SESSION_ERROR: int E_SEND_ERROR: int E_SEND_FAIL_REWIND: int E_SHARE_IN_USE: int E_SSH: int E_SSL_CACERT: int E_SSL_CACERT_BADFILE: int E_SSL_CERTPROBLEM: int E_SSL_CIPHER: int E_SSL_CONNECT_ERROR: int E_SSL_CRL_BADFILE: int E_SSL_ENGINE_INITFAILED: int E_SSL_ENGINE_NOTFOUND: int E_SSL_ENGINE_SETFAILED: int E_SSL_INVALIDCERTSTATUS: int E_SSL_ISSUER_ERROR: int E_SSL_PEER_CERTIFICATE: int E_SSL_PINNEDPUBKEYNOTMATCH: int E_SSL_SHUTDOWN_FAILED: int E_TELNET_OPTION_SYNTAX: int E_TFTP_DISKFULL: int E_TFTP_EXISTS: int E_TFTP_ILLEGAL: int E_TFTP_NOSUCHUSER: int E_TFTP_NOTFOUND: int E_TFTP_PERM: int E_TFTP_UNKNOWNID: int E_TOO_MANY_REDIRECTS: int E_UNKNOWN_OPTION: int E_UNKNOWN_TELNET_OPTION: int E_UNSUPPORTED_PROTOCOL: int E_UPLOAD_FAILED: int E_URL_MALFORMAT: int E_URL_MALFORMAT_USER: int E_USE_SSL_FAILED: int E_WRITE_ERROR: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/0000775000175000017500000000000013577125145024455 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/__init__.pyi0000664000175000017500000000313613577124116026737 0ustar davedave00000000000000import sys from typing import Union, Tuple, Callable, FrozenSet from .connections import Connection as _Connection from .constants import FIELD_TYPE as FIELD_TYPE from .converters import escape_dict as escape_dict, escape_sequence as escape_sequence, escape_string as escape_string from .err import ( Warning as Warning, Error as Error, InterfaceError as InterfaceError, DataError as DataError, DatabaseError as DatabaseError, OperationalError as OperationalError, IntegrityError as IntegrityError, InternalError as InternalError, NotSupportedError as NotSupportedError, ProgrammingError as ProgrammingError, MySQLError as MySQLError, ) from .times import ( Date as Date, Time as Time, Timestamp as Timestamp, DateFromTicks as DateFromTicks, TimeFromTicks as TimeFromTicks, TimestampFromTicks as TimestampFromTicks, ) threadsafety: int apilevel: str paramstyle: str class DBAPISet(FrozenSet[int]): def __ne__(self, other) -> bool: ... def __eq__(self, other) -> bool: ... def __hash__(self) -> int: ... STRING: DBAPISet BINARY: DBAPISet NUMBER: DBAPISet DATE: DBAPISet TIME: DBAPISet TIMESTAMP: DBAPISet DATETIME: DBAPISet ROWID: DBAPISet if sys.version_info >= (3, 0): def Binary(x) -> bytes: ... else: def Binary(x) -> bytearray: ... def Connect(*args, **kwargs) -> _Connection: ... def get_client_info() -> str: ... connect: Callable[..., _Connection] Connection: Callable[..., _Connection] __version__: str version_info: Tuple[int, int, int, str, int] NULL: str def thread_safe() -> bool: ... def install_as_MySQLdb() -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/connections.pyi0000664000175000017500000001140513577124116027520 0ustar davedave00000000000000from typing import Any, Optional, Type from .charset import MBLENGTH as MBLENGTH, charset_by_name as charset_by_name, charset_by_id as charset_by_id from .cursors import Cursor as Cursor from .constants import FIELD_TYPE as FIELD_TYPE, FLAG as FLAG from .constants import SERVER_STATUS as SERVER_STATUS from .constants import CLIENT as CLIENT from .constants import COMMAND as COMMAND from .util import join_bytes as join_bytes, byte2int as byte2int, int2byte as int2byte from .converters import escape_item as escape_item, encoders as encoders, decoders as decoders from .err import raise_mysql_exception as raise_mysql_exception, Warning as Warning, Error as Error, InterfaceError as InterfaceError, DataError as DataError, DatabaseError as DatabaseError, OperationalError as OperationalError, IntegrityError as IntegrityError, InternalError as InternalError, NotSupportedError as NotSupportedError, ProgrammingError as ProgrammingError sha_new: Any SSL_ENABLED: Any DEFAULT_USER: Any DEBUG: Any NULL_COLUMN: Any UNSIGNED_CHAR_COLUMN: Any UNSIGNED_SHORT_COLUMN: Any UNSIGNED_INT24_COLUMN: Any UNSIGNED_INT64_COLUMN: Any UNSIGNED_CHAR_LENGTH: Any UNSIGNED_SHORT_LENGTH: Any UNSIGNED_INT24_LENGTH: Any UNSIGNED_INT64_LENGTH: Any DEFAULT_CHARSET: Any def dump_packet(data): ... SCRAMBLE_LENGTH_323: Any class RandStruct_323: max_value: Any seed1: Any seed2: Any def __init__(self, seed1, seed2): ... def my_rnd(self): ... def pack_int24(n): ... def unpack_uint16(n): ... def unpack_int24(n): ... def unpack_int32(n): ... def unpack_int64(n): ... def defaulterrorhandler(connection, cursor, errorclass, errorvalue): ... class MysqlPacket: connection: Any def __init__(self, connection): ... def packet_number(self): ... def get_all_data(self): ... def read(self, size): ... def read_all(self): ... def advance(self, length): ... def rewind(self, position: int = ...): ... def peek(self, size): ... def get_bytes(self, position, length: int = ...): ... def read_length_coded_binary(self): ... def read_length_coded_string(self): ... def is_ok_packet(self): ... def is_eof_packet(self): ... def is_resultset_packet(self): ... def is_error_packet(self): ... def check_error(self): ... def dump(self): ... class FieldDescriptorPacket(MysqlPacket): def __init__(self, *args): ... def description(self): ... def get_column_length(self): ... class Connection: errorhandler: Any ssl: Any host: Any port: Any user: Any password: Any db: Any unix_socket: Any charset: Any use_unicode: Any client_flag: Any cursorclass: Any connect_timeout: Any messages: Any encoders: Any decoders: Any host_info: Any def __init__(self, host: str = ..., user: Optional[Any] = ..., passwd: str = ..., db: Optional[Any] = ..., port: int = ..., unix_socket: Optional[Any] = ..., charset: str = ..., sql_mode: Optional[Any] = ..., read_default_file: Optional[Any] = ..., conv=..., use_unicode: Optional[Any] = ..., client_flag: int = ..., cursorclass=..., init_command: Optional[Any] = ..., connect_timeout: Optional[Any] = ..., ssl: Optional[Any] = ..., read_default_group: Optional[Any] = ..., compress: Optional[Any] = ..., named_pipe: Optional[Any] = ...): ... socket: Any rfile: Any wfile: Any def close(self) -> None: ... def autocommit(self, value): ... def commit(self): ... def begin(self) -> None: ... def rollback(self): ... def escape(self, obj): ... def literal(self, obj): ... def cursor(self, cursor: Optional[Type[Cursor]] = ...) -> Cursor: ... def __enter__(self): ... def __exit__(self, exc, value, traceback): ... def query(self, sql): ... def next_result(self, unbuffered: bool = ...): ... def affected_rows(self): ... def kill(self, thread_id): ... def ping(self, reconnect: bool = ...): ... def set_charset(self, charset): ... def read_packet(self, packet_type=...): ... def insert_id(self): ... def thread_id(self): ... def character_set_name(self): ... def get_host_info(self): ... def get_proto_info(self): ... def get_server_info(self): ... def show_warnings(self): ... Warning: Any Error: Any InterfaceError: Any DatabaseError: Any DataError: Any OperationalError: Any IntegrityError: Any InternalError: Any ProgrammingError: Any NotSupportedError: Any class MySQLResult: connection: Any affected_rows: Any insert_id: Any server_status: Any warning_count: Any message: Any field_count: Any description: Any rows: Any has_next: Any def __init__(self, connection): ... first_packet: Any def read(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/0000775000175000017500000000000013577125145026471 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/__init__.pyi0000664000175000017500000000000013577124116030736 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/CLIENT.pyi0000664000175000017500000000046413577124116030173 0ustar davedave00000000000000LONG_PASSWORD: int FOUND_ROWS: int LONG_FLAG: int CONNECT_WITH_DB: int NO_SCHEMA: int COMPRESS: int ODBC: int LOCAL_FILES: int IGNORE_SPACE: int PROTOCOL_41: int INTERACTIVE: int SSL: int IGNORE_SIGPIPE: int TRANSACTIONS: int SECURE_CONNECTION: int MULTI_STATEMENTS: int MULTI_RESULTS: int CAPABILITIES: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/SERVER_STATUS.pyi0000664000175000017500000000051313577124116031321 0ustar davedave00000000000000SERVER_STATUS_IN_TRANS: int SERVER_STATUS_AUTOCOMMIT: int SERVER_MORE_RESULTS_EXISTS: int SERVER_QUERY_NO_GOOD_INDEX_USED: int SERVER_QUERY_NO_INDEX_USED: int SERVER_STATUS_CURSOR_EXISTS: int SERVER_STATUS_LAST_ROW_SENT: int SERVER_STATUS_DB_DROPPED: int SERVER_STATUS_NO_BACKSLASH_ESCAPES: int SERVER_STATUS_METADATA_CHANGED: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/ER.pyi0000664000175000017500000002602013577124116027517 0ustar davedave00000000000000ERROR_FIRST: int HASHCHK: int NISAMCHK: int NO: int YES: int CANT_CREATE_FILE: int CANT_CREATE_TABLE: int CANT_CREATE_DB: int DB_CREATE_EXISTS: int DB_DROP_EXISTS: int DB_DROP_DELETE: int DB_DROP_RMDIR: int CANT_DELETE_FILE: int CANT_FIND_SYSTEM_REC: int CANT_GET_STAT: int CANT_GET_WD: int CANT_LOCK: int CANT_OPEN_FILE: int FILE_NOT_FOUND: int CANT_READ_DIR: int CANT_SET_WD: int CHECKREAD: int DISK_FULL: int DUP_KEY: int ERROR_ON_CLOSE: int ERROR_ON_READ: int ERROR_ON_RENAME: int ERROR_ON_WRITE: int FILE_USED: int FILSORT_ABORT: int FORM_NOT_FOUND: int GET_ERRNO: int ILLEGAL_HA: int KEY_NOT_FOUND: int NOT_FORM_FILE: int NOT_KEYFILE: int OLD_KEYFILE: int OPEN_AS_READONLY: int OUTOFMEMORY: int OUT_OF_SORTMEMORY: int UNEXPECTED_EOF: int CON_COUNT_ERROR: int OUT_OF_RESOURCES: int BAD_HOST_ERROR: int HANDSHAKE_ERROR: int DBACCESS_DENIED_ERROR: int ACCESS_DENIED_ERROR: int NO_DB_ERROR: int UNKNOWN_COM_ERROR: int BAD_NULL_ERROR: int BAD_DB_ERROR: int TABLE_EXISTS_ERROR: int BAD_TABLE_ERROR: int NON_UNIQ_ERROR: int SERVER_SHUTDOWN: int BAD_FIELD_ERROR: int WRONG_FIELD_WITH_GROUP: int WRONG_GROUP_FIELD: int WRONG_SUM_SELECT: int WRONG_VALUE_COUNT: int TOO_LONG_IDENT: int DUP_FIELDNAME: int DUP_KEYNAME: int DUP_ENTRY: int WRONG_FIELD_SPEC: int PARSE_ERROR: int EMPTY_QUERY: int NONUNIQ_TABLE: int INVALID_DEFAULT: int MULTIPLE_PRI_KEY: int TOO_MANY_KEYS: int TOO_MANY_KEY_PARTS: int TOO_LONG_KEY: int KEY_COLUMN_DOES_NOT_EXITS: int BLOB_USED_AS_KEY: int TOO_BIG_FIELDLENGTH: int WRONG_AUTO_KEY: int READY: int NORMAL_SHUTDOWN: int GOT_SIGNAL: int SHUTDOWN_COMPLETE: int FORCING_CLOSE: int IPSOCK_ERROR: int NO_SUCH_INDEX: int WRONG_FIELD_TERMINATORS: int BLOBS_AND_NO_TERMINATED: int TEXTFILE_NOT_READABLE: int FILE_EXISTS_ERROR: int LOAD_INFO: int ALTER_INFO: int WRONG_SUB_KEY: int CANT_REMOVE_ALL_FIELDS: int CANT_DROP_FIELD_OR_KEY: int INSERT_INFO: int UPDATE_TABLE_USED: int NO_SUCH_THREAD: int KILL_DENIED_ERROR: int NO_TABLES_USED: int TOO_BIG_SET: int NO_UNIQUE_LOGFILE: int TABLE_NOT_LOCKED_FOR_WRITE: int TABLE_NOT_LOCKED: int BLOB_CANT_HAVE_DEFAULT: int WRONG_DB_NAME: int WRONG_TABLE_NAME: int TOO_BIG_SELECT: int UNKNOWN_ERROR: int UNKNOWN_PROCEDURE: int WRONG_PARAMCOUNT_TO_PROCEDURE: int WRONG_PARAMETERS_TO_PROCEDURE: int UNKNOWN_TABLE: int FIELD_SPECIFIED_TWICE: int INVALID_GROUP_FUNC_USE: int UNSUPPORTED_EXTENSION: int TABLE_MUST_HAVE_COLUMNS: int RECORD_FILE_FULL: int UNKNOWN_CHARACTER_SET: int TOO_MANY_TABLES: int TOO_MANY_FIELDS: int TOO_BIG_ROWSIZE: int STACK_OVERRUN: int WRONG_OUTER_JOIN: int NULL_COLUMN_IN_INDEX: int CANT_FIND_UDF: int CANT_INITIALIZE_UDF: int UDF_NO_PATHS: int UDF_EXISTS: int CANT_OPEN_LIBRARY: int CANT_FIND_DL_ENTRY: int FUNCTION_NOT_DEFINED: int HOST_IS_BLOCKED: int HOST_NOT_PRIVILEGED: int PASSWORD_ANONYMOUS_USER: int PASSWORD_NOT_ALLOWED: int PASSWORD_NO_MATCH: int UPDATE_INFO: int CANT_CREATE_THREAD: int WRONG_VALUE_COUNT_ON_ROW: int CANT_REOPEN_TABLE: int INVALID_USE_OF_NULL: int REGEXP_ERROR: int MIX_OF_GROUP_FUNC_AND_FIELDS: int NONEXISTING_GRANT: int TABLEACCESS_DENIED_ERROR: int COLUMNACCESS_DENIED_ERROR: int ILLEGAL_GRANT_FOR_TABLE: int GRANT_WRONG_HOST_OR_USER: int NO_SUCH_TABLE: int NONEXISTING_TABLE_GRANT: int NOT_ALLOWED_COMMAND: int SYNTAX_ERROR: int DELAYED_CANT_CHANGE_LOCK: int TOO_MANY_DELAYED_THREADS: int ABORTING_CONNECTION: int NET_PACKET_TOO_LARGE: int NET_READ_ERROR_FROM_PIPE: int NET_FCNTL_ERROR: int NET_PACKETS_OUT_OF_ORDER: int NET_UNCOMPRESS_ERROR: int NET_READ_ERROR: int NET_READ_INTERRUPTED: int NET_ERROR_ON_WRITE: int NET_WRITE_INTERRUPTED: int TOO_LONG_STRING: int TABLE_CANT_HANDLE_BLOB: int TABLE_CANT_HANDLE_AUTO_INCREMENT: int DELAYED_INSERT_TABLE_LOCKED: int WRONG_COLUMN_NAME: int WRONG_KEY_COLUMN: int WRONG_MRG_TABLE: int DUP_UNIQUE: int BLOB_KEY_WITHOUT_LENGTH: int PRIMARY_CANT_HAVE_NULL: int TOO_MANY_ROWS: int REQUIRES_PRIMARY_KEY: int NO_RAID_COMPILED: int UPDATE_WITHOUT_KEY_IN_SAFE_MODE: int KEY_DOES_NOT_EXITS: int CHECK_NO_SUCH_TABLE: int CHECK_NOT_IMPLEMENTED: int CANT_DO_THIS_DURING_AN_TRANSACTION: int ERROR_DURING_COMMIT: int ERROR_DURING_ROLLBACK: int ERROR_DURING_FLUSH_LOGS: int ERROR_DURING_CHECKPOINT: int NEW_ABORTING_CONNECTION: int DUMP_NOT_IMPLEMENTED: int FLUSH_MASTER_BINLOG_CLOSED: int INDEX_REBUILD: int MASTER: int MASTER_NET_READ: int MASTER_NET_WRITE: int FT_MATCHING_KEY_NOT_FOUND: int LOCK_OR_ACTIVE_TRANSACTION: int UNKNOWN_SYSTEM_VARIABLE: int CRASHED_ON_USAGE: int CRASHED_ON_REPAIR: int WARNING_NOT_COMPLETE_ROLLBACK: int TRANS_CACHE_FULL: int SLAVE_MUST_STOP: int SLAVE_NOT_RUNNING: int BAD_SLAVE: int MASTER_INFO: int SLAVE_THREAD: int TOO_MANY_USER_CONNECTIONS: int SET_CONSTANTS_ONLY: int LOCK_WAIT_TIMEOUT: int LOCK_TABLE_FULL: int READ_ONLY_TRANSACTION: int DROP_DB_WITH_READ_LOCK: int CREATE_DB_WITH_READ_LOCK: int WRONG_ARGUMENTS: int NO_PERMISSION_TO_CREATE_USER: int UNION_TABLES_IN_DIFFERENT_DIR: int LOCK_DEADLOCK: int TABLE_CANT_HANDLE_FT: int CANNOT_ADD_FOREIGN: int NO_REFERENCED_ROW: int ROW_IS_REFERENCED: int CONNECT_TO_MASTER: int QUERY_ON_MASTER: int ERROR_WHEN_EXECUTING_COMMAND: int WRONG_USAGE: int WRONG_NUMBER_OF_COLUMNS_IN_SELECT: int CANT_UPDATE_WITH_READLOCK: int MIXING_NOT_ALLOWED: int DUP_ARGUMENT: int USER_LIMIT_REACHED: int SPECIFIC_ACCESS_DENIED_ERROR: int LOCAL_VARIABLE: int GLOBAL_VARIABLE: int NO_DEFAULT: int WRONG_VALUE_FOR_VAR: int WRONG_TYPE_FOR_VAR: int VAR_CANT_BE_READ: int CANT_USE_OPTION_HERE: int NOT_SUPPORTED_YET: int MASTER_FATAL_ERROR_READING_BINLOG: int SLAVE_IGNORED_TABLE: int INCORRECT_GLOBAL_LOCAL_VAR: int WRONG_FK_DEF: int KEY_REF_DO_NOT_MATCH_TABLE_REF: int OPERAND_COLUMNS: int SUBQUERY_NO_1_ROW: int UNKNOWN_STMT_HANDLER: int CORRUPT_HELP_DB: int CYCLIC_REFERENCE: int AUTO_CONVERT: int ILLEGAL_REFERENCE: int DERIVED_MUST_HAVE_ALIAS: int SELECT_REDUCED: int TABLENAME_NOT_ALLOWED_HERE: int NOT_SUPPORTED_AUTH_MODE: int SPATIAL_CANT_HAVE_NULL: int COLLATION_CHARSET_MISMATCH: int SLAVE_WAS_RUNNING: int SLAVE_WAS_NOT_RUNNING: int TOO_BIG_FOR_UNCOMPRESS: int ZLIB_Z_MEM_ERROR: int ZLIB_Z_BUF_ERROR: int ZLIB_Z_DATA_ERROR: int CUT_VALUE_GROUP_CONCAT: int WARN_TOO_FEW_RECORDS: int WARN_TOO_MANY_RECORDS: int WARN_NULL_TO_NOTNULL: int WARN_DATA_OUT_OF_RANGE: int WARN_DATA_TRUNCATED: int WARN_USING_OTHER_HANDLER: int CANT_AGGREGATE_2COLLATIONS: int DROP_USER: int REVOKE_GRANTS: int CANT_AGGREGATE_3COLLATIONS: int CANT_AGGREGATE_NCOLLATIONS: int VARIABLE_IS_NOT_STRUCT: int UNKNOWN_COLLATION: int SLAVE_IGNORED_SSL_PARAMS: int SERVER_IS_IN_SECURE_AUTH_MODE: int WARN_FIELD_RESOLVED: int BAD_SLAVE_UNTIL_COND: int MISSING_SKIP_SLAVE: int UNTIL_COND_IGNORED: int WRONG_NAME_FOR_INDEX: int WRONG_NAME_FOR_CATALOG: int WARN_QC_RESIZE: int BAD_FT_COLUMN: int UNKNOWN_KEY_CACHE: int WARN_HOSTNAME_WONT_WORK: int UNKNOWN_STORAGE_ENGINE: int WARN_DEPRECATED_SYNTAX: int NON_UPDATABLE_TABLE: int FEATURE_DISABLED: int OPTION_PREVENTS_STATEMENT: int DUPLICATED_VALUE_IN_TYPE: int TRUNCATED_WRONG_VALUE: int TOO_MUCH_AUTO_TIMESTAMP_COLS: int INVALID_ON_UPDATE: int UNSUPPORTED_PS: int GET_ERRMSG: int GET_TEMPORARY_ERRMSG: int UNKNOWN_TIME_ZONE: int WARN_INVALID_TIMESTAMP: int INVALID_CHARACTER_STRING: int WARN_ALLOWED_PACKET_OVERFLOWED: int CONFLICTING_DECLARATIONS: int SP_NO_RECURSIVE_CREATE: int SP_ALREADY_EXISTS: int SP_DOES_NOT_EXIST: int SP_DROP_FAILED: int SP_STORE_FAILED: int SP_LILABEL_MISMATCH: int SP_LABEL_REDEFINE: int SP_LABEL_MISMATCH: int SP_UNINIT_VAR: int SP_BADSELECT: int SP_BADRETURN: int SP_BADSTATEMENT: int UPDATE_LOG_DEPRECATED_IGNORED: int UPDATE_LOG_DEPRECATED_TRANSLATED: int QUERY_INTERRUPTED: int SP_WRONG_NO_OF_ARGS: int SP_COND_MISMATCH: int SP_NORETURN: int SP_NORETURNEND: int SP_BAD_CURSOR_QUERY: int SP_BAD_CURSOR_SELECT: int SP_CURSOR_MISMATCH: int SP_CURSOR_ALREADY_OPEN: int SP_CURSOR_NOT_OPEN: int SP_UNDECLARED_VAR: int SP_WRONG_NO_OF_FETCH_ARGS: int SP_FETCH_NO_DATA: int SP_DUP_PARAM: int SP_DUP_VAR: int SP_DUP_COND: int SP_DUP_CURS: int SP_CANT_ALTER: int SP_SUBSELECT_NYI: int STMT_NOT_ALLOWED_IN_SF_OR_TRG: int SP_VARCOND_AFTER_CURSHNDLR: int SP_CURSOR_AFTER_HANDLER: int SP_CASE_NOT_FOUND: int FPARSER_TOO_BIG_FILE: int FPARSER_BAD_HEADER: int FPARSER_EOF_IN_COMMENT: int FPARSER_ERROR_IN_PARAMETER: int FPARSER_EOF_IN_UNKNOWN_PARAMETER: int VIEW_NO_EXPLAIN: int FRM_UNKNOWN_TYPE: int WRONG_OBJECT: int NONUPDATEABLE_COLUMN: int VIEW_SELECT_DERIVED: int VIEW_SELECT_CLAUSE: int VIEW_SELECT_VARIABLE: int VIEW_SELECT_TMPTABLE: int VIEW_WRONG_LIST: int WARN_VIEW_MERGE: int WARN_VIEW_WITHOUT_KEY: int VIEW_INVALID: int SP_NO_DROP_SP: int SP_GOTO_IN_HNDLR: int TRG_ALREADY_EXISTS: int TRG_DOES_NOT_EXIST: int TRG_ON_VIEW_OR_TEMP_TABLE: int TRG_CANT_CHANGE_ROW: int TRG_NO_SUCH_ROW_IN_TRG: int NO_DEFAULT_FOR_FIELD: int DIVISION_BY_ZERO: int TRUNCATED_WRONG_VALUE_FOR_FIELD: int ILLEGAL_VALUE_FOR_TYPE: int VIEW_NONUPD_CHECK: int VIEW_CHECK_FAILED: int PROCACCESS_DENIED_ERROR: int RELAY_LOG_FAIL: int PASSWD_LENGTH: int UNKNOWN_TARGET_BINLOG: int IO_ERR_LOG_INDEX_READ: int BINLOG_PURGE_PROHIBITED: int FSEEK_FAIL: int BINLOG_PURGE_FATAL_ERR: int LOG_IN_USE: int LOG_PURGE_UNKNOWN_ERR: int RELAY_LOG_INIT: int NO_BINARY_LOGGING: int RESERVED_SYNTAX: int WSAS_FAILED: int DIFF_GROUPS_PROC: int NO_GROUP_FOR_PROC: int ORDER_WITH_PROC: int LOGGING_PROHIBIT_CHANGING_OF: int NO_FILE_MAPPING: int WRONG_MAGIC: int PS_MANY_PARAM: int KEY_PART_0: int VIEW_CHECKSUM: int VIEW_MULTIUPDATE: int VIEW_NO_INSERT_FIELD_LIST: int VIEW_DELETE_MERGE_VIEW: int CANNOT_USER: int XAER_NOTA: int XAER_INVAL: int XAER_RMFAIL: int XAER_OUTSIDE: int XAER_RMERR: int XA_RBROLLBACK: int NONEXISTING_PROC_GRANT: int PROC_AUTO_GRANT_FAIL: int PROC_AUTO_REVOKE_FAIL: int DATA_TOO_LONG: int SP_BAD_SQLSTATE: int STARTUP: int LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR: int CANT_CREATE_USER_WITH_GRANT: int WRONG_VALUE_FOR_TYPE: int TABLE_DEF_CHANGED: int SP_DUP_HANDLER: int SP_NOT_VAR_ARG: int SP_NO_RETSET: int CANT_CREATE_GEOMETRY_OBJECT: int FAILED_ROUTINE_BREAK_BINLOG: int BINLOG_UNSAFE_ROUTINE: int BINLOG_CREATE_ROUTINE_NEED_SUPER: int EXEC_STMT_WITH_OPEN_CURSOR: int STMT_HAS_NO_OPEN_CURSOR: int COMMIT_NOT_ALLOWED_IN_SF_OR_TRG: int NO_DEFAULT_FOR_VIEW_FIELD: int SP_NO_RECURSION: int TOO_BIG_SCALE: int TOO_BIG_PRECISION: int M_BIGGER_THAN_D: int WRONG_LOCK_OF_SYSTEM_TABLE: int CONNECT_TO_FOREIGN_DATA_SOURCE: int QUERY_ON_FOREIGN_DATA_SOURCE: int FOREIGN_DATA_SOURCE_DOESNT_EXIST: int FOREIGN_DATA_STRING_INVALID_CANT_CREATE: int FOREIGN_DATA_STRING_INVALID: int CANT_CREATE_FEDERATED_TABLE: int TRG_IN_WRONG_SCHEMA: int STACK_OVERRUN_NEED_MORE: int TOO_LONG_BODY: int WARN_CANT_DROP_DEFAULT_KEYCACHE: int TOO_BIG_DISPLAYWIDTH: int XAER_DUPID: int DATETIME_FUNCTION_OVERFLOW: int CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG: int VIEW_PREVENT_UPDATE: int PS_NO_RECURSION: int SP_CANT_SET_AUTOCOMMIT: int MALFORMED_DEFINER: int VIEW_FRM_NO_USER: int VIEW_OTHER_USER: int NO_SUCH_USER: int FORBID_SCHEMA_CHANGE: int ROW_IS_REFERENCED_2: int NO_REFERENCED_ROW_2: int SP_BAD_VAR_SHADOW: int TRG_NO_DEFINER: int OLD_FILE_FORMAT: int SP_RECURSION_LIMIT: int SP_PROC_TABLE_CORRUPT: int SP_WRONG_NAME: int TABLE_NEEDS_UPGRADE: int SP_NO_AGGREGATE: int MAX_PREPARED_STMT_COUNT_REACHED: int VIEW_RECURSIVE: int NON_GROUPING_FIELD_USED: int TABLE_CANT_HANDLE_SPKEYS: int NO_TRIGGERS_ON_SYSTEM_SCHEMA: int USERNAME: int HOSTNAME: int WRONG_STRING_LENGTH: int ERROR_LAST: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/FLAG.pyi0000664000175000017500000000034213577124116027721 0ustar davedave00000000000000from typing import Any NOT_NULL: Any PRI_KEY: Any UNIQUE_KEY: Any MULTIPLE_KEY: Any BLOB: Any UNSIGNED: Any ZEROFILL: Any BINARY: Any ENUM: Any AUTO_INCREMENT: Any TIMESTAMP: Any SET: Any PART_KEY: Any GROUP: Any UNIQUE: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/COMMAND.pyi0000664000175000017500000000062713577124116030274 0ustar davedave00000000000000COM_SLEEP: int COM_QUIT: int COM_INIT_DB: int COM_QUERY: int COM_FIELD_LIST: int COM_CREATE_DB: int COM_DROP_DB: int COM_REFRESH: int COM_SHUTDOWN: int COM_STATISTICS: int COM_PROCESS_INFO: int COM_CONNECT: int COM_PROCESS_KILL: int COM_DEBUG: int COM_PING: int COM_TIME: int COM_DELAYED_INSERT: int COM_CHANGE_USER: int COM_BINLOG_DUMP: int COM_TABLE_DUMP: int COM_CONNECT_OUT: int COM_REGISTER_SLAVE: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/constants/FIELD_TYPE.pyi0000664000175000017500000000054213577124116030676 0ustar davedave00000000000000DECIMAL: int TINY: int SHORT: int LONG: int FLOAT: int DOUBLE: int NULL: int TIMESTAMP: int LONGLONG: int INT24: int DATE: int TIME: int DATETIME: int YEAR: int NEWDATE: int VARCHAR: int BIT: int NEWDECIMAL: int ENUM: int SET: int TINY_BLOB: int MEDIUM_BLOB: int LONG_BLOB: int BLOB: int VAR_STRING: int STRING: int GEOMETRY: int CHAR: int INTERVAL: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/cursors.pyi0000664000175000017500000000357513577124116026707 0ustar davedave00000000000000from typing import Any, Dict, Iterator, List, Optional, Text, Tuple, TypeVar, Union from .connections import Connection Gen = Union[Tuple[Any, ...], Dict[str, Any]] _SelfT = TypeVar("_SelfT") class Cursor: connection: Connection description: Tuple[Text, ...] rownumber: int rowcount: int arraysize: int messages: Any errorhandler: Any lastrowid: int def __init__(self, connection: Connection) -> None: ... def __del__(self) -> None: ... def close(self) -> None: ... def setinputsizes(self, *args): ... def setoutputsizes(self, *args): ... def nextset(self): ... def execute(self, query: str, args: Optional[Any] = ...) -> int: ... def executemany(self, query: str, args) -> int: ... def callproc(self, procname, args=...): ... def fetchone(self) -> Optional[Gen]: ... def fetchmany(self, size: Optional[int] = ...) -> Union[Optional[Gen], List[Gen]]: ... def fetchall(self) -> Optional[Tuple[Gen, ...]]: ... def scroll(self, value: int, mode: str = ...): ... def __iter__(self): ... def __enter__(self: _SelfT) -> _SelfT: ... def __exit__(self, *exc_info: Any) -> None: ... class DictCursor(Cursor): def fetchone(self) -> Optional[Dict[str, Any]]: ... def fetchmany(self, size: Optional[int] = ...) -> Optional[Tuple[Dict[str, Any], ...]]: ... def fetchall(self) -> Optional[Tuple[Dict[str, Any], ...]]: ... class DictCursorMixin: dict_type: Any class SSCursor(Cursor): # fetchall return type is incompatible with the supertype. def fetchall(self) -> List[Gen]: ... # type: ignore def fetchall_unbuffered(self) -> Iterator[Tuple[Gen, ...]]: ... def __iter__(self) -> Iterator[Tuple[Gen, ...]]: ... def fetchmany(self, size: Optional[int] = ...) -> List[Gen]: ... def scroll(self, value: int, mode: str = ...) -> None: ... class SSDictCursor(DictCursorMixin, SSCursor): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/util.pyi0000664000175000017500000000010213577124116026143 0ustar davedave00000000000000def byte2int(b): ... def int2byte(i): ... def join_bytes(bs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/times.pyi0000664000175000017500000000025213577124116026315 0ustar davedave00000000000000from typing import Any Date: Any Time: Any TimeDelta: Any Timestamp: Any def DateFromTicks(ticks): ... def TimeFromTicks(ticks): ... def TimestampFromTicks(ticks): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/err.pyi0000664000175000017500000000107313577124116025766 0ustar davedave00000000000000from typing import Dict, NoReturn, Type from .constants import ER as ER class MySQLError(Exception): ... class Warning(MySQLError): ... class Error(MySQLError): ... class InterfaceError(Error): ... class DatabaseError(Error): ... class DataError(DatabaseError): ... class OperationalError(DatabaseError): ... class IntegrityError(DatabaseError): ... class InternalError(DatabaseError): ... class ProgrammingError(DatabaseError): ... class NotSupportedError(DatabaseError): ... error_map: Dict[int, Type[DatabaseError]] def raise_mysql_exception(data) -> NoReturn: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/charset.pyi0000664000175000017500000000050713577124116026630 0ustar davedave00000000000000from typing import Any MBLENGTH: Any class Charset: is_default: Any def __init__(self, id, name, collation, is_default): ... class Charsets: def __init__(self): ... def add(self, c): ... def by_id(self, id): ... def by_name(self, name): ... def charset_by_name(name): ... def charset_by_id(id): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pymysql/converters.pyi0000664000175000017500000000246213577124116027373 0ustar davedave00000000000000from typing import Any from .constants import FIELD_TYPE as FIELD_TYPE, FLAG as FLAG from .charset import charset_by_id as charset_by_id PYTHON3: Any ESCAPE_REGEX: Any ESCAPE_MAP: Any def escape_item(val, charset): ... def escape_dict(val, charset): ... def escape_sequence(val, charset): ... def escape_set(val, charset): ... def escape_bool(value): ... def escape_object(value): ... escape_int: Any escape_long: Any def escape_float(value): ... def escape_string(value): ... def escape_unicode(value): ... def escape_None(value): ... def escape_timedelta(obj): ... def escape_time(obj): ... def escape_datetime(obj): ... def escape_date(obj): ... def escape_struct_time(obj): ... def convert_datetime(connection, field, obj): ... def convert_timedelta(connection, field, obj): ... def convert_time(connection, field, obj): ... def convert_date(connection, field, obj): ... def convert_mysql_timestamp(connection, field, timestamp): ... def convert_set(s): ... def convert_bit(connection, field, b): ... def convert_characters(connection, field, data): ... def convert_int(connection, field, data): ... def convert_long(connection, field, data): ... def convert_float(connection, field, data): ... encoders: Any decoders: Any conversions: Any def convert_decimal(connection, field, data): ... def escape_decimal(obj): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/0000775000175000017500000000000013577125145024552 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/__init__.pyi0000664000175000017500000000000013577124116027017 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/utils.pyi0000664000175000017500000000043213577124116026431 0ustar davedave00000000000000from typing import Optional from datetime import datetime, tzinfo, timedelta def default_tzinfo(dt: datetime, tzinfo: tzinfo) -> datetime: ... def today(tzinfo: Optional[tzinfo] = ...) -> datetime: ... def within_delta(dt1: datetime, dt2: datetime, delta: timedelta) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/_common.pyi0000664000175000017500000000053113577124116026720 0ustar davedave00000000000000from typing import Optional, TypeVar _T = TypeVar("_T") class weekday(object): def __init__(self, weekday: int, n: Optional[int] = ...) -> None: ... def __call__(self: _T, n: int) -> _T: ... def __eq__(self, other) -> bool: ... def __repr__(self) -> str: ... def __hash__(self) -> int: ... weekday: int n: int jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/rrule.pyi0000664000175000017500000000644013577124116026427 0ustar davedave00000000000000from ._common import weekday as weekdaybase from typing import Any, Iterable, Optional, Union import datetime YEARLY: int MONTHLY: int WEEKLY: int DAILY: int HOURLY: int MINUTELY: int SECONDLY: int class weekday(weekdaybase): ... MO: weekday TU: weekday WE: weekday TH: weekday FR: weekday SA: weekday SU: weekday class rrulebase: def __init__(self, cache: bool = ...) -> None: ... def __iter__(self): ... def __getitem__(self, item): ... def __contains__(self, item): ... def count(self): ... def before(self, dt, inc: bool = ...): ... def after(self, dt, inc: bool = ...): ... def xafter(self, dt, count: Optional[Any] = ..., inc: bool = ...): ... def between(self, after, before, inc: bool = ..., count: int = ...): ... class rrule(rrulebase): def __init__(self, freq, dtstart: Optional[datetime.date] = ..., interval: int = ..., wkst: Optional[Union[weekday, int]] = ..., count: Optional[int] = ..., until: Optional[Union[datetime.date, int]] = ..., bysetpos: Optional[Union[int, Iterable[int]]] = ..., bymonth: Optional[Union[int, Iterable[int]]] = ..., bymonthday: Optional[Union[int, Iterable[int]]] = ..., byyearday: Optional[Union[int, Iterable[int]]] = ..., byeaster: Optional[Union[int, Iterable[int]]] = ..., byweekno: Optional[Union[int, Iterable[int]]] = ..., byweekday: Optional[Union[int, weekday, Iterable[int], Iterable[weekday]]] = ..., byhour: Optional[Union[int, Iterable[int]]] = ..., byminute: Optional[Union[int, Iterable[int]]] = ..., bysecond: Optional[Union[int, Iterable[int]]] = ..., cache: bool = ...) -> None: ... def replace(self, **kwargs): ... class _iterinfo: rrule: Any = ... def __init__(self, rrule) -> None: ... yearlen: int = ... nextyearlen: int = ... yearordinal: int = ... yearweekday: int = ... mmask: Any = ... mdaymask: Any = ... nmdaymask: Any = ... wdaymask: Any = ... mrange: Any = ... wnomask: Any = ... nwdaymask: Any = ... eastermask: Any = ... lastyear: int = ... lastmonth: int = ... def rebuild(self, year, month): ... def ydayset(self, year, month, day): ... def mdayset(self, year, month, day): ... def wdayset(self, year, month, day): ... def ddayset(self, year, month, day): ... def htimeset(self, hour, minute, second): ... def mtimeset(self, hour, minute, second): ... def stimeset(self, hour, minute, second): ... class rruleset(rrulebase): class _genitem: dt: Any = ... genlist: Any = ... gen: Any = ... def __init__(self, genlist, gen) -> None: ... def __next__(self): ... next: Any = ... def __lt__(self, other): ... def __gt__(self, other): ... def __eq__(self, other): ... def __ne__(self, other): ... def __init__(self, cache: bool = ...) -> None: ... def rrule(self, rrule): ... def rdate(self, rdate): ... def exrule(self, exrule): ... def exdate(self, exdate): ... class _rrulestr: def __call__(self, s, **kwargs): ... rrulestr: _rrulestr jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/parser.pyi0000664000175000017500000000331513577124116026570 0ustar davedave00000000000000from typing import List, Tuple, Optional, Callable, Union, IO, Any, Dict, Mapping, Text from datetime import datetime, tzinfo _FileOrStr = Union[bytes, Text, IO[str], IO[Any]] class parserinfo(object): JUMP: List[str] WEEKDAYS: List[Tuple[str, str]] MONTHS: List[Tuple[str, str]] HMS: List[Tuple[str, str, str]] AMPM: List[Tuple[str, str]] UTCZONE: List[str] PERTAIN: List[str] TZOFFSET: Dict[str, int] def __init__(self, dayfirst: bool = ..., yearfirst: bool = ...) -> None: ... def jump(self, name: Text) -> bool: ... def weekday(self, name: Text) -> Optional[int]: ... def month(self, name: Text) -> Optional[int]: ... def hms(self, name: Text) -> Optional[int]: ... def ampm(self, name: Text) -> Optional[int]: ... def pertain(self, name: Text) -> bool: ... def utczone(self, name: Text) -> bool: ... def tzoffset(self, name: Text) -> Optional[int]: ... def convertyear(self, year: int) -> int: ... def validate(self, res: datetime) -> bool: ... class parser(object): def __init__(self, info: Optional[parserinfo] = ...) -> None: ... def parse(self, timestr: _FileOrStr, default: Optional[datetime] = ..., ignoretz: bool = ..., tzinfos: Optional[Mapping[Text, tzinfo]] = ..., **kwargs: Any) -> datetime: ... def isoparse(dt_str: Union[str, bytes, IO[str], IO[bytes]]) -> datetime: ... DEFAULTPARSER: parser def parse(timestr: _FileOrStr, parserinfo: Optional[parserinfo] = ..., **kwargs: Any) -> datetime: ... class _tzparser: ... DEFAULTTZPARSER: _tzparser class InvalidDatetimeError(ValueError): ... class InvalidDateError(InvalidDatetimeError): ... class InvalidTimeError(InvalidDatetimeError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/tz/0000775000175000017500000000000013577125145025207 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/tz/__init__.pyi0000664000175000017500000000052413577124116027467 0ustar davedave00000000000000from .tz import ( tzutc as tzutc, tzoffset as tzoffset, tzlocal as tzlocal, tzfile as tzfile, tzrange as tzrange, tzstr as tzstr, tzical as tzical, gettz as gettz, datetime_exists as datetime_exists, datetime_ambiguous as datetime_ambiguous, resolve_imaginary as resolve_imaginary, ) UTC: tzutc jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/tz/tz.pyi0000664000175000017500000000753113577124116026372 0ustar davedave00000000000000from typing import Any, Optional, Union, IO, Text, Tuple, List import datetime from ._common import tzname_in_python2 as tzname_in_python2, _tzinfo as _tzinfo from ._common import tzrangebase as tzrangebase, enfold as enfold from ..relativedelta import relativedelta _FileObj = Union[str, Text, IO[str], IO[Text]] ZERO: datetime.timedelta EPOCH: datetime.datetime EPOCHORDINAL: int class tzutc(datetime.tzinfo): def utcoffset(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def dst(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def tzname(self, dt: Optional[datetime.datetime]) -> str: ... def is_ambiguous(self, dt: Optional[datetime.datetime]) -> bool: ... def __eq__(self, other): ... __hash__: Any def __ne__(self, other): ... __reduce__: Any class tzoffset(datetime.tzinfo): def __init__(self, name, offset) -> None: ... def utcoffset(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def dst(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def is_ambiguous(self, dt: Optional[datetime.datetime]) -> bool: ... def tzname(self, dt: Optional[datetime.datetime]) -> str: ... def __eq__(self, other): ... __hash__: Any def __ne__(self, other): ... __reduce__: Any @classmethod def instance(cls, name, offset) -> tzoffset: ... class tzlocal(_tzinfo): def __init__(self) -> None: ... def utcoffset(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def dst(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def tzname(self, dt: Optional[datetime.datetime]) -> str: ... def is_ambiguous(self, dt: Optional[datetime.datetime]) -> bool: ... def __eq__(self, other): ... __hash__: Any def __ne__(self, other): ... __reduce__: Any class _ttinfo: def __init__(self) -> None: ... def __eq__(self, other): ... __hash__: Any def __ne__(self, other): ... class tzfile(_tzinfo): def __init__(self, fileobj: _FileObj, filename: Optional[Text] = ...) -> None: ... def is_ambiguous(self, dt: Optional[datetime.datetime], idx: Optional[int] = ...) -> bool: ... def utcoffset(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def dst(self, dt: Optional[datetime.datetime]) -> Optional[datetime.timedelta]: ... def tzname(self, dt: Optional[datetime.datetime]) -> str: ... def __eq__(self, other): ... __hash__: Any def __ne__(self, other): ... def __reduce__(self): ... def __reduce_ex__(self, protocol): ... class tzrange(tzrangebase): hasdst: bool def __init__(self, stdabbr: Text, stdoffset: Union[int, datetime.timedelta, None] = ..., dstabbr: Optional[Text] = ..., dstoffset: Union[int, datetime.timedelta, None] = ..., start: Optional[relativedelta] = ..., end: Optional[relativedelta] = ...) -> None: ... def transitions(self, year: int) -> Tuple[datetime.datetime, datetime.datetime]: ... def __eq__(self, other): ... class tzstr(tzrange): hasdst: bool def __init__(self, s: Union[bytes, _FileObj], posix_offset: bool = ...) -> None: ... @classmethod def instance(cls, name, offset) -> tzoffset: ... class tzical: def __init__(self, fileobj: _FileObj) -> None: ... def keys(self): ... def get(self, tzid: Optional[Any] = ...): ... TZFILES: List[str] TZPATHS: List[str] def datetime_exists(dt: datetime.datetime, tz: Optional[datetime.tzinfo] = ...) -> bool: ... def datetime_ambiguous(dt: datetime.datetime, tz: Optional[datetime.tzinfo] = ...) -> bool: ... def resolve_imaginary(dt: datetime.datetime) -> datetime.datetime: ... class _GetTZ: def __call__(self, name: Optional[Text] = ...) -> Optional[datetime.tzinfo]: ... def nocache(self, name: Optional[Text]) -> Optional[datetime.tzinfo]: ... gettz: _GetTZ jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/tz/_common.pyi0000664000175000017500000000146213577124116027361 0ustar davedave00000000000000from typing import Any, Optional from datetime import datetime, tzinfo, timedelta def tzname_in_python2(namefunc): ... def enfold(dt: datetime, fold: int = ...): ... class _DatetimeWithFold(datetime): @property def fold(self): ... class _tzinfo(tzinfo): def is_ambiguous(self, dt: datetime) -> bool: ... def fromutc(self, dt: datetime) -> datetime: ... class tzrangebase(_tzinfo): def __init__(self) -> None: ... def utcoffset(self, dt: Optional[datetime]) -> Optional[timedelta]: ... def dst(self, dt: Optional[datetime]) -> Optional[timedelta]: ... def tzname(self, dt: Optional[datetime]) -> str: ... def fromutc(self, dt: datetime) -> datetime: ... def is_ambiguous(self, dt: datetime) -> bool: ... __hash__: Any def __ne__(self, other): ... __reduce__: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/dateutil/relativedelta.pyi0000664000175000017500000000640013577124116030117 0ustar davedave00000000000000from typing import overload, Any, List, Optional, SupportsFloat, TypeVar, Union from datetime import date, datetime, timedelta from ._common import weekday _SelfT = TypeVar('_SelfT', bound=relativedelta) _DateT = TypeVar('_DateT', date, datetime) # Work around attribute and type having the same name. _weekday = weekday MO: weekday TU: weekday WE: weekday TH: weekday FR: weekday SA: weekday SU: weekday class relativedelta(object): years: int months: int days: int leapdays: int hours: int minutes: int seconds: int microseconds: int year: Optional[int] month: Optional[int] weekday: Optional[_weekday] day: Optional[int] hour: Optional[int] minute: Optional[int] second: Optional[int] microsecond: Optional[int] def __init__(self, dt1: Optional[date] = ..., dt2: Optional[date] = ..., years: Optional[int] = ..., months: Optional[int] = ..., days: Optional[int] = ..., leapdays: Optional[int] = ..., weeks: Optional[int] = ..., hours: Optional[int] = ..., minutes: Optional[int] = ..., seconds: Optional[int] = ..., microseconds: Optional[int] = ..., year: Optional[int] = ..., month: Optional[int] = ..., day: Optional[int] = ..., weekday: Optional[Union[int, _weekday]] = ..., yearday: Optional[int] = ..., nlyearday: Optional[int] = ..., hour: Optional[int] = ..., minute: Optional[int] = ..., second: Optional[int] = ..., microsecond: Optional[int] = ...) -> None: ... @property def weeks(self) -> int: ... @weeks.setter def weeks(self, value: int) -> None: ... def normalized(self: _SelfT) -> _SelfT: ... # TODO: use Union when mypy will handle it properly in overloaded operator # methods (#2129, #1442, #1264 in mypy) @overload def __add__(self: _SelfT, other: relativedelta) -> _SelfT: ... @overload def __add__(self: _SelfT, other: timedelta) -> _SelfT: ... @overload def __add__(self, other: _DateT) -> _DateT: ... @overload def __radd__(self: _SelfT, other: relativedelta) -> _SelfT: ... @overload def __radd__(self: _SelfT, other: timedelta) -> _SelfT: ... @overload def __radd__(self, other: _DateT) -> _DateT: ... @overload def __rsub__(self: _SelfT, other: relativedelta) -> _SelfT: ... @overload def __rsub__(self: _SelfT, other: timedelta) -> _SelfT: ... @overload def __rsub__(self, other: _DateT) -> _DateT: ... def __sub__(self: _SelfT, other: relativedelta) -> _SelfT: ... def __neg__(self: _SelfT) -> _SelfT: ... def __bool__(self) -> bool: ... def __nonzero__(self) -> bool: ... def __mul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ... def __rmul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ... def __eq__(self, other) -> bool: ... def __ne__(self, other: object) -> bool: ... def __div__(self: _SelfT, other: SupportsFloat) -> _SelfT: ... def __truediv__(self: _SelfT, other: SupportsFloat) -> _SelfT: ... def __repr__(self) -> str: ... def __abs__(self: _SelfT) -> _SelfT: ... def __hash__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/attr/0000775000175000017500000000000013577125145023711 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/attr/__init__.pyi0000664000175000017500000001713113577124116026173 0ustar davedave00000000000000from typing import ( Any, Callable, Dict, Generic, List, Optional, Sequence, Mapping, Tuple, Type, TypeVar, Union, overload, ) # `import X as X` is required to make these public from . import exceptions as exceptions from . import filters as filters from . import converters as converters from . import validators as validators _T = TypeVar("_T") _C = TypeVar("_C", bound=type) _ValidatorType = Callable[[Any, Attribute[_T], _T], Any] _ConverterType = Callable[[Any], _T] _FilterType = Callable[[Attribute[_T], _T], bool] # FIXME: in reality, if multiple validators are passed they must be in a list or tuple, # but those are invariant and so would prevent subtypes of _ValidatorType from working # when passed in a list or tuple. _ValidatorArgType = Union[_ValidatorType[_T], Sequence[_ValidatorType[_T]]] # _make -- NOTHING: object # NOTE: Factory lies about its return type to make this possible: `x: List[int] = Factory(list)` # Work around mypy issue #4554 in the common case by using an overload. @overload def Factory(factory: Callable[[], _T]) -> _T: ... @overload def Factory( factory: Union[Callable[[Any], _T], Callable[[], _T]], takes_self: bool = ..., ) -> _T: ... class Attribute(Generic[_T]): name: str default: Optional[_T] validator: Optional[_ValidatorType[_T]] repr: bool cmp: bool hash: Optional[bool] init: bool converter: Optional[_ConverterType[_T]] metadata: Dict[Any, Any] type: Optional[Type[_T]] kw_only: bool def __lt__(self, x: Attribute[_T]) -> bool: ... def __le__(self, x: Attribute[_T]) -> bool: ... def __gt__(self, x: Attribute[_T]) -> bool: ... def __ge__(self, x: Attribute[_T]) -> bool: ... # NOTE: We had several choices for the annotation to use for type arg: # 1) Type[_T] # - Pros: Handles simple cases correctly # - Cons: Might produce less informative errors in the case of conflicting TypeVars # e.g. `attr.ib(default='bad', type=int)` # 2) Callable[..., _T] # - Pros: Better error messages than #1 for conflicting TypeVars # - Cons: Terrible error messages for validator checks. # e.g. attr.ib(type=int, validator=validate_str) # -> error: Cannot infer function type argument # 3) type (and do all of the work in the mypy plugin) # - Pros: Simple here, and we could customize the plugin with our own errors. # - Cons: Would need to write mypy plugin code to handle all the cases. # We chose option #1. # `attr` lies about its return type to make the following possible: # attr() -> Any # attr(8) -> int # attr(validator=) -> Whatever the callable expects. # This makes this type of assignments possible: # x: int = attr(8) # # This form catches explicit None or no default but with no other arguments returns Any. @overload def attrib( default: None = ..., validator: None = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., convert: None = ..., metadata: Optional[Mapping[Any, Any]] = ..., type: None = ..., converter: None = ..., factory: None = ..., kw_only: bool = ..., ) -> Any: ... # This form catches an explicit None or no default and infers the type from the other arguments. @overload def attrib( default: None = ..., validator: Optional[_ValidatorArgType[_T]] = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., convert: Optional[_ConverterType[_T]] = ..., metadata: Optional[Mapping[Any, Any]] = ..., type: Optional[Type[_T]] = ..., converter: Optional[_ConverterType[_T]] = ..., factory: Optional[Callable[[], _T]] = ..., kw_only: bool = ..., ) -> _T: ... # This form catches an explicit default argument. @overload def attrib( default: _T, validator: Optional[_ValidatorArgType[_T]] = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., convert: Optional[_ConverterType[_T]] = ..., metadata: Optional[Mapping[Any, Any]] = ..., type: Optional[Type[_T]] = ..., converter: Optional[_ConverterType[_T]] = ..., factory: Optional[Callable[[], _T]] = ..., kw_only: bool = ..., ) -> _T: ... # This form covers type=non-Type: e.g. forward references (str), Any @overload def attrib( default: Optional[_T] = ..., validator: Optional[_ValidatorArgType[_T]] = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., convert: Optional[_ConverterType[_T]] = ..., metadata: Optional[Mapping[Any, Any]] = ..., type: object = ..., converter: Optional[_ConverterType[_T]] = ..., factory: Optional[Callable[[], _T]] = ..., kw_only: bool = ..., ) -> Any: ... @overload def attrs( maybe_cls: _C, these: Optional[Dict[str, Any]] = ..., repr_ns: Optional[str] = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., ) -> _C: ... @overload def attrs( maybe_cls: None = ..., these: Optional[Dict[str, Any]] = ..., repr_ns: Optional[str] = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., ) -> Callable[[_C], _C]: ... # TODO: add support for returning NamedTuple from the mypy plugin class _Fields(Tuple[Attribute[Any], ...]): def __getattr__(self, name: str) -> Attribute[Any]: ... def fields(cls: type) -> _Fields: ... def fields_dict(cls: type) -> Dict[str, Attribute[Any]]: ... def validate(inst: Any) -> None: ... # TODO: add support for returning a proper attrs class from the mypy plugin # we use Any instead of _CountingAttr so that e.g. `make_class('Foo', [attr.ib()])` is valid def make_class( name: str, attrs: Union[List[str], Tuple[str, ...], Dict[str, Any]], bases: Tuple[type, ...] = ..., repr_ns: Optional[str] = ..., repr: bool = ..., cmp: bool = ..., hash: Optional[bool] = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., ) -> type: ... # _funcs -- # TODO: add support for returning TypedDict from the mypy plugin # FIXME: asdict/astuple do not honor their factory args. waiting on one of these: # https://github.com/python/mypy/issues/4236 # https://github.com/python/typing/issues/253 def asdict( inst: Any, recurse: bool = ..., filter: Optional[_FilterType[Any]] = ..., dict_factory: Type[Mapping[Any, Any]] = ..., retain_collection_types: bool = ..., ) -> Dict[str, Any]: ... # TODO: add support for returning NamedTuple from the mypy plugin def astuple( inst: Any, recurse: bool = ..., filter: Optional[_FilterType[Any]] = ..., tuple_factory: Type[Sequence[Any]] = ..., retain_collection_types: bool = ..., ) -> Tuple[Any, ...]: ... def has(cls: type) -> bool: ... def assoc(inst: _T, **changes: Any) -> _T: ... def evolve(inst: _T, **changes: Any) -> _T: ... # _config -- def set_run_validators(run: bool) -> None: ... def get_run_validators() -> bool: ... # aliases -- s = attributes = attrs ib = attr = attrib dataclass = attrs # Technically, partial(attrs, auto_attribs=True) ;) jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/attr/filters.pyi0000664000175000017500000000032613577124116026102 0ustar davedave00000000000000from typing import Union, Any from . import Attribute, _FilterType def include(*what: Union[type, Attribute[Any]]) -> _FilterType[Any]: ... def exclude(*what: Union[type, Attribute[Any]]) -> _FilterType[Any]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/attr/exceptions.pyi0000664000175000017500000000040113577124116026605 0ustar davedave00000000000000class FrozenInstanceError(AttributeError): msg: str = ... class AttrsAttributeNotFoundError(ValueError): ... class NotAnAttrsClassError(ValueError): ... class DefaultAlreadySetError(RuntimeError): ... class UnannotatedAttributeError(RuntimeError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/attr/validators.pyi0000664000175000017500000000160113577124116026577 0ustar davedave00000000000000from typing import Container, List, Union, TypeVar, Type, Any, Optional, Tuple from . import _ValidatorType _T = TypeVar("_T") def instance_of( type: Union[Tuple[Type[_T], ...], Type[_T]] ) -> _ValidatorType[_T]: ... def provides(interface: Any) -> _ValidatorType[Any]: ... def optional( validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]] ) -> _ValidatorType[Optional[_T]]: ... def in_(options: Container[_T]) -> _ValidatorType[_T]: ... def and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ... def deep_iterable( member_validator: _ValidatorType[_T], iterable_validator: Optional[_ValidatorType[_T]], ) -> _ValidatorType[_T]: ... def deep_mapping( key_validator: _ValidatorType[_T], value_validator: _ValidatorType[_T], mapping_validator: Optional[_ValidatorType[_T]], ) -> _ValidatorType[_T]: ... def is_callable() -> _ValidatorType[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/attr/converters.pyi0000664000175000017500000000053713577124116026630 0ustar davedave00000000000000from typing import TypeVar, Optional, Callable, overload from . import _ConverterType _T = TypeVar("_T") def optional( converter: _ConverterType[_T] ) -> _ConverterType[Optional[_T]]: ... @overload def default_if_none(default: _T) -> _ConverterType[_T]: ... @overload def default_if_none(*, factory: Callable[[], _T]) -> _ConverterType[_T]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/backports/0000775000175000017500000000000013577125145024727 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/backports/__init__.pyi0000664000175000017500000000000013577124116027174 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/backports/ssl_match_hostname.pyi0000664000175000017500000000012113577124116031314 0ustar davedave00000000000000class CertificateError(ValueError): ... def match_hostname(cert, hostname): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/0000775000175000017500000000000013577125145024124 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/__init__.pyi0000664000175000017500000000000013577124116026371 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/records.pyi0000664000175000017500000000402713577124116026310 0ustar davedave00000000000000from typing import Any, Mapping, Optional, Sequence, Text, Tuple from geoip2.mixins import SimpleEquality _Locales = Optional[Sequence[Text]] _Names = Mapping[Text, Text] class Record(SimpleEquality): def __init__(self, **kwargs: Any) -> None: ... def __setattr__(self, name: Text, value: Any) -> None: ... class PlaceRecord(Record): def __init__(self, locales: _Locales = ..., **kwargs: Any) -> None: ... @property def name(self) -> Text: ... class City(PlaceRecord): confidence: int geoname_id: int names: _Names class Continent(PlaceRecord): code: Text geoname_id: int names: _Names class Country(PlaceRecord): confidence: int geoname_id: int is_in_european_union: bool iso_code: Text names: _Names def __init__(self, locales: _Locales = ..., **kwargs: Any) -> None: ... class RepresentedCountry(Country): type: Text class Location(Record): average_income: int accuracy_radius: int latitude: float longitude: float metro_code: int population_density: int time_zone: Text class MaxMind(Record): queries_remaining: int class Postal(Record): code: Text confidence: int class Subdivision(PlaceRecord): confidence: int geoname_id: int iso_code: Text names: _Names class Subdivisions(Tuple[Subdivision]): def __new__(cls, locales: _Locales, *subdivisions: Subdivision) -> Subdivisions: ... def __init__(self, locales: _Locales, *subdivisions: Subdivision) -> None: ... @property def most_specific(self) -> Subdivision: ... class Traits(Record): autonomous_system_number: int autonomous_system_organization: Text connection_type: Text domain: Text ip_address: Text is_anonymous: bool is_anonymous_proxy: bool is_anonymous_vpn: bool is_hosting_provider: bool is_legitimate_proxy: bool is_public_proxy: bool is_satellite_provider: bool is_tor_exit_node: bool isp: Text organization: Text user_type: Text def __init__(self, **kwargs: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/models.pyi0000664000175000017500000000351613577124116026134 0ustar davedave00000000000000from typing import Any, Mapping, Optional, Sequence, Text from geoip2 import records from geoip2.mixins import SimpleEquality _Locales = Optional[Sequence[Text]] _RawResponse = Mapping[Text, Mapping[Text, Any]] class Country(SimpleEquality): continent: records.Continent country: records.Country registered_country: records.Country represented_country: records.RepresentedCountry maxmind: records.MaxMind traits: records.Traits raw: _RawResponse def __init__(self, raw_response: _RawResponse, locales: _Locales = ...) -> None: ... class City(Country): city: records.City location: records.Location postal: records.Postal subdivisions: records.Subdivisions def __init__(self, raw_response: _RawResponse, locales: _Locales = ...) -> None: ... class Insights(City): ... class Enterprise(City): ... class SimpleModel(SimpleEquality): ... class AnonymousIP(SimpleModel): is_anonymous: bool is_anonymous_vpn: bool is_hosting_provider: bool is_public_proxy: bool is_tor_exit_node: bool ip_address: Optional[Text] raw: _RawResponse def __init__(self, raw: _RawResponse) -> None: ... class ASN(SimpleModel): autonomous_system_number: Optional[int] autonomous_system_organization: Optional[Text] ip_address: Optional[Text] raw: _RawResponse def __init__(self, raw: _RawResponse) -> None: ... class ConnectionType(SimpleModel): connection_type: Optional[Text] ip_address: Optional[Text] raw: _RawResponse def __init__(self, raw: _RawResponse) -> None: ... class Domain(SimpleModel): domain: Optional[Text] ip_address: Optional[Text] raw: Optional[Text] def __init__(self, raw: _RawResponse) -> None: ... class ISP(ASN): isp: Optional[Text] organization: Optional[Text] def __init__(self, raw: _RawResponse) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/database.pyi0000664000175000017500000000210613577124116026407 0ustar davedave00000000000000from types import TracebackType from typing import Optional, Sequence, Text, Type from maxminddb.reader import Metadata from geoip2.models import AnonymousIP, ASN, City, ConnectionType, Country, Domain, Enterprise, ISP _Locales = Optional[Sequence[Text]] class Reader: def __init__(self, filename: Text, locales: _Locales = ..., mode: int = ...) -> None: ... def __enter__(self) -> Reader: ... def __exit__(self, exc_type: Optional[Type[BaseException]] = ..., exc_val: Optional[BaseException] = ..., exc_tb: Optional[TracebackType] = ...) -> None: ... def country(self, ip_address: Text) -> Country: ... def city(self, ip_address: Text) -> City: ... def anonymous_ip(self, ip_address: Text) -> AnonymousIP: ... def asn(self, ip_address: Text) -> ASN: ... def connection_type(self, ip_address: Text) -> ConnectionType: ... def domain(self, ip_address: Text) -> Domain: ... def enterprise(self, ip_address: Text) -> Enterprise: ... def isp(self, ip_address: Text) -> ISP: ... def metadata(self) -> Metadata: ... def close(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/mixins.pyi0000664000175000017500000000017013577124116026151 0ustar davedave00000000000000class SimpleEquality: def __eq__(self, other: object) -> bool: ... def __ne__(self, other: object) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/geoip2/errors.pyi0000664000175000017500000000076213577124116026165 0ustar davedave00000000000000from typing import Optional, Text class GeoIP2Error(RuntimeError): ... class AddressNotFoundError(GeoIP2Error): ... class AuthenticationError(GeoIP2Error): ... class HTTPError(GeoIP2Error): http_status: Optional[int] uri: Optional[Text] def __init__(self, message: Text, http_status: Optional[int] = ..., uri: Optional[Text] = ...) -> None: ... class InvalidRequestError(GeoIP2Error): ... class OutOfQueriesError(GeoIP2Error): ... class PermissionRequiredError(GeoIP2Error): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/0000775000175000017500000000000013577125145024024 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/__init__.pyi0000664000175000017500000000547013577124116026311 0ustar davedave00000000000000# -*- coding: utf-8 -*- """ click ~~~~~ Click is a simple Python module that wraps the stdlib's optparse to make writing command line scripts fun. Unlike other modules, it's based around a simple API that does not come with too much magic and is composable. In case optparse ever gets removed from the stdlib, it will be shipped by this module. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ # Core classes from .core import ( Context as Context, BaseCommand as BaseCommand, Command as Command, MultiCommand as MultiCommand, Group as Group, CommandCollection as CommandCollection, Parameter as Parameter, Option as Option, Argument as Argument, ) # Globals from .globals import get_current_context as get_current_context # Decorators from .decorators import ( pass_context as pass_context, pass_obj as pass_obj, make_pass_decorator as make_pass_decorator, command as command, group as group, argument as argument, option as option, confirmation_option as confirmation_option, password_option as password_option, version_option as version_option, help_option as help_option, ) # Types from .types import ( ParamType as ParamType, File as File, FloatRange as FloatRange, DateTime as DateTime, Path as Path, Choice as Choice, IntRange as IntRange, Tuple as Tuple, STRING as STRING, INT as INT, FLOAT as FLOAT, BOOL as BOOL, UUID as UUID, UNPROCESSED as UNPROCESSED, ) # Utilities from .utils import ( echo as echo, get_binary_stream as get_binary_stream, get_text_stream as get_text_stream, open_file as open_file, format_filename as format_filename, get_app_dir as get_app_dir, get_os_args as get_os_args, ) # Terminal functions from .termui import ( prompt as prompt, confirm as confirm, get_terminal_size as get_terminal_size, echo_via_pager as echo_via_pager, progressbar as progressbar, clear as clear, style as style, unstyle as unstyle, secho as secho, edit as edit, launch as launch, getchar as getchar, pause as pause, ) # Exceptions from .exceptions import ( ClickException as ClickException, UsageError as UsageError, BadParameter as BadParameter, FileError as FileError, Abort as Abort, NoSuchOption as NoSuchOption, BadOptionUsage as BadOptionUsage, BadArgumentUsage as BadArgumentUsage, MissingParameter as MissingParameter, ) # Formatting from .formatting import HelpFormatter as HelpFormatter, wrap_text as wrap_text # Parsing from .parser import OptionParser as OptionParser # Controls if click should emit the warning about the use of unicode # literals. disable_unicode_literals_warning: bool __version__: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/decorators.pyi0000664000175000017500000002205013577124116026710 0ustar davedave00000000000000from distutils.version import Version from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, Text, overload from click.core import Command, Group, Argument, Option, Parameter, Context, _ConvertibleType _T = TypeVar('_T') _F = TypeVar('_F', bound=Callable[..., Any]) # Until https://github.com/python/mypy/issues/3924 is fixed you can't do the following: # _Decorator = Callable[[_F], _F] _Callback = Callable[ [Context, Union[Option, Parameter], Any], Any ] def pass_context(_T) -> _T: ... def pass_obj(_T) -> _T: ... def make_pass_decorator( object_type: type, ensure: bool = ... ) -> Callable[[_T], _T]: ... # NOTE: Decorators below have **attrs converted to concrete constructor # arguments from core.pyi to help with type checking. def command( name: Optional[str] = ..., cls: Optional[Type[Command]] = ..., # Command context_settings: Optional[Dict[Any, Any]] = ..., help: Optional[str] = ..., epilog: Optional[str] = ..., short_help: Optional[str] = ..., options_metavar: str = ..., add_help_option: bool = ..., hidden: bool = ..., deprecated: bool = ..., ) -> Callable[[Callable[..., Any]], Command]: ... # This inherits attrs from Group, MultiCommand and Command. def group( name: Optional[str] = ..., cls: Type[Command] = ..., # Group commands: Optional[Dict[str, Command]] = ..., # MultiCommand invoke_without_command: bool = ..., no_args_is_help: Optional[bool] = ..., subcommand_metavar: Optional[str] = ..., chain: bool = ..., result_callback: Optional[Callable[..., Any]] = ..., # Command help: Optional[str] = ..., epilog: Optional[str] = ..., short_help: Optional[str] = ..., options_metavar: str = ..., add_help_option: bool = ..., hidden: bool = ..., deprecated: bool = ..., # User-defined **kwargs: Any, ) -> Callable[[Callable[..., Any]], Group]: ... def argument( *param_decls: str, cls: Type[Argument] = ..., # Argument required: Optional[bool] = ..., # Parameter type: Optional[_ConvertibleType] = ..., default: Optional[Any] = ..., callback: Optional[_Callback] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ..., autocompletion: Optional[Callable[[Any, List[str], str], List[Union[str, Tuple[str, str]]]]] = ..., ) -> Callable[[_F], _F]: ... @overload def option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: Optional[bool] = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Optional[_ConvertibleType] = ..., help: Optional[str] = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., required: bool = ..., callback: Optional[_Callback] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ..., # User-defined **kwargs: Any, ) -> Callable[[_F], _F]: ... @overload def option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: Optional[bool] = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: _T = ..., help: Optional[str] = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., required: bool = ..., callback: Optional[Callable[[Context, Union[Option, Parameter], Union[bool, int, str]], _T]] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ..., # User-defined **kwargs: Any, ) -> Callable[[_F], _F]: ... @overload def option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: Optional[bool] = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Type[str] = ..., help: Optional[str] = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., required: bool = ..., callback: Callable[[Context, Union[Option, Parameter], str], Any] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ..., # User-defined **kwargs: Any, ) -> Callable[[_F], _F]: ... @overload def option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: Optional[bool] = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Type[int] = ..., help: Optional[str] = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., required: bool = ..., callback: Callable[[Context, Union[Option, Parameter], int], Any] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ..., # User-defined **kwargs: Any, ) -> Callable[[_F], _F]: ... def confirmation_option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: bool = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Optional[_ConvertibleType] = ..., help: str = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., callback: Optional[_Callback] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ... ) -> Callable[[_F], _F]: ... def password_option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: Optional[bool] = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Optional[_ConvertibleType] = ..., help: Optional[str] = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., callback: Optional[_Callback] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ... ) -> Callable[[_F], _F]: ... def version_option( version: Optional[Union[str, Version]] = ..., *param_decls: str, cls: Type[Option] = ..., # Option prog_name: Optional[str] = ..., message: Optional[str] = ..., show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: bool = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Optional[_ConvertibleType] = ..., help: str = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., callback: Optional[_Callback] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ... ) -> Callable[[_F], _F]: ... def help_option( *param_decls: str, cls: Type[Option] = ..., # Option show_default: Union[bool, Text] = ..., prompt: Union[bool, Text] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: bool = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Optional[_ConvertibleType] = ..., help: str = ..., show_choices: bool = ..., # Parameter default: Optional[Any] = ..., callback: Optional[_Callback] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ... ) -> Callable[[_F], _F]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/testing.pyi0000664000175000017500000000423713577124116026227 0ustar davedave00000000000000from typing import (IO, Any, BinaryIO, ContextManager, Dict, Iterable, List, Mapping, Optional, Text, Tuple, Union) from .core import BaseCommand clickpkg: Any class EchoingStdin: def __init__(self, input: BinaryIO, output: BinaryIO) -> None: ... def __getattr__(self, x: str) -> Any: ... def read(self, n: int = ...) -> bytes: ... def readline(self, n: int = ...) -> bytes: ... def readlines(self) -> List[bytes]: ... def __iter__(self) -> Iterable[bytes]: ... def make_input_stream(input: Optional[Union[bytes, Text, IO[Any]]], charset: Text) -> BinaryIO: ... class Result: runner: CliRunner exit_code: int exception: Any exc_info: Optional[Any] stdout_bytes: bytes stderr_bytes: bytes def __init__( self, runner: CliRunner, stdout_bytes: bytes, stderr_bytes: bytes, exit_code: int, exception: Any, exc_info: Optional[Any] = ..., ) -> None: ... @property def output(self) -> Text: ... @property def stdout(self) -> Text: ... @property def stderr(self) -> Text: ... class CliRunner: charset: str env: Mapping[str, str] echo_stdin: bool mix_stderr: bool def __init__( self, charset: Optional[Text] = ..., env: Optional[Mapping[str, str]] = ..., echo_stdin: bool = ..., mix_stderr: bool = ..., ) -> None: ... def get_default_prog_name(self, cli: BaseCommand) -> str: ... def make_env(self, overrides: Optional[Mapping[str, str]] = ...) -> Dict[str, str]: ... def isolation( self, input: Optional[Union[bytes, Text, IO[Any]]] = ..., env: Optional[Mapping[str, str]] = ..., color: bool = ..., ) -> ContextManager[BinaryIO]: ... def invoke( self, cli: BaseCommand, args: Optional[Union[str, Iterable[str]]] = ..., input: Optional[Union[bytes, Text, IO[Any]]] = ..., env: Optional[Mapping[str, str]] = ..., catch_exceptions: bool = ..., color: bool = ..., **extra: Any, ) -> Result: ... def isolated_filesystem(self) -> ContextManager[str]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/core.pyi0000664000175000017500000002725013577124116025502 0ustar davedave00000000000000from typing import ( Any, Callable, ContextManager, Dict, Generator, Iterable, List, Mapping, NoReturn, Optional, Sequence, Set, Tuple, TypeVar, Union, ) from click.formatting import HelpFormatter from click.parser import OptionParser _CC = TypeVar("_CC", bound=Callable[[], Any]) def invoke_param_callback( callback: Callable[[Context, Parameter, Optional[str]], Any], ctx: Context, param: Parameter, value: Optional[str] ) -> Any: ... def augment_usage_errors( ctx: Context, param: Optional[Parameter] = ... ) -> ContextManager[None]: ... def iter_params_for_processing( invocation_order: Sequence[Parameter], declaration_order: Iterable[Parameter], ) -> Iterable[Parameter]: ... class Context: parent: Optional[Context] command: Command info_name: Optional[str] params: Dict[Any, Any] args: List[str] protected_args: List[str] obj: Any default_map: Optional[Mapping[str, Any]] invoked_subcommand: Optional[str] terminal_width: Optional[int] max_content_width: Optional[int] allow_extra_args: bool allow_interspersed_args: bool ignore_unknown_options: bool help_option_names: List[str] token_normalize_func: Optional[Callable[[str], str]] resilient_parsing: bool auto_envvar_prefix: Optional[str] color: Optional[bool] _meta: Dict[str, Any] _close_callbacks: List[Any] _depth: int def __init__( self, command: Command, parent: Optional[Context] = ..., info_name: Optional[str] = ..., obj: Optional[Any] = ..., auto_envvar_prefix: Optional[str] = ..., default_map: Optional[Mapping[str, Any]] = ..., terminal_width: Optional[int] = ..., max_content_width: Optional[int] = ..., resilient_parsing: bool = ..., allow_extra_args: Optional[bool] = ..., allow_interspersed_args: Optional[bool] = ..., ignore_unknown_options: Optional[bool] = ..., help_option_names: Optional[List[str]] = ..., token_normalize_func: Optional[Callable[[str], str]] = ..., color: Optional[bool] = ... ) -> None: ... @property def meta(self) -> Dict[str, Any]: ... @property def command_path(self) -> str: ... def scope(self, cleanup: bool = ...) -> ContextManager[Context]: ... def make_formatter(self) -> HelpFormatter: ... def call_on_close(self, f: _CC) -> _CC: ... def close(self) -> None: ... def find_root(self) -> Context: ... def find_object(self, object_type: type) -> Any: ... def ensure_object(self, object_type: type) -> Any: ... def lookup_default(self, name: str) -> Any: ... def fail(self, message: str) -> NoReturn: ... def abort(self) -> NoReturn: ... def exit(self, code: Union[int, str] = ...) -> NoReturn: ... def get_usage(self) -> str: ... def get_help(self) -> str: ... def invoke(self, callback: Union[Command, Callable[..., Any]], *args, **kwargs) -> Any: ... def forward(self, callback: Union[Command, Callable[..., Any]], *args, **kwargs) -> Any: ... class BaseCommand: allow_extra_args: bool allow_interspersed_args: bool ignore_unknown_options: bool name: str context_settings: Dict[Any, Any] def __init__(self, name: str, context_settings: Optional[Dict[Any, Any]] = ...) -> None: ... def get_usage(self, ctx: Context) -> str: ... def get_help(self, ctx: Context) -> str: ... def make_context( self, info_name: str, args: List[str], parent: Optional[Context] = ..., **extra ) -> Context: ... def parse_args(self, ctx: Context, args: List[str]) -> List[str]: ... def invoke(self, ctx: Context) -> Any: ... def main( self, args: Optional[List[str]] = ..., prog_name: Optional[str] = ..., complete_var: Optional[str] = ..., standalone_mode: bool = ..., **extra ) -> Any: ... def __call__(self, *args, **kwargs) -> Any: ... class Command(BaseCommand): callback: Optional[Callable[..., Any]] params: List[Parameter] help: Optional[str] epilog: Optional[str] short_help: Optional[str] options_metavar: str add_help_option: bool hidden: bool deprecated: bool def __init__( self, name: str, context_settings: Optional[Dict[Any, Any]] = ..., callback: Optional[Callable[..., Any]] = ..., params: Optional[List[Parameter]] = ..., help: Optional[str] = ..., epilog: Optional[str] = ..., short_help: Optional[str] = ..., options_metavar: str = ..., add_help_option: bool = ..., hidden: bool = ..., deprecated: bool = ..., ) -> None: ... def get_params(self, ctx: Context) -> List[Parameter]: ... def format_usage( self, ctx: Context, formatter: HelpFormatter ) -> None: ... def collect_usage_pieces(self, ctx: Context) -> List[str]: ... def get_help_option_names(self, ctx: Context) -> Set[str]: ... def get_help_option(self, ctx: Context) -> Optional[Option]: ... def make_parser(self, ctx: Context) -> OptionParser: ... def get_short_help_str(self, limit: int = ...) -> str: ... def format_help(self, ctx: Context, formatter: HelpFormatter) -> None: ... def format_help_text(self, ctx: Context, formatter: HelpFormatter) -> None: ... def format_options(self, ctx: Context, formatter: HelpFormatter) -> None: ... def format_epilog(self, ctx: Context, formatter: HelpFormatter) -> None: ... _T = TypeVar('_T') _F = TypeVar('_F', bound=Callable[..., Any]) class MultiCommand(Command): no_args_is_help: bool invoke_without_command: bool subcommand_metavar: str chain: bool result_callback: Callable[..., Any] def __init__( self, name: Optional[str] = ..., invoke_without_command: bool = ..., no_args_is_help: Optional[bool] = ..., subcommand_metavar: Optional[str] = ..., chain: bool = ..., result_callback: Optional[Callable[..., Any]] = ..., **attrs ) -> None: ... def resultcallback( self, replace: bool = ... ) -> Callable[[_F], _F]: ... def format_commands(self, ctx: Context, formatter: HelpFormatter) -> None: ... def resolve_command( self, ctx: Context, args: List[str] ) -> Tuple[str, Command, List[str]]: ... def get_command(self, ctx: Context, cmd_name: str) -> Optional[Command]: ... def list_commands(self, ctx: Context) -> Iterable[str]: ... class Group(MultiCommand): commands: Dict[str, Command] def __init__( self, name: Optional[str] = ..., commands: Optional[Dict[str, Command]] = ..., **attrs ) -> None: ... def add_command(self, cmd: Command, name: Optional[str] = ...): ... def command(self, *args, **kwargs) -> Callable[[Callable[..., Any]], Command]: ... def group(self, *args, **kwargs) -> Callable[[Callable[..., Any]], Group]: ... class CommandCollection(MultiCommand): sources: List[MultiCommand] def __init__( self, name: Optional[str] = ..., sources: Optional[List[MultiCommand]] = ..., **attrs ) -> None: ... def add_source(self, multi_cmd: MultiCommand) -> None: ... class _ParamType: name: str is_composite: bool envvar_list_splitter: Optional[str] def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> Any: ... def get_metavar(self, param: Parameter) -> str: ... def get_missing_message(self, param: Parameter) -> str: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> Any: ... def split_envvar_value(self, rv: str) -> List[str]: ... def fail(self, message: str, param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> NoReturn: ... # This type is here to resolve https://github.com/python/mypy/issues/5275 _ConvertibleType = Union[type, _ParamType, Tuple[Union[type, _ParamType], ...], Callable[[str], Any], Callable[[Optional[str]], Any]] class Parameter: param_type_name: str name: str opts: List[str] secondary_opts: List[str] type: _ParamType required: bool callback: Optional[Callable[[Context, Parameter, str], Any]] nargs: int multiple: bool expose_value: bool default: Any is_eager: bool metavar: Optional[str] envvar: Union[str, List[str], None] def __init__( self, param_decls: Optional[List[str]] = ..., type: Optional[_ConvertibleType] = ..., required: bool = ..., default: Optional[Any] = ..., callback: Optional[Callable[[Context, Parameter, str], Any]] = ..., nargs: Optional[int] = ..., metavar: Optional[str] = ..., expose_value: bool = ..., is_eager: bool = ..., envvar: Optional[Union[str, List[str]]] = ... ) -> None: ... @property def human_readable_name(self) -> str: ... def make_metavar(self) -> str: ... def get_default(self, ctx: Context) -> Any: ... def add_to_parser(self, parser: OptionParser, ctx: Context) -> None: ... def consume_value(self, ctx: Context, opts: Dict[str, Any]) -> Any: ... def type_cast_value(self, ctx: Context, value: Any) -> Any: ... def process_value(self, ctx: Context, value: Any) -> Any: ... def value_is_missing(self, value: Any) -> bool: ... def full_process_value(self, ctx: Context, value: Any) -> Any: ... def resolve_envvar_value(self, ctx: Context) -> str: ... def value_from_envvar(self, ctx: Context) -> Union[str, List[str]]: ... def handle_parse_result( self, ctx: Context, opts: Dict[str, Any], args: List[str] ) -> Tuple[Any, List[str]]: ... def get_help_record(self, ctx: Context) -> Tuple[str, str]: ... def get_usage_pieces(self, ctx: Context) -> List[str]: ... def get_error_hint(self, ctx: Context) -> str: ... class Option(Parameter): prompt: str # sic confirmation_prompt: bool hide_input: bool is_flag: bool flag_value: Any is_bool_flag: bool count: bool multiple: bool allow_from_autoenv: bool help: Optional[str] hidden: bool show_default: bool show_choices: bool show_envvar: bool def __init__( self, param_decls: Optional[List[str]] = ..., show_default: bool = ..., prompt: Union[bool, str] = ..., confirmation_prompt: bool = ..., hide_input: bool = ..., is_flag: Optional[bool] = ..., flag_value: Optional[Any] = ..., multiple: bool = ..., count: bool = ..., allow_from_autoenv: bool = ..., type: Optional[_ConvertibleType] = ..., help: Optional[str] = ..., hidden: bool = ..., show_choices: bool = ..., show_envvar: bool = ..., **attrs ) -> None: ... def prompt_for_value(self, ctx: Context) -> Any: ... class Argument(Parameter): def __init__( self, param_decls: Optional[List[str]] = ..., required: Optional[bool] = ..., **attrs ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/globals.pyi0000664000175000017500000000045013577124116026166 0ustar davedave00000000000000from click.core import Context from typing import Optional def get_current_context(silent: bool = ...) -> Context: ... def push_context(ctx: Context) -> None: ... def pop_context() -> None: ... def resolve_color_default(color: Optional[bool] = ...) -> Optional[bool]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/utils.pyi0000664000175000017500000000357313577124116025714 0ustar davedave00000000000000from typing import Any, AnyStr, Callable, Generic, Iterator, IO, List, Optional, TypeVar, Union, Text _T = TypeVar('_T') def _posixify(name: str) -> str: ... def safecall(func: _T) -> _T: ... def make_str(value: Any) -> str: ... def make_default_short_help(help: str, max_length: int = ...): ... class LazyFile(object): name: str mode: str encoding: Optional[str] errors: str atomic: bool def __init__( self, filename: str, mode: str = ..., encoding: Optional[str] = ..., errors: str = ..., atomic: bool = ... ) -> None: ... def open(self) -> IO[Any]: ... def close(self) -> None: ... def close_intelligently(self) -> None: ... def __enter__(self) -> LazyFile: ... def __exit__(self, exc_type, exc_value, tb): ... def __iter__(self) -> Iterator[Any]: ... class KeepOpenFile(Generic[AnyStr]): _file: IO[AnyStr] def __init__(self, file: IO[AnyStr]) -> None: ... def __enter__(self) -> KeepOpenFile[AnyStr]: ... def __exit__(self, exc_type, exc_value, tb): ... def __iter__(self) -> Iterator[AnyStr]: ... def echo( message: object = ..., file: Optional[IO[Text]] = ..., nl: bool = ..., err: bool = ..., color: Optional[bool] = ..., ) -> None: ... def get_binary_stream(name: str) -> IO[bytes]: ... def get_text_stream( name: str, encoding: Optional[str] = ..., errors: str = ... ) -> IO[str]: ... def open_file( filename: str, mode: str = ..., encoding: Optional[str] = ..., errors: str = ..., lazy: bool = ..., atomic: bool = ... ) -> Any: ... # really Union[IO, LazyFile, KeepOpenFile] def get_os_args() -> List[str]: ... def format_filename(filename: str, shorten: bool = ...) -> str: ... def get_app_dir( app_name: str, roaming: bool = ..., force_posix: bool = ... ) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/formatting.pyi0000664000175000017500000000311713577124116026720 0ustar davedave00000000000000from typing import ContextManager, Generator, Iterable, List, Optional, Tuple FORCED_WIDTH: Optional[int] def measure_table(rows: Iterable[Iterable[str]]) -> Tuple[int, ...]: ... def iter_rows( rows: Iterable[Iterable[str]], col_count: int ) -> Generator[Tuple[str, ...], None, None]: ... def wrap_text( text: str, width: int = ..., initial_indent: str = ..., subsequent_indent: str = ..., preserve_paragraphs: bool = ... ) -> str: ... class HelpFormatter: indent_increment: int width: Optional[int] current_indent: int buffer: List[str] def __init__( self, indent_increment: int = ..., width: Optional[int] = ..., max_width: Optional[int] = ..., ) -> None: ... def write(self, string: str) -> None: ... def indent(self) -> None: ... def dedent(self) -> None: ... def write_usage( self, prog: str, args: str = ..., prefix: str = ..., ): ... def write_heading(self, heading: str) -> None: ... def write_paragraph(self) -> None: ... def write_text(self, text: str) -> None: ... def write_dl( self, rows: Iterable[Iterable[str]], col_max: int = ..., col_spacing: int = ..., ) -> None: ... def section(self, name) -> ContextManager[None]: ... def indentation(self) -> ContextManager[None]: ... def getvalue(self) -> str: ... def join_options(options: List[str]) -> Tuple[str, bool]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/_termui_impl.pyi0000664000175000017500000000073413577124116027235 0ustar davedave00000000000000from typing import ContextManager, Iterator, Generic, TypeVar, Optional _T = TypeVar("_T") class ProgressBar(object, Generic[_T]): def update(self, n_steps: int) -> None: ... def finish(self) -> None: ... def __enter__(self) -> ProgressBar[_T]: ... def __exit__(self, exc_type, exc_value, tb) -> None: ... def __iter__(self) -> ProgressBar[_T]: ... def next(self) -> _T: ... def __next__(self) -> _T: ... length: Optional[int] label: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/exceptions.pyi0000664000175000017500000000402413577124116026725 0ustar davedave00000000000000from typing import IO, List, Optional, Any from click.core import Context, Parameter class ClickException(Exception): exit_code: int message: str def __init__(self, message: str) -> None: ... def format_message(self) -> str: ... def show(self, file: Optional[Any] = ...) -> None: ... class UsageError(ClickException): ctx: Optional[Context] def __init__(self, message: str, ctx: Optional[Context] = ...) -> None: ... def show(self, file: Optional[IO[Any]] = ...) -> None: ... class BadParameter(UsageError): param: Optional[Parameter] param_hint: Optional[str] def __init__( self, message: str, ctx: Optional[Context] = ..., param: Optional[Parameter] = ..., param_hint: Optional[str] = ... ) -> None: ... class MissingParameter(BadParameter): param_type: str # valid values: 'parameter', 'option', 'argument' def __init__( self, message: Optional[str] = ..., ctx: Optional[Context] = ..., param: Optional[Parameter] = ..., param_hint: Optional[str] = ..., param_type: Optional[str] = ... ) -> None: ... class NoSuchOption(UsageError): option_name: str possibilities: Optional[List[str]] def __init__( self, option_name: str, message: Optional[str] = ..., possibilities: Optional[List[str]] = ..., ctx: Optional[Context] = ... ) -> None: ... class BadOptionUsage(UsageError): def __init__(self, option_name: str, message: str, ctx: Optional[Context] = ...) -> None: ... class BadArgumentUsage(UsageError): def __init__(self, message: str, ctx: Optional[Context] = ...) -> None: ... class FileError(ClickException): ui_filename: str filename: str def __init__(self, filename: str, hint: Optional[str] = ...) -> None: ... class Abort(RuntimeError): ... class Exit(RuntimeError): def __init__(self, code: int = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/parser.pyi0000664000175000017500000000413513577124116026043 0ustar davedave00000000000000from typing import Any, Dict, Iterable, List, Optional, Set, Tuple from click.core import Context def _unpack_args( args: Iterable[str], nargs_spec: Iterable[int] ) -> Tuple[Tuple[Optional[Tuple[str, ...]], ...], List[str]]: ... def split_opt(opt: str) -> Tuple[str, str]: ... def normalize_opt(opt: str, ctx: Context) -> str: ... def split_arg_string(string: str) -> List[str]: ... class Option: dest: str action: str nargs: int const: Any obj: Any prefixes: Set[str] _short_opts: List[str] _long_opts: List[str] def __init__( self, opts: Iterable[str], dest: str, action: Optional[str] = ..., nargs: int = ..., const: Optional[Any] = ..., obj: Optional[Any] = ... ) -> None: ... @property def takes_value(self) -> bool: ... def process(self, value: Any, state: ParsingState) -> None: ... class Argument: dest: str nargs: int obj: Any def __init__(self, dest: str, nargs: int = ..., obj: Optional[Any] = ...) -> None: ... def process(self, value: Any, state: ParsingState) -> None: ... class ParsingState: opts: Dict[str, Any] largs: List[str] rargs: List[str] order: List[Any] def __init__(self, rargs: List[str]) -> None: ... class OptionParser: ctx: Optional[Context] allow_interspersed_args: bool ignore_unknown_options: bool _short_opt: Dict[str, Option] _long_opt: Dict[str, Option] _opt_prefixes: Set[str] _args: List[Argument] def __init__(self, ctx: Optional[Context] = ...) -> None: ... def add_option( self, opts: Iterable[str], dest: str, action: Optional[str] = ..., nargs: int = ..., const: Optional[Any] = ..., obj: Optional[Any] = ... ) -> None: ... def add_argument(self, dest: str, nargs: int = ..., obj: Optional[Any] = ...) -> None: ... def parse_args( self, args: List[str] ) -> Tuple[Dict[str, Any], List[str], List[Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/types.pyi0000664000175000017500000001257613577124116025723 0ustar davedave00000000000000from typing import Any, Callable, Generic, IO, Iterable, List, Optional, TypeVar, Union, Tuple as _PyTuple, Type import datetime import uuid from click.core import Context, Parameter, _ParamType as ParamType, _ConvertibleType class BoolParamType(ParamType): def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> bool: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> bool: ... class CompositeParamType(ParamType): arity: int class Choice(ParamType): choices: Iterable[str] def __init__( self, choices: Iterable[str], case_sensitive: bool = ..., ) -> None: ... class DateTime(ParamType): def __init__( self, formats: Optional[List[str]] = ..., ) -> None: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> datetime.datetime: ... class FloatParamType(ParamType): def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> float: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> float: ... class FloatRange(FloatParamType): def __init__( self, min: Optional[float] = ..., max: Optional[float] = ..., clamp: bool = ..., ) -> None: ... class File(ParamType): def __init__( self, mode: str = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., lazy: Optional[bool] = ..., atomic: Optional[bool] = ..., ) -> None: ... def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> IO[Any]: ... def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> IO[Any]: ... def resolve_lazy_flag(self, value: str) -> bool: ... _F = TypeVar('_F') # result of the function _Func = Callable[[Optional[str]], _F] class FuncParamType(ParamType, Generic[_F]): func: _Func[_F] def __init__(self, func: _Func[_F]) -> None: ... def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> _F: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> _F: ... class IntParamType(ParamType): def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> int: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> int: ... class IntRange(IntParamType): def __init__( self, min: Optional[int] = ..., max: Optional[int] = ..., clamp: bool = ... ) -> None: ... _PathType = TypeVar('_PathType', str, bytes) class Path(ParamType): def __init__( self, exists: bool = ..., file_okay: bool = ..., dir_okay: bool = ..., writable: bool = ..., readable: bool = ..., resolve_path: bool = ..., allow_dash: bool = ..., path_type: Optional[Type[_PathType]] = ..., ) -> None: ... def coerce_path_result(self, rv: Union[str, bytes]) -> _PathType: ... def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> _PathType: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> _PathType: ... class StringParamType(ParamType): def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> str: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> str: ... class Tuple(CompositeParamType): types: List[ParamType] def __init__(self, types: Iterable[Any]) -> None: ... def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> Tuple: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> Tuple: ... class UnprocessedParamType(ParamType): ... class UUIDParameterType(ParamType): def __call__( self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ..., ) -> uuid.UUID: ... def convert( self, value: str, param: Optional[Parameter], ctx: Optional[Context], ) -> uuid.UUID: ... def convert_type(ty: Optional[_ConvertibleType], default: Optional[Any] = ...) -> ParamType: ... # parameter type shortcuts BOOL: BoolParamType FLOAT: FloatParamType INT: IntParamType STRING: StringParamType UNPROCESSED: UnprocessedParamType UUID: UUIDParameterType jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/click/termui.pyi0000664000175000017500000000665513577124116026065 0ustar davedave00000000000000from typing import ( Any, Callable, Generator, Iterable, IO, List, Optional, Text, overload, Text, Tuple, TypeVar, Union, ) from click.core import _ConvertibleType from click._termui_impl import ProgressBar as _ProgressBar def hidden_prompt_func(prompt: str) -> str: ... def _build_prompt( text: str, suffix: str, show_default: bool = ..., default: Optional[str] = ..., ) -> str: ... def prompt( text: str, default: Optional[str] = ..., hide_input: bool = ..., confirmation_prompt: bool = ..., type: Optional[_ConvertibleType] = ..., value_proc: Optional[Callable[[Optional[str]], Any]] = ..., prompt_suffix: str = ..., show_default: bool = ..., err: bool = ..., show_choices: bool = ..., ) -> Any: ... def confirm( text: str, default: bool = ..., abort: bool = ..., prompt_suffix: str = ..., show_default: bool = ..., err: bool = ..., ) -> bool: ... def get_terminal_size() -> Tuple[int, int]: ... def echo_via_pager( text_or_generator: Union[str, Iterable[str], Callable[[], Generator[str, None, None]]], color: Optional[bool] = ..., ) -> None: ... _T = TypeVar('_T') @overload def progressbar( iterable: Iterable[_T], length: Optional[int] = ..., label: Optional[str] = ..., show_eta: bool = ..., show_percent: Optional[bool] = ..., show_pos: bool = ..., item_show_func: Optional[Callable[[_T], str]] = ..., fill_char: str = ..., empty_char: str = ..., bar_template: str = ..., info_sep: str = ..., width: int = ..., file: Optional[IO[Any]] = ..., color: Optional[bool] = ..., ) -> _ProgressBar[_T]: ... @overload def progressbar( iterable: None = ..., length: Optional[int] = ..., label: Optional[str] = ..., show_eta: bool = ..., show_percent: Optional[bool] = ..., show_pos: bool = ..., item_show_func: Optional[Callable[[_T], str]] = ..., fill_char: str = ..., empty_char: str = ..., bar_template: str = ..., info_sep: str = ..., width: int = ..., file: Optional[IO[Any]] = ..., color: Optional[bool] = ..., ) -> _ProgressBar[int]: ... def clear() -> None: ... def style( text: Text, fg: Optional[str] = ..., bg: Optional[str] = ..., bold: Optional[bool] = ..., dim: Optional[bool] = ..., underline: Optional[bool] = ..., blink: Optional[bool] = ..., reverse: Optional[bool] = ..., reset: bool = ..., ) -> str: ... def unstyle(text: Text) -> str: ... # Styling options copied from style() for nicer type checking. def secho( message: Optional[str] = ..., file: Optional[IO[Any]] = ..., nl: bool = ..., err: bool = ..., color: Optional[bool] = ..., fg: Optional[str] = ..., bg: Optional[str] = ..., bold: Optional[bool] = ..., dim: Optional[bool] = ..., underline: Optional[bool] = ..., blink: Optional[bool] = ..., reverse: Optional[bool] = ..., reset: bool = ..., ): ... def edit( text: Optional[str] = ..., editor: Optional[str] = ..., env: Optional[str] = ..., require_save: bool = ..., extension: str = ..., filename: Optional[str] = ..., ) -> str: ... def launch(url: str, wait: bool = ..., locate: bool = ...) -> int: ... def getchar(echo: bool = ...) -> Text: ... def pause( info: str = ..., err: bool = ... ) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/redis/0000775000175000017500000000000013577125145024045 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/redis/__init__.pyi0000664000175000017500000000154413577124116026330 0ustar davedave00000000000000from . import client from . import connection from . import utils from . import exceptions Redis = client.Redis StrictRedis = client.StrictRedis BlockingConnectionPool = connection.BlockingConnectionPool ConnectionPool = connection.ConnectionPool Connection = connection.Connection SSLConnection = connection.SSLConnection UnixDomainSocketConnection = connection.UnixDomainSocketConnection from_url = utils.from_url AuthenticationError = exceptions.AuthenticationError BusyLoadingError = exceptions.BusyLoadingError ConnectionError = exceptions.ConnectionError DataError = exceptions.DataError InvalidResponse = exceptions.InvalidResponse PubSubError = exceptions.PubSubError ReadOnlyError = exceptions.ReadOnlyError RedisError = exceptions.RedisError ResponseError = exceptions.ResponseError TimeoutError = exceptions.TimeoutError WatchError = exceptions.WatchError jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/redis/connection.pyi0000664000175000017500000001007113577124116026723 0ustar davedave00000000000000from typing import Any, Text, Optional ssl_available: Any hiredis_version: Any HIREDIS_SUPPORTS_CALLABLE_ERRORS: Any HIREDIS_SUPPORTS_BYTE_BUFFER: Any msg: Any HIREDIS_USE_BYTE_BUFFER: Any SYM_STAR: Any SYM_DOLLAR: Any SYM_CRLF: Any SYM_EMPTY: Any SERVER_CLOSED_CONNECTION_ERROR: Any class Token: value: Any def __init__(self, value) -> None: ... class BaseParser: EXCEPTION_CLASSES: Any def parse_error(self, response): ... class SocketBuffer: socket_read_size: Any bytes_written: Any bytes_read: Any def __init__(self, socket, socket_read_size) -> None: ... @property def length(self): ... def read(self, length): ... def readline(self): ... def purge(self): ... def close(self): ... class PythonParser(BaseParser): encoding: Any socket_read_size: Any def __init__(self, socket_read_size) -> None: ... def __del__(self): ... def on_connect(self, connection): ... def on_disconnect(self): ... def can_read(self): ... def read_response(self): ... class HiredisParser(BaseParser): socket_read_size: Any def __init__(self, socket_read_size) -> None: ... def __del__(self): ... def on_connect(self, connection): ... def on_disconnect(self): ... def can_read(self): ... def read_response(self): ... DefaultParser: Any class Connection: description_format: Any pid: Any host: Any port: Any db: Any password: Any socket_timeout: Any socket_connect_timeout: Any socket_keepalive: Any socket_keepalive_options: Any retry_on_timeout: Any encoding: Any encoding_errors: Any decode_responses: Any def __init__(self, host=..., port=..., db=..., password=..., socket_timeout=..., socket_connect_timeout=..., socket_keepalive=..., socket_keepalive_options=..., retry_on_timeout=..., encoding=..., encoding_errors=..., decode_responses=..., parser_class=..., socket_read_size=...) -> None: ... def __del__(self): ... def register_connect_callback(self, callback): ... def clear_connect_callbacks(self): ... def connect(self): ... def on_connect(self): ... def disconnect(self): ... def send_packed_command(self, command): ... def send_command(self, *args): ... def can_read(self): ... def read_response(self): ... def encode(self, value): ... def pack_command(self, *args): ... def pack_commands(self, commands): ... class SSLConnection(Connection): description_format: Any keyfile: Any certfile: Any cert_reqs: Any ca_certs: Any def __init__(self, ssl_keyfile=..., ssl_certfile=..., ssl_cert_reqs=..., ssl_ca_certs=..., **kwargs) -> None: ... class UnixDomainSocketConnection(Connection): description_format: Any pid: Any path: Any db: Any password: Any socket_timeout: Any retry_on_timeout: Any encoding: Any encoding_errors: Any decode_responses: Any def __init__(self, path=..., db=..., password=..., socket_timeout=..., encoding=..., encoding_errors=..., decode_responses=..., retry_on_timeout=..., parser_class=..., socket_read_size=...) -> None: ... class ConnectionPool: @classmethod def from_url(cls, url: Text, db: Optional[int] = ..., **kwargs) -> ConnectionPool: ... connection_class: Any connection_kwargs: Any max_connections: Any def __init__(self, connection_class=..., max_connections=..., **connection_kwargs) -> None: ... pid: Any def reset(self): ... def get_connection(self, command_name, *keys, **options): ... def make_connection(self): ... def release(self, connection): ... def disconnect(self): ... class BlockingConnectionPool(ConnectionPool): queue_class: Any timeout: Any def __init__(self, max_connections=..., timeout=..., connection_class=..., queue_class=..., **connection_kwargs) -> None: ... pid: Any pool: Any def reset(self): ... def make_connection(self): ... def get_connection(self, command_name, *keys, **options): ... def release(self, connection): ... def disconnect(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/redis/utils.pyi0000664000175000017500000000021013577124116025716 0ustar davedave00000000000000from typing import Any HIREDIS_AVAILABLE: Any def from_url(url, db=..., **kwargs): ... def pipeline(redis_obj): ... class dummy: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/redis/exceptions.pyi0000664000175000017500000000107113577124116026745 0ustar davedave00000000000000class RedisError(Exception): ... def __unicode__(self): ... class AuthenticationError(RedisError): ... class ConnectionError(RedisError): ... class TimeoutError(RedisError): ... class BusyLoadingError(ConnectionError): ... class InvalidResponse(RedisError): ... class ResponseError(RedisError): ... class DataError(RedisError): ... class PubSubError(RedisError): ... class WatchError(RedisError): ... class NoScriptError(ResponseError): ... class ExecAbortError(ResponseError): ... class ReadOnlyError(ResponseError): ... class LockError(RedisError, ValueError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/redis/client.pyi0000664000175000017500000003555313577124116026056 0ustar davedave00000000000000from datetime import timedelta from typing import Any, Iterable, Text, Optional, Mapping, Tuple, Union, Callable, List, Dict from .connection import ConnectionPool SYM_EMPTY: Any def list_or_args(keys, args): ... def timestamp_to_datetime(response): ... def string_keys_to_dict(key_string, callback): ... def dict_merge(*dicts): ... def parse_debug_object(response): ... def parse_object(response, infotype): ... def parse_info(response): ... SENTINEL_STATE_TYPES: Any def parse_sentinel_state(item): ... def parse_sentinel_master(response): ... def parse_sentinel_masters(response): ... def parse_sentinel_slaves_and_sentinels(response): ... def parse_sentinel_get_master(response): ... def pairs_to_dict(response): ... def pairs_to_dict_typed(response, type_info): ... def zset_score_pairs(response, **options): ... def sort_return_tuples(response, **options): ... def int_or_none(response): ... def float_or_none(response): ... def bool_ok(response): ... def parse_client_list(response, **options): ... def parse_config_get(response, **options): ... def parse_scan(response, **options): ... def parse_hscan(response, **options): ... def parse_zscan(response, **options): ... def parse_slowlog_get(response, **options): ... _Str = Union[bytes, float, int, Text] class Redis(object): RESPONSE_CALLBACKS: Any @classmethod def from_url(cls, url: Text, db: Optional[int] = ..., **kwargs) -> Redis: ... connection_pool: Any response_callbacks: Any def __init__( self, host: Text = ..., port: int = ..., db: int = ..., password: Optional[Text] = ..., socket_timeout: Optional[float] = ..., socket_connect_timeout: Optional[float] = ..., socket_keepalive: Optional[bool] = ..., socket_keepalive_options: Optional[Mapping[str, Union[int, str]]] = ..., connection_pool: Optional[ConnectionPool] = ..., unix_socket_path: Optional[Text] = ..., encoding: Text = ..., encoding_errors: Text = ..., charset: Optional[Text] = ..., errors: Optional[Text] = ..., decode_responses: bool = ..., retry_on_timeout: bool = ..., ssl: bool = ..., ssl_keyfile: Optional[Text] = ..., ssl_certfile: Optional[Text] = ..., ssl_cert_reqs: Optional[Union[str, int]] = ..., ssl_ca_certs: Optional[Text] = ..., max_connections: Optional[int] = ..., ) -> None: ... def set_response_callback(self, command, callback): ... def pipeline(self, transaction=..., shard_hint=...): ... def transaction(self, func, *watches, **kwargs): ... def lock(self, name, timeout=..., sleep=..., blocking_timeout=..., lock_class=..., thread_local=...): ... def pubsub(self, shard_hint: Any = ..., ignore_subscribe_messages: bool = ...) -> PubSub: ... def execute_command(self, *args, **options): ... def parse_response(self, connection, command_name, **options): ... def bgrewriteaof(self): ... def bgsave(self): ... def client_kill(self, address): ... def client_list(self): ... def client_getname(self): ... def client_setname(self, name): ... def config_get(self, pattern=...): ... def config_set(self, name, value): ... def config_resetstat(self): ... def config_rewrite(self): ... def dbsize(self) -> int: ... def debug_object(self, key): ... def echo(self, value): ... def flushall(self) -> bool: ... def flushdb(self) -> bool: ... def info(self, section: Optional[Text] = ...) -> Mapping[str, Any]: ... def lastsave(self): ... def object(self, infotype, key): ... def ping(self) -> bool: ... def save(self) -> bool: ... def sentinel(self, *args): ... def sentinel_get_master_addr_by_name(self, service_name): ... def sentinel_master(self, service_name): ... def sentinel_masters(self): ... def sentinel_monitor(self, name, ip, port, quorum): ... def sentinel_remove(self, name): ... def sentinel_sentinels(self, service_name): ... def sentinel_set(self, name, option, value): ... def sentinel_slaves(self, service_name): ... def shutdown(self): ... def slaveof(self, host=..., port=...): ... def slowlog_get(self, num=...): ... def slowlog_len(self): ... def slowlog_reset(self): ... def time(self): ... def append(self, key, value): ... def bitcount(self, key, start=..., end=...): ... def bitop(self, operation, dest, *keys): ... def bitpos(self, key, bit, start=..., end=...): ... def decr(self, name, amount=...): ... def delete(self, *names: Text): ... def __delitem__(self, name): ... def dump(self, name): ... def exists(self, *names: Text) -> int: ... __contains__: Any def expire(self, name: Union[Text, bytes], time: Union[int, timedelta]) -> bool: ... def expireat(self, name, when): ... def get(self, name: Union[Text, bytes]) -> Optional[bytes]: ... def __getitem__(self, name): ... def getbit(self, name, offset): ... def getrange(self, key, start, end): ... def getset(self, name, value): ... def incr(self, name, amount=...): ... def incrby(self, name, amount=...): ... def incrbyfloat(self, name, amount=...): ... def keys(self, pattern=...): ... def mget(self, keys, *args): ... def mset(self, *args, **kwargs): ... def msetnx(self, *args, **kwargs): ... def move(self, name, db): ... def persist(self, name): ... def pexpire(self, name, time): ... def pexpireat(self, name, when): ... def psetex(self, name, time_ms, value): ... def pttl(self, name): ... def randomkey(self): ... def rename(self, src, dst): ... def renamenx(self, src, dst): ... def restore(self, name, ttl, value): ... def set( self, name: Union[Text, bytes], value: _Str, ex: Union[None, int, timedelta] = ..., px: Union[None, int, timedelta] = ..., nx: bool = ..., xx: bool = ..., ) -> Optional[bool]: ... def __setitem__(self, name, value): ... def setbit(self, name, offset, value): ... def setex(self, name, time, value): ... def setnx(self, name, value): ... def setrange(self, name, offset, value): ... def strlen(self, name): ... def substr(self, name, start, end=...): ... def ttl(self, name): ... def type(self, name): ... def watch(self, *names): ... def unwatch(self): ... def blpop(self, keys: Union[_Str, Iterable[_Str]], timeout: int = ...) -> Optional[Tuple[bytes, bytes]]: ... def brpop(self, keys: Union[_Str, Iterable[_Str]], timeout: int = ...) -> Optional[Tuple[bytes, bytes]]: ... def brpoplpush(self, src, dst, timeout=...): ... def lindex(self, name, index): ... def linsert(self, name, where, refvalue, value): ... def llen(self, name): ... def lpop(self, name): ... def lpush(self, name: _Str, *values: _Str) -> int: ... def lpushx(self, name, value): ... def lrange(self, name, start, end): ... def lrem(self, name, count, value): ... def lset(self, name, index, value): ... def ltrim(self, name, start, end): ... def rpop(self, name): ... def rpoplpush(self, src, dst): ... def rpush(self, name: _Str, *values: _Str) -> int: ... def rpushx(self, name, value): ... def sort(self, name, start=..., num=..., by=..., get=..., desc=..., alpha=..., store=..., groups=...): ... def scan(self, cursor: int = ..., match: Optional[Text] = ..., count: Optional[int] = ...) -> List[Text]: ... def scan_iter(self, match: Optional[Text] = ..., count: Optional[int] = ...) -> List[Text]: ... def sscan(self, name, cursor=..., match=..., count=...): ... def sscan_iter(self, name, match=..., count=...): ... def hscan(self, name, cursor=..., match=..., count=...): ... def hscan_iter(self, name, match=..., count=...): ... def zscan(self, name, cursor=..., match=..., count=..., score_cast_func=...): ... def zscan_iter(self, name, match=..., count=..., score_cast_func=...): ... def sadd(self, name, *values): ... def scard(self, name): ... def sdiff(self, keys, *args): ... def sdiffstore(self, dest, keys, *args): ... def sinter(self, keys, *args): ... def sinterstore(self, dest, keys, *args): ... def sismember(self, name, value): ... def smembers(self, name): ... def smove(self, src, dst, value): ... def spop(self, name): ... def srandmember(self, name, number=...): ... def srem(self, name, *values): ... def sunion(self, keys, *args): ... def sunionstore(self, dest, keys, *args): ... def xack(self, name, groupname, *ids): ... def xadd(self, name, fields, id=..., maxlen=..., approximate=...): ... def xclaim( self, name, groupname, consumername, min_idle_time, message_ids, idle=..., time=..., retrycount=..., force=..., justid=..., ): ... def xdel(self, name, *ids): ... def xgroup_create(self, name, groupname, id=..., mkstream=...): ... def xgroup_delconsumer(self, name, groupname, consumername): ... def xgroup_destroy(self, name, groupname): ... def xgroup_setid(self, name, groupname, id): ... def xinfo_consumers(self, name, groupname): ... def xinfo_groups(self, name): ... def xinfo_stream(self, name): ... def xlen(self, name): ... def xpending(self, name, groupname): ... def xpending_range(self, name, groupname, min, max, count, consumername=...): ... def xrange(self, name, min=..., max=..., count=...): ... def xread(self, streams, count=..., block=...): ... def xreadgroup(self, groupname, consumername, streams, count=..., block=..., noack=...): ... def xrevrange(self, name, max=..., min=..., count=...): ... def xtrim(self, name, maxlen, approximate=...): ... def zadd(self, name, mapping, nx: bool = ..., xx: bool = ..., ch: bool = ..., incr: bool = ...): ... def zcard(self, name): ... def zcount(self, name, min, max): ... def zincrby(self, name, value, amount=...): ... def zinterstore(self, dest, keys, aggregate=...): ... def zlexcount(self, name, min, max): ... def zrange(self, name, start, end, desc=..., withscores=..., score_cast_func=...): ... def zrangebylex(self, name, min, max, start=..., num=...): ... def zrangebyscore(self, name, min, max, start=..., num=..., withscores=..., score_cast_func=...): ... def zrank(self, name, value): ... def zrem(self, name, *values): ... def zremrangebylex(self, name, min, max): ... def zremrangebyrank(self, name, min, max): ... def zremrangebyscore(self, name, min, max): ... def zrevrange(self, name, start, end, withscores=..., score_cast_func=...): ... def zrevrangebyscore(self, name, max, min, start=..., num=..., withscores=..., score_cast_func=...): ... def zrevrank(self, name, value): ... def zscore(self, name, value): ... def zunionstore(self, dest, keys, aggregate=...): ... def pfadd(self, name, *values): ... def pfcount(self, name): ... def pfmerge(self, dest, *sources): ... def hdel(self, name, *keys): ... def hexists(self, name, key): ... def hget(self, name, key): ... def hgetall(self, name): ... def hincrby(self, name, key, amount=...): ... def hincrbyfloat(self, name, key, amount=...): ... def hkeys(self, name): ... def hlen(self, name): ... def hset(self, name, key, value): ... def hsetnx(self, name, key, value): ... def hmset(self, name, mapping): ... def hmget(self, name, keys, *args): ... def hvals(self, name): ... def publish(self, channel: Text, message: _Str) -> int: ... def eval(self, script, numkeys, *keys_and_args): ... def evalsha(self, sha, numkeys, *keys_and_args): ... def script_exists(self, *args): ... def script_flush(self): ... def script_kill(self): ... def script_load(self, script): ... def register_script(self, script): ... def pubsub_channels(self, pattern: Text = ...) -> List[Text]: ... def pubsub_numsub(self, *args: Text) -> List[Tuple[Text, int]]: ... def pubsub_numpat(self) -> int: ... def monitor(self) -> Monitor: ... StrictRedis = Redis class PubSub: PUBLISH_MESSAGE_TYPES: Any UNSUBSCRIBE_MESSAGE_TYPES: Any connection_pool: Any shard_hint: Any ignore_subscribe_messages: Any connection: Any encoding: Any encoding_errors: Any decode_responses: Any def __init__(self, connection_pool, shard_hint=..., ignore_subscribe_messages=...) -> None: ... def __del__(self): ... channels: Any patterns: Any def reset(self): ... def close(self) -> None: ... def on_connect(self, connection): ... def encode(self, value): ... @property def subscribed(self): ... def execute_command(self, *args, **kwargs): ... def parse_response(self, block=...): ... def psubscribe(self, *args: Text, **kwargs: Callable[[Any], None]): ... def punsubscribe(self, *args: Text) -> None: ... def subscribe(self, *args: Text, **kwargs: Callable[[Any], None]) -> None: ... def unsubscribe(self, *args: Text) -> None: ... def listen(self): ... def get_message(self, ignore_subscribe_messages: bool = ..., timeout: float = ...) -> Optional[Dict[str, Any]]: ... def handle_message(self, response, ignore_subscribe_messages: bool = ...) -> Optional[Dict[str, Any]]: ... def run_in_thread(self, sleep_time=...): ... class BasePipeline: UNWATCH_COMMANDS: Any connection_pool: Any connection: Any response_callbacks: Any transaction: Any shard_hint: Any watching: Any def __init__(self, connection_pool, response_callbacks, transaction, shard_hint) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, traceback): ... def __del__(self): ... def __len__(self): ... command_stack: Any scripts: Any explicit_transaction: Any def reset(self): ... def multi(self): ... def execute_command(self, *args, **kwargs): ... def immediate_execute_command(self, *args, **options): ... def pipeline_execute_command(self, *args, **options): ... def raise_first_error(self, commands, response): ... def annotate_exception(self, exception, number, command): ... def parse_response(self, connection, command_name, **options): ... def load_scripts(self): ... def execute(self, raise_on_error=...): ... def watch(self, *names): ... def unwatch(self): ... def script_load_for_pipeline(self, script): ... class StrictPipeline(BasePipeline, StrictRedis): ... class Pipeline(BasePipeline, Redis): ... class Script: registered_client: Any script: Any sha: Any def __init__(self, registered_client, script) -> None: ... def __call__(self, keys=..., args=..., client=...): ... class Monitor(object): def __init__(self, connection_pool) -> None: ... def __enter__(self) -> Monitor: ... def __exit__(self, *args: Any) -> None: ... def next_command(self) -> Dict[Text, Any]: ... def listen(self) -> Iterable[Dict[Text, Any]]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/toml.pyi0000664000175000017500000000146013577124116024433 0ustar davedave00000000000000from typing import Any, IO, List, Mapping, MutableMapping, Optional, Protocol, Text, Type, Union import datetime import sys if sys.version_info >= (3, 4): import pathlib if sys.version_info >= (3, 6): import os _PathLike = Union[Text, pathlib.PurePath, os.PathLike] else: _PathLike = Union[Text, pathlib.PurePath] else: _PathLike = Text class _Writable(Protocol): def write(self, obj: str) -> Any: ... class TomlDecodeError(Exception): ... def load(f: Union[_PathLike, List[Text], IO[str]], _dict: Type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ... def loads(s: Text, _dict: Type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ... def dump(o: Mapping[str, Any], f: _Writable) -> str: ... def dumps(o: Mapping[str, Any]) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/0000775000175000017500000000000013577125145023701 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/__init__.pyi0000664000175000017500000001271013577124116026161 0ustar davedave00000000000000from typing import Any, IO, Iterator, Optional, overload, Sequence, Text, Union import sys from yaml.error import * # noqa: F403 from yaml.tokens import * # noqa: F403 from yaml.events import * # noqa: F403 from yaml.nodes import * # noqa: F403 from yaml.loader import * # noqa: F403 from yaml.dumper import * # noqa: F403 from . import resolver # Help mypy a bit; this is implied by loader and dumper from .cyaml import * if sys.version_info < (3,): _Str = Union[Text, str] else: _Str = str # FIXME: the functions really return py2:unicode/py3:str if encoding is None, otherwise py2:str/py3:bytes. Waiting for python/mypy#5621 _Yaml = Any __with_libyaml__: Any __version__: str def scan(stream, Loader=...): ... def parse(stream, Loader=...): ... def compose(stream, Loader=...): ... def compose_all(stream, Loader=...): ... def load(stream: Union[bytes, IO[bytes], str, IO[str]], Loader=...) -> Any: ... def load_all(stream: Union[bytes, IO[bytes], str, IO[str]], Loader=...) -> Iterator[Any]: ... def full_load(stream: Union[bytes, IO[bytes], str, IO[str]]) -> Any: ... def full_load_all(stream: Union[bytes, IO[bytes], str, IO[str]]) -> Iterator[Any]: ... def safe_load(stream: Union[bytes, IO[bytes], str, IO[str]]) -> Any: ... def safe_load_all(stream: Union[bytes, IO[bytes], str, IO[str]]) -> Iterator[Any]: ... def emit(events, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=...): ... @overload def serialize_all(nodes, stream: IO[str], Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> None: ... @overload def serialize_all(nodes, stream: None = ..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding: Optional[_Str] = ..., explicit_start=..., explicit_end=..., version=..., tags=...) -> _Yaml: ... @overload def serialize(node, stream: IO[str], Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> None: ... @overload def serialize(node, stream: None = ..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding: Optional[_Str] = ..., explicit_start=..., explicit_end=..., version=..., tags=...) -> _Yaml: ... @overload def dump_all(documents: Sequence[Any], stream: IO[str], Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... @overload def dump_all(documents: Sequence[Any], stream: None = ..., Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding: Optional[_Str] = ..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> _Yaml: ... @overload def dump(data: Any, stream: IO[str], Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... @overload def dump(data: Any, stream: None = ..., Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding: Optional[_Str] = ..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> _Yaml: ... @overload def safe_dump_all(documents: Sequence[Any], stream: IO[str], default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... @overload def safe_dump_all(documents: Sequence[Any], stream: None = ..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding: Optional[_Str] = ..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> _Yaml: ... @overload def safe_dump(data: Any, stream: IO[str], default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... @overload def safe_dump(data: Any, stream: None = ..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding: Optional[_Str] = ..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> _Yaml: ... def add_implicit_resolver(tag, regexp, first=..., Loader=..., Dumper=...): ... def add_path_resolver(tag, path, kind=..., Loader=..., Dumper=...): ... def add_constructor(tag, constructor, Loader=...): ... def add_multi_constructor(tag_prefix, multi_constructor, Loader=...): ... def add_representer(data_type, representer, Dumper=...): ... def add_multi_representer(data_type, multi_representer, Dumper=...): ... class YAMLObjectMetaclass(type): def __init__(self, name, bases, kwds) -> None: ... class YAMLObject(metaclass=YAMLObjectMetaclass): yaml_loader: Any yaml_dumper: Any yaml_tag: Any yaml_flow_style: Any @classmethod def from_yaml(cls, loader, node): ... @classmethod def to_yaml(cls, dumper, data): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/dumper.pyi0000664000175000017500000000221713577124116025717 0ustar davedave00000000000000from yaml.emitter import Emitter from yaml.serializer import Serializer from yaml.representer import BaseRepresenter, Representer, SafeRepresenter from yaml.resolver import BaseResolver, Resolver class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver): def __init__(self, stream, default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver): def __init__(self, stream, default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... class Dumper(Emitter, Serializer, Representer, Resolver): def __init__(self, stream, default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=..., sort_keys: bool = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/error.pyi0000664000175000017500000000102713577124116025552 0ustar davedave00000000000000from typing import Any class Mark: name: Any index: Any line: Any column: Any buffer: Any pointer: Any def __init__(self, name, index, line, column, buffer, pointer) -> None: ... def get_snippet(self, indent=..., max_length=...): ... class YAMLError(Exception): ... class MarkedYAMLError(YAMLError): context: Any context_mark: Any problem: Any problem_mark: Any note: Any def __init__(self, context=..., context_mark=..., problem=..., problem_mark=..., note=...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/representer.pyi0000664000175000017500000000377713577124116026775 0ustar davedave00000000000000from typing import Any from yaml.error import YAMLError class RepresenterError(YAMLError): ... class BaseRepresenter: yaml_representers: Any yaml_multi_representers: Any default_style: Any default_flow_style: Any sort_keys: bool represented_objects: Any object_keeper: Any alias_key: Any def __init__(self, default_style=..., default_flow_style=..., sort_keys: bool = ...) -> None: ... def represent(self, data): ... def get_classobj_bases(self, cls): ... def represent_data(self, data): ... @classmethod def add_representer(cls, data_type, representer): ... @classmethod def add_multi_representer(cls, data_type, representer): ... def represent_scalar(self, tag, value, style=...): ... def represent_sequence(self, tag, sequence, flow_style=...): ... def represent_mapping(self, tag, mapping, flow_style=...): ... def ignore_aliases(self, data): ... class SafeRepresenter(BaseRepresenter): def ignore_aliases(self, data): ... def represent_none(self, data): ... def represent_str(self, data): ... def represent_unicode(self, data): ... def represent_bool(self, data): ... def represent_int(self, data): ... def represent_long(self, data): ... inf_value: Any def represent_float(self, data): ... def represent_list(self, data): ... def represent_dict(self, data): ... def represent_set(self, data): ... def represent_date(self, data): ... def represent_datetime(self, data): ... def represent_yaml_object(self, tag, data, cls, flow_style=...): ... def represent_undefined(self, data): ... class Representer(SafeRepresenter): def represent_str(self, data): ... def represent_unicode(self, data): ... def represent_long(self, data): ... def represent_complex(self, data): ... def represent_tuple(self, data): ... def represent_name(self, data): ... def represent_module(self, data): ... def represent_instance(self, data): ... def represent_object(self, data): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/reader.pyi0000664000175000017500000000147713577124116025674 0ustar davedave00000000000000from typing import Any from yaml.error import YAMLError class ReaderError(YAMLError): name: Any character: Any position: Any encoding: Any reason: Any def __init__(self, name, position, character, encoding, reason) -> None: ... class Reader: name: Any stream: Any stream_pointer: Any eof: Any buffer: Any pointer: Any raw_buffer: Any raw_decode: Any encoding: Any index: Any line: Any column: Any def __init__(self, stream) -> None: ... def peek(self, index=...): ... def prefix(self, length=...): ... def forward(self, length=...): ... def get_mark(self): ... def determine_encoding(self): ... NON_PRINTABLE: Any def check_printable(self, data): ... def update(self, length): ... def update_raw(self, size=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/scanner.pyi0000664000175000017500000000676413577124116026067 0ustar davedave00000000000000from typing import Any from yaml.error import MarkedYAMLError class ScannerError(MarkedYAMLError): ... class SimpleKey: token_number: Any required: Any index: Any line: Any column: Any mark: Any def __init__(self, token_number, required, index, line, column, mark) -> None: ... class Scanner: done: Any flow_level: Any tokens: Any tokens_taken: Any indent: Any indents: Any allow_simple_key: Any possible_simple_keys: Any def __init__(self) -> None: ... def check_token(self, *choices): ... def peek_token(self): ... def get_token(self): ... def need_more_tokens(self): ... def fetch_more_tokens(self): ... def next_possible_simple_key(self): ... def stale_possible_simple_keys(self): ... def save_possible_simple_key(self): ... def remove_possible_simple_key(self): ... def unwind_indent(self, column): ... def add_indent(self, column): ... def fetch_stream_start(self): ... def fetch_stream_end(self): ... def fetch_directive(self): ... def fetch_document_start(self): ... def fetch_document_end(self): ... def fetch_document_indicator(self, TokenClass): ... def fetch_flow_sequence_start(self): ... def fetch_flow_mapping_start(self): ... def fetch_flow_collection_start(self, TokenClass): ... def fetch_flow_sequence_end(self): ... def fetch_flow_mapping_end(self): ... def fetch_flow_collection_end(self, TokenClass): ... def fetch_flow_entry(self): ... def fetch_block_entry(self): ... def fetch_key(self): ... def fetch_value(self): ... def fetch_alias(self): ... def fetch_anchor(self): ... def fetch_tag(self): ... def fetch_literal(self): ... def fetch_folded(self): ... def fetch_block_scalar(self, style): ... def fetch_single(self): ... def fetch_double(self): ... def fetch_flow_scalar(self, style): ... def fetch_plain(self): ... def check_directive(self): ... def check_document_start(self): ... def check_document_end(self): ... def check_block_entry(self): ... def check_key(self): ... def check_value(self): ... def check_plain(self): ... def scan_to_next_token(self): ... def scan_directive(self): ... def scan_directive_name(self, start_mark): ... def scan_yaml_directive_value(self, start_mark): ... def scan_yaml_directive_number(self, start_mark): ... def scan_tag_directive_value(self, start_mark): ... def scan_tag_directive_handle(self, start_mark): ... def scan_tag_directive_prefix(self, start_mark): ... def scan_directive_ignored_line(self, start_mark): ... def scan_anchor(self, TokenClass): ... def scan_tag(self): ... def scan_block_scalar(self, style): ... def scan_block_scalar_indicators(self, start_mark): ... def scan_block_scalar_ignored_line(self, start_mark): ... def scan_block_scalar_indentation(self): ... def scan_block_scalar_breaks(self, indent): ... def scan_flow_scalar(self, style): ... ESCAPE_REPLACEMENTS: Any ESCAPE_CODES: Any def scan_flow_scalar_non_spaces(self, double, start_mark): ... def scan_flow_scalar_spaces(self, double, start_mark): ... def scan_flow_scalar_breaks(self, double, start_mark): ... def scan_plain(self): ... def scan_plain_spaces(self, indent, start_mark): ... def scan_tag_handle(self, name, start_mark): ... def scan_tag_uri(self, name, start_mark): ... def scan_uri_escapes(self, name, start_mark): ... def scan_line_break(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/nodes.pyi0000664000175000017500000000125513577124116025534 0ustar davedave00000000000000from typing import Any class Node: tag: Any value: Any start_mark: Any end_mark: Any def __init__(self, tag, value, start_mark, end_mark) -> None: ... class ScalarNode(Node): id: Any tag: Any value: Any start_mark: Any end_mark: Any style: Any def __init__(self, tag, value, start_mark=..., end_mark=..., style=...) -> None: ... class CollectionNode(Node): tag: Any value: Any start_mark: Any end_mark: Any flow_style: Any def __init__(self, tag, value, start_mark=..., end_mark=..., flow_style=...) -> None: ... class SequenceNode(CollectionNode): id: Any class MappingNode(CollectionNode): id: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/events.pyi0000664000175000017500000000317613577124116025734 0ustar davedave00000000000000from typing import Any class Event: start_mark: Any end_mark: Any def __init__(self, start_mark=..., end_mark=...) -> None: ... class NodeEvent(Event): anchor: Any start_mark: Any end_mark: Any def __init__(self, anchor, start_mark=..., end_mark=...) -> None: ... class CollectionStartEvent(NodeEvent): anchor: Any tag: Any implicit: Any start_mark: Any end_mark: Any flow_style: Any def __init__(self, anchor, tag, implicit, start_mark=..., end_mark=..., flow_style=...) -> None: ... class CollectionEndEvent(Event): ... class StreamStartEvent(Event): start_mark: Any end_mark: Any encoding: Any def __init__(self, start_mark=..., end_mark=..., encoding=...) -> None: ... class StreamEndEvent(Event): ... class DocumentStartEvent(Event): start_mark: Any end_mark: Any explicit: Any version: Any tags: Any def __init__(self, start_mark=..., end_mark=..., explicit=..., version=..., tags=...) -> None: ... class DocumentEndEvent(Event): start_mark: Any end_mark: Any explicit: Any def __init__(self, start_mark=..., end_mark=..., explicit=...) -> None: ... class AliasEvent(NodeEvent): ... class ScalarEvent(NodeEvent): anchor: Any tag: Any implicit: Any value: Any start_mark: Any end_mark: Any style: Any def __init__(self, anchor, tag, implicit, value, start_mark=..., end_mark=..., style=...) -> None: ... class SequenceStartEvent(CollectionStartEvent): ... class SequenceEndEvent(CollectionEndEvent): ... class MappingStartEvent(CollectionStartEvent): ... class MappingEndEvent(CollectionEndEvent): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/parser.pyi0000664000175000017500000000317713577124116025725 0ustar davedave00000000000000from typing import Any from yaml.error import MarkedYAMLError class ParserError(MarkedYAMLError): ... class Parser: DEFAULT_TAGS: Any current_event: Any yaml_version: Any tag_handles: Any states: Any marks: Any state: Any def __init__(self) -> None: ... def dispose(self): ... def check_event(self, *choices): ... def peek_event(self): ... def get_event(self): ... def parse_stream_start(self): ... def parse_implicit_document_start(self): ... def parse_document_start(self): ... def parse_document_end(self): ... def parse_document_content(self): ... def process_directives(self): ... def parse_block_node(self): ... def parse_flow_node(self): ... def parse_block_node_or_indentless_sequence(self): ... def parse_node(self, block=..., indentless_sequence=...): ... def parse_block_sequence_first_entry(self): ... def parse_block_sequence_entry(self): ... def parse_indentless_sequence_entry(self): ... def parse_block_mapping_first_key(self): ... def parse_block_mapping_key(self): ... def parse_block_mapping_value(self): ... def parse_flow_sequence_first_entry(self): ... def parse_flow_sequence_entry(self, first=...): ... def parse_flow_sequence_entry_mapping_key(self): ... def parse_flow_sequence_entry_mapping_value(self): ... def parse_flow_sequence_entry_mapping_end(self): ... def parse_flow_mapping_first_key(self): ... def parse_flow_mapping_key(self, first=...): ... def parse_flow_mapping_value(self): ... def parse_flow_mapping_empty_value(self): ... def process_empty_scalar(self, mark): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/serializer.pyi0000664000175000017500000000123113577124116026567 0ustar davedave00000000000000from typing import Any from yaml.error import YAMLError class SerializerError(YAMLError): ... class Serializer: ANCHOR_TEMPLATE: Any use_encoding: Any use_explicit_start: Any use_explicit_end: Any use_version: Any use_tags: Any serialized_nodes: Any anchors: Any last_anchor_id: Any closed: Any def __init__(self, encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> None: ... def open(self): ... def close(self): ... def serialize(self, node): ... def anchor_node(self, node): ... def generate_anchor(self, node): ... def serialize_node(self, node, parent, index): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/tokens.pyi0000664000175000017500000000340013577124116025721 0ustar davedave00000000000000from typing import Any class Token: start_mark: Any end_mark: Any def __init__(self, start_mark, end_mark) -> None: ... class DirectiveToken(Token): id: Any name: Any value: Any start_mark: Any end_mark: Any def __init__(self, name, value, start_mark, end_mark) -> None: ... class DocumentStartToken(Token): id: Any class DocumentEndToken(Token): id: Any class StreamStartToken(Token): id: Any start_mark: Any end_mark: Any encoding: Any def __init__(self, start_mark=..., end_mark=..., encoding=...) -> None: ... class StreamEndToken(Token): id: Any class BlockSequenceStartToken(Token): id: Any class BlockMappingStartToken(Token): id: Any class BlockEndToken(Token): id: Any class FlowSequenceStartToken(Token): id: Any class FlowMappingStartToken(Token): id: Any class FlowSequenceEndToken(Token): id: Any class FlowMappingEndToken(Token): id: Any class KeyToken(Token): id: Any class ValueToken(Token): id: Any class BlockEntryToken(Token): id: Any class FlowEntryToken(Token): id: Any class AliasToken(Token): id: Any value: Any start_mark: Any end_mark: Any def __init__(self, value, start_mark, end_mark) -> None: ... class AnchorToken(Token): id: Any value: Any start_mark: Any end_mark: Any def __init__(self, value, start_mark, end_mark) -> None: ... class TagToken(Token): id: Any value: Any start_mark: Any end_mark: Any def __init__(self, value, start_mark, end_mark) -> None: ... class ScalarToken(Token): id: Any value: Any plain: Any start_mark: Any end_mark: Any style: Any def __init__(self, value, plain, start_mark, end_mark, style=...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/composer.pyi0000664000175000017500000000112313577124116026245 0ustar davedave00000000000000from typing import Any from yaml.error import Mark, YAMLError, MarkedYAMLError from yaml.nodes import Node, ScalarNode, CollectionNode, SequenceNode, MappingNode class ComposerError(MarkedYAMLError): ... class Composer: anchors: Any def __init__(self) -> None: ... def check_node(self): ... def get_node(self): ... def get_single_node(self): ... def compose_document(self): ... def compose_node(self, parent, index): ... def compose_scalar_node(self, anchor): ... def compose_sequence_node(self, anchor): ... def compose_mapping_node(self, anchor): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/emitter.pyi0000664000175000017500000000731313577124116026076 0ustar davedave00000000000000from typing import Any from yaml.error import YAMLError class EmitterError(YAMLError): ... class ScalarAnalysis: scalar: Any empty: Any multiline: Any allow_flow_plain: Any allow_block_plain: Any allow_single_quoted: Any allow_double_quoted: Any allow_block: Any def __init__(self, scalar, empty, multiline, allow_flow_plain, allow_block_plain, allow_single_quoted, allow_double_quoted, allow_block) -> None: ... class Emitter: DEFAULT_TAG_PREFIXES: Any stream: Any encoding: Any states: Any state: Any events: Any event: Any indents: Any indent: Any flow_level: Any root_context: Any sequence_context: Any mapping_context: Any simple_key_context: Any line: Any column: Any whitespace: Any indention: Any open_ended: Any canonical: Any allow_unicode: Any best_indent: Any best_width: Any best_line_break: Any tag_prefixes: Any prepared_anchor: Any prepared_tag: Any analysis: Any style: Any def __init__(self, stream, canonical=..., indent=..., width=..., allow_unicode=..., line_break=...) -> None: ... def dispose(self): ... def emit(self, event): ... def need_more_events(self): ... def need_events(self, count): ... def increase_indent(self, flow=..., indentless=...): ... def expect_stream_start(self): ... def expect_nothing(self): ... def expect_first_document_start(self): ... def expect_document_start(self, first=...): ... def expect_document_end(self): ... def expect_document_root(self): ... def expect_node(self, root=..., sequence=..., mapping=..., simple_key=...): ... def expect_alias(self): ... def expect_scalar(self): ... def expect_flow_sequence(self): ... def expect_first_flow_sequence_item(self): ... def expect_flow_sequence_item(self): ... def expect_flow_mapping(self): ... def expect_first_flow_mapping_key(self): ... def expect_flow_mapping_key(self): ... def expect_flow_mapping_simple_value(self): ... def expect_flow_mapping_value(self): ... def expect_block_sequence(self): ... def expect_first_block_sequence_item(self): ... def expect_block_sequence_item(self, first=...): ... def expect_block_mapping(self): ... def expect_first_block_mapping_key(self): ... def expect_block_mapping_key(self, first=...): ... def expect_block_mapping_simple_value(self): ... def expect_block_mapping_value(self): ... def check_empty_sequence(self): ... def check_empty_mapping(self): ... def check_empty_document(self): ... def check_simple_key(self): ... def process_anchor(self, indicator): ... def process_tag(self): ... def choose_scalar_style(self): ... def process_scalar(self): ... def prepare_version(self, version): ... def prepare_tag_handle(self, handle): ... def prepare_tag_prefix(self, prefix): ... def prepare_tag(self, tag): ... def prepare_anchor(self, anchor): ... def analyze_scalar(self, scalar): ... def flush_stream(self): ... def write_stream_start(self): ... def write_stream_end(self): ... def write_indicator(self, indicator, need_whitespace, whitespace=..., indention=...): ... def write_indent(self): ... def write_line_break(self, data=...): ... def write_version_directive(self, version_text): ... def write_tag_directive(self, handle_text, prefix_text): ... def write_single_quoted(self, text, split=...): ... ESCAPE_REPLACEMENTS: Any def write_double_quoted(self, text, split=...): ... def determine_block_hints(self, text): ... def write_folded(self, text): ... def write_literal(self, text): ... def write_plain(self, text, split=...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/loader.pyi0000664000175000017500000000137713577124116025677 0ustar davedave00000000000000from yaml.reader import Reader from yaml.scanner import Scanner from yaml.parser import Parser from yaml.composer import Composer from yaml.constructor import BaseConstructor, FullConstructor, SafeConstructor, Constructor from yaml.resolver import BaseResolver, Resolver class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver): def __init__(self, stream) -> None: ... class FullLoader(Reader, Scanner, Parser, Composer, FullConstructor, Resolver): def __init__(self, stream) -> None: ... class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver): def __init__(self, stream) -> None: ... class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver): def __init__(self, stream) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/constructor.pyi0000664000175000017500000000710613577124116027012 0ustar davedave00000000000000from yaml.error import Mark, YAMLError, MarkedYAMLError from yaml.nodes import Node, ScalarNode, CollectionNode, SequenceNode, MappingNode from typing import Any class ConstructorError(MarkedYAMLError): ... class BaseConstructor: yaml_constructors: Any yaml_multi_constructors: Any constructed_objects: Any recursive_objects: Any state_generators: Any deep_construct: Any def __init__(self) -> None: ... def check_data(self): ... def get_data(self): ... def get_single_data(self): ... def construct_document(self, node): ... def construct_object(self, node, deep=...): ... def construct_scalar(self, node): ... def construct_sequence(self, node, deep=...): ... def construct_mapping(self, node, deep=...): ... def construct_pairs(self, node, deep=...): ... @classmethod def add_constructor(cls, tag, constructor): ... @classmethod def add_multi_constructor(cls, tag_prefix, multi_constructor): ... class SafeConstructor(BaseConstructor): def construct_scalar(self, node): ... def flatten_mapping(self, node): ... def construct_mapping(self, node, deep=...): ... def construct_yaml_null(self, node): ... bool_values: Any def construct_yaml_bool(self, node): ... def construct_yaml_int(self, node): ... inf_value: Any nan_value: Any def construct_yaml_float(self, node): ... def construct_yaml_binary(self, node): ... timestamp_regexp: Any def construct_yaml_timestamp(self, node): ... def construct_yaml_omap(self, node): ... def construct_yaml_pairs(self, node): ... def construct_yaml_set(self, node): ... def construct_yaml_str(self, node): ... def construct_yaml_seq(self, node): ... def construct_yaml_map(self, node): ... def construct_yaml_object(self, node, cls): ... def construct_undefined(self, node): ... class FullConstructor(SafeConstructor): def construct_python_str(self, node): ... def construct_python_unicode(self, node): ... def construct_python_bytes(self, node): ... def construct_python_long(self, node): ... def construct_python_complex(self, node): ... def construct_python_tuple(self, node): ... def find_python_module(self, name, mark, unsafe=...): ... def find_python_name(self, name, mark, unsafe=...): ... def construct_python_name(self, suffix, node): ... def construct_python_module(self, suffix, node): ... def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=..., unsafe=...): ... def set_python_instance_state(self, instance, state): ... def construct_python_object(self, suffix, node): ... def construct_python_object_apply(self, suffix, node, newobj=...): ... def construct_python_object_new(self, suffix, node): ... class Constructor(SafeConstructor): def construct_python_str(self, node): ... def construct_python_unicode(self, node): ... def construct_python_long(self, node): ... def construct_python_complex(self, node): ... def construct_python_tuple(self, node): ... def find_python_module(self, name, mark): ... def find_python_name(self, name, mark): ... def construct_python_name(self, suffix, node): ... def construct_python_module(self, suffix, node): ... class classobj: ... def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ... def set_python_instance_state(self, instance, state): ... def construct_python_object(self, suffix, node): ... def construct_python_object_apply(self, suffix, node, newobj=...): ... def construct_python_object_new(self, suffix, node): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/resolver.pyi0000664000175000017500000000142113577124116026260 0ustar davedave00000000000000from typing import Any from yaml.error import YAMLError class ResolverError(YAMLError): ... class BaseResolver: DEFAULT_SCALAR_TAG: Any DEFAULT_SEQUENCE_TAG: Any DEFAULT_MAPPING_TAG: Any yaml_implicit_resolvers: Any yaml_path_resolvers: Any resolver_exact_paths: Any resolver_prefix_paths: Any def __init__(self) -> None: ... @classmethod def add_implicit_resolver(cls, tag, regexp, first): ... @classmethod def add_path_resolver(cls, tag, path, kind=...): ... def descend_resolver(self, current_node, current_index): ... def ascend_resolver(self): ... def check_resolver_prefix(self, depth, path, kind, current_node, current_index): ... def resolve(self, kind, value, implicit): ... class Resolver(BaseResolver): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/yaml/cyaml.pyi0000664000175000017500000000437413577124116025536 0ustar davedave00000000000000from typing import Any, IO, Mapping, Optional, Sequence, Text, Union from typing_extensions import Protocol from yaml.constructor import BaseConstructor, Constructor, SafeConstructor from yaml.representer import BaseRepresenter, Representer, SafeRepresenter from yaml.resolver import BaseResolver, Resolver from yaml.serializer import Serializer class _Readable(Protocol): def read(self, size: int) -> Union[Text, bytes]: ... class CParser: def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... class CBaseLoader(CParser, BaseConstructor, BaseResolver): def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... class CLoader(CParser, SafeConstructor, Resolver): def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... class CSafeLoader(CParser, SafeConstructor, Resolver): def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... class CDangerLoader(CParser, Constructor, Resolver): ... # undocumented class CEmitter(object): def __init__(self, stream: IO[Any], canonical: Optional[Any] = ..., indent: Optional[int] = ..., width: Optional[int] = ..., allow_unicode: Optional[Any] = ..., line_break: Optional[str] = ..., encoding: Optional[Text] = ..., explicit_start: Optional[Any] = ..., explicit_end: Optional[Any] = ..., version: Optional[Sequence[int]] = ..., tags: Optional[Mapping[Text, Text]] = ...) -> None: ... class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver): def __init__(self, stream: IO[Any], default_style: Optional[str] = ..., default_flow_style: Optional[bool] = ..., canonical: Optional[Any] = ..., indent: Optional[int] = ..., width: Optional[int] = ..., allow_unicode: Optional[Any] = ..., line_break: Optional[str] = ..., encoding: Optional[Text] = ..., explicit_start: Optional[Any] = ..., explicit_end: Optional[Any] = ..., version: Optional[Sequence[int]] = ..., tags: Optional[Mapping[Text, Text]] = ...) -> None: ... class CDumper(CEmitter, SafeRepresenter, Resolver): ... CSafeDumper = CDumper class CDangerDumper(CEmitter, Serializer, Representer, Resolver): ... # undocumented jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/0000775000175000017500000000000013577125145025472 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/__init__.pyi0000664000175000017500000000000013577124116027737 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/fernet.pyi0000664000175000017500000000120013577124116027466 0ustar davedave00000000000000from typing import List, Optional class InvalidToken(Exception): ... class Fernet(object): def __init__(self, key: bytes) -> None: ... def decrypt(self, token: bytes, ttl: Optional[int] = ...) -> bytes: ... def encrypt(self, data: bytes) -> bytes: ... def extract_timestamp(self, token: bytes) -> int: ... @classmethod def generate_key(cls) -> bytes: ... class MultiFernet(object): def __init__(self, fernets: List[Fernet]) -> None: ... def decrypt(self, token: bytes, ttl: Optional[int] = ...) -> bytes: ... def encrypt(self, data: bytes) -> bytes: ... def rotate(self, msg: bytes) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/x509.pyi0000664000175000017500000003210613577124116026721 0ustar davedave00000000000000import datetime from abc import ABCMeta, abstractmethod from enum import Enum from ipaddress import IPv4Address, IPv4Network, IPv6Address, IPv6Network from typing import Any, ClassVar, Generator, List, Optional, Union, Text, Iterable, Sequence, Type from cryptography.hazmat.backends.interfaces import X509Backend from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey, EllipticCurvePublicKey from cryptography.hazmat.primitives.asymmetric.ed448 import Ed448PrivateKey, Ed448PublicKey from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey, Ed25519PublicKey from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.serialization import Encoding class ObjectIdentifier(object): def __init__(self, dotted_string: str) -> None: ... def dotted_string(self) -> str: ... class CRLEntryExtensionOID(object): CERTIFICATE_ISSUER: ClassVar[ObjectIdentifier] CRL_REASON: ClassVar[ObjectIdentifier] INVALIDITY_DATE: ClassVar[ObjectIdentifier] class ExtensionOID(object): AUTHORITY_INFORMATION_ACCESS: ClassVar[ObjectIdentifier] AUTHORITY_KEY_IDENTIFIER: ClassVar[ObjectIdentifier] BASIC_CONSTRAINTS: ClassVar[ObjectIdentifier] CERTIFICATE_POLICIES: ClassVar[ObjectIdentifier] CRL_DISTRIBUTION_POINTS: ClassVar[ObjectIdentifier] CRL_NUMBER: ClassVar[ObjectIdentifier] DELTA_CRL_INDICATOR: ClassVar[ObjectIdentifier] EXTENDED_KEY_USAGE: ClassVar[ObjectIdentifier] FRESHEST_CRL: ClassVar[ObjectIdentifier] INHIBIT_ANY_POLICY: ClassVar[ObjectIdentifier] ISSUER_ALTERNATIVE_NAME: ClassVar[ObjectIdentifier] ISSUING_DISTRIBUTION_POINT: ClassVar[ObjectIdentifier] KEY_USAGE: ClassVar[ObjectIdentifier] NAME_CONSTRAINTS: ClassVar[ObjectIdentifier] OCSP_NO_CHECK: ClassVar[ObjectIdentifier] POLICY_CONSTRAINTS: ClassVar[ObjectIdentifier] POLICY_MAPPINGS: ClassVar[ObjectIdentifier] PRECERT_POISON: ClassVar[ObjectIdentifier] PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS: ClassVar[ObjectIdentifier] SUBJECT_ALTERNATIVE_NAME: ClassVar[ObjectIdentifier] SUBJECT_DIRECTORY_ATTRIBUTES: ClassVar[ObjectIdentifier] SUBJECT_INFORMATION_ACCESS: ClassVar[ObjectIdentifier] SUBJECT_KEY_IDENTIFIER: ClassVar[ObjectIdentifier] TLS_FEATURE: ClassVar[ObjectIdentifier] class NameOID(object): BUSINESS_CATEGORY: ClassVar[ObjectIdentifier] COMMON_NAME: ClassVar[ObjectIdentifier] COUNTRY_NAME: ClassVar[ObjectIdentifier] DN_QUALIFIER: ClassVar[ObjectIdentifier] DOMAIN_COMPONENT: ClassVar[ObjectIdentifier] EMAIL_ADDRESS: ClassVar[ObjectIdentifier] GENERATION_QUALIFIER: ClassVar[ObjectIdentifier] GIVEN_NAME: ClassVar[ObjectIdentifier] JURISDICTION_COUNTRY_NAME: ClassVar[ObjectIdentifier] JURISDICTION_LOCALITY_NAME: ClassVar[ObjectIdentifier] JURISDICTION_STATE_OR_PROVINCE_NAME: ClassVar[ObjectIdentifier] LOCALITY_NAME: ClassVar[ObjectIdentifier] ORGANIZATIONAL_UNIT_NAME: ClassVar[ObjectIdentifier] ORGANIZATION_NAME: ClassVar[ObjectIdentifier] POSTAL_ADDRESS: ClassVar[ObjectIdentifier] POSTAL_CODE: ClassVar[ObjectIdentifier] PSEUDONYM: ClassVar[ObjectIdentifier] SERIAL_NUMBER: ClassVar[ObjectIdentifier] STATE_OR_PROVINCE_NAME: ClassVar[ObjectIdentifier] STREET_ADDRESS: ClassVar[ObjectIdentifier] SURNAME: ClassVar[ObjectIdentifier] TITLE: ClassVar[ObjectIdentifier] USER_ID: ClassVar[ObjectIdentifier] X500_UNIQUE_IDENTIFIER: ClassVar[ObjectIdentifier] class OCSPExtensionOID(object): NONCE: ClassVar[ObjectIdentifier] class SignatureAlgorithmOID(object): DSA_WITH_SHA1: ClassVar[ObjectIdentifier] DSA_WITH_SHA224: ClassVar[ObjectIdentifier] DSA_WITH_SHA256: ClassVar[ObjectIdentifier] ECDSA_WITH_SHA1: ClassVar[ObjectIdentifier] ECDSA_WITH_SHA224: ClassVar[ObjectIdentifier] ECDSA_WITH_SHA256: ClassVar[ObjectIdentifier] ECDSA_WITH_SHA384: ClassVar[ObjectIdentifier] ECDSA_WITH_SHA512: ClassVar[ObjectIdentifier] ED25519: ClassVar[ObjectIdentifier] ED448: ClassVar[ObjectIdentifier] RSASSA_PSS: ClassVar[ObjectIdentifier] RSA_WITH_MD5: ClassVar[ObjectIdentifier] RSA_WITH_SHA1: ClassVar[ObjectIdentifier] RSA_WITH_SHA224: ClassVar[ObjectIdentifier] RSA_WITH_SHA256: ClassVar[ObjectIdentifier] RSA_WITH_SHA384: ClassVar[ObjectIdentifier] RSA_WITH_SHA512: ClassVar[ObjectIdentifier] class NameAttribute(object): oid: ObjectIdentifier value: Text def __init__(self, oid: ObjectIdentifier, value: Text) -> None: ... def rfc4514_string(self) -> str: ... class RelativeDistinguishedName(object): def __init__(self, attributes: List[NameAttribute]) -> None: ... def __iter__(self) -> Generator[NameAttribute, None, None]: ... def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ... def rfc4514_string(self) -> str: ... class Name(object): rdns: List[RelativeDistinguishedName] def __init__(self, attributes: Sequence[Union[NameAttribute, RelativeDistinguishedName]]) -> None: ... def __iter__(self) -> Generator[NameAttribute, None, None]: ... def __len__(self) -> int: ... def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ... def public_bytes(self, backend: X509Backend) -> bytes: ... def rfc4514_string(self) -> str: ... class Version(Enum): v1: int v3: int class Certificate(metaclass=ABCMeta): extensions: Extensions issuer: Name not_valid_after: datetime.datetime not_valid_before: datetime.datetime serial_number: int signature: bytes signature_algorithm_oid: ObjectIdentifier signature_hash_algorithm: HashAlgorithm tbs_certificate_bytes: bytes subject: Name version: Version @abstractmethod def fingerprint(self, algorithm: HashAlgorithm) -> bytes: ... @abstractmethod def public_bytes(self, encoding: Encoding) -> bytes: ... @abstractmethod def public_key(self) -> Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey]: ... class CertificateBuilder(object): def __init__(self, issuer_name: Optional[Name] = ..., subject_name: Optional[Name] = ..., public_key: Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey, None] = ..., serial_number: Optional[int] = ..., not_valid_before: Optional[datetime.datetime] = ..., not_valid_after: Optional[datetime.datetime] = ..., extensions: Optional[Iterable[ExtensionType]] = ...) -> None: ... def add_extension(self, extension: ExtensionType, critical: bool) -> CertificateBuilder: ... def issuer_name(self, name: Name) -> CertificateBuilder: ... def not_valid_after(self, time: datetime.datetime) -> CertificateBuilder: ... def not_valid_before(self, time: datetime.datetime) -> CertificateBuilder: ... def public_key( self, public_key: Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey] ) -> CertificateBuilder: ... def serial_number(self, serial_number: int) -> CertificateBuilder: ... def sign( self, private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: Optional[HashAlgorithm], backend: X509Backend, ) -> Certificate: ... def subject_name(self, name: Name) -> CertificateBuilder: ... class CertificateRevocationList(metaclass=ABCMeta): extensions: Extensions issuer: Name last_update: datetime.datetime next_update: datetime.datetime signature: bytes signature_algorithm_oid: ObjectIdentifier signature_hash_algorithm: HashAlgorithm tbs_certlist_bytes: bytes @abstractmethod def fingerprint(self, algorithm: HashAlgorithm) -> bytes: ... @abstractmethod def get_revoked_certificate_by_serial_number(self, serial_number: int) -> RevokedCertificate: ... @abstractmethod def is_signature_valid( self, public_key: Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey] ) -> bool: ... @abstractmethod def public_bytes(self, encoding: Encoding) -> bytes: ... class CertificateRevocationListBuilder(object): def add_extension(self, extension: ExtensionType, critical: bool) -> CertificateRevocationListBuilder: ... def add_revoked_certificate(self, revoked_certificate: RevokedCertificate) -> CertificateRevocationListBuilder: ... def issuer_name(self, name: Name) -> CertificateRevocationListBuilder: ... def last_update(self, time: datetime.datetime) -> CertificateRevocationListBuilder: ... def next_update(self, time: datetime.datetime) -> CertificateRevocationListBuilder: ... def sign( self, private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: Optional[HashAlgorithm], backend: X509Backend, ) -> CertificateRevocationList: ... class CertificateSigningRequest(metaclass=ABCMeta): extensions: Extensions is_signature_valid: bool signature: bytes signature_algorithm_oid: ObjectIdentifier signature_hash_algorithm: HashAlgorithm subject: Name tbs_certrequest_bytes: bytes @abstractmethod def public_bytes(self, encoding: Encoding) -> bytes: ... @abstractmethod def public_key(self) -> Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey]: ... class CertificateSigningRequestBuilder(object): def add_extension(self, extension: ExtensionType, critical: bool) -> CertificateSigningRequestBuilder: ... def subject_name(self, name: Name) -> CertificateSigningRequestBuilder: ... def sign( self, private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: Optional[HashAlgorithm], backend: X509Backend, ) -> CertificateSigningRequest: ... class RevokedCertificate(metaclass=ABCMeta): extensions: Extensions revocation_date: datetime.datetime serial_number: int class RevokedCertificateBuilder(object): def add_extension(self, extension: ExtensionType, critical: bool) -> RevokedCertificateBuilder: ... def build(self, backend: X509Backend) -> RevokedCertificate: ... def revocation_date(self, time: datetime.datetime) -> RevokedCertificateBuilder: ... def serial_number(self, serial_number: int) -> RevokedCertificateBuilder: ... # General Name Classes class GeneralName(metaclass=ABCMeta): value: Any class DirectoryName(GeneralName): value: Name def __init__(self, value: Name) -> None: ... class DNSName(GeneralName): value: Text def __init__(self, value: Text) -> None: ... class IPAddress(GeneralName): value: Union[IPv4Address, IPv6Address, IPv4Network, IPv6Network] def __init__(self, value: Union[IPv4Address, IPv6Address, IPv4Network, IPv6Network]) -> None: ... class OtherName(GeneralName): type_id: ObjectIdentifier value: bytes def __init__(self, type_id: ObjectIdentifier, value: bytes) -> None: ... class RegisteredID(GeneralName): value: ObjectIdentifier def __init__(self, value: ObjectIdentifier) -> None: ... class RFC822Name(GeneralName): value: Text def __init__(self, value: Text) -> None: ... class UniformResourceIdentifier(GeneralName): value: Text def __init__(self, value: Text) -> None: ... # X.509 Extensions class Extension(object): critical: bool oid: ExtensionOID value: ExtensionType class ExtensionType(metaclass=ABCMeta): oid: ExtensionOID class Extensions(object): def __init__(self, general_names: List[Extension]) -> None: ... def __iter__(self) -> Generator[Extension, None, None]: ... def get_extension_for_oid(self, oid: ObjectIdentifier) -> Extension: ... def get_extension_for_class(self, extclass: Type[ExtensionType]) -> Extension: ... class IssuerAlternativeName(ExtensionType): def __init__(self, general_names: List[GeneralName]) -> None: ... def __iter__(self) -> Generator[GeneralName, None, None]: ... def get_values_for_type(self, type: Type[GeneralName]) -> List[Any]: ... class SubjectAlternativeName(ExtensionType): def __init__(self, general_names: List[GeneralName]) -> None: ... def __iter__(self) -> Generator[GeneralName, None, None]: ... def get_values_for_type(self, type: Type[GeneralName]) -> List[Any]: ... def load_der_x509_certificate(data: bytes, backend: X509Backend) -> Certificate: ... def load_pem_x509_certificate(data: bytes, backend: X509Backend) -> Certificate: ... def load_der_x509_crl(data: bytes, backend: X509Backend) -> CertificateRevocationList: ... def load_pem_x509_crl(data: bytes, backend: X509Backend) -> CertificateRevocationList: ... def load_der_x509_csr(data: bytes, backend: X509Backend) -> CertificateSigningRequest: ... def load_pem_x509_csr(data: bytes, backend: X509Backend) -> CertificateSigningRequest: ... def __getattr__(name: str) -> Any: ... # incomplete jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/0000775000175000017500000000000013577125145026756 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/__init__.pyi0000664000175000017500000000007713577124116031241 0ustar davedave00000000000000from typing import Any def __getattr__(name: str) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/0000775000175000017500000000000013577125145030553 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/__init__.pyi0000664000175000017500000000000013577124116033020 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/0000775000175000017500000000000013577125145032236 5ustar davedave00000000000000././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/__init_0000664000175000017500000000000013577124116033544 0ustar davedave00000000000000././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/binding.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/binding0000664000175000017500000000022413577124116033566 0ustar davedave00000000000000from typing import Any, Optional class Binding(object): ffi: Optional[Any] lib: Optional[Any] def init_static_locks(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/0000775000175000017500000000000013577125145030530 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/__init__.pyi0000664000175000017500000000007213577124116033006 0ustar davedave00000000000000from typing import Any def default_backend() -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/interfaces.pyi0000664000175000017500000002005613577124116033376 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import Any, Optional, Union from cryptography.hazmat.primitives.asymmetric.dh import ( DHParameterNumbers, DHParameters, DHPrivateKey, DHPrivateNumbers, DHPublicKey, DHPublicNumbers, ) from cryptography.hazmat.primitives.asymmetric.dsa import ( DSAParameterNumbers, DSAParameters, DSAPrivateKey, DSAPrivateNumbers, DSAPublicKey, DSAPublicNumbers, ) from cryptography.hazmat.primitives.asymmetric.ec import ( EllipticCurve, EllipticCurvePrivateKey, EllipticCurvePrivateNumbers, EllipticCurvePublicKey, EllipticCurvePublicNumbers, EllipticCurveSignatureAlgorithm, ) from cryptography.hazmat.primitives.asymmetric.padding import AsymmetricPadding from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPrivateNumbers, RSAPublicKey, RSAPublicNumbers from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm, CipherAlgorithm, CipherContext from cryptography.hazmat.primitives.ciphers.modes import Mode from cryptography.hazmat.primitives.hashes import HashAlgorithm, HashContext from cryptography.x509 import ( Certificate, CertificateBuilder, CertificateRevocationList, CertificateRevocationListBuilder, CertificateSigningRequest, CertificateSigningRequestBuilder, Name, RevokedCertificate, RevokedCertificateBuilder, ) class CipherBackend(metaclass=ABCMeta): @abstractmethod def cipher_supported(self, cipher: CipherAlgorithm, mode: Mode) -> bool: ... @abstractmethod def create_symmetric_encryption_ctx(self, cipher: CipherAlgorithm, mode: Mode) -> CipherContext: ... @abstractmethod def create_symmetric_decryption_ctx(self, cipher: CipherAlgorithm, mode: Mode) -> CipherContext: ... class CMACBackend(metaclass=ABCMeta): @abstractmethod def cmac_algorithm_supported(self, algorithm: BlockCipherAlgorithm) -> bool: ... @abstractmethod def create_cmac_ctx(self, algorithm: BlockCipherAlgorithm) -> Any: ... class DERSerializationBackend(metaclass=ABCMeta): @abstractmethod def load_der_parameters(self, data: bytes) -> Any: ... @abstractmethod def load_der_private_key(self, data: bytes, password: Optional[bytes]) -> Any: ... @abstractmethod def load_der_public_key(self, data: bytes) -> Any: ... class DHBackend(metaclass=ABCMeta): @abstractmethod def dh_parameters_supported(self, p: int, g: int, q: Optional[int]) -> bool: ... @abstractmethod def dh_x942_serialization_supported(self) -> bool: ... @abstractmethod def generate_dh_parameters(self, generator: int, key_size: int) -> DHParameters: ... @abstractmethod def generate_dh_private_key(self, parameters: DHParameters) -> DHPrivateKey: ... @abstractmethod def generate_dh_private_key_and_parameters(self, generator: int, key_size: int) -> DHPrivateKey: ... @abstractmethod def load_dh_parameter_numbers(self, numbers: DHParameterNumbers) -> DHParameters: ... @abstractmethod def load_dh_private_numbers(self, numbers: DHPrivateNumbers) -> DHPrivateKey: ... @abstractmethod def load_dh_public_numbers(self, numbers: DHPublicNumbers) -> DHPublicKey: ... class DSABackend(metaclass=ABCMeta): @abstractmethod def dsa_hash_supported(self, algorithm: HashAlgorithm) -> bool: ... @abstractmethod def dsa_parameters_supported(self, p: int, q: int, g: int) -> bool: ... @abstractmethod def generate_dsa_parameters(self, key_size: int) -> DSAParameters: ... @abstractmethod def generate_dsa_private_key(self, parameters: DSAParameters) -> DSAPrivateKey: ... @abstractmethod def generate_dsa_private_key_and_parameters(self, key_size: int) -> DSAPrivateKey: ... @abstractmethod def load_dsa_parameter_numbers(self, numbers: DSAParameterNumbers) -> DSAParameters: ... @abstractmethod def load_dsa_private_numbers(self, numbers: DSAPrivateNumbers) -> DSAPrivateKey: ... @abstractmethod def load_dsa_public_numbers(self, numbers: DSAPublicNumbers) -> DSAPublicKey: ... class EllipticCurveBackend(metaclass=ABCMeta): @abstractmethod def derive_elliptic_curve_private_key(self, private_value: int, curve: EllipticCurve) -> EllipticCurvePrivateKey: ... @abstractmethod def elliptic_curve_signature_algorithm_supported( self, signature_algorithm: EllipticCurveSignatureAlgorithm, curve: EllipticCurve ) -> bool: ... @abstractmethod def elliptic_curve_supported(self, curve: EllipticCurve) -> bool: ... @abstractmethod def generate_elliptic_curve_private_key(self, curve: EllipticCurve) -> EllipticCurvePrivateKey: ... @abstractmethod def load_elliptic_curve_private_numbers(self, numbers: EllipticCurvePrivateNumbers) -> EllipticCurvePrivateKey: ... @abstractmethod def load_elliptic_curve_public_numbers(self, numbers: EllipticCurvePublicNumbers) -> EllipticCurvePublicKey: ... class HMACBackend(metaclass=ABCMeta): @abstractmethod def create_hmac_ctx(self, key: bytes, algorithm: HashAlgorithm) -> HashContext: ... @abstractmethod def cmac_algorithm_supported(self, algorithm: HashAlgorithm) -> bool: ... class HashBackend(metaclass=ABCMeta): @abstractmethod def create_hash_ctx(self, algorithm: HashAlgorithm) -> HashContext: ... @abstractmethod def hash_supported(self, algorithm: HashAlgorithm) -> bool: ... class PBKDF2HMACBackend(metaclass=ABCMeta): @abstractmethod def derive_pbkdf2_hmac( self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, key_material: bytes ) -> bytes: ... @abstractmethod def pbkdf2_hmac_supported(self, algorithm: HashAlgorithm) -> bool: ... class PEMSerializationBackend(metaclass=ABCMeta): @abstractmethod def load_pem_parameters(self, data: bytes) -> Any: ... @abstractmethod def load_pem_private_key(self, data: bytes, password: Optional[bytes]) -> Any: ... @abstractmethod def load_pem_public_key(self, data: bytes) -> Any: ... class RSABackend(metaclass=ABCMeta): @abstractmethod def generate_rsa_parameters_supported(self, public_exponent: int, key_size: int) -> bool: ... @abstractmethod def generate_rsa_private_key(self, public_exponent: int, key_size: int) -> RSAPrivateKey: ... @abstractmethod def load_rsa_public_numbers(self, numbers: RSAPublicNumbers) -> RSAPublicKey: ... @abstractmethod def load_rsa_private_numbers(self, numbers: RSAPrivateNumbers) -> RSAPrivateKey: ... @abstractmethod def rsa_padding_supported(self, padding: AsymmetricPadding) -> bool: ... class ScryptBackend(metaclass=ABCMeta): @abstractmethod def derive_scrypt(self, key_material: bytes, salt: bytes, length: int, n: int, r: int, p: int) -> bytes: ... class X509Backend(metaclass=ABCMeta): @abstractmethod def create_x509_certificate( self, builder: CertificateBuilder, private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: HashAlgorithm, ) -> Certificate: ... @abstractmethod def create_x509_crl( self, builder: CertificateRevocationListBuilder, private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: HashAlgorithm, ) -> CertificateRevocationList: ... @abstractmethod def create_x509_csr( self, builder: CertificateSigningRequestBuilder, private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: HashAlgorithm, ) -> CertificateSigningRequest: ... @abstractmethod def create_x509_revoked_certificate(self, builder: RevokedCertificateBuilder) -> RevokedCertificate: ... @abstractmethod def load_der_x509_certificate(self, data: bytes) -> Certificate: ... @abstractmethod def load_der_x509_csr(self, data: bytes) -> CertificateSigningRequest: ... @abstractmethod def load_pem_x509_certificate(self, data: bytes) -> Certificate: ... @abstractmethod def load_pem_x509_csr(self, data: bytes) -> CertificateSigningRequest: ... @abstractmethod def x509_name_bytes(self, name: Name) -> bytes: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/0000775000175000017500000000000013577125145031151 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/__init__.pyi0000664000175000017500000000007713577124116033434 0ustar davedave00000000000000from typing import Any def __getattr__(name: str) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi0000664000175000017500000000063413577124116032604 0ustar davedave00000000000000from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm class HMAC(object): def __init__(self, key: bytes, algorithm: HashAlgorithm, backend: HMACBackend) -> None: ... def copy(self) -> HMAC: ... def finalize(self) -> bytes: ... def update(self, msg: bytes) -> None: ... def verify(self, signature: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/0000775000175000017500000000000013577125145033326 5ustar davedave00000000000000././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/__0000664000175000017500000000007713577124116033627 0ustar davedave00000000000000from typing import Any def __getattr__(name: str) -> Any: ... ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed448.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed0000664000175000017500000000171513577124116033642 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat class Ed448PrivateKey(metaclass=ABCMeta): @classmethod def generate(cls) -> Ed448PrivateKey: ... @classmethod def from_private_bytes(cls, data: bytes) -> Ed448PrivateKey: ... @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def public_key(self) -> Ed448PublicKey: ... @abstractmethod def sign(self, data: bytes) -> bytes: ... class Ed448PublicKey(metaclass=ABCMeta): @classmethod def from_public_bytes(cls, data: bytes) -> Ed448PublicKey: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... @abstractmethod def verify(self, signature: bytes, data: bytes) -> None: ... ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rs0000664000175000017500000000620413577124116033674 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import Tuple, Union from cryptography.hazmat.backends.interfaces import RSABackend from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext from cryptography.hazmat.primitives.asymmetric.padding import AsymmetricPadding from cryptography.hazmat.primitives.asymmetric.utils import Prehashed from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat class RSAPrivateKey(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @abstractmethod def decrypt(self, ciphertext: bytes, padding: AsymmetricPadding) -> bytes: ... @abstractmethod def public_key(self) -> RSAPublicKey: ... @abstractmethod def sign(self, data: bytes, padding: AsymmetricPadding, algorithm: Union[HashAlgorithm, Prehashed]) -> bytes: ... class RSAPrivateKeyWithSerialization(RSAPrivateKey): @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def private_numbers(self) -> RSAPrivateNumbers: ... class RSAPublicKey(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @abstractmethod def encrypt(self, plaintext: bytes, padding: AsymmetricPadding) -> bytes: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... @abstractmethod def public_numbers(self) -> RSAPublicNumbers: ... @abstractmethod def verifier(self, signature: bytes, padding: AsymmetricPadding, algorithm: Union[HashAlgorithm, Prehashed]) -> AsymmetricVerificationContext: ... @abstractmethod def verify(self, signature: bytes, data: bytes, padding: AsymmetricPadding, algorithm: Union[HashAlgorithm, Prehashed]) -> None: ... RSAPublicKeyWithSerialization = RSAPublicKey def generate_private_key(public_exponent: int, key_size: int, backend: RSABackend) -> RSAPrivateKeyWithSerialization: ... def rsa_crt_iqmp(p: int, q: int) -> int: ... def rsa_crt_dmp1(private_exponent: int, p: int) -> int: ... def rsa_crt_dmq1(private_exponent: int, q: int) -> int: ... def rsa_recover_prime_factors(n: int, e: int, d: int) -> Tuple[int, int]: ... class RSAPrivateNumbers(object): def __init__(self, p: int, q: int, d: int, dmp1: int, dmq1: int, iqmp: int, public_numbers: RSAPublicNumbers) -> None: ... @property def p(self) -> int: ... @property def q(self) -> int: ... @property def d(self) -> int: ... @property def dmp1(self) -> int: ... @property def dmq1(self) -> int: ... @property def iqmp(self) -> int: ... @property def public_numbers(self) -> RSAPublicNumbers: ... def private_key(self, backend) -> RSAPrivateKey: ... class RSAPublicNumbers(object): def __init__(self, e: int, n: int) -> None: ... @property def p(self) -> int: ... @property def q(self) -> int: ... def public_key(self, backend) -> RSAPublicKey: ... ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh0000664000175000017500000000467213577124116033652 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import Optional from cryptography.hazmat.backends.interfaces import DHBackend from cryptography.hazmat.primitives.serialization import ( Encoding, KeySerializationEncryption, ParameterFormat, PrivateFormat, PublicFormat, ) class DHParameters(metaclass=ABCMeta): @abstractmethod def generate_private_key(self) -> DHPrivateKey: ... @abstractmethod def parameter_bytes(self, encoding: Encoding, format: ParameterFormat) -> bytes: ... @abstractmethod def parameter_numbers(self) -> DHParameterNumbers: ... DHParametersWithSerialization = DHParameters class DHParameterNumbers(object): @property def p(self) -> int: ... @property def g(self) -> int: ... @property def q(self) -> int: ... def __init__(self, p: int, g: int, q: Optional[int]) -> None: ... def parameters(self, backend: DHBackend) -> DHParameters: ... class DHPrivateKey(metaclass=ABCMeta): key_size: int @abstractmethod def exchange(self, peer_public_key: DHPublicKey) -> bytes: ... @abstractmethod def parameters(self) -> DHParameters: ... @abstractmethod def public_key(self) -> DHPublicKey: ... class DHPrivateKeyWithSerialization(DHPrivateKey): @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def private_numbers(self) -> DHPrivateNumbers: ... class DHPrivateNumbers(object): @property def public_numbers(self) -> DHPublicNumbers: ... @property def x(self) -> int: ... def __init__(self, x: int, public_numbers: DHPublicNumbers) -> None: ... def private_key(self, backend: DHBackend) -> DHPrivateKey: ... class DHPublicKey(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @abstractmethod def parameters(self) -> DHParameters: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... @abstractmethod def public_numbers(self) -> DHPublicNumbers: ... DHPublicKeyWithSerialization = DHPublicKey class DHPublicNumbers(object): @property def parameter_numbers(self) -> DHParameterNumbers: ... @property def y(self) -> int: ... def __init__(self, y: int, parameter_numbers: DHParameterNumbers) -> None: ... def public_key(self, backend: DHBackend) -> DHPublicKey: ... ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ut0000664000175000017500000000026213577124116033676 0ustar davedave00000000000000from typing import Tuple def decode_dss_signature(signature: bytes) -> Tuple[int, int]: ... def encode_dss_signature(r: int, s: int) -> bytes: ... class Prehashed(object): ... ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec0000664000175000017500000001601213577124116033635 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import ClassVar, Union from cryptography.hazmat.backends.interfaces import EllipticCurveBackend from cryptography.hazmat.primitives.asymmetric.utils import Prehashed from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat from cryptography.x509 import ObjectIdentifier class EllipticCurve(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @property @abstractmethod def name(self) -> str: ... class BrainpoolP256R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class BrainpoolP384R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class BrainpoolP512R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECP192R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECP224R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECP256K1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECP256R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECP384R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECP521R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT163K1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT163R2(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT233K1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT233R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT283K1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT283R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT409K1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT409R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT571K1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SECT571R1(EllipticCurve): @property def key_size(self) -> int: ... @property def name(self) -> str: ... class EllipticCurveOID(object): SECP192R1: ClassVar[ObjectIdentifier] SECP224R1: ClassVar[ObjectIdentifier] SECP256K1: ClassVar[ObjectIdentifier] SECP256R1: ClassVar[ObjectIdentifier] SECP384R1: ClassVar[ObjectIdentifier] SECP521R1: ClassVar[ObjectIdentifier] BRAINPOOLP256R1: ClassVar[ObjectIdentifier] BRAINPOOLP384R1: ClassVar[ObjectIdentifier] BRAINPOOLP512R1: ClassVar[ObjectIdentifier] SECT163K1: ClassVar[ObjectIdentifier] SECT163R2: ClassVar[ObjectIdentifier] SECT233K1: ClassVar[ObjectIdentifier] SECT233R1: ClassVar[ObjectIdentifier] SECT283K1: ClassVar[ObjectIdentifier] SECT283R1: ClassVar[ObjectIdentifier] SECT409K1: ClassVar[ObjectIdentifier] SECT409R1: ClassVar[ObjectIdentifier] SECT571K1: ClassVar[ObjectIdentifier] SECT571R1: ClassVar[ObjectIdentifier] class EllipticCurvePrivateKey(metaclass=ABCMeta): @property @abstractmethod def curve(self) -> EllipticCurve: ... @property @abstractmethod def key_size(self) -> int: ... @abstractmethod def exchange(self, algorithm: ECDH, peer_public_key: EllipticCurvePublicKey) -> bytes: ... @abstractmethod def public_key(self) -> EllipticCurvePublicKey: ... @abstractmethod def sign(self, data: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> bytes: ... class EllipticCurvePrivateKeyWithSerialization(EllipticCurvePrivateKey): @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def private_numbers(self) -> EllipticCurvePrivateNumbers: ... class EllipticCurvePrivateNumbers(object): @property def private_value(self) -> int: ... @property def public_numbers(self) -> EllipticCurvePublicNumbers: ... def __init__(self, private_value: int, public_numbers: EllipticCurvePublicNumbers) -> None: ... def private_key(self, backend: EllipticCurveBackend) -> EllipticCurvePrivateKey: ... class EllipticCurvePublicKey(metaclass=ABCMeta): @property @abstractmethod def curve(self) -> EllipticCurve: ... @property @abstractmethod def key_size(self) -> int: ... @classmethod def from_encoded_point(cls, curve: EllipticCurve, data: bytes) -> EllipticCurvePublicKey: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... @abstractmethod def public_numbers(self) -> EllipticCurvePublicNumbers: ... @abstractmethod def verifier(self, signature: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> AsymmetricVerificationContext: ... @abstractmethod def verify(self, signature: bytes, data: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> None: ... EllipticCurvePublicKeyWithSerialization = EllipticCurvePublicKey class EllipticCurvePublicNumbers(object): @property def curve(self) -> EllipticCurve: ... @property def x(self) -> int: ... @property def y(self) -> int: ... def __init__(self, x: int, y: int, curve: EllipticCurve) -> None: ... @classmethod def from_encoded_point(cls, curve: EllipticCurve, data: bytes) -> EllipticCurvePublicNumbers: ... def public_key(self, backend: EllipticCurveBackend) -> EllipticCurvePublicKey: ... class EllipticCurveSignatureAlgorithm(metaclass=ABCMeta): @property @abstractmethod def algorithm(self) -> Union[HashAlgorithm, Prehashed]: ... class ECDH(object): ... class ECDSA(EllipticCurveSignatureAlgorithm): def __init__(self, algorithm: HashAlgorithm): ... @property def algorithm(self) -> Union[HashAlgorithm, Prehashed]: ... def derive_private_key(private_value: int, curve: EllipticCurve, backend: EllipticCurveBackend) -> EllipticCurvePrivateKey: ... def generate_private_key(curve: EllipticCurve, backend: EllipticCurveBackend) -> EllipticCurvePrivateKey: ... def get_curve_for_oid(oid: ObjectIdentifier) -> EllipticCurve: ... ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x25519.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x20000664000175000017500000000162713577124116033605 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat class X25519PrivateKey(metaclass=ABCMeta): @classmethod def from_private_bytes(cls, data: bytes) -> X25519PrivateKey: ... @classmethod def generate(cls) -> X25519PrivateKey: ... @abstractmethod def exchange(self, peer_public_key: X25519PublicKey) -> bytes: ... @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def public_key(self) -> X25519PublicKey: ... class X25519PublicKey(metaclass=ABCMeta): @classmethod def from_public_bytes(cls, data: bytes) -> X25519PublicKey: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/padding.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/pa0000664000175000017500000000142313577124116033646 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import ClassVar, Optional, Union from cryptography.hazmat.primitives.hashes import HashAlgorithm class AsymmetricPadding(metaclass=ABCMeta): @property @abstractmethod def name(self) -> str: ... class MGF1(object): def __init__(self, algorithm: HashAlgorithm) -> None: ... class OAEP(AsymmetricPadding): def __init__(self, mgf: MGF1, algorithm: HashAlgorithm, label: Optional[bytes]) -> None: ... @property def name(self) -> str: ... class PKCS1v15(AsymmetricPadding): @property def name(self) -> str: ... class PSS(AsymmetricPadding): MAX_LENGTH: ClassVar[object] def __init__(self, mgf: MGF1, salt_length: Union[int, object]) -> None: ... @property def name(self) -> str: ... ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed25519.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed0000664000175000017500000000173113577124116033640 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat class Ed25519PrivateKey(metaclass=ABCMeta): @classmethod def generate(cls) -> Ed25519PrivateKey: ... @classmethod def from_private_bytes(cls, data: bytes) -> Ed25519PrivateKey: ... @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def public_key(self) -> Ed25519PublicKey: ... @abstractmethod def sign(self, data: bytes) -> bytes: ... class Ed25519PublicKey(metaclass=ABCMeta): @classmethod def from_public_bytes(cls, data: bytes) -> Ed25519PublicKey: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... @abstractmethod def verify(self, signature: bytes, data: bytes) -> None: ... ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x448.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x40000664000175000017500000000161113577124116033600 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat class X448PrivateKey(metaclass=ABCMeta): @classmethod def from_private_bytes(cls, data: bytes) -> X448PrivateKey: ... @classmethod def generate(cls) -> X448PrivateKey: ... @abstractmethod def exchange(self, peer_public_key: X448PublicKey) -> bytes: ... @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def public_key(self) -> X448PublicKey: ... class X448PublicKey(metaclass=ABCMeta): @classmethod def from_public_bytes(cls, data: bytes) -> X448PublicKey: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ds0000664000175000017500000000553713577124116033666 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import Union from cryptography.hazmat.backends.interfaces import DSABackend from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext from cryptography.hazmat.primitives.asymmetric.utils import Prehashed from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat class DSAParameters(metaclass=ABCMeta): @abstractmethod def generate_private_key(self) -> DSAPrivateKey: ... class DSAParametersWithNumbers(DSAParameters): @abstractmethod def parameter_numbers(self) -> DSAParameterNumbers: ... class DSAParameterNumbers(object): @property def p(self) -> int: ... @property def q(self) -> int: ... @property def g(self) -> int: ... def __init__(self, p: int, q: int, g: int) -> None: ... def parameters(self, backend: DSABackend) -> DSAParameters: ... class DSAPrivateKey(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @abstractmethod def parameters(self) -> DSAParameters: ... @abstractmethod def public_key(self) -> DSAPublicKey: ... @abstractmethod def sign(self, data: bytes, algorithm: Union[HashAlgorithm, Prehashed]) -> bytes: ... class DSAPrivateKeyWithSerialization(DSAPrivateKey): @abstractmethod def private_bytes( self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption ) -> bytes: ... @abstractmethod def private_numbers(self) -> DSAPrivateNumbers: ... class DSAPrivateNumbers(object): @property def x(self) -> int: ... @property def public_numbers(self) -> DSAPublicNumbers: ... def __init__(self, x: int, public_numbers: DSAPublicNumbers) -> None: ... class DSAPublicKey(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @abstractmethod def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ... @abstractmethod def public_numbers(self) -> DSAPublicNumbers: ... @abstractmethod def verifier(self, signature: bytes, signature_algorithm: Union[HashAlgorithm, Prehashed]) -> AsymmetricVerificationContext: ... @abstractmethod def verify(self, signature: bytes, data: bytes, algorithm: Union[HashAlgorithm, Prehashed]) -> None: ... DSAPublicKeyWithSerialization = DSAPublicKey class DSAPublicNumbers(object): @property def y(self) -> int: ... @property def parameter_numbers(self) -> DSAParameterNumbers: ... def __init__(self, y: int, parameter_numbers: DSAParameterNumbers) -> None: ... def generate_parameters(key_size: int, backend: DSABackend) -> DSAParameters: ... def generate_private_key(key_size: int, backend: DSABackend) -> DSAPrivateKey: ... ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/constant_time.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/constant_time0000664000175000017500000000005613577124116033741 0ustar davedave00000000000000def bytes_eq(a: bytes, b: bytes) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/poly1305.pyi0000664000175000017500000000077013577124116033171 0ustar davedave00000000000000from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm class Poly1305(object): def __init__(self, key: bytes) -> None: ... def finalize(self) -> bytes: ... @classmethod def generate_tag(cls, key: bytes, data: bytes) -> bytes: ... def update(self, data: bytes) -> None: ... def verify(self, tag: bytes) -> None: ... @classmethod def verify_tag(cls, key: bytes, data: bytes, tag: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi0000664000175000017500000000100613577124116033350 0ustar davedave00000000000000from cryptography.hazmat.backends.interfaces import CipherBackend def aes_key_wrap(wrapping_key: bytes, key_to_wrap: bytes, backend: CipherBackend) -> bytes: ... def aes_key_wrap_with_padding(wrapping_key: bytes, key_to_wrap: bytes, backend: CipherBackend) -> bytes: ... def aes_key_unwrap(wrapping_key: bytes, wrapped_key: bytes, backend: CipherBackend) -> bytes: ... def aes_key_unwrap_with_padding(wrapping_key: bytes, wrapped_key: bytes, backend: CipherBackend) -> bytes: ... class InvalidUnwrap(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/0000775000175000017500000000000013577125145033161 5ustar davedave00000000000000././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/__i0000664000175000017500000000004313577124116033624 0ustar davedave00000000000000class InvalidToken(Exception): ... ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/totp.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/tot0000664000175000017500000000111113577124116033701 0ustar davedave00000000000000from typing import Optional from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm class TOTP(object): def __init__( self, key: bytes, length: int, algorithm: HashAlgorithm, time_step: int, backend: HMACBackend, enforce_key_length: bool = ..., ): ... def generate(self, time: int) -> bytes: ... def get_provisioning_uri(self, account_name: str, issuer: Optional[str]) -> str: ... def verify(self, totp: bytes, time: int) -> None: ... ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/hotp.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/hot0000664000175000017500000000103413577124116033671 0ustar davedave00000000000000from typing import Optional from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm class HOTP(object): def __init__( self, key: bytes, length: int, algorithm: HashAlgorithm, backend: HMACBackend, enforce_key_length: bool = ... ): ... def generate(self, counter: int) -> bytes: ... def get_provisioning_uri(self, account_name: str, counter: int, issuer: Optional[str]) -> str: ... def verify(self, hotp: bytes, counter: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi0000664000175000017500000000242213577124116033144 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from cryptography.hazmat.backends.interfaces import HashBackend class HashAlgorithm(metaclass=ABCMeta): digest_size: int name: str class HashContext(metaclass=ABCMeta): algorithm: HashAlgorithm @abstractmethod def copy(self) -> HashContext: ... @abstractmethod def finalize(self) -> bytes: ... @abstractmethod def update(self, data: bytes) -> None: ... class BLAKE2b(HashAlgorithm): ... class BLAKE2s(HashAlgorithm): ... class MD5(HashAlgorithm): ... class SHA1(HashAlgorithm): ... class SHA224(HashAlgorithm): ... class SHA256(HashAlgorithm): ... class SHA384(HashAlgorithm): ... class SHA3_224(HashAlgorithm): ... class SHA3_256(HashAlgorithm): ... class SHA3_384(HashAlgorithm): ... class SHA3_512(HashAlgorithm): ... class SHA512(HashAlgorithm): ... class SHA512_224(HashAlgorithm): ... class SHA512_256(HashAlgorithm): ... class SHAKE128(HashAlgorithm): def __init__(self, digest_size: int) -> None: ... class SHAKE256(HashAlgorithm): def __init__(self, digest_size: int) -> None: ... class Hash(HashContext): def __init__(self, algorithm: HashAlgorithm, backend: HashBackend): ... def copy(self) -> Hash: ... def finalize(self) -> bytes: ... def update(self, data: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/padding.pyi0000664000175000017500000000103413577124116033275 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod class PaddingContext(metaclass=ABCMeta): @abstractmethod def finalize(self) -> bytes: ... @abstractmethod def update(self, data: bytes) -> bytes: ... class ANSIX923(object): def __init__(self, block_size: int) -> None: ... def padder(self) -> PaddingContext: ... def unpadder(self) -> PaddingContext: ... class PKCS7(object): def __init__(self, block_size: int) -> None: ... def padder(self) -> PaddingContext: ... def unpadder(self) -> PaddingContext: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi0000664000175000017500000000064013577124116032574 0ustar davedave00000000000000from cryptography.hazmat.backends.interfaces import CMACBackend from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm class CMAC(object): def __init__(self, algorithm: BlockCipherAlgorithm, backend: CMACBackend) -> None: ... def copy(self) -> CMAC: ... def finalize(self) -> bytes: ... def update(self, data: bytes) -> None: ... def verify(self, signature: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/0000775000175000017500000000000013577125145031715 5ustar davedave00000000000000././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/__init__.0000664000175000017500000000040513577124116033451 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod class KeyDerivationFunction(metaclass=ABCMeta): @abstractmethod def derive(self, key_material: bytes) -> bytes: ... @abstractmethod def verify(self, key_material: bytes, expected_key: bytes) -> None: ... ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.py0000664000175000017500000000076613577124116033445 0ustar davedave00000000000000from cryptography.hazmat.backends.interfaces import PBKDF2HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class PBKDF2HMAC(KeyDerivationFunction): def __init__(self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, backend: PBKDF2HMACBackend): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi0000664000175000017500000000152313577124116033517 0ustar davedave00000000000000from enum import Enum from typing import Optional from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class Mode(Enum): CounterMode: str class CounterLocation(Enum): BeforeFixed: str AfterFixed: str class KBKDFHMAC(KeyDerivationFunction): def __init__( self, algorithm: HashAlgorithm, mode: Mode, length: int, rlen: int, llen: int, location: CounterLocation, label: Optional[bytes], context: Optional[bytes], fixed: Optional[bytes], backend: HMACBackend, ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.p0000664000175000017500000000100313577124116033263 0ustar davedave00000000000000from typing import Optional from cryptography.hazmat.backends.interfaces import HashBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class X963KDF(KeyDerivationFunction): def __init__(self, algorithm: HashAlgorithm, length: int, sharedinfo: Optional[bytes], backend: HashBackend): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi0000664000175000017500000000147513577124116033360 0ustar davedave00000000000000from typing import Optional from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class HKDF(KeyDerivationFunction): def __init__( self, algorithm: HashAlgorithm, length: int, salt: Optional[bytes], info: Optional[bytes], backend: HMACBackend ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... class HKDFExpand(KeyDerivationFunction): def __init__(self, algorithm: HashAlgorithm, length: int, info: Optional[bytes], backend: HMACBackend): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf0000664000175000017500000000154013577124116033571 0ustar davedave00000000000000from typing import Optional from cryptography.hazmat.backends.interfaces import HashBackend, HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class ConcatKDFHash(KeyDerivationFunction): def __init__(self, algorithm: HashAlgorithm, length: int, otherinfo: Optional[bytes], backend: HashBackend): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... class ConcatKDFHMAC(KeyDerivationFunction): def __init__( self, algorithm: HashAlgorithm, length: int, salt: Optional[bytes], otherinfo: Optional[bytes], backend: HMACBackend ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.py0000664000175000017500000000062713577124116033615 0ustar davedave00000000000000from cryptography.hazmat.backends.interfaces import ScryptBackend from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class Scrypt(KeyDerivationFunction): def __init__(self, salt: bytes, length: int, n: int, r: int, p: int, backend: ScryptBackend): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/0000775000175000017500000000000013577125145032606 5ustar davedave00000000000000././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/__ini0000664000175000017500000000242213577124116033603 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from cryptography.hazmat.backends.interfaces import CipherBackend from cryptography.hazmat.primitives.ciphers.modes import Mode class AEADCipherContext(metaclass=ABCMeta): @abstractmethod def authenticate_additional_data(self, data: bytes) -> None: ... class AEADDecryptionContext(metaclass=ABCMeta): @abstractmethod def finalize_with_tag(self, tag: bytes) -> bytes: ... class AEADEncryptionContext(metaclass=ABCMeta): @property @abstractmethod def tag(self) -> bytes: ... class BlockCipherAlgorithm(metaclass=ABCMeta): @property @abstractmethod def block_size(self) -> int: ... class Cipher(object): def __init__(self, algorithm: CipherAlgorithm, mode: Mode, backend: CipherBackend) -> None: ... def decryptor(self) -> CipherContext: ... def encryptor(self) -> CipherContext: ... class CipherAlgorithm(metaclass=ABCMeta): @property @abstractmethod def key_size(self) -> int: ... @property @abstractmethod def name(self) -> str: ... class CipherContext(metaclass=ABCMeta): @abstractmethod def finalize(self) -> bytes: ... @abstractmethod def update(self, data: bytes) -> bytes: ... @abstractmethod def update_into(self, data: bytes, buf) -> int: ... ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/aead.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/aead.0000664000175000017500000000205113577124116033474 0ustar davedave00000000000000from typing import Optional class AESCCM(object): def __init__(self, key: bytes, tag_length: Optional[int]) -> None: ... def decrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ... def encrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ... @classmethod def generate_key(cls, bit_length: int) -> bytes: ... class AESGCM(object): def __init__(self, key: bytes) -> None: ... def decrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ... def encrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ... @classmethod def generate_key(cls, bit_length: int) -> bytes: ... class ChaCha20Poly1305(object): def __init__(self, key: bytes) -> None: ... def decrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ... def encrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ... @classmethod def generate_key(cls) -> bytes: ... ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/algorithms.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/algor0000664000175000017500000000427713577124116033644 0ustar davedave00000000000000from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm, CipherAlgorithm from cryptography.hazmat.primitives.ciphers.modes import ModeWithNonce class AES(BlockCipherAlgorithm, CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def block_size(self) -> int: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class ARC4(CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class Blowfish(BlockCipherAlgorithm, CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def block_size(self) -> int: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class Camelia(BlockCipherAlgorithm, CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def block_size(self) -> int: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class CAST5(BlockCipherAlgorithm, CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def block_size(self) -> int: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class ChaCha20(CipherAlgorithm, ModeWithNonce): def __init__(self, key: bytes, nonce: bytes) -> None: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... @property def nonce(self) -> bytes: ... class IDEA(CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class SEED(BlockCipherAlgorithm, CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def block_size(self) -> int: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... class TripleDES(BlockCipherAlgorithm, CipherAlgorithm): def __init__(self, key: bytes) -> None: ... @property def block_size(self) -> int: ... @property def key_size(self) -> int: ... @property def name(self) -> str: ... ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/modes.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/modes0000664000175000017500000000602113577124116033634 0ustar davedave00000000000000from abc import ABCMeta, abstractmethod from typing import Optional from cryptography.hazmat.primitives.ciphers import CipherAlgorithm class Mode(metaclass=ABCMeta): @property @abstractmethod def name(self) -> str: ... @abstractmethod def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class ModeWithAuthenticationTag(metaclass=ABCMeta): @property @abstractmethod def tag(self) -> bytes: ... class ModeWithInitializationVector(metaclass=ABCMeta): @property @abstractmethod def initialization_vector(self) -> bytes: ... class ModeWithNonce(metaclass=ABCMeta): @property @abstractmethod def nonce(self) -> bytes: ... class ModeWithTweak(metaclass=ABCMeta): @property @abstractmethod def tweak(self) -> bytes: ... class CBC(Mode, ModeWithInitializationVector): def __init__(self, initialization_vector: bytes) -> None: ... @property def initialization_vector(self) -> bytes: ... @property def name(self) -> str: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class CTR(Mode, ModeWithNonce): def __init__(self, nonce: bytes) -> None: ... @property def name(self) -> str: ... @property def nonce(self) -> bytes: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class CFB(Mode, ModeWithInitializationVector): def __init__(self, initialization_vector: bytes) -> None: ... @property def initialization_vector(self) -> bytes: ... @property def name(self) -> str: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class CFB8(Mode, ModeWithInitializationVector): def __init__(self, initialization_vector: bytes) -> None: ... @property def initialization_vector(self) -> bytes: ... @property def name(self) -> str: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class ECB(Mode): @property def name(self) -> str: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class GCM(Mode, ModeWithInitializationVector, ModeWithAuthenticationTag): def __init__(self, initialization_vector: bytes, tag: Optional[bytes], min_tag_length: Optional[int]) -> None: ... @property def initialization_vector(self) -> bytes: ... @property def name(self) -> str: ... @property def tag(self) -> bytes: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class OFB(Mode, ModeWithInitializationVector): def __init__(self, initialization_vector: bytes) -> None: ... @property def initialization_vector(self) -> bytes: ... @property def name(self) -> str: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... class XTS(Mode, ModeWithTweak): def __init__(self, tweak: bytes) -> None: ... @property def name(self) -> str: ... @property def tweak(self) -> bytes: ... def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ... ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization0000775000175000017500000000000013577125145033747 5ustar davedave00000000000000././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/__init__.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization0000664000175000017500000000175613577124116033757 0ustar davedave00000000000000from abc import ABCMeta from enum import Enum from typing import Optional def load_pem_private_key(data: bytes, password: Optional[bytes], backend): ... def load_pem_public_key(data: bytes, backend): ... def load_der_private_key(data: bytes, password: Optional[bytes], backend): ... def load_der_public_key(data: bytes, backend): ... def load_ssh_public_key(data: bytes, backend): ... class Encoding(Enum): PEM: str DER: str OpenSSH: str Raw: str X962: str class PrivateFormat(Enum): PKCS8: str TraditionalOpenSSL: str Raw: str class PublicFormat(Enum): SubjectPublicKeyInfo: str PKCS1: str OpenSSH: str Raw: str CompressedPoint: str UncompressedPoint: str class ParameterFormat(Enum): PKCS3: str class KeySerializationEncryption(metaclass=ABCMeta): ... class BestAvailableEncryption(KeySerializationEncryption): password: bytes def __init__(self, password: bytes) -> None: ... class NoEncryption(KeySerializationEncryption): ... ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyijedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization0000664000175000017500000000016113577124116033744 0ustar davedave00000000000000from typing import Optional def load_key_and_certificates(data: bytes, password: Optional[bytes], backend): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/cryptography/exceptions.pyi0000664000175000017500000000040613577124116030373 0ustar davedave00000000000000class AlreadyFinalized(Exception): ... class AlreadyUpdated(Exception): ... class InvalidKey(Exception): ... class InvalidSignature(Exception): ... class InvalidTag(Exception): ... class NotYetFinalized(Exception): ... class UnsupportedAlgorithm(Exception): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pytz/0000775000175000017500000000000013577125145023745 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/pytz/__init__.pyi0000664000175000017500000000354313577124116026231 0ustar davedave00000000000000from typing import Optional, List, Set, Mapping, Union import datetime class BaseTzInfo(datetime.tzinfo): zone: str = ... def localize(self, dt: datetime.datetime, is_dst: Optional[bool] = ...) -> datetime.datetime: ... def normalize(self, dt: datetime.datetime) -> datetime.datetime: ... class _UTCclass(BaseTzInfo): def tzname(self, dt: Optional[datetime.datetime]) -> str: ... def utcoffset(self, dt: Optional[datetime.datetime]) -> datetime.timedelta: ... def dst(self, dt: Optional[datetime.datetime]) -> datetime.timedelta: ... class _StaticTzInfo(BaseTzInfo): def tzname(self, dt: Optional[datetime.datetime], is_dst: Optional[bool] = ...) -> str: ... def utcoffset(self, dt: Optional[datetime.datetime], is_dst: Optional[bool] = ...) -> datetime.timedelta: ... def dst(self, dt: Optional[datetime.datetime], is_dst: Optional[bool] = ...) -> datetime.timedelta: ... class _DstTzInfo(BaseTzInfo): def tzname(self, dt: Optional[datetime.datetime], is_dst: Optional[bool] = ...) -> str: ... def utcoffset(self, dt: Optional[datetime.datetime], is_dst: Optional[bool] = ...) -> Optional[datetime.timedelta]: ... def dst(self, dt: Optional[datetime.datetime], is_dst: Optional[bool] = ...) -> Optional[datetime.timedelta]: ... class UnknownTimeZoneError(KeyError): ... class InvalidTimeError(Exception): ... class AmbiguousTimeError(InvalidTimeError): ... class NonExistentTimeError(InvalidTimeError): ... utc: _UTCclass UTC: _UTCclass def timezone(zone: str) -> Union[_UTCclass, _StaticTzInfo, _DstTzInfo]: ... def FixedOffset(offset: int) -> Union[_UTCclass, datetime.tzinfo]: ... all_timezones: List[str] all_timezones_set: Set[str] common_timezones: List[str] common_timezones_set: Set[str] country_timezones: Mapping[str, List[str]] country_names: Mapping[str, str] ZERO: datetime.timedelta HOUR: datetime.timedelta VERSION: str jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/0000775000175000017500000000000013577125145024602 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/__init__.pyi0000664000175000017500000001264313577124116027067 0ustar davedave00000000000000from types import ModuleType from typing import Any from werkzeug import _internal from werkzeug import datastructures from werkzeug import debug from werkzeug import exceptions from werkzeug import formparser from werkzeug import http from werkzeug import local from werkzeug import security from werkzeug import serving from werkzeug import test from werkzeug import testapp from werkzeug import urls from werkzeug import useragents from werkzeug import utils from werkzeug import wrappers from werkzeug import wsgi class module(ModuleType): def __getattr__(self, name): ... def __dir__(self): ... __version__: Any run_simple = serving.run_simple test_app = testapp.test_app UserAgent = useragents.UserAgent _easteregg = _internal._easteregg DebuggedApplication = debug.DebuggedApplication MultiDict = datastructures.MultiDict CombinedMultiDict = datastructures.CombinedMultiDict Headers = datastructures.Headers EnvironHeaders = datastructures.EnvironHeaders ImmutableList = datastructures.ImmutableList ImmutableDict = datastructures.ImmutableDict ImmutableMultiDict = datastructures.ImmutableMultiDict TypeConversionDict = datastructures.TypeConversionDict ImmutableTypeConversionDict = datastructures.ImmutableTypeConversionDict Accept = datastructures.Accept MIMEAccept = datastructures.MIMEAccept CharsetAccept = datastructures.CharsetAccept LanguageAccept = datastructures.LanguageAccept RequestCacheControl = datastructures.RequestCacheControl ResponseCacheControl = datastructures.ResponseCacheControl ETags = datastructures.ETags HeaderSet = datastructures.HeaderSet WWWAuthenticate = datastructures.WWWAuthenticate Authorization = datastructures.Authorization FileMultiDict = datastructures.FileMultiDict CallbackDict = datastructures.CallbackDict FileStorage = datastructures.FileStorage OrderedMultiDict = datastructures.OrderedMultiDict ImmutableOrderedMultiDict = datastructures.ImmutableOrderedMultiDict escape = utils.escape environ_property = utils.environ_property append_slash_redirect = utils.append_slash_redirect redirect = utils.redirect cached_property = utils.cached_property import_string = utils.import_string dump_cookie = http.dump_cookie parse_cookie = http.parse_cookie unescape = utils.unescape format_string = utils.format_string find_modules = utils.find_modules header_property = utils.header_property html = utils.html xhtml = utils.xhtml HTMLBuilder = utils.HTMLBuilder validate_arguments = utils.validate_arguments ArgumentValidationError = utils.ArgumentValidationError bind_arguments = utils.bind_arguments secure_filename = utils.secure_filename BaseResponse = wrappers.BaseResponse BaseRequest = wrappers.BaseRequest Request = wrappers.Request Response = wrappers.Response AcceptMixin = wrappers.AcceptMixin ETagRequestMixin = wrappers.ETagRequestMixin ETagResponseMixin = wrappers.ETagResponseMixin ResponseStreamMixin = wrappers.ResponseStreamMixin CommonResponseDescriptorsMixin = wrappers.CommonResponseDescriptorsMixin UserAgentMixin = wrappers.UserAgentMixin AuthorizationMixin = wrappers.AuthorizationMixin WWWAuthenticateMixin = wrappers.WWWAuthenticateMixin CommonRequestDescriptorsMixin = wrappers.CommonRequestDescriptorsMixin Local = local.Local LocalManager = local.LocalManager LocalProxy = local.LocalProxy LocalStack = local.LocalStack release_local = local.release_local generate_password_hash = security.generate_password_hash check_password_hash = security.check_password_hash Client = test.Client EnvironBuilder = test.EnvironBuilder create_environ = test.create_environ run_wsgi_app = test.run_wsgi_app get_current_url = wsgi.get_current_url get_host = wsgi.get_host pop_path_info = wsgi.pop_path_info peek_path_info = wsgi.peek_path_info SharedDataMiddleware = wsgi.SharedDataMiddleware DispatcherMiddleware = wsgi.DispatcherMiddleware ClosingIterator = wsgi.ClosingIterator FileWrapper = wsgi.FileWrapper make_line_iter = wsgi.make_line_iter LimitedStream = wsgi.LimitedStream responder = wsgi.responder wrap_file = wsgi.wrap_file extract_path_info = wsgi.extract_path_info parse_etags = http.parse_etags parse_date = http.parse_date http_date = http.http_date cookie_date = http.cookie_date parse_cache_control_header = http.parse_cache_control_header is_resource_modified = http.is_resource_modified parse_accept_header = http.parse_accept_header parse_set_header = http.parse_set_header quote_etag = http.quote_etag unquote_etag = http.unquote_etag generate_etag = http.generate_etag dump_header = http.dump_header parse_list_header = http.parse_list_header parse_dict_header = http.parse_dict_header parse_authorization_header = http.parse_authorization_header parse_www_authenticate_header = http.parse_www_authenticate_header remove_entity_headers = http.remove_entity_headers is_entity_header = http.is_entity_header remove_hop_by_hop_headers = http.remove_hop_by_hop_headers parse_options_header = http.parse_options_header dump_options_header = http.dump_options_header is_hop_by_hop_header = http.is_hop_by_hop_header unquote_header_value = http.unquote_header_value quote_header_value = http.quote_header_value HTTP_STATUS_CODES = http.HTTP_STATUS_CODES url_decode = urls.url_decode url_encode = urls.url_encode url_quote = urls.url_quote url_quote_plus = urls.url_quote_plus url_unquote = urls.url_unquote url_unquote_plus = urls.url_unquote_plus url_fix = urls.url_fix Href = urls.Href iri_to_uri = urls.iri_to_uri uri_to_iri = urls.uri_to_iri parse_form_data = formparser.parse_form_data abort = exceptions.Aborter Aborter = exceptions.Aborter jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/routing.pyi0000664000175000017500000001462513577124116027021 0ustar davedave00000000000000from typing import Any, Optional, Text from werkzeug.exceptions import HTTPException def parse_converter_args(argstr): ... def parse_rule(rule): ... class RoutingException(Exception): ... class RequestRedirect(HTTPException, RoutingException): code: Any new_url: Any def __init__(self, new_url): ... def get_response(self, environ): ... class RequestSlash(RoutingException): ... class RequestAliasRedirect(RoutingException): matched_values: Any def __init__(self, matched_values): ... class BuildError(RoutingException, LookupError): endpoint: Any values: Any method: Any adapter: Optional[MapAdapter] def __init__(self, endpoint, values, method, adapter: Optional[MapAdapter] = ...) -> None: ... @property def suggested(self) -> Optional[Rule]: ... def closest_rule(self, adapter: Optional[MapAdapter]) -> Optional[Rule]: ... class ValidationError(ValueError): ... class RuleFactory: def get_rules(self, map): ... class Subdomain(RuleFactory): subdomain: Any rules: Any def __init__(self, subdomain, rules): ... def get_rules(self, map): ... class Submount(RuleFactory): path: Any rules: Any def __init__(self, path, rules): ... def get_rules(self, map): ... class EndpointPrefix(RuleFactory): prefix: Any rules: Any def __init__(self, prefix, rules): ... def get_rules(self, map): ... class RuleTemplate: rules: Any def __init__(self, rules): ... def __call__(self, *args, **kwargs): ... class RuleTemplateFactory(RuleFactory): rules: Any context: Any def __init__(self, rules, context): ... def get_rules(self, map): ... class Rule(RuleFactory): rule: Any is_leaf: Any map: Any strict_slashes: Any subdomain: Any host: Any defaults: Any build_only: Any alias: Any methods: Any endpoint: Any redirect_to: Any arguments: Any def __init__(self, string, defaults: Optional[Any] = ..., subdomain: Optional[Any] = ..., methods: Optional[Any] = ..., build_only: bool = ..., endpoint: Optional[Any] = ..., strict_slashes: Optional[Any] = ..., redirect_to: Optional[Any] = ..., alias: bool = ..., host: Optional[Any] = ...): ... def empty(self): ... def get_empty_kwargs(self): ... def get_rules(self, map): ... def refresh(self): ... def bind(self, map, rebind: bool = ...): ... def get_converter(self, variable_name, converter_name, args, kwargs): ... def compile(self): ... def match(self, path, method: Optional[Any] = ...): ... def build(self, values, append_unknown: bool = ...): ... def provides_defaults_for(self, rule): ... def suitable_for(self, values, method: Optional[Any] = ...): ... def match_compare_key(self): ... def build_compare_key(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class BaseConverter: regex: Any weight: Any map: Any def __init__(self, map): ... def to_python(self, value): ... def to_url(self, value): ... class UnicodeConverter(BaseConverter): regex: Any def __init__(self, map, minlength: int = ..., maxlength: Optional[Any] = ..., length: Optional[Any] = ...): ... class AnyConverter(BaseConverter): regex: Any def __init__(self, map, *items): ... class PathConverter(BaseConverter): regex: Any weight: Any class NumberConverter(BaseConverter): weight: Any fixed_digits: Any min: Any max: Any def __init__(self, map, fixed_digits: int = ..., min: Optional[Any] = ..., max: Optional[Any] = ...): ... def to_python(self, value): ... def to_url(self, value): ... class IntegerConverter(NumberConverter): regex: Any num_convert: Any class FloatConverter(NumberConverter): regex: Any num_convert: Any def __init__(self, map, min: Optional[Any] = ..., max: Optional[Any] = ...): ... class UUIDConverter(BaseConverter): regex: Any def to_python(self, value): ... def to_url(self, value): ... DEFAULT_CONVERTERS: Any class Map: default_converters: Any default_subdomain: Any charset: Text encoding_errors: Text strict_slashes: Any redirect_defaults: Any host_matching: Any converters: Any sort_parameters: Any sort_key: Any def __init__(self, rules: Optional[Any] = ..., default_subdomain: str = ..., charset: Text = ..., strict_slashes: bool = ..., redirect_defaults: bool = ..., converters: Optional[Any] = ..., sort_parameters: bool = ..., sort_key: Optional[Any] = ..., encoding_errors: Text = ..., host_matching: bool = ...): ... def is_endpoint_expecting(self, endpoint, *arguments): ... def iter_rules(self, endpoint: Optional[Any] = ...): ... def add(self, rulefactory): ... def bind(self, server_name, script_name: Optional[Any] = ..., subdomain: Optional[Any] = ..., url_scheme: str = ..., default_method: str = ..., path_info: Optional[Any] = ..., query_args: Optional[Any] = ...): ... def bind_to_environ(self, environ, server_name: Optional[Any] = ..., subdomain: Optional[Any] = ...): ... def update(self): ... class MapAdapter: map: Any server_name: Any script_name: Any subdomain: Any url_scheme: Any path_info: Any default_method: Any query_args: Any def __init__(self, map, server_name, script_name, subdomain, url_scheme, path_info, default_method, query_args: Optional[Any] = ...): ... def dispatch(self, view_func, path_info: Optional[Any] = ..., method: Optional[Any] = ..., catch_http_exceptions: bool = ...): ... def match(self, path_info: Optional[Any] = ..., method: Optional[Any] = ..., return_rule: bool = ..., query_args: Optional[Any] = ...): ... def test(self, path_info: Optional[Any] = ..., method: Optional[Any] = ...): ... def allowed_methods(self, path_info: Optional[Any] = ...): ... def get_host(self, domain_part): ... def get_default_redirect(self, rule, method, values, query_args): ... def encode_query_args(self, query_args): ... def make_redirect_url(self, path_info, query_args: Optional[Any] = ..., domain_part: Optional[Any] = ...): ... def make_alias_redirect_url(self, path, endpoint, values, method, query_args): ... def build(self, endpoint, values: Optional[Any] = ..., method: Optional[Any] = ..., force_external: bool = ..., append_unknown: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/_compat.pyi0000664000175000017500000000216313577124116026746 0ustar davedave00000000000000import sys from typing import Any, Optional, Text if sys.version_info < (3,): import StringIO as BytesIO else: from io import StringIO as BytesIO PY2: Any WIN: Any unichr: Any text_type: Any string_types: Any integer_types: Any iterkeys: Any itervalues: Any iteritems: Any iterlists: Any iterlistvalues: Any int_to_byte: Any iter_bytes: Any def fix_tuple_repr(obj): ... def implements_iterator(cls): ... def implements_to_string(cls): ... def native_string_result(func): ... def implements_bool(cls): ... range_type: Any NativeStringIO: Any def make_literal_wrapper(reference): ... def normalize_string_tuple(tup): ... def try_coerce_native(s): ... wsgi_get_bytes: Any def wsgi_decoding_dance(s, charset: Text = ..., errors: Text = ...): ... def wsgi_encoding_dance(s, charset: Text = ..., errors: Text = ...): ... def to_bytes(x, charset: Text = ..., errors: Text = ...): ... def to_native(x, charset: Text = ..., errors: Text = ...): ... def reraise(tp, value, tb: Optional[Any] = ...): ... imap: Any izip: Any ifilter: Any def to_unicode(x, charset: Text = ..., errors: Text = ..., allow_none_charset: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/security.pyi0000664000175000017500000000101413577124116027165 0ustar davedave00000000000000from typing import Any, Optional SALT_CHARS: Any DEFAULT_PBKDF2_ITERATIONS: Any def pbkdf2_hex(data, salt, iterations=..., keylen: Optional[Any] = ..., hashfunc: Optional[Any] = ...): ... def pbkdf2_bin(data, salt, iterations=..., keylen: Optional[Any] = ..., hashfunc: Optional[Any] = ...): ... def safe_str_cmp(a, b): ... def gen_salt(length): ... def generate_password_hash(password, method: str = ..., salt_length: int = ...): ... def check_password_hash(pwhash, password): ... def safe_join(directory, filename): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/0000775000175000017500000000000013577125145026242 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/__init__.pyi0000664000175000017500000000000013577124116030507 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/jsrouting.pyi0000664000175000017500000000050513577124116031006 0ustar davedave00000000000000from typing import Any def dumps(*args): ... def render_template(name_parts, rules, converters): ... def generate_map(map, name: str = ...): ... def generate_adapter(adapter, name: str = ..., map_name: str = ...): ... def js_to_url_function(converter): ... def NumberConverter_js_to_url(conv): ... js_to_url_functions: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/lint.pyi0000664000175000017500000000004013577124116027722 0ustar davedave00000000000000from ..middleware.lint import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/profiler.pyi0000664000175000017500000000070113577124116030602 0ustar davedave00000000000000from typing import Any, AnyStr, Generic, Optional, Protocol, Tuple, TypeVar from ..middleware.profiler import * _T = TypeVar("_T") _T_contra = TypeVar("_T_contra", contravariant=True) class _Writable(Protocol[_T_contra]): def write(self, __s: _T_contra) -> Any: ... class MergeStream(Generic[_T]): streams: Tuple[_Writable[_T], ...] def __init__(self, *streams: _Writable[_T]) -> None: ... def write(self, data: _T) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/testtools.pyi0000664000175000017500000000032313577124116031020 0ustar davedave00000000000000from typing import Any from werkzeug.wrappers import Response class ContentAccessors: def xml(self): ... def lxml(self): ... def json(self): ... class TestResponse(Response, ContentAccessors): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/securecookie.pyi0000664000175000017500000000220413577124116031440 0ustar davedave00000000000000from typing import Any, Optional from hmac import new as hmac from hashlib import sha1 as _default_hash from werkzeug.contrib.sessions import ModificationTrackingDict class UnquoteError(Exception): ... class SecureCookie(ModificationTrackingDict[Any, Any]): hash_method: Any serialization_method: Any quote_base64: Any secret_key: Any new: Any def __init__(self, data: Optional[Any] = ..., secret_key: Optional[Any] = ..., new: bool = ...): ... @property def should_save(self): ... @classmethod def quote(cls, value): ... @classmethod def unquote(cls, value): ... def serialize(self, expires: Optional[Any] = ...): ... @classmethod def unserialize(cls, string, secret_key): ... @classmethod def load_cookie(cls, request, key: str = ..., secret_key: Optional[Any] = ...): ... def save_cookie(self, response, key: str = ..., expires: Optional[Any] = ..., session_expires: Optional[Any] = ..., max_age: Optional[Any] = ..., path: str = ..., domain: Optional[Any] = ..., secure: Optional[Any] = ..., httponly: bool = ..., force: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/wrappers.pyi0000664000175000017500000000113313577124116030623 0ustar davedave00000000000000from typing import Any def is_known_charset(charset): ... class JSONRequestMixin: def json(self): ... class ProtobufRequestMixin: protobuf_check_initialization: Any def parse_protobuf(self, proto_type): ... class RoutingArgsRequestMixin: routing_args: Any routing_vars: Any class ReverseSlashBehaviorRequestMixin: def path(self): ... def script_root(self): ... class DynamicCharsetRequestMixin: default_charset: Any def unknown_charset(self, charset): ... def charset(self): ... class DynamicCharsetResponseMixin: default_charset: Any charset: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/atom.pyi0000664000175000017500000000216013577124116027721 0ustar davedave00000000000000from typing import Any, Optional XHTML_NAMESPACE: Any def format_iso8601(obj): ... class AtomFeed: default_generator: Any title: Any title_type: Any url: Any feed_url: Any id: Any updated: Any author: Any icon: Any logo: Any rights: Any rights_type: Any subtitle: Any subtitle_type: Any generator: Any links: Any entries: Any def __init__(self, title: Optional[Any] = ..., entries: Optional[Any] = ..., **kwargs): ... def add(self, *args, **kwargs): ... def generate(self): ... def to_string(self): ... def get_response(self): ... def __call__(self, environ, start_response): ... class FeedEntry: title: Any title_type: Any content: Any content_type: Any url: Any id: Any updated: Any summary: Any summary_type: Any author: Any published: Any rights: Any links: Any categories: Any xml_base: Any def __init__(self, title: Optional[Any] = ..., content: Optional[Any] = ..., feed_url: Optional[Any] = ..., **kwargs): ... def generate(self): ... def to_string(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/limiter.pyi0000664000175000017500000000030013577124116030420 0ustar davedave00000000000000from typing import Any class StreamLimitMiddleware: app: Any maximum_size: Any def __init__(self, app, maximum_size=...): ... def __call__(self, environ, start_response): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/sessions.pyi0000664000175000017500000000366613577124116030643 0ustar davedave00000000000000from typing import Any, Optional, Text, TypeVar from werkzeug.datastructures import CallbackDict _K = TypeVar("_K") _V = TypeVar("_V") def generate_key(salt: Optional[Any] = ...): ... class ModificationTrackingDict(CallbackDict[_K, _V]): modified: Any def __init__(self, *args, **kwargs): ... def copy(self): ... def __copy__(self): ... class Session(ModificationTrackingDict[_K, _V]): sid: Any new: Any def __init__(self, data, sid, new: bool = ...): ... @property def should_save(self): ... class SessionStore: session_class: Any def __init__(self, session_class: Optional[Any] = ...): ... def is_valid_key(self, key): ... def generate_key(self, salt: Optional[Any] = ...): ... def new(self): ... def save(self, session): ... def save_if_modified(self, session): ... def delete(self, session): ... def get(self, sid): ... class FilesystemSessionStore(SessionStore): path: Any filename_template: str renew_missing: Any mode: Any def __init__(self, path: Optional[Any] = ..., filename_template: Text = ..., session_class: Optional[Any] = ..., renew_missing: bool = ..., mode: int = ...): ... def get_session_filename(self, sid): ... def save(self, session): ... def delete(self, session): ... def get(self, sid): ... def list(self): ... class SessionMiddleware: app: Any store: Any cookie_name: Any cookie_age: Any cookie_expires: Any cookie_path: Any cookie_domain: Any cookie_secure: Any cookie_httponly: Any environ_key: Any def __init__(self, app, store, cookie_name: str = ..., cookie_age: Optional[Any] = ..., cookie_expires: Optional[Any] = ..., cookie_path: str = ..., cookie_domain: Optional[Any] = ..., cookie_secure: Optional[Any] = ..., cookie_httponly: bool = ..., environ_key: str = ...): ... def __call__(self, environ, start_response): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/fixers.pyi0000664000175000017500000000317413577124116030267 0ustar davedave00000000000000from typing import Any, Iterable, List, Mapping, Optional, Sequence, Set, Text from wsgiref.types import WSGIApplication, WSGIEnvironment, StartResponse from ..middleware.proxy_fix import ProxyFix as ProxyFix class CGIRootFix(object): app: WSGIApplication app_root: Text def __init__(self, app: WSGIApplication, app_root: Text = ...) -> None: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... class LighttpdCGIRootFix(CGIRootFix): ... class PathInfoFromRequestUriFix(object): app: WSGIApplication def __init__(self, app: WSGIApplication) -> None: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... class HeaderRewriterFix(object): app: WSGIApplication remove_headers: Set[Text] add_headers: List[Text] def __init__( self, app: WSGIApplication, remove_headers: Optional[Iterable[Text]] = ..., add_headers: Optional[Iterable[Text]] = ..., ) -> None: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... class InternetExplorerFix(object): app: WSGIApplication fix_vary: bool fix_attach: bool def __init__(self, app: WSGIApplication, fix_vary: bool = ..., fix_attach: bool = ...) -> None: ... def fix_headers(self, environ: WSGIEnvironment, headers: Mapping[str, str], status: Optional[Any] = ...) -> None: ... def run_fixed(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/cache.pyi0000664000175000017500000000637113577124116030034 0ustar davedave00000000000000from typing import Any, Optional class BaseCache: default_timeout: float def __init__(self, default_timeout: float = ...): ... def get(self, key): ... def delete(self, key): ... def get_many(self, *keys): ... def get_dict(self, *keys): ... def set(self, key, value, timeout: Optional[float] = ...): ... def add(self, key, value, timeout: Optional[float] = ...): ... def set_many(self, mapping, timeout: Optional[float] = ...): ... def delete_many(self, *keys): ... def has(self, key): ... def clear(self): ... def inc(self, key, delta=...): ... def dec(self, key, delta=...): ... class NullCache(BaseCache): ... class SimpleCache(BaseCache): clear: Any def __init__(self, threshold: int = ..., default_timeout: float = ...): ... def get(self, key): ... def set(self, key, value, timeout: Optional[float] = ...): ... def add(self, key, value, timeout: Optional[float] = ...): ... def delete(self, key): ... def has(self, key): ... class MemcachedCache(BaseCache): key_prefix: Any def __init__(self, servers: Optional[Any] = ..., default_timeout: float = ..., key_prefix: Optional[Any] = ...): ... def get(self, key): ... def get_dict(self, *keys): ... def add(self, key, value, timeout: Optional[float] = ...): ... def set(self, key, value, timeout: Optional[float] = ...): ... def get_many(self, *keys): ... def set_many(self, mapping, timeout: Optional[float] = ...): ... def delete(self, key): ... def delete_many(self, *keys): ... def has(self, key): ... def clear(self): ... def inc(self, key, delta=...): ... def dec(self, key, delta=...): ... def import_preferred_memcache_lib(self, servers): ... GAEMemcachedCache: Any class RedisCache(BaseCache): key_prefix: Any def __init__(self, host: str = ..., port: int = ..., password: Optional[Any] = ..., db: int = ..., default_timeout: float = ..., key_prefix: Optional[Any] = ..., **kwargs): ... def dump_object(self, value): ... def load_object(self, value): ... def get(self, key): ... def get_many(self, *keys): ... def set(self, key, value, timeout: Optional[float] = ...): ... def add(self, key, value, timeout: Optional[float] = ...): ... def set_many(self, mapping, timeout: Optional[float] = ...): ... def delete(self, key): ... def delete_many(self, *keys): ... def has(self, key): ... def clear(self): ... def inc(self, key, delta=...): ... def dec(self, key, delta=...): ... class FileSystemCache(BaseCache): def __init__(self, cache_dir, threshold: int = ..., default_timeout: float = ..., mode: int = ...): ... def clear(self): ... def get(self, key): ... def add(self, key, value, timeout: Optional[float] = ...): ... def set(self, key, value, timeout: Optional[float] = ...): ... def delete(self, key): ... def has(self, key): ... class UWSGICache(BaseCache): cache: Any def __init__(self, default_timeout: float = ..., cache: str = ...): ... def get(self, key): ... def delete(self, key): ... def set(self, key, value, timeout: Optional[float] = ...): ... def add(self, key, value, timeout: Optional[float] = ...): ... def clear(self): ... def has(self, key): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/contrib/iterio.pyi0000664000175000017500000000226213577124116030257 0ustar davedave00000000000000from typing import Any, Optional, Text, Union greenlet: Any class IterIO: def __new__(cls, obj, sentinel: Union[Text, bytes] = ...): ... def __iter__(self): ... def tell(self): ... def isatty(self): ... def seek(self, pos, mode: int = ...): ... def truncate(self, size: Optional[Any] = ...): ... def write(self, s): ... def writelines(self, list): ... def read(self, n: int = ...): ... def readlines(self, sizehint: int = ...): ... def readline(self, length: Optional[Any] = ...): ... def flush(self): ... def __next__(self): ... class IterI(IterIO): sentinel: Any def __new__(cls, func, sentinel: Union[Text, bytes] = ...): ... closed: Any def close(self): ... def write(self, s): ... def writelines(self, list): ... def flush(self): ... class IterO(IterIO): sentinel: Any closed: Any pos: Any def __new__(cls, gen, sentinel: Union[Text, bytes] = ...): ... def __iter__(self): ... def close(self): ... def seek(self, pos, mode: int = ...): ... def read(self, n: int = ...): ... def readline(self, length: Optional[Any] = ...): ... def readlines(self, sizehint: int = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/_reloader.pyi0000664000175000017500000000147213577124116027262 0ustar davedave00000000000000from typing import Any, Optional class ReloaderLoop: name: Any extra_files: Any interval: float def __init__(self, extra_files: Optional[Any] = ..., interval: float = ...): ... def run(self): ... def restart_with_reloader(self): ... def trigger_reload(self, filename): ... def log_reload(self, filename): ... class StatReloaderLoop(ReloaderLoop): name: Any def run(self): ... class WatchdogReloaderLoop(ReloaderLoop): observable_paths: Any name: Any observer_class: Any event_handler: Any should_reload: Any def __init__(self, *args, **kwargs): ... def trigger_reload(self, filename): ... def run(self): ... reloader_loops: Any def run_with_reloader(main_func, extra_files: Optional[Any] = ..., interval: float = ..., reloader_type: str = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/urls.pyi0000664000175000017500000000550713577124116026316 0ustar davedave00000000000000from typing import Any, NamedTuple, Optional, Text class _URLTuple(NamedTuple): scheme: Any netloc: Any path: Any query: Any fragment: Any class BaseURL(_URLTuple): def replace(self, **kwargs): ... @property def host(self): ... @property def ascii_host(self): ... @property def port(self): ... @property def auth(self): ... @property def username(self): ... @property def raw_username(self): ... @property def password(self): ... @property def raw_password(self): ... def decode_query(self, *args, **kwargs): ... def join(self, *args, **kwargs): ... def to_url(self): ... def decode_netloc(self): ... def to_uri_tuple(self): ... def to_iri_tuple(self): ... def get_file_location(self, pathformat: Optional[Any] = ...): ... class URL(BaseURL): def encode_netloc(self): ... def encode(self, charset: Text = ..., errors: Text = ...): ... class BytesURL(BaseURL): def encode_netloc(self): ... def decode(self, charset: Text = ..., errors: Text = ...): ... def url_parse(url, scheme: Optional[Any] = ..., allow_fragments: bool = ...): ... def url_quote(string, charset: Text = ..., errors: Text = ..., safe: str = ..., unsafe: str = ...): ... def url_quote_plus(string, charset: Text = ..., errors: Text = ..., safe: str = ...): ... def url_unparse(components): ... def url_unquote(string, charset: Text = ..., errors: Text = ..., unsafe: str = ...): ... def url_unquote_plus(s, charset: Text = ..., errors: Text = ...): ... def url_fix(s, charset: Text = ...): ... def uri_to_iri(uri, charset: Text = ..., errors: Text = ...): ... def iri_to_uri(iri, charset: Text = ..., errors: Text = ..., safe_conversion: bool = ...): ... def url_decode(s, charset: Text = ..., decode_keys: bool = ..., include_empty: bool = ..., errors: Text = ..., separator: str = ..., cls: Optional[Any] = ...): ... def url_decode_stream(stream, charset: Text = ..., decode_keys: bool = ..., include_empty: bool = ..., errors: Text = ..., separator: str = ..., cls: Optional[Any] = ..., limit: Optional[Any] = ..., return_iterator: bool = ...): ... def url_encode(obj, charset: Text = ..., encode_keys: bool = ..., sort: bool = ..., key: Optional[Any] = ..., separator: bytes = ...): ... def url_encode_stream(obj, stream: Optional[Any] = ..., charset: Text = ..., encode_keys: bool = ..., sort: bool = ..., key: Optional[Any] = ..., separator: bytes = ...): ... def url_join(base, url, allow_fragments: bool = ...): ... class Href: base: Any charset: Text sort: Any key: Any def __init__(self, base: str = ..., charset: Text = ..., sort: bool = ..., key: Optional[Any] = ...): ... def __getattr__(self, name): ... def __call__(self, *path, **query): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/_internal.pyi0000664000175000017500000000112613577124116027275 0ustar davedave00000000000000from typing import Any, Optional class _Missing: def __reduce__(self): ... class _DictAccessorProperty: read_only: Any name: Any default: Any load_func: Any dump_func: Any __doc__: Any def __init__(self, name, default: Optional[Any] = ..., load_func: Optional[Any] = ..., dump_func: Optional[Any] = ..., read_only: Optional[Any] = ..., doc: Optional[Any] = ...): ... def __get__(self, obj, type: Optional[Any] = ...): ... def __set__(self, obj, value): ... def __delete__(self, obj): ... def _easteregg(app: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/wsgi.pyi0000664000175000017500000000601213577124116026272 0ustar davedave00000000000000from typing import Any, Optional, Protocol, Iterable, Text from wsgiref.types import WSGIEnvironment, InputStream from .middleware.dispatcher import DispatcherMiddleware as DispatcherMiddleware from .middleware.http_proxy import ProxyMiddleware as ProxyMiddleware from .middleware.shared_data import SharedDataMiddleware as SharedDataMiddleware def responder(f): ... def get_current_url(environ, root_only: bool = ..., strip_querystring: bool = ..., host_only: bool = ..., trusted_hosts: Optional[Any] = ...): ... def host_is_trusted(hostname, trusted_list): ... def get_host(environ, trusted_hosts: Optional[Any] = ...): ... def get_content_length(environ: WSGIEnvironment) -> Optional[int]: ... def get_input_stream(environ: WSGIEnvironment, safe_fallback: bool = ...) -> InputStream: ... def get_query_string(environ): ... def get_path_info(environ, charset: Text = ..., errors: Text = ...): ... def get_script_name(environ, charset: Text = ..., errors: Text = ...): ... def pop_path_info(environ, charset: Text = ..., errors: Text = ...): ... def peek_path_info(environ, charset: Text = ..., errors: Text = ...): ... def extract_path_info(environ_or_baseurl, path_or_url, charset: Text = ..., errors: Text = ..., collapse_http_schemes: bool = ...): ... class ClosingIterator: def __init__(self, iterable, callbacks: Optional[Any] = ...): ... def __iter__(self): ... def __next__(self): ... def close(self): ... class _Readable(Protocol): def read(self, size: int = ...) -> bytes: ... def wrap_file(environ: WSGIEnvironment, file: _Readable, buffer_size: int = ...) -> Iterable[bytes]: ... class FileWrapper: file: _Readable buffer_size: int def __init__(self, file: _Readable, buffer_size: int = ...) -> None: ... def close(self) -> None: ... def seekable(self) -> bool: ... def seek(self, offset: int, whence: int = ...) -> None: ... def tell(self) -> Optional[int]: ... def __iter__(self) -> FileWrapper: ... def __next__(self) -> bytes: ... class _RangeWrapper: iterable: Any byte_range: Any start_byte: Any end_byte: Any read_length: Any seekable: Any end_reached: Any def __init__(self, iterable, start_byte: int = ..., byte_range: Optional[Any] = ...): ... def __iter__(self): ... def __next__(self): ... def close(self): ... def make_line_iter(stream, limit: Optional[Any] = ..., buffer_size=..., cap_at_buffer: bool = ...): ... def make_chunk_iter(stream, separator, limit: Optional[Any] = ..., buffer_size=..., cap_at_buffer: bool = ...): ... class LimitedStream: limit: Any def __init__(self, stream, limit): ... def __iter__(self): ... @property def is_exhausted(self): ... def on_exhausted(self): ... def on_disconnect(self): ... def exhaust(self, chunk_size=...): ... def read(self, size: Optional[Any] = ...): ... def readline(self, size: Optional[Any] = ...): ... def readlines(self, size: Optional[Any] = ...): ... def tell(self): ... def __next__(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/utils.pyi0000664000175000017500000000362613577124116026471 0ustar davedave00000000000000from typing import Any, Optional, overload, Type, TypeVar from werkzeug._internal import _DictAccessorProperty from werkzeug.wrappers import Response class cached_property(property): __name__: Any __module__: Any __doc__: Any func: Any def __init__(self, func, name: Optional[Any] = ..., doc: Optional[Any] = ...): ... def __set__(self, obj, value): ... def __get__(self, obj, type: Optional[Any] = ...): ... class environ_property(_DictAccessorProperty): read_only: Any def lookup(self, obj): ... class header_property(_DictAccessorProperty): def lookup(self, obj): ... class HTMLBuilder: def __init__(self, dialect): ... def __call__(self, s): ... def __getattr__(self, tag): ... html: Any xhtml: Any def get_content_type(mimetype, charset): ... def format_string(string, context): ... def secure_filename(filename): ... def escape(s, quote: Optional[Any] = ...): ... def unescape(s): ... # 'redirect' returns a werkzeug Response, unless you give it # another Response type to use instead. _RC = TypeVar("_RC", bound=Response) @overload def redirect(location, code: int = ..., Response: None = ...) -> Response: ... @overload def redirect(location, code: int = ..., Response: Type[_RC] = ...) -> _RC: ... def append_slash_redirect(environ, code: int = ...): ... def import_string(import_name, silent: bool = ...): ... def find_modules(import_path, include_packages: bool = ..., recursive: bool = ...): ... def validate_arguments(func, args, kwargs, drop_extra: bool = ...): ... def bind_arguments(func, args, kwargs): ... class ArgumentValidationError(ValueError): missing: Any extra: Any extra_positional: Any def __init__(self, missing: Optional[Any] = ..., extra: Optional[Any] = ..., extra_positional: Optional[Any] = ...): ... class ImportStringError(ImportError): import_name: Any exception: Any def __init__(self, import_name, exception): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/http.pyi0000664000175000017500000001243313577124116026304 0ustar davedave00000000000000import sys from datetime import datetime, timedelta from typing import ( Dict, Text, Union, Tuple, Any, Optional, Mapping, Iterable, Callable, List, Type, TypeVar, Protocol, overload, SupportsInt, ) from wsgiref.types import WSGIEnvironment from .datastructures import ( Headers, Accept, RequestCacheControl, HeaderSet, Authorization, WWWAuthenticate, IfRange, Range, ContentRange, ETags, TypeConversionDict, ) if sys.version_info < (3,): _Str = TypeVar('_Str', str, unicode) _ToBytes = Union[bytes, bytearray, buffer, unicode] _ETagData = Union[str, unicode, bytearray, buffer, memoryview] else: _Str = str _ToBytes = Union[bytes, bytearray, memoryview, str] _ETagData = Union[bytes, bytearray, memoryview] _T = TypeVar("_T") _U = TypeVar("_U") HTTP_STATUS_CODES: Dict[int, str] def wsgi_to_bytes(data: Union[bytes, Text]) -> bytes: ... def bytes_to_wsgi(data: bytes) -> str: ... def quote_header_value(value: Any, extra_chars: str = ..., allow_token: bool = ...) -> str: ... def unquote_header_value(value: _Str, is_filename: bool = ...) -> _Str: ... def dump_options_header(header: Optional[_Str], options: Mapping[_Str, Any]) -> _Str: ... def dump_header(iterable: Union[Iterable[Any], Dict[_Str, Any]], allow_token: bool = ...) -> _Str: ... def parse_list_header(value: _Str) -> List[_Str]: ... @overload def parse_dict_header(value: Union[bytes, Text]) -> Dict[Text, Optional[Text]]: ... @overload def parse_dict_header(value: Union[bytes, Text], cls: Type[_T]) -> _T: ... @overload def parse_options_header(value: None, multiple: bool = ...) -> Tuple[str, Dict[str, Optional[str]]]: ... @overload def parse_options_header(value: _Str) -> Tuple[_Str, Dict[_Str, Optional[_Str]]]: ... # actually returns Tuple[_Str, Dict[_Str, Optional[_Str]], ...] @overload def parse_options_header(value: _Str, multiple: bool = ...) -> Tuple[Any, ...]: ... @overload def parse_accept_header(value: Optional[Text]) -> Accept: ... @overload def parse_accept_header(value: Optional[_Str], cls: Callable[[Optional[List[Tuple[str, float]]]], _T]) -> _T: ... @overload def parse_cache_control_header(value: Union[None, bytes, Text], on_update: Optional[Callable[[RequestCacheControl], Any]] = ...) -> RequestCacheControl: ... @overload def parse_cache_control_header(value: Union[None, bytes, Text], on_update: _T, cls: Callable[[Dict[Text, Optional[Text]], _T], _U]) -> _U: ... @overload def parse_cache_control_header(value: Union[None, bytes, Text], *, cls: Callable[[Dict[Text, Optional[Text]], None], _U]) -> _U: ... def parse_set_header(value: Text, on_update: Optional[Callable[[HeaderSet], Any]] = ...) -> HeaderSet: ... def parse_authorization_header(value: Union[None, bytes, Text]) -> Optional[Authorization]: ... def parse_www_authenticate_header(value: Union[None, bytes, Text], on_update: Optional[Callable[[WWWAuthenticate], Any]] = ...) -> WWWAuthenticate: ... def parse_if_range_header(value: Optional[Text]) -> IfRange: ... def parse_range_header(value: Optional[Text], make_inclusive: bool = ...) -> Optional[Range]: ... def parse_content_range_header(value: Optional[Text], on_update: Optional[Callable[[ContentRange], Any]] = ...) -> Optional[ContentRange]: ... def quote_etag(etag: _Str, weak: bool = ...) -> _Str: ... def unquote_etag(etag: Optional[_Str]) -> Tuple[Optional[_Str], Optional[_Str]]: ... def parse_etags(value: Optional[Text]) -> ETags: ... def generate_etag(data: _ETagData) -> str: ... def parse_date(value: Optional[str]) -> Optional[datetime]: ... def cookie_date(expires: Union[None, float, datetime] = ...) -> str: ... def http_date(timestamp: Union[None, float, datetime] = ...) -> str: ... def parse_age(value: Optional[SupportsInt] = ...) -> Optional[timedelta]: ... def dump_age(age: Union[None, timedelta, SupportsInt]) -> Optional[str]: ... def is_resource_modified(environ: WSGIEnvironment, etag: Optional[Text] = ..., data: Optional[_ETagData] = ..., last_modified: Union[None, Text, datetime] = ..., ignore_if_range: bool = ...) -> bool: ... def remove_entity_headers(headers: Union[List[Tuple[Text, Text]], Headers], allowed: Iterable[Text] = ...) -> None: ... def remove_hop_by_hop_headers(headers: Union[List[Tuple[Text, Text]], Headers]) -> None: ... def is_entity_header(header: Text) -> bool: ... def is_hop_by_hop_header(header: Text) -> bool: ... @overload def parse_cookie(header: Union[None, WSGIEnvironment, Text, bytes], charset: Text = ..., errors: Text = ...) -> TypeConversionDict[Any, Any]: ... @overload def parse_cookie(header: Union[None, WSGIEnvironment, Text, bytes], charset: Text = ..., errors: Text = ..., cls: Optional[Callable[[Iterable[Tuple[Text, Text]]], _T]] = ...) -> _T: ... def dump_cookie(key: _ToBytes, value: _ToBytes = ..., max_age: Union[None, float, timedelta] = ..., expires: Union[None, Text, float, datetime] = ..., path: Union[None, Tuple[Any, ...], str, bytes] = ..., domain: Union[None, str, bytes] = ..., secure: bool = ..., httponly: bool = ..., charset: Text = ..., sync_expires: bool = ...) -> str: ... def is_byte_range_valid(start: Optional[int], stop: Optional[int], length: Optional[int]) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/useragents.pyi0000664000175000017500000000046713577124116027511 0ustar davedave00000000000000from typing import Any class UserAgentParser: platforms: Any browsers: Any def __init__(self): ... def __call__(self, user_agent): ... class UserAgent: string: Any def __init__(self, environ_or_string): ... def to_header(self): ... def __nonzero__(self): ... __bool__: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/script.pyi0000664000175000017500000000136713577124116026635 0ustar davedave00000000000000from typing import Any, Optional argument_types: Any converters: Any def run(namespace: Optional[Any] = ..., action_prefix: str = ..., args: Optional[Any] = ...): ... def fail(message, code: int = ...): ... def find_actions(namespace, action_prefix): ... def print_usage(actions): ... def analyse_action(func): ... def make_shell(init_func: Optional[Any] = ..., banner: Optional[Any] = ..., use_ipython: bool = ...): ... def make_runserver(app_factory, hostname: str = ..., port: int = ..., use_reloader: bool = ..., use_debugger: bool = ..., use_evalex: bool = ..., threaded: bool = ..., processes: int = ..., static_files: Optional[Any] = ..., extra_files: Optional[Any] = ..., ssl_context: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/filesystem.pyi0000664000175000017500000000025113577124116027504 0ustar davedave00000000000000from typing import Any has_likely_buggy_unicode_filesystem: Any class BrokenFilesystemWarning(RuntimeWarning, UnicodeWarning): ... def get_filesystem_encoding(): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/wrappers.pyi0000664000175000017500000002210313577124116027163 0ustar davedave00000000000000import sys from datetime import datetime from typing import ( Any, Callable, Iterable, Iterator, Mapping, MutableMapping, Optional, Sequence, Text, Tuple, Type, TypeVar, Union, overload ) from wsgiref.types import WSGIEnvironment, InputStream from .datastructures import ( Authorization, CombinedMultiDict, EnvironHeaders, Headers, ImmutableMultiDict, MultiDict, ImmutableTypeConversionDict, HeaderSet, Accept, MIMEAccept, CharsetAccept, LanguageAccept, ) from .useragents import UserAgent if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal class BaseRequest: charset: str encoding_errors: str max_content_length: Optional[int] max_form_memory_size: int parameter_storage_class: Type[Any] list_storage_class: Type[Any] dict_storage_class: Type[Any] form_data_parser_class: Type[Any] trusted_hosts: Optional[Sequence[Text]] disable_data_descriptor: Any environ: WSGIEnvironment = ... shallow: Any def __init__(self, environ: WSGIEnvironment, populate_request: bool = ..., shallow: bool = ...) -> None: ... @property def url_charset(self) -> str: ... @classmethod def from_values(cls, *args, **kwargs) -> BaseRequest: ... @classmethod def application(cls, f): ... @property def want_form_data_parsed(self): ... def make_form_data_parser(self): ... def close(self) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, tb): ... @property def stream(self) -> InputStream: ... input_stream: InputStream args: ImmutableMultiDict[Any, Any] @property def data(self) -> bytes: ... @overload def get_data(self, cache: bool = ..., as_text: Literal[False] = ..., parse_form_data: bool = ...) -> bytes: ... @overload def get_data(self, cache: bool, as_text: Literal[True], parse_form_data: bool = ...) -> Text: ... @overload def get_data(self, *, as_text: Literal[True], parse_form_data: bool = ...) -> Text: ... @overload def get_data(self, cache: bool, as_text: bool, parse_form_data: bool = ...) -> Any: ... @overload def get_data(self, *, as_text: bool, parse_form_data: bool = ...) -> Any: ... form: ImmutableMultiDict[Any, Any] values: CombinedMultiDict[Any, Any] files: MultiDict[Any, Any] @property def cookies(self) -> ImmutableTypeConversionDict[str, str]: ... headers: EnvironHeaders path: Text full_path: Text script_root: Text url: Text base_url: Text url_root: Text host_url: Text host: Text query_string: bytes method: Text @property def access_route(self) -> Sequence[str]: ... @property def remote_addr(self) -> str: ... remote_user: Text scheme: str is_xhr: bool is_secure: bool is_multithread: bool is_multiprocess: bool is_run_once: bool # These are not preset at runtime but we add them since monkeypatching this # class is quite common. def __setattr__(self, name: str, value: Any): ... def __getattr__(self, name: str): ... _OnCloseT = TypeVar('_OnCloseT', bound=Callable[[], Any]) _SelfT = TypeVar('_SelfT', bound=BaseResponse) class BaseResponse: charset: str default_status: int default_mimetype: str implicit_sequence_conversion: bool autocorrect_location_header: bool automatically_set_content_length: bool headers: Headers status_code: int status: str direct_passthrough: bool response: Iterable[bytes] def __init__(self, response: Optional[Union[str, bytes, bytearray, Iterable[str], Iterable[bytes]]] = ..., status: Optional[Union[Text, int]] = ..., headers: Optional[Union[Headers, Mapping[Text, Text], Sequence[Tuple[Text, Text]]]] = ..., mimetype: Optional[Text] = ..., content_type: Optional[Text] = ..., direct_passthrough: bool = ...) -> None: ... def call_on_close(self, func: _OnCloseT) -> _OnCloseT: ... @classmethod def force_type(cls: Type[_SelfT], response: object, environ: Optional[WSGIEnvironment] = ...) -> _SelfT: ... @classmethod def from_app(cls: Type[_SelfT], app: Any, environ: WSGIEnvironment, buffered: bool = ...) -> _SelfT: ... @overload def get_data(self, as_text: Literal[False] = ...) -> bytes: ... @overload def get_data(self, as_text: Literal[True]) -> Text: ... @overload def get_data(self, as_text: bool) -> Any: ... def set_data(self, value: Union[bytes, Text]) -> None: ... data: Any def calculate_content_length(self) -> Optional[int]: ... def make_sequence(self) -> None: ... def iter_encoded(self) -> Iterator[bytes]: ... def set_cookie(self, key, value: str = ..., max_age: Optional[Any] = ..., expires: Optional[Any] = ..., path: str = ..., domain: Optional[Any] = ..., secure: bool = ..., httponly: bool = ...): ... def delete_cookie(self, key, path: str = ..., domain: Optional[Any] = ...): ... @property def is_streamed(self) -> bool: ... @property def is_sequence(self) -> bool: ... def close(self) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, tb): ... # The no_etag argument if fictional, but required for compatibility with # ETagResponseMixin def freeze(self, no_etag: bool = ...) -> None: ... def get_wsgi_headers(self, environ): ... def get_app_iter(self, environ): ... def get_wsgi_response(self, environ): ... def __call__(self, environ, start_response): ... class AcceptMixin(object): @property def accept_mimetypes(self) -> MIMEAccept: ... @property def accept_charsets(self) -> CharsetAccept: ... @property def accept_encodings(self) -> Accept: ... @property def accept_languages(self) -> LanguageAccept: ... class ETagRequestMixin: @property def cache_control(self): ... @property def if_match(self): ... @property def if_none_match(self): ... @property def if_modified_since(self): ... @property def if_unmodified_since(self): ... @property def if_range(self): ... @property def range(self): ... class UserAgentMixin: @property def user_agent(self) -> UserAgent: ... class AuthorizationMixin: @property def authorization(self) -> Optional[Authorization]: ... class StreamOnlyMixin: disable_data_descriptor: Any want_form_data_parsed: Any class ETagResponseMixin: @property def cache_control(self): ... status_code: Any def make_conditional(self, request_or_environ, accept_ranges: bool = ..., complete_length: Optional[Any] = ...): ... def add_etag(self, overwrite: bool = ..., weak: bool = ...): ... def set_etag(self, etag, weak: bool = ...): ... def get_etag(self): ... def freeze(self, no_etag: bool = ...) -> None: ... accept_ranges: Any content_range: Any class ResponseStream: mode: Any response: Any closed: Any def __init__(self, response): ... def write(self, value): ... def writelines(self, seq): ... def close(self): ... def flush(self): ... def isatty(self): ... @property def encoding(self): ... class ResponseStreamMixin: @property def stream(self) -> ResponseStream: ... class CommonRequestDescriptorsMixin: @property def content_type(self) -> Optional[str]: ... @property def content_length(self) -> Optional[int]: ... @property def content_encoding(self) -> Optional[str]: ... @property def content_md5(self) -> Optional[str]: ... @property def referrer(self) -> Optional[str]: ... @property def date(self) -> Optional[datetime]: ... @property def max_forwards(self) -> Optional[int]: ... @property def mimetype(self) -> str: ... @property def mimetype_params(self) -> Mapping[str, str]: ... @property def pragma(self) -> HeaderSet: ... class CommonResponseDescriptorsMixin: mimetype: Optional[str] = ... @property def mimetype_params(self) -> MutableMapping[str, str]: ... location: Optional[str] = ... age: Any = ... # get: Optional[datetime.timedelta] content_type: Optional[str] = ... content_length: Optional[int] = ... content_location: Optional[str] = ... content_encoding: Optional[str] = ... content_md5: Optional[str] = ... date: Any = ... # get: Optional[datetime.datetime] expires: Any = ... # get: Optional[datetime.datetime] last_modified: Any = ... # get: Optional[datetime.datetime] retry_after: Any = ... # get: Optional[datetime.datetime] vary: Optional[str] = ... content_language: Optional[str] = ... allow: Optional[str] = ... class WWWAuthenticateMixin: @property def www_authenticate(self): ... class Request(BaseRequest, AcceptMixin, ETagRequestMixin, UserAgentMixin, AuthorizationMixin, CommonRequestDescriptorsMixin): ... class PlainRequest(StreamOnlyMixin, Request): ... class Response(BaseResponse, ETagResponseMixin, ResponseStreamMixin, CommonResponseDescriptorsMixin, WWWAuthenticateMixin): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/0000775000175000017500000000000013577125145025670 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/__init__.pyi0000664000175000017500000000246213577124116030153 0ustar davedave00000000000000from typing import Any, Optional from werkzeug.wrappers import BaseRequest as Request, BaseResponse as Response PIN_TIME: Any def hash_pin(pin): ... def get_machine_id(): ... class _ConsoleFrame: console: Any id: Any def __init__(self, namespace): ... def get_pin_and_cookie_name(app): ... class DebuggedApplication: app: Any evalex: Any frames: Any tracebacks: Any request_key: Any console_path: Any console_init_func: Any show_hidden_frames: Any secret: Any pin_logging: Any pin: Any def __init__(self, app, evalex: bool = ..., request_key: str = ..., console_path: str = ..., console_init_func: Optional[Any] = ..., show_hidden_frames: bool = ..., lodgeit_url: Optional[Any] = ..., pin_security: bool = ..., pin_logging: bool = ...): ... @property def pin_cookie_name(self): ... def debug_application(self, environ, start_response): ... def execute_command(self, request, command, frame): ... def display_console(self, request): ... def paste_traceback(self, request, traceback): ... def get_resource(self, request, filename): ... def check_pin_trust(self, environ): ... def pin_auth(self, request): ... def log_pin_request(self): ... def __call__(self, environ, start_response): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/tbtools.pyi0000664000175000017500000000322713577124116030102 0ustar davedave00000000000000from typing import Any, Optional UTF8_COOKIE: Any system_exceptions: Any HEADER: Any FOOTER: Any PAGE_HTML: Any CONSOLE_HTML: Any SUMMARY_HTML: Any FRAME_HTML: Any SOURCE_LINE_HTML: Any def render_console_html(secret, evalex_trusted: bool = ...): ... def get_current_traceback(ignore_system_exceptions: bool = ..., show_hidden_frames: bool = ..., skip: int = ...): ... class Line: lineno: Any code: Any in_frame: Any current: Any def __init__(self, lineno, code): ... def classes(self): ... def render(self): ... class Traceback: exc_type: Any exc_value: Any exception_type: Any frames: Any def __init__(self, exc_type, exc_value, tb): ... def filter_hidden_frames(self): ... def is_syntax_error(self): ... def exception(self): ... def log(self, logfile: Optional[Any] = ...): ... def paste(self): ... def render_summary(self, include_title: bool = ...): ... def render_full(self, evalex: bool = ..., secret: Optional[Any] = ..., evalex_trusted: bool = ...): ... def generate_plaintext_traceback(self): ... def plaintext(self): ... id: Any class Frame: lineno: Any function_name: Any locals: Any globals: Any filename: Any module: Any loader: Any code: Any hide: Any info: Any def __init__(self, exc_type, exc_value, tb): ... def render(self): ... def render_line_context(self): ... def get_annotated_lines(self): ... def eval(self, code, mode: str = ...): ... def sourcelines(self): ... def get_context_lines(self, context: int = ...): ... @property def current_line(self): ... def console(self): ... id: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/console.pyi0000664000175000017500000000226713577124116030061 0ustar davedave00000000000000from typing import Any, Optional import code class HTMLStringO: def __init__(self): ... def isatty(self): ... def close(self): ... def flush(self): ... def seek(self, n, mode: int = ...): ... def readline(self): ... def reset(self): ... def write(self, x): ... def writelines(self, x): ... class ThreadedStream: @staticmethod def push(): ... @staticmethod def fetch(): ... @staticmethod def displayhook(obj): ... def __setattr__(self, name, value): ... def __dir__(self): ... def __getattribute__(self, name): ... class _ConsoleLoader: def __init__(self): ... def register(self, code, source): ... def get_source_by_code(self, code): ... class _InteractiveConsole(code.InteractiveInterpreter): globals: Any more: Any buffer: Any def __init__(self, globals, locals): ... def runsource(self, source): ... def runcode(self, code): ... def showtraceback(self): ... def showsyntaxerror(self, filename: Optional[Any] = ...): ... def write(self, data): ... class Console: def __init__(self, globals: Optional[Any] = ..., locals: Optional[Any] = ...): ... def eval(self, code): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/debug/repr.pyi0000664000175000017500000000151613577124116027363 0ustar davedave00000000000000from typing import Any, Optional deque: Any missing: Any RegexType: Any HELP_HTML: Any OBJECT_DUMP_HTML: Any def debug_repr(obj): ... def dump(obj=...): ... class _Helper: def __call__(self, topic: Optional[Any] = ...): ... helper: Any class DebugReprGenerator: def __init__(self): ... list_repr: Any tuple_repr: Any set_repr: Any frozenset_repr: Any deque_repr: Any def regex_repr(self, obj): ... def string_repr(self, obj, limit: int = ...): ... def dict_repr(self, d, recursive, limit: int = ...): ... def object_repr(self, obj): ... def dispatch_repr(self, obj, recursive): ... def fallback_repr(self): ... def repr(self, obj): ... def dump_object(self, obj): ... def dump_locals(self, d): ... def render_object_dump(self, items, title, repr: Optional[Any] = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/datastructures.pyi0000664000175000017500000003644713577124116030415 0ustar davedave00000000000000import collections from typing import ( Any, Callable, Container, Dict, Generic, IO, Iterable, Iterator, List, Mapping, MutableSet, NoReturn, Optional, Protocol, Text, Tuple, Type, TypeVar, Union, overload, ) _K = TypeVar("_K") _V = TypeVar("_V") _R = TypeVar("_R") _D = TypeVar("_D") def is_immutable(self) -> NoReturn: ... def iter_multi_items(mapping): ... def native_itermethods(names): ... class ImmutableListMixin(object, Generic[_V]): def __hash__(self) -> int: ... def __reduce_ex__(self: _D, protocol) -> Tuple[Type[_D], List[_V]]: ... def __delitem__(self, key: _V) -> NoReturn: ... def __iadd__(self, other: Any) -> NoReturn: ... def __imul__(self, other: Any) -> NoReturn: ... def __setitem__(self, key: str, value: Any) -> NoReturn: ... def append(self, item: Any) -> NoReturn: ... def remove(self, item: Any) -> NoReturn: ... def extend(self, iterable: Any) -> NoReturn: ... def insert(self, pos: int, value: Any) -> NoReturn: ... def pop(self, index: int = ...) -> NoReturn: ... def reverse(self) -> NoReturn: ... def sort(self, cmp: Optional[Any] = ..., key: Optional[Any] = ..., reverse: Optional[Any] = ...) -> NoReturn: ... class ImmutableList(ImmutableListMixin[_V], List[_V]): ... # type: ignore class ImmutableDictMixin(object): @classmethod def fromkeys(cls, *args, **kwargs): ... def __reduce_ex__(self, protocol): ... def __hash__(self) -> int: ... def setdefault(self, key, default: Optional[Any] = ...): ... def update(self, *args, **kwargs): ... def pop(self, key, default: Optional[Any] = ...): ... def popitem(self): ... def __setitem__(self, key, value): ... def __delitem__(self, key): ... def clear(self): ... class ImmutableMultiDictMixin(ImmutableDictMixin): def __reduce_ex__(self, protocol): ... def add(self, key, value): ... def popitemlist(self): ... def poplist(self, key): ... def setlist(self, key, new_list): ... def setlistdefault(self, key, default_list: Optional[Any] = ...): ... class UpdateDictMixin(object): on_update: Any def setdefault(self, key, default: Optional[Any] = ...): ... def pop(self, key, default=...): ... __setitem__: Any __delitem__: Any clear: Any popitem: Any update: Any class TypeConversionDict(Dict[_K, _V]): @overload def get(self, key: _K, *, type: None = ...) -> Optional[_V]: ... @overload def get(self, key: _K, default: _D, type: None = ...) -> Union[_V, _D]: ... @overload def get(self, key: _K, *, type: Callable[[_V], _R]) -> Optional[_R]: ... @overload def get(self, key: _K, default: _D, type: Callable[[_V], _R]) -> Union[_R, _D]: ... class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict[_K, _V]): # type: ignore def copy(self) -> TypeConversionDict[_K, _V]: ... def __copy__(self) -> ImmutableTypeConversionDict[_K, _V]: ... class ViewItems: def __init__(self, multi_dict, method, repr_name, *a, **kw): ... def __iter__(self): ... class MultiDict(TypeConversionDict[_K, _V]): def __init__(self, mapping: Optional[Any] = ...): ... def __getitem__(self, key): ... def __setitem__(self, key, value): ... def add(self, key, value): ... def getlist(self, key, type: Optional[Any] = ...): ... def setlist(self, key, new_list): ... def setdefault(self, key, default: Optional[Any] = ...): ... def setlistdefault(self, key, default_list: Optional[Any] = ...): ... def items(self, multi: bool = ...): ... def lists(self): ... def keys(self): ... __iter__: Any def values(self): ... def listvalues(self): ... def copy(self): ... def deepcopy(self, memo: Optional[Any] = ...): ... def to_dict(self, flat: bool = ...): ... def update(self, other_dict): ... def pop(self, key, default=...): ... def popitem(self): ... def poplist(self, key): ... def popitemlist(self): ... def __copy__(self): ... def __deepcopy__(self, memo): ... class _omd_bucket: prev: Any key: Any value: Any next: Any def __init__(self, omd, key, value): ... def unlink(self, omd): ... class OrderedMultiDict(MultiDict[_K, _V]): def __init__(self, mapping: Optional[Any] = ...): ... def __eq__(self, other): ... def __ne__(self, other): ... def __reduce_ex__(self, protocol): ... def __getitem__(self, key): ... def __setitem__(self, key, value): ... def __delitem__(self, key): ... def keys(self): ... __iter__: Any def values(self): ... def items(self, multi: bool = ...): ... def lists(self): ... def listvalues(self): ... def add(self, key, value): ... def getlist(self, key, type: Optional[Any] = ...): ... def setlist(self, key, new_list): ... def setlistdefault(self, key, default_list: Optional[Any] = ...): ... def update(self, mapping): ... def poplist(self, key): ... def pop(self, key, default=...): ... def popitem(self): ... def popitemlist(self): ... class Headers(object): def __init__(self, defaults: Optional[Any] = ...): ... def __getitem__(self, key, _get_mode: bool = ...): ... def __eq__(self, other): ... def __ne__(self, other): ... @overload def get(self, key: str, *, type: None = ...) -> Optional[str]: ... @overload def get(self, key: str, default: _D, type: None = ...) -> Union[str, _D]: ... @overload def get(self, key: str, *, type: Callable[[str], _R]) -> Optional[_R]: ... @overload def get(self, key: str, default: _D, type: Callable[[str], _R]) -> Union[_R, _D]: ... @overload def get(self, key: str, *, as_bytes: bool) -> Any: ... @overload def get(self, key: str, *, type: None, as_bytes: bool) -> Any: ... @overload def get(self, key: str, *, type: Callable[[Any], _R], as_bytes: bool) -> Optional[_R]: ... @overload def get(self, key: str, default: Any, type: None, as_bytes: bool) -> Any: ... @overload def get(self, key: str, default: _D, type: Callable[[Any], _R], as_bytes: bool) -> Union[_R, _D]: ... def getlist(self, key, type: Optional[Any] = ..., as_bytes: bool = ...): ... def get_all(self, name): ... def items(self, lower: bool = ...): ... def keys(self, lower: bool = ...): ... def values(self): ... def extend(self, iterable): ... def __delitem__(self, key: Any) -> None: ... def remove(self, key): ... def pop(self, **kwargs): ... def popitem(self): ... def __contains__(self, key): ... has_key: Any def __iter__(self): ... def __len__(self): ... def add(self, _key, _value, **kw): ... def add_header(self, _key, _value, **_kw): ... def clear(self): ... def set(self, _key, _value, **kw): ... def setdefault(self, key, value): ... def __setitem__(self, key, value): ... def to_list(self, charset: Text = ...): ... def to_wsgi_list(self): ... def copy(self): ... def __copy__(self): ... class ImmutableHeadersMixin: def __delitem__(self, key: str) -> None: ... def __setitem__(self, key, value): ... set: Any def add(self, *args, **kwargs): ... remove: Any add_header: Any def extend(self, iterable): ... def insert(self, pos, value): ... def pop(self, **kwargs): ... def popitem(self): ... def setdefault(self, key, default): ... class EnvironHeaders(ImmutableHeadersMixin, Headers): environ: Any def __init__(self, environ): ... def __eq__(self, other): ... def __getitem__(self, key, _get_mode: bool = ...): ... def __len__(self): ... def __iter__(self): ... def copy(self): ... class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore def __reduce_ex__(self, protocol): ... dicts: Any def __init__(self, dicts: Optional[Any] = ...): ... @classmethod def fromkeys(cls): ... def __getitem__(self, key): ... def get(self, key, default: Optional[Any] = ..., type: Optional[Any] = ...): ... def getlist(self, key, type: Optional[Any] = ...): ... def keys(self): ... __iter__: Any def items(self, multi: bool = ...): ... def values(self): ... def lists(self): ... def listvalues(self): ... def copy(self): ... def to_dict(self, flat: bool = ...): ... def __len__(self): ... def __contains__(self, key): ... has_key: Any class FileMultiDict(MultiDict[_K, _V]): def add_file(self, name, file, filename: Optional[Any] = ..., content_type: Optional[Any] = ...): ... class ImmutableDict(ImmutableDictMixin, Dict[_K, _V]): # type: ignore def copy(self): ... def __copy__(self): ... class ImmutableMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore def copy(self): ... def __copy__(self): ... class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict[_K, _V]): # type: ignore def copy(self): ... def __copy__(self): ... class Accept(ImmutableList[Tuple[str, float]]): provided: bool def __init__(self, values: Union[None, Accept, Iterable[Tuple[str, float]]] = ...) -> None: ... @overload def __getitem__(self, key: int) -> Tuple[str, float]: ... @overload def __getitem__(self, s: slice) -> List[Tuple[str, float]]: ... @overload def __getitem__(self, key: str) -> float: ... def quality(self, key: str) -> float: ... def __contains__(self, value: str) -> bool: ... # type: ignore def index(self, key: Union[str, Tuple[str, float]]) -> int: ... # type: ignore def find(self, key: Union[str, Tuple[str, float]]) -> int: ... def values(self) -> Iterator[str]: ... def to_header(self) -> str: ... @overload def best_match(self, matches: Iterable[str], default: None = ...) -> Optional[str]: ... @overload def best_match(self, matches: Iterable[str], default: _D) -> Union[str, _D]: ... @property def best(self) -> Optional[str]: ... class MIMEAccept(Accept): @property def accept_html(self) -> bool: ... @property def accept_xhtml(self) -> bool: ... @property def accept_json(self) -> bool: ... class LanguageAccept(Accept): ... class CharsetAccept(Accept): ... def cache_property(key, empty, type): ... class _CacheControl(UpdateDictMixin, Dict[str, Any]): no_cache: Any no_store: Any max_age: Any no_transform: Any on_update: Any provided: Any def __init__(self, values=..., on_update: Optional[Any] = ...): ... def to_header(self): ... class RequestCacheControl(ImmutableDictMixin, _CacheControl): # type: ignore max_stale: Any min_fresh: Any no_transform: Any only_if_cached: Any class ResponseCacheControl(_CacheControl): public: Any private: Any must_revalidate: Any proxy_revalidate: Any s_maxage: Any class CallbackDict(UpdateDictMixin, Dict[_K, _V]): on_update: Any def __init__(self, initial: Optional[Any] = ..., on_update: Optional[Any] = ...): ... class HeaderSet(MutableSet[str]): on_update: Any def __init__(self, headers: Optional[Any] = ..., on_update: Optional[Any] = ...): ... def add(self, header): ... def remove(self, header): ... def update(self, iterable): ... def discard(self, header): ... def find(self, header): ... def index(self, header): ... def clear(self): ... def as_set(self, preserve_casing: bool = ...): ... def to_header(self): ... def __getitem__(self, idx): ... def __delitem__(self, idx): ... def __setitem__(self, idx, value): ... def __contains__(self, header): ... def __len__(self): ... def __iter__(self): ... def __nonzero__(self): ... class ETags(Container[str], Iterable[str]): star_tag: Any def __init__(self, strong_etags: Optional[Any] = ..., weak_etags: Optional[Any] = ..., star_tag: bool = ...): ... def as_set(self, include_weak: bool = ...): ... def is_weak(self, etag): ... def contains_weak(self, etag): ... def contains(self, etag): ... def contains_raw(self, etag): ... def to_header(self): ... def __call__(self, etag: Optional[Any] = ..., data: Optional[Any] = ..., include_weak: bool = ...): ... def __bool__(self): ... __nonzero__: Any def __iter__(self): ... def __contains__(self, etag): ... class IfRange: etag: Any date: Any def __init__(self, etag: Optional[Any] = ..., date: Optional[Any] = ...): ... def to_header(self): ... class Range: units: Any ranges: Any def __init__(self, units, ranges): ... def range_for_length(self, length): ... def make_content_range(self, length): ... def to_header(self): ... def to_content_range_header(self, length): ... class ContentRange: on_update: Any units: Optional[str] start: Any stop: Any length: Any def __init__(self, units: Optional[str], start, stop, length: Optional[Any] = ..., on_update: Optional[Any] = ...): ... def set(self, start, stop, length: Optional[Any] = ..., units: Optional[str] = ...): ... def unset(self) -> None: ... def to_header(self): ... def __nonzero__(self): ... __bool__: Any class Authorization(ImmutableDictMixin, Dict[str, Any]): # type: ignore type: str def __init__(self, auth_type: str, data: Optional[Mapping[str, Any]] = ...) -> None: ... @property def username(self) -> Optional[str]: ... @property def password(self) -> Optional[str]: ... @property def realm(self) -> Optional[str]: ... @property def nonce(self) -> Optional[str]: ... @property def uri(self) -> Optional[str]: ... @property def nc(self) -> Optional[str]: ... @property def cnonce(self) -> Optional[str]: ... @property def response(self) -> Optional[str]: ... @property def opaque(self) -> Optional[str]: ... @property def qop(self) -> Optional[str]: ... class WWWAuthenticate(UpdateDictMixin, Dict[str, Any]): on_update: Any def __init__(self, auth_type: Optional[Any] = ..., values: Optional[Any] = ..., on_update: Optional[Any] = ...): ... def set_basic(self, realm: str = ...): ... def set_digest(self, realm, nonce, qop=..., opaque: Optional[Any] = ..., algorithm: Optional[Any] = ..., stale: bool = ...): ... def to_header(self): ... @staticmethod def auth_property(name, doc: Optional[Any] = ...): ... type: Any realm: Any domain: Any nonce: Any opaque: Any algorithm: Any qop: Any stale: Any class _Writer(Protocol): def write(self, data: bytes) -> Any: ... class FileStorage(object): name: Optional[Text] stream: IO[bytes] filename: Optional[Text] headers: Headers def __init__( self, stream: Optional[IO[bytes]] = ..., filename: Union[None, Text, bytes] = ..., name: Optional[Text] = ..., content_type: Optional[Text] = ..., content_length: Optional[int] = ..., headers: Optional[Headers] = ..., ): ... @property def content_type(self) -> Optional[Text]: ... @property def content_length(self) -> int: ... @property def mimetype(self) -> str: ... @property def mimetype_params(self) -> Dict[str, str]: ... def save(self, dst: Union[Text, _Writer], buffer_size: int = ...): ... def close(self) -> None: ... def __nonzero__(self) -> bool: ... def __bool__(self) -> bool: ... def __getattr__(self, name: Text) -> Any: ... def __iter__(self) -> Iterator[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/formparser.pyi0000664000175000017500000000707513577124116027513 0ustar davedave00000000000000from typing import Any, Optional, Text, Tuple, Callable, Iterable, TypeVar, NoReturn, Protocol, IO, Generator, Dict, Mapping, Union from wsgiref.types import WSGIEnvironment from .datastructures import Headers _Dict = Any _ParseFunc = Callable[[IO[bytes], str, Optional[int], Mapping[str, str]], Tuple[IO[bytes], _Dict, _Dict]] _F = TypeVar("_F", bound=Callable[..., Any]) class _StreamFactory(Protocol): def __call__( self, total_content_length: Optional[int], filename: str, content_type: str, content_length: Optional[int] = ..., ) -> IO[bytes]: ... def default_stream_factory( total_content_length: Optional[int], filename: str, content_type: str, content_length: Optional[int] = ..., ) -> IO[bytes]: ... def parse_form_data( environ: WSGIEnvironment, stream_factory: Optional[_StreamFactory] = ..., charset: Text = ..., errors: Text = ..., max_form_memory_size: Optional[int] = ..., max_content_length: Optional[int] = ..., cls: Optional[Callable[[], _Dict]] = ..., silent: bool = ..., ) -> Tuple[IO[bytes], _Dict, _Dict]: ... def exhaust_stream(f: _F) -> _F: ... class FormDataParser(object): stream_factory: _StreamFactory charset: Text errors: Text max_form_memory_size: Optional[int] max_content_length: Optional[int] cls: Callable[[], _Dict] silent: bool def __init__( self, stream_factory: Optional[_StreamFactory] = ..., charset: Text = ..., errors: Text = ..., max_form_memory_size: Optional[int] = ..., max_content_length: Optional[int] = ..., cls: Optional[Callable[[], _Dict]] = ..., silent: bool = ..., ) -> None: ... def get_parse_func(self, mimetype: str, options: Any) -> Optional[_ParseFunc]: ... def parse_from_environ(self, environ: WSGIEnvironment) -> Tuple[IO[bytes], _Dict, _Dict]: ... def parse( self, stream: IO[bytes], mimetype: Text, content_length: Optional[int], options: Optional[Mapping[str, str]] = ..., ) -> Tuple[IO[bytes], _Dict, _Dict]: ... parse_functions: Dict[Text, _ParseFunc] def is_valid_multipart_boundary(boundary: str) -> bool: ... def parse_multipart_headers(iterable: Iterable[Union[Text, bytes]]) -> Headers: ... class MultiPartParser(object): charset: Text errors: Text max_form_memory_size: Optional[int] stream_factory: _StreamFactory cls: Callable[[], _Dict] buffer_size: int def __init__( self, stream_factory: Optional[_StreamFactory] = ..., charset: Text = ..., errors: Text = ..., max_form_memory_size: Optional[int] = ..., cls: Optional[Callable[[], _Dict]] = ..., buffer_size: int = ..., ) -> None: ... def fail(self, message: Text) -> NoReturn: ... def get_part_encoding(self, headers: Mapping[str, str]) -> Optional[str]: ... def get_part_charset(self, headers: Mapping[str, str]) -> Text: ... def start_file_streaming( self, filename: Union[Text, bytes], headers: Mapping[str, str], total_content_length: Optional[int], ) -> Tuple[Text, IO[bytes]]: ... def in_memory_threshold_reached(self, bytes: Any) -> NoReturn: ... def validate_boundary(self, boundary: Optional[str]) -> None: ... def parse_lines( self, file: Any, boundary: bytes, content_length: int, cap_at_buffer: bool = ..., ) -> Generator[Tuple[str, Any], None, None]: ... def parse_parts(self, file: Any, boundary: bytes, content_length: int) -> Generator[Tuple[str, Any], None, None]: ... def parse(self, file: Any, boundary: bytes, content_length: int) -> Tuple[_Dict, _Dict]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/posixemulation.pyi0000664000175000017500000000030613577124116030401 0ustar davedave00000000000000from typing import Any from ._compat import to_unicode as to_unicode from .filesystem import get_filesystem_encoding as get_filesystem_encoding can_rename_open_file: Any def rename(src, dst): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/0000775000175000017500000000000013577125145026717 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/__init__.pyi0000664000175000017500000000000013577124116031164 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/http_proxy.pyi0000664000175000017500000000125413577124116031661 0ustar davedave00000000000000from typing import Any, Dict, Iterable, Mapping, MutableMapping, Text from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment _Opts = Mapping[Text, Any] _MutableOpts = MutableMapping[Text, Any] class ProxyMiddleware(object): app: WSGIApplication targets: Dict[Text, _MutableOpts] def __init__( self, app: WSGIApplication, targets: Mapping[Text, _MutableOpts], chunk_size: int = ..., timeout: int = ..., ) -> None: ... def proxy_to(self, opts: _Opts, path: Text, prefix: Text) -> WSGIApplication: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/lint.pyi0000664000175000017500000000456213577124116030414 0ustar davedave00000000000000import sys from typing import Any, Iterable, Iterator, List, Mapping, Optional, Protocol, Tuple from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment from ..datastructures import Headers class WSGIWarning(Warning): ... class HTTPWarning(Warning): ... def check_string(context: str, obj: object, stacklevel: int = ...) -> None: ... class _Readable(Protocol): def read(self, __size: int = ...) -> bytes: ... def readline(self, __size: int = ...) -> bytes: ... def __iter__(self) -> Iterator[bytes]: ... def close(self) -> Any: ... class InputStream(object): def __init__(self, stream: _Readable) -> None: ... def read(self, __size: int = ...) -> bytes: ... def readline(self, __size: int = ...) -> bytes: ... def __iter__(self) -> Iterator[bytes]: ... def close(self) -> None: ... class _FullyWritable(Protocol): def write(self, __s: str) -> Any: ... def flush(self) -> Any: ... def close(self) -> Any: ... class ErrorStream(object): def __init__(self, stream: _FullyWritable) -> None: ... def write(self, s: str) -> None: ... def flush(self) -> None: ... def writelines(self, seq: Iterable[str]) -> None: ... def close(self) -> None: ... class _Writable(Protocol): def write(self, __s: str) -> Any: ... class GuardedWrite(object): def __init__(self, write: _Writable, chunks: List[int]) -> None: ... def __call__(self, s: str) -> None: ... class GuardedIterator(object): closed: bool headers_set: bool chunks: List[int] def __init__(self, iterator: Iterable[str], headers_set: bool, chunks: List[int]) -> None: ... def __iter__(self) -> GuardedIterator: ... if sys.version_info < (3,): def next(self) -> str: ... else: def __next__(self) -> str: ... def close(self) -> None: ... class LintMiddleware(object): def __init__(self, app: WSGIApplication) -> None: ... def check_environ(self, environ: WSGIEnvironment) -> None: ... def check_start_response( self, status: str, headers: List[Tuple[str, str]], exc_info: Optional[Tuple[Any, ...]], ) -> Tuple[int, Headers]: ... def check_headers(self, headers: Mapping[str, str]) -> None: ... def check_iterator(self, app_iter: Iterable[bytes]) -> None: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> GuardedIterator: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/profiler.pyi0000664000175000017500000000107013577124116031257 0ustar davedave00000000000000from typing import IO, Iterable, List, Optional, Text, Tuple, Union from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment class ProfilerMiddleware(object): def __init__( self, app: WSGIApplication, stream: IO[str] = ..., sort_by: Tuple[Text, Text] = ..., restrictions: Iterable[Union[str, float]] = ..., profile_dir: Optional[Text] = ..., filename_format: Text = ..., ) -> None: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> List[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/dispatcher.pyi0000664000175000017500000000070713577124116031571 0ustar davedave00000000000000from typing import Any, Iterable, Mapping, Optional, Text from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment class DispatcherMiddleware(object): app: WSGIApplication mounts: Mapping[Text, WSGIApplication] def __init__(self, app: WSGIApplication, mounts: Optional[Mapping[Text, WSGIApplication]] = ...) -> None: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/proxy_fix.pyi0000664000175000017500000000130713577124116031467 0ustar davedave00000000000000from typing import Iterable, Optional from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment class ProxyFix(object): app: WSGIApplication x_for: int x_proto: int x_host: int x_port: int x_prefix: int num_proxies: int def __init__( self, app: WSGIApplication, num_proxies: Optional[int] = ..., x_for: int = ..., x_proto: int = ..., x_host: int = ..., x_port: int = ..., x_prefix: int = ..., ) -> None: ... def get_remote_addr(self, forwarded_for: Iterable[str]) -> Optional[str]: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/middleware/shared_data.pyi0000664000175000017500000000241613577124116031701 0ustar davedave00000000000000import datetime from typing import Callable, IO, Iterable, List, Mapping, Optional, Text, Tuple, Union from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment _V = Union[Tuple[Text, Text], Text] _Opener = Callable[[], Tuple[IO[bytes], datetime.datetime, int]] _Loader = Callable[[Optional[Text]], Union[Tuple[None, None], Tuple[Text, _Opener]]] class SharedDataMiddleware(object): app: WSGIApplication exports: List[Tuple[Text, _Loader]] cache: bool cache_timeout: float def __init__( self, app: WSGIApplication, exports: Union[Mapping[Text, _V], Iterable[Tuple[Text, _V]]], disallow: Optional[Text] = ..., cache: bool = ..., cache_timeout: float = ..., fallback_mimetype: Text = ..., ) -> None: ... def is_allowed(self, filename: Text) -> bool: ... def get_file_loader(self, filename: Text) -> _Loader: ... def get_package_loader(self, package: Text, package_path: Text) -> _Loader: ... def get_directory_loader(self, directory: Text) -> _Loader: ... def generate_etag(self, mtime: datetime.datetime, file_size: int, real_filename: Union[Text, bytes]) -> str: ... def __call__(self, environment: WSGIEnvironment, start_response: StartResponse) -> WSGIApplication: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/exceptions.pyi0000664000175000017500000001056713577124116027514 0ustar davedave00000000000000from typing import Any, Dict, Tuple, List, Text, NoReturn, Optional, Protocol, Type, Union, Iterable from wsgiref.types import WSGIEnvironment, StartResponse from werkzeug.wrappers import Response class _EnvironContainer(Protocol): @property def environ(self) -> WSGIEnvironment: ... class HTTPException(Exception): code: Optional[int] description: Optional[Text] response: Optional[Response] def __init__(self, description: Optional[Text] = ..., response: Optional[Response] = ...) -> None: ... @classmethod def wrap(cls, exception: Type[Exception], name: Optional[str] = ...) -> Any: ... @property def name(self) -> str: ... def get_description(self, environ: Optional[WSGIEnvironment] = ...) -> Text: ... def get_body(self, environ: Optional[WSGIEnvironment] = ...) -> Text: ... def get_headers(self, environ: Optional[WSGIEnvironment] = ...) -> List[Tuple[str, str]]: ... def get_response(self, environ: Optional[Union[WSGIEnvironment, _EnvironContainer]] = ...) -> Response: ... def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... default_exceptions: Dict[int, Type[HTTPException]] class BadRequest(HTTPException): code: int description: Text class ClientDisconnected(BadRequest): ... class SecurityError(BadRequest): ... class BadHost(BadRequest): ... class Unauthorized(HTTPException): code: int description: Text www_authenticate: Optional[Iterable[object]] def __init__( self, description: Optional[Text] = ..., response: Optional[Response] = ..., www_authenticate: Union[None, Tuple[object, ...], List[object], object] = ..., ) -> None: ... class Forbidden(HTTPException): code: int description: Text class NotFound(HTTPException): code: int description: Text class MethodNotAllowed(HTTPException): code: int description: Text valid_methods: Any def __init__(self, valid_methods: Optional[Any] = ..., description: Optional[Any] = ...): ... class NotAcceptable(HTTPException): code: int description: Text class RequestTimeout(HTTPException): code: int description: Text class Conflict(HTTPException): code: int description: Text class Gone(HTTPException): code: int description: Text class LengthRequired(HTTPException): code: int description: Text class PreconditionFailed(HTTPException): code: int description: Text class RequestEntityTooLarge(HTTPException): code: int description: Text class RequestURITooLarge(HTTPException): code: int description: Text class UnsupportedMediaType(HTTPException): code: int description: Text class RequestedRangeNotSatisfiable(HTTPException): code: int description: Text length: Any units: str def __init__(self, length: Optional[Any] = ..., units: str = ..., description: Optional[Any] = ...): ... class ExpectationFailed(HTTPException): code: int description: Text class ImATeapot(HTTPException): code: int description: Text class UnprocessableEntity(HTTPException): code: int description: Text class Locked(HTTPException): code: int description: Text class FailedDependency(HTTPException): code: int description: Text class PreconditionRequired(HTTPException): code: int description: Text class TooManyRequests(HTTPException): code: int description: Text class RequestHeaderFieldsTooLarge(HTTPException): code: int description: Text class UnavailableForLegalReasons(HTTPException): code: int description: Text class InternalServerError(HTTPException): code: int description: Text class NotImplemented(HTTPException): code: int description: Text class BadGateway(HTTPException): code: int description: Text class ServiceUnavailable(HTTPException): code: int description: Text class GatewayTimeout(HTTPException): code: int description: Text class HTTPVersionNotSupported(HTTPException): code: int description: Text class Aborter: mapping: Any def __init__(self, mapping: Optional[Any] = ..., extra: Optional[Any] = ...) -> None: ... def __call__(self, code: Union[int, Response], *args: Any, **kwargs: Any) -> NoReturn: ... def abort(status: Union[int, Response], *args: Any, **kwargs: Any) -> NoReturn: ... class BadRequestKeyError(BadRequest, KeyError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/testapp.pyi0000664000175000017500000000034113577124116027000 0ustar davedave00000000000000from typing import Any from werkzeug.wrappers import BaseRequest as Request, BaseResponse as Response logo: Any TEMPLATE: Any def iter_sys_path(): ... def render_testapp(req): ... def test_app(environ, start_response): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/serving.pyi0000664000175000017500000000717213577124116027006 0ustar davedave00000000000000import sys from typing import Any, Optional if sys.version_info < (3,): from SocketServer import ThreadingMixIn, ForkingMixIn from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler else: from socketserver import ThreadingMixIn, ForkingMixIn from http.server import HTTPServer, BaseHTTPRequestHandler class _SslDummy: def __getattr__(self, name): ... ssl: Any LISTEN_QUEUE: Any can_open_by_fd: Any class WSGIRequestHandler(BaseHTTPRequestHandler): @property def server_version(self): ... def make_environ(self): ... environ: Any close_connection: Any def run_wsgi(self): ... def handle(self): ... def initiate_shutdown(self): ... def connection_dropped(self, error, environ: Optional[Any] = ...): ... raw_requestline: Any def handle_one_request(self): ... def send_response(self, code, message: Optional[Any] = ...): ... def version_string(self): ... def address_string(self): ... def port_integer(self): ... def log_request(self, code: object = ..., size: object = ...) -> None: ... def log_error(self, *args): ... def log_message(self, format, *args): ... def log(self, type, message, *args): ... BaseRequestHandler: Any def generate_adhoc_ssl_pair(cn: Optional[Any] = ...): ... def make_ssl_devcert(base_path, host: Optional[Any] = ..., cn: Optional[Any] = ...): ... def generate_adhoc_ssl_context(): ... def load_ssl_context(cert_file, pkey_file: Optional[Any] = ..., protocol: Optional[Any] = ...): ... class _SSLContext: def __init__(self, protocol): ... def load_cert_chain(self, certfile, keyfile: Optional[Any] = ..., password: Optional[Any] = ...): ... def wrap_socket(self, sock, **kwargs): ... def is_ssl_error(error: Optional[Any] = ...): ... def select_ip_version(host, port): ... class BaseWSGIServer(HTTPServer): multithread: Any multiprocess: Any request_queue_size: Any address_family: Any app: Any passthrough_errors: Any shutdown_signal: Any host: Any port: Any socket: Any server_address: Any ssl_context: Any def __init__(self, host, port, app, handler: Optional[Any] = ..., passthrough_errors: bool = ..., ssl_context: Optional[Any] = ..., fd: Optional[Any] = ...): ... def log(self, type, message, *args): ... def serve_forever(self): ... def handle_error(self, request, client_address): ... def get_request(self): ... class ThreadedWSGIServer(ThreadingMixIn, BaseWSGIServer): multithread: Any daemon_threads: Any class ForkingWSGIServer(ForkingMixIn, BaseWSGIServer): multiprocess: Any max_children: Any def __init__(self, host, port, app, processes: int = ..., handler: Optional[Any] = ..., passthrough_errors: bool = ..., ssl_context: Optional[Any] = ..., fd: Optional[Any] = ...): ... def make_server(host: Optional[Any] = ..., port: Optional[Any] = ..., app: Optional[Any] = ..., threaded: bool = ..., processes: int = ..., request_handler: Optional[Any] = ..., passthrough_errors: bool = ..., ssl_context: Optional[Any] = ..., fd: Optional[Any] = ...): ... def is_running_from_reloader(): ... def run_simple(hostname, port, application, use_reloader: bool = ..., use_debugger: bool = ..., use_evalex: bool = ..., extra_files: Optional[Any] = ..., reloader_interval: int = ..., reloader_type: str = ..., threaded: bool = ..., processes: int = ..., request_handler: Optional[Any] = ..., static_files: Optional[Any] = ..., passthrough_errors: bool = ..., ssl_context: Optional[Any] = ...): ... def run_with_reloader(*args, **kwargs): ... def main(): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/test.pyi0000664000175000017500000001350513577124116026305 0ustar davedave00000000000000import sys from wsgiref.types import WSGIEnvironment from typing import Any, Generic, Optional, Text, Tuple, Type, TypeVar, overload from typing_extensions import Literal if sys.version_info < (3,): from urllib2 import Request as U2Request from cookielib import CookieJar else: from urllib.request import Request as U2Request from http.cookiejar import CookieJar def stream_encode_multipart(values, use_tempfile: int = ..., threshold=..., boundary: Optional[Any] = ..., charset: Text = ...): ... def encode_multipart(values, boundary: Optional[Any] = ..., charset: Text = ...): ... def File(fd, filename: Optional[Any] = ..., mimetype: Optional[Any] = ...): ... class _TestCookieHeaders: headers: Any def __init__(self, headers): ... def getheaders(self, name): ... def get_all(self, name, default: Optional[Any] = ...): ... class _TestCookieResponse: headers: Any def __init__(self, headers): ... def info(self): ... class _TestCookieJar(CookieJar): def inject_wsgi(self, environ): ... def extract_wsgi(self, environ, headers): ... class EnvironBuilder: server_protocol: Any wsgi_version: Any request_class: Any charset: Text path: Any base_url: Any query_string: Any args: Any method: Any headers: Any content_type: Any errors_stream: Any multithread: Any multiprocess: Any run_once: Any environ_base: Any environ_overrides: Any input_stream: Any content_length: Any closed: Any def __init__(self, path: str = ..., base_url: Optional[Any] = ..., query_string: Optional[Any] = ..., method: str = ..., input_stream: Optional[Any] = ..., content_type: Optional[Any] = ..., content_length: Optional[Any] = ..., errors_stream: Optional[Any] = ..., multithread: bool = ..., multiprocess: bool = ..., run_once: bool = ..., headers: Optional[Any] = ..., data: Optional[Any] = ..., environ_base: Optional[Any] = ..., environ_overrides: Optional[Any] = ..., charset: Text = ...): ... form: Any files: Any @property def server_name(self): ... @property def server_port(self): ... def __del__(self): ... def close(self): ... def get_environ(self): ... def get_request(self, cls: Optional[Any] = ...): ... class ClientRedirectError(Exception): ... # Response type for the client below. # By default _R is Tuple[Iterable[Any], Union[Text, int], datastructures.Headers] _R = TypeVar('_R') class Client(Generic[_R]): application: Any response_wrapper: Optional[Type[_R]] cookie_jar: Any allow_subdomain_redirects: Any def __init__(self, application, response_wrapper: Optional[Type[_R]] = ..., use_cookies: bool = ..., allow_subdomain_redirects: bool = ...): ... def set_cookie(self, server_name, key, value: str = ..., max_age: Optional[Any] = ..., expires: Optional[Any] = ..., path: str = ..., domain: Optional[Any] = ..., secure: Optional[Any] = ..., httponly: bool = ..., charset: Text = ...): ... def delete_cookie(self, server_name, key, path: str = ..., domain: Optional[Any] = ...): ... def run_wsgi_app(self, environ, buffered: bool = ...): ... def resolve_redirect(self, response, new_location, environ, buffered: bool = ...): ... @overload def open(self, *args, as_tuple: Literal[True], **kwargs) -> Tuple[WSGIEnvironment, _R]: ... @overload def open(self, *args, as_tuple: Literal[False] = ..., **kwargs) -> _R: ... @overload def open(self, *args, as_tuple: bool, **kwargs) -> Any: ... @overload def get(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def get(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def get(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def patch(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def patch(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def patch(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def post(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def post(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def post(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def head(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def head(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def head(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def put(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def put(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def put(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def delete(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def delete(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def delete(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def options(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def options(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def options(self, *args, as_tuple: bool, **kw) -> Any: ... @overload def trace(self, *args, as_tuple: Literal[True], **kw) -> Tuple[WSGIEnvironment, _R]: ... @overload def trace(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ... @overload def trace(self, *args, as_tuple: bool, **kw) -> Any: ... def create_environ(*args, **kwargs): ... def run_wsgi_app(app, environ, buffered: bool = ...): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/werkzeug/local.pyi0000664000175000017500000000441313577124116026416 0ustar davedave00000000000000from typing import Any, Optional def release_local(local): ... class Local: def __init__(self): ... def __iter__(self): ... def __call__(self, proxy): ... def __release_local__(self): ... def __getattr__(self, name): ... def __setattr__(self, name, value): ... def __delattr__(self, name): ... class LocalStack: def __init__(self): ... def __release_local__(self): ... def _get__ident_func__(self): ... def _set__ident_func__(self, value): ... __ident_func__: Any def __call__(self): ... def push(self, obj): ... def pop(self): ... @property def top(self): ... class LocalManager: locals: Any ident_func: Any def __init__(self, locals: Optional[Any] = ..., ident_func: Optional[Any] = ...): ... def get_ident(self): ... def cleanup(self): ... def make_middleware(self, app): ... def middleware(self, func): ... class LocalProxy: def __init__(self, local, name: Optional[Any] = ...): ... @property def __dict__(self): ... def __bool__(self): ... def __unicode__(self): ... def __dir__(self): ... def __getattr__(self, name): ... def __setitem__(self, key, value): ... def __delitem__(self, key): ... __getslice__: Any def __setslice__(self, i, j, seq): ... def __delslice__(self, i, j): ... __setattr__: Any __delattr__: Any __lt__: Any __le__: Any __eq__: Any __ne__: Any __gt__: Any __ge__: Any __cmp__: Any __hash__: Any __call__: Any __len__: Any __getitem__: Any __iter__: Any __contains__: Any __add__: Any __sub__: Any __mul__: Any __floordiv__: Any __mod__: Any __divmod__: Any __pow__: Any __lshift__: Any __rshift__: Any __and__: Any __xor__: Any __or__: Any __div__: Any __truediv__: Any __neg__: Any __pos__: Any __abs__: Any __invert__: Any __complex__: Any __int__: Any __long__: Any __float__: Any __oct__: Any __hex__: Any __index__: Any __coerce__: Any __enter__: Any __exit__: Any __radd__: Any __rsub__: Any __rmul__: Any __rdiv__: Any __rtruediv__: Any __rfloordiv__: Any __rmod__: Any __rdivmod__: Any __copy__: Any __deepcopy__: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2and3/ujson.pyi0000664000175000017500000000202613577124116024615 0ustar davedave00000000000000# Stubs for ujson # See: https://pypi.python.org/pypi/ujson from typing import Any, AnyStr, IO, Optional __version__: str def encode( obj: Any, ensure_ascii: bool = ..., double_precision: int = ..., encode_html_chars: bool = ..., escape_forward_slashes: bool = ..., sort_keys: bool = ..., indent: int = ..., ) -> str: ... def dumps( obj: Any, ensure_ascii: bool = ..., double_precision: int = ..., encode_html_chars: bool = ..., escape_forward_slashes: bool = ..., sort_keys: bool = ..., indent: int = ..., ) -> str: ... def dump( obj: Any, fp: IO[str], ensure_ascii: bool = ..., double_precision: int = ..., encode_html_chars: bool = ..., escape_forward_slashes: bool = ..., sort_keys: bool = ..., indent: int = ..., ) -> None: ... def decode( s: AnyStr, precise_float: bool = ..., ) -> Any: ... def loads( s: AnyStr, precise_float: bool = ..., ) -> Any: ... def load( fp: IO[AnyStr], precise_float: bool = ..., ) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/0000775000175000017500000000000013577125145022171 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/ipaddress.pyi0000664000175000017500000001177713577124116024704 0ustar davedave00000000000000from typing import (Any, Container, Generic, Iterable, Iterator, Optional, overload, SupportsInt, Text, Tuple, TypeVar) # Undocumented length constants IPV4LENGTH: int IPV6LENGTH: int _A = TypeVar("_A", IPv4Address, IPv6Address) _N = TypeVar("_N", IPv4Network, IPv6Network) _T = TypeVar("_T") def ip_address(address: object) -> Any: ... # morally Union[IPv4Address, IPv6Address] def ip_network(address: object, strict: bool = ...) -> Any: ... # morally Union[IPv4Network, IPv6Network] def ip_interface(address: object) -> Any: ... # morally Union[IPv4Interface, IPv6Interface] class _IPAddressBase: def __eq__(self, other: Any) -> bool: ... def __ge__(self: _T, other: _T) -> bool: ... def __gt__(self: _T, other: _T) -> bool: ... def __le__(self: _T, other: _T) -> bool: ... def __lt__(self: _T, other: _T) -> bool: ... def __ne__(self, other: Any) -> bool: ... @property def compressed(self) -> Text: ... @property def exploded(self) -> Text: ... @property def reverse_pointer(self) -> Text: ... @property def version(self) -> int: ... class _BaseAddress(_IPAddressBase, SupportsInt): def __init__(self, address: object) -> None: ... def __add__(self: _T, other: int) -> _T: ... def __hash__(self) -> int: ... def __int__(self) -> int: ... def __sub__(self: _T, other: int) -> _T: ... @property def is_global(self) -> bool: ... @property def is_link_local(self) -> bool: ... @property def is_loopback(self) -> bool: ... @property def is_multicast(self) -> bool: ... @property def is_private(self) -> bool: ... @property def is_reserved(self) -> bool: ... @property def is_unspecified(self) -> bool: ... @property def max_prefixlen(self) -> int: ... @property def packed(self) -> bytes: ... class _BaseNetwork(_IPAddressBase, Container[_A], Iterable[_A], Generic[_A]): network_address: _A netmask: _A def __init__(self, address: object, strict: bool = ...) -> None: ... def __contains__(self, other: Any) -> bool: ... def __getitem__(self, n: int) -> _A: ... def __iter__(self) -> Iterator[_A]: ... def address_exclude(self: _T, other: _T) -> Iterator[_T]: ... @property def broadcast_address(self) -> _A: ... def compare_networks(self: _T, other: _T) -> int: ... def hosts(self) -> Iterator[_A]: ... @property def is_global(self) -> bool: ... @property def is_link_local(self) -> bool: ... @property def is_loopback(self) -> bool: ... @property def is_multicast(self) -> bool: ... @property def is_private(self) -> bool: ... @property def is_reserved(self) -> bool: ... @property def is_unspecified(self) -> bool: ... @property def max_prefixlen(self) -> int: ... @property def num_addresses(self) -> int: ... def overlaps(self: _T, other: _T) -> bool: ... @property def prefixlen(self) -> int: ... def subnets(self: _T, prefixlen_diff: int = ..., new_prefix: Optional[int] = ...) -> Iterator[_T]: ... def supernet(self: _T, prefixlen_diff: int = ..., new_prefix: Optional[int] = ...) -> _T: ... @property def with_hostmask(self) -> Text: ... @property def with_netmask(self) -> Text: ... @property def with_prefixlen(self) -> Text: ... @property def hostmask(self) -> _A: ... class _BaseInterface(_BaseAddress, Generic[_A, _N]): hostmask: _A netmask: _A network: _N @property def ip(self) -> _A: ... @property def with_hostmask(self) -> Text: ... @property def with_netmask(self) -> Text: ... @property def with_prefixlen(self) -> Text: ... class IPv4Address(_BaseAddress): ... class IPv4Network(_BaseNetwork[IPv4Address]): ... class IPv4Interface(IPv4Address, _BaseInterface[IPv4Address, IPv4Network]): ... class IPv6Address(_BaseAddress): @property def ipv4_mapped(self) -> Optional[IPv4Address]: ... @property def is_site_local(self) -> bool: ... @property def sixtofour(self) -> Optional[IPv4Address]: ... @property def teredo(self) -> Optional[Tuple[IPv4Address, IPv4Address]]: ... class IPv6Network(_BaseNetwork[IPv6Address]): @property def is_site_local(self) -> bool: ... class IPv6Interface(IPv6Address, _BaseInterface[IPv6Address, IPv6Network]): ... def v4_int_to_packed(address: int) -> bytes: ... def v6_int_to_packed(address: int) -> bytes: ... @overload def summarize_address_range(first: IPv4Address, last: IPv4Address) -> Iterator[IPv4Network]: ... @overload def summarize_address_range(first: IPv6Address, last: IPv6Address) -> Iterator[IPv6Network]: ... def collapse_addresses(addresses: Iterable[_N]) -> Iterator[_N]: ... @overload def get_mixed_type_key(obj: _A) -> Tuple[int, _A]: ... @overload def get_mixed_type_key(obj: IPv4Network) -> Tuple[int, IPv4Address, IPv4Address]: ... @overload def get_mixed_type_key(obj: IPv6Network) -> Tuple[int, IPv6Address, IPv6Address]: ... class AddressValueError(ValueError): ... class NetmaskValueError(ValueError): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/pymssql.pyi0000664000175000017500000000352413577124116024425 0ustar davedave00000000000000from datetime import datetime, date, time from typing import Any, Dict, Tuple, Iterable, List, Optional, Union, Sequence Scalar = Union[int, float, str, datetime, date, time] Result = Union[Tuple[Scalar, ...], Dict[str, Scalar]] class Connection(object): def __init__(self, user, password, host, database, timeout, login_timeout, charset, as_dict) -> None: ... def autocommit(self, status: bool) -> None: ... def close(self) -> None: ... def commit(self) -> None: ... def cursor(self) -> Cursor: ... def rollback(self) -> None: ... class Cursor(object): def __init__(self) -> None: ... def __iter__(self): ... def __next__(self) -> Any: ... def callproc(self, procname: str, **kwargs) -> None: ... def close(self) -> None: ... def execute(self, stmt: str, params: Optional[Union[Scalar, Tuple[Scalar, ...], Dict[str, Scalar]]]) -> None: ... def executemany(self, stmt: str, params: Optional[Sequence[Tuple[Scalar, ...]]]) -> None: ... def fetchall(self) -> List[Result]: ... def fetchmany(self, size: Optional[int]) -> List[Result]: ... def fetchone(self) -> Result: ... def connect(server: Optional[str], user: Optional[str], password: Optional[str], database: Optional[str], timeout: Optional[int], login_timeout: Optional[int], charset: Optional[str], as_dict: Optional[bool], host: Optional[str], appname: Optional[str], port: Optional[str], conn_properties: Optional[Union[str, Sequence[str]]], autocommit: Optional[bool], tds_version: Optional[str]) -> Connection: ... def get_max_connections() -> int: ... def set_max_connections(n: int) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/scribe/0000775000175000017500000000000013577125145023440 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/scribe/__init__.pyi0000664000175000017500000000000013577124116025705 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/scribe/scribe.pyi0000664000175000017500000000225713577124116025435 0ustar davedave00000000000000from typing import Any import fb303.FacebookService from .ttypes import * # noqa: F403 from thrift.Thrift import TProcessor # type: ignore # We don't have thrift stubs in typeshed class Iface(fb303.FacebookService.Iface): def Log(self, messages): ... class Client(fb303.FacebookService.Client, Iface): def __init__(self, iprot, oprot=...) -> None: ... def Log(self, messages): ... def send_Log(self, messages): ... def recv_Log(self): ... class Processor(fb303.FacebookService.Processor, Iface, TProcessor): def __init__(self, handler) -> None: ... def process(self, iprot, oprot): ... def process_Log(self, seqid, iprot, oprot): ... class Log_args: thrift_spec: Any messages: Any def __init__(self, messages=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class Log_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/scribe/ttypes.pyi0000664000175000017500000000057713577124116025521 0ustar davedave00000000000000from typing import Any fastbinary: Any class ResultCode: OK: Any TRY_LATER: Any class LogEntry: thrift_spec: Any category: Any message: Any def __init__(self, category=..., message=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/0000775000175000017500000000000013577125145023637 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/__init__.pyi0000664000175000017500000000000013577124116026104 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/httpserver.pyi0000664000175000017500000000277713577124116026602 0ustar davedave00000000000000from typing import Any from tornado import httputil from tornado.tcpserver import TCPServer from tornado.util import Configurable class HTTPServer(TCPServer, Configurable, httputil.HTTPServerConnectionDelegate): def __init__(self, *args, **kwargs) -> None: ... request_callback: Any no_keep_alive: Any xheaders: Any protocol: Any conn_params: Any def initialize(self, request_callback, no_keep_alive=..., io_loop=..., xheaders=..., ssl_options=..., protocol=..., decompress_request=..., chunk_size=..., max_header_size=..., idle_connection_timeout=..., body_timeout=..., max_body_size=..., max_buffer_size=...): ... @classmethod def configurable_base(cls): ... @classmethod def configurable_default(cls): ... def close_all_connections(self): ... def handle_stream(self, stream, address): ... def start_request(self, server_conn, request_conn): ... def on_close(self, server_conn): ... class _HTTPRequestContext: address: Any protocol: Any address_family: Any remote_ip: Any def __init__(self, stream, address, protocol) -> None: ... class _ServerRequestAdapter(httputil.HTTPMessageDelegate): server: Any connection: Any request: Any delegate: Any def __init__(self, server, server_conn, request_conn) -> None: ... def headers_received(self, start_line, headers): ... def data_received(self, chunk): ... def finish(self): ... def on_connection_close(self): ... HTTPRequest: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/testing.pyi0000664000175000017500000000351113577124116026034 0ustar davedave00000000000000from typing import Any, Callable, Generator, Optional, overload import unittest import logging AsyncHTTPClient: Any gen: Any HTTPServer: Any IOLoop: Any netutil: Any SimpleAsyncHTTPClient: Any def get_unused_port(): ... def bind_unused_port(): ... class AsyncTestCase(unittest.TestCase): def __init__(self, *args, **kwargs): ... io_loop: Any def setUp(self): ... def tearDown(self): ... def get_new_ioloop(self): ... def run(self, result: Optional[Any] = ...): ... def stop(self, _arg: Optional[Any] = ..., **kwargs): ... def wait(self, condition: Optional[Any] = ..., timeout: float = ...): ... class AsyncHTTPTestCase(AsyncTestCase): http_client: Any http_server: Any def setUp(self): ... def get_http_client(self): ... def get_http_server(self): ... def get_app(self): ... def fetch(self, path, **kwargs): ... def get_httpserver_options(self): ... def get_http_port(self): ... def get_protocol(self): ... def get_url(self, path): ... def tearDown(self): ... class AsyncHTTPSTestCase(AsyncHTTPTestCase): def get_http_client(self): ... def get_httpserver_options(self): ... def get_ssl_options(self): ... def get_protocol(self): ... @overload def gen_test(*, timeout: Optional[float] = ...) -> Callable[[Callable[..., Generator[Any, Any, Any]]], Callable[..., None]]: ... @overload def gen_test(func: Callable[..., Generator[Any, Any, Any]]) -> Callable[..., None]: ... class LogTrapTestCase(unittest.TestCase): def run(self, result: Optional[Any] = ...): ... class ExpectLog(logging.Filter): logger: Any regex: Any required: Any matched: Any def __init__(self, logger, regex, required: bool = ...): ... def filter(self, record): ... def __enter__(self): ... def __exit__(self, typ, value, tb): ... def main(**kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/gen.pyi0000664000175000017500000000534113577124116025133 0ustar davedave00000000000000from typing import Any, Dict, NamedTuple, Tuple singledispatch: Any class KeyReuseError(Exception): ... class UnknownKeyError(Exception): ... class LeakedCallbackError(Exception): ... class BadYieldError(Exception): ... class ReturnValueIgnoredError(Exception): ... class TimeoutError(Exception): ... def engine(func): ... def coroutine(func, replace_callback=...): ... class Return(Exception): value: Any def __init__(self, value=...) -> None: ... class WaitIterator: current_index: Any def __init__(self, *args, **kwargs) -> None: ... def done(self): ... def next(self): ... class YieldPoint: def start(self, runner): ... def is_ready(self): ... def get_result(self): ... class Callback(YieldPoint): key: Any def __init__(self, key) -> None: ... runner: Any def start(self, runner): ... def is_ready(self): ... def get_result(self): ... class Wait(YieldPoint): key: Any def __init__(self, key) -> None: ... runner: Any def start(self, runner): ... def is_ready(self): ... def get_result(self): ... class WaitAll(YieldPoint): keys: Any def __init__(self, keys) -> None: ... runner: Any def start(self, runner): ... def is_ready(self): ... def get_result(self): ... def Task(func, *args, **kwargs): ... class YieldFuture(YieldPoint): future: Any io_loop: Any def __init__(self, future, io_loop=...) -> None: ... runner: Any key: Any result_fn: Any def start(self, runner): ... def is_ready(self): ... def get_result(self): ... class Multi(YieldPoint): keys: Any children: Any unfinished_children: Any quiet_exceptions: Any def __init__(self, children, quiet_exceptions=...) -> None: ... def start(self, runner): ... def is_ready(self): ... def get_result(self): ... def multi_future(children, quiet_exceptions=...): ... def maybe_future(x): ... def with_timeout(timeout, future, io_loop=..., quiet_exceptions=...): ... def sleep(duration): ... moment: Any class Runner: gen: Any result_future: Any future: Any yield_point: Any pending_callbacks: Any results: Any running: Any finished: Any had_exception: Any io_loop: Any stack_context_deactivate: Any def __init__(self, gen, result_future, first_yielded) -> None: ... def register_callback(self, key): ... def is_ready(self, key): ... def set_result(self, key, result): ... def pop_result(self, key): ... def run(self): ... def handle_yield(self, yielded): ... def result_callback(self, key): ... def handle_exception(self, typ, value, tb): ... class Arguments(NamedTuple): args: Tuple[str, ...] kwargs: Dict[str, Any] def convert_yielded(yielded): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/netutil.pyi0000664000175000017500000000250513577124116026045 0ustar davedave00000000000000from typing import Any from tornado.util import Configurable ssl: Any certifi: Any xrange: Any ssl_match_hostname: Any SSLCertificateError: Any def bind_sockets(port, address=..., family=..., backlog=..., flags=...): ... def bind_unix_socket(file, mode=..., backlog=...): ... def add_accept_handler(sock, callback, io_loop=...): ... def is_valid_ip(ip): ... class Resolver(Configurable): @classmethod def configurable_base(cls): ... @classmethod def configurable_default(cls): ... def resolve(self, host, port, family=..., callback=...): ... def close(self): ... class ExecutorResolver(Resolver): io_loop: Any executor: Any close_executor: Any def initialize(self, io_loop=..., executor=..., close_executor=...): ... def close(self): ... def resolve(self, host, port, family=...): ... class BlockingResolver(ExecutorResolver): def initialize(self, io_loop=...): ... class ThreadedResolver(ExecutorResolver): def initialize(self, io_loop=..., num_threads=...): ... class OverrideResolver(Resolver): resolver: Any mapping: Any def initialize(self, resolver, mapping): ... def close(self): ... def resolve(self, host, port, *args, **kwargs): ... def ssl_options_to_context(ssl_options): ... def ssl_wrap_socket(socket, ssl_options, server_hostname=..., **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/locks.pyi0000664000175000017500000000237713577124116025503 0ustar davedave00000000000000from typing import Any, Optional class _TimeoutGarbageCollector: def __init__(self): ... class Condition(_TimeoutGarbageCollector): io_loop: Any def __init__(self): ... def wait(self, timeout: Optional[Any] = ...): ... def notify(self, n: int = ...): ... def notify_all(self): ... class Event: def __init__(self): ... def is_set(self): ... def set(self): ... def clear(self): ... def wait(self, timeout: Optional[Any] = ...): ... class _ReleasingContextManager: def __init__(self, obj): ... def __enter__(self): ... def __exit__(self, exc_type, exc_val, exc_tb): ... class Semaphore(_TimeoutGarbageCollector): def __init__(self, value: int = ...): ... def release(self): ... def acquire(self, timeout: Optional[Any] = ...): ... def __enter__(self): ... __exit__: Any def __aenter__(self): ... def __aexit__(self, typ, value, tb): ... class BoundedSemaphore(Semaphore): def __init__(self, value: int = ...): ... def release(self): ... class Lock: def __init__(self): ... def acquire(self, timeout: Optional[Any] = ...): ... def release(self): ... def __enter__(self): ... __exit__: Any def __aenter__(self): ... def __aexit__(self, typ, value, tb): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/ioloop.pyi0000664000175000017500000000535513577124116025670 0ustar davedave00000000000000from typing import Any from tornado.util import Configurable signal: Any class TimeoutError(Exception): ... class IOLoop(Configurable): NONE: Any READ: Any WRITE: Any ERROR: Any @staticmethod def instance(): ... @staticmethod def initialized(): ... def install(self): ... @staticmethod def clear_instance(): ... @staticmethod def current(instance=...): ... def make_current(self): ... @staticmethod def clear_current(): ... @classmethod def configurable_base(cls): ... @classmethod def configurable_default(cls): ... def initialize(self, make_current=...): ... def close(self, all_fds=...): ... def add_handler(self, fd, handler, events): ... def update_handler(self, fd, events): ... def remove_handler(self, fd): ... def set_blocking_signal_threshold(self, seconds, action): ... def set_blocking_log_threshold(self, seconds): ... def log_stack(self, signal, frame): ... def start(self): ... def stop(self): ... def run_sync(self, func, timeout=...): ... def time(self): ... def add_timeout(self, deadline, callback, *args, **kwargs): ... def call_later(self, delay, callback, *args, **kwargs): ... def call_at(self, when, callback, *args, **kwargs): ... def remove_timeout(self, timeout): ... def add_callback(self, callback, *args, **kwargs): ... def add_callback_from_signal(self, callback, *args, **kwargs): ... def spawn_callback(self, callback, *args, **kwargs): ... def add_future(self, future, callback): ... def handle_callback_exception(self, callback): ... def split_fd(self, fd): ... def close_fd(self, fd): ... class PollIOLoop(IOLoop): time_func: Any def initialize(self, impl, time_func=..., **kwargs): ... def close(self, all_fds=...): ... def add_handler(self, fd, handler, events): ... def update_handler(self, fd, events): ... def remove_handler(self, fd): ... def set_blocking_signal_threshold(self, seconds, action): ... def start(self): ... def stop(self): ... def time(self): ... def call_at(self, deadline, callback, *args, **kwargs): ... def remove_timeout(self, timeout): ... def add_callback(self, callback, *args, **kwargs): ... def add_callback_from_signal(self, callback, *args, **kwargs): ... class _Timeout: deadline: Any callback: Any tiebreaker: Any def __init__(self, deadline, callback, io_loop) -> None: ... def __lt__(self, other): ... def __le__(self, other): ... class PeriodicCallback: callback: Any callback_time: Any io_loop: Any def __init__(self, callback, callback_time, io_loop=...) -> None: ... def start(self): ... def stop(self): ... def is_running(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/web.pyi0000664000175000017500000002100513577124116025132 0ustar davedave00000000000000from typing import Any from tornado import httputil MIN_SUPPORTED_SIGNED_VALUE_VERSION: Any MAX_SUPPORTED_SIGNED_VALUE_VERSION: Any DEFAULT_SIGNED_VALUE_VERSION: Any DEFAULT_SIGNED_VALUE_MIN_VERSION: Any class RequestHandler: SUPPORTED_METHODS: Any application: Any request: Any path_args: Any path_kwargs: Any ui: Any def __init__(self, application, request, **kwargs) -> None: ... def initialize(self): ... @property def settings(self): ... def head(self, *args, **kwargs): ... def get(self, *args, **kwargs): ... def post(self, *args, **kwargs): ... def delete(self, *args, **kwargs): ... def patch(self, *args, **kwargs): ... def put(self, *args, **kwargs): ... def options(self, *args, **kwargs): ... def prepare(self): ... def on_finish(self): ... def on_connection_close(self): ... def clear(self): ... def set_default_headers(self): ... def set_status(self, status_code, reason=...): ... def get_status(self): ... def set_header(self, name, value): ... def add_header(self, name, value): ... def clear_header(self, name): ... def get_argument(self, name, default=..., strip=...): ... def get_arguments(self, name, strip=...): ... def get_body_argument(self, name, default=..., strip=...): ... def get_body_arguments(self, name, strip=...): ... def get_query_argument(self, name, default=..., strip=...): ... def get_query_arguments(self, name, strip=...): ... def decode_argument(self, value, name=...): ... @property def cookies(self): ... def get_cookie(self, name, default=...): ... def set_cookie(self, name, value, domain=..., expires=..., path=..., expires_days=..., **kwargs): ... def clear_cookie(self, name, path=..., domain=...): ... def clear_all_cookies(self, path=..., domain=...): ... def set_secure_cookie(self, name, value, expires_days=..., version=..., **kwargs): ... def create_signed_value(self, name, value, version=...): ... def get_secure_cookie(self, name, value=..., max_age_days=..., min_version=...): ... def get_secure_cookie_key_version(self, name, value=...): ... def redirect(self, url, permanent=..., status=...): ... def write(self, chunk): ... def render(self, template_name, **kwargs): ... def render_string(self, template_name, **kwargs): ... def get_template_namespace(self): ... def create_template_loader(self, template_path): ... def flush(self, include_footers=..., callback=...): ... def finish(self, chunk=...): ... def send_error(self, status_code=..., **kwargs): ... def write_error(self, status_code, **kwargs): ... @property def locale(self): ... @locale.setter def locale(self, value): ... def get_user_locale(self): ... def get_browser_locale(self, default=...): ... @property def current_user(self): ... @current_user.setter def current_user(self, value): ... def get_current_user(self): ... def get_login_url(self): ... def get_template_path(self): ... @property def xsrf_token(self): ... def check_xsrf_cookie(self): ... def xsrf_form_html(self): ... def static_url(self, path, include_host=..., **kwargs): ... def require_setting(self, name, feature=...): ... def reverse_url(self, name, *args): ... def compute_etag(self): ... def set_etag_header(self): ... def check_etag_header(self): ... def data_received(self, chunk): ... def log_exception(self, typ, value, tb): ... def asynchronous(method): ... def stream_request_body(cls): ... def removeslash(method): ... def addslash(method): ... class Application(httputil.HTTPServerConnectionDelegate): transforms: Any handlers: Any named_handlers: Any default_host: Any settings: Any ui_modules: Any ui_methods: Any def __init__(self, handlers=..., default_host=..., transforms=..., **settings) -> None: ... def listen(self, port, address=..., **kwargs): ... def add_handlers(self, host_pattern, host_handlers): ... def add_transform(self, transform_class): ... def start_request(self, server_conn, request_conn): ... def __call__(self, request): ... def reverse_url(self, name, *args): ... def log_request(self, handler): ... class _RequestDispatcher(httputil.HTTPMessageDelegate): application: Any connection: Any request: Any chunks: Any handler_class: Any handler_kwargs: Any path_args: Any path_kwargs: Any def __init__(self, application, connection) -> None: ... def headers_received(self, start_line, headers): ... stream_request_body: Any def set_request(self, request): ... def data_received(self, data): ... def finish(self): ... def on_connection_close(self): ... handler: Any def execute(self): ... class HTTPError(Exception): status_code: Any log_message: Any args: Any reason: Any def __init__(self, status_code, log_message=..., *args, **kwargs) -> None: ... class Finish(Exception): ... class MissingArgumentError(HTTPError): arg_name: Any def __init__(self, arg_name) -> None: ... class ErrorHandler(RequestHandler): def initialize(self, status_code): ... def prepare(self): ... def check_xsrf_cookie(self): ... class RedirectHandler(RequestHandler): def initialize(self, url, permanent=...): ... def get(self): ... class StaticFileHandler(RequestHandler): CACHE_MAX_AGE: Any root: Any default_filename: Any def initialize(self, path, default_filename=...): ... @classmethod def reset(cls): ... def head(self, path): ... path: Any absolute_path: Any modified: Any def get(self, path, include_body=...): ... def compute_etag(self): ... def set_headers(self): ... def should_return_304(self): ... @classmethod def get_absolute_path(cls, root, path): ... def validate_absolute_path(self, root, absolute_path): ... @classmethod def get_content(cls, abspath, start=..., end=...): ... @classmethod def get_content_version(cls, abspath): ... def get_content_size(self): ... def get_modified_time(self): ... def get_content_type(self): ... def set_extra_headers(self, path): ... def get_cache_time(self, path, modified, mime_type): ... @classmethod def make_static_url(cls, settings, path, include_version=...): ... def parse_url_path(self, url_path): ... @classmethod def get_version(cls, settings, path): ... class FallbackHandler(RequestHandler): fallback: Any def initialize(self, fallback): ... def prepare(self): ... class OutputTransform: def __init__(self, request) -> None: ... def transform_first_chunk(self, status_code, headers, chunk, finishing): ... def transform_chunk(self, chunk, finishing): ... class GZipContentEncoding(OutputTransform): CONTENT_TYPES: Any MIN_LENGTH: Any def __init__(self, request) -> None: ... def transform_first_chunk(self, status_code, headers, chunk, finishing): ... def transform_chunk(self, chunk, finishing): ... def authenticated(method): ... class UIModule: handler: Any request: Any ui: Any locale: Any def __init__(self, handler) -> None: ... @property def current_user(self): ... def render(self, *args, **kwargs): ... def embedded_javascript(self): ... def javascript_files(self): ... def embedded_css(self): ... def css_files(self): ... def html_head(self): ... def html_body(self): ... def render_string(self, path, **kwargs): ... class _linkify(UIModule): def render(self, text, **kwargs): ... class _xsrf_form_html(UIModule): def render(self): ... class TemplateModule(UIModule): def __init__(self, handler) -> None: ... def render(self, path, **kwargs): ... def embedded_javascript(self): ... def javascript_files(self): ... def embedded_css(self): ... def css_files(self): ... def html_head(self): ... def html_body(self): ... class _UIModuleNamespace: handler: Any ui_modules: Any def __init__(self, handler, ui_modules) -> None: ... def __getitem__(self, key): ... def __getattr__(self, key): ... class URLSpec: regex: Any handler_class: Any kwargs: Any name: Any def __init__(self, pattern, handler, kwargs=..., name=...) -> None: ... def reverse(self, *args): ... url: Any def create_signed_value(secret, name, value, version=..., clock=..., key_version=...): ... def decode_signed_value(secret, name, value, max_age_days=..., clock=..., min_version=...): ... def get_signature_key_version(value): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/httpclient.pyi0000664000175000017500000000573113577124116026543 0ustar davedave00000000000000from typing import Any from tornado.util import Configurable class HTTPClient: def __init__(self, async_client_class=..., **kwargs) -> None: ... def __del__(self): ... def close(self): ... def fetch(self, request, **kwargs): ... class AsyncHTTPClient(Configurable): @classmethod def configurable_base(cls): ... @classmethod def configurable_default(cls): ... def __new__(cls, io_loop=..., force_instance=..., **kwargs): ... io_loop: Any defaults: Any def initialize(self, io_loop, defaults=...): ... def close(self): ... def fetch(self, request, callback=..., raise_error=..., **kwargs): ... def fetch_impl(self, request, callback): ... @classmethod def configure(cls, impl, **kwargs): ... class HTTPRequest: proxy_host: Any proxy_port: Any proxy_username: Any proxy_password: Any url: Any method: Any body_producer: Any auth_username: Any auth_password: Any auth_mode: Any connect_timeout: Any request_timeout: Any follow_redirects: Any max_redirects: Any user_agent: Any decompress_response: Any network_interface: Any streaming_callback: Any header_callback: Any prepare_curl_callback: Any allow_nonstandard_methods: Any validate_cert: Any ca_certs: Any allow_ipv6: Any client_key: Any client_cert: Any ssl_options: Any expect_100_continue: Any start_time: Any def __init__(self, url, method=..., headers=..., body=..., auth_username=..., auth_password=..., auth_mode=..., connect_timeout=..., request_timeout=..., if_modified_since=..., follow_redirects=..., max_redirects=..., user_agent=..., use_gzip=..., network_interface=..., streaming_callback=..., header_callback=..., prepare_curl_callback=..., proxy_host=..., proxy_port=..., proxy_username=..., proxy_password=..., allow_nonstandard_methods=..., validate_cert=..., ca_certs=..., allow_ipv6=..., client_key=..., client_cert=..., body_producer=..., expect_100_continue=..., decompress_response=..., ssl_options=...) -> None: ... @property def headers(self): ... @headers.setter def headers(self, value): ... @property def body(self): ... @body.setter def body(self, value): ... class HTTPResponse: request: Any code: Any reason: Any headers: Any buffer: Any effective_url: Any error: Any request_time: Any time_info: Any def __init__(self, request, code, headers=..., buffer=..., effective_url=..., error=..., request_time=..., time_info=..., reason=...) -> None: ... body: Any def rethrow(self): ... class HTTPError(Exception): code: Any response: Any def __init__(self, code, message=..., response=...) -> None: ... class _RequestProxy: request: Any defaults: Any def __init__(self, request, defaults) -> None: ... def __getattr__(self, name): ... def main(): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/tcpserver.pyi0000664000175000017500000000105413577124116026374 0ustar davedave00000000000000from typing import Any ssl: Any class TCPServer: io_loop: Any ssl_options: Any max_buffer_size: Any read_chunk_size: Any def __init__(self, io_loop=..., ssl_options=..., max_buffer_size=..., read_chunk_size=...) -> None: ... def listen(self, port, address=...): ... def add_sockets(self, sockets): ... def add_socket(self, socket): ... def bind(self, port, address=..., family=..., backlog=...): ... def start(self, num_processes=...): ... def stop(self): ... def handle_stream(self, stream, address): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/util.pyi0000664000175000017500000000206013577124116025332 0ustar davedave00000000000000from typing import Any, Dict xrange: Any class ObjectDict(Dict[Any, Any]): def __getattr__(self, name): ... def __setattr__(self, name, value): ... class GzipDecompressor: decompressobj: Any def __init__(self) -> None: ... def decompress(self, value, max_length=...): ... @property def unconsumed_tail(self): ... def flush(self): ... unicode_type: Any basestring_type: Any def import_object(name): ... bytes_type: Any def errno_from_exception(e): ... class Configurable: def __new__(cls, *args, **kwargs): ... @classmethod def configurable_base(cls): ... @classmethod def configurable_default(cls): ... def initialize(self): ... @classmethod def configure(cls, impl, **kwargs): ... @classmethod def configured_class(cls): ... class ArgReplacer: name: Any arg_pos: Any def __init__(self, func, name) -> None: ... def get_old_value(self, args, kwargs, default=...): ... def replace(self, new_value, args, kwargs): ... def timedelta_to_seconds(td): ... def doctests(): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/httputil.pyi0000664000175000017500000000517113577124116026240 0ustar davedave00000000000000from typing import Any, Dict, NamedTuple from tornado.util import ObjectDict class SSLError(Exception): ... class _NormalizedHeaderCache(Dict[Any, Any]): size: Any queue: Any def __init__(self, size) -> None: ... def __missing__(self, key): ... class HTTPHeaders(Dict[Any, Any]): def __init__(self, *args, **kwargs) -> None: ... def add(self, name, value): ... def get_list(self, name): ... def get_all(self): ... def parse_line(self, line): ... @classmethod def parse(cls, headers): ... def __setitem__(self, name, value): ... def __getitem__(self, name): ... def __delitem__(self, name): ... def __contains__(self, name): ... def get(self, name, default=...): ... def update(self, *args, **kwargs): ... def copy(self): ... __copy__: Any def __deepcopy__(self, memo_dict): ... class HTTPServerRequest: method: Any uri: Any version: Any headers: Any body: Any remote_ip: Any protocol: Any host: Any files: Any connection: Any arguments: Any query_arguments: Any body_arguments: Any def __init__(self, method=..., uri=..., version=..., headers=..., body=..., host=..., files=..., connection=..., start_line=...) -> None: ... def supports_http_1_1(self): ... @property def cookies(self): ... def write(self, chunk, callback=...): ... def finish(self): ... def full_url(self): ... def request_time(self): ... def get_ssl_certificate(self, binary_form=...): ... class HTTPInputError(Exception): ... class HTTPOutputError(Exception): ... class HTTPServerConnectionDelegate: def start_request(self, server_conn, request_conn): ... def on_close(self, server_conn): ... class HTTPMessageDelegate: def headers_received(self, start_line, headers): ... def data_received(self, chunk): ... def finish(self): ... def on_connection_close(self): ... class HTTPConnection: def write_headers(self, start_line, headers, chunk=..., callback=...): ... def write(self, chunk, callback=...): ... def finish(self): ... def url_concat(url, args): ... class HTTPFile(ObjectDict): ... def parse_body_arguments(content_type, body, arguments, files, headers=...): ... def parse_multipart_form_data(boundary, data, arguments, files): ... def format_timestamp(ts): ... class RequestStartLine(NamedTuple): method: str path: str version: str def parse_request_start_line(line): ... class ResponseStartLine(NamedTuple): version: str code: str reason: str def parse_response_start_line(line): ... def doctests(): ... def split_host_and_port(netloc): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/process.pyi0000664000175000017500000000122613577124116026036 0ustar davedave00000000000000from typing import Any, Optional long = int CalledProcessError: Any def cpu_count() -> int: ... def fork_processes(num_processes, max_restarts: int = ...) -> Optional[int]: ... def task_id() -> int: ... class Subprocess: STREAM: Any = ... io_loop: Any = ... stdin: Any = ... stdout: Any = ... stderr: Any = ... proc: Any = ... returncode: Any = ... def __init__(self, *args, **kwargs) -> None: ... def set_exit_callback(self, callback): ... def wait_for_exit(self, raise_error: bool = ...): ... @classmethod def initialize(cls, io_loop: Optional[Any] = ...): ... @classmethod def uninitialize(cls): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/tornado/concurrent.pyi0000664000175000017500000000177013577124116026546 0ustar davedave00000000000000from typing import Any futures: Any class ReturnValueIgnoredError(Exception): ... class _TracebackLogger: exc_info: Any formatted_tb: Any def __init__(self, exc_info) -> None: ... def activate(self): ... def clear(self): ... def __del__(self): ... class Future: def __init__(self) -> None: ... def cancel(self): ... def cancelled(self): ... def running(self): ... def done(self): ... def result(self, timeout=...): ... def exception(self, timeout=...): ... def add_done_callback(self, fn): ... def set_result(self, result): ... def set_exception(self, exception): ... def exc_info(self): ... def set_exc_info(self, exc_info): ... def __del__(self): ... TracebackFuture: Any FUTURES: Any def is_future(x): ... class DummyExecutor: def submit(self, fn, *args, **kwargs): ... def shutdown(self, wait=...): ... dummy_executor: Any def run_on_executor(*args, **kwargs): ... def return_future(f): ... def chain_future(a, b): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/0000775000175000017500000000000013577125145024353 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/__init__.pyi0000664000175000017500000000000013577124116026620 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/futures/0000775000175000017500000000000013577125145026050 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/futures/__init__.pyi0000664000175000017500000000015413577124116030327 0ustar davedave00000000000000from ._base import * # noqa: F403 from .thread import * # noqa: F403 from .process import * # noqa: F403 jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/futures/_base.pyi0000664000175000017500000000752313577124116027650 0ustar davedave00000000000000import threading from logging import Logger from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Optional, Set, List from types import TracebackType import sys FIRST_COMPLETED: str FIRST_EXCEPTION: str ALL_COMPLETED: str PENDING: str RUNNING: str CANCELLED: str CANCELLED_AND_NOTIFIED: str FINISHED: str LOGGER: Logger class Error(Exception): ... class CancelledError(Error): ... class TimeoutError(Error): ... if sys.version_info >= (3, 7): class BrokenExecutor(RuntimeError): ... _T = TypeVar('_T') class Future(Generic[_T]): def __init__(self) -> None: ... def cancel(self) -> bool: ... def cancelled(self) -> bool: ... def running(self) -> bool: ... def done(self) -> bool: ... def add_done_callback(self, fn: Callable[[Future[_T]], Any]) -> None: ... def result(self, timeout: Optional[float] = ...) -> _T: ... def set_running_or_notify_cancel(self) -> bool: ... def set_result(self, result: _T) -> None: ... if sys.version_info >= (3,): def exception(self, timeout: Optional[float] = ...) -> Optional[BaseException]: ... def set_exception(self, exception: Optional[BaseException]) -> None: ... else: def exception(self, timeout: Optional[float] = ...) -> Any: ... def exception_info(self, timeout: Optional[float] = ...) -> Tuple[Any, Optional[TracebackType]]: ... def set_exception(self, exception: Any) -> None: ... def set_exception_info(self, exception: Any, traceback: Optional[TracebackType]) -> None: ... class Executor: def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ... if sys.version_info >= (3, 5): def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...) -> Iterator[_T]: ... else: def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,) -> Iterator[_T]: ... def shutdown(self, wait: bool = ...) -> None: ... def __enter__(self: _T) -> _T: ... def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Optional[bool]: ... def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ... def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]], Set[Future[_T]]]: ... class _Waiter: event: threading.Event finished_futures: List[Future[Any]] def __init__(self) -> None: ... def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _AsCompletedWaiter(_Waiter): lock: threading.Lock def __init__(self) -> None: ... def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _FirstCompletedWaiter(_Waiter): def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _AllCompletedWaiter(_Waiter): num_pending_calls: int stop_on_exception: bool lock: threading.Lock def __init__(self, num_pending_calls: int, stop_on_exception: bool) -> None: ... def add_result(self, future: Future[Any]) -> None: ... def add_exception(self, future: Future[Any]) -> None: ... def add_cancelled(self, future: Future[Any]) -> None: ... class _AcquireFutures: futures: Iterable[Future[Any]] def __init__(self, futures: Iterable[Future[Any]]) -> None: ... def __enter__(self) -> None: ... def __exit__(self, *args: Any) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/futures/process.pyi0000664000175000017500000000127313577124116030251 0ustar davedave00000000000000from typing import Any, Callable, Optional, Tuple from ._base import Executor import sys EXTRA_QUEUED_CALLS: Any if sys.version_info >= (3,): class BrokenProcessPool(RuntimeError): ... if sys.version_info >= (3, 7): from multiprocessing.context import BaseContext class ProcessPoolExecutor(Executor): def __init__(self, max_workers: Optional[int] = ..., mp_context: Optional[BaseContext] = ..., initializer: Optional[Callable[..., None]] = ..., initargs: Tuple[Any, ...] = ...) -> None: ... else: class ProcessPoolExecutor(Executor): def __init__(self, max_workers: Optional[int] = ...) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/concurrent/futures/thread.pyi0000664000175000017500000000221213577124116030034 0ustar davedave00000000000000from typing import Any, Callable, Iterable, Mapping, Optional, Tuple, TypeVar, Generic from ._base import Executor, Future import sys if sys.version_info >= (3, 7): from ._base import BrokenExecutor class BrokenThreadPool(BrokenExecutor): ... _S = TypeVar('_S') class ThreadPoolExecutor(Executor): if sys.version_info >= (3, 7): def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ..., initializer: Optional[Callable[..., None]] = ..., initargs: Tuple[Any, ...] = ...) -> None: ... elif sys.version_info >= (3, 6) or sys.version_info < (3,): def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ...) -> None: ... else: def __init__(self, max_workers: Optional[int] = ...) -> None: ... class _WorkItem(Generic[_S]): future: Future[_S] fn: Callable[..., _S] args: Iterable[Any] kwargs: Mapping[str, Any] def __init__(self, future: Future[_S], fn: Callable[..., _S], args: Iterable[Any], kwargs: Mapping[str, Any]) -> None: ... def run(self) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/0000775000175000017500000000000013577125145023314 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/__init__.pyi0000664000175000017500000000000013577124116025561 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/recipe/0000775000175000017500000000000013577125145024563 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/recipe/__init__.pyi0000664000175000017500000000000013577124116027030 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/recipe/watchers.pyi0000664000175000017500000000104713577124116027125 0ustar davedave00000000000000from typing import Any log: Any class DataWatch: def __init__(self, client, path, func=..., *args, **kwargs) -> None: ... def __call__(self, func): ... class ChildrenWatch: def __init__(self, client, path, func=..., allow_session_lost=..., send_event=...) -> None: ... def __call__(self, func): ... class PatientChildrenWatch: client: Any path: Any children: Any time_boundary: Any children_changed: Any def __init__(self, client, path, time_boundary=...) -> None: ... asy: Any def start(self): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/exceptions.pyi0000664000175000017500000000400613577124116026215 0ustar davedave00000000000000from typing import Any class KazooException(Exception): ... class ZookeeperError(KazooException): ... class CancelledError(KazooException): ... class ConfigurationError(KazooException): ... class ZookeeperStoppedError(KazooException): ... class ConnectionDropped(KazooException): ... class LockTimeout(KazooException): ... class WriterNotClosedException(KazooException): ... EXCEPTIONS: Any class RolledBackError(ZookeeperError): ... class SystemZookeeperError(ZookeeperError): ... class RuntimeInconsistency(ZookeeperError): ... class DataInconsistency(ZookeeperError): ... class ConnectionLoss(ZookeeperError): ... class MarshallingError(ZookeeperError): ... class UnimplementedError(ZookeeperError): ... class OperationTimeoutError(ZookeeperError): ... class BadArgumentsError(ZookeeperError): ... class NewConfigNoQuorumError(ZookeeperError): ... class ReconfigInProcessError(ZookeeperError): ... class APIError(ZookeeperError): ... class NoNodeError(ZookeeperError): ... class NoAuthError(ZookeeperError): ... class BadVersionError(ZookeeperError): ... class NoChildrenForEphemeralsError(ZookeeperError): ... class NodeExistsError(ZookeeperError): ... class NotEmptyError(ZookeeperError): ... class SessionExpiredError(ZookeeperError): ... class InvalidCallbackError(ZookeeperError): ... class InvalidACLError(ZookeeperError): ... class AuthFailedError(ZookeeperError): ... class SessionMovedError(ZookeeperError): ... class NotReadOnlyCallError(ZookeeperError): ... class ConnectionClosedError(SessionExpiredError): ... ConnectionLossException: Any MarshallingErrorException: Any SystemErrorException: Any RuntimeInconsistencyException: Any DataInconsistencyException: Any UnimplementedException: Any OperationTimeoutException: Any BadArgumentsException: Any ApiErrorException: Any NoNodeException: Any NoAuthException: Any BadVersionException: Any NoChildrenForEphemeralsException: Any NodeExistsException: Any InvalidACLException: Any AuthFailedException: Any NotEmptyException: Any SessionExpiredException: Any InvalidCallbackException: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/2/kazoo/client.pyi0000664000175000017500000000635613577124116025324 0ustar davedave00000000000000from typing import Any string_types: Any bytes_types: Any LOST_STATES: Any ENVI_VERSION: Any ENVI_VERSION_KEY: Any log: Any class KazooClient: logger: Any handler: Any auth_data: Any default_acl: Any randomize_hosts: Any hosts: Any chroot: Any state: Any state_listeners: Any read_only: Any retry: Any Barrier: Any Counter: Any DoubleBarrier: Any ChildrenWatch: Any DataWatch: Any Election: Any NonBlockingLease: Any MultiNonBlockingLease: Any Lock: Any Party: Any Queue: Any LockingQueue: Any SetPartitioner: Any Semaphore: Any ShallowParty: Any def __init__(self, hosts=..., timeout=..., client_id=..., handler=..., default_acl=..., auth_data=..., read_only=..., randomize_hosts=..., connection_retry=..., command_retry=..., logger=..., **kwargs) -> None: ... @property def client_state(self): ... @property def client_id(self): ... @property def connected(self): ... def set_hosts(self, hosts, randomize_hosts=...): ... def add_listener(self, listener): ... def remove_listener(self, listener): ... def start(self, timeout=...): ... def start_async(self): ... def stop(self): ... def restart(self): ... def close(self): ... def command(self, cmd=...): ... def server_version(self, retries=...): ... def add_auth(self, scheme, credential): ... def add_auth_async(self, scheme, credential): ... def unchroot(self, path): ... def sync_async(self, path): ... def sync(self, path): ... def create(self, path, value=..., acl=..., ephemeral=..., sequence=..., makepath=...): ... def create_async(self, path, value=..., acl=..., ephemeral=..., sequence=..., makepath=...): ... def ensure_path(self, path, acl=...): ... def ensure_path_async(self, path, acl=...): ... def exists(self, path, watch=...): ... def exists_async(self, path, watch=...): ... def get(self, path, watch=...): ... def get_async(self, path, watch=...): ... def get_children(self, path, watch=..., include_data=...): ... def get_children_async(self, path, watch=..., include_data=...): ... def get_acls(self, path): ... def get_acls_async(self, path): ... def set_acls(self, path, acls, version=...): ... def set_acls_async(self, path, acls, version=...): ... def set(self, path, value, version=...): ... def set_async(self, path, value, version=...): ... def transaction(self): ... def delete(self, path, version=..., recursive=...): ... def delete_async(self, path, version=...): ... def reconfig(self, joining, leaving, new_members, from_config=...): ... def reconfig_async(self, joining, leaving, new_members, from_config): ... class TransactionRequest: client: Any operations: Any committed: Any def __init__(self, client) -> None: ... def create(self, path, value=..., acl=..., ephemeral=..., sequence=...): ... def delete(self, path, version=...): ... def set_data(self, path, value, version=...): ... def check(self, path, version): ... def commit_async(self): ... def commit(self): ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, exc_tb): ... class KazooState: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/pathlib2.pyi0000664000175000017500000001260413577124116024421 0ustar davedave00000000000000from typing import Any, Generator, IO, Optional, Sequence, Tuple, Type, TypeVar, Union, List from types import TracebackType import os import sys _P = TypeVar('_P', bound=PurePath) if sys.version_info >= (3, 6): _PurePathBase = os.PathLike[str] else: _PurePathBase = object class PurePath(_PurePathBase): parts: Tuple[str, ...] drive: str root: str anchor: str name: str suffix: str suffixes: List[str] stem: str if sys.version_info < (3, 5): def __init__(self, *pathsegments: str) -> None: ... elif sys.version_info < (3, 6): def __new__(cls: Type[_P], *args: Union[str, PurePath]) -> _P: ... else: def __new__(cls: Type[_P], *args: Union[str, os.PathLike[str]]) -> _P: ... def __hash__(self) -> int: ... def __lt__(self, other: PurePath) -> bool: ... def __le__(self, other: PurePath) -> bool: ... def __gt__(self, other: PurePath) -> bool: ... def __ge__(self, other: PurePath) -> bool: ... if sys.version_info < (3, 6): def __truediv__(self: _P, key: Union[str, PurePath]) -> _P: ... def __rtruediv__(self: _P, key: Union[str, PurePath]) -> _P: ... else: def __truediv__(self: _P, key: Union[str, os.PathLike[str]]) -> _P: ... def __rtruediv__(self: _P, key: Union[str, os.PathLike[str]]) -> _P: ... if sys.version_info < (3,): def __div__(self: _P, key: Union[str, PurePath]) -> _P: ... def __bytes__(self) -> bytes: ... def as_posix(self) -> str: ... def as_uri(self) -> str: ... def is_absolute(self) -> bool: ... def is_reserved(self) -> bool: ... def match(self, path_pattern: str) -> bool: ... if sys.version_info < (3, 6): def relative_to(self: _P, *other: Union[str, PurePath]) -> _P: ... else: def relative_to(self: _P, *other: Union[str, os.PathLike[str]]) -> _P: ... def with_name(self: _P, name: str) -> _P: ... def with_suffix(self: _P, suffix: str) -> _P: ... if sys.version_info < (3, 6): def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ... else: def joinpath(self: _P, *other: Union[str, os.PathLike[str]]) -> _P: ... @property def parents(self: _P) -> Sequence[_P]: ... @property def parent(self: _P) -> _P: ... class PurePosixPath(PurePath): ... class PureWindowsPath(PurePath): ... class Path(PurePath): def __enter__(self) -> Path: ... def __exit__(self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType]) -> Optional[bool]: ... @classmethod def cwd(cls: Type[_P]) -> _P: ... def stat(self) -> os.stat_result: ... def chmod(self, mode: int) -> None: ... def exists(self) -> bool: ... def glob(self, pattern: str) -> Generator[Path, None, None]: ... def group(self) -> str: ... def is_dir(self) -> bool: ... def is_file(self) -> bool: ... def is_symlink(self) -> bool: ... def is_socket(self) -> bool: ... def is_fifo(self) -> bool: ... def is_block_device(self) -> bool: ... def is_char_device(self) -> bool: ... def iterdir(self) -> Generator[Path, None, None]: ... def lchmod(self, mode: int) -> None: ... def lstat(self) -> os.stat_result: ... if sys.version_info < (3, 5): def mkdir(self, mode: int = ..., parents: bool = ...) -> None: ... else: def mkdir(self, mode: int = ..., parents: bool = ..., exist_ok: bool = ...) -> None: ... def open(self, mode: str = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ... def owner(self) -> str: ... def rename(self, target: Union[str, PurePath]) -> None: ... def replace(self, target: Union[str, PurePath]) -> None: ... if sys.version_info < (3, 6): def resolve(self: _P) -> _P: ... else: def resolve(self: _P, strict: bool = ...) -> _P: ... def rglob(self, pattern: str) -> Generator[Path, None, None]: ... def rmdir(self) -> None: ... def symlink_to(self, target: Union[str, Path], target_is_directory: bool = ...) -> None: ... def touch(self, mode: int = ..., exist_ok: bool = ...) -> None: ... def unlink(self) -> None: ... if sys.version_info >= (3, 5): @classmethod def home(cls: Type[_P]) -> _P: ... if sys.version_info < (3, 6): def __new__(cls: Type[_P], *args: Union[str, PurePath], **kwargs: Any) -> _P: ... else: def __new__(cls: Type[_P], *args: Union[str, os.PathLike[str]], **kwargs: Any) -> _P: ... def absolute(self: _P) -> _P: ... def expanduser(self: _P) -> _P: ... def read_bytes(self) -> bytes: ... def read_text(self, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> str: ... def samefile(self, other_path: Union[str, bytes, int, Path]) -> bool: ... def write_bytes(self, data: bytes) -> int: ... def write_text(self, data: str, encoding: Optional[str] = ..., errors: Optional[str] = ...) -> int: ... if sys.version_info >= (3, 8): def link_to(self, target: Union[str, bytes, os.PathLike[str]]) -> None: ... class PosixPath(Path, PurePosixPath): ... class WindowsPath(Path, PureWindowsPath): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/0000775000175000017500000000000013577125145022774 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/__init__.pyi0000664000175000017500000000721213577124116025255 0ustar davedave00000000000000# Stubs for six (Python 2.7) from __future__ import print_function import types from typing import ( Any, AnyStr, Callable, Dict, Iterable, Mapping, NoReturn, Optional, Pattern, Text, Tuple, Type, TypeVar, Union, overload, ValuesView, KeysView, ItemsView, ) import typing import unittest # Exports from __builtin__ import unichr as unichr from StringIO import StringIO as StringIO, StringIO as BytesIO from functools import wraps as wraps from . import moves _T = TypeVar('_T') _K = TypeVar('_K') _V = TypeVar('_V') # TODO make constant, then move this stub to 2and3 # https://github.com/python/typeshed/issues/17 PY2 = True PY3 = False PY34 = False string_types = (str, unicode) integer_types = (int, long) class_types = (type, types.ClassType) text_type = unicode binary_type = str MAXSIZE: int # def add_move # def remove_move def advance_iterator(it: typing.Iterator[_T]) -> _T: ... next = advance_iterator def callable(obj: object) -> bool: ... def get_unbound_function(unbound: types.MethodType) -> types.FunctionType: ... def create_bound_method(func: types.FunctionType, obj: object) -> types.MethodType: ... def create_unbound_method(func: types.FunctionType, cls: Union[type, types.ClassType]) -> types.MethodType: ... class Iterator: def next(self) -> Any: ... def get_method_function(meth: types.MethodType) -> types.FunctionType: ... def get_method_self(meth: types.MethodType) -> Optional[object]: ... def get_function_closure(fun: types.FunctionType) -> Optional[Tuple[types._Cell, ...]]: ... def get_function_code(fun: types.FunctionType) -> types.CodeType: ... def get_function_defaults(fun: types.FunctionType) -> Optional[Tuple[Any, ...]]: ... def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ... def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ... def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ... def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ... # def iterlists def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ... def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ... def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ... def b(s: str) -> binary_type: ... def u(s: str) -> text_type: ... int2byte = chr def byte2int(bs: binary_type) -> int: ... def indexbytes(buf: binary_type, i: int) -> int: ... def iterbytes(buf: binary_type) -> typing.Iterator[int]: ... def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: str = ...) -> None: ... @overload def assertRaisesRegex(self: unittest.TestCase, msg: str = ...) -> Any: ... @overload def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ... def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: str = ...) -> None: ... def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ... def exec_(_code_: Union[unicode, types.CodeType], _globs_: Dict[str, Any] = ..., _locs_: Dict[str, Any] = ...): ... def raise_from(value: Union[BaseException, Type[BaseException]], from_value: Optional[BaseException]) -> NoReturn: ... print_ = print def with_metaclass(meta: type, *bases: type) -> type: ... def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ... def ensure_binary(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> bytes: ... def ensure_str(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> str: ... def ensure_text(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> Text: ... def python_2_unicode_compatible(klass: _T) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/0000775000175000017500000000000013577125145024125 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/__init__.pyi0000664000175000017500000000451713577124116026413 0ustar davedave00000000000000# Stubs for six.moves # # Note: Commented out items means they weren't implemented at the time. # Uncomment them when the modules have been added to the typeshed. from cStringIO import StringIO as cStringIO from itertools import ifilter as filter from itertools import ifilterfalse as filterfalse from __builtin__ import raw_input as input from __builtin__ import intern as intern from itertools import imap as map from os import getcwdu as getcwd from os import getcwd as getcwdb from __builtin__ import xrange as range from __builtin__ import reload as reload_module from __builtin__ import reduce as reduce from pipes import quote as shlex_quote from StringIO import StringIO as StringIO from UserDict import UserDict as UserDict from UserList import UserList as UserList from UserString import UserString as UserString from __builtin__ import xrange as xrange from itertools import izip as zip from itertools import izip_longest as zip_longest import __builtin__ as builtins from . import configparser # import copy_reg as copyreg # import gdbm as dbm_gnu from . import _dummy_thread from . import http_cookiejar from . import http_cookies from . import html_entities from . import html_parser from . import http_client # import email.MIMEMultipart as email_mime_multipart # import email.MIMENonMultipart as email_mime_nonmultipart from . import email_mime_text # import email.MIMEBase as email_mime_base from . import BaseHTTPServer from . import CGIHTTPServer from . import SimpleHTTPServer from . import cPickle from . import queue from . import reprlib from . import socketserver from . import _thread # import Tkinter as tkinter # import Dialog as tkinter_dialog # import FileDialog as tkinter_filedialog # import ScrolledText as tkinter_scrolledtext # import SimpleDialog as tkinter_simpledialog # import Tix as tkinter_tix # import ttk as tkinter_ttk # import Tkconstants as tkinter_constants # import Tkdnd as tkinter_dnd # import tkColorChooser as tkinter_colorchooser # import tkCommonDialog as tkinter_commondialog # import tkFileDialog as tkinter_tkfiledialog # import tkFont as tkinter_font # import tkMessageBox as tkinter_messagebox # import tkSimpleDialog as tkinter_tksimpledialog from . import urllib_parse from . import urllib_error from . import urllib from . import urllib_robotparser from . import xmlrpc_client # import SimpleXMLRPCServer as xmlrpc_server jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/_dummy_thread.pyi0000664000175000017500000000003313577124116027462 0ustar davedave00000000000000from dummy_thread import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/email_mime_text.pyi0000664000175000017500000000003513577124116030005 0ustar davedave00000000000000from email.MIMEText import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib_response.pyi0000664000175000017500000000003713577124116030054 0ustar davedave00000000000000from .urllib.response import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/http_client.pyi0000664000175000017500000000002613577124116027160 0ustar davedave00000000000000from httplib import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/http_cookiejar.pyi0000664000175000017500000000003013577124116027643 0ustar davedave00000000000000from cookielib import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/reprlib.pyi0000664000175000017500000000002313577124116026277 0ustar davedave00000000000000from repr import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/configparser.pyi0000664000175000017500000000003313577124116027323 0ustar davedave00000000000000from ConfigParser import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/email_mime_base.pyi0000664000175000017500000000003613577124116027734 0ustar davedave00000000000000from email.mime.base import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib_robotparser.pyi0000664000175000017500000000003213577124116030553 0ustar davedave00000000000000from robotparser import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/SimpleHTTPServer.pyi0000664000175000017500000000003713577124116027765 0ustar davedave00000000000000from SimpleHTTPServer import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/email_mime_nonmultipart.pyi0000664000175000017500000000004613577124116031557 0ustar davedave00000000000000from email.mime.nonmultipart import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/socketserver.pyi0000664000175000017500000000003313577124116027360 0ustar davedave00000000000000from SocketServer import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/xmlrpc_client.pyi0000664000175000017500000000003013577124116027501 0ustar davedave00000000000000from xmlrpclib import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/queue.pyi0000664000175000017500000000002413577124116025765 0ustar davedave00000000000000from Queue import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/email_mime_multipart.pyi0000664000175000017500000000004313577124116031041 0ustar davedave00000000000000from email.mime.multipart import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/html_entities.pyi0000664000175000017500000000003513577124116027513 0ustar davedave00000000000000from htmlentitydefs import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib_error.pyi0000664000175000017500000000003413577124116027344 0ustar davedave00000000000000from .urllib.error import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/cPickle.pyi0000664000175000017500000000002613577124116026215 0ustar davedave00000000000000from cPickle import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib_request.pyi0000664000175000017500000000003613577124116027705 0ustar davedave00000000000000from .urllib.request import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/CGIHTTPServer.pyi0000664000175000017500000000003413577124116027133 0ustar davedave00000000000000from CGIHTTPServer import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib_parse.pyi0000664000175000017500000000003413577124116027325 0ustar davedave00000000000000from .urllib.parse import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/BaseHTTPServer.pyi0000664000175000017500000000003513577124116027404 0ustar davedave00000000000000from BaseHTTPServer import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/0000775000175000017500000000000013577125145025416 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/__init__.pyi0000664000175000017500000000033113577124116027672 0ustar davedave00000000000000import six.moves.urllib.error as error import six.moves.urllib.parse as parse import six.moves.urllib.request as request import six.moves.urllib.response as response import six.moves.urllib.robotparser as robotparser jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/request.pyi0000664000175000017500000000365013577124116027632 0ustar davedave00000000000000# Stubs for six.moves.urllib.request from urllib2 import urlopen as urlopen from urllib2 import install_opener as install_opener from urllib2 import build_opener as build_opener from urllib import pathname2url as pathname2url from urllib import url2pathname as url2pathname from urllib import getproxies as getproxies from urllib2 import Request as Request from urllib2 import OpenerDirector as OpenerDirector from urllib2 import HTTPDefaultErrorHandler as HTTPDefaultErrorHandler from urllib2 import HTTPRedirectHandler as HTTPRedirectHandler from urllib2 import HTTPCookieProcessor as HTTPCookieProcessor from urllib2 import ProxyHandler as ProxyHandler from urllib2 import BaseHandler as BaseHandler from urllib2 import HTTPPasswordMgr as HTTPPasswordMgr from urllib2 import HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm from urllib2 import AbstractBasicAuthHandler as AbstractBasicAuthHandler from urllib2 import HTTPBasicAuthHandler as HTTPBasicAuthHandler from urllib2 import ProxyBasicAuthHandler as ProxyBasicAuthHandler from urllib2 import AbstractDigestAuthHandler as AbstractDigestAuthHandler from urllib2 import HTTPDigestAuthHandler as HTTPDigestAuthHandler from urllib2 import ProxyDigestAuthHandler as ProxyDigestAuthHandler from urllib2 import HTTPHandler as HTTPHandler from urllib2 import HTTPSHandler as HTTPSHandler from urllib2 import FileHandler as FileHandler from urllib2 import FTPHandler as FTPHandler from urllib2 import CacheFTPHandler as CacheFTPHandler from urllib2 import UnknownHandler as UnknownHandler from urllib2 import HTTPErrorProcessor as HTTPErrorProcessor from urllib import urlretrieve as urlretrieve from urllib import urlcleanup as urlcleanup from urllib import URLopener as URLopener from urllib import FancyURLopener as FancyURLopener from urllib import proxy_bypass as proxy_bypass from urllib2 import parse_http_list as parse_http_list from urllib2 import parse_keqv_list as parse_keqv_list jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/error.pyi0000664000175000017500000000022413577124116027265 0ustar davedave00000000000000from urllib2 import URLError as URLError from urllib2 import HTTPError as HTTPError from urllib import ContentTooShortError as ContentTooShortError jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/parse.pyi0000664000175000017500000000203713577124116027252 0ustar davedave00000000000000# Stubs for six.moves.urllib.parse from urlparse import ParseResult as ParseResult from urlparse import SplitResult as SplitResult from urlparse import parse_qs as parse_qs from urlparse import parse_qsl as parse_qsl from urlparse import urldefrag as urldefrag from urlparse import urljoin as urljoin from urlparse import urlparse as urlparse from urlparse import urlsplit as urlsplit from urlparse import urlunparse as urlunparse from urlparse import urlunsplit as urlunsplit from urllib import quote as quote from urllib import quote_plus as quote_plus from urllib import unquote as unquote from urllib import unquote_plus as unquote_plus from urllib import urlencode as urlencode from urllib import splitquery as splitquery from urllib import splittag as splittag from urllib import splituser as splituser from urlparse import uses_fragment as uses_fragment from urlparse import uses_netloc as uses_netloc from urlparse import uses_params as uses_params from urlparse import uses_query as uses_query from urlparse import uses_relative as uses_relative jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/response.pyi0000664000175000017500000000031613577124116027774 0ustar davedave00000000000000# Stubs for six.moves.urllib.response from urllib import addbase as addbase from urllib import addclosehook as addclosehook from urllib import addinfo as addinfo from urllib import addinfourl as addinfourl jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/urllib/robotparser.pyi0000664000175000017500000000007313577124116030500 0ustar davedave00000000000000from robotparser import RobotFileParser as RobotFileParser jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/html_parser.pyi0000664000175000017500000000003113577124116027157 0ustar davedave00000000000000from HTMLParser import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/_thread.pyi0000664000175000017500000000002513577124116026250 0ustar davedave00000000000000from thread import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/six/moves/http_cookies.pyi0000664000175000017500000000002513577124116027335 0ustar davedave00000000000000from Cookie import * jedi-0.15.2/jedi/third_party/typeshed/third_party/2/fb303/0000775000175000017500000000000013577125145023006 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/fb303/__init__.pyi0000664000175000017500000000000013577124116025253 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/fb303/FacebookService.pyi0000664000175000017500000002074313577124116026566 0ustar davedave00000000000000from typing import Any from thrift.Thrift import TProcessor # type: ignore fastbinary: Any class Iface: def getName(self): ... def getVersion(self): ... def getStatus(self): ... def getStatusDetails(self): ... def getCounters(self): ... def getCounter(self, key): ... def setOption(self, key, value): ... def getOption(self, key): ... def getOptions(self): ... def getCpuProfile(self, profileDurationInSec): ... def aliveSince(self): ... def reinitialize(self): ... def shutdown(self): ... class Client(Iface): def __init__(self, iprot, oprot=...) -> None: ... def getName(self): ... def send_getName(self): ... def recv_getName(self): ... def getVersion(self): ... def send_getVersion(self): ... def recv_getVersion(self): ... def getStatus(self): ... def send_getStatus(self): ... def recv_getStatus(self): ... def getStatusDetails(self): ... def send_getStatusDetails(self): ... def recv_getStatusDetails(self): ... def getCounters(self): ... def send_getCounters(self): ... def recv_getCounters(self): ... def getCounter(self, key): ... def send_getCounter(self, key): ... def recv_getCounter(self): ... def setOption(self, key, value): ... def send_setOption(self, key, value): ... def recv_setOption(self): ... def getOption(self, key): ... def send_getOption(self, key): ... def recv_getOption(self): ... def getOptions(self): ... def send_getOptions(self): ... def recv_getOptions(self): ... def getCpuProfile(self, profileDurationInSec): ... def send_getCpuProfile(self, profileDurationInSec): ... def recv_getCpuProfile(self): ... def aliveSince(self): ... def send_aliveSince(self): ... def recv_aliveSince(self): ... def reinitialize(self): ... def send_reinitialize(self): ... def shutdown(self): ... def send_shutdown(self): ... class Processor(Iface, TProcessor): def __init__(self, handler) -> None: ... def process(self, iprot, oprot): ... def process_getName(self, seqid, iprot, oprot): ... def process_getVersion(self, seqid, iprot, oprot): ... def process_getStatus(self, seqid, iprot, oprot): ... def process_getStatusDetails(self, seqid, iprot, oprot): ... def process_getCounters(self, seqid, iprot, oprot): ... def process_getCounter(self, seqid, iprot, oprot): ... def process_setOption(self, seqid, iprot, oprot): ... def process_getOption(self, seqid, iprot, oprot): ... def process_getOptions(self, seqid, iprot, oprot): ... def process_getCpuProfile(self, seqid, iprot, oprot): ... def process_aliveSince(self, seqid, iprot, oprot): ... def process_reinitialize(self, seqid, iprot, oprot): ... def process_shutdown(self, seqid, iprot, oprot): ... class getName_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getName_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getVersion_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getVersion_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getStatus_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getStatus_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getStatusDetails_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getStatusDetails_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getCounters_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getCounters_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getCounter_args: thrift_spec: Any key: Any def __init__(self, key=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getCounter_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class setOption_args: thrift_spec: Any key: Any value: Any def __init__(self, key=..., value=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class setOption_result: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getOption_args: thrift_spec: Any key: Any def __init__(self, key=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getOption_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getOptions_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getOptions_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getCpuProfile_args: thrift_spec: Any profileDurationInSec: Any def __init__(self, profileDurationInSec=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class getCpuProfile_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class aliveSince_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class aliveSince_result: thrift_spec: Any success: Any def __init__(self, success=...) -> None: ... def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class reinitialize_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... class shutdown_args: thrift_spec: Any def read(self, iprot): ... def write(self, oprot): ... def validate(self): ... def __eq__(self, other): ... def __ne__(self, other): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/routes/0000775000175000017500000000000013577125145023512 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/routes/__init__.pyi0000664000175000017500000000057113577124116025774 0ustar davedave00000000000000from . import mapper from . import util class _RequestConfig: def __getattr__(self, name): ... def __setattr__(self, name, value): ... def __delattr__(self, name): ... def load_wsgi_environ(self, environ): ... def request_config(original=...): ... Mapper = mapper.Mapper redirect_to = util.redirect_to url_for = util.url_for URLGenerator = util.URLGenerator jedi-0.15.2/jedi/third_party/typeshed/third_party/2/routes/mapper.pyi0000664000175000017500000000436613577124116025527 0ustar davedave00000000000000from typing import Any COLLECTION_ACTIONS: Any MEMBER_ACTIONS: Any def strip_slashes(name): ... class SubMapperParent: def submapper(self, **kargs): ... def collection(self, collection_name, resource_name, path_prefix=..., member_prefix=..., controller=..., collection_actions=..., member_actions=..., member_options=..., **kwargs): ... class SubMapper(SubMapperParent): kwargs: Any obj: Any collection_name: Any member: Any resource_name: Any formatted: Any def __init__(self, obj, resource_name=..., collection_name=..., actions=..., formatted=..., **kwargs) -> None: ... def connect(self, *args, **kwargs): ... def link(self, rel=..., name=..., action=..., method=..., formatted=..., **kwargs): ... def new(self, **kwargs): ... def edit(self, **kwargs): ... def action(self, name=..., action=..., method=..., formatted=..., **kwargs): ... def index(self, name=..., **kwargs): ... def show(self, name=..., **kwargs): ... def create(self, **kwargs): ... def update(self, **kwargs): ... def delete(self, **kwargs): ... def add_actions(self, actions): ... def __enter__(self): ... def __exit__(self, type, value, tb): ... class Mapper(SubMapperParent): matchlist: Any maxkeys: Any minkeys: Any urlcache: Any prefix: Any req_data: Any directory: Any always_scan: Any controller_scan: Any debug: Any append_slash: Any sub_domains: Any sub_domains_ignore: Any domain_match: Any explicit: Any encoding: Any decode_errors: Any hardcode_names: Any minimization: Any create_regs_lock: Any def __init__(self, controller_scan=..., directory=..., always_scan=..., register=..., explicit=...) -> None: ... environ: Any def extend(self, routes, path_prefix=...): ... def make_route(self, *args, **kargs): ... def connect(self, *args, **kargs): ... def create_regs(self, *args, **kwargs): ... def match(self, url=..., environ=...): ... def routematch(self, url=..., environ=...): ... obj: Any def generate(self, *args, **kargs): ... def resource(self, member_name, collection_name, **kwargs): ... def redirect(self, match_path, destination_path, *args, **kwargs): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/routes/util.pyi0000664000175000017500000000110013577124116025177 0ustar davedave00000000000000from typing import Any class RoutesException(Exception): ... class MatchException(RoutesException): ... class GenerationException(RoutesException): ... def url_for(*args, **kargs): ... class URLGenerator: mapper: Any environ: Any def __init__(self, mapper, environ) -> None: ... def __call__(self, *args, **kargs): ... def current(self, *args, **kwargs): ... def redirect_to(*args, **kargs): ... def cache_hostinfo(environ): ... def controller_scan(directory=...): ... def as_unicode(value, encoding, errors=...): ... def ascii_characters(string): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/gflags.pyi0000664000175000017500000002451113577124116024157 0ustar davedave00000000000000from typing import Any, Callable, Dict, Iterable, IO, List, Optional, Sequence, Union from types import ModuleType class Error(Exception): ... FlagsError = Error class DuplicateFlag(FlagsError): ... class CantOpenFlagFileError(FlagsError): ... class DuplicateFlagCannotPropagateNoneToSwig(DuplicateFlag): ... class DuplicateFlagError(DuplicateFlag): def __init__(self, flagname: str, flag_values: FlagValues, other_flag_values: FlagValues = ...) -> None: ... class IllegalFlagValueError(FlagsError): ... IllegalFlagValue = IllegalFlagValueError class UnrecognizedFlag(FlagsError): ... class UnrecognizedFlagError(UnrecognizedFlag): def __init__(self, flagname: str, flagvalue: str = ...) -> None: ... def get_help_width() -> int: ... GetHelpWidth = get_help_width def CutCommonSpacePrefix(text) -> str: ... def text_wrap(text: str, length: int = ..., indent: str = ..., firstline_indent: str = ..., tabs: str = ...) -> str: ... TextWrap = text_wrap def doc_to_help(doc: str) -> str: ... DocToHelp = doc_to_help class FlagValues: def __init__(self) -> None: ... def UseGnuGetOpt(self, use_gnu_getopt: bool = ...) -> None: ... def is_gnu_getopt(self) -> bool: ... IsGnuGetOpt = is_gnu_getopt # TODO dict type def FlagDict(self) -> Dict[Any, Any]: ... def flags_by_module_dict(self) -> Dict[str, List[Flag]]: ... FlagsByModuleDict = flags_by_module_dict def flags_by_module_id_dict(self) -> Dict[int, List[Flag]]: ... FlagsByModuleIdDict = flags_by_module_id_dict def key_flags_by_module_dict(self) -> Dict[str, List[Flag]]: ... KeyFlagsByModuleDict = key_flags_by_module_dict def find_module_defining_flag(self, flagname: str, default: str = ...) -> str: ... FindModuleDefiningFlag = find_module_defining_flag def find_module_id_defining_flag(self, flagname: str, default: int = ...) -> int: ... FindModuleIdDefiningFlag = find_module_id_defining_flag def append_flag_values(self, flag_values: FlagValues) -> None: ... AppendFlagValues = append_flag_values def remove_flag_values(self, flag_values: FlagValues) -> None: ... RemoveFlagValues = remove_flag_values def __setitem__(self, name: str, flag: Flag) -> None: ... def __getitem__(self, name: str) -> Flag: ... def __getattr__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any): ... def __delattr__(self, flag_name: str) -> None: ... def set_default(self, name: str, value: Any) -> None: ... SetDefault = set_default def __contains__(self, name: str) -> bool: ... has_key = __contains__ def __iter__(self) -> Iterable[str]: ... def __call__(self, argv: List[str], known_only: bool = ...) -> List[str]: ... def reset(self) -> None: ... Reset = reset def RegisteredFlags(self) -> List[str]: ... def flag_values_dict(self) -> Dict[str, Any]: ... FlagValuesDict = flag_values_dict def __str__(self) -> str: ... def GetHelp(self, prefix: str = ...) -> str: ... def module_help(self, module: Union[ModuleType, str]) -> str: ... ModuleHelp = module_help def main_module_help(self) -> str: ... MainModuleHelp = main_module_help def get(self, name: str, default: Any) -> Any: ... def ShortestUniquePrefixes(self, fl: Dict[str, Flag]) -> Dict[str, str]: ... def ExtractFilename(self, flagfile_str: str) -> str: ... def read_flags_from_files(self, argv: List[str], force_gnu: bool = ...) -> List[str]: ... ReadFlagsFromFiles = read_flags_from_files def flags_into_string(self) -> str: ... FlagsIntoString = flags_into_string def append_flags_into_file(self, filename: str) -> None: ... AppendFlagsIntoFile = append_flags_into_file def write_help_in_xml_format(self, outfile: IO[str] = ...) -> None: ... WriteHelpInXMLFormat = write_help_in_xml_format # TODO validator: gflags_validators.Validator def AddValidator(self, validator: Any) -> None: ... FLAGS: FlagValues class Flag: name: str default: Any default_as_str: str value: Any help: str short_name: str boolean = False present = False parser: ArgumentParser serializer: ArgumentSerializer allow_override = False def __init__(self, parser: ArgumentParser, serializer: ArgumentSerializer, name: str, default: Optional[str], help_string: str, short_name: str = ..., boolean: bool = ..., allow_override: bool = ...) -> None: ... def Parse(self, argument: Any) -> Any: ... def Unparse(self) -> None: ... def Serialize(self) -> str: ... def SetDefault(self, value: Any) -> None: ... def Type(self) -> str: ... def WriteInfoInXMLFormat(self, outfile: IO[str], module_name: str, is_key: bool = ..., indent: str = ...) -> None: ... class ArgumentParser(object): syntactic_help: str # TODO what is this def parse(self, argument: Any) -> Any: ... Parser = parse def flag_type(self) -> str: ... Type = flag_type def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str) -> None: ... class ArgumentSerializer: def Serialize(self, value: Any) -> unicode: ... class ListSerializer(ArgumentSerializer): def __init__(self, list_sep: str) -> None: ... def Serialize(self, value: List[Any]) -> str: ... def register_validator(flag_name: str, checker: Callable[[Any], bool], message: str = ..., flag_values: FlagValues = ...) -> None: ... RegisterValidator = register_validator def mark_flag_as_required(flag_name: str, flag_values: FlagValues = ...) -> None: ... MarkFlagAsRequired = mark_flag_as_required def DEFINE(parser: ArgumentParser, name: str, default: Any, help: str, flag_values: FlagValues = ..., serializer: ArgumentSerializer = ..., **args: Any) -> None: ... def DEFINE_flag(flag: Flag, flag_values: FlagValues = ...) -> None: ... def declare_key_flag(flag_name: str, flag_values: FlagValues = ...) -> None: ... DECLARE_key_flag = declare_key_flag def adopt_module_key_flags(module: ModuleType, flag_values: FlagValues = ...) -> None: ... ADOPT_module_key_flags = adopt_module_key_flags def DEFINE_string(name: str, default: Optional[str], help: str, flag_values: FlagValues = ..., **args: Any): ... class BooleanParser(ArgumentParser): def Convert(self, argument: Any) -> bool: ... def Parse(self, argument: Any) -> bool: ... class BooleanFlag(Flag): def __init__(self, name: str, default: Optional[bool], help: str, short_name=..., **args: Any) -> None: ... def DEFINE_boolean(name: str, default: Optional[bool], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... DEFINE_bool = DEFINE_boolean class HelpFlag(BooleanFlag): def __init__(self) -> None: ... def Parse(self, arg: Any) -> None: ... class HelpXMLFlag(BooleanFlag): def __init__(self) -> None: ... def Parse(self, arg: Any) -> None: ... class HelpshortFlag(BooleanFlag): def __init__(self) -> None: ... def Parse(self, arg: Any) -> None: ... class NumericParser(ArgumentParser): def IsOutsideBounds(self, val: float) -> bool: ... def Parse(self, argument: Any) -> float: ... def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str) -> None: ... def Convert(self, argument: Any) -> Any: ... class FloatParser(NumericParser): number_article: str number_name: str syntactic_help: str def __init__(self, lower_bound: float = ..., upper_bound: float = ...) -> None: ... def Convert(self, argument: Any) -> float: ... def DEFINE_float(name: str, default: Optional[float], help: str, lower_bound: float = ..., upper_bound: float = ..., flag_values: FlagValues = ..., **args: Any) -> None: ... class IntegerParser(NumericParser): number_article: str number_name: str syntactic_help: str def __init__(self, lower_bound: int = ..., upper_bound: int = ...) -> None: ... def Convert(self, argument: Any) -> int: ... def DEFINE_integer(name: str, default: Optional[int], help: str, lower_bound: int = ..., upper_bound: int = ..., flag_values: FlagValues = ..., **args: Any) -> None: ... class EnumParser(ArgumentParser): def __init__(self, enum_values: List[str]) -> None: ... def Parse(self, argument: Any) -> Any: ... class EnumFlag(Flag): def __init__(self, name: str, default: Optional[str], help: str, enum_values: List[str], short_name: str, **args: Any) -> None: ... def DEFINE_enum(name: str, default: Optional[str], enum_values: List[str], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... class BaseListParser(ArgumentParser): def __init__(self, token: str = ..., name: str = ...) -> None: ... def Parse(self, argument: Any) -> List[Any]: ... class ListParser(BaseListParser): def __init__(self) -> None: ... def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str): ... class WhitespaceSeparatedListParser(BaseListParser): def __init__(self) -> None: ... def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str): ... def DEFINE_list(name: str, default: Optional[List[str]], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... def DEFINE_spaceseplist(name: str, default: Optional[List[str]], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... class MultiFlag(Flag): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def Parse(self, arguments: Any) -> None: ... def Serialize(self) -> str: ... def DEFINE_multi_string(name: str, default: Optional[Union[str, List[str]]], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ... DEFINE_multistring = DEFINE_multi_string def DEFINE_multi_integer(name: str, default: Optional[Union[int, List[int]]], help: str, lower_bound: int = ..., upper_bound: int = ..., flag_values: FlagValues = ..., **args: Any) -> None: ... DEFINE_multi_int = DEFINE_multi_integer def DEFINE_multi_float(name: str, default: Optional[Union[float, List[float]]], help: str, lower_bound: float = ..., upper_bound: float = ..., flag_values: FlagValues = ..., **args: Any) -> None: ... def DEFINE_multi_enum(name: str, default: Optional[Union[Sequence[str], str]], enum_values: Sequence[str], help: str, flag_values: FlagValues = ..., case_sensitive: bool = ..., **args: Any): ... jedi-0.15.2/jedi/third_party/typeshed/third_party/2/enum.pyi0000664000175000017500000000546313577124116023665 0ustar davedave00000000000000# NB: third_party/2/enum.pyi and stdlib/3.4/enum.pyi must remain consistent! import sys from typing import Any, Dict, Iterator, List, Mapping, Type, TypeVar, Union from abc import ABCMeta _T = TypeVar('_T') _S = TypeVar('_S', bound=Type[Enum]) # Note: EnumMeta actually subclasses type directly, not ABCMeta. # This is a temporary workaround to allow multiple creation of enums with builtins # such as str as mixins, which due to the handling of ABCs of builtin types, cause # spurious inconsistent metaclass structure. See #1595. # Structurally: Iterable[T], Reversible[T], Container[T] where T is the enum itself class EnumMeta(ABCMeta): def __iter__(self: Type[_T]) -> Iterator[_T]: ... def __reversed__(self: Type[_T]) -> Iterator[_T]: ... def __contains__(self: Type[_T], member: object) -> bool: ... def __getitem__(self: Type[_T], name: str) -> _T: ... @property def __members__(self: Type[_T]) -> Mapping[str, _T]: ... def __len__(self) -> int: ... class Enum(metaclass=EnumMeta): name: str value: Any _name_: str _value_: Any _member_names_: List[str] # undocumented _member_map_: Dict[str, Enum] # undocumented _value2member_map_: Dict[int, Enum] # undocumented if sys.version_info >= (3, 7): _ignore_: Union[str, List[str]] if sys.version_info >= (3, 6): _order_: str @classmethod def _missing_(cls, value: object) -> Any: ... @staticmethod def _generate_next_value_(name: str, start: int, count: int, last_values: List[Any]) -> Any: ... def __new__(cls: Type[_T], value: object) -> _T: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def __dir__(self) -> List[str]: ... def __format__(self, format_spec: str) -> str: ... def __hash__(self) -> Any: ... def __reduce_ex__(self, proto: object) -> Any: ... class IntEnum(int, Enum): value: int def unique(enumeration: _S) -> _S: ... if sys.version_info >= (3, 6): _auto_null: Any # subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto() class auto(IntFlag): value: Any class Flag(Enum): def __contains__(self: _T, other: _T) -> bool: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def __bool__(self) -> bool: ... def __or__(self: _T, other: _T) -> _T: ... def __and__(self: _T, other: _T) -> _T: ... def __xor__(self: _T, other: _T) -> _T: ... def __invert__(self: _T) -> _T: ... class IntFlag(int, Flag): def __or__(self: _T, other: Union[int, _T]) -> _T: ... def __and__(self: _T, other: Union[int, _T]) -> _T: ... def __xor__(self: _T, other: Union[int, _T]) -> _T: ... __ror__ = __or__ __rand__ = __and__ __rxor__ = __xor__ jedi-0.15.2/jedi/third_party/typeshed/third_party/2/OpenSSL/0000775000175000017500000000000013577125145023454 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/OpenSSL/__init__.pyi0000664000175000017500000000000013577124116025721 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/2/OpenSSL/crypto.pyi0000664000175000017500000001673413577124116025527 0ustar davedave00000000000000# Stubs for OpenSSL.crypto (Python 2) from typing import Any, Callable, Iterable, List, Optional, Set, Text, Tuple, Union from cryptography.hazmat.primitives.asymmetric import dsa, rsa from datetime import datetime FILETYPE_PEM: int FILETYPE_ASN1: int FILETYPE_TEXT: int TYPE_RSA: int TYPE_DSA: int class Error(Exception): ... _Key = Union[rsa.RSAPublicKey, rsa.RSAPrivateKey, dsa.DSAPublicKey, dsa.DSAPrivateKey] class PKey: def __init__(self) -> None: ... def to_cryptography_key(self) -> _Key: ... @classmethod def from_cryptography_key(cls, crypto_key: _Key): ... def generate_key(self, type: int, bits: int) -> None: ... def check(self) -> bool: ... def type(self) -> int: ... def bits(self) -> int: ... class _EllipticCurve: name: Text def get_elliptic_curves() -> Set[_EllipticCurve]: ... def get_elliptic_curve(name: str) -> _EllipticCurve: ... class X509Name: def __init__(self, name: X509Name) -> None: ... countryName: Union[str, unicode] stateOrProvinceName: Union[str, unicode] localityName: Union[str, unicode] organizationName: Union[str, unicode] organizationalUnitName: Union[str, unicode] commonName: Union[str, unicode] emailAddress: Union[str, unicode] C: Union[str, unicode] ST: Union[str, unicode] L: Union[str, unicode] O: Union[str, unicode] OU: Union[str, unicode] CN: Union[str, unicode] def hash(self) -> int: ... def der(self) -> bytes: ... def get_components(self) -> List[Tuple[str, str]]: ... class X509Extension: def __init__(self, type_name: bytes, critical: bool, value: bytes, subject: Optional[X509] = ..., issuer: Optional[X509] = ...) -> None: ... def get_critical(self) -> bool: ... def get_short_name(self) -> str: ... def get_data(self) -> str: ... class X509Req: def __init__(self) -> None: ... def set_pubkey(self, pkey: PKey) -> None: ... def get_pubkey(self) -> PKey: ... def set_version(self, version: int) -> None: ... def get_version(self) -> int: ... def get_subject(self) -> X509Name: ... def add_extensions(self, extensions: Iterable[X509Extension]) -> None: ... def get_extensions(self) -> List[X509Extension]: ... def sign(self, pkey: PKey, digest: str) -> None: ... def verify(self, pkey: PKey) -> bool: ... class X509: def __init__(self) -> None: ... def set_version(self, version: int) -> None: ... def get_version(self) -> int: ... def get_pubkey(self) -> PKey: ... def set_pubkey(self, pkey: PKey) -> None: ... def sign(self, pkey: PKey, digest: str) -> None: ... def get_signature_algorithm(self) -> str: ... def digest(self, digest_name: str) -> str: ... def subject_name_hash(self) -> str: ... def set_serial_number(self, serial: int) -> None: ... def get_serial_number(self) -> int: ... def gmtime_adj_notAfter(self, amount: int) -> None: ... def gmtime_adj_notBefore(self, amount: int) -> None: ... def has_expired(self) -> bool: ... def get_notBefore(self) -> str: ... def set_notBefore(self, when: str) -> None: ... def get_notAfter(self) -> str: ... def set_notAfter(self, when: str) -> None: ... def get_issuer(self) -> X509Name: ... def set_issuer(self, issuer: X509Name) -> None: ... def get_subject(self) -> X509Name: ... def set_subject(self, subject: X509Name) -> None: ... def get_extension_count(self) -> int: ... def add_extensions(self, extensions: Iterable[X509Extension]) -> None: ... def get_extension(self, index: int) -> X509Extension: ... class X509StoreFlags: CRL_CHECK: int CRL_CHECK_ALL: int IGNORE_CRITICAL: int X509_STRICT: int ALLOW_PROXY_CERTS: int POLICY_CHECK: int EXPLICIT_POLICY: int INHIBIT_MAP: int NOTIFY_POLICY: int CHECK_SS_SIGNATURE: int CB_ISSUER_CHECK: int class X509Store: def __init__(self) -> None: ... def add_cert(self, cert: X509) -> None: ... def add_crl(self, crl: CRL) -> None: ... def set_flags(self, flags: int) -> None: ... def set_time(self, vfy_time: datetime) -> None: ... class X509StoreContextError(Exception): certificate: X509 def __init__(self, message: str, certificate: X509) -> None: ... class X509StoreContext: def __init__(self, store: X509Store, certificate: X509) -> None: ... def set_store(self, store: X509Store) -> None: ... def verify_certificate(self) -> None: ... def load_certificate(type: int, buffer: Union[str, unicode]) -> X509: ... def dump_certificate(type: int, cert: X509) -> bytes: ... def dump_publickey(type: int, pkey: PKey) -> bytes: ... def dump_privatekey(type: int, pkey: PKey, cipher: Optional[str] = ..., passphrase: Optional[Union[str, Callable[[int], int]]] = ...) -> bytes: ... class Revoked: def __init__(self) -> None: ... def set_serial(self, hex_str: str) -> None: ... def get_serial(self) -> str: ... def set_reason(self, reason: str) -> None: ... def get_reason(self) -> str: ... def all_reasons(self) -> List[str]: ... def set_rev_date(self, when: str) -> None: ... def get_rev_date(self) -> str: ... class CRL: def __init__(self) -> None: ... def get_revoked(self) -> Tuple[Revoked, ...]: ... def add_revoked(self, revoked: Revoked) -> None: ... def get_issuer(self) -> X509Name: ... def set_version(self, version: int) -> None: ... def set_lastUpdate(self, when: str) -> None: ... def set_nextUpdate(self, when: str) -> None: ... def sign(self, issuer_cert: X509, issuer_key: PKey, digest: str) -> None: ... def export(self, cert: X509, key: PKey, type: int = ..., days: int = ..., digest: str = ...) -> bytes: ... class PKCS7: def type_is_signed(self) -> bool: ... def type_is_enveloped(self) -> bool: ... def type_is_signedAndEnveloped(self) -> bool: ... def type_is_data(self) -> bool: ... def get_type_name(self) -> str: ... class PKCS12: def __init__(self) -> None: ... def get_certificate(self) -> X509: ... def set_certificate(self, cert: X509) -> None: ... def get_privatekey(self) -> PKey: ... def set_privatekey(self, pkey: PKey) -> None: ... def get_ca_certificates(self) -> Tuple[X509, ...]: ... def set_ca_certificates(self, cacerts: Iterable[X509]) -> None: ... def set_friendlyname(self, name: bytes) -> None: ... def get_friendlyname(self) -> bytes: ... def export(self, passphrase: Optional[str] = ..., iter: int = ..., maciter: int = ...): ... class NetscapeSPKI: def __init__(self) -> None: ... def sign(self, pkey: PKey, digest: str) -> None: ... def verify(self, key: PKey) -> bool: ... def b64_encode(self) -> str: ... def get_pubkey(self) -> PKey: ... def set_pubkey(self, pkey: PKey) -> None: ... def load_publickey(type: int, buffer: Union[str, unicode]) -> PKey: ... def load_privatekey(type: int, buffer: bytes, passphrase: Optional[Union[str, Callable[[int], int]]] = ...): ... def dump_certificate_request(type: int, req: X509Req): ... def load_certificate_request(type, buffer: Union[str, unicode]) -> X509Req: ... def sign(pkey: PKey, data: Union[str, unicode], digest: str) -> bytes: ... def verify(cert: X509, signature: bytes, data: Union[str, unicode], digest: str) -> None: ... def dump_crl(type: int, crl: CRL) -> bytes: ... def load_crl(type: int, buffer: Union[str, unicode]) -> CRL: ... def load_pkcs7_data(type: int, buffer: Union[str, unicode]) -> PKCS7: ... def load_pkcs12(buffer: Union[str, unicode], passphrase: Optional[Union[str, Callable[[int], int]]] = ...) -> PKCS12: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/0000775000175000017500000000000013577125145022172 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/contextvars.pyi0000664000175000017500000000214313577124116025272 0ustar davedave00000000000000from typing import Any, Callable, ClassVar, Generic, Iterator, Mapping, TypeVar _T = TypeVar('_T') class ContextVar(Generic[_T]): def __init__(self, name: str, *, default: _T = ...) -> None: ... @property def name(self) -> str: ... def get(self, default: _T = ...) -> _T: ... def set(self, value: _T) -> Token[_T]: ... def reset(self, token: Token[_T]) -> None: ... class Token(Generic[_T]): @property def var(self) -> ContextVar[_T]: ... @property def old_value(self) -> Any: ... # returns either _T or MISSING, but that's hard to express MISSING: ClassVar[object] def copy_context() -> Context: ... # It doesn't make sense to make this generic, because for most Contexts each ContextVar will have # a different value. class Context(Mapping[ContextVar[Any], Any]): def __init__(self) -> None: ... def run(self, callable: Callable[..., _T], *args: Any, **kwargs: Any) -> _T: ... def copy(self) -> Context: ... def __getitem__(self, key: ContextVar[Any]) -> Any: ... def __iter__(self) -> Iterator[ContextVar[Any]]: ... def __len__(self) -> int: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/0000775000175000017500000000000013577125145022776 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/__init__.pyi0000664000175000017500000000330313577124116025254 0ustar davedave00000000000000from typing import Mapping, Any, Optional, Union, Dict from . import algorithms from cryptography.hazmat.primitives.asymmetric import rsa def decode(jwt: Union[str, bytes], key: Union[str, bytes, rsa.RSAPublicKey, rsa.RSAPrivateKey] = ..., verify: bool = ..., algorithms: Optional[Any] = ..., options: Optional[Mapping[Any, Any]] = ..., **kwargs: Any) -> Dict[str, Any]: ... def encode(payload: Mapping[str, Any], key: Union[str, bytes, rsa.RSAPublicKey, rsa.RSAPrivateKey], algorithm: str = ..., headers: Optional[Mapping[str, Any]] = ..., json_encoder: Optional[Any] = ...) -> bytes: ... def register_algorithm(alg_id: str, alg_obj: algorithms.Algorithm[Any]) -> None: ... def unregister_algorithm(alg_id: str) -> None: ... class PyJWTError(Exception): ... class InvalidTokenError(PyJWTError): ... class DecodeError(InvalidTokenError): ... class ExpiredSignatureError(InvalidTokenError): ... class InvalidAudienceError(InvalidTokenError): ... class InvalidIssuerError(InvalidTokenError): ... class InvalidIssuedAtError(InvalidTokenError): ... class ImmatureSignatureError(InvalidTokenError): ... class InvalidKeyError(PyJWTError): ... class InvalidAlgorithmError(InvalidTokenError): ... class MissingRequiredClaimError(InvalidTokenError): ... class InvalidSignatureError(DecodeError): ... # Compatibility aliases (deprecated) ExpiredSignature = ExpiredSignatureError InvalidAudience = InvalidAudienceError InvalidIssuer = InvalidIssuerError # These aren't actually documented, but the package # exports them in __init__.py, so we should at least # make sure that mypy doesn't raise spurious errors # if they're used. get_unverified_header: Any PyJWT: Any PyJWS: Any jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/contrib/0000775000175000017500000000000013577125145024436 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/contrib/__init__.pyi0000664000175000017500000000000013577124116026703 0ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/0000775000175000017500000000000013577125145026607 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/__init__.pyi0000664000175000017500000000004613577124116031066 0ustar davedave00000000000000from hashlib import _Hash as _HashAlg jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/pycrypto.pyi0000664000175000017500000000036013577124116031217 0ustar davedave00000000000000from typing import Any from jwt.algorithms import Algorithm from . import _HashAlg class RSAAlgorithm(Algorithm[Any]): SHA256: _HashAlg SHA384: _HashAlg SHA512: _HashAlg def __init__(self, hash_alg: _HashAlg) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/contrib/algorithms/py_ecdsa.pyi0000664000175000017500000000035713577124116031123 0ustar davedave00000000000000from typing import Any from jwt.algorithms import Algorithm from . import _HashAlg class ECAlgorithm(Algorithm[Any]): SHA256: _HashAlg SHA384: _HashAlg SHA512: _HashAlg def __init__(self, hash_alg: _HashAlg) -> None: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/jwt/algorithms.pyi0000664000175000017500000000546113577124116025675 0ustar davedave00000000000000import sys from hashlib import _Hash from typing import Any, Set, Dict, Optional, ClassVar, Union, Generic, TypeVar requires_cryptography = Set[str] def get_default_algorithms() -> Dict[str, Algorithm[Any]]: ... _K = TypeVar("_K") class Algorithm(Generic[_K]): def prepare_key(self, key: _K) -> _K: ... def sign(self, msg: bytes, key: _K) -> bytes: ... def verify(self, msg: bytes, key: _K, sig: bytes) -> bool: ... @staticmethod def to_jwk(key_obj: _K) -> str: ... @staticmethod def from_jwk(jwk: str) -> _K: ... class NoneAlgorithm(Algorithm[None]): def prepare_key(self, key: Optional[str]) -> None: ... class _HashAlg: def __call__(self, arg: Union[bytes, bytearray, memoryview] = ...) -> _Hash: ... if sys.version_info >= (3, 6): _LoadsString = Union[str, bytes, bytearray] else: _LoadsString = str class HMACAlgorithm(Algorithm[bytes]): SHA256: ClassVar[_HashAlg] SHA384: ClassVar[_HashAlg] SHA512: ClassVar[_HashAlg] hash_alg: _HashAlg def __init__(self, _HashAlg) -> None: ... def prepare_key(self, key: Union[str, bytes]) -> bytes: ... @staticmethod def to_jwk(key_obj: Union[str, bytes]) -> str: ... @staticmethod def from_jwk(jwk: _LoadsString) -> bytes: ... # Only defined if cryptography is installed. Types should be tightened when # cryptography gets type hints. # See https://github.com/python/typeshed/issues/2542 class RSAAlgorithm(Algorithm[Any]): SHA256: ClassVar[Any] SHA384: ClassVar[Any] SHA512: ClassVar[Any] hash_alg: Any def __init__(self, hash_alg: Any) -> None: ... def prepare_key(self, key: Any) -> Any: ... @staticmethod def to_jwk(key_obj: Any) -> str: ... @staticmethod def from_jwk(jwk: _LoadsString) -> Any: ... def sign(self, msg: bytes, key: Any) -> bytes: ... def verify(self, msg: bytes, key: Any, sig: bytes) -> bool: ... # Only defined if cryptography is installed. Types should be tightened when # cryptography gets type hints. # See https://github.com/python/typeshed/issues/2542 class ECAlgorithm(Algorithm[Any]): SHA256: ClassVar[Any] SHA384: ClassVar[Any] SHA512: ClassVar[Any] hash_alg: Any def __init__(self, hash_alg: Any) -> None: ... def prepare_key(self, key: Any) -> Any: ... @staticmethod def to_jwk(key_obj: Any) -> str: ... @staticmethod def from_jwk(jwk: _LoadsString) -> Any: ... def sign(self, msg: bytes, key: Any) -> bytes: ... def verify(self, msg: bytes, key: Any, sig: bytes) -> bool: ... # Only defined if cryptography is installed. Types should be tightened when # cryptography gets type hints. # See https://github.com/python/typeshed/issues/2542 class RSAPSSAlgorithm(RSAAlgorithm): def sign(self, msg: bytes, key: Any) -> bytes: ... def verify(self, msg: bytes, key: Any, sig: bytes) -> bool: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/0000775000175000017500000000000013577125145022775 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/__init__.pyi0000664000175000017500000000671713577124116025267 0ustar davedave00000000000000# Stubs for six (Python 3.5) from __future__ import print_function from typing import ( Any, AnyStr, Callable, Dict, ItemsView, Iterable, KeysView, Mapping, NoReturn, Optional, Pattern, Text, Tuple, Type, TypeVar, Union, ValuesView, overload, ) import types import typing import unittest # Exports from io import StringIO as StringIO, BytesIO as BytesIO from builtins import next as next from functools import wraps as wraps from . import moves _T = TypeVar('_T') _K = TypeVar('_K') _V = TypeVar('_V') # TODO make constant, then move this stub to 2and3 # https://github.com/python/typeshed/issues/17 PY2 = False PY3 = True PY34: bool string_types = str, integer_types = int, class_types = type, text_type = str binary_type = bytes MAXSIZE: int # def add_move # def remove_move def callable(obj: object) -> bool: ... def get_unbound_function(unbound: types.FunctionType) -> types.FunctionType: ... def create_bound_method(func: types.FunctionType, obj: object) -> types.MethodType: ... def create_unbound_method(func: types.FunctionType, cls: type) -> types.FunctionType: ... Iterator = object def get_method_function(meth: types.MethodType) -> types.FunctionType: ... def get_method_self(meth: types.MethodType) -> Optional[object]: ... def get_function_closure(fun: types.FunctionType) -> Optional[Tuple[types._Cell, ...]]: ... def get_function_code(fun: types.FunctionType) -> types.CodeType: ... def get_function_defaults(fun: types.FunctionType) -> Optional[Tuple[Any, ...]]: ... def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ... def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ... def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ... def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ... # def iterlists def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ... def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ... def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ... def b(s: str) -> binary_type: ... def u(s: str) -> text_type: ... unichr = chr def int2byte(i: int) -> bytes: ... def byte2int(bs: binary_type) -> int: ... def indexbytes(buf: binary_type, i: int) -> int: ... def iterbytes(buf: binary_type) -> typing.Iterator[int]: ... def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = ...) -> None: ... @overload def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = ...) -> Any: ... @overload def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ... def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = ...) -> None: ... exec_ = exec def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ... def raise_from(value: Union[BaseException, Type[BaseException]], from_value: Optional[BaseException]) -> NoReturn: ... print_ = print def with_metaclass(meta: type, *bases: type) -> type: ... def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ... def ensure_binary(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> bytes: ... def ensure_str(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> str: ... def ensure_text(s: Union[bytes, Text], encoding: str = ..., errors: str = ...) -> Text: ... def python_2_unicode_compatible(klass: _T) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/0000775000175000017500000000000013577125145024126 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/__init__.pyi0000664000175000017500000000437613577124116026417 0ustar davedave00000000000000# Stubs for six.moves # # Note: Commented out items means they weren't implemented at the time. # Uncomment them when the modules have been added to the typeshed. import sys from io import StringIO as cStringIO from builtins import filter as filter from itertools import filterfalse as filterfalse from builtins import input as input from sys import intern as intern from builtins import map as map from os import getcwd as getcwd from os import getcwdb as getcwdb from builtins import range as range from functools import reduce as reduce from shlex import quote as shlex_quote from io import StringIO as StringIO from collections import UserDict as UserDict from collections import UserList as UserList from collections import UserString as UserString from builtins import range as xrange from builtins import zip as zip from itertools import zip_longest as zip_longest from . import builtins from . import configparser # import copyreg as copyreg # import dbm.gnu as dbm_gnu from . import _dummy_thread from . import http_cookiejar from . import http_cookies from . import html_entities from . import html_parser from . import http_client from . import email_mime_multipart from . import email_mime_nonmultipart from . import email_mime_text from . import email_mime_base from . import BaseHTTPServer from . import CGIHTTPServer from . import SimpleHTTPServer from . import cPickle from . import queue from . import reprlib from . import socketserver from . import _thread from . import tkinter from . import tkinter_dialog from . import tkinter_filedialog # import tkinter.scrolledtext as tkinter_scrolledtext # import tkinter.simpledialog as tkinter_simpledialog # import tkinter.tix as tkinter_tix from . import tkinter_ttk from . import tkinter_constants # import tkinter.dnd as tkinter_dnd # import tkinter.colorchooser as tkinter_colorchooser from . import tkinter_commondialog from . import tkinter_tkfiledialog # import tkinter.font as tkinter_font # import tkinter.messagebox as tkinter_messagebox # import tkinter.simpledialog as tkinter_tksimpledialog from . import urllib_parse from . import urllib_error from . import urllib from . import urllib_robotparser # import xmlrpc.client as xmlrpc_client # import xmlrpc.server as xmlrpc_server from importlib import reload as reload_module jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/_dummy_thread.pyi0000664000175000017500000000003413577124116027464 0ustar davedave00000000000000from _dummy_thread import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/email_mime_text.pyi0000664000175000017500000000003613577124116030007 0ustar davedave00000000000000from email.mime.text import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib_response.pyi0000664000175000017500000000003713577124116030055 0ustar davedave00000000000000from .urllib.response import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter_constants.pyi0000664000175000017500000000004013577124116030414 0ustar davedave00000000000000from tkinter.constants import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter_dialog.pyi0000664000175000017500000000003513577124116027643 0ustar davedave00000000000000from tkinter.dialog import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/http_client.pyi0000664000175000017500000000003213577124116027156 0ustar davedave00000000000000from http.client import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/http_cookiejar.pyi0000664000175000017500000000003513577124116027651 0ustar davedave00000000000000from http.cookiejar import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/reprlib.pyi0000664000175000017500000000002613577124116026303 0ustar davedave00000000000000from reprlib import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/configparser.pyi0000664000175000017500000000003313577124116027324 0ustar davedave00000000000000from configparser import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/email_mime_base.pyi0000664000175000017500000000003613577124116027735 0ustar davedave00000000000000from email.mime.base import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib_robotparser.pyi0000664000175000017500000000004113577124116030554 0ustar davedave00000000000000from urllib.robotparser import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/SimpleHTTPServer.pyi0000664000175000017500000000003213577124116027761 0ustar davedave00000000000000from http.server import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter_filedialog.pyi0000664000175000017500000000004113577124116030500 0ustar davedave00000000000000from tkinter.filedialog import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter_commondialog.pyi0000664000175000017500000000004313577124116031053 0ustar davedave00000000000000from tkinter.commondialog import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter_ttk.pyi0000664000175000017500000000003213577124116027203 0ustar davedave00000000000000from tkinter.ttk import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/email_mime_nonmultipart.pyi0000664000175000017500000000004613577124116031560 0ustar davedave00000000000000from email.mime.nonmultipart import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/socketserver.pyi0000664000175000017500000000003313577124116027361 0ustar davedave00000000000000from socketserver import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/queue.pyi0000664000175000017500000000002413577124116025766 0ustar davedave00000000000000from queue import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/email_mime_multipart.pyi0000664000175000017500000000004313577124116031042 0ustar davedave00000000000000from email.mime.multipart import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/html_entities.pyi0000664000175000017500000000003413577124116027513 0ustar davedave00000000000000from html.entities import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter.pyi0000664000175000017500000000002613577124116026324 0ustar davedave00000000000000from tkinter import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib_error.pyi0000664000175000017500000000003313577124116027344 0ustar davedave00000000000000from urllib.error import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/cPickle.pyi0000664000175000017500000000002513577124116026215 0ustar davedave00000000000000from pickle import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib_request.pyi0000664000175000017500000000003613577124116027706 0ustar davedave00000000000000from .urllib.request import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/builtins.pyi0000664000175000017500000000002713577124116026476 0ustar davedave00000000000000from builtins import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/CGIHTTPServer.pyi0000664000175000017500000000003213577124116027132 0ustar davedave00000000000000from http.server import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib_parse.pyi0000664000175000017500000000003313577124116027325 0ustar davedave00000000000000from urllib.parse import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/BaseHTTPServer.pyi0000664000175000017500000000003213577124116027402 0ustar davedave00000000000000from http.server import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/0000775000175000017500000000000013577125145025417 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/__init__.pyi0000664000175000017500000000033113577124116027673 0ustar davedave00000000000000import six.moves.urllib.error as error import six.moves.urllib.parse as parse import six.moves.urllib.request as request import six.moves.urllib.response as response import six.moves.urllib.robotparser as robotparser jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/request.pyi0000664000175000017500000000446413577124116027637 0ustar davedave00000000000000# Stubs for six.moves.urllib.request # # Note: Commented out items means they weren't implemented at the time. # Uncomment them when the modules have been added to the typeshed. from urllib.request import urlopen as urlopen from urllib.request import install_opener as install_opener from urllib.request import build_opener as build_opener from urllib.request import pathname2url as pathname2url from urllib.request import url2pathname as url2pathname from urllib.request import getproxies as getproxies from urllib.request import Request as Request from urllib.request import OpenerDirector as OpenerDirector from urllib.request import HTTPDefaultErrorHandler as HTTPDefaultErrorHandler from urllib.request import HTTPRedirectHandler as HTTPRedirectHandler from urllib.request import HTTPCookieProcessor as HTTPCookieProcessor from urllib.request import ProxyHandler as ProxyHandler from urllib.request import BaseHandler as BaseHandler from urllib.request import HTTPPasswordMgr as HTTPPasswordMgr from urllib.request import HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm from urllib.request import AbstractBasicAuthHandler as AbstractBasicAuthHandler from urllib.request import HTTPBasicAuthHandler as HTTPBasicAuthHandler from urllib.request import ProxyBasicAuthHandler as ProxyBasicAuthHandler from urllib.request import AbstractDigestAuthHandler as AbstractDigestAuthHandler from urllib.request import HTTPDigestAuthHandler as HTTPDigestAuthHandler from urllib.request import ProxyDigestAuthHandler as ProxyDigestAuthHandler from urllib.request import HTTPHandler as HTTPHandler from urllib.request import HTTPSHandler as HTTPSHandler from urllib.request import FileHandler as FileHandler from urllib.request import FTPHandler as FTPHandler from urllib.request import CacheFTPHandler as CacheFTPHandler from urllib.request import UnknownHandler as UnknownHandler from urllib.request import HTTPErrorProcessor as HTTPErrorProcessor from urllib.request import urlretrieve as urlretrieve from urllib.request import urlcleanup as urlcleanup from urllib.request import URLopener as URLopener from urllib.request import FancyURLopener as FancyURLopener # from urllib.request import proxy_bypass as proxy_bypass from urllib.request import parse_http_list as parse_http_list from urllib.request import parse_keqv_list as parse_keqv_list jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/error.pyi0000664000175000017500000000024413577124116027270 0ustar davedave00000000000000from urllib.error import URLError as URLError from urllib.error import HTTPError as HTTPError from urllib.error import ContentTooShortError as ContentTooShortError jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/parse.pyi0000664000175000017500000000253413577124116027255 0ustar davedave00000000000000# Stubs for six.moves.urllib.parse # # Note: Commented out items means they weren't implemented at the time. # Uncomment them when the modules have been added to the typeshed. from urllib.parse import ParseResult as ParseResult from urllib.parse import SplitResult as SplitResult from urllib.parse import parse_qs as parse_qs from urllib.parse import parse_qsl as parse_qsl from urllib.parse import urldefrag as urldefrag from urllib.parse import urljoin as urljoin from urllib.parse import urlparse as urlparse from urllib.parse import urlsplit as urlsplit from urllib.parse import urlunparse as urlunparse from urllib.parse import urlunsplit as urlunsplit from urllib.parse import quote as quote from urllib.parse import quote_plus as quote_plus from urllib.parse import unquote as unquote from urllib.parse import unquote_plus as unquote_plus from urllib.parse import unquote_to_bytes as unquote_to_bytes from urllib.parse import urlencode as urlencode # from urllib.parse import splitquery as splitquery # from urllib.parse import splittag as splittag # from urllib.parse import splituser as splituser from urllib.parse import uses_fragment as uses_fragment from urllib.parse import uses_netloc as uses_netloc from urllib.parse import uses_params as uses_params from urllib.parse import uses_query as uses_query from urllib.parse import uses_relative as uses_relative jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/response.pyi0000664000175000017500000000060513577124116027776 0ustar davedave00000000000000# Stubs for six.moves.urllib.response # # Note: Commented out items means they weren't implemented at the time. # Uncomment them when the modules have been added to the typeshed. # from urllib.response import addbase as addbase # from urllib.response import addclosehook as addclosehook # from urllib.response import addinfo as addinfo from urllib.response import addinfourl as addinfourl jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/urllib/robotparser.pyi0000664000175000017500000000010213577124116030472 0ustar davedave00000000000000from urllib.robotparser import RobotFileParser as RobotFileParser jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/html_parser.pyi0000664000175000017500000000003213577124116027161 0ustar davedave00000000000000from html.parser import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/_thread.pyi0000664000175000017500000000002613577124116026252 0ustar davedave00000000000000from _thread import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/http_cookies.pyi0000664000175000017500000000003313577124116027335 0ustar davedave00000000000000from http.cookies import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/six/moves/tkinter_tkfiledialog.pyi0000664000175000017500000000004113577124116031037 0ustar davedave00000000000000from tkinter.filedialog import * jedi-0.15.2/jedi/third_party/typeshed/third_party/3/typed_ast/0000775000175000017500000000000013577125145024166 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/typed_ast/__init__.pyi0000664000175000017500000000017413577124116026447 0ustar davedave00000000000000# This module is a fork of the CPython 2 and 3 ast modules with PEP 484 support. # See: https://github.com/python/typed_ast jedi-0.15.2/jedi/third_party/typeshed/third_party/3/typed_ast/ast27.pyi0000664000175000017500000001551113577124116025651 0ustar davedave00000000000000import typing from typing import Any, Optional, Union, Generic, Iterator class NodeVisitor(): def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> None: ... class NodeTransformer(NodeVisitor): def generic_visit(self, node: AST) -> None: ... def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> AST: ... def copy_location(new_node: AST, old_node: AST) -> AST: ... def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... def fix_missing_locations(node: AST) -> AST: ... def get_docstring(node: AST, clean: bool = ...) -> Optional[bytes]: ... def increment_lineno(node: AST, n: int = ...) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, AST]) -> Any: ... def walk(node: AST) -> Iterator[AST]: ... PyCF_ONLY_AST: int # ast classes identifier = str class AST: _attributes: typing.Tuple[str, ...] _fields: typing.Tuple[str, ...] def __init__(self, *args, **kwargs) -> None: ... class mod(AST): ... class Module(mod): body: typing.List[stmt] type_ignores: typing.List[TypeIgnore] class Interactive(mod): body: typing.List[stmt] class Expression(mod): body: expr class FunctionType(mod): argtypes: typing.List[expr] returns: expr class Suite(mod): body: typing.List[stmt] class stmt(AST): lineno: int col_offset: int class FunctionDef(stmt): name: identifier args: arguments body: typing.List[stmt] decorator_list: typing.List[expr] type_comment: Optional[str] class ClassDef(stmt): name: identifier bases: typing.List[expr] body: typing.List[stmt] decorator_list: typing.List[expr] class Return(stmt): value: Optional[expr] class Delete(stmt): targets: typing.List[expr] class Assign(stmt): targets: typing.List[expr] value: expr type_comment: Optional[str] class AugAssign(stmt): target: expr op: operator value: expr class Print(stmt): dest: Optional[expr] values: typing.List[expr] nl: bool class For(stmt): target: expr iter: expr body: typing.List[stmt] orelse: typing.List[stmt] type_comment: Optional[str] class While(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class If(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class With(stmt): context_expr: expr optional_vars: Optional[expr] body: typing.List[stmt] type_comment: Optional[str] class Raise(stmt): type: Optional[expr] inst: Optional[expr] tback: Optional[expr] class TryExcept(stmt): body: typing.List[stmt] handlers: typing.List[ExceptHandler] orelse: typing.List[stmt] class TryFinally(stmt): body: typing.List[stmt] finalbody: typing.List[stmt] class Assert(stmt): test: expr msg: Optional[expr] class Import(stmt): names: typing.List[alias] class ImportFrom(stmt): module: Optional[identifier] names: typing.List[alias] level: Optional[int] class Exec(stmt): body: expr globals: Optional[expr] locals: Optional[expr] class Global(stmt): names: typing.List[identifier] class Expr(stmt): value: expr class Pass(stmt): ... class Break(stmt): ... class Continue(stmt): ... class slice(AST): ... _slice = slice # this lets us type the variable named 'slice' below class Slice(slice): lower: Optional[expr] upper: Optional[expr] step: Optional[expr] class ExtSlice(slice): dims: typing.List[slice] class Index(slice): value: expr class Ellipsis(slice): ... class expr(AST): lineno: int col_offset: int class BoolOp(expr): op: boolop values: typing.List[expr] class BinOp(expr): left: expr op: operator right: expr class UnaryOp(expr): op: unaryop operand: expr class Lambda(expr): args: arguments body: expr class IfExp(expr): test: expr body: expr orelse: expr class Dict(expr): keys: typing.List[expr] values: typing.List[expr] class Set(expr): elts: typing.List[expr] class ListComp(expr): elt: expr generators: typing.List[comprehension] class SetComp(expr): elt: expr generators: typing.List[comprehension] class DictComp(expr): key: expr value: expr generators: typing.List[comprehension] class GeneratorExp(expr): elt: expr generators: typing.List[comprehension] class Yield(expr): value: Optional[expr] class Compare(expr): left: expr ops: typing.List[cmpop] comparators: typing.List[expr] class Call(expr): func: expr args: typing.List[expr] keywords: typing.List[keyword] starargs: Optional[expr] kwargs: Optional[expr] class Repr(expr): value: expr class Num(expr): n: Union[int, float, complex] class Str(expr): s: bytes kind: str class Attribute(expr): value: expr attr: identifier ctx: expr_context class Subscript(expr): value: expr slice: _slice ctx: expr_context class Name(expr): id: identifier ctx: expr_context class List(expr): elts: typing.List[expr] ctx: expr_context class Tuple(expr): elts: typing.List[expr] ctx: expr_context class expr_context(AST): ... class AugLoad(expr_context): ... class AugStore(expr_context): ... class Del(expr_context): ... class Load(expr_context): ... class Param(expr_context): ... class Store(expr_context): ... class boolop(AST): ... class And(boolop): ... class Or(boolop): ... class operator(AST): ... class Add(operator): ... class BitAnd(operator): ... class BitOr(operator): ... class BitXor(operator): ... class Div(operator): ... class FloorDiv(operator): ... class LShift(operator): ... class Mod(operator): ... class Mult(operator): ... class Pow(operator): ... class RShift(operator): ... class Sub(operator): ... class unaryop(AST): ... class Invert(unaryop): ... class Not(unaryop): ... class UAdd(unaryop): ... class USub(unaryop): ... class cmpop(AST): ... class Eq(cmpop): ... class Gt(cmpop): ... class GtE(cmpop): ... class In(cmpop): ... class Is(cmpop): ... class IsNot(cmpop): ... class Lt(cmpop): ... class LtE(cmpop): ... class NotEq(cmpop): ... class NotIn(cmpop): ... class comprehension(AST): target: expr iter: expr ifs: typing.List[expr] class ExceptHandler(AST): type: Optional[expr] name: Optional[expr] body: typing.List[stmt] lineno: int col_offset: int class arguments(AST): args: typing.List[expr] vararg: Optional[identifier] kwarg: Optional[identifier] defaults: typing.List[expr] type_comments: typing.List[Optional[str]] class keyword(AST): arg: identifier value: expr class alias(AST): name: identifier asname: Optional[identifier] class TypeIgnore(AST): lineno: int jedi-0.15.2/jedi/third_party/typeshed/third_party/3/typed_ast/conversions.pyi0000664000175000017500000000012413577124116027253 0ustar davedave00000000000000from . import ast27 from . import ast3 def py2to3(ast: ast27.AST) -> ast3.AST: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/typed_ast/ast3.pyi0000664000175000017500000001751613577124116025572 0ustar davedave00000000000000import typing from typing import Any, Optional, Union, Generic, Iterator class NodeVisitor(): def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> None: ... class NodeTransformer(NodeVisitor): def generic_visit(self, node: AST) -> None: ... def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ..., feature_version: int = ...) -> AST: ... def copy_location(new_node: AST, old_node: AST) -> AST: ... def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ... def fix_missing_locations(node: AST) -> AST: ... def get_docstring(node: AST, clean: bool = ...) -> str: ... def increment_lineno(node: AST, n: int = ...) -> AST: ... def iter_child_nodes(node: AST) -> Iterator[AST]: ... def iter_fields(node: AST) -> Iterator[typing.Tuple[str, Any]]: ... def literal_eval(node_or_string: Union[str, AST]) -> Any: ... def walk(node: AST) -> Iterator[AST]: ... PyCF_ONLY_AST: int # ast classes identifier = str class AST: _attributes: typing.Tuple[str, ...] _fields: typing.Tuple[str, ...] def __init__(self, *args, **kwargs) -> None: ... class mod(AST): ... class Module(mod): body: typing.List[stmt] type_ignores: typing.List[TypeIgnore] class Interactive(mod): body: typing.List[stmt] class Expression(mod): body: expr class FunctionType(mod): argtypes: typing.List[expr] returns: expr class Suite(mod): body: typing.List[stmt] class stmt(AST): lineno: int col_offset: int class FunctionDef(stmt): name: identifier args: arguments body: typing.List[stmt] decorator_list: typing.List[expr] returns: Optional[expr] type_comment: Optional[str] class AsyncFunctionDef(stmt): name: identifier args: arguments body: typing.List[stmt] decorator_list: typing.List[expr] returns: Optional[expr] type_comment: Optional[str] class ClassDef(stmt): name: identifier bases: typing.List[expr] keywords: typing.List[keyword] body: typing.List[stmt] decorator_list: typing.List[expr] class Return(stmt): value: Optional[expr] class Delete(stmt): targets: typing.List[expr] class Assign(stmt): targets: typing.List[expr] value: expr type_comment: Optional[str] class AugAssign(stmt): target: expr op: operator value: expr class AnnAssign(stmt): target: expr annotation: expr value: Optional[expr] simple: int class For(stmt): target: expr iter: expr body: typing.List[stmt] orelse: typing.List[stmt] type_comment: Optional[str] class AsyncFor(stmt): target: expr iter: expr body: typing.List[stmt] orelse: typing.List[stmt] type_comment: Optional[str] class While(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class If(stmt): test: expr body: typing.List[stmt] orelse: typing.List[stmt] class With(stmt): items: typing.List[withitem] body: typing.List[stmt] type_comment: Optional[str] class AsyncWith(stmt): items: typing.List[withitem] body: typing.List[stmt] type_comment: Optional[str] class Raise(stmt): exc: Optional[expr] cause: Optional[expr] class Try(stmt): body: typing.List[stmt] handlers: typing.List[ExceptHandler] orelse: typing.List[stmt] finalbody: typing.List[stmt] class Assert(stmt): test: expr msg: Optional[expr] class Import(stmt): names: typing.List[alias] class ImportFrom(stmt): module: Optional[identifier] names: typing.List[alias] level: Optional[int] class Global(stmt): names: typing.List[identifier] class Nonlocal(stmt): names: typing.List[identifier] class Expr(stmt): value: expr class Pass(stmt): ... class Break(stmt): ... class Continue(stmt): ... class slice(AST): ... _slice = slice # this lets us type the variable named 'slice' below class Slice(slice): lower: Optional[expr] upper: Optional[expr] step: Optional[expr] class ExtSlice(slice): dims: typing.List[slice] class Index(slice): value: expr class expr(AST): lineno: int col_offset: int class BoolOp(expr): op: boolop values: typing.List[expr] class BinOp(expr): left: expr op: operator right: expr class UnaryOp(expr): op: unaryop operand: expr class Lambda(expr): args: arguments body: expr class IfExp(expr): test: expr body: expr orelse: expr class Dict(expr): keys: typing.List[expr] values: typing.List[expr] class Set(expr): elts: typing.List[expr] class ListComp(expr): elt: expr generators: typing.List[comprehension] class SetComp(expr): elt: expr generators: typing.List[comprehension] class DictComp(expr): key: expr value: expr generators: typing.List[comprehension] class GeneratorExp(expr): elt: expr generators: typing.List[comprehension] class Await(expr): value: expr class Yield(expr): value: Optional[expr] class YieldFrom(expr): value: expr class Compare(expr): left: expr ops: typing.List[cmpop] comparators: typing.List[expr] class Call(expr): func: expr args: typing.List[expr] keywords: typing.List[keyword] class Num(expr): n: Union[float, int, complex] class Str(expr): s: str kind: str class FormattedValue(expr): value: expr conversion: typing.Optional[int] format_spec: typing.Optional[expr] class JoinedStr(expr): values: typing.List[expr] class Bytes(expr): s: bytes class NameConstant(expr): value: Any class Ellipsis(expr): ... class Attribute(expr): value: expr attr: identifier ctx: expr_context class Subscript(expr): value: expr slice: _slice ctx: expr_context class Starred(expr): value: expr ctx: expr_context class Name(expr): id: identifier ctx: expr_context class List(expr): elts: typing.List[expr] ctx: expr_context class Tuple(expr): elts: typing.List[expr] ctx: expr_context class expr_context(AST): ... class AugLoad(expr_context): ... class AugStore(expr_context): ... class Del(expr_context): ... class Load(expr_context): ... class Param(expr_context): ... class Store(expr_context): ... class boolop(AST): ... class And(boolop): ... class Or(boolop): ... class operator(AST): ... class Add(operator): ... class BitAnd(operator): ... class BitOr(operator): ... class BitXor(operator): ... class Div(operator): ... class FloorDiv(operator): ... class LShift(operator): ... class Mod(operator): ... class Mult(operator): ... class MatMult(operator): ... class Pow(operator): ... class RShift(operator): ... class Sub(operator): ... class unaryop(AST): ... class Invert(unaryop): ... class Not(unaryop): ... class UAdd(unaryop): ... class USub(unaryop): ... class cmpop(AST): ... class Eq(cmpop): ... class Gt(cmpop): ... class GtE(cmpop): ... class In(cmpop): ... class Is(cmpop): ... class IsNot(cmpop): ... class Lt(cmpop): ... class LtE(cmpop): ... class NotEq(cmpop): ... class NotIn(cmpop): ... class comprehension(AST): target: expr iter: expr ifs: typing.List[expr] is_async: int class ExceptHandler(AST): type: Optional[expr] name: Optional[identifier] body: typing.List[stmt] lineno: int col_offset: int class arguments(AST): args: typing.List[arg] vararg: Optional[arg] kwonlyargs: typing.List[arg] kw_defaults: typing.List[expr] kwarg: Optional[arg] defaults: typing.List[expr] class arg(AST): arg: identifier annotation: Optional[expr] lineno: int col_offset: int type_comment: typing.Optional[str] class keyword(AST): arg: Optional[identifier] value: expr class alias(AST): name: identifier asname: Optional[identifier] class withitem(AST): context_expr: expr optional_vars: Optional[expr] class TypeIgnore(AST): lineno: int jedi-0.15.2/jedi/third_party/typeshed/third_party/3/dataclasses.pyi0000664000175000017500000000450313577124116025203 0ustar davedave00000000000000from typing import overload, Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar, Union _T = TypeVar('_T') class _MISSING_TYPE: ... MISSING: _MISSING_TYPE @overload def asdict(obj: Any) -> Dict[str, Any]: ... @overload def asdict(obj: Any, *, dict_factory: Callable[[List[Tuple[str, Any]]], _T]) -> _T: ... @overload def astuple(obj: Any) -> Tuple[Any, ...]: ... @overload def astuple(obj: Any, *, tuple_factory: Callable[[List[Any]], _T]) -> _T: ... @overload def dataclass(_cls: Type[_T]) -> Type[_T]: ... @overload def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ... class Field(Generic[_T]): name: str type: Type[_T] default: _T default_factory: Callable[[], _T] repr: bool hash: Optional[bool] init: bool compare: bool metadata: Mapping[str, Any] # NOTE: Actual return type is 'Field[_T]', but we want to help type checkers # to understand the magic that happens at runtime. @overload # `default` and `default_factory` are optional and mutually exclusive. def field(*, default: _T, init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ..., metadata: Optional[Mapping[str, Any]] = ...) -> _T: ... @overload def field(*, default_factory: Callable[[], _T], init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ..., metadata: Optional[Mapping[str, Any]] = ...) -> _T: ... @overload def field(*, init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ..., metadata: Optional[Mapping[str, Any]] = ...) -> Any: ... def fields(class_or_instance: Any) -> Tuple[Field[Any], ...]: ... def is_dataclass(obj: Any) -> bool: ... class FrozenInstanceError(AttributeError): ... class InitVar(Generic[_T]): ... def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *, bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ..., init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ..., frozen: bool = ...): ... def replace(obj: _T, **changes: Any) -> _T: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/orjson.pyi0000664000175000017500000000075213577124116024230 0ustar davedave00000000000000# https://github.com/ijl/orjson/blob/master/orjson.pyi from typing import Any, Callable, Optional, Union __version__ = str def dumps( __obj: Any, default: Optional[Callable[[Any], Any]] = ..., option: Optional[int] = ..., ) -> bytes: ... def loads(__obj: Union[bytes, bytearray, str]) -> Any: ... class JSONDecodeError(ValueError): ... class JSONEncodeError(TypeError): ... OPT_SERIALIZE_DATACLASS: int OPT_NAIVE_UTC: int OPT_OMIT_MICROSECONDS: int OPT_STRICT_INTEGER: int jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/0000775000175000017500000000000013577125145024020 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/__init__.pyi0000664000175000017500000000007213577124116026276 0ustar davedave00000000000000from typing import Any def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/nodes.pyi0000664000175000017500000000040513577124116025647 0ustar davedave00000000000000from typing import Any, List class reference: def __init__(self, rawsource: str = ..., text: str = ..., *children: List[Any], **attributes) -> None: ... def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/examples.pyi0000664000175000017500000000011313577124116026351 0ustar davedave00000000000000from typing import Any html_parts: Any def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/0000775000175000017500000000000013577125145025477 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/__init__.pyi0000664000175000017500000000007213577124116027755 0ustar davedave00000000000000from typing import Any def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/0000775000175000017500000000000013577125145026307 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/__init__.pyi0000664000175000017500000000007213577124116030565 0ustar davedave00000000000000from typing import Any def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/states.pyi0000664000175000017500000000020413577124116030326 0ustar davedave00000000000000import typing from typing import Any class Inliner: def __init__(self) -> None: ... def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/nodes.pyi0000664000175000017500000000007213577124116030136 0ustar davedave00000000000000from typing import Any def __getattr__(name) -> Any: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/docutils/parsers/rst/roles.pyi0000664000175000017500000000064313577124116030156 0ustar davedave00000000000000import docutils.nodes import docutils.parsers.rst.states from typing import Callable, Any, List, Dict, Tuple _RoleFn = Callable[ [str, str, str, int, docutils.parsers.rst.states.Inliner, Dict[str, Any], List[str]], Tuple[List[docutils.nodes.reference], List[docutils.nodes.reference]], ] def register_local_role(name: str, role_fn: _RoleFn) -> None: ... def __getattr__(name: str) -> Any: ... # incomplete jedi-0.15.2/jedi/third_party/typeshed/third_party/3/pkg_resources/0000775000175000017500000000000013577125145025045 5ustar davedave00000000000000jedi-0.15.2/jedi/third_party/typeshed/third_party/3/pkg_resources/__init__.pyi0000664000175000017500000002724113577124116027332 0ustar davedave00000000000000# Stubs for pkg_resources (Python 3.4) from typing import Any, Callable, Dict, IO, Iterable, Generator, Optional, Sequence, Tuple, List, Set, Union, TypeVar, overload from abc import ABCMeta import importlib.abc import types import zipimport _T = TypeVar("_T") _NestedStr = Union[str, Iterable[Union[str, Iterable[Any]]]] _InstallerType = Callable[[Requirement], Optional[Distribution]] _EPDistType = Union[Distribution, Requirement, str] _MetadataType = Optional[IResourceProvider] _PkgReqType = Union[str, Requirement] _DistFinderType = Callable[[str, _Importer, bool], Generator[Distribution, None, None]] _NSHandlerType = Callable[[_Importer, str, str, types.ModuleType], str] def declare_namespace(name: str) -> None: ... def fixup_namespace_packages(path_item: str) -> None: ... class WorkingSet: entries: List[str] def __init__(self, entries: Optional[Iterable[str]] = ...) -> None: ... def require(self, *requirements: _NestedStr) -> Sequence[Distribution]: ... def run_script(self, requires: str, script_name: str) -> None: ... def iter_entry_points(self, group: str, name: Optional[str] = ...) -> Generator[EntryPoint, None, None]: ... def add_entry(self, entry: str) -> None: ... def __contains__(self, dist: Distribution) -> bool: ... def __iter__(self) -> Generator[Distribution, None, None]: ... def find(self, req: Requirement) -> Optional[Distribution]: ... def resolve( self, requirements: Sequence[Requirement], env: Optional[Environment] = ..., installer: Optional[_InstallerType] = ... ) -> List[Distribution]: ... def add(self, dist: Distribution, entry: Optional[str] = ..., insert: bool = ..., replace: bool = ...) -> None: ... def subscribe(self, callback: Callable[[Distribution], None]) -> None: ... def find_plugins( self, plugin_env: Environment, full_env: Optional[Environment] = ..., fallback: bool = ... ) -> Tuple[List[Distribution], Dict[Distribution, Exception]]: ... working_set: WorkingSet def require(*requirements: Union[str, Sequence[str]]) -> Sequence[Distribution]: ... def run_script(requires: str, script_name: str) -> None: ... def iter_entry_points(group: str, name: Optional[str] = ...) -> Generator[EntryPoint, None, None]: ... def add_activation_listener(callback: Callable[[Distribution], None]) -> None: ... class Environment: def __init__( self, search_path: Optional[Sequence[str]] = ..., platform: Optional[str] = ..., python: Optional[str] = ... ) -> None: ... def __getitem__(self, project_name: str) -> List[Distribution]: ... def __iter__(self) -> Generator[str, None, None]: ... def add(self, dist: Distribution) -> None: ... def remove(self, dist: Distribution) -> None: ... def can_add(self, dist: Distribution) -> bool: ... def __add__(self, other: Union[Distribution, Environment]) -> Environment: ... def __iadd__(self, other: Union[Distribution, Environment]) -> Environment: ... @overload def best_match(self, req: Requirement, working_set: WorkingSet) -> Distribution: ... @overload def best_match(self, req: Requirement, working_set: WorkingSet, installer: Callable[[Requirement], _T] = ...) -> _T: ... @overload def obtain(self, requirement: Requirement) -> None: ... @overload def obtain(self, requirement: Requirement, installer: Callable[[Requirement], _T] = ...) -> _T: ... def scan(self, search_path: Optional[Sequence[str]] = ...) -> None: ... def parse_requirements(strs: Union[str, Iterable[str]]) -> Generator[Requirement, None, None]: ... class Requirement: unsafe_name: str project_name: str key: str extras: Tuple[str, ...] specs: List[Tuple[str, str]] # TODO: change this to Optional[packaging.markers.Marker] once we can import # packaging.markers marker: Optional[Any] @staticmethod def parse(s: Union[str, Iterable[str]]) -> Requirement: ... def __contains__(self, item: Union[Distribution, str, Tuple[str, ...]]) -> bool: ... def __eq__(self, other_requirement: Any) -> bool: ... def load_entry_point(dist: _EPDistType, group: str, name: str) -> None: ... def get_entry_info(dist: _EPDistType, group: str, name: str) -> Optional[EntryPoint]: ... @overload def get_entry_map(dist: _EPDistType) -> Dict[str, Dict[str, EntryPoint]]: ... @overload def get_entry_map(dist: _EPDistType, group: str) -> Dict[str, EntryPoint]: ... class EntryPoint: name: str module_name: str attrs: Tuple[str, ...] extras: Tuple[str, ...] dist: Optional[Distribution] def __init__( self, name: str, module_name: str, attrs: Tuple[str, ...] = ..., extras: Tuple[str, ...] = ..., dist: Optional[Distribution] = ..., ) -> None: ... @classmethod def parse(cls, src: str, dist: Optional[Distribution] = ...) -> EntryPoint: ... @classmethod def parse_group( cls, group: str, lines: Union[str, Sequence[str]], dist: Optional[Distribution] = ... ) -> Dict[str, EntryPoint]: ... @classmethod def parse_map( cls, data: Union[Dict[str, Union[str, Sequence[str]]], str, Sequence[str]], dist: Optional[Distribution] = ... ) -> Dict[str, EntryPoint]: ... def load(self, require: bool = ..., env: Optional[Environment] = ..., installer: Optional[_InstallerType] = ...) -> Any: ... def require(self, env: Optional[Environment] = ..., installer: Optional[_InstallerType] = ...) -> None: ... def resolve(self) -> Any: ... def find_distributions(path_item: str, only: bool = ...) -> Generator[Distribution, None, None]: ... def get_distribution(dist: Union[Requirement, str, Distribution]) -> Distribution: ... class Distribution(IResourceProvider, IMetadataProvider): PKG_INFO: str location: str project_name: str key: str extras: List[str] version: str parsed_version: Tuple[str, ...] py_version: str platform: Optional[str] precedence: int def __init__( self, location: Optional[str] = ..., metadata: Optional[str] = ..., project_name: Optional[str] = ..., version: Optional[str] = ..., py_version: str = ..., platform: Optional[str] = ..., precedence: int = ..., ) -> None: ... @classmethod def from_location( cls, location: str, basename: str, metadata: Optional[str] = ..., **kw: Union[str, None, int] ) -> Distribution: ... @classmethod def from_filename(cls, filename: str, metadata: Optional[str] = ..., **kw: Union[str, None, int]) -> Distribution: ... def activate(self, path: Optional[List[str]] = ...) -> None: ... def as_requirement(self) -> Requirement: ... def requires(self, extras: Tuple[str, ...] = ...) -> List[Requirement]: ... def clone(self, **kw: Union[str, int, None]) -> Requirement: ... def egg_name(self) -> str: ... def __cmp__(self, other: Any) -> bool: ... def get_entry_info(self, group: str, name: str) -> Optional[EntryPoint]: ... @overload def get_entry_map(self) -> Dict[str, Dict[str, EntryPoint]]: ... @overload def get_entry_map(self, group: str) -> Dict[str, EntryPoint]: ... def load_entry_point(self, group: str, name: str) -> None: ... EGG_DIST: int BINARY_DIST: int SOURCE_DIST: int CHECKOUT_DIST: int DEVELOP_DIST: int def resource_exists(package_or_requirement: _PkgReqType, resource_name: str) -> bool: ... def resource_stream(package_or_requirement: _PkgReqType, resource_name: str) -> IO[bytes]: ... def resource_string(package_or_requirement: _PkgReqType, resource_name: str) -> bytes: ... def resource_isdir(package_or_requirement: _PkgReqType, resource_name: str) -> bool: ... def resource_listdir(package_or_requirement: _PkgReqType, resource_name: str) -> List[str]: ... def resource_filename(package_or_requirement: _PkgReqType, resource_name: str) -> str: ... def set_extraction_path(path: str) -> None: ... def cleanup_resources(force: bool = ...) -> List[str]: ... class IResourceManager: def resource_exists(self, package_or_requirement: _PkgReqType, resource_name: str) -> bool: ... def resource_stream(self, package_or_requirement: _PkgReqType, resource_name: str) -> IO[bytes]: ... def resource_string(self, package_or_requirement: _PkgReqType, resource_name: str) -> bytes: ... def resource_isdir(self, package_or_requirement: _PkgReqType, resource_name: str) -> bool: ... def resource_listdir(self, package_or_requirement: _PkgReqType, resource_name: str) -> List[str]: ... def resource_filename(self, package_or_requirement: _PkgReqType, resource_name: str) -> str: ... def set_extraction_path(self, path: str) -> None: ... def cleanup_resources(self, force: bool = ...) -> List[str]: ... def get_cache_path(self, archive_name: str, names: Tuple[str, ...] = ...) -> str: ... def extraction_error(self) -> None: ... def postprocess(self, tempname: str, filename: str) -> None: ... @overload def get_provider(package_or_requirement: str) -> IResourceProvider: ... @overload def get_provider(package_or_requirement: Requirement) -> Distribution: ... class IMetadataProvider: def has_metadata(self, name: str) -> bool: ... def metadata_isdir(self, name: str) -> bool: ... def metadata_listdir(self, name: str) -> List[str]: ... def get_metadata(self, name: str) -> str: ... def get_metadata_lines(self, name: str) -> Generator[str, None, None]: ... def run_script(self, script_name: str, namespace: Dict[str, Any]) -> None: ... class ResolutionError(Exception): ... class DistributionNotFound(ResolutionError): ... class VersionConflict(ResolutionError): @property def dist(self) -> Any: ... @property def req(self) -> Any: ... def report(self) -> str: ... def with_context(self, required_by: Dict[str, Any]) -> VersionConflict: ... class ContextualVersionConflict(VersionConflict): @property def required_by(self) -> Set[Any]: ... class UnknownExtra(ResolutionError): ... class ExtractionError(Exception): manager: IResourceManager cache_path: str original_error: Exception class _Importer(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader, metaclass=ABCMeta): ... def register_finder(importer_type: type, distribution_finder: _DistFinderType) -> None: ... def register_loader_type(loader_type: type, provider_factory: Callable[[types.ModuleType], IResourceProvider]) -> None: ... def register_namespace_handler(importer_type: type, namespace_handler: _NSHandlerType) -> None: ... class IResourceProvider(IMetadataProvider): ... class NullProvider: ... class EggProvider(NullProvider): ... class DefaultProvider(EggProvider): ... class PathMetadata(DefaultProvider, IResourceProvider): def __init__(self, path: str, egg_info: str) -> None: ... class ZipProvider(EggProvider): ... class EggMetadata(ZipProvider, IResourceProvider): def __init__(self, zipimporter: zipimport.zipimporter) -> None: ... class EmptyProvider(NullProvider): ... empty_provider: EmptyProvider class FileMetadata(EmptyProvider, IResourceProvider): def __init__(self, path_to_pkg_info: str) -> None: ... def parse_version(v: str) -> Tuple[str, ...]: ... def yield_lines(strs: _NestedStr) -> Generator[str, None, None]: ... def split_sections(strs: _NestedStr) -> Generator[Tuple[Optional[str], str], None, None]: ... def safe_name(name: str) -> str: ... def safe_version(version: str) -> str: ... def safe_extra(extra: str) -> str: ... def to_filename(name_or_version: str) -> str: ... def get_build_platform() -> str: ... def get_platform() -> str: ... def get_supported_platform() -> str: ... def compatible_platforms(provided: Optional[str], required: Optional[str]) -> bool: ... def get_default_cache() -> str: ... def get_importer(path_item: str) -> _Importer: ... def ensure_directory(path: str) -> None: ... def normalize_path(filename: str) -> str: ... jedi-0.15.2/jedi/third_party/typeshed/third_party/3/pkg_resources/py31compat.pyi0000664000175000017500000000013313577124116027562 0ustar davedave00000000000000from typing import Text import os import sys needs_makedirs: bool makedirs = os.makedirs jedi-0.15.2/jedi/plugins/0000775000175000017500000000000013577125145015002 5ustar davedave00000000000000jedi-0.15.2/jedi/plugins/flask.py0000664000175000017500000000162713577124112016453 0ustar davedave00000000000000def import_module(callback): """ Handle "magic" Flask extension imports: ``flask.ext.foo`` is really ``flask_foo`` or ``flaskext.foo``. """ def wrapper(inference_state, import_names, module_context, *args, **kwargs): if len(import_names) == 3 and import_names[:2] == ('flask', 'ext'): # New style. ipath = (u'flask_' + import_names[2]), value_set = callback(inference_state, ipath, None, *args, **kwargs) if value_set: return value_set value_set = callback(inference_state, (u'flaskext',), None, *args, **kwargs) return callback( inference_state, (u'flaskext', import_names[2]), next(iter(value_set)), *args, **kwargs ) return callback(inference_state, import_names, module_context, *args, **kwargs) return wrapper jedi-0.15.2/jedi/plugins/__init__.py0000664000175000017500000000256713577124112017116 0ustar davedave00000000000000from functools import wraps class _PluginManager(object): def __init__(self): self._registered_plugins = [] self._cached_base_callbacks = {} self._built_functions = {} def register(self, *plugins): """ Makes it possible to register your plugin. """ self._registered_plugins.extend(plugins) self._build_functions() def decorate(self): def decorator(callback): @wraps(callback) def wrapper(*args, **kwargs): return built_functions[name](*args, **kwargs) name = callback.__name__ assert name not in self._built_functions built_functions = self._built_functions built_functions[name] = callback self._cached_base_callbacks[name] = callback return wrapper return decorator def _build_functions(self): for name, callback in self._cached_base_callbacks.items(): for plugin in reversed(self._registered_plugins): # Need to reverse so the first plugin is run first. try: func = getattr(plugin, name) except AttributeError: pass else: callback = func(callback) self._built_functions[name] = callback plugin_manager = _PluginManager() jedi-0.15.2/jedi/plugins/registry.py0000664000175000017500000000034313577124112017215 0ustar davedave00000000000000""" This is not a plugin, this is just the place were plugins are registered. """ from jedi.plugins import stdlib from jedi.plugins import flask from jedi.plugins import plugin_manager plugin_manager.register(stdlib, flask) jedi-0.15.2/jedi/plugins/stdlib.py0000664000175000017500000006767413577124112016652 0ustar davedave00000000000000""" Implementations of standard library functions, because it's not possible to understand them with Jedi. To add a new implementation, create a function and add it to the ``_implemented`` dict at the bottom of this module. Note that this module exists only to implement very specific functionality in the standard library. The usual way to understand the standard library is the compiled module that returns the types for C-builtins. """ import parso import os from jedi._compatibility import force_unicode, Parameter from jedi import debug from jedi.inference.utils import safe_property from jedi.inference.helpers import get_str_or_none from jedi.inference.arguments import \ repack_with_argument_clinic, AbstractArguments, TreeArgumentsWrapper from jedi.inference import analysis from jedi.inference import compiled from jedi.inference.value.instance import \ AnonymousMethodExecutionContext, MethodExecutionContext from jedi.inference.base_value import ContextualizedNode, \ NO_VALUES, ValueSet, ValueWrapper, LazyValueWrapper from jedi.inference.value import ClassValue, ModuleValue from jedi.inference.value.klass import ClassMixin from jedi.inference.value.function import FunctionMixin from jedi.inference.value import iterable from jedi.inference.lazy_value import LazyTreeValue, LazyKnownValue, \ LazyKnownValues from jedi.inference.names import ValueName, BaseTreeParamName from jedi.inference.filters import AttributeOverwrite, publish_method, \ ParserTreeFilter, DictFilter from jedi.inference.signature import AbstractSignature, SignatureWrapper # Copied from Python 3.6's stdlib. _NAMEDTUPLE_CLASS_TEMPLATE = """\ _property = property _tuple = tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self def _asdict(self): 'Return a new OrderedDict which maps field names to their values.' return OrderedDict(zip(self._fields, self)) def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) # These methods were added by Jedi. # __new__ doesn't really work with Jedi. So adding this to nametuples seems # like the easiest way. def __init__(_cls, {arg_list}): 'A helper function for namedtuple.' self.__iterable = ({arg_list}) def __iter__(self): for i in self.__iterable: yield i def __getitem__(self, y): return self.__iterable[y] {field_defs} """ _NAMEDTUPLE_FIELD_TEMPLATE = '''\ {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') ''' def execute(callback): def wrapper(value, arguments): def call(): return callback(value, arguments=arguments) try: obj_name = value.name.string_name except AttributeError: pass else: p = value.parent_context if p is not None and p.is_builtins_module(): module_name = 'builtins' elif p is not None and p.is_module(): module_name = p.py__name__() else: return call() if value.is_bound_method(): return call() # for now we just support builtin functions. try: func = _implemented[module_name][obj_name] except KeyError: pass else: return func(value, arguments=arguments, callback=call) return call() return wrapper def _follow_param(inference_state, arguments, index): try: key, lazy_value = list(arguments.unpack())[index] except IndexError: return NO_VALUES else: return lazy_value.infer() def argument_clinic(string, want_value=False, want_context=False, want_arguments=False, want_inference_state=False, want_callback=False): """ Works like Argument Clinic (PEP 436), to validate function params. """ def f(func): @repack_with_argument_clinic(string, keep_arguments_param=True, keep_callback_param=True) def wrapper(value, *args, **kwargs): arguments = kwargs.pop('arguments') callback = kwargs.pop('callback') assert not kwargs # Python 2... debug.dbg('builtin start %s' % value, color='MAGENTA') result = NO_VALUES if want_context: kwargs['context'] = arguments.context if want_value: kwargs['value'] = value if want_inference_state: kwargs['inference_state'] = value.inference_state if want_arguments: kwargs['arguments'] = arguments if want_callback: kwargs['callback'] = callback result = func(*args, **kwargs) debug.dbg('builtin end: %s', result, color='MAGENTA') return result return wrapper return f @argument_clinic('iterator[, default], /', want_inference_state=True) def builtins_next(iterators, defaults, inference_state): if inference_state.environment.version_info.major == 2: name = 'next' else: name = '__next__' # TODO theoretically we have to check here if something is an iterator. # That is probably done by checking if it's not a class. return defaults | iterators.py__getattribute__(name).execute_with_values() @argument_clinic('iterator[, default], /') def builtins_iter(iterators_or_callables, defaults): # TODO implement this if it's a callable. return iterators_or_callables.py__getattribute__('__iter__').execute_with_values() @argument_clinic('object, name[, default], /') def builtins_getattr(objects, names, defaults=None): # follow the first param for value in objects: for name in names: string = get_str_or_none(name) if string is None: debug.warning('getattr called without str') continue else: return value.py__getattribute__(force_unicode(string)) return NO_VALUES @argument_clinic('object[, bases, dict], /') def builtins_type(objects, bases, dicts): if bases or dicts: # It's a type creation... maybe someday... return NO_VALUES else: return objects.py__class__() class SuperInstance(LazyValueWrapper): """To be used like the object ``super`` returns.""" def __init__(self, inference_state, instance): self.inference_state = inference_state self._instance = instance # Corresponds to super().__self__ def _get_bases(self): return self._instance.py__class__().py__bases__() def _get_wrapped_value(self): objs = self._get_bases()[0].infer().execute_with_values() if not objs: # This is just a fallback and will only be used, if it's not # possible to find a class return self._instance return next(iter(objs)) def get_filters(self, origin_scope=None): for b in self._get_bases(): for value in b.infer().execute_with_values(): for f in value.get_filters(): yield f @argument_clinic('[type[, value]], /', want_context=True) def builtins_super(types, objects, context): instance = None if isinstance(context, AnonymousMethodExecutionContext): instance = context.instance elif isinstance(context, MethodExecutionContext): instance = context.instance if instance is None: return NO_VALUES return ValueSet({SuperInstance(instance.inference_state, instance)}) class ReversedObject(AttributeOverwrite): def __init__(self, reversed_obj, iter_list): super(ReversedObject, self).__init__(reversed_obj) self._iter_list = iter_list @publish_method('__iter__') def py__iter__(self, contextualized_node=None): return self._iter_list @publish_method('next', python_version_match=2) @publish_method('__next__', python_version_match=3) def py__next__(self): return ValueSet.from_sets( lazy_value.infer() for lazy_value in self._iter_list ) @argument_clinic('sequence, /', want_value=True, want_arguments=True) def builtins_reversed(sequences, value, arguments): # While we could do without this variable (just by using sequences), we # want static analysis to work well. Therefore we need to generated the # values again. key, lazy_value = next(arguments.unpack()) cn = None if isinstance(lazy_value, LazyTreeValue): cn = ContextualizedNode(lazy_value.context, lazy_value.data) ordered = list(sequences.iterate(cn)) # Repack iterator values and then run it the normal way. This is # necessary, because `reversed` is a function and autocompletion # would fail in certain cases like `reversed(x).__iter__` if we # just returned the result directly. seq, = value.inference_state.typing_module.py__getattribute__('Iterator').execute_with_values() return ValueSet([ReversedObject(seq, list(reversed(ordered)))]) @argument_clinic('value, type, /', want_arguments=True, want_inference_state=True) def builtins_isinstance(objects, types, arguments, inference_state): bool_results = set() for o in objects: cls = o.py__class__() try: cls.py__bases__ except AttributeError: # This is temporary. Everything should have a class attribute in # Python?! Maybe we'll leave it here, because some numpy objects or # whatever might not. bool_results = set([True, False]) break mro = list(cls.py__mro__()) for cls_or_tup in types: if cls_or_tup.is_class(): bool_results.add(cls_or_tup in mro) elif cls_or_tup.name.string_name == 'tuple' \ and cls_or_tup.get_root_context().is_builtins_module(): # Check for tuples. classes = ValueSet.from_sets( lazy_value.infer() for lazy_value in cls_or_tup.iterate() ) bool_results.add(any(cls in mro for cls in classes)) else: _, lazy_value = list(arguments.unpack())[1] if isinstance(lazy_value, LazyTreeValue): node = lazy_value.data message = 'TypeError: isinstance() arg 2 must be a ' \ 'class, type, or tuple of classes and types, ' \ 'not %s.' % cls_or_tup analysis.add(lazy_value.context, 'type-error-isinstance', node, message) return ValueSet( compiled.builtin_from_name(inference_state, force_unicode(str(b))) for b in bool_results ) class StaticMethodObject(ValueWrapper): def py__get__(self, instance, class_value): return ValueSet([self._wrapped_value]) @argument_clinic('sequence, /') def builtins_staticmethod(functions): return ValueSet(StaticMethodObject(f) for f in functions) class ClassMethodObject(ValueWrapper): def __init__(self, class_method_obj, function): super(ClassMethodObject, self).__init__(class_method_obj) self._function = function def py__get__(self, instance, class_value): return ValueSet([ ClassMethodGet(__get__, class_value, self._function) for __get__ in self._wrapped_value.py__getattribute__('__get__') ]) class ClassMethodGet(ValueWrapper): def __init__(self, get_method, klass, function): super(ClassMethodGet, self).__init__(get_method) self._class = klass self._function = function def get_signatures(self): return [sig.bind(self._function) for sig in self._function.get_signatures()] def py__call__(self, arguments): return self._function.execute(ClassMethodArguments(self._class, arguments)) class ClassMethodArguments(TreeArgumentsWrapper): def __init__(self, klass, arguments): super(ClassMethodArguments, self).__init__(arguments) self._class = klass def unpack(self, func=None): yield None, LazyKnownValue(self._class) for values in self._wrapped_arguments.unpack(func): yield values @argument_clinic('sequence, /', want_value=True, want_arguments=True) def builtins_classmethod(functions, value, arguments): return ValueSet( ClassMethodObject(class_method_object, function) for class_method_object in value.py__call__(arguments=arguments) for function in functions ) class PropertyObject(AttributeOverwrite, ValueWrapper): def __init__(self, property_obj, function): super(PropertyObject, self).__init__(property_obj) self._function = function def py__get__(self, instance, class_value): if instance is None: return NO_VALUES return self._function.execute_with_values(instance) @publish_method('deleter') @publish_method('getter') @publish_method('setter') def _return_self(self): return ValueSet({self}) @argument_clinic('func, /', want_callback=True) def builtins_property(functions, callback): return ValueSet( PropertyObject(property_value, function) for property_value in callback() for function in functions ) def collections_namedtuple(value, arguments, callback): """ Implementation of the namedtuple function. This has to be done by processing the namedtuple class template and inferring the result. """ inference_state = value.inference_state # Process arguments name = u'jedi_unknown_namedtuple' for c in _follow_param(inference_state, arguments, 0): x = get_str_or_none(c) if x is not None: name = force_unicode(x) break # TODO here we only use one of the types, we should use all. param_values = _follow_param(inference_state, arguments, 1) if not param_values: return NO_VALUES _fields = list(param_values)[0] string = get_str_or_none(_fields) if string is not None: fields = force_unicode(string).replace(',', ' ').split() elif isinstance(_fields, iterable.Sequence): fields = [ force_unicode(get_str_or_none(v)) for lazy_value in _fields.py__iter__() for v in lazy_value.infer() ] fields = [f for f in fields if f is not None] else: return NO_VALUES # Build source code code = _NAMEDTUPLE_CLASS_TEMPLATE.format( typename=name, field_names=tuple(fields), num_fields=len(fields), arg_list=repr(tuple(fields)).replace("u'", "").replace("'", "")[1:-1], repr_fmt='', field_defs='\n'.join(_NAMEDTUPLE_FIELD_TEMPLATE.format(index=index, name=name) for index, name in enumerate(fields)) ) # Parse source code module = inference_state.grammar.parse(code) generated_class = next(module.iter_classdefs()) parent_context = ModuleValue( inference_state, module, file_io=None, string_names=None, code_lines=parso.split_lines(code, keepends=True), ).as_context() return ValueSet([ClassValue(inference_state, parent_context, generated_class)]) class PartialObject(object): def __init__(self, actual_value, arguments): self._actual_value = actual_value self._arguments = arguments def __getattr__(self, name): return getattr(self._actual_value, name) def _get_function(self, unpacked_arguments): key, lazy_value = next(unpacked_arguments, (None, None)) if key is not None or lazy_value is None: debug.warning("Partial should have a proper function %s", self._arguments) return None return lazy_value.infer() def get_signatures(self): unpacked_arguments = self._arguments.unpack() func = self._get_function(unpacked_arguments) if func is None: return [] arg_count = 0 keys = set() for key, _ in unpacked_arguments: if key is None: arg_count += 1 else: keys.add(key) return [PartialSignature(s, arg_count, keys) for s in func.get_signatures()] def py__call__(self, arguments): func = self._get_function(self._arguments.unpack()) if func is None: return NO_VALUES return func.execute( MergedPartialArguments(self._arguments, arguments) ) class PartialSignature(SignatureWrapper): def __init__(self, wrapped_signature, skipped_arg_count, skipped_arg_set): super(PartialSignature, self).__init__(wrapped_signature) self._skipped_arg_count = skipped_arg_count self._skipped_arg_set = skipped_arg_set def get_param_names(self, resolve_stars=False): names = self._wrapped_signature.get_param_names()[self._skipped_arg_count:] return [n for n in names if n.string_name not in self._skipped_arg_set] class MergedPartialArguments(AbstractArguments): def __init__(self, partial_arguments, call_arguments): self._partial_arguments = partial_arguments self._call_arguments = call_arguments def unpack(self, funcdef=None): unpacked = self._partial_arguments.unpack(funcdef) # Ignore this one, it's the function. It was checked before that it's # there. next(unpacked) for key_lazy_value in unpacked: yield key_lazy_value for key_lazy_value in self._call_arguments.unpack(funcdef): yield key_lazy_value def functools_partial(value, arguments, callback): return ValueSet( PartialObject(instance, arguments) for instance in value.py__call__(arguments) ) @argument_clinic('first, /') def _return_first_param(firsts): return firsts @argument_clinic('seq') def _random_choice(sequences): return ValueSet.from_sets( lazy_value.infer() for sequence in sequences for lazy_value in sequence.py__iter__() ) def _dataclass(value, arguments, callback): for c in _follow_param(value.inference_state, arguments, 0): if c.is_class(): return ValueSet([DataclassWrapper(c)]) else: return ValueSet([value]) return NO_VALUES class DataclassWrapper(ValueWrapper, ClassMixin): def get_signatures(self): param_names = [] for cls in reversed(list(self.py__mro__())): if isinstance(cls, DataclassWrapper): filter_ = cls.as_context().get_global_filter() # .values ordering is not guaranteed, at least not in # Python < 3.6, when dicts where not ordered, which is an # implementation detail anyway. for name in sorted(filter_.values(), key=lambda name: name.start_pos): d = name.tree_name.get_definition() annassign = d.children[1] if d.type == 'expr_stmt' and annassign.type == 'annassign': if len(annassign.children) < 4: default = None else: default = annassign.children[3] param_names.append(DataclassParamName( parent_context=cls.parent_context, tree_name=name.tree_name, annotation_node=annassign.children[1], default_node=default, )) return [DataclassSignature(cls, param_names)] class DataclassSignature(AbstractSignature): def __init__(self, value, param_names): super(DataclassSignature, self).__init__(value) self._param_names = param_names def get_param_names(self, resolve_stars=False): return self._param_names class DataclassParamName(BaseTreeParamName): def __init__(self, parent_context, tree_name, annotation_node, default_node): super(DataclassParamName, self).__init__(parent_context, tree_name) self.annotation_node = annotation_node self.default_node = default_node def get_kind(self): return Parameter.POSITIONAL_OR_KEYWORD def infer(self): if self.annotation_node is None: return NO_VALUES else: return self.parent_context.infer_node(self.annotation_node) class ItemGetterCallable(ValueWrapper): def __init__(self, instance, args_value_set): super(ItemGetterCallable, self).__init__(instance) self._args_value_set = args_value_set @repack_with_argument_clinic('item, /') def py__call__(self, item_value_set): value_set = NO_VALUES for args_value in self._args_value_set: lazy_values = list(args_value.py__iter__()) if len(lazy_values) == 1: # TODO we need to add the contextualized value. value_set |= item_value_set.get_item(lazy_values[0].infer(), None) else: value_set |= ValueSet([iterable.FakeList( self._wrapped_value.inference_state, [ LazyKnownValues(item_value_set.get_item(lazy_value.infer(), None)) for lazy_value in lazy_values ], )]) return value_set @argument_clinic('func, /') def _functools_wraps(funcs): return ValueSet(WrapsCallable(func) for func in funcs) class WrapsCallable(ValueWrapper): # XXX this is not the correct wrapped value, it should be a weird # partials object, but it doesn't matter, because it's always used as a # decorator anyway. @repack_with_argument_clinic('func, /') def py__call__(self, funcs): return ValueSet({Wrapped(func, self._wrapped_value) for func in funcs}) class Wrapped(ValueWrapper, FunctionMixin): def __init__(self, func, original_function): super(Wrapped, self).__init__(func) self._original_function = original_function @property def name(self): return self._original_function.name def get_signature_functions(self): return [self] @argument_clinic('*args, /', want_value=True, want_arguments=True) def _operator_itemgetter(args_value_set, value, arguments): return ValueSet([ ItemGetterCallable(instance, args_value_set) for instance in value.py__call__(arguments) ]) def _create_string_input_function(func): @argument_clinic('string, /', want_value=True, want_arguments=True) def wrapper(strings, value, arguments): def iterate(): for value in strings: s = get_str_or_none(value) if s is not None: s = func(s) yield compiled.create_simple_object(value.inference_state, s) values = ValueSet(iterate()) if values: return values return value.py__call__(arguments) return wrapper @argument_clinic('*args, /', want_callback=True) def _os_path_join(args_set, callback): if len(args_set) == 1: string = u'' sequence, = args_set is_first = True for lazy_value in sequence.py__iter__(): string_values = lazy_value.infer() if len(string_values) != 1: break s = get_str_or_none(next(iter(string_values))) if s is None: break if not is_first: string += os.path.sep string += force_unicode(s) is_first = False else: return ValueSet([compiled.create_simple_object(sequence.inference_state, string)]) return callback() _implemented = { 'builtins': { 'getattr': builtins_getattr, 'type': builtins_type, 'super': builtins_super, 'reversed': builtins_reversed, 'isinstance': builtins_isinstance, 'next': builtins_next, 'iter': builtins_iter, 'staticmethod': builtins_staticmethod, 'classmethod': builtins_classmethod, 'property': builtins_property, }, 'copy': { 'copy': _return_first_param, 'deepcopy': _return_first_param, }, 'json': { 'load': lambda value, arguments, callback: NO_VALUES, 'loads': lambda value, arguments, callback: NO_VALUES, }, 'collections': { 'namedtuple': collections_namedtuple, }, 'functools': { 'partial': functools_partial, 'wraps': _functools_wraps, }, '_weakref': { 'proxy': _return_first_param, }, 'random': { 'choice': _random_choice, }, 'operator': { 'itemgetter': _operator_itemgetter, }, 'abc': { # Not sure if this is necessary, but it's used a lot in typeshed and # it's for now easier to just pass the function. 'abstractmethod': _return_first_param, }, 'typing': { # The _alias function just leads to some annoying type inference. # Therefore, just make it return nothing, which leads to the stubs # being used instead. This only matters for 3.7+. '_alias': lambda value, arguments, callback: NO_VALUES, }, 'dataclasses': { # For now this works at least better than Jedi trying to understand it. 'dataclass': _dataclass }, 'os.path': { 'dirname': _create_string_input_function(os.path.dirname), 'abspath': _create_string_input_function(os.path.abspath), 'relpath': _create_string_input_function(os.path.relpath), 'join': _os_path_join, } } def get_metaclass_filters(func): def wrapper(cls, metaclasses): for metaclass in metaclasses: if metaclass.py__name__() == 'EnumMeta' \ and metaclass.get_root_context().py__name__() == 'enum': filter_ = ParserTreeFilter(parent_context=cls.as_context()) return [DictFilter({ name.string_name: EnumInstance(cls, name).name for name in filter_.values() })] return func(cls, metaclasses) return wrapper class EnumInstance(LazyValueWrapper): def __init__(self, cls, name): self.inference_state = cls.inference_state self._cls = cls # Corresponds to super().__self__ self._name = name self.tree_node = self._name.tree_name @safe_property def name(self): return ValueName(self, self._name.tree_name) def _get_wrapped_value(self): value, = self._cls.execute_with_values() return value def get_filters(self, origin_scope=None): yield DictFilter(dict( name=compiled.create_simple_object(self.inference_state, self._name.string_name).name, value=self._name, )) for f in self._get_wrapped_value().get_filters(): yield f def tree_name_to_values(func): def wrapper(inference_state, context, tree_name): if tree_name.value == 'sep' and context.is_module() and context.py__name__() == 'os.path': return ValueSet({ compiled.create_simple_object(inference_state, os.path.sep), }) return func(inference_state, context, tree_name) return wrapper jedi-0.15.2/jedi/file_io.py0000664000175000017500000000215213577124112015272 0ustar davedave00000000000000import os from parso import file_io class AbstractFolderIO(object): def __init__(self, path): self.path = path def list(self): raise NotImplementedError def get_file_io(self, name): raise NotImplementedError class FolderIO(AbstractFolderIO): def list(self): return os.listdir(self.path) def get_file_io(self, name): return FileIO(os.path.join(self.path, name)) class FileIOFolderMixin(object): def get_parent_folder(self): return FolderIO(os.path.dirname(self.path)) class ZipFileIO(file_io.KnownContentFileIO, FileIOFolderMixin): """For .zip and .egg archives""" def __init__(self, path, code, zip_path): super(ZipFileIO, self).__init__(path, code) self._zip_path = zip_path def get_last_modified(self): try: return os.path.getmtime(self._zip_path) except OSError: # Python 3 would probably only need FileNotFoundError return None class FileIO(file_io.FileIO, FileIOFolderMixin): pass class KnownContentFileIO(file_io.KnownContentFileIO, FileIOFolderMixin): pass jedi-0.15.2/jedi/debug.py0000664000175000017500000000720313577124112014754 0ustar davedave00000000000000import os import time from contextlib import contextmanager from jedi._compatibility import encoding, is_py3, u _inited = False def _lazy_colorama_init(): """ Lazily init colorama if necessary, not to screw up stdout if debugging is not enabled. This version of the function does nothing. """ try: if os.name == 'nt': # Does not work on Windows, as pyreadline and colorama interfere raise ImportError else: # Use colorama for nicer console output. from colorama import Fore, init from colorama import initialise def _lazy_colorama_init(): # noqa: F811 """ Lazily init colorama if necessary, not to screw up stdout is debug not enabled. This version of the function does init colorama. """ global _inited if not _inited: # pytest resets the stream at the end - causes troubles. Since # after every output the stream is reset automatically we don't # need this. initialise.atexit_done = True try: init(strip=False) except Exception: # Colorama fails with initializing under vim and is buggy in # version 0.3.6. pass _inited = True except ImportError: class Fore(object): RED = '' GREEN = '' YELLOW = '' MAGENTA = '' RESET = '' BLUE = '' NOTICE = object() WARNING = object() SPEED = object() enable_speed = False enable_warning = False enable_notice = False # callback, interface: level, str debug_function = None _debug_indent = 0 _start_time = time.time() def reset_time(): global _start_time, _debug_indent _start_time = time.time() _debug_indent = 0 def increase_indent(func): """Decorator for makin """ def wrapper(*args, **kwargs): with increase_indent_cm(): return func(*args, **kwargs) return wrapper @contextmanager def increase_indent_cm(title=None): global _debug_indent if title: dbg('Start: ' + title, color='MAGENTA') _debug_indent += 1 try: yield finally: _debug_indent -= 1 if title: dbg('End: ' + title, color='MAGENTA') def dbg(message, *args, **kwargs): """ Looks at the stack, to see if a debug message should be printed. """ # Python 2 compatibility, because it doesn't understand default args color = kwargs.pop('color', 'GREEN') assert color if debug_function and enable_notice: i = ' ' * _debug_indent _lazy_colorama_init() debug_function(color, i + 'dbg: ' + message % tuple(u(repr(a)) for a in args)) def warning(message, *args, **kwargs): format = kwargs.pop('format', True) assert not kwargs if debug_function and enable_warning: i = ' ' * _debug_indent if format: message = message % tuple(u(repr(a)) for a in args) debug_function('RED', i + 'warning: ' + message) def speed(name): if debug_function and enable_speed: now = time.time() i = ' ' * _debug_indent debug_function('YELLOW', i + 'speed: ' + '%s %s' % (name, now - _start_time)) def print_to_stdout(color, str_out): """ The default debug function that prints to standard out. :param str color: A string that is an attribute of ``colorama.Fore``. """ col = getattr(Fore, color) _lazy_colorama_init() if not is_py3: str_out = str_out.encode(encoding, 'replace') print(col + str_out + Fore.RESET) # debug_function = print_to_stdout jedi-0.15.2/jedi/settings.py0000664000175000017500000000776313577124112015541 0ustar davedave00000000000000""" This module contains variables with global |jedi| settings. To change the behavior of |jedi|, change the variables defined in :mod:`jedi.settings`. Plugins should expose an interface so that the user can adjust the configuration. Example usage:: from jedi import settings settings.case_insensitive_completion = True Completion output ~~~~~~~~~~~~~~~~~ .. autodata:: case_insensitive_completion .. autodata:: add_bracket_after_function .. autodata:: no_completion_duplicates Filesystem cache ~~~~~~~~~~~~~~~~ .. autodata:: cache_directory .. autodata:: use_filesystem_cache Parser ~~~~~~ .. autodata:: fast_parser Dynamic stuff ~~~~~~~~~~~~~ .. autodata:: dynamic_array_additions .. autodata:: dynamic_params .. autodata:: dynamic_params_for_other_modules .. autodata:: additional_dynamic_modules .. autodata:: auto_import_modules Caching ~~~~~~~ .. autodata:: call_signatures_validity """ import os import platform # ---------------- # completion output settings # ---------------- case_insensitive_completion = True """ The completion is by default case insensitive. """ add_bracket_after_function = False """ Adds an opening bracket after a function, because that's normal behaviour. Removed it again, because in VIM that is not very practical. """ no_completion_duplicates = True """ If set, completions with the same name don't appear in the output anymore, but are in the `same_name_completions` attribute. """ # ---------------- # Filesystem cache # ---------------- use_filesystem_cache = True """ Use filesystem cache to save once parsed files with pickle. """ if platform.system().lower() == 'windows': _cache_directory = os.path.join(os.getenv('APPDATA') or '~', 'Jedi', 'Jedi') elif platform.system().lower() == 'darwin': _cache_directory = os.path.join('~', 'Library', 'Caches', 'Jedi') else: _cache_directory = os.path.join(os.getenv('XDG_CACHE_HOME') or '~/.cache', 'jedi') cache_directory = os.path.expanduser(_cache_directory) """ The path where the cache is stored. On Linux, this defaults to ``~/.cache/jedi/``, on OS X to ``~/Library/Caches/Jedi/`` and on Windows to ``%APPDATA%\\Jedi\\Jedi\\``. On Linux, if environment variable ``$XDG_CACHE_HOME`` is set, ``$XDG_CACHE_HOME/jedi`` is used instead of the default one. """ # ---------------- # parser # ---------------- fast_parser = True """ Use the fast parser. This means that reparsing is only being done if something has been changed e.g. to a function. If this happens, only the function is being reparsed. """ _cropped_file_size = 10e6 # 1 Megabyte """ Jedi gets extremely slow if the file size exceed a few thousand lines. To avoid getting stuck completely Jedi crops the file this point. One megabyte of typical Python code equals about 20'000 lines of code. """ # ---------------- # dynamic stuff # ---------------- dynamic_array_additions = True """ check for `append`, etc. on arrays: [], {}, () as well as list/set calls. """ dynamic_params = True """ A dynamic param completion, finds the callees of the function, which define the params of a function. """ dynamic_params_for_other_modules = True """ Do the same for other modules. """ additional_dynamic_modules = [] """ Additional modules in which |jedi| checks if statements are to be found. This is practical for IDEs, that want to administrate their modules themselves. """ dynamic_flow_information = True """ Check for `isinstance` and other information to infer a type. """ auto_import_modules = [ 'gi', # This third-party repository (GTK stuff) doesn't really work with jedi ] """ Modules that are not analyzed but imported, although they contain Python code. This improves autocompletion for libraries that use ``setattr`` or ``globals()`` modifications a lot. """ # ---------------- # caching validity (time) # ---------------- call_signatures_validity = 3.0 """ Finding function calls might be slow (0.1-0.5s). This is not acceptible for normal writing. Therefore cache it for a short time. """ jedi-0.15.2/jedi/__main__.py0000664000175000017500000000262313577124112015407 0ustar davedave00000000000000import sys from os.path import join, dirname, abspath, isdir def _start_linter(): """ This is a pre-alpha API. You're not supposed to use it at all, except for testing. It will very likely change. """ import jedi if '--debug' in sys.argv: jedi.set_debug_function() for path in sys.argv[2:]: if path.startswith('--'): continue if isdir(path): import fnmatch import os paths = [] for root, dirnames, filenames in os.walk(path): for filename in fnmatch.filter(filenames, '*.py'): paths.append(os.path.join(root, filename)) else: paths = [path] try: for path in paths: for error in jedi.Script(path=path)._analysis(): print(error) except Exception: if '--pdb' in sys.argv: import traceback traceback.print_exc() import pdb pdb.post_mortem() else: raise if len(sys.argv) == 2 and sys.argv[1] == 'repl': # don't want to use __main__ only for repl yet, maybe we want to use it for # something else. So just use the keyword ``repl`` for now. print(join(dirname(abspath(__file__)), 'api', 'replstartup.py')) elif len(sys.argv) > 1 and sys.argv[1] == 'linter': _start_linter() jedi-0.15.2/jedi/inference/0000775000175000017500000000000013577125145015257 5ustar davedave00000000000000jedi-0.15.2/jedi/inference/finder.py0000664000175000017500000001041413577124112017071 0ustar davedave00000000000000""" Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc. If you want to understand name resolution, please read the first few chapters in http://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/. Flow checks +++++++++++ Flow checks are not really mature. There's only a check for ``isinstance``. It would check whether a flow has the form of ``if isinstance(a, type_or_tuple)``. Unfortunately every other thing is being ignored (e.g. a == '' would be easy to check for -> a is a string). There's big potential in these checks. """ from parso.tree import search_ancestor from parso.python.tree import Name from jedi import settings from jedi.inference.arguments import TreeArguments from jedi.inference import helpers from jedi.inference.value import iterable from jedi.inference.base_value import NO_VALUES from jedi.parser_utils import is_scope def filter_name(filters, name_or_str): """ Searches names that are defined in a scope (the different ``filters``), until a name fits. """ string_name = name_or_str.value if isinstance(name_or_str, Name) else name_or_str names = [] for filter in filters: names = filter.get(string_name) if names: break return list(names) def check_flow_information(value, flow, search_name, pos): """ Try to find out the type of a variable just with the information that is given by the flows: e.g. It is also responsible for assert checks.:: if isinstance(k, str): k. # <- completion here ensures that `k` is a string. """ if not settings.dynamic_flow_information: return None result = None if is_scope(flow): # Check for asserts. module_node = flow.get_root_node() try: names = module_node.get_used_names()[search_name.value] except KeyError: return None names = reversed([ n for n in names if flow.start_pos <= n.start_pos < (pos or flow.end_pos) ]) for name in names: ass = search_ancestor(name, 'assert_stmt') if ass is not None: result = _check_isinstance_type(value, ass.assertion, search_name) if result is not None: return result if flow.type in ('if_stmt', 'while_stmt'): potential_ifs = [c for c in flow.children[1::4] if c != ':'] for if_test in reversed(potential_ifs): if search_name.start_pos > if_test.end_pos: return _check_isinstance_type(value, if_test, search_name) return result def _check_isinstance_type(value, element, search_name): try: assert element.type in ('power', 'atom_expr') # this might be removed if we analyze and, etc assert len(element.children) == 2 first, trailer = element.children assert first.type == 'name' and first.value == 'isinstance' assert trailer.type == 'trailer' and trailer.children[0] == '(' assert len(trailer.children) == 3 # arglist stuff arglist = trailer.children[1] args = TreeArguments(value.inference_state, value, arglist, trailer) param_list = list(args.unpack()) # Disallow keyword arguments assert len(param_list) == 2 (key1, lazy_value_object), (key2, lazy_value_cls) = param_list assert key1 is None and key2 is None call = helpers.call_of_leaf(search_name) is_instance_call = helpers.call_of_leaf(lazy_value_object.data) # Do a simple get_code comparison. They should just have the same code, # and everything will be all right. normalize = value.inference_state.grammar._normalize assert normalize(is_instance_call) == normalize(call) except AssertionError: return None value_set = NO_VALUES for cls_or_tup in lazy_value_cls.infer(): if isinstance(cls_or_tup, iterable.Sequence) and cls_or_tup.array_type == 'tuple': for lazy_value in cls_or_tup.py__iter__(): value_set |= lazy_value.infer().execute_with_values() else: value_set |= cls_or_tup.execute_with_values() return value_set jedi-0.15.2/jedi/inference/filters.py0000664000175000017500000002714313577124112017301 0ustar davedave00000000000000""" Filters are objects that you can use to filter names in different scopes. They are needed for name resolution. """ from abc import abstractmethod import weakref from parso.tree import search_ancestor from jedi._compatibility import use_metaclass from jedi.inference import flow_analysis from jedi.inference.base_value import ValueSet, Value, ValueWrapper, \ LazyValueWrapper from jedi.parser_utils import get_cached_parent_scope from jedi.inference.utils import to_list from jedi.inference.names import TreeNameDefinition, ParamName, \ AnonymousParamName, AbstractNameDefinition _definition_name_cache = weakref.WeakKeyDictionary() class AbstractFilter(object): _until_position = None def _filter(self, names): if self._until_position is not None: return [n for n in names if n.start_pos < self._until_position] return names @abstractmethod def get(self, name): raise NotImplementedError @abstractmethod def values(self): raise NotImplementedError class FilterWrapper(object): name_wrapper_class = None def __init__(self, wrapped_filter): self._wrapped_filter = wrapped_filter def wrap_names(self, names): return [self.name_wrapper_class(name) for name in names] def get(self, name): return self.wrap_names(self._wrapped_filter.get(name)) def values(self): return self.wrap_names(self._wrapped_filter.values()) def _get_definition_names(used_names, name_key): try: for_module = _definition_name_cache[used_names] except KeyError: for_module = _definition_name_cache[used_names] = {} try: return for_module[name_key] except KeyError: names = used_names.get(name_key, ()) result = for_module[name_key] = tuple( name for name in names if name.is_definition(include_setitem=True) ) return result class AbstractUsedNamesFilter(AbstractFilter): name_class = TreeNameDefinition def __init__(self, parent_context, parser_scope): self._parser_scope = parser_scope self._module_node = self._parser_scope.get_root_node() self._used_names = self._module_node.get_used_names() self.parent_context = parent_context def get(self, name, **filter_kwargs): return self._convert_names(self._filter( _get_definition_names(self._used_names, name), **filter_kwargs )) def _convert_names(self, names): return [self.name_class(self.parent_context, name) for name in names] def values(self, **filter_kwargs): return self._convert_names( name for name_key in self._used_names for name in self._filter( _get_definition_names(self._used_names, name_key), **filter_kwargs ) ) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.parent_context) class ParserTreeFilter(AbstractUsedNamesFilter): def __init__(self, parent_context, node_context=None, until_position=None, origin_scope=None): """ node_context is an option to specify a second value for use cases like the class mro where the parent class of a new name would be the value, but for some type inference it's important to have a local value of the other classes. """ if node_context is None: node_context = parent_context super(ParserTreeFilter, self).__init__(parent_context, node_context.tree_node) self._node_context = node_context self._origin_scope = origin_scope self._until_position = until_position def _filter(self, names): names = super(ParserTreeFilter, self)._filter(names) names = [n for n in names if self._is_name_reachable(n)] return list(self._check_flows(names)) def _is_name_reachable(self, name): parent = name.parent if parent.type == 'trailer': return False base_node = parent if parent.type in ('classdef', 'funcdef') else name return get_cached_parent_scope(self._used_names, base_node) == self._parser_scope def _check_flows(self, names): for name in sorted(names, key=lambda name: name.start_pos, reverse=True): check = flow_analysis.reachability_check( context=self._node_context, value_scope=self._parser_scope, node=name, origin_scope=self._origin_scope ) if check is not flow_analysis.UNREACHABLE: yield name if check is flow_analysis.REACHABLE: break class _FunctionExecutionFilter(ParserTreeFilter): def __init__(self, parent_context, function_value, until_position, origin_scope): super(_FunctionExecutionFilter, self).__init__( parent_context, until_position=until_position, origin_scope=origin_scope, ) self._function_value = function_value def _convert_param(self, param, name): raise NotImplementedError @to_list def _convert_names(self, names): for name in names: param = search_ancestor(name, 'param') # Here we don't need to check if the param is a default/annotation, # because those are not definitions and never make it to this # point. if param: yield self._convert_param(param, name) else: yield TreeNameDefinition(self.parent_context, name) class FunctionExecutionFilter(_FunctionExecutionFilter): def __init__(self, *args, **kwargs): self._arguments = kwargs.pop('arguments') # Python 2 super(FunctionExecutionFilter, self).__init__(*args, **kwargs) def _convert_param(self, param, name): return ParamName(self._function_value, name, self._arguments) class AnonymousFunctionExecutionFilter(_FunctionExecutionFilter): def _convert_param(self, param, name): return AnonymousParamName(self._function_value, name) class GlobalNameFilter(AbstractUsedNamesFilter): def get(self, name): try: names = self._used_names[name] except KeyError: return [] return self._convert_names(self._filter(names)) @to_list def _filter(self, names): for name in names: if name.parent.type == 'global_stmt': yield name def values(self): return self._convert_names( name for name_list in self._used_names.values() for name in self._filter(name_list) ) class DictFilter(AbstractFilter): def __init__(self, dct): self._dct = dct def get(self, name): try: value = self._convert(name, self._dct[name]) except KeyError: return [] else: return list(self._filter([value])) def values(self): def yielder(): for item in self._dct.items(): try: yield self._convert(*item) except KeyError: pass return self._filter(yielder()) def _convert(self, name, value): return value def __repr__(self): keys = ', '.join(self._dct.keys()) return '<%s: for {%s}>' % (self.__class__.__name__, keys) class MergedFilter(object): def __init__(self, *filters): self._filters = filters def get(self, name): return [n for filter in self._filters for n in filter.get(name)] def values(self): return [n for filter in self._filters for n in filter.values()] def __repr__(self): return '%s(%s)' % (self.__class__.__name__, ', '.join(str(f) for f in self._filters)) class _BuiltinMappedMethod(Value): """``Generator.__next__`` ``dict.values`` methods and so on.""" api_type = u'function' def __init__(self, builtin_value, method, builtin_func): super(_BuiltinMappedMethod, self).__init__( builtin_value.inference_state, parent_context=builtin_value ) self._method = method self._builtin_func = builtin_func def py__call__(self, arguments): # TODO add TypeError if params are given/or not correct. return self._method(self.parent_context) def __getattr__(self, name): return getattr(self._builtin_func, name) class SpecialMethodFilter(DictFilter): """ A filter for methods that are defined in this module on the corresponding classes like Generator (for __next__, etc). """ class SpecialMethodName(AbstractNameDefinition): api_type = u'function' def __init__(self, parent_context, string_name, value, builtin_value): callable_, python_version = value if python_version is not None and \ python_version != parent_context.inference_state.environment.version_info.major: raise KeyError self.parent_context = parent_context self.string_name = string_name self._callable = callable_ self._builtin_value = builtin_value def infer(self): for filter in self._builtin_value.get_filters(): # We can take the first index, because on builtin methods there's # always only going to be one name. The same is true for the # inferred values. for name in filter.get(self.string_name): builtin_func = next(iter(name.infer())) break else: continue break return ValueSet([ _BuiltinMappedMethod(self.parent_context, self._callable, builtin_func) ]) def __init__(self, value, dct, builtin_value): super(SpecialMethodFilter, self).__init__(dct) self.value = value self._builtin_value = builtin_value """ This value is what will be used to introspect the name, where as the other value will be used to execute the function. We distinguish, because we have to. """ def _convert(self, name, value): return self.SpecialMethodName(self.value, name, value, self._builtin_value) class _OverwriteMeta(type): def __init__(cls, name, bases, dct): super(_OverwriteMeta, cls).__init__(name, bases, dct) base_dct = {} for base_cls in reversed(cls.__bases__): try: base_dct.update(base_cls.overwritten_methods) except AttributeError: pass for func in cls.__dict__.values(): try: base_dct.update(func.registered_overwritten_methods) except AttributeError: pass cls.overwritten_methods = base_dct class _AttributeOverwriteMixin(object): def get_filters(self, *args, **kwargs): yield SpecialMethodFilter(self, self.overwritten_methods, self._wrapped_value) for filter in self._wrapped_value.get_filters(): yield filter class LazyAttributeOverwrite(use_metaclass(_OverwriteMeta, _AttributeOverwriteMixin, LazyValueWrapper)): def __init__(self, inference_state): self.inference_state = inference_state class AttributeOverwrite(use_metaclass(_OverwriteMeta, _AttributeOverwriteMixin, ValueWrapper)): pass def publish_method(method_name, python_version_match=None): def decorator(func): dct = func.__dict__.setdefault('registered_overwritten_methods', {}) dct[method_name] = func, python_version_match return func return decorator jedi-0.15.2/jedi/inference/base_value.py0000664000175000017500000003310513577124112017732 0ustar davedave00000000000000""" Values are the "values" that Python would return. However Values are at the same time also the "values" that a user is currently sitting in. A ValueSet is typically used to specify the return of a function or any other static analysis operation. In jedi there are always multiple returns and not just one. """ from functools import reduce from operator import add from parso.python.tree import Name from jedi import debug from jedi._compatibility import zip_longest, unicode from jedi.parser_utils import clean_scope_docstring from jedi.common import BaseValueSet, BaseValue from jedi.inference.helpers import SimpleGetItemNotFound from jedi.inference.utils import safe_property from jedi.inference.cache import inference_state_as_method_param_cache from jedi.cache import memoize_method sentinel = object() class HelperValueMixin(object): def get_root_context(self): value = self if value.parent_context is None: return value.as_context() while True: if value.parent_context is None: return value value = value.parent_context @classmethod @inference_state_as_method_param_cache() def create_cached(cls, *args, **kwargs): return cls(*args, **kwargs) def execute(self, arguments): return self.inference_state.execute(self, arguments=arguments) def execute_with_values(self, *value_list): from jedi.inference.arguments import ValuesArguments arguments = ValuesArguments([ValueSet([value]) for value in value_list]) return self.inference_state.execute(self, arguments) def execute_annotation(self): return self.execute_with_values() def gather_annotation_classes(self): return ValueSet([self]) def merge_types_of_iterate(self, contextualized_node=None, is_async=False): return ValueSet.from_sets( lazy_value.infer() for lazy_value in self.iterate(contextualized_node, is_async) ) def _get_value_filters(self, name_or_str): origin_scope = name_or_str if isinstance(name_or_str, Name) else None for f in self.get_filters(origin_scope=origin_scope): yield f # This covers the case where a stub files are incomplete. if self.is_stub(): from jedi.inference.gradual.conversion import convert_values for c in convert_values(ValueSet({self})): for f in c.get_filters(): yield f def goto(self, name_or_str, name_context=None, analysis_errors=True): if name_context is None: name_context = self from jedi.inference import finder filters = self._get_value_filters(name_or_str) names = finder.filter_name(filters, name_or_str) debug.dbg('context.goto %s in (%s): %s', name_or_str, self, names) return names def py__getattribute__(self, name_or_str, name_context=None, position=None, analysis_errors=True): """ :param position: Position of the last statement -> tuple of line, column """ if name_context is None: name_context = self names = self.goto(name_or_str, name_context, analysis_errors) values = ValueSet.from_sets(name.infer() for name in names) if not values: n = name_or_str.value if isinstance(name_or_str, Name) else name_or_str values = self.py__getattribute__alternatives(n) if not names and not values and analysis_errors: if isinstance(name_or_str, Name): from jedi.inference import analysis analysis.add_attribute_error( name_context, self, name_or_str) debug.dbg('context.names_to_types: %s -> %s', names, values) return values def py__await__(self): await_value_set = self.py__getattribute__(u"__await__") if not await_value_set: debug.warning('Tried to run __await__ on value %s', self) return await_value_set.execute_with_values() def iterate(self, contextualized_node=None, is_async=False): debug.dbg('iterate %s', self) if is_async: from jedi.inference.lazy_value import LazyKnownValues # TODO if no __aiter__ values are there, error should be: # TypeError: 'async for' requires an object with __aiter__ method, got int return iter([ LazyKnownValues( self.py__getattribute__('__aiter__').execute_with_values() .py__getattribute__('__anext__').execute_with_values() .py__getattribute__('__await__').execute_with_values() .py__stop_iteration_returns() ) # noqa ]) return self.py__iter__(contextualized_node) def is_sub_class_of(self, class_value): for cls in self.py__mro__(): if cls.is_same_class(class_value): return True return False def is_same_class(self, class2): # Class matching should prefer comparisons that are not this function. if type(class2).is_same_class != HelperValueMixin.is_same_class: return class2.is_same_class(self) return self == class2 @memoize_method def as_context(self, *args, **kwargs): return self._as_context(*args, **kwargs) class Value(HelperValueMixin, BaseValue): """ To be implemented by subclasses. """ tree_node = None # Possible values: None, tuple, list, dict and set. Here to deal with these # very important containers. array_type = None @property def api_type(self): # By default just lower name of the class. Can and should be # overwritten. return self.__class__.__name__.lower() def py__getitem__(self, index_value_set, contextualized_node): from jedi.inference import analysis # TODO this value is probably not right. analysis.add( contextualized_node.context, 'type-error-not-subscriptable', contextualized_node.node, message="TypeError: '%s' object is not subscriptable" % self ) return NO_VALUES def py__simple_getitem__(self, index): raise SimpleGetItemNotFound def py__iter__(self, contextualized_node=None): if contextualized_node is not None: from jedi.inference import analysis analysis.add( contextualized_node.context, 'type-error-not-iterable', contextualized_node.node, message="TypeError: '%s' object is not iterable" % self) return iter([]) def get_signatures(self): return [] def is_class(self): return False def is_instance(self): return False def is_function(self): return False def is_module(self): return False def is_namespace(self): return False def is_compiled(self): return False def is_bound_method(self): return False def is_builtins_module(self): return False def py__bool__(self): """ Since Wrapper is a super class for classes, functions and modules, the return value will always be true. """ return True def py__doc__(self): try: self.tree_node.get_doc_node except AttributeError: return '' else: return clean_scope_docstring(self.tree_node) return None def get_safe_value(self, default=sentinel): if default is sentinel: raise ValueError("There exists no safe value for value %s" % self) return default def py__call__(self, arguments): debug.warning("no execution possible %s", self) return NO_VALUES def py__stop_iteration_returns(self): debug.warning("Not possible to return the stop iterations of %s", self) return NO_VALUES def py__getattribute__alternatives(self, name_or_str): """ For now a way to add values in cases like __getattr__. """ return NO_VALUES def py__get__(self, instance, class_value): debug.warning("No __get__ defined on %s", self) return ValueSet([self]) def get_qualified_names(self): # Returns Optional[Tuple[str, ...]] return None def is_stub(self): # The root value knows if it's a stub or not. return self.parent_context.is_stub() def _as_context(self): raise NotImplementedError('Not all values need to be converted to contexts: %s', self) def iterate_values(values, contextualized_node=None, is_async=False): """ Calls `iterate`, on all values but ignores the ordering and just returns all values that the iterate functions yield. """ return ValueSet.from_sets( lazy_value.infer() for lazy_value in values.iterate(contextualized_node, is_async=is_async) ) class _ValueWrapperBase(HelperValueMixin): @safe_property def name(self): from jedi.inference.names import ValueName wrapped_name = self._wrapped_value.name if wrapped_name.tree_name is not None: return ValueName(self, wrapped_name.tree_name) else: from jedi.inference.compiled import CompiledValueName return CompiledValueName(self, wrapped_name.string_name) @classmethod @inference_state_as_method_param_cache() def create_cached(cls, inference_state, *args, **kwargs): return cls(*args, **kwargs) def __getattr__(self, name): assert name != '_wrapped_value', 'Problem with _get_wrapped_value' return getattr(self._wrapped_value, name) class LazyValueWrapper(_ValueWrapperBase): @safe_property @memoize_method def _wrapped_value(self): with debug.increase_indent_cm('Resolve lazy value wrapper'): return self._get_wrapped_value() def __repr__(self): return '<%s>' % (self.__class__.__name__) def _get_wrapped_value(self): raise NotImplementedError class ValueWrapper(_ValueWrapperBase): def __init__(self, wrapped_value): self._wrapped_value = wrapped_value def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self._wrapped_value) class TreeValue(Value): def __init__(self, inference_state, parent_context, tree_node): super(TreeValue, self).__init__(inference_state, parent_context) self.tree_node = tree_node def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.tree_node) class ContextualizedNode(object): def __init__(self, context, node): self.context = context self.node = node def get_root_context(self): return self.context.get_root_context() def infer(self): return self.context.infer_node(self.node) def __repr__(self): return '<%s: %s in %s>' % (self.__class__.__name__, self.node, self.context) def _getitem(value, index_values, contextualized_node): # The actual getitem call. result = NO_VALUES unused_values = set() for index_value in index_values: index = index_value.get_safe_value(default=None) if type(index) in (float, int, str, unicode, slice, bytes): try: result |= value.py__simple_getitem__(index) continue except SimpleGetItemNotFound: pass unused_values.add(index_value) # The index was somehow not good enough or simply a wrong type. # Therefore we now iterate through all the values and just take # all results. if unused_values or not index_values: result |= value.py__getitem__( ValueSet(unused_values), contextualized_node ) debug.dbg('py__getitem__ result: %s', result) return result class ValueSet(BaseValueSet): def py__class__(self): return ValueSet(c.py__class__() for c in self._set) def iterate(self, contextualized_node=None, is_async=False): from jedi.inference.lazy_value import get_merged_lazy_value type_iters = [c.iterate(contextualized_node, is_async=is_async) for c in self._set] for lazy_values in zip_longest(*type_iters): yield get_merged_lazy_value( [l for l in lazy_values if l is not None] ) def execute(self, arguments): return ValueSet.from_sets(c.inference_state.execute(c, arguments) for c in self._set) def execute_with_values(self, *args, **kwargs): return ValueSet.from_sets(c.execute_with_values(*args, **kwargs) for c in self._set) def goto(self, *args, **kwargs): return reduce(add, [c.goto(*args, **kwargs) for c in self._set], []) def py__getattribute__(self, *args, **kwargs): return ValueSet.from_sets(c.py__getattribute__(*args, **kwargs) for c in self._set) def get_item(self, *args, **kwargs): return ValueSet.from_sets(_getitem(c, *args, **kwargs) for c in self._set) def try_merge(self, function_name): value_set = self.__class__([]) for c in self._set: try: method = getattr(c, function_name) except AttributeError: pass else: value_set |= method() return value_set def gather_annotation_classes(self): return ValueSet.from_sets([c.gather_annotation_classes() for c in self._set]) def get_signatures(self): return [sig for c in self._set for sig in c.get_signatures()] NO_VALUES = ValueSet([]) def iterator_to_value_set(func): def wrapper(*args, **kwargs): return ValueSet(func(*args, **kwargs)) return wrapper jedi-0.15.2/jedi/inference/utils.py0000664000175000017500000000713713577124112016772 0ustar davedave00000000000000""" A universal module with functions / classes without dependencies. """ import sys import contextlib import functools import re import os from jedi._compatibility import reraise _sep = os.path.sep if os.path.altsep is not None: _sep += os.path.altsep _path_re = re.compile(r'(?:\.[^{0}]+|[{0}]__init__\.py)$'.format(re.escape(_sep))) del _sep def to_list(func): def wrapper(*args, **kwargs): return list(func(*args, **kwargs)) return wrapper def to_tuple(func): def wrapper(*args, **kwargs): return tuple(func(*args, **kwargs)) return wrapper def unite(iterable): """Turns a two dimensional array into a one dimensional.""" return set(typ for types in iterable for typ in types) class UncaughtAttributeError(Exception): """ Important, because `__getattr__` and `hasattr` catch AttributeErrors implicitly. This is really evil (mainly because of `__getattr__`). `hasattr` in Python 2 is even more evil, because it catches ALL exceptions. Therefore this class originally had to be derived from `BaseException` instead of `Exception`. But because I removed relevant `hasattr` from the code base, we can now switch back to `Exception`. :param base: return values of sys.exc_info(). """ def safe_property(func): return property(reraise_uncaught(func)) def reraise_uncaught(func): """ Re-throw uncaught `AttributeError`. Usage: Put ``@rethrow_uncaught`` in front of the function which does **not** suppose to raise `AttributeError`. AttributeError is easily get caught by `hasattr` and another ``except AttributeError`` clause. This becomes problem when you use a lot of "dynamic" attributes (e.g., using ``@property``) because you can't distinguish if the property does not exist for real or some code inside of the "dynamic" attribute through that error. In a well written code, such error should not exist but getting there is very difficult. This decorator is to help us getting there by changing `AttributeError` to `UncaughtAttributeError` to avoid unexpected catch. This helps us noticing bugs earlier and facilitates debugging. .. note:: Treating StopIteration here is easy. Add that feature when needed. """ @functools.wraps(func) def wrapper(*args, **kwds): try: return func(*args, **kwds) except AttributeError: exc_info = sys.exc_info() reraise(UncaughtAttributeError(exc_info[1]), exc_info[2]) return wrapper class PushBackIterator(object): def __init__(self, iterator): self.pushes = [] self.iterator = iterator self.current = None def push_back(self, value): self.pushes.append(value) def __iter__(self): return self def next(self): """ Python 2 Compatibility """ return self.__next__() def __next__(self): if self.pushes: self.current = self.pushes.pop() else: self.current = next(self.iterator) return self.current @contextlib.contextmanager def ignored(*exceptions): """ Value manager that ignores all of the specified exceptions. This will be in the standard library starting with Python 3.4. """ try: yield except exceptions: pass def indent_block(text, indention=' '): """This function indents a text block with a default of four spaces.""" temp = '' while text and text[-1] == '\n': temp += text[-1] text = text[:-1] lines = text.split('\n') return '\n'.join(map(lambda s: indention + s, lines)) + temp jedi-0.15.2/jedi/inference/arguments.py0000664000175000017500000003155713577124112017642 0ustar davedave00000000000000import re from parso.python import tree from jedi._compatibility import zip_longest from jedi import debug from jedi.inference.utils import PushBackIterator from jedi.inference import analysis from jedi.inference.lazy_value import LazyKnownValue, LazyKnownValues, \ LazyTreeValue, get_merged_lazy_value from jedi.inference.names import ParamName, TreeNameDefinition, AnonymousParamName from jedi.inference.base_value import NO_VALUES, ValueSet, ContextualizedNode from jedi.inference.value import iterable from jedi.inference.cache import inference_state_as_method_param_cache def try_iter_content(types, depth=0): """Helper method for static analysis.""" if depth > 10: # It's possible that a loop has references on itself (especially with # CompiledObject). Therefore don't loop infinitely. return for typ in types: try: f = typ.py__iter__ except AttributeError: pass else: for lazy_value in f(): try_iter_content(lazy_value.infer(), depth + 1) class ParamIssue(Exception): pass def repack_with_argument_clinic(string, keep_arguments_param=False, keep_callback_param=False): """ Transforms a function or method with arguments to the signature that is given as an argument clinic notation. Argument clinic is part of CPython and used for all the functions that are implemented in C (Python 3.7): str.split.__text_signature__ # Results in: '($self, /, sep=None, maxsplit=-1)' """ clinic_args = list(_parse_argument_clinic(string)) def decorator(func): def wrapper(context, *args, **kwargs): if keep_arguments_param: arguments = kwargs['arguments'] else: arguments = kwargs.pop('arguments') if not keep_arguments_param: kwargs.pop('callback', None) try: args += tuple(_iterate_argument_clinic( context.inference_state, arguments, clinic_args )) except ParamIssue: return NO_VALUES else: return func(context, *args, **kwargs) return wrapper return decorator def _iterate_argument_clinic(inference_state, arguments, parameters): """Uses a list with argument clinic information (see PEP 436).""" iterator = PushBackIterator(arguments.unpack()) for i, (name, optional, allow_kwargs, stars) in enumerate(parameters): if stars == 1: lazy_values = [] for key, argument in iterator: if key is not None: iterator.push_back((key, argument)) break lazy_values.append(argument) yield ValueSet([iterable.FakeTuple(inference_state, lazy_values)]) lazy_values continue elif stars == 2: raise NotImplementedError() key, argument = next(iterator, (None, None)) if key is not None: debug.warning('Keyword arguments in argument clinic are currently not supported.') raise ParamIssue if argument is None and not optional: debug.warning('TypeError: %s expected at least %s arguments, got %s', name, len(parameters), i) raise ParamIssue value_set = NO_VALUES if argument is None else argument.infer() if not value_set and not optional: # For the stdlib we always want values. If we don't get them, # that's ok, maybe something is too hard to resolve, however, # we will not proceed with the type inference of that function. debug.warning('argument_clinic "%s" not resolvable.', name) raise ParamIssue yield value_set def _parse_argument_clinic(string): allow_kwargs = False optional = False while string: # Optional arguments have to begin with a bracket. And should always be # at the end of the arguments. This is therefore not a proper argument # clinic implementation. `range()` for exmple allows an optional start # value at the beginning. match = re.match(r'(?:(?:(\[),? ?|, ?|)(\**\w+)|, ?/)\]*', string) string = string[len(match.group(0)):] if not match.group(2): # A slash -> allow named arguments allow_kwargs = True continue optional = optional or bool(match.group(1)) word = match.group(2) stars = word.count('*') word = word[stars:] yield (word, optional, allow_kwargs, stars) if stars: allow_kwargs = True class _AbstractArgumentsMixin(object): def infer_all(self, funcdef=None): """ Inferes all arguments as a support for static analysis (normally Jedi). """ for key, lazy_value in self.unpack(): types = lazy_value.infer() try_iter_content(types) def unpack(self, funcdef=None): raise NotImplementedError def get_calling_nodes(self): return [] class AbstractArguments(_AbstractArgumentsMixin): context = None argument_node = None trailer = None def unpack_arglist(arglist): if arglist is None: return # Allow testlist here as well for Python2's class inheritance # definitions. if not (arglist.type in ('arglist', 'testlist') or ( # in python 3.5 **arg is an argument, not arglist (arglist.type == 'argument') and arglist.children[0] in ('*', '**'))): yield 0, arglist return iterator = iter(arglist.children) for child in iterator: if child == ',': continue elif child in ('*', '**'): yield len(child.value), next(iterator) elif child.type == 'argument' and \ child.children[0] in ('*', '**'): assert len(child.children) == 2 yield len(child.children[0].value), child.children[1] else: yield 0, child class TreeArguments(AbstractArguments): def __init__(self, inference_state, context, argument_node, trailer=None): """ :param argument_node: May be an argument_node or a list of nodes. """ self.argument_node = argument_node self.context = context self._inference_state = inference_state self.trailer = trailer # Can be None, e.g. in a class definition. @classmethod @inference_state_as_method_param_cache() def create_cached(cls, *args, **kwargs): return cls(*args, **kwargs) def unpack(self, funcdef=None): named_args = [] for star_count, el in unpack_arglist(self.argument_node): if star_count == 1: arrays = self.context.infer_node(el) iterators = [_iterate_star_args(self.context, a, el, funcdef) for a in arrays] for values in list(zip_longest(*iterators)): # TODO zip_longest yields None, that means this would raise # an exception? yield None, get_merged_lazy_value( [v for v in values if v is not None] ) elif star_count == 2: arrays = self.context.infer_node(el) for dct in arrays: for key, values in _star_star_dict(self.context, dct, el, funcdef): yield key, values else: if el.type == 'argument': c = el.children if len(c) == 3: # Keyword argument. named_args.append((c[0].value, LazyTreeValue(self.context, c[2]),)) else: # Generator comprehension. # Include the brackets with the parent. sync_comp_for = el.children[1] if sync_comp_for.type == 'comp_for': sync_comp_for = sync_comp_for.children[1] comp = iterable.GeneratorComprehension( self._inference_state, defining_context=self.context, sync_comp_for_node=sync_comp_for, entry_node=el.children[0], ) yield None, LazyKnownValue(comp) else: yield None, LazyTreeValue(self.context, el) # Reordering arguments is necessary, because star args sometimes appear # after named argument, but in the actual order it's prepended. for named_arg in named_args: yield named_arg def _as_tree_tuple_objects(self): for star_count, argument in unpack_arglist(self.argument_node): default = None if argument.type == 'argument': if len(argument.children) == 3: # Keyword argument. argument, default = argument.children[::2] yield argument, default, star_count def iter_calling_names_with_star(self): for name, default, star_count in self._as_tree_tuple_objects(): # TODO this function is a bit strange. probably refactor? if not star_count or not isinstance(name, tree.Name): continue yield TreeNameDefinition(self.context, name) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.argument_node) def get_calling_nodes(self): old_arguments_list = [] arguments = self while arguments not in old_arguments_list: if not isinstance(arguments, TreeArguments): break old_arguments_list.append(arguments) for calling_name in reversed(list(arguments.iter_calling_names_with_star())): names = calling_name.goto() if len(names) != 1: break if isinstance(names[0], AnonymousParamName): # Dynamic parameters should not have calling nodes, because # they are dynamic and extremely random. return [] if not isinstance(names[0], ParamName): break executed_param_name = names[0].get_executed_param_name() arguments = executed_param_name.arguments break if arguments.argument_node is not None: return [ContextualizedNode(arguments.context, arguments.argument_node)] if arguments.trailer is not None: return [ContextualizedNode(arguments.context, arguments.trailer)] return [] class ValuesArguments(AbstractArguments): def __init__(self, values_list): self._values_list = values_list def unpack(self, funcdef=None): for values in self._values_list: yield None, LazyKnownValues(values) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._values_list) class TreeArgumentsWrapper(_AbstractArgumentsMixin): def __init__(self, arguments): self._wrapped_arguments = arguments @property def context(self): return self._wrapped_arguments.context @property def argument_node(self): return self._wrapped_arguments.argument_node @property def trailer(self): return self._wrapped_arguments.trailer def unpack(self, func=None): raise NotImplementedError def get_calling_nodes(self): return self._wrapped_arguments.get_calling_nodes() def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._wrapped_arguments) def _iterate_star_args(context, array, input_node, funcdef=None): if not array.py__getattribute__('__iter__'): if funcdef is not None: # TODO this funcdef should not be needed. m = "TypeError: %s() argument after * must be a sequence, not %s" \ % (funcdef.name.value, array) analysis.add(context, 'type-error-star', input_node, message=m) try: iter_ = array.py__iter__ except AttributeError: pass else: for lazy_value in iter_(): yield lazy_value def _star_star_dict(context, array, input_node, funcdef): from jedi.inference.value.instance import CompiledInstance if isinstance(array, CompiledInstance) and array.name.string_name == 'dict': # For now ignore this case. In the future add proper iterators and just # make one call without crazy isinstance checks. return {} elif isinstance(array, iterable.Sequence) and array.array_type == 'dict': return array.exact_key_items() else: if funcdef is not None: m = "TypeError: %s argument after ** must be a mapping, not %s" \ % (funcdef.name.value, array) analysis.add(context, 'type-error-star-star', input_node, message=m) return {} jedi-0.15.2/jedi/inference/lazy_value.py0000664000175000017500000000311613577124112017776 0ustar davedave00000000000000from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.common.utils import monkeypatch class AbstractLazyValue(object): def __init__(self, data): self.data = data def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.data) def infer(self): raise NotImplementedError class LazyKnownValue(AbstractLazyValue): """data is a Value.""" def infer(self): return ValueSet([self.data]) class LazyKnownValues(AbstractLazyValue): """data is a ValueSet.""" def infer(self): return self.data class LazyUnknownValue(AbstractLazyValue): def __init__(self): super(LazyUnknownValue, self).__init__(None) def infer(self): return NO_VALUES class LazyTreeValue(AbstractLazyValue): def __init__(self, context, node): super(LazyTreeValue, self).__init__(node) self.context = context # We need to save the predefined names. It's an unfortunate side effect # that needs to be tracked otherwise results will be wrong. self._predefined_names = dict(context.predefined_names) def infer(self): with monkeypatch(self.context, 'predefined_names', self._predefined_names): return self.context.infer_node(self.data) def get_merged_lazy_value(lazy_values): if len(lazy_values) > 1: return MergedLazyValues(lazy_values) else: return lazy_values[0] class MergedLazyValues(AbstractLazyValue): """data is a list of lazy values.""" def infer(self): return ValueSet.from_sets(l.infer() for l in self.data) jedi-0.15.2/jedi/inference/usages.py0000664000175000017500000000450413577124112017114 0ustar davedave00000000000000from jedi.inference import imports def _resolve_names(definition_names, avoid_names=()): for name in definition_names: if name in avoid_names: # Avoiding recursions here, because goto on a module name lands # on the same module. continue if not isinstance(name, imports.SubModuleName): # SubModuleNames are not actually existing names but created # names when importing something like `import foo.bar.baz`. yield name if name.api_type == 'module': for name in _resolve_names(name.goto(), definition_names): yield name def _dictionarize(names): return dict( (n if n.tree_name is None else n.tree_name, n) for n in names ) def _find_names(module_context, tree_name): name = module_context.create_name(tree_name) found_names = set(name.goto()) found_names.add(name) return _dictionarize(_resolve_names(found_names)) def usages(module_context, tree_name): search_name = tree_name.value found_names = _find_names(module_context, tree_name) module_contexts = set(d.get_root_context() for d in found_names.values()) module_contexts = set(m for m in module_contexts if not m.is_compiled()) non_matching_usage_maps = {} inf = module_context.inference_state potential_modules = imports.get_module_contexts_containing_name( inf, module_contexts, search_name ) for module_context in potential_modules: for name_leaf in module_context.tree_node.get_used_names().get(search_name, []): new = _find_names(module_context, name_leaf) if any(tree_name in found_names for tree_name in new): found_names.update(new) for tree_name in new: for dct in non_matching_usage_maps.get(tree_name, []): # A usage that was previously searched for matches with # a now found name. Merge. found_names.update(dct) try: del non_matching_usage_maps[tree_name] except KeyError: pass else: for name in new: non_matching_usage_maps.setdefault(name, []).append(new) return found_names.values() jedi-0.15.2/jedi/inference/__init__.py0000664000175000017500000002007213577124112017362 0ustar davedave00000000000000""" Type inference of Python code in |jedi| is based on three assumptions: * The code uses as least side effects as possible. Jedi understands certain list/tuple/set modifications, but there's no guarantee that Jedi detects everything (list.append in different modules for example). * No magic is being used: - metaclasses - ``setattr()`` / ``__import__()`` - writing to ``globals()``, ``locals()``, ``object.__dict__`` * The programmer is not a total dick, e.g. like `this `_ :-) The actual algorithm is based on a principle I call lazy type inference. That said, the typical entry point for static analysis is calling ``infer_expr_stmt``. There's separate logic for autocompletion in the API, the inference_state is all about inferring an expression. TODO this paragraph is not what jedi does anymore, it's similar, but not the same. Now you need to understand what follows after ``infer_expr_stmt``. Let's make an example:: import datetime datetime.date.toda# <-- cursor here First of all, this module doesn't care about completion. It really just cares about ``datetime.date``. At the end of the procedure ``infer_expr_stmt`` will return the ``date`` class. To *visualize* this (simplified): - ``InferenceState.infer_expr_stmt`` doesn't do much, because there's no assignment. - ``Context.infer_node`` cares for resolving the dotted path - ``InferenceState.find_types`` searches for global definitions of datetime, which it finds in the definition of an import, by scanning the syntax tree. - Using the import logic, the datetime module is found. - Now ``find_types`` is called again by ``infer_node`` to find ``date`` inside the datetime module. Now what would happen if we wanted ``datetime.date.foo.bar``? Two more calls to ``find_types``. However the second call would be ignored, because the first one would return nothing (there's no foo attribute in ``date``). What if the import would contain another ``ExprStmt`` like this:: from foo import bar Date = bar.baz Well... You get it. Just another ``infer_expr_stmt`` recursion. It's really easy. Python can obviously get way more complicated then this. To understand tuple assignments, list comprehensions and everything else, a lot more code had to be written. Jedi has been tested very well, so you can just start modifying code. It's best to write your own test first for your "new" feature. Don't be scared of breaking stuff. As long as the tests pass, you're most likely to be fine. I need to mention now that lazy type inference is really good because it only *inferes* what needs to be *inferred*. All the statements and modules that are not used are just being ignored. """ import parso from parso import python_bytes_to_unicode from jedi.file_io import FileIO from jedi import debug from jedi import settings from jedi.inference import imports from jedi.inference import recursion from jedi.inference.cache import inference_state_function_cache from jedi.inference import helpers from jedi.inference.names import TreeNameDefinition from jedi.inference.base_value import ContextualizedNode, \ ValueSet, iterate_values from jedi.inference.value import ClassValue, FunctionValue from jedi.inference.syntax_tree import infer_expr_stmt, \ check_tuple_assignments, tree_name_to_values from jedi.inference.imports import follow_error_node_imports_if_possible from jedi.plugins import plugin_manager class InferenceState(object): def __init__(self, project, environment=None, script_path=None): if environment is None: environment = project.get_environment() self.environment = environment self.script_path = script_path self.compiled_subprocess = environment.get_inference_state_subprocess(self) self.grammar = environment.get_grammar() self.latest_grammar = parso.load_grammar(version='3.7') self.memoize_cache = {} # for memoize decorators self.module_cache = imports.ModuleCache() # does the job of `sys.modules`. self.stub_module_cache = {} # Dict[Tuple[str, ...], Optional[ModuleValue]] self.compiled_cache = {} # see `inference.compiled.create()` self.inferred_element_counts = {} self.mixed_cache = {} # see `inference.compiled.mixed._create()` self.analysis = [] self.dynamic_params_depth = 0 self.is_analysis = False self.project = project self.access_cache = {} self.allow_descriptor_getattr = False self.reset_recursion_limitations() def import_module(self, import_names, sys_path=None, prefer_stubs=True): return imports.import_module_by_names( self, import_names, sys_path, prefer_stubs=prefer_stubs) @staticmethod @plugin_manager.decorate() def execute(value, arguments): debug.dbg('execute: %s %s', value, arguments) with debug.increase_indent_cm(): value_set = value.py__call__(arguments=arguments) debug.dbg('execute result: %s in %s', value_set, value) return value_set @property @inference_state_function_cache() def builtins_module(self): module_name = u'builtins' if self.environment.version_info.major == 2: module_name = u'__builtin__' builtins_module, = self.import_module((module_name,), sys_path=()) return builtins_module @property @inference_state_function_cache() def typing_module(self): typing_module, = self.import_module((u'typing',)) return typing_module def reset_recursion_limitations(self): self.recursion_detector = recursion.RecursionDetector() self.execution_recursion_detector = recursion.ExecutionRecursionDetector(self) def get_sys_path(self, **kwargs): """Convenience function""" return self.project._get_sys_path(self, environment=self.environment, **kwargs) def goto_definitions(self, context, name): def_ = name.get_definition(import_name_always=True) if def_ is not None: type_ = def_.type is_classdef = type_ == 'classdef' if is_classdef or type_ == 'funcdef': if is_classdef: c = ClassValue(self, context, name.parent) else: c = FunctionValue.from_context(context, name.parent) return ValueSet([c]) if type_ == 'expr_stmt': is_simple_name = name.parent.type not in ('power', 'trailer') if is_simple_name: return infer_expr_stmt(context, def_, name) if type_ == 'for_stmt': container_types = context.infer_node(def_.children[3]) cn = ContextualizedNode(context, def_.children[3]) for_types = iterate_values(container_types, cn) n = TreeNameDefinition(context, name) return check_tuple_assignments(n, for_types) if type_ in ('import_from', 'import_name'): return imports.infer_import(context, name) if type_ == 'with_stmt': return tree_name_to_values(self, context, name) else: result = follow_error_node_imports_if_possible(context, name) if result is not None: return result return helpers.infer_call_of_leaf(context, name) def parse_and_get_code(self, code=None, path=None, encoding='utf-8', use_latest_grammar=False, file_io=None, **kwargs): if code is None: if file_io is None: file_io = FileIO(path) code = file_io.read() # We cannot just use parso, because it doesn't use errors='replace'. code = python_bytes_to_unicode(code, encoding=encoding, errors='replace') if len(code) > settings._cropped_file_size: code = code[:settings._cropped_file_size] grammar = self.latest_grammar if use_latest_grammar else self.grammar return grammar.parse(code=code, path=path, file_io=file_io, **kwargs), code def parse(self, *args, **kwargs): return self.parse_and_get_code(*args, **kwargs)[0] jedi-0.15.2/jedi/inference/value/0000775000175000017500000000000013577125145016373 5ustar davedave00000000000000jedi-0.15.2/jedi/inference/value/dynamic_arrays.py0000664000175000017500000001663013577124112021751 0ustar davedave00000000000000""" A module to deal with stuff like `list.append` and `set.add`. Array modifications ******************* If the content of an array (``set``/``list``) is requested somewhere, the current module will be checked for appearances of ``arr.append``, ``arr.insert``, etc. If the ``arr`` name points to an actual array, the content will be added This can be really cpu intensive, as you can imagine. Because |jedi| has to follow **every** ``append`` and check whether it's the right array. However this works pretty good, because in *slow* cases, the recursion detector and other settings will stop this process. It is important to note that: 1. Array modfications work only in the current module. 2. Jedi only checks Array additions; ``list.pop``, etc are ignored. """ from jedi import debug from jedi import settings from jedi.inference import recursion from jedi.inference.base_value import ValueSet, NO_VALUES, HelperValueMixin, \ ValueWrapper from jedi.inference.lazy_value import LazyKnownValues from jedi.inference.helpers import infer_call_of_leaf from jedi.inference.cache import inference_state_method_cache _sentinel = object() def check_array_additions(context, sequence): """ Just a mapper function for the internal _internal_check_array_additions """ if sequence.array_type not in ('list', 'set'): # TODO also check for dict updates return NO_VALUES return _internal_check_array_additions(context, sequence) @inference_state_method_cache(default=NO_VALUES) @debug.increase_indent def _internal_check_array_additions(context, sequence): """ Checks if a `Array` has "add" (append, insert, extend) statements: >>> a = [""] >>> a.append(1) """ from jedi.inference import arguments debug.dbg('Dynamic array search for %s' % sequence, color='MAGENTA') module_context = context.get_root_context() if not settings.dynamic_array_additions or module_context.is_compiled(): debug.dbg('Dynamic array search aborted.', color='MAGENTA') return NO_VALUES def find_additions(context, arglist, add_name): params = list(arguments.TreeArguments(context.inference_state, context, arglist).unpack()) result = set() if add_name in ['insert']: params = params[1:] if add_name in ['append', 'add', 'insert']: for key, lazy_value in params: result.add(lazy_value) elif add_name in ['extend', 'update']: for key, lazy_value in params: result |= set(lazy_value.infer().iterate()) return result temp_param_add, settings.dynamic_params_for_other_modules = \ settings.dynamic_params_for_other_modules, False is_list = sequence.name.string_name == 'list' search_names = (['append', 'extend', 'insert'] if is_list else ['add', 'update']) added_types = set() for add_name in search_names: try: possible_names = module_context.tree_node.get_used_names()[add_name] except KeyError: continue else: for name in possible_names: value_node = context.tree_node if not (value_node.start_pos < name.start_pos < value_node.end_pos): continue trailer = name.parent power = trailer.parent trailer_pos = power.children.index(trailer) try: execution_trailer = power.children[trailer_pos + 1] except IndexError: continue else: if execution_trailer.type != 'trailer' \ or execution_trailer.children[0] != '(' \ or execution_trailer.children[1] == ')': continue random_context = context.create_context(name) with recursion.execution_allowed(context.inference_state, power) as allowed: if allowed: found = infer_call_of_leaf( random_context, name, cut_own_trailer=True ) if sequence in found: # The arrays match. Now add the results added_types |= find_additions( random_context, execution_trailer.children[1], add_name ) # reset settings settings.dynamic_params_for_other_modules = temp_param_add debug.dbg('Dynamic array result %s' % added_types, color='MAGENTA') return added_types def get_dynamic_array_instance(instance, arguments): """Used for set() and list() instances.""" ai = _DynamicArrayAdditions(instance, arguments) from jedi.inference import arguments return arguments.ValuesArguments([ValueSet([ai])]) class _DynamicArrayAdditions(HelperValueMixin): """ Used for the usage of set() and list(). This is definitely a hack, but a good one :-) It makes it possible to use set/list conversions. This is not a proper context, because it doesn't have to be. It's not used in the wild, it's just used within typeshed as an argument to `__init__` for set/list and never used in any other place. """ def __init__(self, instance, arguments): self._instance = instance self._arguments = arguments def py__class__(self): tuple_, = self._instance.inference_state.builtins_module.py__getattribute__('tuple') return tuple_ def py__iter__(self, contextualized_node=None): arguments = self._arguments try: _, lazy_value = next(arguments.unpack()) except StopIteration: pass else: for lazy in lazy_value.infer().iterate(): yield lazy from jedi.inference.arguments import TreeArguments if isinstance(arguments, TreeArguments): additions = _internal_check_array_additions(arguments.context, self._instance) for addition in additions: yield addition def iterate(self, contextualized_node=None, is_async=False): return self.py__iter__(contextualized_node) class _Modification(ValueWrapper): def __init__(self, wrapped_value, assigned_values, contextualized_key): super(_Modification, self).__init__(wrapped_value) self._assigned_values = assigned_values self._contextualized_key = contextualized_key def py__getitem__(self, *args, **kwargs): return self._wrapped_value.py__getitem__(*args, **kwargs) | self._assigned_values def py__simple_getitem__(self, index): actual = [ v.get_safe_value(_sentinel) for v in self._contextualized_key.infer() ] if index in actual: return self._assigned_values return self._wrapped_value.py__simple_getitem__(index) class DictModification(_Modification): def py__iter__(self, contextualized_node=None): for lazy_context in self._wrapped_value.py__iter__(contextualized_node): yield lazy_context yield self._contextualized_key class ListModification(_Modification): def py__iter__(self, contextualized_node=None): for lazy_context in self._wrapped_value.py__iter__(contextualized_node): yield lazy_context yield LazyKnownValues(self._assigned_values) jedi-0.15.2/jedi/inference/value/module.py0000664000175000017500000002324513577124112020231 0ustar davedave00000000000000import re import os from jedi import debug from jedi.inference.cache import inference_state_method_cache from jedi.inference.names import ValueNameMixin, AbstractNameDefinition from jedi.inference.filters import GlobalNameFilter, ParserTreeFilter, DictFilter, MergedFilter from jedi.inference import compiled from jedi.inference.base_value import TreeValue from jedi.inference.names import SubModuleName from jedi.inference.helpers import values_from_qualified_names from jedi.inference.compiled import create_simple_object from jedi.inference.base_value import ValueSet from jedi.inference.context import ModuleContext class _ModuleAttributeName(AbstractNameDefinition): """ For module attributes like __file__, __str__ and so on. """ api_type = u'instance' def __init__(self, parent_module, string_name, string_value=None): self.parent_context = parent_module self.string_name = string_name self._string_value = string_value def infer(self): if self._string_value is not None: s = self._string_value if self.parent_context.inference_state.environment.version_info.major == 2 \ and not isinstance(s, bytes): s = s.encode('utf-8') return ValueSet([ create_simple_object(self.parent_context.inference_state, s) ]) return compiled.get_string_value_set(self.parent_context.inference_state) class ModuleName(ValueNameMixin, AbstractNameDefinition): start_pos = 1, 0 def __init__(self, value, name): self._value = value self._name = name @property def string_name(self): return self._name def iter_module_names(inference_state, paths): # Python modules/packages for n in inference_state.compiled_subprocess.list_module_names(paths): yield n for path in paths: try: dirs = os.listdir(path) except OSError: # The file might not exist or reading it might lead to an error. debug.warning("Not possible to list directory: %s", path) continue for name in dirs: # Namespaces if os.path.isdir(os.path.join(path, name)): # pycache is obviously not an interestin namespace. Also the # name must be a valid identifier. # TODO use str.isidentifier, once Python 2 is removed if name != '__pycache__' and not re.search(r'\W|^\d', name): yield name # Stub files if name.endswith('.pyi'): if name != '__init__.pyi': yield name[:-4] class SubModuleDictMixin(object): @inference_state_method_cache() def sub_modules_dict(self): """ Lists modules in the directory of this module (if this module is a package). """ names = {} if self.is_package(): mods = iter_module_names(self.inference_state, self.py__path__()) for name in mods: # It's obviously a relative import to the current module. names[name] = SubModuleName(self.as_context(), name) # In the case of an import like `from x.` we don't need to # add all the variables, this is only about submodules. return names class ModuleMixin(SubModuleDictMixin): def get_filters(self, origin_scope=None): yield MergedFilter( ParserTreeFilter( parent_context=self.as_context(), origin_scope=origin_scope ), GlobalNameFilter(self.as_context(), self.tree_node), ) yield DictFilter(self.sub_modules_dict()) yield DictFilter(self._module_attributes_dict()) for star_filter in self.iter_star_filters(): yield star_filter def py__class__(self): c, = values_from_qualified_names(self.inference_state, u'types', u'ModuleType') return c def is_module(self): return True def is_stub(self): return False @property @inference_state_method_cache() def name(self): return ModuleName(self, self._string_name) @property def _string_name(self): """ This is used for the goto functions. """ # TODO It's ugly that we even use this, the name is usually well known # ahead so just pass it when create a ModuleValue. if self._path is None: return '' # no path -> empty name else: sep = (re.escape(os.path.sep),) * 2 r = re.search(r'([^%s]*?)(%s__init__)?(\.pyi?|\.so)?$' % sep, self._path) # Remove PEP 3149 names return re.sub(r'\.[a-z]+-\d{2}[mud]{0,3}$', '', r.group(1)) @inference_state_method_cache() def _module_attributes_dict(self): names = ['__package__', '__doc__', '__name__'] # All the additional module attributes are strings. dct = dict((n, _ModuleAttributeName(self, n)) for n in names) file = self.py__file__() if file is not None: dct['__file__'] = _ModuleAttributeName(self, '__file__', file) return dct def iter_star_filters(self): for star_module in self.star_imports(): yield next(star_module.get_filters()) # I'm not sure if the star import cache is really that effective anymore # with all the other really fast import caches. Recheck. Also we would need # to push the star imports into InferenceState.module_cache, if we reenable this. @inference_state_method_cache([]) def star_imports(self): from jedi.inference.imports import Importer modules = [] module_context = self.as_context() for i in self.tree_node.iter_imports(): if i.is_star_import(): new = Importer( self.inference_state, import_path=i.get_paths()[-1], module_context=module_context, level=i.level ).follow() for module in new: if isinstance(module, ModuleValue): modules += module.star_imports() modules += new return modules def get_qualified_names(self): """ A module doesn't have a qualified name, but it's important to note that it's reachable and not `None`. With this information we can add qualified names on top for all value children. """ return () class ModuleValue(ModuleMixin, TreeValue): api_type = u'module' def __init__(self, inference_state, module_node, file_io, string_names, code_lines, is_package=False): super(ModuleValue, self).__init__( inference_state, parent_context=None, tree_node=module_node ) self.file_io = file_io if file_io is None: self._path = None else: self._path = file_io.path self.string_names = string_names # Optional[Tuple[str, ...]] self.code_lines = code_lines self._is_package = is_package def is_stub(self): if self._path is not None and self._path.endswith('.pyi'): # Currently this is the way how we identify stubs when e.g. goto is # used in them. This could be changed if stubs would be identified # sooner and used as StubModuleValue. return True return super(ModuleValue, self).is_stub() def py__name__(self): if self.string_names is None: return None return '.'.join(self.string_names) def py__file__(self): """ In contrast to Python's __file__ can be None. """ if self._path is None: return None return os.path.abspath(self._path) def is_package(self): return self._is_package def py__package__(self): if self._is_package: return self.string_names return self.string_names[:-1] def py__path__(self): """ In case of a package, this returns Python's __path__ attribute, which is a list of paths (strings). Returns None if the module is not a package. """ if not self._is_package: return None # A namespace package is typically auto generated and ~10 lines long. first_few_lines = ''.join(self.code_lines[:50]) # these are strings that need to be used for namespace packages, # the first one is ``pkgutil``, the second ``pkg_resources``. options = ('declare_namespace(__name__)', 'extend_path(__path__') if options[0] in first_few_lines or options[1] in first_few_lines: # It is a namespace, now try to find the rest of the # modules on sys_path or whatever the search_path is. paths = set() for s in self.inference_state.get_sys_path(): other = os.path.join(s, self.name.string_name) if os.path.isdir(other): paths.add(other) if paths: return list(paths) # Nested namespace packages will not be supported. Nobody ever # asked for it and in Python 3 they are there without using all the # crap above. # Default to the of this file. file = self.py__file__() assert file is not None # Shouldn't be a package in the first place. return [os.path.dirname(file)] def _as_context(self): return ModuleContext(self) def __repr__(self): return "<%s: %s@%s-%s is_stub=%s>" % ( self.__class__.__name__, self._string_name, self.tree_node.start_pos[0], self.tree_node.end_pos[0], self.is_stub() ) jedi-0.15.2/jedi/inference/value/function.py0000664000175000017500000003744013577124112020573 0ustar davedave00000000000000from parso.python import tree from jedi._compatibility import use_metaclass from jedi import debug from jedi.inference.cache import inference_state_method_cache, CachedMetaClass from jedi.inference import compiled from jedi.inference import recursion from jedi.inference import docstrings from jedi.inference import flow_analysis from jedi.inference.signature import TreeSignature from jedi.inference.filters import ParserTreeFilter, FunctionExecutionFilter, \ AnonymousFunctionExecutionFilter from jedi.inference.names import ValueName, AbstractNameDefinition, \ AnonymousParamName, ParamName from jedi.inference.base_value import ContextualizedNode, NO_VALUES, \ ValueSet, TreeValue, ValueWrapper from jedi.inference.lazy_value import LazyKnownValues, LazyKnownValue, \ LazyTreeValue from jedi.inference.context import ValueContext, TreeContextMixin from jedi.inference.value import iterable from jedi import parser_utils from jedi.inference.parser_cache import get_yield_exprs from jedi.inference.helpers import values_from_qualified_names from jedi.inference.gradual.generics import TupleGenericManager class LambdaName(AbstractNameDefinition): string_name = '' api_type = u'function' def __init__(self, lambda_value): self._lambda_value = lambda_value self.parent_context = lambda_value.parent_context @property def start_pos(self): return self._lambda_value.tree_node.start_pos def infer(self): return ValueSet([self._lambda_value]) class FunctionAndClassBase(TreeValue): def get_qualified_names(self): if self.parent_context.is_class(): n = self.parent_context.get_qualified_names() if n is None: # This means that the parent class lives within a function. return None return n + (self.py__name__(),) elif self.parent_context.is_module(): return (self.py__name__(),) else: return None class FunctionMixin(object): api_type = u'function' def get_filters(self, origin_scope=None): cls = self.py__class__() for instance in cls.execute_with_values(): for filter in instance.get_filters(origin_scope=origin_scope): yield filter def py__get__(self, instance, class_value): from jedi.inference.value.instance import BoundMethod if instance is None: # Calling the Foo.bar results in the original bar function. return ValueSet([self]) return ValueSet([BoundMethod(instance, self)]) def get_param_names(self): return [AnonymousParamName(self, param.name) for param in self.tree_node.get_params()] @property def name(self): if self.tree_node.type == 'lambdef': return LambdaName(self) return ValueName(self, self.tree_node.name) def py__name__(self): return self.name.string_name def py__call__(self, arguments): function_execution = self.as_context(arguments) return function_execution.infer() def _as_context(self, arguments=None): if arguments is None: return AnonymousFunctionExecution(self) return FunctionExecutionContext(self, arguments) def get_signatures(self): return [TreeSignature(f) for f in self.get_signature_functions()] class FunctionValue(use_metaclass(CachedMetaClass, FunctionMixin, FunctionAndClassBase)): def is_function(self): return True @classmethod def from_context(cls, context, tree_node): def create(tree_node): if context.is_class(): return MethodValue( context.inference_state, context, parent_context=parent_context, tree_node=tree_node ) else: return cls( context.inference_state, parent_context=parent_context, tree_node=tree_node ) overloaded_funcs = list(_find_overload_functions(context, tree_node)) parent_context = context while parent_context.is_class() or parent_context.is_instance(): parent_context = parent_context.parent_context function = create(tree_node) if overloaded_funcs: return OverloadedFunctionValue( function, # Get them into the correct order: lower line first. list(reversed([create(f) for f in overloaded_funcs])) ) return function def py__class__(self): c, = values_from_qualified_names(self.inference_state, u'types', u'FunctionType') return c def get_default_param_context(self): return self.parent_context def get_signature_functions(self): return [self] class MethodValue(FunctionValue): def __init__(self, inference_state, class_context, *args, **kwargs): super(MethodValue, self).__init__(inference_state, *args, **kwargs) self.class_context = class_context def get_default_param_context(self): return self.class_context def get_qualified_names(self): # Need to implement this, because the parent value of a method # value is not the class value but the module. names = self.class_context.get_qualified_names() if names is None: return None return names + (self.py__name__(),) class BaseFunctionExecutionContext(ValueContext, TreeContextMixin): def _infer_annotations(self): raise NotImplementedError @inference_state_method_cache(default=NO_VALUES) @recursion.execution_recursion_decorator() def get_return_values(self, check_yields=False): funcdef = self.tree_node if funcdef.type == 'lambdef': return self.infer_node(funcdef.children[-1]) if check_yields: value_set = NO_VALUES returns = get_yield_exprs(self.inference_state, funcdef) else: value_set = self._infer_annotations() if value_set: # If there are annotations, prefer them over anything else. # This will make it faster. return value_set value_set |= docstrings.infer_return_types(self._value) returns = funcdef.iter_return_stmts() for r in returns: check = flow_analysis.reachability_check(self, funcdef, r) if check is flow_analysis.UNREACHABLE: debug.dbg('Return unreachable: %s', r) else: if check_yields: value_set |= ValueSet.from_sets( lazy_value.infer() for lazy_value in self._get_yield_lazy_value(r) ) else: try: children = r.children except AttributeError: ctx = compiled.builtin_from_name(self.inference_state, u'None') value_set |= ValueSet([ctx]) else: value_set |= self.infer_node(children[1]) if check is flow_analysis.REACHABLE: debug.dbg('Return reachable: %s', r) break return value_set def _get_yield_lazy_value(self, yield_expr): if yield_expr.type == 'keyword': # `yield` just yields None. ctx = compiled.builtin_from_name(self.inference_state, u'None') yield LazyKnownValue(ctx) return node = yield_expr.children[1] if node.type == 'yield_arg': # It must be a yield from. cn = ContextualizedNode(self, node.children[1]) for lazy_value in cn.infer().iterate(cn): yield lazy_value else: yield LazyTreeValue(self, node) @recursion.execution_recursion_decorator(default=iter([])) def get_yield_lazy_values(self, is_async=False): # TODO: if is_async, wrap yield statements in Awaitable/async_generator_asend for_parents = [(y, tree.search_ancestor(y, 'for_stmt', 'funcdef', 'while_stmt', 'if_stmt')) for y in get_yield_exprs(self.inference_state, self.tree_node)] # Calculate if the yields are placed within the same for loop. yields_order = [] last_for_stmt = None for yield_, for_stmt in for_parents: # For really simple for loops we can predict the order. Otherwise # we just ignore it. parent = for_stmt.parent if parent.type == 'suite': parent = parent.parent if for_stmt.type == 'for_stmt' and parent == self.tree_node \ and parser_utils.for_stmt_defines_one_name(for_stmt): # Simplicity for now. if for_stmt == last_for_stmt: yields_order[-1][1].append(yield_) else: yields_order.append((for_stmt, [yield_])) elif for_stmt == self.tree_node: yields_order.append((None, [yield_])) else: types = self.get_return_values(check_yields=True) if types: yield LazyKnownValues(types) return last_for_stmt = for_stmt for for_stmt, yields in yields_order: if for_stmt is None: # No for_stmt, just normal yields. for yield_ in yields: for result in self._get_yield_lazy_value(yield_): yield result else: input_node = for_stmt.get_testlist() cn = ContextualizedNode(self, input_node) ordered = cn.infer().iterate(cn) ordered = list(ordered) for lazy_value in ordered: dct = {str(for_stmt.children[1].value): lazy_value.infer()} with self.predefine_names(for_stmt, dct): for yield_in_same_for_stmt in yields: for result in self._get_yield_lazy_value(yield_in_same_for_stmt): yield result def merge_yield_values(self, is_async=False): return ValueSet.from_sets( lazy_value.infer() for lazy_value in self.get_yield_lazy_values() ) def infer(self): """ Created to be used by inheritance. """ inference_state = self.inference_state is_coroutine = self.tree_node.parent.type in ('async_stmt', 'async_funcdef') is_generator = bool(get_yield_exprs(inference_state, self.tree_node)) from jedi.inference.gradual.base import GenericClass if is_coroutine: if is_generator: if inference_state.environment.version_info < (3, 6): return NO_VALUES async_generator_classes = inference_state.typing_module \ .py__getattribute__('AsyncGenerator') yield_values = self.merge_yield_values(is_async=True) # The contravariant doesn't seem to be defined. generics = (yield_values.py__class__(), NO_VALUES) return ValueSet( # In Python 3.6 AsyncGenerator is still a class. GenericClass(c, TupleGenericManager(generics)) for c in async_generator_classes ).execute_annotation() else: if inference_state.environment.version_info < (3, 5): return NO_VALUES async_classes = inference_state.typing_module.py__getattribute__('Coroutine') return_values = self.get_return_values() # Only the first generic is relevant. generics = (return_values.py__class__(), NO_VALUES, NO_VALUES) return ValueSet( GenericClass(c, TupleGenericManager(generics)) for c in async_classes ).execute_annotation() else: if is_generator: return ValueSet([iterable.Generator(inference_state, self)]) else: return self.get_return_values() class FunctionExecutionContext(BaseFunctionExecutionContext): def __init__(self, function_value, arguments): super(FunctionExecutionContext, self).__init__(function_value) self._arguments = arguments def get_filters(self, until_position=None, origin_scope=None): yield FunctionExecutionFilter( self, self._value, until_position=until_position, origin_scope=origin_scope, arguments=self._arguments ) def _infer_annotations(self): from jedi.inference.gradual.annotation import infer_return_types return infer_return_types(self._value, self._arguments) def get_param_names(self): return [ ParamName(self._value, param.name, self._arguments) for param in self._value.tree_node.get_params() ] class AnonymousFunctionExecution(BaseFunctionExecutionContext): def _infer_annotations(self): # I don't think inferring anonymous executions is a big thing. # Anonymous contexts are mostly there for the user to work in. ~ dave return NO_VALUES def get_filters(self, until_position=None, origin_scope=None): yield AnonymousFunctionExecutionFilter( self, self._value, until_position=until_position, origin_scope=origin_scope, ) def get_param_names(self): return self._value.get_param_names() class OverloadedFunctionValue(FunctionMixin, ValueWrapper): def __init__(self, function, overloaded_functions): super(OverloadedFunctionValue, self).__init__(function) self._overloaded_functions = overloaded_functions def py__call__(self, arguments): debug.dbg("Execute overloaded function %s", self._wrapped_value, color='BLUE') function_executions = [] for signature in self.get_signatures(): function_execution = signature.value.as_context(arguments) function_executions.append(function_execution) if signature.matches_signature(arguments): return function_execution.infer() if self.inference_state.is_analysis: # In this case we want precision. return NO_VALUES return ValueSet.from_sets(fe.infer() for fe in function_executions) def get_signature_functions(self): return self._overloaded_functions def _find_overload_functions(context, tree_node): def _is_overload_decorated(funcdef): if funcdef.parent.type == 'decorated': decorators = funcdef.parent.children[0] if decorators.type == 'decorator': decorators = [decorators] else: decorators = decorators.children for decorator in decorators: dotted_name = decorator.children[1] if dotted_name.type == 'name' and dotted_name.value == 'overload': # TODO check with values if it's the right overload return True return False if tree_node.type == 'lambdef': return if _is_overload_decorated(tree_node): yield tree_node while True: filter = ParserTreeFilter( context, until_position=tree_node.start_pos ) names = filter.get(tree_node.name.value) assert isinstance(names, list) if not names: break found = False for name in names: funcdef = name.tree_name.parent if funcdef.type == 'funcdef' and _is_overload_decorated(funcdef): tree_node = funcdef found = True yield funcdef if not found: break jedi-0.15.2/jedi/inference/value/__init__.py0000664000175000017500000000046713577124112020504 0ustar davedave00000000000000from jedi.inference.value.module import ModuleValue from jedi.inference.value.klass import ClassValue from jedi.inference.value.function import FunctionValue, \ MethodValue from jedi.inference.value.instance import AnonymousInstance, BoundMethod, \ CompiledInstance, AbstractInstanceValue, TreeInstance jedi-0.15.2/jedi/inference/value/namespace.py0000664000175000017500000000411613577124112020674 0ustar davedave00000000000000from jedi.inference.cache import inference_state_method_cache from jedi.inference.filters import DictFilter from jedi.inference.names import ValueNameMixin, AbstractNameDefinition from jedi.inference.base_value import Value from jedi.inference.value.module import SubModuleDictMixin from jedi.inference.context import NamespaceContext class ImplicitNSName(ValueNameMixin, AbstractNameDefinition): """ Accessing names for implicit namespace packages should infer to nothing. This object will prevent Jedi from raising exceptions """ def __init__(self, implicit_ns_value, string_name): self._value = implicit_ns_value self.string_name = string_name class ImplicitNamespaceValue(Value, SubModuleDictMixin): """ Provides support for implicit namespace packages """ # Is a module like every other module, because if you import an empty # folder foobar it will be available as an object: # . api_type = u'module' parent_context = None def __init__(self, inference_state, fullname, paths): super(ImplicitNamespaceValue, self).__init__(inference_state, parent_context=None) self.inference_state = inference_state self._fullname = fullname self._paths = paths def get_filters(self, origin_scope=None): yield DictFilter(self.sub_modules_dict()) @property @inference_state_method_cache() def name(self): string_name = self.py__package__()[-1] return ImplicitNSName(self, string_name) def py__file__(self): return None def py__package__(self): """Return the fullname """ return self._fullname.split('.') def py__path__(self): return self._paths def py__name__(self): return self._fullname def is_namespace(self): return True def is_stub(self): return False def is_package(self): return True def as_context(self): return NamespaceContext(self) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._fullname) jedi-0.15.2/jedi/inference/value/decorator.py0000664000175000017500000000066213577124112020724 0ustar davedave00000000000000''' Decorators are not really values, however we need some wrappers to improve docstrings and other things around decorators. ''' from jedi.inference.base_value import ValueWrapper class Decoratee(ValueWrapper): def __init__(self, wrapped_value, original_value): self._wrapped_value = wrapped_value self._original_value = original_value def py__doc__(self): return self._original_value.py__doc__() jedi-0.15.2/jedi/inference/value/iterable.py0000664000175000017500000005626713577124112020545 0ustar davedave00000000000000""" Contains all classes and functions to deal with lists, dicts, generators and iterators in general. """ import sys from jedi._compatibility import force_unicode, is_py3 from jedi.inference import compiled from jedi.inference import analysis from jedi.inference.lazy_value import LazyKnownValue, LazyKnownValues, \ LazyTreeValue from jedi.inference.helpers import get_int_or_none, is_string, \ reraise_getitem_errors, SimpleGetItemNotFound from jedi.inference.utils import safe_property, to_list from jedi.inference.cache import inference_state_method_cache from jedi.inference.filters import LazyAttributeOverwrite, publish_method from jedi.inference.base_value import ValueSet, Value, NO_VALUES, \ ContextualizedNode, iterate_values, sentinel, \ LazyValueWrapper from jedi.parser_utils import get_sync_comp_fors from jedi.inference.context import CompForContext from jedi.inference.value.dynamic_arrays import check_array_additions class IterableMixin(object): def py__stop_iteration_returns(self): return ValueSet([compiled.builtin_from_name(self.inference_state, u'None')]) # At the moment, safe values are simple values like "foo", 1 and not # lists/dicts. Therefore as a small speed optimization we can just do the # default instead of resolving the lazy wrapped values, that are just # doing this in the end as well. # This mostly speeds up patterns like `sys.version_info >= (3, 0)` in # typeshed. if sys.version_info[0] == 2: # Python 2........... def get_safe_value(self, default=sentinel): if default is sentinel: raise ValueError("There exists no safe value for value %s" % self) return default else: get_safe_value = Value.get_safe_value class GeneratorBase(LazyAttributeOverwrite, IterableMixin): array_type = None def _get_wrapped_value(self): generator, = self.inference_state.typing_module \ .py__getattribute__('Generator') \ .execute_annotation() return generator def is_instance(self): return False def py__bool__(self): return True @publish_method('__iter__') def py__iter__(self, contextualized_node=None): return ValueSet([self]) @publish_method('send') @publish_method('next', python_version_match=2) @publish_method('__next__', python_version_match=3) def py__next__(self): return ValueSet.from_sets(lazy_value.infer() for lazy_value in self.py__iter__()) def py__stop_iteration_returns(self): return ValueSet([compiled.builtin_from_name(self.inference_state, u'None')]) @property def name(self): return compiled.CompiledValueName(self, 'Generator') class Generator(GeneratorBase): """Handling of `yield` functions.""" def __init__(self, inference_state, func_execution_context): super(Generator, self).__init__(inference_state) self._func_execution_context = func_execution_context def py__iter__(self, contextualized_node=None): return self._func_execution_context.get_yield_lazy_values() def py__stop_iteration_returns(self): return self._func_execution_context.get_return_values() def __repr__(self): return "<%s of %s>" % (type(self).__name__, self._func_execution_context) def comprehension_from_atom(inference_state, value, atom): bracket = atom.children[0] test_list_comp = atom.children[1] if bracket == '{': if atom.children[1].children[1] == ':': sync_comp_for = test_list_comp.children[3] if sync_comp_for.type == 'comp_for': sync_comp_for = sync_comp_for.children[1] return DictComprehension( inference_state, value, sync_comp_for_node=sync_comp_for, key_node=test_list_comp.children[0], value_node=test_list_comp.children[2], ) else: cls = SetComprehension elif bracket == '(': cls = GeneratorComprehension elif bracket == '[': cls = ListComprehension sync_comp_for = test_list_comp.children[1] if sync_comp_for.type == 'comp_for': sync_comp_for = sync_comp_for.children[1] return cls( inference_state, defining_context=value, sync_comp_for_node=sync_comp_for, entry_node=test_list_comp.children[0], ) class ComprehensionMixin(object): @inference_state_method_cache() def _get_comp_for_context(self, parent_context, comp_for): return CompForContext(parent_context, comp_for) def _nested(self, comp_fors, parent_context=None): comp_for = comp_fors[0] is_async = comp_for.parent.type == 'comp_for' input_node = comp_for.children[3] parent_context = parent_context or self._defining_context input_types = parent_context.infer_node(input_node) # TODO: simulate await if self.is_async cn = ContextualizedNode(parent_context, input_node) iterated = input_types.iterate(cn, is_async=is_async) exprlist = comp_for.children[1] for i, lazy_value in enumerate(iterated): types = lazy_value.infer() dct = unpack_tuple_to_dict(parent_context, types, exprlist) context = self._get_comp_for_context( parent_context, comp_for, ) with context.predefine_names(comp_for, dct): try: for result in self._nested(comp_fors[1:], context): yield result except IndexError: iterated = context.infer_node(self._entry_node) if self.array_type == 'dict': yield iterated, context.infer_node(self._value_node) else: yield iterated @inference_state_method_cache(default=[]) @to_list def _iterate(self): comp_fors = tuple(get_sync_comp_fors(self._sync_comp_for_node)) for result in self._nested(comp_fors): yield result def py__iter__(self, contextualized_node=None): for set_ in self._iterate(): yield LazyKnownValues(set_) def __repr__(self): return "<%s of %s>" % (type(self).__name__, self._sync_comp_for_node) class _DictMixin(object): def _get_generics(self): return tuple(c_set.py__class__() for c_set in self.get_mapping_item_values()) class Sequence(LazyAttributeOverwrite, IterableMixin): api_type = u'instance' @property def name(self): return compiled.CompiledValueName(self, self.array_type) def _get_generics(self): return (self.merge_types_of_iterate().py__class__(),) def _get_wrapped_value(self): from jedi.inference.gradual.base import GenericClass from jedi.inference.gradual.generics import TupleGenericManager klass = compiled.builtin_from_name(self.inference_state, self.array_type) c, = GenericClass( klass, TupleGenericManager(self._get_generics()) ).execute_annotation() return c def py__bool__(self): return None # We don't know the length, because of appends. @safe_property def parent(self): return self.inference_state.builtins_module def py__getitem__(self, index_value_set, contextualized_node): if self.array_type == 'dict': return self._dict_values() return iterate_values(ValueSet([self])) class _BaseComprehension(ComprehensionMixin): def __init__(self, inference_state, defining_context, sync_comp_for_node, entry_node): assert sync_comp_for_node.type == 'sync_comp_for' super(_BaseComprehension, self).__init__(inference_state) self._defining_context = defining_context self._sync_comp_for_node = sync_comp_for_node self._entry_node = entry_node class ListComprehension(_BaseComprehension, Sequence): array_type = u'list' def py__simple_getitem__(self, index): if isinstance(index, slice): return ValueSet([self]) all_types = list(self.py__iter__()) with reraise_getitem_errors(IndexError, TypeError): lazy_value = all_types[index] return lazy_value.infer() class SetComprehension(_BaseComprehension, Sequence): array_type = u'set' class GeneratorComprehension(_BaseComprehension, GeneratorBase): pass class DictComprehension(ComprehensionMixin, Sequence): array_type = u'dict' def __init__(self, inference_state, defining_context, sync_comp_for_node, key_node, value_node): assert sync_comp_for_node.type == 'sync_comp_for' super(DictComprehension, self).__init__(inference_state) self._defining_context = defining_context self._sync_comp_for_node = sync_comp_for_node self._entry_node = key_node self._value_node = value_node def py__iter__(self, contextualized_node=None): for keys, values in self._iterate(): yield LazyKnownValues(keys) def py__simple_getitem__(self, index): for keys, values in self._iterate(): for k in keys: # Be careful in the future if refactoring, index could be a # slice object. if k.get_safe_value(default=object()) == index: return values raise SimpleGetItemNotFound() def _dict_keys(self): return ValueSet.from_sets(keys for keys, values in self._iterate()) def _dict_values(self): return ValueSet.from_sets(values for keys, values in self._iterate()) @publish_method('values') def _imitate_values(self): lazy_value = LazyKnownValues(self._dict_values()) return ValueSet([FakeList(self.inference_state, [lazy_value])]) @publish_method('items') def _imitate_items(self): lazy_values = [ LazyKnownValue( FakeTuple( self.inference_state, [LazyKnownValues(key), LazyKnownValues(value)] ) ) for key, value in self._iterate() ] return ValueSet([FakeList(self.inference_state, lazy_values)]) def get_mapping_item_values(self): return self._dict_keys(), self._dict_values() def exact_key_items(self): # NOTE: A smarter thing can probably done here to achieve better # completions, but at least like this jedi doesn't crash return [] class SequenceLiteralValue(Sequence): _TUPLE_LIKE = 'testlist_star_expr', 'testlist', 'subscriptlist' mapping = {'(': u'tuple', '[': u'list', '{': u'set'} def __init__(self, inference_state, defining_context, atom): super(SequenceLiteralValue, self).__init__(inference_state) self.atom = atom self._defining_context = defining_context if self.atom.type in self._TUPLE_LIKE: self.array_type = u'tuple' else: self.array_type = SequenceLiteralValue.mapping[atom.children[0]] """The builtin name of the array (list, set, tuple or dict).""" def py__simple_getitem__(self, index): """Here the index is an int/str. Raises IndexError/KeyError.""" if isinstance(index, slice): return ValueSet([self]) else: with reraise_getitem_errors(TypeError, KeyError, IndexError): node = self.get_tree_entries()[index] return self._defining_context.infer_node(node) def py__iter__(self, contextualized_node=None): """ While values returns the possible values for any array field, this function returns the value for a certain index. """ for node in self.get_tree_entries(): if node == ':' or node.type == 'subscript': # TODO this should probably use at least part of the code # of infer_subscript_list. yield LazyKnownValue(Slice(self._defining_context, None, None, None)) else: yield LazyTreeValue(self._defining_context, node) for addition in check_array_additions(self._defining_context, self): yield addition def py__len__(self): # This function is not really used often. It's more of a try. return len(self.get_tree_entries()) def get_tree_entries(self): c = self.atom.children if self.atom.type in self._TUPLE_LIKE: return c[::2] array_node = c[1] if array_node in (']', '}', ')'): return [] # Direct closing bracket, doesn't contain items. if array_node.type == 'testlist_comp': # filter out (for now) pep 448 single-star unpacking return [value for value in array_node.children[::2] if value.type != "star_expr"] elif array_node.type == 'dictorsetmaker': kv = [] iterator = iter(array_node.children) for key in iterator: if key == "**": # dict with pep 448 double-star unpacking # for now ignoring the values imported by ** next(iterator) next(iterator, None) # Possible comma. else: op = next(iterator, None) if op is None or op == ',': if key.type == "star_expr": # pep 448 single-star unpacking # for now ignoring values imported by * pass else: kv.append(key) # A set. else: assert op == ':' # A dict. kv.append((key, next(iterator))) next(iterator, None) # Possible comma. return kv else: if array_node.type == "star_expr": # pep 448 single-star unpacking # for now ignoring values imported by * return [] else: return [array_node] def exact_key_items(self): """ Returns a generator of tuples like dict.items(), where the key is resolved (as a string) and the values are still lazy values. """ for key_node, value in self.get_tree_entries(): for key in self._defining_context.infer_node(key_node): if is_string(key): yield key.get_safe_value(), LazyTreeValue(self._defining_context, value) def __repr__(self): return "<%s of %s>" % (self.__class__.__name__, self.atom) class DictLiteralValue(_DictMixin, SequenceLiteralValue): array_type = u'dict' def __init__(self, inference_state, defining_context, atom): super(SequenceLiteralValue, self).__init__(inference_state) self._defining_context = defining_context self.atom = atom def py__simple_getitem__(self, index): """Here the index is an int/str. Raises IndexError/KeyError.""" compiled_obj_index = compiled.create_simple_object(self.inference_state, index) for key, value in self.get_tree_entries(): for k in self._defining_context.infer_node(key): try: method = k.execute_operation except AttributeError: pass else: if method(compiled_obj_index, u'==').get_safe_value(): return self._defining_context.infer_node(value) raise SimpleGetItemNotFound('No key found in dictionary %s.' % self) def py__iter__(self, contextualized_node=None): """ While values returns the possible values for any array field, this function returns the value for a certain index. """ # Get keys. types = NO_VALUES for k, _ in self.get_tree_entries(): types |= self._defining_context.infer_node(k) # We don't know which dict index comes first, therefore always # yield all the types. for _ in types: yield LazyKnownValues(types) @publish_method('values') def _imitate_values(self): lazy_value = LazyKnownValues(self._dict_values()) return ValueSet([FakeList(self.inference_state, [lazy_value])]) @publish_method('items') def _imitate_items(self): lazy_values = [ LazyKnownValue(FakeTuple( self.inference_state, (LazyTreeValue(self._defining_context, key_node), LazyTreeValue(self._defining_context, value_node)) )) for key_node, value_node in self.get_tree_entries() ] return ValueSet([FakeList(self.inference_state, lazy_values)]) def _dict_values(self): return ValueSet.from_sets( self._defining_context.infer_node(v) for k, v in self.get_tree_entries() ) def _dict_keys(self): return ValueSet.from_sets( self._defining_context.infer_node(k) for k, v in self.get_tree_entries() ) def get_mapping_item_values(self): return self._dict_keys(), self._dict_values() class _FakeSequence(Sequence): def __init__(self, inference_state, lazy_value_list): """ type should be one of "tuple", "list" """ super(_FakeSequence, self).__init__(inference_state) self._lazy_value_list = lazy_value_list def py__simple_getitem__(self, index): if isinstance(index, slice): return ValueSet([self]) with reraise_getitem_errors(IndexError, TypeError): lazy_value = self._lazy_value_list[index] return lazy_value.infer() def py__iter__(self, contextualized_node=None): return self._lazy_value_list def py__bool__(self): return bool(len(self._lazy_value_list)) def __repr__(self): return "<%s of %s>" % (type(self).__name__, self._lazy_value_list) class FakeTuple(_FakeSequence): array_type = u'tuple' class FakeList(_FakeSequence): array_type = u'tuple' class FakeDict(_DictMixin, Sequence): array_type = u'dict' def __init__(self, inference_state, dct): super(FakeDict, self).__init__(inference_state) self._dct = dct def py__iter__(self, contextualized_node=None): for key in self._dct: yield LazyKnownValue(compiled.create_simple_object(self.inference_state, key)) def py__simple_getitem__(self, index): if is_py3 and self.inference_state.environment.version_info.major == 2: # In Python 2 bytes and unicode compare. if isinstance(index, bytes): index_unicode = force_unicode(index) try: return self._dct[index_unicode].infer() except KeyError: pass elif isinstance(index, str): index_bytes = index.encode('utf-8') try: return self._dct[index_bytes].infer() except KeyError: pass with reraise_getitem_errors(KeyError, TypeError): lazy_value = self._dct[index] return lazy_value.infer() @publish_method('values') def _values(self): return ValueSet([FakeTuple( self.inference_state, [LazyKnownValues(self._dict_values())] )]) def _dict_values(self): return ValueSet.from_sets(lazy_value.infer() for lazy_value in self._dct.values()) def _dict_keys(self): return ValueSet.from_sets(lazy_value.infer() for lazy_value in self.py__iter__()) def get_mapping_item_values(self): return self._dict_keys(), self._dict_values() def exact_key_items(self): return self._dct.items() def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._dct) class MergedArray(Sequence): def __init__(self, inference_state, arrays): super(MergedArray, self).__init__(inference_state) self.array_type = arrays[-1].array_type self._arrays = arrays def py__iter__(self, contextualized_node=None): for array in self._arrays: for lazy_value in array.py__iter__(): yield lazy_value def py__simple_getitem__(self, index): return ValueSet.from_sets(lazy_value.infer() for lazy_value in self.py__iter__()) def unpack_tuple_to_dict(value, types, exprlist): """ Unpacking tuple assignments in for statements and expr_stmts. """ if exprlist.type == 'name': return {exprlist.value: types} elif exprlist.type == 'atom' and exprlist.children[0] in ('(', '['): return unpack_tuple_to_dict(value, types, exprlist.children[1]) elif exprlist.type in ('testlist', 'testlist_comp', 'exprlist', 'testlist_star_expr'): dct = {} parts = iter(exprlist.children[::2]) n = 0 for lazy_value in types.iterate(exprlist): n += 1 try: part = next(parts) except StopIteration: # TODO this value is probably not right. analysis.add(value, 'value-error-too-many-values', part, message="ValueError: too many values to unpack (expected %s)" % n) else: dct.update(unpack_tuple_to_dict(value, lazy_value.infer(), part)) has_parts = next(parts, None) if types and has_parts is not None: # TODO this value is probably not right. analysis.add(value, 'value-error-too-few-values', has_parts, message="ValueError: need more than %s values to unpack" % n) return dct elif exprlist.type == 'power' or exprlist.type == 'atom_expr': # Something like ``arr[x], var = ...``. # This is something that is not yet supported, would also be difficult # to write into a dict. return {} elif exprlist.type == 'star_expr': # `a, *b, c = x` type unpackings # Currently we're not supporting them. return {} raise NotImplementedError class Slice(LazyValueWrapper): def __init__(self, python_context, start, stop, step): self.inference_state = python_context.inference_state self._context = python_context # All of them are either a Precedence or None. self._start = start self._stop = stop self._step = step def _get_wrapped_value(self): value = compiled.builtin_from_name(self._context.inference_state, 'slice') slice_value, = value.execute_with_values() return slice_value def get_safe_value(self, default=sentinel): """ Imitate CompiledObject.obj behavior and return a ``builtin.slice()`` object. """ def get(element): if element is None: return None result = self._context.infer_node(element) if len(result) != 1: # For simplicity, we want slices to be clear defined with just # one type. Otherwise we will return an empty slice object. raise IndexError value, = result return get_int_or_none(value) try: return slice(get(self._start), get(self._stop), get(self._step)) except IndexError: return slice(None, None, None) jedi-0.15.2/jedi/inference/value/klass.py0000664000175000017500000003227613577124112020065 0ustar davedave00000000000000""" Like described in the :mod:`parso.python.tree` module, there's a need for an ast like module to represent the states of parsed modules. But now there are also structures in Python that need a little bit more than that. An ``Instance`` for example is only a ``Class`` before it is instantiated. This class represents these cases. So, why is there also a ``Class`` class here? Well, there are decorators and they change classes in Python 3. Representation modules also define "magic methods". Those methods look like ``py__foo__`` and are typically mappable to the Python equivalents ``__call__`` and others. Here's a list: ====================================== ======================================== **Method** **Description** -------------------------------------- ---------------------------------------- py__call__(arguments: Array) On callable objects, returns types. py__bool__() Returns True/False/None; None means that there's no certainty. py__bases__() Returns a list of base classes. py__iter__() Returns a generator of a set of types. py__class__() Returns the class of an instance. py__simple_getitem__(index: int/str) Returns a a set of types of the index. Can raise an IndexError/KeyError. py__getitem__(indexes: ValueSet) Returns a a set of types of the index. py__file__() Only on modules. Returns None if does not exist. py__package__() -> List[str] Only on modules. For the import system. py__path__() Only on modules. For the import system. py__get__(call_object) Only on instances. Simulates descriptors. py__doc__() Returns the docstring for a value. ====================================== ======================================== """ from jedi import debug from jedi._compatibility import use_metaclass from jedi.parser_utils import get_cached_parent_scope from jedi.inference.cache import inference_state_method_cache, CachedMetaClass, \ inference_state_method_generator_cache from jedi.inference import compiled from jedi.inference.lazy_value import LazyKnownValues from jedi.inference.filters import ParserTreeFilter from jedi.inference.names import TreeNameDefinition, ValueName from jedi.inference.arguments import unpack_arglist, ValuesArguments from jedi.inference.base_value import ValueSet, iterator_to_value_set, \ NO_VALUES from jedi.inference.context import ClassContext from jedi.inference.value.function import FunctionAndClassBase from jedi.inference.gradual.generics import LazyGenericManager, TupleGenericManager from jedi.plugins import plugin_manager class ClassName(TreeNameDefinition): def __init__(self, class_value, tree_name, name_context, apply_decorators): super(ClassName, self).__init__(name_context, tree_name) self._apply_decorators = apply_decorators self._class_value = class_value @iterator_to_value_set def infer(self): # We're using a different value to infer, so we cannot call super(). from jedi.inference.syntax_tree import tree_name_to_values inferred = tree_name_to_values( self.parent_context.inference_state, self.parent_context, self.tree_name) for result_value in inferred: if self._apply_decorators: for c in result_value.py__get__(instance=None, class_value=self._class_value): yield c else: yield result_value class ClassFilter(ParserTreeFilter): def __init__(self, class_value, node_context=None, until_position=None, origin_scope=None, is_instance=False): super(ClassFilter, self).__init__( class_value.as_context(), node_context, until_position=until_position, origin_scope=origin_scope, ) self._class_value = class_value self._is_instance = is_instance def _convert_names(self, names): return [ ClassName( class_value=self._class_value, tree_name=name, name_context=self._node_context, apply_decorators=not self._is_instance, ) for name in names ] def _equals_origin_scope(self): node = self._origin_scope while node is not None: if node == self._parser_scope or node == self.parent_context: return True node = get_cached_parent_scope(self._used_names, node) return False def _access_possible(self, name, from_instance=False): # Filter for ClassVar variables # TODO this is not properly done, yet. It just checks for the string # ClassVar in the annotation, which can be quite imprecise. If we # wanted to do this correct, we would have to infer the ClassVar. if not from_instance: expr_stmt = name.get_definition() if expr_stmt is not None and expr_stmt.type == 'expr_stmt': annassign = expr_stmt.children[1] if annassign.type == 'annassign': # TODO this is not proper matching if 'ClassVar' not in annassign.children[1].get_code(): return False # Filter for name mangling of private variables like __foo return not name.value.startswith('__') or name.value.endswith('__') \ or self._equals_origin_scope() def _filter(self, names, from_instance=False): names = super(ClassFilter, self)._filter(names) return [name for name in names if self._access_possible(name, from_instance)] class ClassMixin(object): def is_class(self): return True def py__call__(self, arguments=None): from jedi.inference.value import TreeInstance if arguments is None: arguments = ValuesArguments([]) return ValueSet([TreeInstance(self.inference_state, self.parent_context, self, arguments)]) def py__class__(self): return compiled.builtin_from_name(self.inference_state, u'type') @property def name(self): return ValueName(self, self.tree_node.name) def py__name__(self): return self.name.string_name def get_param_names(self): for value_ in self.py__getattribute__(u'__init__'): if value_.is_function(): return list(value_.get_param_names())[1:] return [] @inference_state_method_generator_cache() def py__mro__(self): mro = [self] yield self # TODO Do a proper mro resolution. Currently we are just listing # classes. However, it's a complicated algorithm. for lazy_cls in self.py__bases__(): # TODO there's multiple different mro paths possible if this yields # multiple possibilities. Could be changed to be more correct. for cls in lazy_cls.infer(): # TODO detect for TypeError: duplicate base class str, # e.g. `class X(str, str): pass` try: mro_method = cls.py__mro__ except AttributeError: # TODO add a TypeError like: """ >>> class Y(lambda: test): pass Traceback (most recent call last): File "", line 1, in TypeError: function() argument 1 must be code, not str >>> class Y(1): pass Traceback (most recent call last): File "", line 1, in TypeError: int() takes at most 2 arguments (3 given) """ debug.warning('Super class of %s is not a class: %s', self, cls) else: for cls_new in mro_method(): if cls_new not in mro: mro.append(cls_new) yield cls_new def get_filters(self, origin_scope=None, is_instance=False): metaclasses = self.get_metaclasses() if metaclasses: for f in self.get_metaclass_filters(metaclasses): yield f for cls in self.py__mro__(): if isinstance(cls, compiled.CompiledObject): for filter in cls.get_filters(is_instance=is_instance): yield filter else: yield ClassFilter( self, node_context=cls.as_context(), origin_scope=origin_scope, is_instance=is_instance ) if not is_instance: from jedi.inference.compiled import builtin_from_name type_ = builtin_from_name(self.inference_state, u'type') assert isinstance(type_, ClassValue) if type_ != self: for instance in type_.py__call__(): instance_filters = instance.get_filters() # Filter out self filters next(instance_filters) next(instance_filters) yield next(instance_filters) def get_signatures(self): init_funcs = self.py__call__().py__getattribute__('__init__') return [sig.bind(self) for sig in init_funcs.get_signatures()] def _as_context(self): return ClassContext(self) class ClassValue(use_metaclass(CachedMetaClass, ClassMixin, FunctionAndClassBase)): api_type = u'class' @inference_state_method_cache() def list_type_vars(self): found = [] arglist = self.tree_node.get_super_arglist() if arglist is None: return [] for stars, node in unpack_arglist(arglist): if stars: continue # These are not relevant for this search. from jedi.inference.gradual.annotation import find_unknown_type_vars for type_var in find_unknown_type_vars(self.parent_context, node): if type_var not in found: # The order matters and it's therefore a list. found.append(type_var) return found def _get_bases_arguments(self): arglist = self.tree_node.get_super_arglist() if arglist: from jedi.inference import arguments return arguments.TreeArguments(self.inference_state, self.parent_context, arglist) return None @inference_state_method_cache(default=()) def py__bases__(self): args = self._get_bases_arguments() if args is not None: lst = [value for key, value in args.unpack() if key is None] if lst: return lst if self.py__name__() == 'object' \ and self.parent_context.is_builtins_module(): return [] return [LazyKnownValues( self.inference_state.builtins_module.py__getattribute__('object') )] def py__getitem__(self, index_value_set, contextualized_node): from jedi.inference.gradual.base import GenericClass if not index_value_set: return ValueSet([self]) return ValueSet( GenericClass( self, LazyGenericManager( context_of_index=contextualized_node.context, index_value=index_value, ) ) for index_value in index_value_set ) def define_generics(self, type_var_dict): from jedi.inference.gradual.base import GenericClass def remap_type_vars(): """ The TypeVars in the resulting classes have sometimes different names and we need to check for that, e.g. a signature can be: def iter(iterable: Iterable[_T]) -> Iterator[_T]: ... However, the iterator is defined as Iterator[_T_co], which means it has a different type var name. """ for type_var in self.list_type_vars(): yield type_var_dict.get(type_var.py__name__(), NO_VALUES) if type_var_dict: return ValueSet([GenericClass( self, TupleGenericManager(tuple(remap_type_vars())) )]) return ValueSet({self}) @plugin_manager.decorate() def get_metaclass_filters(self, metaclass): debug.dbg('Unprocessed metaclass %s', metaclass) return [] @inference_state_method_cache(default=NO_VALUES) def get_metaclasses(self): args = self._get_bases_arguments() if args is not None: m = [value for key, value in args.unpack() if key == 'metaclass'] metaclasses = ValueSet.from_sets(lazy_value.infer() for lazy_value in m) metaclasses = ValueSet(m for m in metaclasses if m.is_class()) if metaclasses: return metaclasses for lazy_base in self.py__bases__(): for value in lazy_base.infer(): if value.is_class(): values = value.get_metaclasses() if values: return values return NO_VALUES jedi-0.15.2/jedi/inference/value/instance.py0000664000175000017500000005261413577124112020552 0ustar davedave00000000000000from abc import abstractproperty from parso.python.tree import search_ancestor from jedi import debug from jedi import settings from jedi.inference import compiled from jedi.inference.compiled.value import CompiledObjectFilter from jedi.inference.helpers import values_from_qualified_names from jedi.inference.filters import AbstractFilter, AnonymousFunctionExecutionFilter from jedi.inference.names import ValueName, TreeNameDefinition, ParamName from jedi.inference.base_value import Value, NO_VALUES, ValueSet, \ iterator_to_value_set, ValueWrapper from jedi.inference.lazy_value import LazyKnownValue, LazyKnownValues from jedi.inference.cache import inference_state_method_cache from jedi.inference.arguments import ValuesArguments, TreeArgumentsWrapper from jedi.inference.value.function import \ FunctionValue, FunctionMixin, OverloadedFunctionValue, \ BaseFunctionExecutionContext, FunctionExecutionContext from jedi.inference.value.klass import ClassFilter from jedi.inference.value.dynamic_arrays import get_dynamic_array_instance class InstanceExecutedParamName(ParamName): def __init__(self, instance, function_value, tree_name): super(InstanceExecutedParamName, self).__init__( function_value, tree_name, arguments=None) self._instance = instance def infer(self): return ValueSet([self._instance]) def matches_signature(self): return True class AnonymousMethodExecutionFilter(AnonymousFunctionExecutionFilter): def __init__(self, instance, *args, **kwargs): super(AnonymousMethodExecutionFilter, self).__init__(*args, **kwargs) self._instance = instance def _convert_param(self, param, name): if param.position_index == 0: return InstanceExecutedParamName(self._instance, self._function_value, name) return super(AnonymousMethodExecutionFilter, self)._convert_param(param, name) class AnonymousMethodExecutionContext(BaseFunctionExecutionContext): def __init__(self, instance, value): super(AnonymousMethodExecutionContext, self).__init__(value) self.instance = instance def get_filters(self, until_position=None, origin_scope=None): yield AnonymousMethodExecutionFilter( self.instance, self, self._value, until_position=until_position, origin_scope=origin_scope, ) def get_param_names(self): param_names = list(self._value.get_param_names()) # set the self name param_names[0] = InstanceExecutedParamName( self.instance, self._function_value, param_names[0].tree_name ) return param_names class MethodExecutionContext(FunctionExecutionContext): def __init__(self, instance, *args, **kwargs): super(MethodExecutionContext, self).__init__(*args, **kwargs) self.instance = instance class AbstractInstanceValue(Value): api_type = u'instance' def __init__(self, inference_state, parent_context, class_value): super(AbstractInstanceValue, self).__init__(inference_state, parent_context) # Generated instances are classes that are just generated by self # (No arguments) used. self.class_value = class_value def is_instance(self): return True def get_qualified_names(self): return self.class_value.get_qualified_names() def get_annotated_class_object(self): return self.class_value # This is the default. def py__class__(self): return self.class_value def py__bool__(self): # Signalize that we don't know about the bool type. return None @abstractproperty def name(self): raise NotImplementedError def get_signatures(self): call_funcs = self.py__getattribute__('__call__').py__get__(self, self.class_value) return [s.bind(self) for s in call_funcs.get_signatures()] def get_function_slot_names(self, name): # Searches for Python functions in classes. return [] def execute_function_slots(self, names, *inferred_args): return ValueSet.from_sets( name.infer().execute_with_values(*inferred_args) for name in names ) def __repr__(self): return "<%s of %s>" % (self.__class__.__name__, self.class_value) class CompiledInstance(AbstractInstanceValue): # This is not really a compiled class, it's just an instance from a # compiled class. def __init__(self, inference_state, parent_context, class_value, arguments): super(CompiledInstance, self).__init__(inference_state, parent_context, class_value) self._arguments = arguments def get_filters(self, origin_scope=None, include_self_names=True): class_value = self.get_annotated_class_object() class_filters = class_value.get_filters( origin_scope=origin_scope, is_instance=True, ) for f in class_filters: yield CompiledInstanceClassFilter(self, f) @property def name(self): return compiled.CompiledValueName(self, self.class_value.name.string_name) def is_stub(self): return False class _BaseTreeInstance(AbstractInstanceValue): @property def array_type(self): name = self.class_value.py__name__() if name in ['list', 'set', 'dict'] \ and self.parent_context.get_root_context().is_builtins_module(): return name return None @property def name(self): return ValueName(self, self.class_value.name.tree_name) def get_filters(self, origin_scope=None, include_self_names=True): class_value = self.get_annotated_class_object() if include_self_names: for cls in class_value.py__mro__(): if not cls.is_compiled(): # In this case we're excluding compiled objects that are # not fake objects. It doesn't make sense for normal # compiled objects to search for self variables. yield SelfAttributeFilter(self, class_value, cls.as_context(), origin_scope) class_filters = class_value.get_filters( origin_scope=origin_scope, is_instance=True, ) for f in class_filters: if isinstance(f, ClassFilter): yield InstanceClassFilter(self, f) elif isinstance(f, CompiledObjectFilter): yield CompiledInstanceClassFilter(self, f) else: # Propably from the metaclass. yield f def _get_annotation_init_functions(self): filter = next(self.class_value.get_filters()) for init_name in filter.get('__init__'): for init in init_name.infer(): if init.is_function(): for signature in init.get_signatures(): yield signature.value @inference_state_method_cache() def create_instance_context(self, class_context, node): new = node while True: func_node = new new = search_ancestor(new, 'funcdef', 'classdef') if class_context.tree_node is new: func = FunctionValue.from_context(class_context, func_node) bound_method = BoundMethod(self, func) if func_node.name.value == '__init__': context = bound_method.as_context(self._arguments) else: context = bound_method.as_context() break return context.create_context(node) def py__getattribute__alternatives(self, string_name): ''' Since nothing was inferred, now check the __getattr__ and __getattribute__ methods. Stubs don't need to be checked, because they don't contain any logic. ''' if self.is_stub(): return NO_VALUES name = compiled.create_simple_object(self.inference_state, string_name) # This is a little bit special. `__getattribute__` is in Python # executed before `__getattr__`. But: I know no use case, where # this could be practical and where Jedi would return wrong types. # If you ever find something, let me know! # We are inversing this, because a hand-crafted `__getattribute__` # could still call another hand-crafted `__getattr__`, but not the # other way around. names = (self.get_function_slot_names(u'__getattr__') or self.get_function_slot_names(u'__getattribute__')) return self.execute_function_slots(names, name) def py__getitem__(self, index_value_set, contextualized_node): names = self.get_function_slot_names(u'__getitem__') if not names: return super(AbstractInstanceValue, self).py__getitem__( index_value_set, contextualized_node, ) args = ValuesArguments([index_value_set]) return ValueSet.from_sets(name.infer().execute(args) for name in names) def py__iter__(self, contextualized_node=None): iter_slot_names = self.get_function_slot_names(u'__iter__') if not iter_slot_names: return super(AbstractInstanceValue, self).py__iter__(contextualized_node) def iterate(): for generator in self.execute_function_slots(iter_slot_names): if generator.is_instance() and not generator.is_compiled(): # `__next__` logic. if self.inference_state.environment.version_info.major == 2: name = u'next' else: name = u'__next__' next_slot_names = generator.get_function_slot_names(name) if next_slot_names: yield LazyKnownValues( generator.execute_function_slots(next_slot_names) ) else: debug.warning('Instance has no __next__ function in %s.', generator) else: for lazy_value in generator.py__iter__(): yield lazy_value return iterate() def py__call__(self, arguments): names = self.get_function_slot_names(u'__call__') if not names: # Means the Instance is not callable. return super(AbstractInstanceValue, self).py__call__(arguments) return ValueSet.from_sets(name.infer().execute(arguments) for name in names) def py__get__(self, instance, class_value): """ obj may be None. """ # Arguments in __get__ descriptors are obj, class. # `method` is the new parent of the array, don't know if that's good. names = self.get_function_slot_names(u'__get__') if names: if instance is None: instance = compiled.builtin_from_name(self.inference_state, u'None') return self.execute_function_slots(names, instance, class_value) else: return ValueSet([self]) def get_function_slot_names(self, name): # Python classes don't look at the dictionary of the instance when # looking up `__call__`. This is something that has to do with Python's # internal slot system (note: not __slots__, but C slots). for filter in self.get_filters(include_self_names=False): names = filter.get(name) if names: return names return [] class TreeInstance(_BaseTreeInstance): def __init__(self, inference_state, parent_context, class_value, arguments): # I don't think that dynamic append lookups should happen here. That # sounds more like something that should go to py__iter__. if class_value.py__name__() in ['list', 'set'] \ and parent_context.get_root_context().is_builtins_module(): # compare the module path with the builtin name. if settings.dynamic_array_additions: arguments = get_dynamic_array_instance(self, arguments) super(_BaseTreeInstance, self).__init__(inference_state, parent_context, class_value) self._arguments = arguments self.tree_node = class_value.tree_node # This can recurse, if the initialization of the class includes a reference # to itself. @inference_state_method_cache(default=None) def _get_annotated_class_object(self): from jedi.inference.gradual.annotation import py__annotations__, \ infer_type_vars_for_execution args = InstanceArguments(self, self._arguments) for signature in self.class_value.py__getattribute__('__init__').get_signatures(): # Just take the first result, it should always be one, because we # control the typeshed code. if not signature.matches_signature(args) \ or signature.value.tree_node is None: # First check if the signature even matches, if not we don't # need to infer anything. continue bound_method = BoundMethod(self, signature.value) all_annotations = py__annotations__(signature.value.tree_node) type_var_dict = infer_type_vars_for_execution(bound_method, args, all_annotations) if type_var_dict: defined, = self.class_value.define_generics( infer_type_vars_for_execution(signature.value, args, all_annotations), ) debug.dbg('Inferred instance value as %s', defined, color='BLUE') return defined return None def get_annotated_class_object(self): return self._get_annotated_class_object() or self.class_value def py__simple_getitem__(self, index): if self.array_type == 'dict': # Logic for dict({'foo': bar}) and dict(foo=bar) # reversed, because: # >>> dict({'a': 1}, a=3) # {'a': 3} # TODO tuple initializations # >>> dict([('a', 4)]) # {'a': 4} for key, lazy_context in reversed(list(self._arguments.unpack())): if key is None: values = ValueSet.from_sets( dct_value.py__simple_getitem__(index) for dct_value in lazy_context.infer() if dct_value.array_type == 'dict' ) if values: return values else: if key == index: return lazy_context.infer() return super(TreeInstance, self).py__simple_getitem__(index) def __repr__(self): return "<%s of %s(%s)>" % (self.__class__.__name__, self.class_value, self._arguments) class AnonymousInstance(_BaseTreeInstance): _arguments = None class CompiledInstanceName(compiled.CompiledName): def __init__(self, inference_state, instance, klass, name): super(CompiledInstanceName, self).__init__( inference_state, klass.parent_context, name.string_name ) self._instance = instance self._class_member_name = name @iterator_to_value_set def infer(self): for result_value in self._class_member_name.infer(): if result_value.api_type == 'function': yield CompiledBoundMethod(result_value) else: yield result_value class CompiledInstanceClassFilter(AbstractFilter): def __init__(self, instance, f): self._instance = instance self._class_filter = f def get(self, name): return self._convert(self._class_filter.get(name)) def values(self): return self._convert(self._class_filter.values()) def _convert(self, names): klass = self._class_filter.compiled_object return [ CompiledInstanceName(self._instance.inference_state, self._instance, klass, n) for n in names ] class BoundMethod(FunctionMixin, ValueWrapper): def __init__(self, instance, function): super(BoundMethod, self).__init__(function) self.instance = instance def is_bound_method(self): return True def py__class__(self): c, = values_from_qualified_names(self.inference_state, u'types', u'MethodType') return c def _get_arguments(self, arguments): assert arguments is not None return InstanceArguments(self.instance, arguments) def _as_context(self, arguments=None): if arguments is None: return AnonymousMethodExecutionContext(self.instance, self) arguments = self._get_arguments(arguments) return MethodExecutionContext(self.instance, self, arguments) def py__call__(self, arguments): if isinstance(self._wrapped_value, OverloadedFunctionValue): return self._wrapped_value.py__call__(self._get_arguments(arguments)) function_execution = self.as_context(arguments) return function_execution.infer() def get_signature_functions(self): return [ BoundMethod(self.instance, f) for f in self._wrapped_value.get_signature_functions() ] def get_signatures(self): return [sig.bind(self) for sig in super(BoundMethod, self).get_signatures()] def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._wrapped_value) class CompiledBoundMethod(ValueWrapper): def is_bound_method(self): return True def get_signatures(self): return [sig.bind(self) for sig in self._wrapped_value.get_signatures()] class SelfName(TreeNameDefinition): """ This name calculates the parent_context lazily. """ def __init__(self, instance, class_context, tree_name): self._instance = instance self.class_context = class_context self.tree_name = tree_name @property def parent_context(self): return self._instance.create_instance_context(self.class_context, self.tree_name) class LazyInstanceClassName(object): def __init__(self, instance, class_member_name): self._instance = instance self._class_member_name = class_member_name @iterator_to_value_set def infer(self): for result_value in self._class_member_name.infer(): for c in result_value.py__get__(self._instance, self._instance.py__class__()): yield c def __getattr__(self, name): return getattr(self._class_member_name, name) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._class_member_name) class InstanceClassFilter(AbstractFilter): """ This filter is special in that it uses the class filter and wraps the resulting names in LazyInstanceClassName. The idea is that the class name filtering can be very flexible and always be reflected in instances. """ def __init__(self, instance, class_filter): self._instance = instance self._class_filter = class_filter def get(self, name): return self._convert(self._class_filter.get(name, from_instance=True)) def values(self): return self._convert(self._class_filter.values(from_instance=True)) def _convert(self, names): return [ LazyInstanceClassName(self._instance, n) for n in names ] def __repr__(self): return '<%s for %s>' % (self.__class__.__name__, self._class_filter) class SelfAttributeFilter(ClassFilter): """ This class basically filters all the use cases where `self.*` was assigned. """ def __init__(self, instance, instance_class, node_context, origin_scope): super(SelfAttributeFilter, self).__init__( class_value=instance_class, node_context=node_context, origin_scope=origin_scope, is_instance=True, ) self._instance = instance def _filter(self, names): start, end = self._parser_scope.start_pos, self._parser_scope.end_pos names = [n for n in names if start < n.start_pos < end] return self._filter_self_names(names) def _filter_self_names(self, names): for name in names: trailer = name.parent if trailer.type == 'trailer' \ and len(trailer.parent.children) == 2 \ and trailer.children[0] == '.': if name.is_definition() and self._access_possible(name, from_instance=True): # TODO filter non-self assignments instead of this bad # filter. if self._is_in_right_scope(name): yield name def _is_in_right_scope(self, name): base = name hit_funcdef = False while True: base = search_ancestor(base, 'funcdef', 'classdef', 'lambdef') if base is self._parser_scope: return hit_funcdef hit_funcdef = True def _convert_names(self, names): return [SelfName(self._instance, self._node_context, name) for name in names] def _check_flows(self, names): return names class InstanceArguments(TreeArgumentsWrapper): def __init__(self, instance, arguments): super(InstanceArguments, self).__init__(arguments) self.instance = instance def unpack(self, func=None): yield None, LazyKnownValue(self.instance) for values in self._wrapped_arguments.unpack(func): yield values jedi-0.15.2/jedi/inference/star_args.py0000664000175000017500000001607613577124112017621 0ustar davedave00000000000000""" This module is responsible for inferring *args and **kwargs for signatures. This means for example in this case:: def foo(a, b, c): ... def bar(*args): return foo(1, *args) The signature here for bar should be `bar(b, c)` instead of bar(*args). """ from jedi._compatibility import Parameter from jedi.inference.utils import to_list from jedi.inference.names import ParamNameWrapper def _iter_nodes_for_param(param_name): from parso.python.tree import search_ancestor from jedi.inference.arguments import TreeArguments execution_context = param_name.parent_context function_node = execution_context.tree_node module_node = function_node.get_root_node() start = function_node.children[-1].start_pos end = function_node.children[-1].end_pos for name in module_node.get_used_names().get(param_name.string_name): if start <= name.start_pos < end: # Is used in the function argument = name.parent if argument.type == 'argument' \ and argument.children[0] == '*' * param_name.star_count: # No support for Python <= 3.4 here, but they are end-of-life # anyway trailer = search_ancestor(argument, 'trailer') if trailer is not None: # Make sure we're in a function context = execution_context.create_context(trailer) if _goes_to_param_name(param_name, context, name): values = _to_callables(context, trailer) args = TreeArguments.create_cached( execution_context.inference_state, context=context, argument_node=trailer.children[1], trailer=trailer, ) for c in values: yield c, args def _goes_to_param_name(param_name, context, potential_name): if potential_name.type != 'name': return False from jedi.inference.names import TreeNameDefinition found = TreeNameDefinition(context, potential_name).goto() return any(param_name.parent_context == p.parent_context and param_name.start_pos == p.start_pos for p in found) def _to_callables(context, trailer): from jedi.inference.syntax_tree import infer_trailer atom_expr = trailer.parent index = atom_expr.children[0] == 'await' # Infer atom first values = context.infer_node(atom_expr.children[index]) for trailer2 in atom_expr.children[index + 1:]: if trailer == trailer2: break values = infer_trailer(context, values, trailer2) return values def _remove_given_params(arguments, param_names): count = 0 used_keys = set() for key, _ in arguments.unpack(): if key is None: count += 1 else: used_keys.add(key) for p in param_names: if count and p.maybe_positional_argument(): count -= 1 continue if p.string_name in used_keys and p.maybe_keyword_argument(): continue yield p @to_list def process_params(param_names, star_count=3): # default means both * and ** used_names = set() arg_callables = [] kwarg_callables = [] kw_only_names = [] kwarg_names = [] arg_names = [] original_arg_name = None original_kwarg_name = None for p in param_names: kind = p.get_kind() if kind == Parameter.VAR_POSITIONAL: if star_count & 1: arg_callables = _iter_nodes_for_param(p) original_arg_name = p elif p.get_kind() == Parameter.VAR_KEYWORD: if star_count & 2: kwarg_callables = list(_iter_nodes_for_param(p)) original_kwarg_name = p elif kind == Parameter.KEYWORD_ONLY: if star_count & 2: kw_only_names.append(p) elif kind == Parameter.POSITIONAL_ONLY: if star_count & 1: yield p else: if star_count == 1: yield ParamNameFixedKind(p, Parameter.POSITIONAL_ONLY) elif star_count == 2: kw_only_names.append(ParamNameFixedKind(p, Parameter.KEYWORD_ONLY)) else: used_names.add(p.string_name) yield p longest_param_names = () found_arg_signature = False found_kwarg_signature = False for func_and_argument in arg_callables: func, arguments = func_and_argument new_star_count = star_count if func_and_argument in kwarg_callables: kwarg_callables.remove(func_and_argument) else: new_star_count = 1 for signature in func.get_signatures(): found_arg_signature = True if new_star_count == 3: found_kwarg_signature = True args_for_this_func = [] for p in process_params( list(_remove_given_params( arguments, signature.get_param_names(resolve_stars=False) )), new_star_count): if p.get_kind() == Parameter.VAR_KEYWORD: kwarg_names.append(p) elif p.get_kind() == Parameter.VAR_POSITIONAL: arg_names.append(p) elif p.get_kind() == Parameter.KEYWORD_ONLY: kw_only_names.append(p) else: args_for_this_func.append(p) if len(args_for_this_func) > len(longest_param_names): longest_param_names = args_for_this_func for p in longest_param_names: if star_count == 1 and p.get_kind() != Parameter.VAR_POSITIONAL: yield ParamNameFixedKind(p, Parameter.POSITIONAL_ONLY) else: if p.get_kind() == Parameter.POSITIONAL_OR_KEYWORD: used_names.add(p.string_name) yield p if not found_arg_signature and original_arg_name is not None: yield original_arg_name elif arg_names: yield arg_names[0] for p in kw_only_names: if p.string_name in used_names: continue yield p used_names.add(p.string_name) for func, arguments in kwarg_callables: for signature in func.get_signatures(): found_kwarg_signature = True for p in process_params( list(_remove_given_params( arguments, signature.get_param_names(resolve_stars=False) )), star_count=2): if p.get_kind() != Parameter.KEYWORD_ONLY or not kwarg_names: yield p if not found_kwarg_signature and original_kwarg_name is not None: yield original_kwarg_name elif kwarg_names: yield kwarg_names[0] class ParamNameFixedKind(ParamNameWrapper): def __init__(self, param_name, new_kind): super(ParamNameFixedKind, self).__init__(param_name) self._new_kind = new_kind def get_kind(self): return self._new_kind jedi-0.15.2/jedi/inference/sys_path.py0000664000175000017500000002337013577124112017461 0ustar davedave00000000000000import os from jedi._compatibility import unicode, force_unicode, all_suffixes from jedi.inference.cache import inference_state_method_cache from jedi.inference.base_value import ContextualizedNode from jedi.inference.helpers import is_string, get_str_or_none from jedi.common.utils import traverse_parents from jedi.parser_utils import get_cached_code_lines from jedi.file_io import FileIO from jedi import settings from jedi import debug def _abs_path(module_context, path): if os.path.isabs(path): return path module_path = module_context.py__file__() if module_path is None: # In this case we have no idea where we actually are in the file # system. return None base_dir = os.path.dirname(module_path) path = force_unicode(path) return os.path.abspath(os.path.join(base_dir, path)) def _paths_from_assignment(module_context, expr_stmt): """ Extracts the assigned strings from an assignment that looks as follows:: sys.path[0:0] = ['module/path', 'another/module/path'] This function is in general pretty tolerant (and therefore 'buggy'). However, it's not a big issue usually to add more paths to Jedi's sys_path, because it will only affect Jedi in very random situations and by adding more paths than necessary, it usually benefits the general user. """ for assignee, operator in zip(expr_stmt.children[::2], expr_stmt.children[1::2]): try: assert operator in ['=', '+='] assert assignee.type in ('power', 'atom_expr') and \ len(assignee.children) > 1 c = assignee.children assert c[0].type == 'name' and c[0].value == 'sys' trailer = c[1] assert trailer.children[0] == '.' and trailer.children[1].value == 'path' # TODO Essentially we're not checking details on sys.path # manipulation. Both assigment of the sys.path and changing/adding # parts of the sys.path are the same: They get added to the end of # the current sys.path. """ execution = c[2] assert execution.children[0] == '[' subscript = execution.children[1] assert subscript.type == 'subscript' assert ':' in subscript.children """ except AssertionError: continue cn = ContextualizedNode(module_context.create_context(expr_stmt), expr_stmt) for lazy_value in cn.infer().iterate(cn): for value in lazy_value.infer(): if is_string(value): abs_path = _abs_path(module_context, value.get_safe_value()) if abs_path is not None: yield abs_path def _paths_from_list_modifications(module_context, trailer1, trailer2): """ extract the path from either "sys.path.append" or "sys.path.insert" """ # Guarantee that both are trailers, the first one a name and the second one # a function execution with at least one param. if not (trailer1.type == 'trailer' and trailer1.children[0] == '.' and trailer2.type == 'trailer' and trailer2.children[0] == '(' and len(trailer2.children) == 3): return name = trailer1.children[1].value if name not in ['insert', 'append']: return arg = trailer2.children[1] if name == 'insert' and len(arg.children) in (3, 4): # Possible trailing comma. arg = arg.children[2] for value in module_context.create_context(arg).infer_node(arg): p = get_str_or_none(value) if p is None: continue abs_path = _abs_path(module_context, p) if abs_path is not None: yield abs_path @inference_state_method_cache(default=[]) def check_sys_path_modifications(module_context): """ Detect sys.path modifications within module. """ def get_sys_path_powers(names): for name in names: power = name.parent.parent if power is not None and power.type in ('power', 'atom_expr'): c = power.children if c[0].type == 'name' and c[0].value == 'sys' \ and c[1].type == 'trailer': n = c[1].children[1] if n.type == 'name' and n.value == 'path': yield name, power if module_context.tree_node is None: return [] added = [] try: possible_names = module_context.tree_node.get_used_names()['path'] except KeyError: pass else: for name, power in get_sys_path_powers(possible_names): expr_stmt = power.parent if len(power.children) >= 4: added.extend( _paths_from_list_modifications( module_context, *power.children[2:4] ) ) elif expr_stmt is not None and expr_stmt.type == 'expr_stmt': added.extend(_paths_from_assignment(module_context, expr_stmt)) return added def discover_buildout_paths(inference_state, script_path): buildout_script_paths = set() for buildout_script_path in _get_buildout_script_paths(script_path): for path in _get_paths_from_buildout_script(inference_state, buildout_script_path): buildout_script_paths.add(path) return buildout_script_paths def _get_paths_from_buildout_script(inference_state, buildout_script_path): file_io = FileIO(buildout_script_path) try: module_node = inference_state.parse( file_io=file_io, cache=True, cache_path=settings.cache_directory ) except IOError: debug.warning('Error trying to read buildout_script: %s', buildout_script_path) return from jedi.inference.value import ModuleValue module_context = ModuleValue( inference_state, module_node, file_io, string_names=None, code_lines=get_cached_code_lines(inference_state.grammar, buildout_script_path), ).as_context() for path in check_sys_path_modifications(module_context): yield path def _get_parent_dir_with_file(path, filename): for parent in traverse_parents(path): if os.path.isfile(os.path.join(parent, filename)): return parent return None def _get_buildout_script_paths(search_path): """ if there is a 'buildout.cfg' file in one of the parent directories of the given module it will return a list of all files in the buildout bin directory that look like python files. :param search_path: absolute path to the module. :type search_path: str """ project_root = _get_parent_dir_with_file(search_path, 'buildout.cfg') if not project_root: return bin_path = os.path.join(project_root, 'bin') if not os.path.exists(bin_path): return for filename in os.listdir(bin_path): try: filepath = os.path.join(bin_path, filename) with open(filepath, 'r') as f: firstline = f.readline() if firstline.startswith('#!') and 'python' in firstline: yield filepath except (UnicodeDecodeError, IOError) as e: # Probably a binary file; permission error or race cond. because # file got deleted. Ignore it. debug.warning(unicode(e)) continue def remove_python_path_suffix(path): for suffix in all_suffixes(): if path.endswith(suffix): path = path[:-len(suffix)] break return path def transform_path_to_dotted(sys_path, module_path): """ Returns the dotted path inside a sys.path as a list of names. e.g. >>> from os.path import abspath >>> transform_path_to_dotted([abspath("/foo")], abspath('/foo/bar/baz.py')) (('bar', 'baz'), False) Returns (None, False) if the path doesn't really resolve to anything. The second return part is if it is a package. """ # First remove the suffix. module_path = remove_python_path_suffix(module_path) # Once the suffix was removed we are using the files as we know them. This # means that if someone uses an ending like .vim for a Python file, .vim # will be part of the returned dotted part. is_package = module_path.endswith(os.path.sep + '__init__') if is_package: # -1 to remove the separator module_path = module_path[:-len('__init__') - 1] def iter_potential_solutions(): for p in sys_path: if module_path.startswith(p): # Strip the trailing slash/backslash rest = module_path[len(p):] # On Windows a path can also use a slash. if rest.startswith(os.path.sep) or rest.startswith('/'): # Remove a slash in cases it's still there. rest = rest[1:] if rest: split = rest.split(os.path.sep) if not all(split): # This means that part of the file path was empty, this # is very strange and is probably a file that is called # `.py`. return yield tuple(split) potential_solutions = tuple(iter_potential_solutions()) if not potential_solutions: return None, False # Try to find the shortest path, this makes more sense usually, because the # user usually has venvs somewhere. This means that a path like # .tox/py37/lib/python3.7/os.py can be normal for a file. However in that # case we definitely want to return ['os'] as a path and not a crazy # ['.tox', 'py37', 'lib', 'python3.7', 'os']. Keep in mind that this is a # heuristic and there's now ay to "always" do it right. return sorted(potential_solutions, key=lambda p: len(p))[0], is_package jedi-0.15.2/jedi/inference/signature.py0000664000175000017500000001107513577124112017627 0ustar davedave00000000000000from jedi._compatibility import Parameter from jedi.cache import memoize_method from jedi import debug from jedi import parser_utils class _SignatureMixin(object): def to_string(self): def param_strings(): is_positional = False is_kw_only = False for n in self.get_param_names(resolve_stars=True): kind = n.get_kind() is_positional |= kind == Parameter.POSITIONAL_ONLY if is_positional and kind != Parameter.POSITIONAL_ONLY: yield '/' is_positional = False if kind == Parameter.VAR_POSITIONAL: is_kw_only = True elif kind == Parameter.KEYWORD_ONLY and not is_kw_only: yield '*' is_kw_only = True yield n.to_string() if is_positional: yield '/' s = self.name.string_name + '(' + ', '.join(param_strings()) + ')' annotation = self.annotation_string if annotation: s += ' -> ' + annotation return s class AbstractSignature(_SignatureMixin): def __init__(self, value, is_bound=False): self.value = value self.is_bound = is_bound @property def name(self): return self.value.name @property def annotation_string(self): return '' def get_param_names(self, resolve_stars=False): param_names = self._function_value.get_param_names() if self.is_bound: return param_names[1:] return param_names def bind(self, value): raise NotImplementedError def matches_signature(self, arguments): return True def __repr__(self): if self.value is self._function_value: return '<%s: %s>' % (self.__class__.__name__, self.value) return '<%s: %s, %s>' % (self.__class__.__name__, self.value, self._function_value) class TreeSignature(AbstractSignature): def __init__(self, value, function_value=None, is_bound=False): super(TreeSignature, self).__init__(value, is_bound) self._function_value = function_value or value def bind(self, value): return TreeSignature(value, self._function_value, is_bound=True) @property def _annotation(self): # Classes don't need annotations, even if __init__ has one. They always # return themselves. if self.value.is_class(): return None return self._function_value.tree_node.annotation @property def annotation_string(self): a = self._annotation if a is None: return '' return a.get_code(include_prefix=False) @memoize_method def get_param_names(self, resolve_stars=False): params = super(TreeSignature, self).get_param_names(resolve_stars=False) if resolve_stars: from jedi.inference.star_args import process_params params = process_params(params) return params def matches_signature(self, arguments): from jedi.inference.param import get_executed_param_names_and_issues executed_param_names, issues = \ get_executed_param_names_and_issues(self._function_value, arguments) if issues: return False matches = all(executed_param_name.matches_signature() for executed_param_name in executed_param_names) if debug.enable_notice: tree_node = self._function_value.tree_node signature = parser_utils.get_call_signature(tree_node) if matches: debug.dbg("Overloading match: %s@%s (%s)", signature, tree_node.start_pos[0], arguments, color='BLUE') else: debug.dbg("Overloading no match: %s@%s (%s)", signature, tree_node.start_pos[0], arguments, color='BLUE') return matches class BuiltinSignature(AbstractSignature): def __init__(self, value, return_string, is_bound=False): super(BuiltinSignature, self).__init__(value, is_bound) self._return_string = return_string @property def annotation_string(self): return self._return_string @property def _function_value(self): return self.value def bind(self, value): return BuiltinSignature(value, self._return_string, is_bound=True) class SignatureWrapper(_SignatureMixin): def __init__(self, wrapped_signature): self._wrapped_signature = wrapped_signature def __getattr__(self, name): return getattr(self._wrapped_signature, name) jedi-0.15.2/jedi/inference/imports.py0000664000175000017500000005544113577124112017330 0ustar davedave00000000000000""" :mod:`jedi.inference.imports` is here to resolve import statements and return the modules/classes/functions/whatever, which they stand for. However there's not any actual importing done. This module is about finding modules in the filesystem. This can be quite tricky sometimes, because Python imports are not always that simple. This module uses imp for python up to 3.2 and importlib for python 3.3 on; the correct implementation is delegated to _compatibility. This module also supports import autocompletion, which means to complete statements like ``from datetim`` (cursor at the end would return ``datetime``). """ import os from parso.python import tree from parso.tree import search_ancestor from parso import python_bytes_to_unicode from jedi._compatibility import (FileNotFoundError, ImplicitNSInfo, force_unicode, unicode) from jedi import debug from jedi import settings from jedi.file_io import KnownContentFileIO, FileIO from jedi.parser_utils import get_cached_code_lines from jedi.inference import sys_path from jedi.inference import helpers from jedi.inference import compiled from jedi.inference import analysis from jedi.inference.utils import unite from jedi.inference.cache import inference_state_method_cache from jedi.inference.names import ImportName, SubModuleName from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference.gradual.typeshed import import_module_decorator from jedi.inference.value.module import iter_module_names from jedi.plugins import plugin_manager class ModuleCache(object): def __init__(self): self._path_cache = {} self._name_cache = {} def add(self, string_names, value_set): #path = module.py__file__() #self._path_cache[path] = value_set if string_names is not None: self._name_cache[string_names] = value_set def get(self, string_names): return self._name_cache[string_names] def get_from_path(self, path): return self._path_cache[path] # This memoization is needed, because otherwise we will infinitely loop on # certain imports. @inference_state_method_cache(default=NO_VALUES) def infer_import(context, tree_name): module_context = context.get_root_context() from_import_name, import_path, level, values = \ _prepare_infer_import(module_context, tree_name) if values: if from_import_name is not None: values = values.py__getattribute__( from_import_name, name_context=context, analysis_errors=False ) if not values: path = import_path + (from_import_name,) importer = Importer(context.inference_state, path, module_context, level) values = importer.follow() debug.dbg('after import: %s', values) return values @inference_state_method_cache(default=[]) def goto_import(context, tree_name): module_context = context.get_root_context() from_import_name, import_path, level, values = \ _prepare_infer_import(module_context, tree_name) if not values: return [] if from_import_name is not None: names = unite([ c.goto( from_import_name, name_context=context, analysis_errors=False ) for c in values ]) # Avoid recursion on the same names. if names and not any(n.tree_name is tree_name for n in names): return names path = import_path + (from_import_name,) importer = Importer(context.inference_state, path, module_context, level) values = importer.follow() return set(s.name for s in values) def _prepare_infer_import(module_context, tree_name): import_node = search_ancestor(tree_name, 'import_name', 'import_from') import_path = import_node.get_path_for_name(tree_name) from_import_name = None try: from_names = import_node.get_from_names() except AttributeError: # Is an import_name pass else: if len(from_names) + 1 == len(import_path): # We have to fetch the from_names part first and then check # if from_names exists in the modules. from_import_name = import_path[-1] import_path = from_names importer = Importer(module_context.inference_state, tuple(import_path), module_context, import_node.level) #if import_node.is_nested() and not self.nested_resolve: # scopes = [NestedImportModule(module, import_node)] return from_import_name, tuple(import_path), import_node.level, importer.follow() class NestedImportModule(tree.Module): """ TODO while there's no use case for nested import module right now, we might be able to use them for static analysis checks later on. """ def __init__(self, module, nested_import): self._module = module self._nested_import = nested_import def _get_nested_import_name(self): """ Generates an Import statement, that can be used to fake nested imports. """ i = self._nested_import # This is not an existing Import statement. Therefore, set position to # 0 (0 is not a valid line number). zero = (0, 0) names = [unicode(name) for name in i.namespace_names[1:]] name = helpers.FakeName(names, self._nested_import) new = tree.Import(i._sub_module, zero, zero, name) new.parent = self._module debug.dbg('Generated a nested import: %s', new) return helpers.FakeName(str(i.namespace_names[1]), new) def __getattr__(self, name): return getattr(self._module, name) def __repr__(self): return "<%s: %s of %s>" % (self.__class__.__name__, self._module, self._nested_import) def _add_error(value, name, message): if hasattr(name, 'parent') and value is not None: analysis.add(value, 'import-error', name, message) else: debug.warning('ImportError without origin: ' + message) def _level_to_base_import_path(project_path, directory, level): """ In case the level is outside of the currently known package (something like import .....foo), we can still try our best to help the user for completions. """ for i in range(level - 1): old = directory directory = os.path.dirname(directory) if old == directory: return None, None d = directory level_import_paths = [] # Now that we are on the level that the user wants to be, calculate the # import path for it. while True: if d == project_path: return level_import_paths, d dir_name = os.path.basename(d) if dir_name: level_import_paths.insert(0, dir_name) d = os.path.dirname(d) else: return None, directory class Importer(object): def __init__(self, inference_state, import_path, module_context, level=0): """ An implementation similar to ``__import__``. Use `follow` to actually follow the imports. *level* specifies whether to use absolute or relative imports. 0 (the default) means only perform absolute imports. Positive values for level indicate the number of parent directories to search relative to the directory of the module calling ``__import__()`` (see PEP 328 for the details). :param import_path: List of namespaces (strings or Names). """ debug.speed('import %s %s' % (import_path, module_context)) self._inference_state = inference_state self.level = level self._module_context = module_context self._fixed_sys_path = None self._infer_possible = True if level: base = module_context.get_value().py__package__() # We need to care for two cases, the first one is if it's a valid # Python import. This import has a properly defined module name # chain like `foo.bar.baz` and an import in baz is made for # `..lala.` It can then resolve to `foo.bar.lala`. # The else here is a heuristic for all other cases, if for example # in `foo` you search for `...bar`, it's obviously out of scope. # However since Jedi tries to just do it's best, we help the user # here, because he might have specified something wrong in his # project. if level <= len(base): # Here we basically rewrite the level to 0. base = tuple(base) if level > 1: base = base[:-level + 1] import_path = base + tuple(import_path) else: path = module_context.py__file__() import_path = list(import_path) if path is None: # If no path is defined, our best guess is that the current # file is edited by a user on the current working # directory. We need to add an initial path, because it # will get removed as the name of the current file. directory = os.getcwd() else: directory = os.path.dirname(path) base_import_path, base_directory = _level_to_base_import_path( self._inference_state.project._path, directory, level, ) if base_directory is None: # Everything is lost, the relative import does point # somewhere out of the filesystem. self._infer_possible = False else: self._fixed_sys_path = [force_unicode(base_directory)] if base_import_path is None: if import_path: _add_error( module_context, import_path[0], message='Attempted relative import beyond top-level package.' ) else: import_path = base_import_path + import_path self.import_path = import_path @property def _str_import_path(self): """Returns the import path as pure strings instead of `Name`.""" return tuple( name.value if isinstance(name, tree.Name) else name for name in self.import_path ) def _sys_path_with_modifications(self, is_completion): if self._fixed_sys_path is not None: return self._fixed_sys_path return ( # For import completions we don't want to see init paths, but for # inference we want to show the user as much as possible. # See GH #1446. self._inference_state.get_sys_path(add_init_paths=not is_completion) + sys_path.check_sys_path_modifications(self._module_context) ) def follow(self): if not self.import_path or not self._infer_possible: return NO_VALUES sys_path = self._sys_path_with_modifications(is_completion=False) return import_module_by_names( self._inference_state, self.import_path, sys_path, self._module_context ) def _get_module_names(self, search_path=None, in_module=None): """ Get the names of all modules in the search_path. This means file names and not names defined in the files. """ names = [] # add builtin module names if search_path is None and in_module is None: names += [ImportName(self._module_context, name) for name in self._inference_state.compiled_subprocess.get_builtin_module_names()] if search_path is None: search_path = self._sys_path_with_modifications(is_completion=True) for name in iter_module_names(self._inference_state, search_path): if in_module is None: n = ImportName(self._module_context, name) else: n = SubModuleName(in_module.as_context(), name) names.append(n) return names def completion_names(self, inference_state, only_modules=False): """ :param only_modules: Indicates wheter it's possible to import a definition that is not defined in a module. """ if not self._infer_possible: return [] names = [] if self.import_path: # flask if self._str_import_path == ('flask', 'ext'): # List Flask extensions like ``flask_foo`` for mod in self._get_module_names(): modname = mod.string_name if modname.startswith('flask_'): extname = modname[len('flask_'):] names.append(ImportName(self._module_context, extname)) # Now the old style: ``flaskext.foo`` for dir in self._sys_path_with_modifications(is_completion=True): flaskext = os.path.join(dir, 'flaskext') if os.path.isdir(flaskext): names += self._get_module_names([flaskext]) values = self.follow() for value in values: # Non-modules are not completable. if value.api_type != 'module': # not a module continue if not value.is_compiled(): # sub_modules_dict is not implemented for compiled modules. names += value.sub_modules_dict().values() if not only_modules: from jedi.inference.gradual.conversion import convert_values both_values = values | convert_values(values) for c in both_values: for filter in c.get_filters(): names += filter.values() else: if self.level: # We only get here if the level cannot be properly calculated. names += self._get_module_names(self._fixed_sys_path) else: # This is just the list of global imports. names += self._get_module_names() return names def import_module_by_names(inference_state, import_names, sys_path=None, module_context=None, prefer_stubs=True): if sys_path is None: sys_path = inference_state.get_sys_path() str_import_names = tuple( force_unicode(i.value if isinstance(i, tree.Name) else i) for i in import_names ) value_set = [None] for i, name in enumerate(import_names): value_set = ValueSet.from_sets([ import_module( inference_state, str_import_names[:i+1], parent_module_value, sys_path, prefer_stubs=prefer_stubs, ) for parent_module_value in value_set ]) if not value_set: message = 'No module named ' + '.'.join(str_import_names) if module_context is not None: _add_error(module_context, name, message) else: debug.warning(message) return NO_VALUES return value_set @plugin_manager.decorate() @import_module_decorator def import_module(inference_state, import_names, parent_module_value, sys_path): """ This method is very similar to importlib's `_gcd_import`. """ if import_names[0] in settings.auto_import_modules: module = _load_builtin_module(inference_state, import_names, sys_path) if module is None: return NO_VALUES return ValueSet([module]) module_name = '.'.join(import_names) if parent_module_value is None: # Override the sys.path. It works only good that way. # Injecting the path directly into `find_module` did not work. file_io_or_ns, is_pkg = inference_state.compiled_subprocess.get_module_info( string=import_names[-1], full_name=module_name, sys_path=sys_path, is_global_search=True, ) if is_pkg is None: return NO_VALUES else: paths = parent_module_value.py__path__() if paths is None: # The module might not be a package. return NO_VALUES for path in paths: # At the moment we are only using one path. So this is # not important to be correct. if not isinstance(path, list): path = [path] file_io_or_ns, is_pkg = inference_state.compiled_subprocess.get_module_info( string=import_names[-1], path=path, full_name=module_name, is_global_search=False, ) if is_pkg is not None: break else: return NO_VALUES if isinstance(file_io_or_ns, ImplicitNSInfo): from jedi.inference.value.namespace import ImplicitNamespaceValue module = ImplicitNamespaceValue( inference_state, fullname=file_io_or_ns.name, paths=file_io_or_ns.paths, ) elif file_io_or_ns is None: module = _load_builtin_module(inference_state, import_names, sys_path) if module is None: return NO_VALUES else: module = _load_python_module( inference_state, file_io_or_ns, sys_path, import_names=import_names, is_package=is_pkg, ) if parent_module_value is None: debug.dbg('global search_module %s: %s', import_names[-1], module) else: debug.dbg('search_module %s in paths %s: %s', module_name, paths, module) return ValueSet([module]) def _load_python_module(inference_state, file_io, sys_path=None, import_names=None, is_package=False): try: return inference_state.module_cache.get_from_path(file_io.path) except KeyError: pass module_node = inference_state.parse( file_io=file_io, cache=True, diff_cache=settings.fast_parser, cache_path=settings.cache_directory ) from jedi.inference.value import ModuleValue return ModuleValue( inference_state, module_node, file_io=file_io, string_names=import_names, code_lines=get_cached_code_lines(inference_state.grammar, file_io.path), is_package=is_package, ) def _load_builtin_module(inference_state, import_names=None, sys_path=None): if sys_path is None: sys_path = inference_state.get_sys_path() dotted_name = '.'.join(import_names) assert dotted_name is not None module = compiled.load_module(inference_state, dotted_name=dotted_name, sys_path=sys_path) if module is None: # The file might raise an ImportError e.g. and therefore not be # importable. return None return module def _load_module_from_path(inference_state, file_io, base_names): """ This should pretty much only be used for get_modules_containing_name. It's here to ensure that a random path is still properly loaded into the Jedi module structure. """ e_sys_path = inference_state.get_sys_path() path = file_io.path if base_names: module_name = os.path.basename(path) module_name = sys_path.remove_python_path_suffix(module_name) is_package = module_name == '__init__' if is_package: import_names = base_names else: import_names = base_names + (module_name,) else: import_names, is_package = sys_path.transform_path_to_dotted(e_sys_path, path) module = _load_python_module( inference_state, file_io, sys_path=e_sys_path, import_names=import_names, is_package=is_package, ) inference_state.module_cache.add(import_names, ValueSet([module])) return module def get_module_contexts_containing_name(inference_state, module_contexts, name): """ Search a name in the directories of modules. """ def check_directory(folder_io): for file_name in folder_io.list(): if file_name.endswith('.py'): yield folder_io.get_file_io(file_name) def check_fs(file_io, base_names): try: code = file_io.read() except FileNotFoundError: return None code = python_bytes_to_unicode(code, errors='replace') if name not in code: return None new_file_io = KnownContentFileIO(file_io.path, code) m = _load_module_from_path(inference_state, new_file_io, base_names) if isinstance(m, compiled.CompiledObject): return None return m.as_context() # skip non python modules used_mod_paths = set() folders_with_names_to_be_checked = [] for module_context in module_contexts: path = module_context.py__file__() if path not in used_mod_paths: file_io = module_context.get_value().file_io if file_io is not None: used_mod_paths.add(path) folders_with_names_to_be_checked.append(( file_io.get_parent_folder(), module_context.get_value().py__package__() )) yield module_context if not settings.dynamic_params_for_other_modules: return def get_file_ios_to_check(): for folder_io, base_names in folders_with_names_to_be_checked: for file_io in check_directory(folder_io): yield file_io, base_names for p in settings.additional_dynamic_modules: p = os.path.abspath(p) if p not in used_mod_paths: yield FileIO(p), None for file_io, base_names in get_file_ios_to_check(): m = check_fs(file_io, base_names) if m is not None: yield m def follow_error_node_imports_if_possible(context, name): error_node = tree.search_ancestor(name, 'error_node') if error_node is not None: # Get the first command start of a started simple_stmt. The error # node is sometimes a small_stmt and sometimes a simple_stmt. Check # for ; leaves that start a new statements. start_index = 0 for index, n in enumerate(error_node.children): if n.start_pos > name.start_pos: break if n == ';': start_index = index + 1 nodes = error_node.children[start_index:] first_name = nodes[0].get_first_leaf().value # Make it possible to infer stuff like `import foo.` or # `from foo.bar`. if first_name in ('from', 'import'): is_import_from = first_name == 'from' level, names = helpers.parse_dotted_names( nodes, is_import_from=is_import_from, until_node=name, ) return Importer( context.inference_state, names, context.get_root_context(), level).follow() return None jedi-0.15.2/jedi/inference/syntax_tree.py0000664000175000017500000010314113577124112020167 0ustar davedave00000000000000""" Functions inferring the syntax tree. """ import copy from parso.python import tree from jedi._compatibility import force_unicode, unicode from jedi import debug from jedi import parser_utils from jedi.inference.base_value import ValueSet, NO_VALUES, ContextualizedNode, \ iterator_to_value_set, iterate_values from jedi.inference.lazy_value import LazyTreeValue from jedi.inference import compiled from jedi.inference import recursion from jedi.inference import analysis from jedi.inference import imports from jedi.inference import arguments from jedi.inference.value import ClassValue, FunctionValue from jedi.inference.value import iterable from jedi.inference.value.dynamic_arrays import ListModification, DictModification from jedi.inference.value import TreeInstance from jedi.inference.helpers import is_string, is_literal, is_number, get_names_of_node from jedi.inference.compiled.access import COMPARISON_OPERATORS from jedi.inference.cache import inference_state_method_cache from jedi.inference.gradual.stub_value import VersionInfo from jedi.inference.gradual import annotation from jedi.inference.names import TreeNameDefinition from jedi.inference.context import CompForContext from jedi.inference.value.decorator import Decoratee from jedi.plugins import plugin_manager def _limit_value_infers(func): """ This is for now the way how we limit type inference going wild. There are other ways to ensure recursion limits as well. This is mostly necessary because of instance (self) access that can be quite tricky to limit. I'm still not sure this is the way to go, but it looks okay for now and we can still go anther way in the future. Tests are there. ~ dave """ def wrapper(context, *args, **kwargs): n = context.tree_node inference_state = context.inference_state try: inference_state.inferred_element_counts[n] += 1 maximum = 300 if context.parent_context is None \ and context.get_value() is inference_state.builtins_module: # Builtins should have a more generous inference limit. # It is important that builtins can be executed, otherwise some # functions that depend on certain builtins features would be # broken, see e.g. GH #1432 maximum *= 100 if inference_state.inferred_element_counts[n] > maximum: debug.warning('In value %s there were too many inferences.', n) return NO_VALUES except KeyError: inference_state.inferred_element_counts[n] = 1 return func(context, *args, **kwargs) return wrapper def _py__stop_iteration_returns(generators): results = NO_VALUES for generator in generators: try: method = generator.py__stop_iteration_returns except AttributeError: debug.warning('%s is not actually a generator', generator) else: results |= method() return results def infer_node(context, element): if isinstance(context, CompForContext): return _infer_node(context, element) if_stmt = element while if_stmt is not None: if_stmt = if_stmt.parent if if_stmt.type in ('if_stmt', 'for_stmt'): break if parser_utils.is_scope(if_stmt): if_stmt = None break predefined_if_name_dict = context.predefined_names.get(if_stmt) # TODO there's a lot of issues with this one. We actually should do # this in a different way. Caching should only be active in certain # cases and this all sucks. if predefined_if_name_dict is None and if_stmt \ and if_stmt.type == 'if_stmt' and context.inference_state.is_analysis: if_stmt_test = if_stmt.children[1] name_dicts = [{}] # If we already did a check, we don't want to do it again -> If # value.predefined_names is filled, we stop. # We don't want to check the if stmt itself, it's just about # the content. if element.start_pos > if_stmt_test.end_pos: # Now we need to check if the names in the if_stmt match the # names in the suite. if_names = get_names_of_node(if_stmt_test) element_names = get_names_of_node(element) str_element_names = [e.value for e in element_names] if any(i.value in str_element_names for i in if_names): for if_name in if_names: definitions = context.inference_state.goto_definitions(context, if_name) # Every name that has multiple different definitions # causes the complexity to rise. The complexity should # never fall below 1. if len(definitions) > 1: if len(name_dicts) * len(definitions) > 16: debug.dbg('Too many options for if branch inference %s.', if_stmt) # There's only a certain amount of branches # Jedi can infer, otherwise it will take to # long. name_dicts = [{}] break original_name_dicts = list(name_dicts) name_dicts = [] for definition in definitions: new_name_dicts = list(original_name_dicts) for i, name_dict in enumerate(new_name_dicts): new_name_dicts[i] = name_dict.copy() new_name_dicts[i][if_name.value] = ValueSet([definition]) name_dicts += new_name_dicts else: for name_dict in name_dicts: name_dict[if_name.value] = definitions if len(name_dicts) > 1: result = NO_VALUES for name_dict in name_dicts: with context.predefine_names(if_stmt, name_dict): result |= _infer_node(context, element) return result else: return _infer_node_if_inferred(context, element) else: if predefined_if_name_dict: return _infer_node(context, element) else: return _infer_node_if_inferred(context, element) def _infer_node_if_inferred(context, element): """ TODO This function is temporary: Merge with infer_node. """ parent = element while parent is not None: parent = parent.parent predefined_if_name_dict = context.predefined_names.get(parent) if predefined_if_name_dict is not None: return _infer_node(context, element) return _infer_node_cached(context, element) @inference_state_method_cache(default=NO_VALUES) def _infer_node_cached(context, element): return _infer_node(context, element) @debug.increase_indent @_limit_value_infers def _infer_node(context, element): debug.dbg('infer_node %s@%s in %s', element, element.start_pos, context) inference_state = context.inference_state typ = element.type if typ in ('name', 'number', 'string', 'atom', 'strings', 'keyword', 'fstring'): return infer_atom(context, element) elif typ == 'lambdef': return ValueSet([FunctionValue.from_context(context, element)]) elif typ == 'expr_stmt': return infer_expr_stmt(context, element) elif typ in ('power', 'atom_expr'): first_child = element.children[0] children = element.children[1:] had_await = False if first_child.type == 'keyword' and first_child.value == 'await': had_await = True first_child = children.pop(0) value_set = context.infer_node(first_child) for (i, trailer) in enumerate(children): if trailer == '**': # has a power operation. right = context.infer_node(children[i + 1]) value_set = _infer_comparison( context, value_set, trailer, right ) break value_set = infer_trailer(context, value_set, trailer) if had_await: return value_set.py__await__().py__stop_iteration_returns() return value_set elif typ in ('testlist_star_expr', 'testlist',): # The implicit tuple in statements. return ValueSet([iterable.SequenceLiteralValue(inference_state, context, element)]) elif typ in ('not_test', 'factor'): value_set = context.infer_node(element.children[-1]) for operator in element.children[:-1]: value_set = infer_factor(value_set, operator) return value_set elif typ == 'test': # `x if foo else y` case. return (context.infer_node(element.children[0]) | context.infer_node(element.children[-1])) elif typ == 'operator': # Must be an ellipsis, other operators are not inferred. # In Python 2 ellipsis is coded as three single dot tokens, not # as one token 3 dot token. if element.value not in ('.', '...'): origin = element.parent raise AssertionError("unhandled operator %s in %s " % (repr(element.value), origin)) return ValueSet([compiled.builtin_from_name(inference_state, u'Ellipsis')]) elif typ == 'dotted_name': value_set = infer_atom(context, element.children[0]) for next_name in element.children[2::2]: value_set = value_set.py__getattribute__(next_name, name_context=context) return value_set elif typ == 'eval_input': return context.infer_node(element.children[0]) elif typ == 'annassign': return annotation.infer_annotation(context, element.children[1]) \ .execute_annotation() elif typ == 'yield_expr': if len(element.children) and element.children[1].type == 'yield_arg': # Implies that it's a yield from. element = element.children[1].children[1] generators = context.infer_node(element) \ .py__getattribute__('__iter__').execute_with_values() return generators.py__stop_iteration_returns() # Generator.send() is not implemented. return NO_VALUES elif typ == 'namedexpr_test': return context.infer_node(element.children[2]) else: return infer_or_test(context, element) def infer_trailer(context, atom_values, trailer): trailer_op, node = trailer.children[:2] if node == ')': # `arglist` is optional. node = None if trailer_op == '[': trailer_op, node, _ = trailer.children return atom_values.get_item( _infer_subscript_list(context, node), ContextualizedNode(context, trailer) ) else: debug.dbg('infer_trailer: %s in %s', trailer, atom_values) if trailer_op == '.': return atom_values.py__getattribute__( name_context=context, name_or_str=node ) else: assert trailer_op == '(', 'trailer_op is actually %s' % trailer_op args = arguments.TreeArguments(context.inference_state, context, node, trailer) return atom_values.execute(args) def infer_atom(context, atom): """ Basically to process ``atom`` nodes. The parser sometimes doesn't generate the node (because it has just one child). In that case an atom might be a name or a literal as well. """ state = context.inference_state if atom.type == 'name': if atom.value in ('True', 'False', 'None'): # Python 2... return ValueSet([compiled.builtin_from_name(state, atom.value)]) # This is the first global lookup. stmt = tree.search_ancestor( atom, 'expr_stmt', 'lambdef' ) or atom if stmt.type == 'lambdef': stmt = atom position = stmt.start_pos if _is_annotation_name(atom): # Since Python 3.7 (with from __future__ import annotations), # annotations are essentially strings and can reference objects # that are defined further down in code. Therefore just set the # position to None, so the finder will not try to stop at a certain # position in the module. position = None return context.py__getattribute__(atom, position=position) elif atom.type == 'keyword': # For False/True/None if atom.value in ('False', 'True', 'None'): return ValueSet([compiled.builtin_from_name(state, atom.value)]) elif atom.value == 'print': # print e.g. could be inferred like this in Python 2.7 return NO_VALUES elif atom.value == 'yield': # Contrary to yield from, yield can just appear alone to return a # value when used with `.send()`. return NO_VALUES assert False, 'Cannot infer the keyword %s' % atom elif isinstance(atom, tree.Literal): string = state.compiled_subprocess.safe_literal_eval(atom.value) return ValueSet([compiled.create_simple_object(state, string)]) elif atom.type == 'strings': # Will be multiple string. value_set = infer_atom(context, atom.children[0]) for string in atom.children[1:]: right = infer_atom(context, string) value_set = _infer_comparison(context, value_set, u'+', right) return value_set elif atom.type == 'fstring': return compiled.get_string_value_set(state) else: c = atom.children # Parentheses without commas are not tuples. if c[0] == '(' and not len(c) == 2 \ and not(c[1].type == 'testlist_comp' and len(c[1].children) > 1): return context.infer_node(c[1]) try: comp_for = c[1].children[1] except (IndexError, AttributeError): pass else: if comp_for == ':': # Dict comprehensions have a colon at the 3rd index. try: comp_for = c[1].children[3] except IndexError: pass if comp_for.type in ('comp_for', 'sync_comp_for'): return ValueSet([iterable.comprehension_from_atom( state, context, atom )]) # It's a dict/list/tuple literal. array_node = c[1] try: array_node_c = array_node.children except AttributeError: array_node_c = [] if c[0] == '{' and (array_node == '}' or ':' in array_node_c or '**' in array_node_c): new_value = iterable.DictLiteralValue(state, context, atom) else: new_value = iterable.SequenceLiteralValue(state, context, atom) return ValueSet([new_value]) @_limit_value_infers def infer_expr_stmt(context, stmt, seek_name=None): with recursion.execution_allowed(context.inference_state, stmt) as allowed: if allowed: return _infer_expr_stmt(context, stmt, seek_name) return NO_VALUES @debug.increase_indent def _infer_expr_stmt(context, stmt, seek_name=None): """ The starting point of the completion. A statement always owns a call list, which are the calls, that a statement does. In case multiple names are defined in the statement, `seek_name` returns the result for this name. expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) | ('=' (yield_expr|testlist_star_expr))*) annassign: ':' test ['=' test] augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>>=' | '**=' | '//=') :param stmt: A `tree.ExprStmt`. """ def check_setitem(stmt): atom_expr = stmt.children[0] if atom_expr.type not in ('atom_expr', 'power'): return False, None name = atom_expr.children[0] if name.type != 'name' or len(atom_expr.children) != 2: return False, None trailer = atom_expr.children[-1] return trailer.children[0] == '[', trailer.children[1] debug.dbg('infer_expr_stmt %s (%s)', stmt, seek_name) rhs = stmt.get_rhs() value_set = context.infer_node(rhs) if seek_name: n = TreeNameDefinition(context, seek_name) value_set = check_tuple_assignments(n, value_set) first_operator = next(stmt.yield_operators(), None) is_setitem, subscriptlist = check_setitem(stmt) is_annassign = first_operator not in ('=', None) and first_operator.type == 'operator' if is_annassign or is_setitem: # `=` is always the last character in aug assignments -> -1 name = stmt.get_defined_names(include_setitem=True)[0].value left_values = context.py__getattribute__(name, position=stmt.start_pos) if is_setitem: def to_mod(v): c = ContextualizedSubscriptListNode(context, subscriptlist) if v.array_type == 'dict': return DictModification(v, value_set, c) elif v.array_type == 'list': return ListModification(v, value_set, c) return v value_set = ValueSet(to_mod(v) for v in left_values) else: operator = copy.copy(first_operator) operator.value = operator.value[:-1] for_stmt = tree.search_ancestor(stmt, 'for_stmt') if for_stmt is not None and for_stmt.type == 'for_stmt' and value_set \ and parser_utils.for_stmt_defines_one_name(for_stmt): # Iterate through result and add the values, that's possible # only in for loops without clutter, because they are # predictable. Also only do it, if the variable is not a tuple. node = for_stmt.get_testlist() cn = ContextualizedNode(context, node) ordered = list(cn.infer().iterate(cn)) for lazy_value in ordered: dct = {for_stmt.children[1].value: lazy_value.infer()} with context.predefine_names(for_stmt, dct): t = context.infer_node(rhs) left_values = _infer_comparison(context, left_values, operator, t) value_set = left_values else: value_set = _infer_comparison(context, left_values, operator, value_set) debug.dbg('infer_expr_stmt result %s', value_set) return value_set def infer_or_test(context, or_test): iterator = iter(or_test.children) types = context.infer_node(next(iterator)) for operator in iterator: right = next(iterator) if operator.type == 'comp_op': # not in / is not operator = ' '.join(c.value for c in operator.children) # handle type inference of and/or here. if operator in ('and', 'or'): left_bools = set(left.py__bool__() for left in types) if left_bools == {True}: if operator == 'and': types = context.infer_node(right) elif left_bools == {False}: if operator != 'and': types = context.infer_node(right) # Otherwise continue, because of uncertainty. else: types = _infer_comparison(context, types, operator, context.infer_node(right)) debug.dbg('infer_or_test types %s', types) return types @iterator_to_value_set def infer_factor(value_set, operator): """ Calculates `+`, `-`, `~` and `not` prefixes. """ for value in value_set: if operator == '-': if is_number(value): yield value.negate() elif operator == 'not': b = value.py__bool__() if b is None: # Uncertainty. return yield compiled.create_simple_object(value.inference_state, not b) else: yield value def _literals_to_types(inference_state, result): # Changes literals ('a', 1, 1.0, etc) to its type instances (str(), # int(), float(), etc). new_result = NO_VALUES for typ in result: if is_literal(typ): # Literals are only valid as long as the operations are # correct. Otherwise add a value-free instance. cls = compiled.builtin_from_name(inference_state, typ.name.string_name) new_result |= cls.execute_with_values() else: new_result |= ValueSet([typ]) return new_result def _infer_comparison(context, left_values, operator, right_values): state = context.inference_state if not left_values or not right_values: # illegal slices e.g. cause left/right_result to be None result = (left_values or NO_VALUES) | (right_values or NO_VALUES) return _literals_to_types(state, result) else: # I don't think there's a reasonable chance that a string # operation is still correct, once we pass something like six # objects. if len(left_values) * len(right_values) > 6: return _literals_to_types(state, left_values | right_values) else: return ValueSet.from_sets( _infer_comparison_part(state, context, left, operator, right) for left in left_values for right in right_values ) def _is_annotation_name(name): ancestor = tree.search_ancestor(name, 'param', 'funcdef', 'expr_stmt') if ancestor is None: return False if ancestor.type in ('param', 'funcdef'): ann = ancestor.annotation if ann is not None: return ann.start_pos <= name.start_pos < ann.end_pos elif ancestor.type == 'expr_stmt': c = ancestor.children if len(c) > 1 and c[1].type == 'annassign': return c[1].start_pos <= name.start_pos < c[1].end_pos return False def _is_tuple(value): return isinstance(value, iterable.Sequence) and value.array_type == 'tuple' def _is_list(value): return isinstance(value, iterable.Sequence) and value.array_type == 'list' def _bool_to_value(inference_state, bool_): return compiled.builtin_from_name(inference_state, force_unicode(str(bool_))) def _get_tuple_ints(value): if not isinstance(value, iterable.SequenceLiteralValue): return None numbers = [] for lazy_value in value.py__iter__(): if not isinstance(lazy_value, LazyTreeValue): return None node = lazy_value.data if node.type != 'number': return None try: numbers.append(int(node.value)) except ValueError: return None return numbers def _infer_comparison_part(inference_state, context, left, operator, right): l_is_num = is_number(left) r_is_num = is_number(right) if isinstance(operator, unicode): str_operator = operator else: str_operator = force_unicode(str(operator.value)) if str_operator == '*': # for iterables, ignore * operations if isinstance(left, iterable.Sequence) or is_string(left): return ValueSet([left]) elif isinstance(right, iterable.Sequence) or is_string(right): return ValueSet([right]) elif str_operator == '+': if l_is_num and r_is_num or is_string(left) and is_string(right): return ValueSet([left.execute_operation(right, str_operator)]) elif _is_tuple(left) and _is_tuple(right) or _is_list(left) and _is_list(right): return ValueSet([iterable.MergedArray(inference_state, (left, right))]) elif str_operator == '-': if l_is_num and r_is_num: return ValueSet([left.execute_operation(right, str_operator)]) elif str_operator == '%': # With strings and numbers the left type typically remains. Except for # `int() % float()`. return ValueSet([left]) elif str_operator in COMPARISON_OPERATORS: if left.is_compiled() and right.is_compiled(): # Possible, because the return is not an option. Just compare. try: return ValueSet([left.execute_operation(right, str_operator)]) except TypeError: # Could be True or False. pass else: if str_operator in ('is', '!=', '==', 'is not'): operation = COMPARISON_OPERATORS[str_operator] bool_ = operation(left, right) return ValueSet([_bool_to_value(inference_state, bool_)]) if isinstance(left, VersionInfo): version_info = _get_tuple_ints(right) if version_info is not None: bool_result = compiled.access.COMPARISON_OPERATORS[operator]( inference_state.environment.version_info, tuple(version_info) ) return ValueSet([_bool_to_value(inference_state, bool_result)]) return ValueSet([ _bool_to_value(inference_state, True), _bool_to_value(inference_state, False) ]) elif str_operator == 'in': return NO_VALUES def check(obj): """Checks if a Jedi object is either a float or an int.""" return isinstance(obj, TreeInstance) and \ obj.name.string_name in ('int', 'float') # Static analysis, one is a number, the other one is not. if str_operator in ('+', '-') and l_is_num != r_is_num \ and not (check(left) or check(right)): message = "TypeError: unsupported operand type(s) for +: %s and %s" analysis.add(context, 'type-error-operation', operator, message % (left, right)) result = ValueSet([left, right]) debug.dbg('Used operator %s resulting in %s', operator, result) return result def _remove_statements(context, stmt, name): """ This is the part where statements are being stripped. Due to lazy type inference, statements like a = func; b = a; b() have to be inferred. TODO merge with infer_expr_stmt? """ pep0484_values = \ annotation.find_type_from_comment_hint_assign(context, stmt, name) if pep0484_values: return pep0484_values return infer_expr_stmt(context, stmt, seek_name=name) @plugin_manager.decorate() def tree_name_to_values(inference_state, context, tree_name): value_set = NO_VALUES module_node = context.get_root_context().tree_node # First check for annotations, like: `foo: int = 3` if module_node is not None: names = module_node.get_used_names().get(tree_name.value, []) for name in names: expr_stmt = name.parent if expr_stmt.type == "expr_stmt" and expr_stmt.children[1].type == "annassign": correct_scope = parser_utils.get_parent_scope(name) == context.tree_node if correct_scope: value_set |= annotation.infer_annotation( context, expr_stmt.children[1].children[1] ).execute_annotation() if value_set: return value_set types = [] node = tree_name.get_definition(import_name_always=True, include_setitem=True) if node is None: node = tree_name.parent if node.type == 'global_stmt': c = context.create_context(tree_name) if c.is_module(): # In case we are already part of the module, there is no point # in looking up the global statement anymore, because it's not # valid at that point anyway. return NO_VALUES # For global_stmt lookups, we only need the first possible scope, # which means the function itself. filter = next(c.get_filters()) names = filter.get(tree_name.value) return ValueSet.from_sets(name.infer() for name in names) elif node.type not in ('import_from', 'import_name'): c = context.create_context(tree_name) return infer_atom(c, tree_name) typ = node.type if typ == 'for_stmt': types = annotation.find_type_from_comment_hint_for(context, node, tree_name) if types: return types if typ == 'with_stmt': types = annotation.find_type_from_comment_hint_with(context, node, tree_name) if types: return types if typ in ('for_stmt', 'comp_for', 'sync_comp_for'): try: types = context.predefined_names[node][tree_name.value] except KeyError: cn = ContextualizedNode(context, node.children[3]) for_types = iterate_values( cn.infer(), contextualized_node=cn, is_async=node.parent.type == 'async_stmt', ) n = TreeNameDefinition(context, tree_name) types = check_tuple_assignments(n, for_types) elif typ == 'expr_stmt': types = _remove_statements(context, node, tree_name) elif typ == 'with_stmt': value_managers = context.infer_node(node.get_test_node_from_name(tree_name)) enter_methods = value_managers.py__getattribute__(u'__enter__') return enter_methods.execute_with_values() elif typ in ('import_from', 'import_name'): types = imports.infer_import(context, tree_name) elif typ in ('funcdef', 'classdef'): types = _apply_decorators(context, node) elif typ == 'try_stmt': # TODO an exception can also be a tuple. Check for those. # TODO check for types that are not classes and add it to # the static analysis report. exceptions = context.infer_node(tree_name.get_previous_sibling().get_previous_sibling()) types = exceptions.execute_with_values() elif node.type == 'param': types = NO_VALUES else: raise ValueError("Should not happen. type: %s" % typ) return types # We don't want to have functions/classes that are created by the same # tree_node. @inference_state_method_cache() def _apply_decorators(context, node): """ Returns the function, that should to be executed in the end. This is also the places where the decorators are processed. """ if node.type == 'classdef': decoratee_value = ClassValue( context.inference_state, parent_context=context, tree_node=node ) else: decoratee_value = FunctionValue.from_context(context, node) initial = values = ValueSet([decoratee_value]) for dec in reversed(node.get_decorators()): debug.dbg('decorator: %s %s', dec, values, color="MAGENTA") with debug.increase_indent_cm(): dec_values = context.infer_node(dec.children[1]) trailer_nodes = dec.children[2:-1] if trailer_nodes: # Create a trailer and infer it. trailer = tree.PythonNode('trailer', trailer_nodes) trailer.parent = dec dec_values = infer_trailer(context, dec_values, trailer) if not len(dec_values): code = dec.get_code(include_prefix=False) # For the short future, we don't want to hear about the runtime # decorator in typing that was intentionally omitted. This is not # "correct", but helps with debugging. if code != '@runtime\n': debug.warning('decorator not found: %s on %s', dec, node) return initial values = dec_values.execute(arguments.ValuesArguments([values])) if not len(values): debug.warning('not possible to resolve wrappers found %s', node) return initial debug.dbg('decorator end %s', values, color="MAGENTA") if values != initial: return ValueSet([Decoratee(c, decoratee_value) for c in values]) return values def check_tuple_assignments(name, value_set): """ Checks if tuples are assigned. """ lazy_value = None for index, node in name.assignment_indexes(): cn = ContextualizedNode(name.parent_context, node) iterated = value_set.iterate(cn) if isinstance(index, slice): # For no star unpacking is not possible. return NO_VALUES for _ in range(index + 1): try: lazy_value = next(iterated) except StopIteration: # We could do this with the default param in next. But this # would allow this loop to run for a very long time if the # index number is high. Therefore break if the loop is # finished. return NO_VALUES value_set = lazy_value.infer() return value_set class ContextualizedSubscriptListNode(ContextualizedNode): def infer(self): return _infer_subscript_list(self.context, self.node) def _infer_subscript_list(context, index): """ Handles slices in subscript nodes. """ if index == ':': # Like array[:] return ValueSet([iterable.Slice(context, None, None, None)]) elif index.type == 'subscript' and not index.children[0] == '.': # subscript basically implies a slice operation, except for Python 2's # Ellipsis. # e.g. array[:3] result = [] for el in index.children: if el == ':': if not result: result.append(None) elif el.type == 'sliceop': if len(el.children) == 2: result.append(el.children[1]) else: result.append(el) result += [None] * (3 - len(result)) return ValueSet([iterable.Slice(context, *result)]) elif index.type == 'subscriptlist': return ValueSet([iterable.SequenceLiteralValue(context.inference_state, context, index)]) # No slices return context.infer_node(index) jedi-0.15.2/jedi/inference/flow_analysis.py0000664000175000017500000001032113577124112020471 0ustar davedave00000000000000from jedi.parser_utils import get_flow_branch_keyword, is_scope, get_parent_scope from jedi.inference.recursion import execution_allowed class Status(object): lookup_table = {} def __init__(self, value, name): self._value = value self._name = name Status.lookup_table[value] = self def invert(self): if self is REACHABLE: return UNREACHABLE elif self is UNREACHABLE: return REACHABLE else: return UNSURE def __and__(self, other): if UNSURE in (self, other): return UNSURE else: return REACHABLE if self._value and other._value else UNREACHABLE def __repr__(self): return '<%s: %s>' % (type(self).__name__, self._name) REACHABLE = Status(True, 'reachable') UNREACHABLE = Status(False, 'unreachable') UNSURE = Status(None, 'unsure') def _get_flow_scopes(node): while True: node = get_parent_scope(node, include_flows=True) if node is None or is_scope(node): return yield node def reachability_check(context, value_scope, node, origin_scope=None): first_flow_scope = get_parent_scope(node, include_flows=True) if origin_scope is not None: origin_flow_scopes = list(_get_flow_scopes(origin_scope)) node_flow_scopes = list(_get_flow_scopes(node)) branch_matches = True for flow_scope in origin_flow_scopes: if flow_scope in node_flow_scopes: node_keyword = get_flow_branch_keyword(flow_scope, node) origin_keyword = get_flow_branch_keyword(flow_scope, origin_scope) branch_matches = node_keyword == origin_keyword if flow_scope.type == 'if_stmt': if not branch_matches: return UNREACHABLE elif flow_scope.type == 'try_stmt': if not branch_matches and origin_keyword == 'else' \ and node_keyword == 'except': return UNREACHABLE if branch_matches: break # Direct parents get resolved, we filter scopes that are separate # branches. This makes sense for autocompletion and static analysis. # For actual Python it doesn't matter, because we're talking about # potentially unreachable code. # e.g. `if 0:` would cause all name lookup within the flow make # unaccessible. This is not a "problem" in Python, because the code is # never called. In Jedi though, we still want to infer types. while origin_scope is not None: if first_flow_scope == origin_scope and branch_matches: return REACHABLE origin_scope = origin_scope.parent return _break_check(context, value_scope, first_flow_scope, node) def _break_check(context, value_scope, flow_scope, node): reachable = REACHABLE if flow_scope.type == 'if_stmt': if flow_scope.is_node_after_else(node): for check_node in flow_scope.get_test_nodes(): reachable = _check_if(context, check_node) if reachable in (REACHABLE, UNSURE): break reachable = reachable.invert() else: flow_node = flow_scope.get_corresponding_test_node(node) if flow_node is not None: reachable = _check_if(context, flow_node) elif flow_scope.type in ('try_stmt', 'while_stmt'): return UNSURE # Only reachable branches need to be examined further. if reachable in (UNREACHABLE, UNSURE): return reachable if value_scope != flow_scope and value_scope != flow_scope.parent: flow_scope = get_parent_scope(flow_scope, include_flows=True) return reachable & _break_check(context, value_scope, flow_scope, node) else: return reachable def _check_if(context, node): with execution_allowed(context.inference_state, node) as allowed: if not allowed: return UNSURE types = context.infer_node(node) values = set(x.py__bool__() for x in types) if len(values) == 1: return Status.lookup_table[values.pop()] else: return UNSURE jedi-0.15.2/jedi/inference/docstrings.py0000664000175000017500000002470613577124112020012 0ustar davedave00000000000000""" Docstrings are another source of information for functions and classes. :mod:`jedi.inference.dynamic` tries to find all executions of functions, while the docstring parsing is much easier. There are three different types of docstrings that |jedi| understands: - `Sphinx `_ - `Epydoc `_ - `Numpydoc `_ For example, the sphinx annotation ``:type foo: str`` clearly states that the type of ``foo`` is ``str``. As an addition to parameter searching, this module also provides return annotations. """ import re import warnings from textwrap import dedent from parso import parse, ParserSyntaxError from jedi._compatibility import u from jedi import debug from jedi.inference.utils import indent_block from jedi.inference.cache import inference_state_method_cache from jedi.inference.base_value import iterator_to_value_set, ValueSet, \ NO_VALUES from jedi.inference.lazy_value import LazyKnownValues DOCSTRING_PARAM_PATTERNS = [ r'\s*:type\s+%s:\s*([^\n]+)', # Sphinx r'\s*:param\s+(\w+)\s+%s:[^\n]*', # Sphinx param with type r'\s*@type\s+%s:\s*([^\n]+)', # Epydoc ] DOCSTRING_RETURN_PATTERNS = [ re.compile(r'\s*:rtype:\s*([^\n]+)', re.M), # Sphinx re.compile(r'\s*@rtype:\s*([^\n]+)', re.M), # Epydoc ] REST_ROLE_PATTERN = re.compile(r':[^`]+:`([^`]+)`') _numpy_doc_string_cache = None def _get_numpy_doc_string_cls(): global _numpy_doc_string_cache if isinstance(_numpy_doc_string_cache, (ImportError, SyntaxError)): raise _numpy_doc_string_cache from numpydoc.docscrape import NumpyDocString _numpy_doc_string_cache = NumpyDocString return _numpy_doc_string_cache def _search_param_in_numpydocstr(docstr, param_str): """Search `docstr` (in numpydoc format) for type(-s) of `param_str`.""" with warnings.catch_warnings(): warnings.simplefilter("ignore") try: # This is a non-public API. If it ever changes we should be # prepared and return gracefully. params = _get_numpy_doc_string_cls()(docstr)._parsed_data['Parameters'] except Exception: return [] for p_name, p_type, p_descr in params: if p_name == param_str: m = re.match(r'([^,]+(,[^,]+)*?)(,[ ]*optional)?$', p_type) if m: p_type = m.group(1) return list(_expand_typestr(p_type)) return [] def _search_return_in_numpydocstr(docstr): """ Search `docstr` (in numpydoc format) for type(-s) of function returns. """ with warnings.catch_warnings(): warnings.simplefilter("ignore") try: doc = _get_numpy_doc_string_cls()(docstr) except Exception: return try: # This is a non-public API. If it ever changes we should be # prepared and return gracefully. returns = doc._parsed_data['Returns'] returns += doc._parsed_data['Yields'] except Exception: return for r_name, r_type, r_descr in returns: # Return names are optional and if so the type is in the name if not r_type: r_type = r_name for type_ in _expand_typestr(r_type): yield type_ def _expand_typestr(type_str): """ Attempts to interpret the possible types in `type_str` """ # Check if alternative types are specified with 'or' if re.search(r'\bor\b', type_str): for t in type_str.split('or'): yield t.split('of')[0].strip() # Check if like "list of `type`" and set type to list elif re.search(r'\bof\b', type_str): yield type_str.split('of')[0] # Check if type has is a set of valid literal values eg: {'C', 'F', 'A'} elif type_str.startswith('{'): node = parse(type_str, version='3.7').children[0] if node.type == 'atom': for leaf in node.children[1].children: if leaf.type == 'number': if '.' in leaf.value: yield 'float' else: yield 'int' elif leaf.type == 'string': if 'b' in leaf.string_prefix.lower(): yield 'bytes' else: yield 'str' # Ignore everything else. # Otherwise just work with what we have. else: yield type_str def _search_param_in_docstr(docstr, param_str): """ Search `docstr` for type(-s) of `param_str`. >>> _search_param_in_docstr(':type param: int', 'param') ['int'] >>> _search_param_in_docstr('@type param: int', 'param') ['int'] >>> _search_param_in_docstr( ... ':type param: :class:`threading.Thread`', 'param') ['threading.Thread'] >>> bool(_search_param_in_docstr('no document', 'param')) False >>> _search_param_in_docstr(':param int param: some description', 'param') ['int'] """ # look at #40 to see definitions of those params patterns = [re.compile(p % re.escape(param_str)) for p in DOCSTRING_PARAM_PATTERNS] for pattern in patterns: match = pattern.search(docstr) if match: return [_strip_rst_role(match.group(1))] return _search_param_in_numpydocstr(docstr, param_str) def _strip_rst_role(type_str): """ Strip off the part looks like a ReST role in `type_str`. >>> _strip_rst_role(':class:`ClassName`') # strip off :class: 'ClassName' >>> _strip_rst_role(':py:obj:`module.Object`') # works with domain 'module.Object' >>> _strip_rst_role('ClassName') # do nothing when not ReST role 'ClassName' See also: http://sphinx-doc.org/domains.html#cross-referencing-python-objects """ match = REST_ROLE_PATTERN.match(type_str) if match: return match.group(1) else: return type_str def _infer_for_statement_string(module_context, string): code = dedent(u(""" def pseudo_docstring_stuff(): ''' Create a pseudo function for docstring statements. Need this docstring so that if the below part is not valid Python this is still a function. ''' {} """)) if string is None: return [] for element in re.findall(r'((?:\w+\.)*\w+)\.', string): # Try to import module part in dotted name. # (e.g., 'threading' in 'threading.Thread'). string = 'import %s\n' % element + string # Take the default grammar here, if we load the Python 2.7 grammar here, it # will be impossible to use `...` (Ellipsis) as a token. Docstring types # don't need to conform with the current grammar. debug.dbg('Parse docstring code %s', string, color='BLUE') grammar = module_context.inference_state.latest_grammar try: module = grammar.parse(code.format(indent_block(string)), error_recovery=False) except ParserSyntaxError: return [] try: funcdef = next(module.iter_funcdefs()) # First pick suite, then simple_stmt and then the node, # which is also not the last item, because there's a newline. stmt = funcdef.children[-1].children[-1].children[-2] except (AttributeError, IndexError): return [] if stmt.type not in ('name', 'atom', 'atom_expr'): return [] from jedi.inference.value import FunctionValue function_value = FunctionValue( module_context.inference_state, module_context, funcdef ) func_execution_context = function_value.as_context() # Use the module of the param. # TODO this module is not the module of the param in case of a function # call. In that case it's the module of the function call. # stuffed with content from a function call. return list(_execute_types_in_stmt(func_execution_context, stmt)) def _execute_types_in_stmt(module_context, stmt): """ Executing all types or general elements that we find in a statement. This doesn't include tuple, list and dict literals, because the stuff they contain is executed. (Used as type information). """ definitions = module_context.infer_node(stmt) return ValueSet.from_sets( _execute_array_values(module_context.inference_state, d) for d in definitions ) def _execute_array_values(inference_state, array): """ Tuples indicate that there's not just one return value, but the listed ones. `(str, int)` means that it returns a tuple with both types. """ from jedi.inference.value.iterable import SequenceLiteralValue, FakeTuple, FakeList if isinstance(array, SequenceLiteralValue) and array.array_type in ('tuple', 'list'): values = [] for lazy_value in array.py__iter__(): objects = ValueSet.from_sets( _execute_array_values(inference_state, typ) for typ in lazy_value.infer() ) values.append(LazyKnownValues(objects)) cls = FakeTuple if array.array_type == 'tuple' else FakeList return {cls(inference_state, values)} else: return array.execute_annotation() @inference_state_method_cache() def infer_param(function_value, param): def infer_docstring(docstring): return ValueSet( p for param_str in _search_param_in_docstr(docstring, param.name.value) for p in _infer_for_statement_string(module_context, param_str) ) module_context = function_value.get_root_context() func = param.get_parent_function() if func.type == 'lambdef': return NO_VALUES types = infer_docstring(function_value.py__doc__()) if function_value.is_bound_method() \ and function_value.py__name__() == '__init__': types |= infer_docstring(function_value.class_context.py__doc__()) debug.dbg('Found param types for docstring: %s', types, color='BLUE') return types @inference_state_method_cache() @iterator_to_value_set def infer_return_types(function_value): def search_return_in_docstr(code): for p in DOCSTRING_RETURN_PATTERNS: match = p.search(code) if match: yield _strip_rst_role(match.group(1)) # Check for numpy style return hint for type_ in _search_return_in_numpydocstr(code): yield type_ for type_str in search_return_in_docstr(function_value.py__doc__()): for value in _infer_for_statement_string(function_value.get_root_context(), type_str): yield value jedi-0.15.2/jedi/inference/analysis.py0000664000175000017500000001742413577124112017455 0ustar davedave00000000000000""" Module for statical analysis. """ from parso.python import tree from jedi._compatibility import force_unicode from jedi import debug from jedi.inference.helpers import is_string CODES = { 'attribute-error': (1, AttributeError, 'Potential AttributeError.'), 'name-error': (2, NameError, 'Potential NameError.'), 'import-error': (3, ImportError, 'Potential ImportError.'), 'type-error-too-many-arguments': (4, TypeError, None), 'type-error-too-few-arguments': (5, TypeError, None), 'type-error-keyword-argument': (6, TypeError, None), 'type-error-multiple-values': (7, TypeError, None), 'type-error-star-star': (8, TypeError, None), 'type-error-star': (9, TypeError, None), 'type-error-operation': (10, TypeError, None), 'type-error-not-iterable': (11, TypeError, None), 'type-error-isinstance': (12, TypeError, None), 'type-error-not-subscriptable': (13, TypeError, None), 'value-error-too-many-values': (14, ValueError, None), 'value-error-too-few-values': (15, ValueError, None), } class Error(object): def __init__(self, name, module_path, start_pos, message=None): self.path = module_path self._start_pos = start_pos self.name = name if message is None: message = CODES[self.name][2] self.message = message @property def line(self): return self._start_pos[0] @property def column(self): return self._start_pos[1] @property def code(self): # The class name start first = self.__class__.__name__[0] return first + str(CODES[self.name][0]) def __unicode__(self): return '%s:%s:%s: %s %s' % (self.path, self.line, self.column, self.code, self.message) def __str__(self): return self.__unicode__() def __eq__(self, other): return (self.path == other.path and self.name == other.name and self._start_pos == other._start_pos) def __ne__(self, other): return not self.__eq__(other) def __hash__(self): return hash((self.path, self._start_pos, self.name)) def __repr__(self): return '<%s %s: %s@%s,%s>' % (self.__class__.__name__, self.name, self.path, self._start_pos[0], self._start_pos[1]) class Warning(Error): pass def add(node_context, error_name, node, message=None, typ=Error, payload=None): exception = CODES[error_name][1] if _check_for_exception_catch(node_context, node, exception, payload): return # TODO this path is probably not right module_context = node_context.get_root_context() module_path = module_context.py__file__() issue_instance = typ(error_name, module_path, node.start_pos, message) debug.warning(str(issue_instance), format=False) node_context.inference_state.analysis.append(issue_instance) return issue_instance def _check_for_setattr(instance): """ Check if there's any setattr method inside an instance. If so, return True. """ module = instance.get_root_context() node = module.tree_node if node is None: # If it's a compiled module or doesn't have a tree_node return False try: stmt_names = node.get_used_names()['setattr'] except KeyError: return False return any(node.start_pos < n.start_pos < node.end_pos # Check if it's a function called setattr. and not (n.parent.type == 'funcdef' and n.parent.name == n) for n in stmt_names) def add_attribute_error(name_context, lookup_value, name): message = ('AttributeError: %s has no attribute %s.' % (lookup_value, name)) from jedi.inference.value.instance import CompiledInstanceName # Check for __getattr__/__getattribute__ existance and issue a warning # instead of an error, if that happens. typ = Error if lookup_value.is_instance() and not lookup_value.is_compiled(): # TODO maybe make a warning for __getattr__/__getattribute__ if _check_for_setattr(lookup_value): typ = Warning payload = lookup_value, name add(name_context, 'attribute-error', name, message, typ, payload) def _check_for_exception_catch(node_context, jedi_name, exception, payload=None): """ Checks if a jedi object (e.g. `Statement`) sits inside a try/catch and doesn't count as an error (if equal to `exception`). Also checks `hasattr` for AttributeErrors and uses the `payload` to compare it. Returns True if the exception was catched. """ def check_match(cls, exception): if not cls.is_class(): return False for python_cls in exception.mro(): if cls.py__name__() == python_cls.__name__ \ and cls.parent_context.is_builtins_module(): return True return False def check_try_for_except(obj, exception): # Only nodes in try iterator = iter(obj.children) for branch_type in iterator: colon = next(iterator) suite = next(iterator) if branch_type == 'try' \ and not (branch_type.start_pos < jedi_name.start_pos <= suite.end_pos): return False for node in obj.get_except_clause_tests(): if node is None: return True # An exception block that catches everything. else: except_classes = node_context.infer_node(node) for cls in except_classes: from jedi.inference.value import iterable if isinstance(cls, iterable.Sequence) and \ cls.array_type == 'tuple': # multiple exceptions for lazy_value in cls.py__iter__(): for typ in lazy_value.infer(): if check_match(typ, exception): return True else: if check_match(cls, exception): return True def check_hasattr(node, suite): try: assert suite.start_pos <= jedi_name.start_pos < suite.end_pos assert node.type in ('power', 'atom_expr') base = node.children[0] assert base.type == 'name' and base.value == 'hasattr' trailer = node.children[1] assert trailer.type == 'trailer' arglist = trailer.children[1] assert arglist.type == 'arglist' from jedi.inference.arguments import TreeArguments args = TreeArguments(node_context.inference_state, node_context, arglist) unpacked_args = list(args.unpack()) # Arguments should be very simple assert len(unpacked_args) == 2 # Check name key, lazy_value = unpacked_args[1] names = list(lazy_value.infer()) assert len(names) == 1 and is_string(names[0]) assert force_unicode(names[0].get_safe_value()) == payload[1].value # Check objects key, lazy_value = unpacked_args[0] objects = lazy_value.infer() return payload[0] in objects except AssertionError: return False obj = jedi_name while obj is not None and not isinstance(obj, (tree.Function, tree.Class)): if isinstance(obj, tree.Flow): # try/except catch check if obj.type == 'try_stmt' and check_try_for_except(obj, exception): return True # hasattr check if exception == AttributeError and obj.type in ('if_stmt', 'while_stmt'): if check_hasattr(obj.children[1], obj.children[3]): return True obj = obj.parent return False jedi-0.15.2/jedi/inference/recursion.py0000664000175000017500000001150313577124112017633 0ustar davedave00000000000000""" Recursions are the recipe of |jedi| to conquer Python code. However, someone must stop recursions going mad. Some settings are here to make |jedi| stop at the right time. You can read more about them :ref:`here `. Next to :mod:`jedi.inference.cache` this module also makes |jedi| not thread-safe. Why? ``execution_recursion_decorator`` uses class variables to count the function calls. .. _settings-recursion: Settings ~~~~~~~~~~ Recursion settings are important if you don't want extremly recursive python code to go absolutely crazy. The default values are based on experiments while completing the |jedi| library itself (inception!). But I don't think there's any other Python library that uses recursion in a similarly extreme way. Completion should also be fast and therefore the quality might not always be maximal. .. autodata:: recursion_limit .. autodata:: total_function_execution_limit .. autodata:: per_function_execution_limit .. autodata:: per_function_recursion_limit """ from contextlib import contextmanager from jedi import debug from jedi.inference.base_value import NO_VALUES recursion_limit = 15 """ Like ``sys.getrecursionlimit()``, just for |jedi|. """ total_function_execution_limit = 200 """ This is a hard limit of how many non-builtin functions can be executed. """ per_function_execution_limit = 6 """ The maximal amount of times a specific function may be executed. """ per_function_recursion_limit = 2 """ A function may not be executed more than this number of times recursively. """ class RecursionDetector(object): def __init__(self): self.pushed_nodes = [] @contextmanager def execution_allowed(inference_state, node): """ A decorator to detect recursions in statements. In a recursion a statement at the same place, in the same module may not be executed two times. """ pushed_nodes = inference_state.recursion_detector.pushed_nodes if node in pushed_nodes: debug.warning('catched stmt recursion: %s @%s', node, getattr(node, 'start_pos', None)) yield False else: try: pushed_nodes.append(node) yield True finally: pushed_nodes.pop() def execution_recursion_decorator(default=NO_VALUES): def decorator(func): def wrapper(self, **kwargs): detector = self.inference_state.execution_recursion_detector limit_reached = detector.push_execution(self) try: if limit_reached: result = default else: result = func(self, **kwargs) finally: detector.pop_execution() return result return wrapper return decorator class ExecutionRecursionDetector(object): """ Catches recursions of executions. """ def __init__(self, inference_state): self._inference_state = inference_state self._recursion_level = 0 self._parent_execution_funcs = [] self._funcdef_execution_counts = {} self._execution_count = 0 def pop_execution(self): self._parent_execution_funcs.pop() self._recursion_level -= 1 def push_execution(self, execution): funcdef = execution.tree_node # These two will be undone in pop_execution. self._recursion_level += 1 self._parent_execution_funcs.append(funcdef) module_context = execution.get_root_context() if module_context.is_builtins_module(): # We have control over builtins so we know they are not recursing # like crazy. Therefore we just let them execute always, because # they usually just help a lot with getting good results. return False if self._recursion_level > recursion_limit: debug.warning('Recursion limit (%s) reached', recursion_limit) return True if self._execution_count >= total_function_execution_limit: debug.warning('Function execution limit (%s) reached', total_function_execution_limit) return True self._execution_count += 1 if self._funcdef_execution_counts.setdefault(funcdef, 0) >= per_function_execution_limit: if module_context.py__name__() == 'typing': return False debug.warning( 'Per function execution limit (%s) reached: %s', per_function_execution_limit, funcdef ) return True self._funcdef_execution_counts[funcdef] += 1 if self._parent_execution_funcs.count(funcdef) > per_function_recursion_limit: debug.warning( 'Per function recursion limit (%s) reached: %s', per_function_recursion_limit, funcdef ) return True return False jedi-0.15.2/jedi/inference/context.py0000664000175000017500000004042013577124112017306 0ustar davedave00000000000000from abc import abstractmethod from contextlib import contextmanager from parso.tree import search_ancestor from parso.python.tree import Name from jedi.inference.filters import ParserTreeFilter, MergedFilter, \ GlobalNameFilter from jedi.inference.names import AnonymousParamName, TreeNameDefinition from jedi.inference.base_value import NO_VALUES, ValueSet from jedi.parser_utils import get_parent_scope from jedi import debug from jedi import parser_utils class AbstractContext(object): # Must be defined: inference_state and tree_node and parent_context as an attribute/property def __init__(self, inference_state): self.inference_state = inference_state self.predefined_names = {} @abstractmethod def get_filters(self, until_position=None, origin_scope=None): raise NotImplementedError def goto(self, name_or_str, position): from jedi.inference import finder filters = _get_global_filters_for_name( self, name_or_str if isinstance(name_or_str, Name) else None, position, ) names = finder.filter_name(filters, name_or_str) debug.dbg('context.goto %s in (%s): %s', name_or_str, self, names) return names def py__getattribute__(self, name_or_str, name_context=None, position=None, analysis_errors=True): """ :param position: Position of the last statement -> tuple of line, column """ if name_context is None: name_context = self names = self.goto(name_or_str, position) string_name = name_or_str.value if isinstance(name_or_str, Name) else name_or_str # This paragraph is currently needed for proper branch type inference # (static analysis). found_predefined_types = None if self.predefined_names and isinstance(name_or_str, Name): node = name_or_str while node is not None and not parser_utils.is_scope(node): node = node.parent if node.type in ("if_stmt", "for_stmt", "comp_for", 'sync_comp_for'): try: name_dict = self.predefined_names[node] types = name_dict[string_name] except KeyError: continue else: found_predefined_types = types break if found_predefined_types is not None and names: from jedi.inference import flow_analysis check = flow_analysis.reachability_check( context=self, value_scope=self.tree_node, node=name_or_str, ) if check is flow_analysis.UNREACHABLE: values = NO_VALUES else: values = found_predefined_types else: values = ValueSet.from_sets(name.infer() for name in names) if not names and not values and analysis_errors: if isinstance(name_or_str, Name): from jedi.inference import analysis message = ("NameError: name '%s' is not defined." % string_name) analysis.add(name_context, 'name-error', name_or_str, message) debug.dbg('context.names_to_types: %s -> %s', names, values) if values: return values return self._check_for_additional_knowledge(name_or_str, name_context, position) def _check_for_additional_knowledge(self, name_or_str, name_context, position): name_context = name_context or self # Add isinstance and other if/assert knowledge. if isinstance(name_or_str, Name) and not name_context.is_instance(): flow_scope = name_or_str base_nodes = [name_context.tree_node] if any(b.type in ('comp_for', 'sync_comp_for') for b in base_nodes): return NO_VALUES from jedi.inference.finder import check_flow_information while True: flow_scope = get_parent_scope(flow_scope, include_flows=True) n = check_flow_information(name_context, flow_scope, name_or_str, position) if n is not None: return n if flow_scope in base_nodes: break return NO_VALUES def get_root_context(self): parent_context = self.parent_context if parent_context is None: return self return parent_context.get_root_context() def is_module(self): return False def is_builtins_module(self): return False def is_class(self): return False def is_stub(self): return False def is_instance(self): return False def is_compiled(self): return False @abstractmethod def py__name__(self): raise NotImplementedError @property def name(self): return None def get_qualified_names(self): return () def py__doc__(self): return '' @contextmanager def predefine_names(self, flow_scope, dct): predefined = self.predefined_names predefined[flow_scope] = dct try: yield finally: del predefined[flow_scope] class ValueContext(AbstractContext): """ Should be defined, otherwise the API returns empty types. """ def __init__(self, value): super(ValueContext, self).__init__(value.inference_state) self._value = value @property def tree_node(self): return self._value.tree_node @property def parent_context(self): return self._value.parent_context def is_module(self): return self._value.is_module() def is_builtins_module(self): return self._value == self.inference_state.builtins_module def is_class(self): return self._value.is_class() def is_stub(self): return self._value.is_stub() def is_instance(self): return self._value.is_instance() def is_compiled(self): return self._value.is_compiled() def py__name__(self): return self._value.py__name__() @property def name(self): return self._value.name def get_qualified_names(self): return self._value.get_qualified_names() def py__doc__(self): return self._value.py__doc__() def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self._value) class TreeContextMixin(object): def infer_node(self, node): from jedi.inference.syntax_tree import infer_node return infer_node(self, node) def create_value(self, node): from jedi.inference import value if node == self.tree_node: assert self.is_module() return self.get_value() parent_context = self.create_context(node) if node.type in ('funcdef', 'lambdef'): func = value.FunctionValue.from_context(parent_context, node) if parent_context.is_class(): class_value = parent_context.parent_context.create_value(parent_context.tree_node) instance = value.AnonymousInstance( self.inference_state, parent_context.parent_context, class_value) func = value.BoundMethod( instance=instance, function=func ) return func elif node.type == 'classdef': return value.ClassValue(self.inference_state, parent_context, node) else: raise NotImplementedError("Probably shouldn't happen: %s" % node) def create_context(self, node): def from_scope_node(scope_node, is_nested=True): if scope_node == self.tree_node: return self if scope_node.type in ('funcdef', 'lambdef', 'classdef'): return self.create_value(scope_node).as_context() elif scope_node.type in ('comp_for', 'sync_comp_for'): parent_scope = parser_utils.get_parent_scope(scope_node) parent_context = from_scope_node(parent_scope) if node.start_pos >= scope_node.children[-1].start_pos: return parent_context return CompForContext(parent_context, scope_node) raise Exception("There's a scope that was not managed: %s" % scope_node) def parent_scope(node): while True: node = node.parent if parser_utils.is_scope(node): return node elif node.type in ('argument', 'testlist_comp'): if node.children[1].type in ('comp_for', 'sync_comp_for'): return node.children[1] elif node.type == 'dictorsetmaker': for n in node.children[1:4]: # In dictionaries it can be pretty much anything. if n.type in ('comp_for', 'sync_comp_for'): return n scope_node = parent_scope(node) if scope_node.type in ('funcdef', 'classdef'): colon = scope_node.children[scope_node.children.index(':')] if node.start_pos < colon.start_pos: parent = node.parent if not (parent.type == 'param' and parent.name == node): scope_node = parent_scope(scope_node) return from_scope_node(scope_node, is_nested=True) def create_name(self, tree_name): definition = tree_name.get_definition() if definition and definition.type == 'param' and definition.name == tree_name: funcdef = search_ancestor(definition, 'funcdef', 'lambdef') func = self.create_value(funcdef) return AnonymousParamName(func, tree_name) else: context = self.create_context(tree_name) return TreeNameDefinition(context, tree_name) class FunctionContext(TreeContextMixin, ValueContext): def get_filters(self, until_position=None, origin_scope=None): yield ParserTreeFilter( self.inference_state, parent_context=self, until_position=until_position, origin_scope=origin_scope ) class ModuleContext(TreeContextMixin, ValueContext): def py__file__(self): return self._value.py__file__() def get_filters(self, until_position=None, origin_scope=None): filters = self._value.get_filters(origin_scope) # Skip the first filter and replace it. next(filters) yield MergedFilter( ParserTreeFilter( parent_context=self, until_position=until_position, origin_scope=origin_scope ), GlobalNameFilter(self, self.tree_node), ) for f in filters: # Python 2... yield f @property def string_names(self): return self._value.string_names @property def code_lines(self): return self._value.code_lines def get_value(self): """ This is the only function that converts a context back to a value. This is necessary for stub -> python conversion and vice versa. However this method shouldn't be moved to AbstractContext. """ return self._value class NamespaceContext(TreeContextMixin, ValueContext): def get_filters(self, until_position=None, origin_scope=None): return self._value.get_filters() def get_value(self): return self._value def py__file__(self): return self._value.py__file__() class ClassContext(TreeContextMixin, ValueContext): def get_filters(self, until_position=None, origin_scope=None): yield self.get_global_filter(until_position, origin_scope) def get_global_filter(self, until_position=None, origin_scope=None): return ParserTreeFilter( parent_context=self, until_position=until_position, origin_scope=origin_scope ) class CompForContext(TreeContextMixin, AbstractContext): def __init__(self, parent_context, comp_for): super(CompForContext, self).__init__(parent_context.inference_state) self.tree_node = comp_for self.parent_context = parent_context def get_filters(self, until_position=None, origin_scope=None): yield ParserTreeFilter(self) def py__name__(self): return '' def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self.tree_node) class CompiledContext(ValueContext): def get_filters(self, until_position=None, origin_scope=None): return self._value.get_filters() class CompiledModuleContext(CompiledContext): code_lines = None def get_value(self): return self._value @property def string_names(self): return self._value.string_names def py__file__(self): return self._value.py__file__() def _get_global_filters_for_name(context, name_or_none, position): # For functions and classes the defaults don't belong to the # function and get inferred in the value before the function. So # make sure to exclude the function/class name. if name_or_none is not None: ancestor = search_ancestor(name_or_none, 'funcdef', 'classdef', 'lambdef') lambdef = None if ancestor == 'lambdef': # For lambdas it's even more complicated since parts will # be inferred later. lambdef = ancestor ancestor = search_ancestor(name_or_none, 'funcdef', 'classdef') if ancestor is not None: colon = ancestor.children[-2] if position is not None and position < colon.start_pos: if lambdef is None or position < lambdef.children[-2].start_pos: position = ancestor.start_pos return get_global_filters(context, position, name_or_none) def get_global_filters(context, until_position, origin_scope): """ Returns all filters in order of priority for name resolution. For global name lookups. The filters will handle name resolution themselves, but here we gather possible filters downwards. >>> from jedi._compatibility import u, no_unicode_pprint >>> from jedi import Script >>> script = Script(u(''' ... x = ['a', 'b', 'c'] ... def func(): ... y = None ... ''')) >>> module_node = script._module_node >>> scope = next(module_node.iter_funcdefs()) >>> scope >>> context = script._get_module_context().create_context(scope) >>> filters = list(get_global_filters(context, (4, 0), None)) First we get the names from the function scope. >>> no_unicode_pprint(filters[0]) # doctest: +ELLIPSIS MergedFilter(, ) >>> sorted(str(n) for n in filters[0].values()) # doctest: +NORMALIZE_WHITESPACE ['', ''] >>> filters[0]._filters[0]._until_position (4, 0) >>> filters[0]._filters[1]._until_position Then it yields the names from one level "lower". In this example, this is the module scope (including globals). As a side note, you can see, that the position in the filter is None on the globals filter, because there the whole module is searched. >>> list(filters[1].values()) # package modules -> Also empty. [] >>> sorted(name.string_name for name in filters[2].values()) # Module attributes ['__doc__', '__name__', '__package__'] Finally, it yields the builtin filter, if `include_builtin` is true (default). >>> list(filters[3].values()) # doctest: +ELLIPSIS [...] """ base_context = context from jedi.inference.value.function import BaseFunctionExecutionContext while context is not None: # Names in methods cannot be resolved within the class. for filter in context.get_filters( until_position=until_position, origin_scope=origin_scope): yield filter if isinstance(context, BaseFunctionExecutionContext): # The position should be reset if the current scope is a function. until_position = None context = context.parent_context # Add builtins to the global scope. yield next(base_context.inference_state.builtins_module.get_filters()) jedi-0.15.2/jedi/inference/helpers.py0000664000175000017500000001756713577124112017304 0ustar davedave00000000000000import copy import sys import re import os from itertools import chain from contextlib import contextmanager from parso.python import tree from jedi._compatibility import unicode from jedi.parser_utils import get_parent_scope def is_stdlib_path(path): # Python standard library paths look like this: # /usr/lib/python3.5/... # TODO The implementation below is probably incorrect and not complete. if 'dist-packages' in path or 'site-packages' in path: return False base_path = os.path.join(sys.prefix, 'lib', 'python') return bool(re.match(re.escape(base_path) + r'\d.\d', path)) def deep_ast_copy(obj): """ Much, much faster than copy.deepcopy, but just for parser tree nodes. """ # If it's already in the cache, just return it. new_obj = copy.copy(obj) # Copy children new_children = [] for child in obj.children: if isinstance(child, tree.Leaf): new_child = copy.copy(child) new_child.parent = new_obj else: new_child = deep_ast_copy(child) new_child.parent = new_obj new_children.append(new_child) new_obj.children = new_children return new_obj def infer_call_of_leaf(context, leaf, cut_own_trailer=False): """ Creates a "call" node that consist of all ``trailer`` and ``power`` objects. E.g. if you call it with ``append``:: list([]).append(3) or None You would get a node with the content ``list([]).append`` back. This generates a copy of the original ast node. If you're using the leaf, e.g. the bracket `)` it will return ``list([])``. We use this function for two purposes. Given an expression ``bar.foo``, we may want to - infer the type of ``foo`` to offer completions after foo - infer the type of ``bar`` to be able to jump to the definition of foo The option ``cut_own_trailer`` must be set to true for the second purpose. """ trailer = leaf.parent if trailer.type == 'fstring': from jedi.inference import compiled return compiled.get_string_value_set(context.inference_state) # The leaf may not be the last or first child, because there exist three # different trailers: `( x )`, `[ x ]` and `.x`. In the first two examples # we should not match anything more than x. if trailer.type != 'trailer' or leaf not in (trailer.children[0], trailer.children[-1]): if leaf == ':': # Basically happens with foo[:] when the cursor is on the colon from jedi.inference.base_value import NO_VALUES return NO_VALUES if trailer.type == 'atom': return context.infer_node(trailer) return context.infer_node(leaf) power = trailer.parent index = power.children.index(trailer) if cut_own_trailer: cut = index else: cut = index + 1 if power.type == 'error_node': start = index while True: start -= 1 base = power.children[start] if base.type != 'trailer': break trailers = power.children[start + 1: index + 1] else: base = power.children[0] trailers = power.children[1:cut] if base == 'await': base = trailers[0] trailers = trailers[1:] values = context.infer_node(base) from jedi.inference.syntax_tree import infer_trailer for trailer in trailers: values = infer_trailer(context, values, trailer) return values def call_of_leaf(leaf): """ Creates a "call" node that consist of all ``trailer`` and ``power`` objects. E.g. if you call it with ``append``:: list([]).append(3) or None You would get a node with the content ``list([]).append`` back. This generates a copy of the original ast node. If you're using the leaf, e.g. the bracket `)` it will return ``list([])``. """ # TODO this is the old version of this call. Try to remove it. trailer = leaf.parent # The leaf may not be the last or first child, because there exist three # different trailers: `( x )`, `[ x ]` and `.x`. In the first two examples # we should not match anything more than x. if trailer.type != 'trailer' or leaf not in (trailer.children[0], trailer.children[-1]): if trailer.type == 'atom': return trailer return leaf power = trailer.parent index = power.children.index(trailer) new_power = copy.copy(power) new_power.children = list(new_power.children) new_power.children[index + 1:] = [] if power.type == 'error_node': start = index while True: start -= 1 if power.children[start].type != 'trailer': break transformed = tree.Node('power', power.children[start:]) transformed.parent = power.parent return transformed return power def get_names_of_node(node): try: children = node.children except AttributeError: if node.type == 'name': return [node] else: return [] else: return list(chain.from_iterable(get_names_of_node(c) for c in children)) def get_module_names(module, all_scopes): """ Returns a dictionary with name parts as keys and their call paths as values. """ names = list(chain.from_iterable(module.get_used_names().values())) if not all_scopes: # We have to filter all the names that don't have the module as a # parent_scope. There's None as a parent, because nodes in the module # node have the parent module and not suite as all the others. # Therefore it's important to catch that case. def is_module_scope_name(name): parent_scope = get_parent_scope(name) # async functions have an extra wrapper. Strip it. if parent_scope and parent_scope.type == 'async_stmt': parent_scope = parent_scope.parent return parent_scope in (module, None) names = [n for n in names if is_module_scope_name(n)] return names def is_string(value): if value.inference_state.environment.version_info.major == 2: str_classes = (unicode, bytes) else: str_classes = (unicode,) return value.is_compiled() and isinstance(value.get_safe_value(default=None), str_classes) def is_literal(value): return is_number(value) or is_string(value) def _get_safe_value_or_none(value, accept): value = value.get_safe_value(default=None) if isinstance(value, accept): return value def get_int_or_none(value): return _get_safe_value_or_none(value, int) def get_str_or_none(value): return _get_safe_value_or_none(value, (bytes, unicode)) def is_number(value): return _get_safe_value_or_none(value, (int, float)) is not None class SimpleGetItemNotFound(Exception): pass @contextmanager def reraise_getitem_errors(*exception_classes): try: yield except exception_classes as e: raise SimpleGetItemNotFound(e) def parse_dotted_names(nodes, is_import_from, until_node=None): level = 0 names = [] for node in nodes[1:]: if node in ('.', '...'): if not names: level += len(node.value) elif node.type == 'dotted_name': for n in node.children[::2]: names.append(n) if n is until_node: break else: continue break elif node.type == 'name': names.append(node) if node is until_node: break elif node == ',': if not is_import_from: names = [] else: # Here if the keyword `import` comes along it stops checking # for names. break return level, names def values_from_qualified_names(inference_state, *names): return inference_state.import_module(names[:-1]).py__getattribute__(names[-1]) jedi-0.15.2/jedi/inference/param.py0000664000175000017500000002166013577124112016727 0ustar davedave00000000000000from collections import defaultdict from jedi import debug from jedi.inference.utils import PushBackIterator from jedi.inference import analysis from jedi.inference.lazy_value import LazyKnownValue, \ LazyTreeValue, LazyUnknownValue from jedi.inference.value import iterable from jedi._compatibility import Parameter from jedi.inference.names import ParamName def _add_argument_issue(error_name, lazy_value, message): if isinstance(lazy_value, LazyTreeValue): node = lazy_value.data if node.parent.type == 'argument': node = node.parent return analysis.add(lazy_value.context, error_name, node, message) class ExecutedParamName(ParamName): def __init__(self, function_value, arguments, param_node, lazy_value, is_default=False): super(ExecutedParamName, self).__init__( function_value, param_node.name, arguments=arguments) self._lazy_value = lazy_value self._is_default = is_default def infer(self): return self._lazy_value.infer() def matches_signature(self): if self._is_default: return True argument_values = self.infer().py__class__() if self.get_kind() in (Parameter.VAR_POSITIONAL, Parameter.VAR_KEYWORD): return True annotations = self.infer_annotation(execute_annotation=False) if not annotations: # If we cannot infer annotations - or there aren't any - pretend # that the signature matches. return True matches = any(c1.is_sub_class_of(c2) for c1 in argument_values for c2 in annotations.gather_annotation_classes()) debug.dbg("param compare %s: %s <=> %s", matches, argument_values, annotations, color='BLUE') return matches def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.string_name) def get_executed_param_names_and_issues(function_value, arguments): def too_many_args(argument): m = _error_argument_count(funcdef, len(unpacked_va)) # Just report an error for the first param that is not needed (like # cPython). if arguments.get_calling_nodes(): # There might not be a valid calling node so check for that first. issues.append( _add_argument_issue( 'type-error-too-many-arguments', argument, message=m ) ) else: issues.append(None) debug.warning('non-public warning: %s', m) issues = [] # List[Optional[analysis issue]] result_params = [] param_dict = {} funcdef = function_value.tree_node # Default params are part of the value where the function was defined. # This means that they might have access on class variables that the # function itself doesn't have. default_param_context = function_value.get_default_param_context() for param in funcdef.get_params(): param_dict[param.name.value] = param unpacked_va = list(arguments.unpack(funcdef)) var_arg_iterator = PushBackIterator(iter(unpacked_va)) non_matching_keys = defaultdict(lambda: []) keys_used = {} keys_only = False had_multiple_value_error = False for param in funcdef.get_params(): # The value and key can both be null. There, the defaults apply. # args / kwargs will just be empty arrays / dicts, respectively. # Wrong value count is just ignored. If you try to test cases that are # not allowed in Python, Jedi will maybe not show any completions. is_default = False key, argument = next(var_arg_iterator, (None, None)) while key is not None: keys_only = True try: key_param = param_dict[key] except KeyError: non_matching_keys[key] = argument else: if key in keys_used: had_multiple_value_error = True m = ("TypeError: %s() got multiple values for keyword argument '%s'." % (funcdef.name, key)) for contextualized_node in arguments.get_calling_nodes(): issues.append( analysis.add(contextualized_node.context, 'type-error-multiple-values', contextualized_node.node, message=m) ) else: keys_used[key] = ExecutedParamName( function_value, arguments, key_param, argument) key, argument = next(var_arg_iterator, (None, None)) try: result_params.append(keys_used[param.name.value]) continue except KeyError: pass if param.star_count == 1: # *args param lazy_value_list = [] if argument is not None: lazy_value_list.append(argument) for key, argument in var_arg_iterator: # Iterate until a key argument is found. if key: var_arg_iterator.push_back((key, argument)) break lazy_value_list.append(argument) seq = iterable.FakeTuple(function_value.inference_state, lazy_value_list) result_arg = LazyKnownValue(seq) elif param.star_count == 2: if argument is not None: too_many_args(argument) # **kwargs param dct = iterable.FakeDict(function_value.inference_state, dict(non_matching_keys)) result_arg = LazyKnownValue(dct) non_matching_keys = {} else: # normal param if argument is None: # No value: Return an empty container if param.default is None: result_arg = LazyUnknownValue() if not keys_only: for contextualized_node in arguments.get_calling_nodes(): m = _error_argument_count(funcdef, len(unpacked_va)) issues.append( analysis.add( contextualized_node.context, 'type-error-too-few-arguments', contextualized_node.node, message=m, ) ) else: result_arg = LazyTreeValue(default_param_context, param.default) is_default = True else: result_arg = argument result_params.append(ExecutedParamName( function_value, arguments, param, result_arg, is_default=is_default )) if not isinstance(result_arg, LazyUnknownValue): keys_used[param.name.value] = result_params[-1] if keys_only: # All arguments should be handed over to the next function. It's not # about the values inside, it's about the names. Jedi needs to now that # there's nothing to find for certain names. for k in set(param_dict) - set(keys_used): param = param_dict[k] if not (non_matching_keys or had_multiple_value_error or param.star_count or param.default): # add a warning only if there's not another one. for contextualized_node in arguments.get_calling_nodes(): m = _error_argument_count(funcdef, len(unpacked_va)) issues.append( analysis.add(contextualized_node.context, 'type-error-too-few-arguments', contextualized_node.node, message=m) ) for key, lazy_value in non_matching_keys.items(): m = "TypeError: %s() got an unexpected keyword argument '%s'." \ % (funcdef.name, key) issues.append( _add_argument_issue( 'type-error-keyword-argument', lazy_value, message=m ) ) remaining_arguments = list(var_arg_iterator) if remaining_arguments: first_key, lazy_value = remaining_arguments[0] too_many_args(lazy_value) return result_params, issues def get_executed_param_names(function_value, arguments): return get_executed_param_names_and_issues(function_value, arguments)[0] def _error_argument_count(funcdef, actual_count): params = funcdef.get_params() default_arguments = sum(1 for p in params if p.default or p.star_count) if default_arguments == 0: before = 'exactly ' else: before = 'from %s to ' % (len(params) - default_arguments) return ('TypeError: %s() takes %s%s arguments (%s given).' % (funcdef.name, before, len(params), actual_count)) jedi-0.15.2/jedi/inference/gradual/0000775000175000017500000000000013577125145016676 5ustar davedave00000000000000jedi-0.15.2/jedi/inference/gradual/stub_value.py0000664000175000017500000000750613577124112021422 0ustar davedave00000000000000from jedi.inference.base_value import ValueWrapper from jedi.inference.value.module import ModuleValue from jedi.inference.filters import ParserTreeFilter, \ TreeNameDefinition from jedi.inference.gradual.typing import TypingModuleFilterWrapper from jedi.inference.context import ModuleContext class StubModuleValue(ModuleValue): def __init__(self, non_stub_value_set, *args, **kwargs): super(StubModuleValue, self).__init__(*args, **kwargs) self.non_stub_value_set = non_stub_value_set def is_stub(self): return True def sub_modules_dict(self): """ We have to overwrite this, because it's possible to have stubs that don't have code for all the child modules. At the time of writing this there are for example no stubs for `json.tool`. """ names = {} for value in self.non_stub_value_set: try: method = value.sub_modules_dict except AttributeError: pass else: names.update(method()) names.update(super(StubModuleValue, self).sub_modules_dict()) return names def _get_first_non_stub_filters(self): for value in self.non_stub_value_set: yield next(value.get_filters()) def _get_stub_filters(self, origin_scope): return [StubFilter( parent_context=self.as_context(), origin_scope=origin_scope )] + list(self.iter_star_filters()) def get_filters(self, origin_scope=None): filters = super(StubModuleValue, self).get_filters(origin_scope) next(filters) # Ignore the first filter and replace it with our own stub_filters = self._get_stub_filters(origin_scope=origin_scope) for f in stub_filters: yield f for f in filters: yield f def _as_context(self): return StubModuleContext(self) class StubModuleContext(ModuleContext): def get_filters(self, until_position=None, origin_scope=None): # Make sure to ignore the position, because positions are not relevant # for stubs. return super(StubModuleContext, self).get_filters(origin_scope=origin_scope) class TypingModuleWrapper(StubModuleValue): def get_filters(self, *args, **kwargs): filters = super(TypingModuleWrapper, self).get_filters(*args, **kwargs) yield TypingModuleFilterWrapper(next(filters)) for f in filters: yield f def _as_context(self): return TypingModuleContext(self) class TypingModuleContext(ModuleContext): def get_filters(self, *args, **kwargs): filters = super(TypingModuleContext, self).get_filters(*args, **kwargs) yield TypingModuleFilterWrapper(next(filters)) for f in filters: yield f # From here on down we make looking up the sys.version_info fast. class _StubName(TreeNameDefinition): def infer(self): inferred = super(_StubName, self).infer() if self.string_name == 'version_info' and self.get_root_context().py__name__() == 'sys': return [VersionInfo(c) for c in inferred] return inferred class StubFilter(ParserTreeFilter): name_class = _StubName def _is_name_reachable(self, name): if not super(StubFilter, self)._is_name_reachable(name): return False # Imports in stub files are only public if they have an "as" # export. definition = name.get_definition() if definition.type in ('import_from', 'import_name'): if name.parent.type not in ('import_as_name', 'dotted_as_name'): return False n = name.value # TODO rewrite direct return if n.startswith('_') and not (n.startswith('__') and n.endswith('__')): return False return True class VersionInfo(ValueWrapper): pass jedi-0.15.2/jedi/inference/gradual/base.py0000664000175000017500000002551313577124112020161 0ustar davedave00000000000000from jedi.inference.cache import inference_state_method_cache from jedi.inference.base_value import ValueSet, NO_VALUES, Value, \ iterator_to_value_set, LazyValueWrapper, ValueWrapper from jedi.inference.compiled import builtin_from_name from jedi.inference.value.klass import ClassFilter from jedi.inference.value.klass import ClassMixin from jedi.inference.utils import to_list from jedi.inference.names import AbstractNameDefinition, ValueName from jedi.inference.context import ClassContext from jedi.inference.gradual.generics import TupleGenericManager class _BoundTypeVarName(AbstractNameDefinition): """ This type var was bound to a certain type, e.g. int. """ def __init__(self, type_var, value_set): self._type_var = type_var self.parent_context = type_var.parent_context self._value_set = value_set def infer(self): def iter_(): for value in self._value_set: # Replace any with the constraints if they are there. from jedi.inference.gradual.typing import Any if isinstance(value, Any): for constraint in self._type_var.constraints: yield constraint else: yield value return ValueSet(iter_()) def py__name__(self): return self._type_var.py__name__() def __repr__(self): return '<%s %s -> %s>' % (self.__class__.__name__, self.py__name__(), self._value_set) class _TypeVarFilter(object): """ A filter for all given variables in a class. A = TypeVar('A') B = TypeVar('B') class Foo(Mapping[A, B]): ... In this example we would have two type vars given: A and B """ def __init__(self, generics, type_vars): self._generics = generics self._type_vars = type_vars def get(self, name): for i, type_var in enumerate(self._type_vars): if type_var.py__name__() == name: try: return [_BoundTypeVarName(type_var, self._generics[i])] except IndexError: return [type_var.name] return [] def values(self): # The values are not relevant. If it's not searched exactly, the type # vars are just global and should be looked up as that. return [] class _AnnotatedClassContext(ClassContext): def get_filters(self, *args, **kwargs): filters = super(_AnnotatedClassContext, self).get_filters( *args, **kwargs ) for f in filters: yield f # The type vars can only be looked up if it's a global search and # not a direct lookup on the class. yield self._value.get_type_var_filter() class DefineGenericBase(LazyValueWrapper): def __init__(self, generics_manager): self._generics_manager = generics_manager def _create_instance_with_generics(self, generics_manager): raise NotImplementedError @inference_state_method_cache() def get_generics(self): return self._generics_manager.to_tuple() def define_generics(self, type_var_dict): from jedi.inference.gradual.type_var import TypeVar changed = False new_generics = [] for generic_set in self.get_generics(): values = NO_VALUES for generic in generic_set: if isinstance(generic, (GenericClass, TypeVar)): result = generic.define_generics(type_var_dict) values |= result if result != ValueSet({generic}): changed = True else: values |= ValueSet([generic]) new_generics.append(values) if not changed: # There might not be any type vars that change. In that case just # return itself, because it does not make sense to potentially lose # cached results. return ValueSet([self]) return ValueSet([self._create_instance_with_generics( TupleGenericManager(tuple(new_generics)) )]) def is_same_class(self, other): if not isinstance(other, DefineGenericBase): return False if self.tree_node != other.tree_node: # TODO not sure if this is nice. return False given_params1 = self.get_generics() given_params2 = other.get_generics() if len(given_params1) != len(given_params2): # If the amount of type vars doesn't match, the class doesn't # match. return False # Now compare generics return all( any( # TODO why is this ordering the correct one? cls2.is_same_class(cls1) for cls1 in class_set1 for cls2 in class_set2 ) for class_set1, class_set2 in zip(given_params1, given_params2) ) def __repr__(self): return '<%s: %s%s>' % ( self.__class__.__name__, self._wrapped_value, list(self.get_generics()), ) class GenericClass(ClassMixin, DefineGenericBase): """ A class that is defined with generics, might be something simple like: class Foo(Generic[T]): ... my_foo_int_cls = Foo[int] """ def __init__(self, class_value, generics_manager): super(GenericClass, self).__init__(generics_manager) self._class_value = class_value def _get_wrapped_value(self): return self._class_value def get_type_var_filter(self): return _TypeVarFilter(self.get_generics(), self.list_type_vars()) def py__call__(self, arguments): instance, = super(GenericClass, self).py__call__(arguments) return ValueSet([_GenericInstanceWrapper(instance)]) def _as_context(self): return _AnnotatedClassContext(self) @to_list def py__bases__(self): for base in self._wrapped_value.py__bases__(): yield _LazyGenericBaseClass(self, base) def _create_instance_with_generics(self, generics_manager): return GenericClass(self._class_value, generics_manager) def is_sub_class_of(self, class_value): if super(GenericClass, self).is_sub_class_of(class_value): return True return self._class_value.is_sub_class_of(class_value) class _LazyGenericBaseClass(object): def __init__(self, class_value, lazy_base_class): self._class_value = class_value self._lazy_base_class = lazy_base_class @iterator_to_value_set def infer(self): for base in self._lazy_base_class.infer(): if isinstance(base, GenericClass): # Here we have to recalculate the given types. yield GenericClass.create_cached( base.inference_state, base._wrapped_value, TupleGenericManager(tuple(self._remap_type_vars(base))), ) else: yield base def _remap_type_vars(self, base): from jedi.inference.gradual.type_var import TypeVar filter = self._class_value.get_type_var_filter() for type_var_set in base.get_generics(): new = NO_VALUES for type_var in type_var_set: if isinstance(type_var, TypeVar): names = filter.get(type_var.py__name__()) new |= ValueSet.from_sets( name.infer() for name in names ) else: # Mostly will be type vars, except if in some cases # a concrete type will already be there. In that # case just add it to the value set. new |= ValueSet([type_var]) yield new class _GenericInstanceWrapper(ValueWrapper): def py__stop_iteration_returns(self): for cls in self._wrapped_value.class_value.py__mro__(): if cls.py__name__() == 'Generator': generics = cls.get_generics() try: return generics[2].execute_annotation() except IndexError: pass elif cls.py__name__() == 'Iterator': return ValueSet([builtin_from_name(self.inference_state, u'None')]) return self._wrapped_value.py__stop_iteration_returns() class _PseudoTreeNameClass(Value): """ In typeshed, some classes are defined like this: Tuple: _SpecialForm = ... Now this is not a real class, therefore we have to do some workarounds like this class. Essentially this class makes it possible to goto that `Tuple` name, without affecting anything else negatively. """ def __init__(self, parent_context, tree_name): super(_PseudoTreeNameClass, self).__init__( parent_context.inference_state, parent_context ) self._tree_name = tree_name @property def tree_node(self): return self._tree_name def get_filters(self, *args, **kwargs): # TODO this is obviously wrong. Is it though? class EmptyFilter(ClassFilter): def __init__(self): pass def get(self, name, **kwargs): return [] def values(self, **kwargs): return [] yield EmptyFilter() def py__class__(self): # TODO this is obviously not correct, but at least gives us a class if # we have none. Some of these objects don't really have a base class in # typeshed. return builtin_from_name(self.inference_state, u'object') @property def name(self): return ValueName(self, self._tree_name) def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self._tree_name.value) class BaseTypingValue(LazyValueWrapper): def __init__(self, parent_context, tree_name): self.inference_state = parent_context.inference_state self.parent_context = parent_context self._tree_name = tree_name @property def name(self): return ValueName(self, self._tree_name) def _get_wrapped_value(self): return _PseudoTreeNameClass(self.parent_context, self._tree_name) def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self._tree_name.value) class BaseTypingValueWithGenerics(DefineGenericBase): def __init__(self, parent_context, tree_name, generics_manager): super(BaseTypingValueWithGenerics, self).__init__(generics_manager) self.inference_state = parent_context.inference_state self.parent_context = parent_context self._tree_name = tree_name def _get_wrapped_value(self): return _PseudoTreeNameClass(self.parent_context, self._tree_name) def __repr__(self): return '%s(%s%s)' % (self.__class__.__name__, self._tree_name.value, self._generics_manager) jedi-0.15.2/jedi/inference/gradual/typing.py0000664000175000017500000002717113577124112020563 0ustar davedave00000000000000""" We need to somehow work with the typing objects. Since the typing objects are pretty bare we need to add all the Jedi customizations to make them work as values. This file deals with all the typing.py cases. """ from jedi import debug from jedi.inference.compiled import builtin_from_name from jedi.inference.base_value import ValueSet, NO_VALUES, Value, \ LazyValueWrapper from jedi.inference.lazy_value import LazyKnownValues from jedi.inference.arguments import repack_with_argument_clinic from jedi.inference.filters import FilterWrapper from jedi.inference.names import NameWrapper, ValueName from jedi.inference.value.klass import ClassMixin from jedi.inference.gradual.base import BaseTypingValue, BaseTypingValueWithGenerics from jedi.inference.gradual.type_var import TypeVarClass from jedi.inference.gradual.generics import LazyGenericManager _PROXY_CLASS_TYPES = 'Tuple Generic Protocol Callable Type'.split() _TYPE_ALIAS_TYPES = { 'List': 'builtins.list', 'Dict': 'builtins.dict', 'Set': 'builtins.set', 'FrozenSet': 'builtins.frozenset', 'ChainMap': 'collections.ChainMap', 'Counter': 'collections.Counter', 'DefaultDict': 'collections.defaultdict', 'Deque': 'collections.deque', } _PROXY_TYPES = 'Optional Union ClassVar'.split() class TypingModuleName(NameWrapper): def infer(self): return ValueSet(self._remap()) def _remap(self): name = self.string_name inference_state = self.parent_context.inference_state try: actual = _TYPE_ALIAS_TYPES[name] except KeyError: pass else: yield TypeAlias.create_cached( inference_state, self.parent_context, self.tree_name, actual) return if name in _PROXY_CLASS_TYPES: yield ProxyTypingClassValue.create_cached( inference_state, self.parent_context, self.tree_name) elif name in _PROXY_TYPES: yield ProxyTypingValue.create_cached( inference_state, self.parent_context, self.tree_name) elif name == 'runtime': # We don't want anything here, not sure what this function is # supposed to do, since it just appears in the stubs and shouldn't # have any effects there (because it's never executed). return elif name == 'TypeVar': yield TypeVarClass.create_cached( inference_state, self.parent_context, self.tree_name) elif name == 'Any': yield Any.create_cached( inference_state, self.parent_context, self.tree_name) elif name == 'TYPE_CHECKING': # This is needed for e.g. imports that are only available for type # checking or are in cycles. The user can then check this variable. yield builtin_from_name(inference_state, u'True') elif name == 'overload': yield OverloadFunction.create_cached( inference_state, self.parent_context, self.tree_name) elif name == 'NewType': yield NewTypeFunction.create_cached( inference_state, self.parent_context, self.tree_name) elif name == 'cast': yield CastFunction.create_cached( inference_state, self.parent_context, self.tree_name) elif name == 'TypedDict': # TODO doesn't even exist in typeshed/typing.py, yet. But will be # added soon. pass elif name in ('no_type_check', 'no_type_check_decorator'): # This is not necessary, as long as we are not doing type checking. for c in self._wrapped_name.infer(): # Fuck my life Python 2 yield c else: # Everything else shouldn't be relevant for type checking. for c in self._wrapped_name.infer(): # Fuck my life Python 2 yield c class TypingModuleFilterWrapper(FilterWrapper): name_wrapper_class = TypingModuleName class TypingValueWithIndex(BaseTypingValueWithGenerics): def execute_annotation(self): string_name = self._tree_name.value if string_name == 'Union': # This is kind of a special case, because we have Unions (in Jedi # ValueSets). return self.gather_annotation_classes().execute_annotation() elif string_name == 'Optional': # Optional is basically just saying it's either None or the actual # type. return self.gather_annotation_classes().execute_annotation() \ | ValueSet([builtin_from_name(self.inference_state, u'None')]) elif string_name == 'Type': # The type is actually already given in the index_value return self._generics_manager[0] elif string_name == 'ClassVar': # For now don't do anything here, ClassVars are always used. return self._generics_manager[0].execute_annotation() mapped = { 'Tuple': Tuple, 'Generic': Generic, 'Protocol': Protocol, 'Callable': Callable, } cls = mapped[string_name] return ValueSet([cls( self.parent_context, self._tree_name, generics_manager=self._generics_manager, )]) def gather_annotation_classes(self): return ValueSet.from_sets(self._generics_manager.to_tuple()) def _create_instance_with_generics(self, generics_manager): return TypingValueWithIndex( self.parent_context, self._tree_name, generics_manager ) class ProxyTypingValue(BaseTypingValue): index_class = TypingValueWithIndex py__simple_getitem__ = None def py__getitem__(self, index_value_set, contextualized_node): return ValueSet( self.index_class.create_cached( self.inference_state, self.parent_context, self._tree_name, generics_manager=LazyGenericManager( context_of_index=contextualized_node.context, index_value=index_value, ) ) for index_value in index_value_set ) class _TypingClassMixin(ClassMixin): def py__bases__(self): return [LazyKnownValues( self.inference_state.builtins_module.py__getattribute__('object') )] def get_metaclasses(self): return [] @property def name(self): return ValueName(self, self._tree_name) class TypingClassValueWithIndex(_TypingClassMixin, TypingValueWithIndex): pass class ProxyTypingClassValue(_TypingClassMixin, ProxyTypingValue): index_class = TypingClassValueWithIndex class TypeAlias(LazyValueWrapper): def __init__(self, parent_context, origin_tree_name, actual): self.inference_state = parent_context.inference_state self.parent_context = parent_context self._origin_tree_name = origin_tree_name self._actual = actual # e.g. builtins.list @property def name(self): return ValueName(self, self._origin_tree_name) def py__name__(self): return self.name.string_name def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._actual) def _get_wrapped_value(self): module_name, class_name = self._actual.split('.') if self.inference_state.environment.version_info.major == 2 and module_name == 'builtins': module_name = '__builtin__' # TODO use inference_state.import_module? from jedi.inference.imports import Importer module, = Importer( self.inference_state, [module_name], self.inference_state.builtins_module ).follow() classes = module.py__getattribute__(class_name) # There should only be one, because it's code that we control. assert len(classes) == 1, classes cls = next(iter(classes)) return cls def gather_annotation_classes(self): return ValueSet([self._get_wrapped_value()]) class Callable(BaseTypingValueWithGenerics): def py__call__(self, arguments): """ def x() -> Callable[[Callable[..., _T]], _T]: ... """ # The 0th index are the arguments. try: param_values = self._generics_manager[0] result_values = self._generics_manager[1] except IndexError: debug.warning('Callable[...] defined without two arguments') return NO_VALUES else: from jedi.inference.gradual.annotation import infer_return_for_callable return infer_return_for_callable(arguments, param_values, result_values) class Tuple(LazyValueWrapper): def __init__(self, parent_context, name, generics_manager): self.inference_state = parent_context.inference_state self.parent_context = parent_context self._generics_manager = generics_manager def _is_homogenous(self): # To specify a variable-length tuple of homogeneous type, Tuple[T, ...] # is used. return self._generics_manager.is_homogenous_tuple() def py__simple_getitem__(self, index): if self._is_homogenous(): return self._generics_manager.get_index_and_execute(0) else: if isinstance(index, int): return self._generics_manager.get_index_and_execute(index) debug.dbg('The getitem type on Tuple was %s' % index) return NO_VALUES def py__iter__(self, contextualized_node=None): if self._is_homogenous(): yield LazyKnownValues(self._generics_manager.get_index_and_execute(0)) else: for v in self._generics_manager.to_tuple(): yield LazyKnownValues(v.execute_annotation()) def py__getitem__(self, index_value_set, contextualized_node): if self._is_homogenous(): return self._generics_manager.get_index_and_execute(0) return ValueSet.from_sets( self._generics_manager.to_tuple() ).execute_annotation() def _get_wrapped_value(self): tuple_, = self.inference_state.builtins_module \ .py__getattribute__('tuple').execute_annotation() return tuple_ class Generic(BaseTypingValueWithGenerics): pass class Protocol(BaseTypingValueWithGenerics): pass class Any(BaseTypingValue): def execute_annotation(self): debug.warning('Used Any - returned no results') return NO_VALUES class OverloadFunction(BaseTypingValue): @repack_with_argument_clinic('func, /') def py__call__(self, func_value_set): # Just pass arguments through. return func_value_set class NewTypeFunction(BaseTypingValue): def py__call__(self, arguments): ordered_args = arguments.unpack() next(ordered_args, (None, None)) _, second_arg = next(ordered_args, (None, None)) if second_arg is None: return NO_VALUES return ValueSet( NewType( self.inference_state, contextualized_node.context, contextualized_node.node, second_arg.infer(), ) for contextualized_node in arguments.get_calling_nodes()) class NewType(Value): def __init__(self, inference_state, parent_context, tree_node, type_value_set): super(NewType, self).__init__(inference_state, parent_context) self._type_value_set = type_value_set self.tree_node = tree_node def py__call__(self, arguments): return self._type_value_set.execute_annotation() class CastFunction(BaseTypingValue): @repack_with_argument_clinic('type, object, /') def py__call__(self, type_value_set, object_value_set): return type_value_set.execute_annotation() jedi-0.15.2/jedi/inference/gradual/typeshed.py0000664000175000017500000002415713577124112021077 0ustar davedave00000000000000import os import re from functools import wraps from jedi.file_io import FileIO from jedi._compatibility import FileNotFoundError, cast_path from jedi.parser_utils import get_cached_code_lines from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference.gradual.stub_value import TypingModuleWrapper, StubModuleValue from jedi.inference.value import ModuleValue _jedi_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) TYPESHED_PATH = os.path.join(_jedi_path, 'third_party', 'typeshed') _IMPORT_MAP = dict( _collections='collections', _socket='socket', ) def _merge_create_stub_map(directories): map_ = {} for directory in directories: map_.update(_create_stub_map(directory)) return map_ def _create_stub_map(directory): """ Create a mapping of an importable name in Python to a stub file. """ def generate(): try: listed = os.listdir(directory) except (FileNotFoundError, OSError): # OSError is Python 2 return for entry in listed: entry = cast_path(entry) path = os.path.join(directory, entry) if os.path.isdir(path): init = os.path.join(path, '__init__.pyi') if os.path.isfile(init): yield entry, init elif entry.endswith('.pyi') and os.path.isfile(path): name = entry[:-4] if name != '__init__': yield name, path # Create a dictionary from the tuple generator. return dict(generate()) def _get_typeshed_directories(version_info): check_version_list = ['2and3', str(version_info.major)] for base in ['stdlib', 'third_party']: base = os.path.join(TYPESHED_PATH, base) base_list = os.listdir(base) for base_list_entry in base_list: match = re.match(r'(\d+)\.(\d+)$', base_list_entry) if match is not None: if int(match.group(1)) == version_info.major \ and int(match.group(2)) <= version_info.minor: check_version_list.append(base_list_entry) for check_version in check_version_list: yield os.path.join(base, check_version) _version_cache = {} def _cache_stub_file_map(version_info): """ Returns a map of an importable name in Python to a stub file. """ # TODO this caches the stub files indefinitely, maybe use a time cache # for that? version = version_info[:2] try: return _version_cache[version] except KeyError: pass _version_cache[version] = file_set = \ _merge_create_stub_map(_get_typeshed_directories(version_info)) return file_set def import_module_decorator(func): @wraps(func) def wrapper(inference_state, import_names, parent_module_value, sys_path, prefer_stubs): try: python_value_set = inference_state.module_cache.get(import_names) except KeyError: if parent_module_value is not None and parent_module_value.is_stub(): parent_module_values = parent_module_value.non_stub_value_set else: parent_module_values = [parent_module_value] if import_names == ('os', 'path'): # This is a huge exception, we follow a nested import # ``os.path``, because it's a very important one in Python # that is being achieved by messing with ``sys.modules`` in # ``os``. python_parent = next(iter(parent_module_values)) if python_parent is None: python_parent, = inference_state.import_module(('os',), prefer_stubs=False) python_value_set = ValueSet.from_sets( func(inference_state, (n,), None, sys_path,) for n in [u'posixpath', u'ntpath', u'macpath', u'os2emxpath'] ) else: python_value_set = ValueSet.from_sets( func(inference_state, import_names, p, sys_path,) for p in parent_module_values ) inference_state.module_cache.add(import_names, python_value_set) if not prefer_stubs: return python_value_set stub = _try_to_load_stub_cached(inference_state, import_names, python_value_set, parent_module_value, sys_path) if stub is not None: return ValueSet([stub]) return python_value_set return wrapper def _try_to_load_stub_cached(inference_state, import_names, *args, **kwargs): try: return inference_state.stub_module_cache[import_names] except KeyError: pass # TODO is this needed? where are the exceptions coming from that make this # necessary? Just remove this line. inference_state.stub_module_cache[import_names] = None inference_state.stub_module_cache[import_names] = result = \ _try_to_load_stub(inference_state, import_names, *args, **kwargs) return result def _try_to_load_stub(inference_state, import_names, python_value_set, parent_module_value, sys_path): """ Trying to load a stub for a set of import_names. This is modelled to work like "PEP 561 -- Distributing and Packaging Type Information", see https://www.python.org/dev/peps/pep-0561. """ if parent_module_value is None and len(import_names) > 1: try: parent_module_value = _try_to_load_stub_cached( inference_state, import_names[:-1], NO_VALUES, parent_module_value=None, sys_path=sys_path) except KeyError: pass # 1. Try to load foo-stubs folders on path for import name foo. if len(import_names) == 1: # foo-stubs for p in sys_path: p = cast_path(p) init = os.path.join(p, *import_names) + '-stubs' + os.path.sep + '__init__.pyi' m = _try_to_load_stub_from_file( inference_state, python_value_set, file_io=FileIO(init), import_names=import_names, ) if m is not None: return m # 2. Try to load pyi files next to py files. for c in python_value_set: try: method = c.py__file__ except AttributeError: pass else: file_path = method() file_paths = [] if c.is_namespace(): file_paths = [os.path.join(p, '__init__.pyi') for p in c.py__path__()] elif file_path is not None and file_path.endswith('.py'): file_paths = [file_path + 'i'] for file_path in file_paths: m = _try_to_load_stub_from_file( inference_state, python_value_set, # The file path should end with .pyi file_io=FileIO(file_path), import_names=import_names, ) if m is not None: return m # 3. Try to load typeshed m = _load_from_typeshed(inference_state, python_value_set, parent_module_value, import_names) if m is not None: return m # 4. Try to load pyi file somewhere if python_value_set was not defined. if not python_value_set: if parent_module_value is not None: check_path = parent_module_value.py__path__() or [] # In case import_names names_for_path = (import_names[-1],) else: check_path = sys_path names_for_path = import_names for p in check_path: m = _try_to_load_stub_from_file( inference_state, python_value_set, file_io=FileIO(os.path.join(p, *names_for_path) + '.pyi'), import_names=import_names, ) if m is not None: return m # If no stub is found, that's fine, the calling function has to deal with # it. return None def _load_from_typeshed(inference_state, python_value_set, parent_module_value, import_names): import_name = import_names[-1] map_ = None if len(import_names) == 1: map_ = _cache_stub_file_map(inference_state.grammar.version_info) import_name = _IMPORT_MAP.get(import_name, import_name) elif isinstance(parent_module_value, ModuleValue): if not parent_module_value.is_package(): # Only if it's a package (= a folder) something can be # imported. return None path = parent_module_value.py__path__() map_ = _merge_create_stub_map(path) if map_ is not None: path = map_.get(import_name) if path is not None: return _try_to_load_stub_from_file( inference_state, python_value_set, file_io=FileIO(path), import_names=import_names, ) def _try_to_load_stub_from_file(inference_state, python_value_set, file_io, import_names): try: stub_module_node = inference_state.parse( file_io=file_io, cache=True, use_latest_grammar=True ) except (OSError, IOError): # IOError is Python 2 only # The file that you're looking for doesn't exist (anymore). return None else: return create_stub_module( inference_state, python_value_set, stub_module_node, file_io, import_names ) def create_stub_module(inference_state, python_value_set, stub_module_node, file_io, import_names): if import_names == ('typing',): module_cls = TypingModuleWrapper else: module_cls = StubModuleValue file_name = os.path.basename(file_io.path) stub_module_value = module_cls( python_value_set, inference_state, stub_module_node, file_io=file_io, string_names=import_names, # The code was loaded with latest_grammar, so use # that. code_lines=get_cached_code_lines(inference_state.latest_grammar, file_io.path), is_package=file_name == '__init__.pyi', ) return stub_module_value jedi-0.15.2/jedi/inference/gradual/utils.py0000664000175000017500000000205613577124112020404 0ustar davedave00000000000000import os from jedi.inference.gradual.typeshed import TYPESHED_PATH, create_stub_module def load_proper_stub_module(inference_state, file_io, import_names, module_node): """ This function is given a random .pyi file and should return the proper module. """ path = file_io.path assert path.endswith('.pyi') if path.startswith(TYPESHED_PATH): # /foo/stdlib/3/os/__init__.pyi -> stdlib/3/os/__init__ rest = path[len(TYPESHED_PATH) + 1: -4] split_paths = tuple(rest.split(os.path.sep)) # Remove the stdlib/3 or third_party/3.5 part import_names = split_paths[2:] if import_names[-1] == '__init__': import_names = import_names[:-1] if import_names is not None: actual_value_set = inference_state.import_module(import_names, prefer_stubs=False) stub = create_stub_module( inference_state, actual_value_set, module_node, file_io, import_names ) inference_state.stub_module_cache[import_names] = stub return stub return None jedi-0.15.2/jedi/inference/gradual/__init__.py0000664000175000017500000000000013577124112020766 0ustar davedave00000000000000jedi-0.15.2/jedi/inference/gradual/type_var.py0000664000175000017500000000724613577124112021103 0ustar davedave00000000000000from jedi._compatibility import unicode, force_unicode from jedi import debug from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference.gradual.base import BaseTypingValue class TypeVarClass(BaseTypingValue): def py__call__(self, arguments): unpacked = arguments.unpack() key, lazy_value = next(unpacked, (None, None)) var_name = self._find_string_name(lazy_value) # The name must be given, otherwise it's useless. if var_name is None or key is not None: debug.warning('Found a variable without a name %s', arguments) return NO_VALUES return ValueSet([TypeVar.create_cached( self.inference_state, self.parent_context, self._tree_name, var_name, unpacked )]) def _find_string_name(self, lazy_value): if lazy_value is None: return None value_set = lazy_value.infer() if not value_set: return None if len(value_set) > 1: debug.warning('Found multiple values for a type variable: %s', value_set) name_value = next(iter(value_set)) try: method = name_value.get_safe_value except AttributeError: return None else: safe_value = method(default=None) if self.inference_state.environment.version_info.major == 2: if isinstance(safe_value, bytes): return force_unicode(safe_value) if isinstance(safe_value, (str, unicode)): return safe_value return None class TypeVar(BaseTypingValue): def __init__(self, parent_context, tree_name, var_name, unpacked_args): super(TypeVar, self).__init__(parent_context, tree_name) self._var_name = var_name self._constraints_lazy_values = [] self._bound_lazy_value = None self._covariant_lazy_value = None self._contravariant_lazy_value = None for key, lazy_value in unpacked_args: if key is None: self._constraints_lazy_values.append(lazy_value) else: if key == 'bound': self._bound_lazy_value = lazy_value elif key == 'covariant': self._covariant_lazy_value = lazy_value elif key == 'contravariant': self._contra_variant_lazy_value = lazy_value else: debug.warning('Invalid TypeVar param name %s', key) def py__name__(self): return self._var_name def get_filters(self, *args, **kwargs): return iter([]) def _get_classes(self): if self._bound_lazy_value is not None: return self._bound_lazy_value.infer() if self._constraints_lazy_values: return self.constraints debug.warning('Tried to infer the TypeVar %s without a given type', self._var_name) return NO_VALUES def is_same_class(self, other): # Everything can match an undefined type var. return True @property def constraints(self): return ValueSet.from_sets( lazy.infer() for lazy in self._constraints_lazy_values ) def define_generics(self, type_var_dict): try: found = type_var_dict[self.py__name__()] except KeyError: pass else: if found: return found return self._get_classes() or ValueSet({self}) def execute_annotation(self): return self._get_classes().execute_annotation() def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.py__name__()) jedi-0.15.2/jedi/inference/gradual/generics.py0000664000175000017500000000572013577124112021044 0ustar davedave00000000000000""" This module is about generics, like the `int` in `List[int]`. It's not about the Generic class. """ from jedi import debug from jedi.cache import memoize_method from jedi.inference.utils import to_tuple from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference.value.iterable import SequenceLiteralValue from jedi.inference.helpers import is_string def _resolve_forward_references(context, value_set): for value in value_set: if is_string(value): from jedi.inference.gradual.annotation import _get_forward_reference_node node = _get_forward_reference_node(context, value.get_safe_value()) if node is not None: for c in context.infer_node(node): yield c else: yield value class _AbstractGenericManager(object): def get_index_and_execute(self, index): try: return self[index].execute_annotation() except IndexError: debug.warning('No param #%s found for annotation %s', index, self) return NO_VALUES class LazyGenericManager(_AbstractGenericManager): def __init__(self, context_of_index, index_value): self._context_of_index = context_of_index self._index_value = index_value @memoize_method def __getitem__(self, index): return self._tuple()[index]() def __len__(self): return len(self._tuple()) @memoize_method @to_tuple def _tuple(self): def lambda_scoping_in_for_loop_sucks(lazy_value): return lambda: ValueSet(_resolve_forward_references( self._context_of_index, lazy_value.infer() )) if isinstance(self._index_value, SequenceLiteralValue): for lazy_value in self._index_value.py__iter__(contextualized_node=None): yield lambda_scoping_in_for_loop_sucks(lazy_value) else: yield lambda: ValueSet(_resolve_forward_references( self._context_of_index, ValueSet([self._index_value]) )) @to_tuple def to_tuple(self): for callable_ in self._tuple(): yield callable_() def is_homogenous_tuple(self): if isinstance(self._index_value, SequenceLiteralValue): entries = self._index_value.get_tree_entries() if len(entries) == 2 and entries[1] == '...': return True return False def __repr__(self): return '[%s]' % (', '.join(repr(x) for x in self.to_tuple())) class TupleGenericManager(_AbstractGenericManager): def __init__(self, tup): self._tuple = tup def __getitem__(self, index): return self._tuple[index] def __len__(self): return len(self._tuple) def to_tuple(self): return self._tuple def is_homogenous_tuple(self): return False def __repr__(self): return '[%s]' % (', '.join(repr(x) for x in self.to_tuple())) jedi-0.15.2/jedi/inference/gradual/conversion.py0000664000175000017500000001522013577124112021426 0ustar davedave00000000000000from jedi import debug from jedi.inference.base_value import ValueSet, \ NO_VALUES from jedi.inference.utils import to_list from jedi.inference.gradual.stub_value import StubModuleValue def _stub_to_python_value_set(stub_value, ignore_compiled=False): stub_module_context = stub_value.get_root_context() if not stub_module_context.is_stub(): return ValueSet([stub_value]) was_instance = stub_value.is_instance() if was_instance: stub_value = stub_value.py__class__() qualified_names = stub_value.get_qualified_names() if qualified_names is None: return NO_VALUES was_bound_method = stub_value.is_bound_method() if was_bound_method: # Infer the object first. We can infer the method later. method_name = qualified_names[-1] qualified_names = qualified_names[:-1] was_instance = True values = _infer_from_stub(stub_module_context, qualified_names, ignore_compiled) if was_instance: values = ValueSet.from_sets( c.execute_with_values() for c in values if c.is_class() ) if was_bound_method: # Now that the instance has been properly created, we can simply get # the method. values = values.py__getattribute__(method_name) return values def _infer_from_stub(stub_module_context, qualified_names, ignore_compiled): from jedi.inference.compiled.mixed import MixedObject stub_module = stub_module_context.get_value() assert isinstance(stub_module, (StubModuleValue, MixedObject)), stub_module_context non_stubs = stub_module.non_stub_value_set if ignore_compiled: non_stubs = non_stubs.filter(lambda c: not c.is_compiled()) for name in qualified_names: non_stubs = non_stubs.py__getattribute__(name) return non_stubs @to_list def _try_stub_to_python_names(names, prefer_stub_to_compiled=False): for name in names: module_context = name.get_root_context() if not module_context.is_stub(): yield name continue name_list = name.get_qualified_names() if name_list is None: values = NO_VALUES else: values = _infer_from_stub( module_context, name_list[:-1], ignore_compiled=prefer_stub_to_compiled, ) if values and name_list: new_names = values.goto(name_list[-1]) for new_name in new_names: yield new_name if new_names: continue elif values: for c in values: yield c.name continue # This is the part where if we haven't found anything, just return the # stub name. yield name def _load_stub_module(module): if module.is_stub(): return module from jedi.inference.gradual.typeshed import _try_to_load_stub_cached return _try_to_load_stub_cached( module.inference_state, import_names=module.string_names, python_value_set=ValueSet([module]), parent_module_value=None, sys_path=module.inference_state.get_sys_path(), ) @to_list def _python_to_stub_names(names, fallback_to_python=False): for name in names: module_context = name.get_root_context() if module_context.is_stub(): yield name continue if name.is_import(): for new_name in name.goto(): # Imports don't need to be converted, because they are already # stubs if possible. if fallback_to_python or new_name.is_stub(): yield new_name continue name_list = name.get_qualified_names() stubs = NO_VALUES if name_list is not None: stub_module = _load_stub_module(module_context.get_value()) if stub_module is not None: stubs = ValueSet({stub_module}) for name in name_list[:-1]: stubs = stubs.py__getattribute__(name) if stubs and name_list: new_names = stubs.goto(name_list[-1]) for new_name in new_names: yield new_name if new_names: continue elif stubs: for c in stubs: yield c.name continue if fallback_to_python: # This is the part where if we haven't found anything, just return # the stub name. yield name def convert_names(names, only_stubs=False, prefer_stubs=False): assert not (only_stubs and prefer_stubs) with debug.increase_indent_cm('convert names'): if only_stubs or prefer_stubs: return _python_to_stub_names(names, fallback_to_python=prefer_stubs) else: return _try_stub_to_python_names(names, prefer_stub_to_compiled=True) def convert_values(values, only_stubs=False, prefer_stubs=False, ignore_compiled=True): assert not (only_stubs and prefer_stubs) with debug.increase_indent_cm('convert values'): if only_stubs or prefer_stubs: return ValueSet.from_sets( to_stub(value) or (ValueSet({value}) if prefer_stubs else NO_VALUES) for value in values ) else: return ValueSet.from_sets( _stub_to_python_value_set(stub_value, ignore_compiled=ignore_compiled) or ValueSet({stub_value}) for stub_value in values ) # TODO merge with _python_to_stub_names? def to_stub(value): if value.is_stub(): return ValueSet([value]) was_instance = value.is_instance() if was_instance: value = value.py__class__() qualified_names = value.get_qualified_names() stub_module = _load_stub_module(value.get_root_context().get_value()) if stub_module is None or qualified_names is None: return NO_VALUES was_bound_method = value.is_bound_method() if was_bound_method: # Infer the object first. We can infer the method later. method_name = qualified_names[-1] qualified_names = qualified_names[:-1] was_instance = True stub_values = ValueSet([stub_module]) for name in qualified_names: stub_values = stub_values.py__getattribute__(name) if was_instance: stub_values = ValueSet.from_sets( c.execute_with_values() for c in stub_values if c.is_class() ) if was_bound_method: # Now that the instance has been properly created, we can simply get # the method. stub_values = stub_values.py__getattribute__(method_name) return stub_values jedi-0.15.2/jedi/inference/gradual/annotation.py0000664000175000017500000004122313577124112021415 0ustar davedave00000000000000""" PEP 0484 ( https://www.python.org/dev/peps/pep-0484/ ) describes type hints through function annotations. There is a strong suggestion in this document that only the type of type hinting defined in PEP0484 should be allowed as annotations in future python versions. """ import re from parso import ParserSyntaxError, parse from jedi._compatibility import force_unicode, Parameter from jedi.inference.cache import inference_state_method_cache from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference.gradual.base import DefineGenericBase, GenericClass from jedi.inference.gradual.generics import TupleGenericManager from jedi.inference.gradual.typing import TypingClassValueWithIndex from jedi.inference.gradual.type_var import TypeVar from jedi.inference.helpers import is_string from jedi.inference.compiled import builtin_from_name from jedi.inference.param import get_executed_param_names from jedi import debug from jedi import parser_utils def infer_annotation(context, annotation): """ Inferes an annotation node. This means that it inferes the part of `int` here: foo: int = 3 Also checks for forward references (strings) """ value_set = context.infer_node(annotation) if len(value_set) != 1: debug.warning("Inferred typing index %s should lead to 1 object, " " not %s" % (annotation, value_set)) return value_set inferred_value = list(value_set)[0] if is_string(inferred_value): result = _get_forward_reference_node(context, inferred_value.get_safe_value()) if result is not None: return context.infer_node(result) return value_set def _infer_annotation_string(context, string, index=None): node = _get_forward_reference_node(context, string) if node is None: return NO_VALUES value_set = context.infer_node(node) if index is not None: value_set = value_set.filter( lambda value: value.array_type == u'tuple' # noqa and len(list(value.py__iter__())) >= index ).py__simple_getitem__(index) return value_set def _get_forward_reference_node(context, string): try: new_node = context.inference_state.grammar.parse( force_unicode(string), start_symbol='eval_input', error_recovery=False ) except ParserSyntaxError: debug.warning('Annotation not parsed: %s' % string) return None else: module = context.tree_node.get_root_node() parser_utils.move(new_node, module.end_pos[0]) new_node.parent = context.tree_node return new_node def _split_comment_param_declaration(decl_text): """ Split decl_text on commas, but group generic expressions together. For example, given "foo, Bar[baz, biz]" we return ['foo', 'Bar[baz, biz]']. """ try: node = parse(decl_text, error_recovery=False).children[0] except ParserSyntaxError: debug.warning('Comment annotation is not valid Python: %s' % decl_text) return [] if node.type in ['name', 'atom_expr', 'power']: return [node.get_code().strip()] params = [] try: children = node.children except AttributeError: return [] else: for child in children: if child.type in ['name', 'atom_expr', 'power']: params.append(child.get_code().strip()) return params @inference_state_method_cache() def infer_param(function_value, param, ignore_stars=False): values = _infer_param(function_value, param) if ignore_stars: return values inference_state = function_value.inference_state if param.star_count == 1: tuple_ = builtin_from_name(inference_state, 'tuple') return ValueSet([GenericClass( tuple_, TupleGenericManager((values,)), ) for c in values]) elif param.star_count == 2: dct = builtin_from_name(inference_state, 'dict') generics = ( ValueSet([builtin_from_name(inference_state, 'str')]), values ) return ValueSet([GenericClass( dct, TupleGenericManager(generics), ) for c in values]) pass return values def _infer_param(function_value, param): """ Infers the type of a function parameter, using type annotations. """ annotation = param.annotation if annotation is None: # If no Python 3-style annotation, look for a Python 2-style comment # annotation. # Identify parameters to function in the same sequence as they would # appear in a type comment. all_params = [child for child in param.parent.children if child.type == 'param'] node = param.parent.parent comment = parser_utils.get_following_comment_same_line(node) if comment is None: return NO_VALUES match = re.match(r"^#\s*type:\s*\(([^#]*)\)\s*->", comment) if not match: return NO_VALUES params_comments = _split_comment_param_declaration(match.group(1)) # Find the specific param being investigated index = all_params.index(param) # If the number of parameters doesn't match length of type comment, # ignore first parameter (assume it's self). if len(params_comments) != len(all_params): debug.warning( "Comments length != Params length %s %s", params_comments, all_params ) if function_value.is_bound_method(): if index == 0: # Assume it's self, which is already handled return NO_VALUES index -= 1 if index >= len(params_comments): return NO_VALUES param_comment = params_comments[index] return _infer_annotation_string( function_value.get_default_param_context(), param_comment ) # Annotations are like default params and resolve in the same way. context = function_value.get_default_param_context() return infer_annotation(context, annotation) def py__annotations__(funcdef): dct = {} for function_param in funcdef.get_params(): param_annotation = function_param.annotation if param_annotation is not None: dct[function_param.name.value] = param_annotation return_annotation = funcdef.annotation if return_annotation: dct['return'] = return_annotation return dct @inference_state_method_cache() def infer_return_types(function, arguments): """ Infers the type of a function's return value, according to type annotations. """ all_annotations = py__annotations__(function.tree_node) annotation = all_annotations.get("return", None) if annotation is None: # If there is no Python 3-type annotation, look for a Python 2-type annotation node = function.tree_node comment = parser_utils.get_following_comment_same_line(node) if comment is None: return NO_VALUES match = re.match(r"^#\s*type:\s*\([^#]*\)\s*->\s*([^#]*)", comment) if not match: return NO_VALUES return _infer_annotation_string( function.get_default_param_context(), match.group(1).strip() ).execute_annotation() if annotation is None: return NO_VALUES context = function.get_default_param_context() unknown_type_vars = find_unknown_type_vars(context, annotation) annotation_values = infer_annotation(context, annotation) if not unknown_type_vars: return annotation_values.execute_annotation() type_var_dict = infer_type_vars_for_execution(function, arguments, all_annotations) return ValueSet.from_sets( ann.define_generics(type_var_dict) if isinstance(ann, (DefineGenericBase, TypeVar)) else ValueSet({ann}) for ann in annotation_values ).execute_annotation() def infer_type_vars_for_execution(function, arguments, annotation_dict): """ Some functions use type vars that are not defined by the class, but rather only defined in the function. See for example `iter`. In those cases we want to: 1. Search for undefined type vars. 2. Infer type vars with the execution state we have. 3. Return the union of all type vars that have been found. """ context = function.get_default_param_context() annotation_variable_results = {} executed_param_names = get_executed_param_names(function, arguments) for executed_param_name in executed_param_names: try: annotation_node = annotation_dict[executed_param_name.string_name] except KeyError: continue annotation_variables = find_unknown_type_vars(context, annotation_node) if annotation_variables: # Infer unknown type var annotation_value_set = context.infer_node(annotation_node) kind = executed_param_name.get_kind() actual_value_set = executed_param_name.infer() if kind is Parameter.VAR_POSITIONAL: actual_value_set = actual_value_set.merge_types_of_iterate() elif kind is Parameter.VAR_KEYWORD: # TODO _dict_values is not public. actual_value_set = actual_value_set.try_merge('_dict_values') for ann in annotation_value_set: _merge_type_var_dicts( annotation_variable_results, _infer_type_vars(ann, actual_value_set), ) return annotation_variable_results def infer_return_for_callable(arguments, param_values, result_values): result = NO_VALUES for pv in param_values: if pv.array_type == 'list': type_var_dict = infer_type_vars_for_callable(arguments, pv.py__iter__()) result |= ValueSet.from_sets( v.define_generics(type_var_dict) if isinstance(v, (DefineGenericBase, TypeVar)) else ValueSet({v}) for v in result_values ).execute_annotation() return result def infer_type_vars_for_callable(arguments, lazy_params): """ Infers type vars for the Calllable class: def x() -> Callable[[Callable[..., _T]], _T]: ... """ annotation_variable_results = {} for (_, lazy_value), lazy_callable_param in zip(arguments.unpack(), lazy_params): callable_param_values = lazy_callable_param.infer() # Infer unknown type var actual_value_set = lazy_value.infer() for v in callable_param_values: _merge_type_var_dicts( annotation_variable_results, _infer_type_vars(v, actual_value_set), ) return annotation_variable_results def _merge_type_var_dicts(base_dict, new_dict): for type_var_name, values in new_dict.items(): if values: try: base_dict[type_var_name] |= values except KeyError: base_dict[type_var_name] = values def _infer_type_vars(annotation_value, value_set, is_class_value=False): """ This function tries to find information about undefined type vars and returns a dict from type var name to value set. This is for example important to understand what `iter([1])` returns. According to typeshed, `iter` returns an `Iterator[_T]`: def iter(iterable: Iterable[_T]) -> Iterator[_T]: ... This functions would generate `int` for `_T` in this case, because it unpacks the `Iterable`. """ type_var_dict = {} if isinstance(annotation_value, TypeVar): if not is_class_value: return {annotation_value.py__name__(): value_set.py__class__()} return {annotation_value.py__name__(): value_set} elif isinstance(annotation_value, TypingClassValueWithIndex): name = annotation_value.py__name__() if name == 'Type': given = annotation_value.get_generics() if given: for nested_annotation_value in given[0]: _merge_type_var_dicts( type_var_dict, _infer_type_vars( nested_annotation_value, value_set, is_class_value=True, ) ) elif name == 'Callable': given = annotation_value.get_generics() if len(given) == 2: for nested_annotation_value in given[1]: _merge_type_var_dicts( type_var_dict, _infer_type_vars( nested_annotation_value, value_set.execute_annotation(), ) ) elif isinstance(annotation_value, GenericClass): name = annotation_value.py__name__() if name == 'Iterable': given = annotation_value.get_generics() if given: for nested_annotation_value in given[0]: _merge_type_var_dicts( type_var_dict, _infer_type_vars( nested_annotation_value, value_set.merge_types_of_iterate() ) ) elif name == 'Mapping': given = annotation_value.get_generics() if len(given) == 2: for value in value_set: try: method = value.get_mapping_item_values except AttributeError: continue key_values, value_values = method() for nested_annotation_value in given[0]: _merge_type_var_dicts( type_var_dict, _infer_type_vars( nested_annotation_value, key_values, ) ) for nested_annotation_value in given[1]: _merge_type_var_dicts( type_var_dict, _infer_type_vars( nested_annotation_value, value_values, ) ) return type_var_dict def find_type_from_comment_hint_for(context, node, name): return _find_type_from_comment_hint(context, node, node.children[1], name) def find_type_from_comment_hint_with(context, node, name): assert len(node.children[1].children) == 3, \ "Can only be here when children[1] is 'foo() as f'" varlist = node.children[1].children[2] return _find_type_from_comment_hint(context, node, varlist, name) def find_type_from_comment_hint_assign(context, node, name): return _find_type_from_comment_hint(context, node, node.children[0], name) def _find_type_from_comment_hint(context, node, varlist, name): index = None if varlist.type in ("testlist_star_expr", "exprlist", "testlist"): # something like "a, b = 1, 2" index = 0 for child in varlist.children: if child == name: break if child.type == "operator": continue index += 1 else: return [] comment = parser_utils.get_following_comment_same_line(node) if comment is None: return [] match = re.match(r"^#\s*type:\s*([^#]*)", comment) if match is None: return [] return _infer_annotation_string( context, match.group(1).strip(), index ).execute_annotation() def find_unknown_type_vars(context, node): def check_node(node): if node.type in ('atom_expr', 'power'): trailer = node.children[-1] if trailer.type == 'trailer' and trailer.children[0] == '[': for subscript_node in _unpack_subscriptlist(trailer.children[1]): check_node(subscript_node) else: found[:] = _filter_type_vars(context.infer_node(node), found) found = [] # We're not using a set, because the order matters. check_node(node) return found def _filter_type_vars(value_set, found=()): new_found = list(found) for type_var in value_set: if isinstance(type_var, TypeVar) and type_var not in found: new_found.append(type_var) return new_found def _unpack_subscriptlist(subscriptlist): if subscriptlist.type == 'subscriptlist': for subscript in subscriptlist.children[::2]: if subscript.type != 'subscript': yield subscript else: if subscriptlist.type != 'subscript': yield subscriptlist jedi-0.15.2/jedi/inference/dynamic_params.py0000664000175000017500000001742313577124112020620 0ustar davedave00000000000000""" One of the really important features of |jedi| is to have an option to understand code like this:: def foo(bar): bar. # completion here foo(1) There's no doubt wheter bar is an ``int`` or not, but if there's also a call like ``foo('str')``, what would happen? Well, we'll just show both. Because that's what a human would expect. It works as follows: - |Jedi| sees a param - search for function calls named ``foo`` - execute these calls and check the input. """ from jedi import settings from jedi import debug from jedi.parser_utils import get_parent_scope from jedi.inference.cache import inference_state_method_cache from jedi.inference import imports from jedi.inference.arguments import TreeArguments from jedi.inference.param import get_executed_param_names from jedi.inference.helpers import is_stdlib_path from jedi.inference.utils import to_list from jedi.inference.value import instance from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference import recursion MAX_PARAM_SEARCHES = 20 def _avoid_recursions(func): def wrapper(function_value, param_index): inf = function_value.inference_state with recursion.execution_allowed(inf, function_value.tree_node) as allowed: # We need to catch recursions that may occur, because an # anonymous functions can create an anonymous parameter that is # more or less self referencing. if allowed: inf.dynamic_params_depth += 1 try: return func(function_value, param_index) finally: inf.dynamic_params_depth -= 1 return NO_VALUES return return wrapper @debug.increase_indent @_avoid_recursions def dynamic_param_lookup(function_value, param_index): """ A dynamic search for param values. If you try to complete a type: >>> def func(foo): ... foo >>> func(1) >>> func("") It is not known what the type ``foo`` without analysing the whole code. You have to look for all calls to ``func`` to find out what ``foo`` possibly is. """ funcdef = function_value.tree_node if not settings.dynamic_params: return NO_VALUES path = function_value.get_root_context().py__file__() if path is not None and is_stdlib_path(path): # We don't want to search for usages in the stdlib. Usually people # don't work with it (except if you are a core maintainer, sorry). # This makes everything slower. Just disable it and run the tests, # you will see the slowdown, especially in 3.6. return NO_VALUES if funcdef.type == 'lambdef': string_name = _get_lambda_name(funcdef) if string_name is None: return NO_VALUES else: string_name = funcdef.name.value debug.dbg('Dynamic param search in %s.', string_name, color='MAGENTA') module_context = function_value.get_root_context() arguments_list = _search_function_arguments(module_context, funcdef, string_name) values = ValueSet.from_sets( get_executed_param_names( function_value, arguments )[param_index].infer() for arguments in arguments_list ) debug.dbg('Dynamic param result finished', color='MAGENTA') return values @inference_state_method_cache(default=None) @to_list def _search_function_arguments(module_context, funcdef, string_name): """ Returns a list of param names. """ compare_node = funcdef if string_name == '__init__': cls = get_parent_scope(funcdef) if cls.type == 'classdef': string_name = cls.name.value compare_node = cls found_arguments = False i = 0 inference_state = module_context.inference_state for for_mod_context in imports.get_module_contexts_containing_name( inference_state, [module_context], string_name): for name, trailer in _get_potential_nodes(for_mod_context, string_name): i += 1 # This is a simple way to stop Jedi's dynamic param recursion # from going wild: The deeper Jedi's in the recursion, the less # code should be inferred. if i * inference_state.dynamic_params_depth > MAX_PARAM_SEARCHES: return random_context = for_mod_context.create_context(name) for arguments in _check_name_for_execution( inference_state, random_context, compare_node, name, trailer): found_arguments = True yield arguments # If there are results after processing a module, we're probably # good to process. This is a speed optimization. if found_arguments: return def _get_lambda_name(node): stmt = node.parent if stmt.type == 'expr_stmt': first_operator = next(stmt.yield_operators(), None) if first_operator == '=': first = stmt.children[0] if first.type == 'name': return first.value return None def _get_potential_nodes(module_value, func_string_name): try: names = module_value.tree_node.get_used_names()[func_string_name] except KeyError: return for name in names: bracket = name.get_next_leaf() trailer = bracket.parent if trailer.type == 'trailer' and bracket == '(': yield name, trailer def _check_name_for_execution(inference_state, context, compare_node, name, trailer): from jedi.inference.value.function import BaseFunctionExecutionContext def create_args(value): arglist = trailer.children[1] if arglist == ')': arglist = None args = TreeArguments(inference_state, context, arglist, trailer) from jedi.inference.value.instance import InstanceArguments if value.tree_node.type == 'classdef': created_instance = instance.TreeInstance( inference_state, value.parent_context, value, args ) return InstanceArguments(created_instance, args) else: if value.is_bound_method(): args = InstanceArguments(value.instance, args) return args for value in inference_state.goto_definitions(context, name): value_node = value.tree_node if compare_node == value_node: yield create_args(value) elif isinstance(value.parent_context, BaseFunctionExecutionContext) \ and compare_node.type == 'funcdef': # Here we're trying to find decorators by checking the first # parameter. It's not very generic though. Should find a better # solution that also applies to nested decorators. param_names = value.parent_context.get_param_names() if len(param_names) != 1: continue values = param_names[0].infer() if [v.tree_node for v in values] == [compare_node]: # Found a decorator. module_context = context.get_root_context() execution_context = value.as_context(create_args(value)) potential_nodes = _get_potential_nodes(module_context, param_names[0].string_name) for name, trailer in potential_nodes: if value_node.start_pos < name.start_pos < value_node.end_pos: random_context = execution_context.create_context(name) iterator = _check_name_for_execution( inference_state, random_context, compare_node, name, trailer ) for arguments in iterator: yield arguments jedi-0.15.2/jedi/inference/cache.py0000664000175000017500000001005213577124112016663 0ustar davedave00000000000000""" - the popular ``_memoize_default`` works like a typical memoize and returns the default otherwise. - ``CachedMetaClass`` uses ``_memoize_default`` to do the same with classes. """ from jedi import debug _NO_DEFAULT = object() _RECURSION_SENTINEL = object() def _memoize_default(default=_NO_DEFAULT, inference_state_is_first_arg=False, second_arg_is_inference_state=False): """ This is a typical memoization decorator, BUT there is one difference: To prevent recursion it sets defaults. Preventing recursion is in this case the much bigger use than speed. I don't think, that there is a big speed difference, but there are many cases where recursion could happen (think about a = b; b = a). """ def func(function): def wrapper(obj, *args, **kwargs): # TODO These checks are kind of ugly and slow. if inference_state_is_first_arg: cache = obj.memoize_cache elif second_arg_is_inference_state: cache = args[0].memoize_cache # needed for meta classes else: cache = obj.inference_state.memoize_cache try: memo = cache[function] except KeyError: cache[function] = memo = {} key = (obj, args, frozenset(kwargs.items())) if key in memo: return memo[key] else: if default is not _NO_DEFAULT: memo[key] = default rv = function(obj, *args, **kwargs) memo[key] = rv return rv return wrapper return func def inference_state_function_cache(default=_NO_DEFAULT): def decorator(func): return _memoize_default(default=default, inference_state_is_first_arg=True)(func) return decorator def inference_state_method_cache(default=_NO_DEFAULT): def decorator(func): return _memoize_default(default=default)(func) return decorator def inference_state_as_method_param_cache(): def decorator(call): return _memoize_default(second_arg_is_inference_state=True)(call) return decorator class CachedMetaClass(type): """ This is basically almost the same than the decorator above, it just caches class initializations. Either you do it this way or with decorators, but with decorators you lose class access (isinstance, etc). """ @inference_state_as_method_param_cache() def __call__(self, *args, **kwargs): return super(CachedMetaClass, self).__call__(*args, **kwargs) def inference_state_method_generator_cache(): """ This is a special memoizer. It memoizes generators and also checks for recursion errors and returns no further iterator elemends in that case. """ def func(function): def wrapper(obj, *args, **kwargs): cache = obj.inference_state.memoize_cache try: memo = cache[function] except KeyError: cache[function] = memo = {} key = (obj, args, frozenset(kwargs.items())) if key in memo: actual_generator, cached_lst = memo[key] else: actual_generator = function(obj, *args, **kwargs) cached_lst = [] memo[key] = actual_generator, cached_lst i = 0 while True: try: next_element = cached_lst[i] if next_element is _RECURSION_SENTINEL: debug.warning('Found a generator recursion for %s' % obj) # This means we have hit a recursion. return except IndexError: cached_lst.append(_RECURSION_SENTINEL) next_element = next(actual_generator, None) if next_element is None: cached_lst.pop() return cached_lst[-1] = next_element yield next_element i += 1 return wrapper return func jedi-0.15.2/jedi/inference/parser_cache.py0000664000175000017500000000027713577124112020247 0ustar davedave00000000000000from jedi.inference.cache import inference_state_function_cache @inference_state_function_cache() def get_yield_exprs(inference_state, funcdef): return list(funcdef.iter_yield_exprs()) jedi-0.15.2/jedi/inference/names.py0000664000175000017500000004474313577124112016741 0ustar davedave00000000000000from abc import abstractmethod from parso.tree import search_ancestor from jedi._compatibility import Parameter from jedi.inference.utils import unite from jedi.inference.base_value import ValueSet, NO_VALUES from jedi.inference import docstrings from jedi.cache import memoize_method from jedi.inference.helpers import deep_ast_copy, infer_call_of_leaf class AbstractNameDefinition(object): start_pos = None string_name = None parent_context = None tree_name = None is_value_name = True """ Used for the Jedi API to know if it's a keyword or an actual name. """ @abstractmethod def infer(self): raise NotImplementedError @abstractmethod def goto(self): # Typically names are already definitions and therefore a goto on that # name will always result on itself. return {self} def get_qualified_names(self, include_module_names=False): qualified_names = self._get_qualified_names() if qualified_names is None or not include_module_names: return qualified_names module_names = self.get_root_context().string_names if module_names is None: return None return module_names + qualified_names def _get_qualified_names(self): # By default, a name has no qualified names. return None def get_root_context(self): return self.parent_context.get_root_context() def get_public_name(self): return self.string_name def __repr__(self): if self.start_pos is None: return '<%s: string_name=%s>' % (self.__class__.__name__, self.string_name) return '<%s: string_name=%s start_pos=%s>' % (self.__class__.__name__, self.string_name, self.start_pos) def is_import(self): return False @property def api_type(self): return self.parent_context.api_type class AbstractArbitraryName(AbstractNameDefinition): """ When you e.g. want to complete dicts keys, you probably want to complete string literals, which is not really a name, but for Jedi we use this concept of Name for completions as well. """ is_value_name = False def __init__(self, inference_state, string): self.inference_state = inference_state self.string_name = string self.parent_context = inference_state.builtins_module def infer(self): return NO_VALUES class AbstractTreeName(AbstractNameDefinition): def __init__(self, parent_context, tree_name): self.parent_context = parent_context self.tree_name = tree_name def get_qualified_names(self, include_module_names=False): import_node = search_ancestor(self.tree_name, 'import_name', 'import_from') # For import nodes we cannot just have names, because it's very unclear # how they would look like. For now we just ignore them in most cases. # In case of level == 1, it works always, because it's like a submodule # lookup. if import_node is not None and not (import_node.level == 1 and self.get_root_context().get_value().is_package()): # TODO improve the situation for when level is present. if include_module_names and not import_node.level: return tuple(n.value for n in import_node.get_path_for_name(self.tree_name)) else: return None return super(AbstractTreeName, self).get_qualified_names(include_module_names) def _get_qualified_names(self): parent_names = self.parent_context.get_qualified_names() if parent_names is None: return None return parent_names + (self.tree_name.value,) def goto(self): context = self.parent_context name = self.tree_name definition = name.get_definition(import_name_always=True) if definition is not None: type_ = definition.type if type_ == 'expr_stmt': # Only take the parent, because if it's more complicated than just # a name it's something you can "goto" again. is_simple_name = name.parent.type not in ('power', 'trailer') if is_simple_name: return [self] elif type_ in ('import_from', 'import_name'): from jedi.inference.imports import goto_import module_names = goto_import(context, name) return module_names else: return [self] else: from jedi.inference.imports import follow_error_node_imports_if_possible values = follow_error_node_imports_if_possible(context, name) if values is not None: return [value.name for value in values] par = name.parent node_type = par.type if node_type == 'argument' and par.children[1] == '=' and par.children[0] == name: # Named param goto. trailer = par.parent if trailer.type == 'arglist': trailer = trailer.parent if trailer.type != 'classdef': if trailer.type == 'decorator': value_set = context.infer_node(trailer.children[1]) else: i = trailer.parent.children.index(trailer) to_infer = trailer.parent.children[:i] if to_infer[0] == 'await': to_infer.pop(0) value_set = context.infer_node(to_infer[0]) from jedi.inference.syntax_tree import infer_trailer for trailer in to_infer[1:]: value_set = infer_trailer(context, value_set, trailer) param_names = [] for value in value_set: for signature in value.get_signatures(): for param_name in signature.get_param_names(): if param_name.string_name == name.value: param_names.append(param_name) return param_names elif node_type == 'dotted_name': # Is a decorator. index = par.children.index(name) if index > 0: new_dotted = deep_ast_copy(par) new_dotted.children[index - 1:] = [] values = context.infer_node(new_dotted) return unite( value.goto(name, name_context=context) for value in values ) if node_type == 'trailer' and par.children[0] == '.': values = infer_call_of_leaf(context, name, cut_own_trailer=True) return values.goto(name, name_context=context) else: stmt = search_ancestor( name, 'expr_stmt', 'lambdef' ) or name if stmt.type == 'lambdef': stmt = name return context.goto(name, position=stmt.start_pos) def is_import(self): imp = search_ancestor(self.tree_name, 'import_from', 'import_name') return imp is not None @property def string_name(self): return self.tree_name.value @property def start_pos(self): return self.tree_name.start_pos class ValueNameMixin(object): def infer(self): return ValueSet([self._value]) def _get_qualified_names(self): return self._value.get_qualified_names() def get_root_context(self): if self.parent_context is None: # A module return self._value.as_context() return super(ValueNameMixin, self).get_root_context() @property def api_type(self): return self._value.api_type class ValueName(ValueNameMixin, AbstractTreeName): def __init__(self, value, tree_name): super(ValueName, self).__init__(value.parent_context, tree_name) self._value = value def goto(self): return ValueSet([self._value.name]) class TreeNameDefinition(AbstractTreeName): _API_TYPES = dict( import_name='module', import_from='module', funcdef='function', param='param', classdef='class', ) def infer(self): # Refactor this, should probably be here. from jedi.inference.syntax_tree import tree_name_to_values return tree_name_to_values( self.parent_context.inference_state, self.parent_context, self.tree_name ) @property def api_type(self): definition = self.tree_name.get_definition(import_name_always=True) if definition is None: return 'statement' return self._API_TYPES.get(definition.type, 'statement') def assignment_indexes(self): """ Returns an array of tuple(int, node) of the indexes that are used in tuple assignments. For example if the name is ``y`` in the following code:: x, (y, z) = 2, '' would result in ``[(1, xyz_node), (0, yz_node)]``. When searching for b in the case ``a, *b, c = [...]`` it will return:: [(slice(1, -1), abc_node)] """ indexes = [] is_star_expr = False node = self.tree_name.parent compare = self.tree_name while node is not None: if node.type in ('testlist', 'testlist_comp', 'testlist_star_expr', 'exprlist'): for i, child in enumerate(node.children): if child == compare: index = int(i / 2) if is_star_expr: from_end = int((len(node.children) - i) / 2) index = slice(index, -from_end) indexes.insert(0, (index, node)) break else: raise LookupError("Couldn't find the assignment.") is_star_expr = False elif node.type == 'star_expr': is_star_expr = True elif node.type in ('expr_stmt', 'sync_comp_for'): break compare = node node = node.parent return indexes class _ParamMixin(object): def maybe_positional_argument(self, include_star=True): options = [Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD] if include_star: options.append(Parameter.VAR_POSITIONAL) return self.get_kind() in options def maybe_keyword_argument(self, include_stars=True): options = [Parameter.KEYWORD_ONLY, Parameter.POSITIONAL_OR_KEYWORD] if include_stars: options.append(Parameter.VAR_KEYWORD) return self.get_kind() in options def _kind_string(self): kind = self.get_kind() if kind == Parameter.VAR_POSITIONAL: # *args return '*' if kind == Parameter.VAR_KEYWORD: # **kwargs return '**' return '' class ParamNameInterface(_ParamMixin): api_type = u'param' def get_kind(self): raise NotImplementedError def to_string(self): raise NotImplementedError def get_executed_param_name(self): """ For dealing with type inference and working around the graph, we sometimes want to have the param name of the execution. This feels a bit strange and we might have to refactor at some point. For now however it exists to avoid infering params when we don't really need them (e.g. when we can just instead use annotations. """ return None @property def star_count(self): kind = self.get_kind() if kind == Parameter.VAR_POSITIONAL: return 1 if kind == Parameter.VAR_KEYWORD: return 2 return 0 class BaseTreeParamName(ParamNameInterface, AbstractTreeName): annotation_node = None default_node = None def to_string(self): output = self._kind_string() + self.get_public_name() annotation = self.annotation_node default = self.default_node if annotation is not None: output += ': ' + annotation.get_code(include_prefix=False) if default is not None: output += '=' + default.get_code(include_prefix=False) return output def get_public_name(self): name = self.string_name if name.startswith('__'): # Params starting with __ are an equivalent to positional only # variables in typeshed. name = name[2:] return name def goto(self, **kwargs): return [self] class _ActualTreeParamName(BaseTreeParamName): def __init__(self, function_value, tree_name): super(_ActualTreeParamName, self).__init__( function_value.get_default_param_context(), tree_name) self.function_value = function_value def _get_param_node(self): return search_ancestor(self.tree_name, 'param') @property def annotation_node(self): return self._get_param_node().annotation def infer_annotation(self, execute_annotation=True, ignore_stars=False): from jedi.inference.gradual.annotation import infer_param values = infer_param( self.function_value, self._get_param_node(), ignore_stars=ignore_stars) if execute_annotation: values = values.execute_annotation() return values def infer_default(self): node = self.default_node if node is None: return NO_VALUES return self.parent_context.infer_node(node) @property def default_node(self): return self._get_param_node().default def get_kind(self): tree_param = self._get_param_node() if tree_param.star_count == 1: # *args return Parameter.VAR_POSITIONAL if tree_param.star_count == 2: # **kwargs return Parameter.VAR_KEYWORD # Params starting with __ are an equivalent to positional only # variables in typeshed. if tree_param.name.value.startswith('__'): return Parameter.POSITIONAL_ONLY parent = tree_param.parent param_appeared = False for p in parent.children: if param_appeared: if p == '/': return Parameter.POSITIONAL_ONLY else: if p == '*': return Parameter.KEYWORD_ONLY if p.type == 'param': if p.star_count: return Parameter.KEYWORD_ONLY if p == tree_param: param_appeared = True return Parameter.POSITIONAL_OR_KEYWORD def infer(self): values = self.infer_annotation() if values: return values doc_params = docstrings.infer_param(self.function_value, self._get_param_node()) return doc_params class AnonymousParamName(_ActualTreeParamName): def __init__(self, function_value, tree_name): super(AnonymousParamName, self).__init__(function_value, tree_name) def infer(self): values = super(AnonymousParamName, self).infer() if values: return values from jedi.inference.dynamic_params import dynamic_param_lookup param = self._get_param_node() values = dynamic_param_lookup(self.function_value, param.position_index) if values: return values if param.star_count == 1: from jedi.inference.value.iterable import FakeTuple value = FakeTuple(self.function_value.inference_state, []) elif param.star_count == 2: from jedi.inference.value.iterable import FakeDict value = FakeDict(self.function_value.inference_state, {}) elif param.default is None: return NO_VALUES else: return self.function_value.parent_context.infer_node(param.default) return ValueSet({value}) class ParamName(_ActualTreeParamName): def __init__(self, function_value, tree_name, arguments): super(ParamName, self).__init__(function_value, tree_name) self.arguments = arguments def infer(self): values = super(ParamName, self).infer() if values: return values return self.get_executed_param_name().infer() def get_executed_param_name(self): from jedi.inference.param import get_executed_param_names params_names = get_executed_param_names(self.function_value, self.arguments) return params_names[self._get_param_node().position_index] class ParamNameWrapper(_ParamMixin): def __init__(self, param_name): self._wrapped_param_name = param_name def __getattr__(self, name): return getattr(self._wrapped_param_name, name) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._wrapped_param_name) class ImportName(AbstractNameDefinition): start_pos = (1, 0) _level = 0 def __init__(self, parent_context, string_name): self._from_module_context = parent_context self.string_name = string_name def get_qualified_names(self, include_module_names=False): if include_module_names: if self._level: assert self._level == 1, "Everything else is not supported for now" module_names = self._from_module_context.string_names if module_names is None: return module_names return module_names + (self.string_name,) return (self.string_name,) return () @property def parent_context(self): m = self._from_module_context import_values = self.infer() if not import_values: return m # It's almost always possible to find the import or to not find it. The # importing returns only one value, pretty much always. return next(iter(import_values)) @memoize_method def infer(self): from jedi.inference.imports import Importer m = self._from_module_context return Importer(m.inference_state, [self.string_name], m, level=self._level).follow() def goto(self): return [m.name for m in self.infer()] @property def api_type(self): return 'module' class SubModuleName(ImportName): _level = 1 class NameWrapper(object): def __init__(self, wrapped_name): self._wrapped_name = wrapped_name @abstractmethod def infer(self): raise NotImplementedError def __getattr__(self, name): return getattr(self._wrapped_name, name) def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self._wrapped_name) jedi-0.15.2/jedi/inference/compiled/0000775000175000017500000000000013577125145017053 5ustar davedave00000000000000jedi-0.15.2/jedi/inference/compiled/subprocess/0000775000175000017500000000000013577125145021243 5ustar davedave00000000000000jedi-0.15.2/jedi/inference/compiled/subprocess/__init__.py0000664000175000017500000003426113577124112023353 0ustar davedave00000000000000""" Makes it possible to do the compiled analysis in a subprocess. This has two goals: 1. Making it safer - Segfaults and RuntimeErrors as well as stdout/stderr can be ignored and dealt with. 2. Make it possible to handle different Python versions as well as virtualenvs. """ import os import sys import subprocess import socket import errno import traceback from functools import partial from threading import Thread try: from queue import Queue, Empty except ImportError: from Queue import Queue, Empty # python 2.7 from jedi._compatibility import queue, is_py3, force_unicode, \ pickle_dump, pickle_load, GeneralizedPopen, weakref from jedi import debug from jedi.cache import memoize_method from jedi.inference.compiled.subprocess import functions from jedi.inference.compiled.access import DirectObjectAccess, AccessPath, \ SignatureParam from jedi.api.exceptions import InternalError _MAIN_PATH = os.path.join(os.path.dirname(__file__), '__main__.py') def _enqueue_output(out, queue): for line in iter(out.readline, b''): queue.put(line) def _add_stderr_to_debug(stderr_queue): while True: # Try to do some error reporting from the subprocess and print its # stderr contents. try: line = stderr_queue.get_nowait() line = line.decode('utf-8', 'replace') debug.warning('stderr output: %s' % line.rstrip('\n')) except Empty: break def _get_function(name): return getattr(functions, name) def _cleanup_process(process, thread): try: process.kill() process.wait() except OSError: # Raised if the process is already killed. pass thread.join() for stream in [process.stdin, process.stdout, process.stderr]: try: stream.close() except OSError: # Raised if the stream is broken. pass class _InferenceStateProcess(object): def __init__(self, inference_state): self._inference_state_weakref = weakref.ref(inference_state) self._inference_state_id = id(inference_state) self._handles = {} def get_or_create_access_handle(self, obj): id_ = id(obj) try: return self.get_access_handle(id_) except KeyError: access = DirectObjectAccess(self._inference_state_weakref(), obj) handle = AccessHandle(self, access, id_) self.set_access_handle(handle) return handle def get_access_handle(self, id_): return self._handles[id_] def set_access_handle(self, handle): self._handles[handle.id] = handle class InferenceStateSameProcess(_InferenceStateProcess): """ Basically just an easy access to functions.py. It has the same API as InferenceStateSubprocess and does the same thing without using a subprocess. This is necessary for the Interpreter process. """ def __getattr__(self, name): return partial(_get_function(name), self._inference_state_weakref()) class InferenceStateSubprocess(_InferenceStateProcess): def __init__(self, inference_state, compiled_subprocess): super(InferenceStateSubprocess, self).__init__(inference_state) self._used = False self._compiled_subprocess = compiled_subprocess def __getattr__(self, name): func = _get_function(name) def wrapper(*args, **kwargs): self._used = True result = self._compiled_subprocess.run( self._inference_state_weakref(), func, args=args, kwargs=kwargs, ) # IMO it should be possible to create a hook in pickle.load to # mess with the loaded objects. However it's extremely complicated # to work around this so just do it with this call. ~ dave return self._convert_access_handles(result) return wrapper def _convert_access_handles(self, obj): if isinstance(obj, SignatureParam): return SignatureParam(*self._convert_access_handles(tuple(obj))) elif isinstance(obj, tuple): return tuple(self._convert_access_handles(o) for o in obj) elif isinstance(obj, list): return [self._convert_access_handles(o) for o in obj] elif isinstance(obj, AccessHandle): try: # Rewrite the access handle to one we're already having. obj = self.get_access_handle(obj.id) except KeyError: obj.add_subprocess(self) self.set_access_handle(obj) elif isinstance(obj, AccessPath): return AccessPath(self._convert_access_handles(obj.accesses)) return obj def __del__(self): if self._used and not self._compiled_subprocess.is_crashed: self._compiled_subprocess.delete_inference_state(self._inference_state_id) class CompiledSubprocess(object): is_crashed = False # Start with 2, gets set after _get_info. _pickle_protocol = 2 def __init__(self, executable): self._executable = executable self._inference_state_deletion_queue = queue.deque() self._cleanup_callable = lambda: None def __repr__(self): pid = os.getpid() return '<%s _executable=%r, _pickle_protocol=%r, is_crashed=%r, pid=%r>' % ( self.__class__.__name__, self._executable, self._pickle_protocol, self.is_crashed, pid, ) @memoize_method def _get_process(self): debug.dbg('Start environment subprocess %s', self._executable) parso_path = sys.modules['parso'].__file__ args = ( self._executable, _MAIN_PATH, os.path.dirname(os.path.dirname(parso_path)), '.'.join(str(x) for x in sys.version_info[:3]), ) process = GeneralizedPopen( args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, # Use system default buffering on Python 2 to improve performance # (this is already the case on Python 3). bufsize=-1 ) self._stderr_queue = Queue() self._stderr_thread = t = Thread( target=_enqueue_output, args=(process.stderr, self._stderr_queue) ) t.daemon = True t.start() # Ensure the subprocess is properly cleaned up when the object # is garbage collected. self._cleanup_callable = weakref.finalize(self, _cleanup_process, process, t) return process def run(self, inference_state, function, args=(), kwargs={}): # Delete old inference_states. while True: try: inference_state_id = self._inference_state_deletion_queue.pop() except IndexError: break else: self._send(inference_state_id, None) assert callable(function) return self._send(id(inference_state), function, args, kwargs) def get_sys_path(self): return self._send(None, functions.get_sys_path, (), {}) def _kill(self): self.is_crashed = True self._cleanup_callable() def _send(self, inference_state_id, function, args=(), kwargs={}): if self.is_crashed: raise InternalError("The subprocess %s has crashed." % self._executable) if not is_py3: # Python 2 compatibility kwargs = {force_unicode(key): value for key, value in kwargs.items()} data = inference_state_id, function, args, kwargs try: pickle_dump(data, self._get_process().stdin, self._pickle_protocol) except (socket.error, IOError) as e: # Once Python2 will be removed we can just use `BrokenPipeError`. # Also, somehow in windows it returns EINVAL instead of EPIPE if # the subprocess dies. if e.errno not in (errno.EPIPE, errno.EINVAL): # Not a broken pipe raise self._kill() raise InternalError("The subprocess %s was killed. Maybe out of memory?" % self._executable) try: is_exception, traceback, result = pickle_load(self._get_process().stdout) except EOFError as eof_error: try: stderr = self._get_process().stderr.read().decode('utf-8', 'replace') except Exception as exc: stderr = '' % exc self._kill() _add_stderr_to_debug(self._stderr_queue) raise InternalError( "The subprocess %s has crashed (%r, stderr=%s)." % ( self._executable, eof_error, stderr, )) _add_stderr_to_debug(self._stderr_queue) if is_exception: # Replace the attribute error message with a the traceback. It's # way more informative. result.args = (traceback,) raise result return result def delete_inference_state(self, inference_state_id): """ Currently we are not deleting inference_state instantly. They only get deleted once the subprocess is used again. It would probably a better solution to move all of this into a thread. However, the memory usage of a single inference_state shouldn't be that high. """ # With an argument - the inference_state gets deleted. self._inference_state_deletion_queue.append(inference_state_id) class Listener(object): def __init__(self, pickle_protocol): self._inference_states = {} # TODO refactor so we don't need to process anymore just handle # controlling. self._process = _InferenceStateProcess(Listener) self._pickle_protocol = pickle_protocol def _get_inference_state(self, function, inference_state_id): from jedi.inference import InferenceState try: inference_state = self._inference_states[inference_state_id] except KeyError: from jedi.api.environment import InterpreterEnvironment inference_state = InferenceState( # The project is not actually needed. Nothing should need to # access it. project=None, environment=InterpreterEnvironment() ) self._inference_states[inference_state_id] = inference_state return inference_state def _run(self, inference_state_id, function, args, kwargs): if inference_state_id is None: return function(*args, **kwargs) elif function is None: del self._inference_states[inference_state_id] else: inference_state = self._get_inference_state(function, inference_state_id) # Exchange all handles args = list(args) for i, arg in enumerate(args): if isinstance(arg, AccessHandle): args[i] = inference_state.compiled_subprocess.get_access_handle(arg.id) for key, value in kwargs.items(): if isinstance(value, AccessHandle): kwargs[key] = inference_state.compiled_subprocess.get_access_handle(value.id) return function(inference_state, *args, **kwargs) def listen(self): stdout = sys.stdout # Mute stdout. Nobody should actually be able to write to it, # because stdout is used for IPC. sys.stdout = open(os.devnull, 'w') stdin = sys.stdin if sys.version_info[0] > 2: stdout = stdout.buffer stdin = stdin.buffer # Python 2 opens streams in text mode on Windows. Set stdout and stdin # to binary mode. elif sys.platform == 'win32': import msvcrt msvcrt.setmode(stdout.fileno(), os.O_BINARY) msvcrt.setmode(stdin.fileno(), os.O_BINARY) while True: try: payload = pickle_load(stdin) except EOFError: # It looks like the parent process closed. # Don't make a big fuss here and just exit. exit(0) try: result = False, None, self._run(*payload) except Exception as e: result = True, traceback.format_exc(), e pickle_dump(result, stdout, self._pickle_protocol) class AccessHandle(object): def __init__(self, subprocess, access, id_): self.access = access self._subprocess = subprocess self.id = id_ def add_subprocess(self, subprocess): self._subprocess = subprocess def __repr__(self): try: detail = self.access except AttributeError: detail = '#' + str(self.id) return '<%s of %s>' % (self.__class__.__name__, detail) def __getstate__(self): return self.id def __setstate__(self, state): self.id = state def __getattr__(self, name): if name in ('id', 'access') or name.startswith('_'): raise AttributeError("Something went wrong with unpickling") #if not is_py3: print >> sys.stderr, name #print('getattr', name, file=sys.stderr) return partial(self._workaround, force_unicode(name)) def _workaround(self, name, *args, **kwargs): """ TODO Currently we're passing slice objects around. This should not happen. They are also the only unhashable objects that we're passing around. """ if args and isinstance(args[0], slice): return self._subprocess.get_compiled_method_return(self.id, name, *args, **kwargs) return self._cached_results(name, *args, **kwargs) @memoize_method def _cached_results(self, name, *args, **kwargs): #if type(self._subprocess) == InferenceStateSubprocess: #print(name, args, kwargs, #self._subprocess.get_compiled_method_return(self.id, name, *args, **kwargs) #) return self._subprocess.get_compiled_method_return(self.id, name, *args, **kwargs) jedi-0.15.2/jedi/inference/compiled/subprocess/functions.py0000664000175000017500000000444013577124112023620 0ustar davedave00000000000000from __future__ import print_function import sys import os from jedi._compatibility import find_module, cast_path, force_unicode, \ iter_modules, all_suffixes from jedi.inference.compiled import access from jedi import parser_utils def get_sys_path(): return list(map(cast_path, sys.path)) def load_module(inference_state, **kwargs): return access.load_module(inference_state, **kwargs) def get_compiled_method_return(inference_state, id, attribute, *args, **kwargs): handle = inference_state.compiled_subprocess.get_access_handle(id) return getattr(handle.access, attribute)(*args, **kwargs) def create_simple_object(inference_state, obj): return access.create_access_path(inference_state, obj) def get_module_info(inference_state, sys_path=None, full_name=None, **kwargs): """ Returns Tuple[Union[NamespaceInfo, FileIO, None], Optional[bool]] """ if sys_path is not None: sys.path, temp = sys_path, sys.path try: return find_module(full_name=full_name, **kwargs) except ImportError: return None, None finally: if sys_path is not None: sys.path = temp def list_module_names(inference_state, search_path): return [ force_unicode(name) for module_loader, name, is_pkg in iter_modules(search_path) ] def get_builtin_module_names(inference_state): return list(map(force_unicode, sys.builtin_module_names)) def _test_raise_error(inference_state, exception_type): """ Raise an error to simulate certain problems for unit tests. """ raise exception_type def _test_print(inference_state, stderr=None, stdout=None): """ Force some prints in the subprocesses. This exists for unit tests. """ if stderr is not None: print(stderr, file=sys.stderr) sys.stderr.flush() if stdout is not None: print(stdout) sys.stdout.flush() def _get_init_path(directory_path): """ The __init__ file can be searched in a directory. If found return it, else None. """ for suffix in all_suffixes(): path = os.path.join(directory_path, '__init__' + suffix) if os.path.exists(path): return path return None def safe_literal_eval(inference_state, value): return parser_utils.safe_literal_eval(value) jedi-0.15.2/jedi/inference/compiled/subprocess/__main__.py0000664000175000017500000000323313577124112023327 0ustar davedave00000000000000import os import sys def _get_paths(): # Get the path to jedi. _d = os.path.dirname _jedi_path = _d(_d(_d(_d(_d(__file__))))) _parso_path = sys.argv[1] # The paths are the directory that jedi and parso lie in. return {'jedi': _jedi_path, 'parso': _parso_path} # Remove the first entry, because it's simply a directory entry that equals # this directory. del sys.path[0] if sys.version_info > (3, 4): from importlib.machinery import PathFinder class _ExactImporter(object): def __init__(self, path_dct): self._path_dct = path_dct def find_module(self, fullname, path=None): if path is None and fullname in self._path_dct: p = self._path_dct[fullname] loader = PathFinder.find_module(fullname, path=[p]) return loader return None # Try to import jedi/parso. sys.meta_path.insert(0, _ExactImporter(_get_paths())) from jedi.inference.compiled import subprocess # NOQA sys.meta_path.pop(0) else: import imp def load(name): paths = list(_get_paths().values()) fp, pathname, description = imp.find_module(name, paths) return imp.load_module(name, fp, pathname, description) load('parso') load('jedi') from jedi.inference.compiled import subprocess # NOQA from jedi._compatibility import highest_pickle_protocol # noqa: E402 # Retrieve the pickle protocol. host_sys_version = [int(x) for x in sys.argv[2].split('.')] pickle_protocol = highest_pickle_protocol([sys.version_info, host_sys_version]) # And finally start the client. subprocess.Listener(pickle_protocol=pickle_protocol).listen() jedi-0.15.2/jedi/inference/compiled/mixed.py0000664000175000017500000002720713577124112020534 0ustar davedave00000000000000""" Used only for REPL Completion. """ import inspect import os import sys from jedi.parser_utils import get_cached_code_lines from jedi._compatibility import unwrap from jedi import settings from jedi.inference import compiled from jedi.cache import underscore_memoization from jedi.file_io import FileIO from jedi.inference.base_value import ValueSet, ValueWrapper, NO_VALUES from jedi.inference.helpers import SimpleGetItemNotFound from jedi.inference.value import ModuleValue from jedi.inference.cache import inference_state_function_cache, \ inference_state_method_cache from jedi.inference.compiled.getattr_static import getattr_static from jedi.inference.compiled.access import compiled_objects_cache, \ ALLOWED_GETITEM_TYPES, get_api_type from jedi.inference.compiled.value import create_cached_compiled_object from jedi.inference.gradual.conversion import to_stub from jedi.inference.context import CompiledContext, CompiledModuleContext, \ TreeContextMixin _sentinel = object() class MixedObject(ValueWrapper): """ A ``MixedObject`` is used in two ways: 1. It uses the default logic of ``parser.python.tree`` objects, 2. except for getattr calls. The names dicts are generated in a fashion like ``CompiledObject``. This combined logic makes it possible to provide more powerful REPL completion. It allows side effects that are not noticable with the default parser structure to still be completeable. The biggest difference from CompiledObject to MixedObject is that we are generally dealing with Python code and not with C code. This will generate fewer special cases, because we in Python you don't have the same freedoms to modify the runtime. """ def __init__(self, compiled_object, tree_value): super(MixedObject, self).__init__(tree_value) self.compiled_object = compiled_object self.access_handle = compiled_object.access_handle def get_filters(self, *args, **kwargs): yield MixedObjectFilter(self.inference_state, self) def get_signatures(self): # Prefer `inspect.signature` over somehow analyzing Python code. It # should be very precise, especially for stuff like `partial`. return self.compiled_object.get_signatures() @inference_state_method_cache(default=NO_VALUES) def py__call__(self, arguments): # Fallback to the wrapped value if to stub returns no values. values = to_stub(self._wrapped_value) if not values:# or self in values: values = self._wrapped_value return values.py__call__(arguments) def get_safe_value(self, default=_sentinel): if default is _sentinel: return self.compiled_object.get_safe_value() else: return self.compiled_object.get_safe_value(default) def py__simple_getitem__(self, index): python_object = self.compiled_object.access_handle.access._obj if type(python_object) in ALLOWED_GETITEM_TYPES: return self.compiled_object.py__simple_getitem__(index) raise SimpleGetItemNotFound def _as_context(self): if self.parent_context is None: return MixedModuleContext(self) return MixedContext(self) def __repr__(self): return '<%s: %s>' % ( type(self).__name__, self.access_handle.get_repr() ) class MixedContext(CompiledContext, TreeContextMixin): @property def compiled_object(self): return self._value.compiled_object class MixedModuleContext(CompiledModuleContext, MixedContext): pass class MixedName(compiled.CompiledName): """ The ``CompiledName._compiled_object`` is our MixedObject. """ @property def start_pos(self): values = list(self.infer()) if not values: # This means a start_pos that doesn't exist (compiled objects). return 0, 0 return values[0].name.start_pos @underscore_memoization def infer(self): def access_to_value(parent_value, access): if parent_value is None: parent_context = None else: parent_context = parent_value.as_context() if parent_context is None or isinstance(parent_context, MixedContext): return _create(self._inference_state, access, parent_context=parent_context) else: return ValueSet({ create_cached_compiled_object( parent_context.inference_state, access, parent_context ) }) # TODO use logic from compiled.CompiledObjectFilter access_paths = self.parent_context.access_handle.getattr_paths( self.string_name, default=None ) assert len(access_paths) values = [None] for access in access_paths: values = ValueSet.from_sets(access_to_value(v, access) for v in values) return values @property def api_type(self): return next(iter(self.infer())).api_type class MixedObjectFilter(compiled.CompiledObjectFilter): name_class = MixedName @inference_state_function_cache() def _load_module(inference_state, path): module_node = inference_state.parse( path=path, cache=True, diff_cache=settings.fast_parser, cache_path=settings.cache_directory ).get_root_node() # python_module = inspect.getmodule(python_object) # TODO we should actually make something like this possible. #inference_state.modules[python_module.__name__] = module_node return module_node def _get_object_to_check(python_object): """Check if inspect.getfile has a chance to find the source.""" if sys.version_info[0] > 2: try: python_object = unwrap(python_object) except ValueError: # Can return a ValueError when it wraps around pass if (inspect.ismodule(python_object) or inspect.isclass(python_object) or inspect.ismethod(python_object) or inspect.isfunction(python_object) or inspect.istraceback(python_object) or inspect.isframe(python_object) or inspect.iscode(python_object)): return python_object try: return python_object.__class__ except AttributeError: raise TypeError # Prevents computation of `repr` within inspect. def _find_syntax_node_name(inference_state, python_object): original_object = python_object try: python_object = _get_object_to_check(python_object) path = inspect.getsourcefile(python_object) except TypeError: # The type might not be known (e.g. class_with_dict.__weakref__) return None if path is None or not os.path.exists(path): # The path might not exist or be e.g. . return None file_io = FileIO(path) module_node = _load_module(inference_state, path) if inspect.ismodule(python_object): # We don't need to check names for modules, because there's not really # a way to write a module in a module in Python (and also __name__ can # be something like ``email.utils``). code_lines = get_cached_code_lines(inference_state.grammar, path) return module_node, module_node, file_io, code_lines try: name_str = python_object.__name__ except AttributeError: # Stuff like python_function.__code__. return None if name_str == '': return None # It's too hard to find lambdas. # Doesn't always work (e.g. os.stat_result) names = module_node.get_used_names().get(name_str, []) # Only functions and classes are relevant. If a name e.g. points to an # import, it's probably a builtin (like collections.deque) and needs to be # ignored. names = [ n for n in names if n.parent.type in ('funcdef', 'classdef') and n.parent.name == n ] if not names: return None try: code = python_object.__code__ # By using the line number of a code object we make the lookup in a # file pretty easy. There's still a possibility of people defining # stuff like ``a = 3; foo(a); a = 4`` on the same line, but if people # do so we just don't care. line_nr = code.co_firstlineno except AttributeError: pass else: line_names = [name for name in names if name.start_pos[0] == line_nr] # There's a chance that the object is not available anymore, because # the code has changed in the background. if line_names: names = line_names code_lines = get_cached_code_lines(inference_state.grammar, path) # It's really hard to actually get the right definition, here as a last # resort we just return the last one. This chance might lead to odd # completions at some points but will lead to mostly correct type # inference, because people tend to define a public name in a module only # once. tree_node = names[-1].parent if tree_node.type == 'funcdef' and get_api_type(original_object) == 'instance': # If an instance is given and we're landing on a function (e.g. # partial in 3.5), something is completely wrong and we should not # return that. return None return module_node, tree_node, file_io, code_lines @compiled_objects_cache('mixed_cache') def _create(inference_state, access_handle, parent_context, *args): compiled_object = create_cached_compiled_object( inference_state, access_handle, parent_context=None if parent_context is None else parent_context.compiled_object.as_context() # noqa ) # TODO accessing this is bad, but it probably doesn't matter that much, # because we're working with interpreteters only here. python_object = access_handle.access._obj result = _find_syntax_node_name(inference_state, python_object) if result is None: # TODO Care about generics from stuff like `[1]` and don't return like this. if type(python_object) in (dict, list, tuple): return ValueSet({compiled_object}) tree_values = to_stub(compiled_object) if not tree_values: return ValueSet({compiled_object}) else: module_node, tree_node, file_io, code_lines = result if parent_context is None: # TODO this __name__ is probably wrong. name = compiled_object.get_root_context().py__name__() string_names = tuple(name.split('.')) module_context = ModuleValue( inference_state, module_node, file_io=file_io, string_names=string_names, code_lines=code_lines, is_package=compiled_object.is_package(), ).as_context() if name is not None: inference_state.module_cache.add(string_names, ValueSet([module_context])) else: if parent_context.tree_node.get_root_node() != module_node: # This happens e.g. when __module__ is wrong, or when using # TypeVar('foo'), where Jedi uses 'foo' as the name and # Python's TypeVar('foo').__module__ will be typing. return ValueSet({compiled_object}) module_context = parent_context.get_root_context() tree_values = ValueSet({module_context.create_value(tree_node)}) if tree_node.type == 'classdef': if not access_handle.is_class(): # Is an instance, not a class. tree_values = tree_values.execute_with_values() return ValueSet( MixedObject(compiled_object, tree_value=tree_value) for tree_value in tree_values ) jedi-0.15.2/jedi/inference/compiled/__init__.py0000664000175000017500000000456013577124112021162 0ustar davedave00000000000000from jedi._compatibility import unicode from jedi.inference.compiled.value import CompiledObject, CompiledName, \ CompiledObjectFilter, CompiledValueName, create_from_access_path from jedi.inference.base_value import LazyValueWrapper def builtin_from_name(inference_state, string): typing_builtins_module = inference_state.builtins_module if string in ('None', 'True', 'False'): builtins, = typing_builtins_module.non_stub_value_set filter_ = next(builtins.get_filters()) else: filter_ = next(typing_builtins_module.get_filters()) name, = filter_.get(string) value, = name.infer() return value class CompiledValue(LazyValueWrapper): def __init__(self, compiled_obj): self.inference_state = compiled_obj.inference_state self._compiled_obj = compiled_obj def __getattribute__(self, name): if name in ('get_safe_value', 'execute_operation', 'access_handle', 'negate', 'py__bool__', 'is_compiled'): return getattr(self._compiled_obj, name) return super(CompiledValue, self).__getattribute__(name) def _get_wrapped_value(self): instance, = builtin_from_name( self.inference_state, self._compiled_obj.name.string_name).execute_with_values() return instance def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self._compiled_obj) def create_simple_object(inference_state, obj): """ Only allows creations of objects that are easily picklable across Python versions. """ assert type(obj) in (int, float, str, bytes, unicode, slice, complex, bool), obj compiled_obj = create_from_access_path( inference_state, inference_state.compiled_subprocess.create_simple_object(obj) ) return CompiledValue(compiled_obj) def get_string_value_set(inference_state): return builtin_from_name(inference_state, u'str').execute_with_values() def load_module(inference_state, dotted_name, **kwargs): # Temporary, some tensorflow builtins cannot be loaded, so it's tried again # and again and it's really slow. if dotted_name.startswith('tensorflow.'): return None access_path = inference_state.compiled_subprocess.load_module(dotted_name=dotted_name, **kwargs) if access_path is None: return None return create_from_access_path(inference_state, access_path) jedi-0.15.2/jedi/inference/compiled/value.py0000664000175000017500000004661313577124112020544 0ustar davedave00000000000000""" Imitate the parser representation. """ import re from functools import partial from jedi import debug from jedi.inference.utils import to_list from jedi._compatibility import force_unicode, Parameter, cast_path from jedi.cache import underscore_memoization, memoize_method from jedi.inference.filters import AbstractFilter from jedi.inference.names import AbstractNameDefinition, ValueNameMixin, \ ParamNameInterface from jedi.inference.base_value import Value, ValueSet, NO_VALUES from jedi.inference.lazy_value import LazyKnownValue from jedi.inference.compiled.access import _sentinel from jedi.inference.cache import inference_state_function_cache from jedi.inference.helpers import reraise_getitem_errors from jedi.inference.signature import BuiltinSignature from jedi.inference.context import CompiledContext, CompiledModuleContext class CheckAttribute(object): """Raises an AttributeError if the attribute X isn't available.""" def __init__(self, check_name=None): # Remove the py in front of e.g. py__call__. self.check_name = check_name def __call__(self, func): self.func = func if self.check_name is None: self.check_name = force_unicode(func.__name__[2:]) return self def __get__(self, instance, owner): if instance is None: return self # This might raise an AttributeError. That's wanted. instance.access_handle.getattr_paths(self.check_name) return partial(self.func, instance) class CompiledObject(Value): def __init__(self, inference_state, access_handle, parent_context=None): super(CompiledObject, self).__init__(inference_state, parent_context) self.access_handle = access_handle def py__call__(self, arguments): return_annotation = self.access_handle.get_return_annotation() if return_annotation is not None: # TODO the return annotation may also be a string. return create_from_access_path(self.inference_state, return_annotation).execute_annotation() try: self.access_handle.getattr_paths(u'__call__') except AttributeError: return super(CompiledObject, self).py__call__(arguments) else: if self.access_handle.is_class(): from jedi.inference.value import CompiledInstance return ValueSet([ CompiledInstance(self.inference_state, self.parent_context, self, arguments) ]) else: return ValueSet(self._execute_function(arguments)) @CheckAttribute() def py__class__(self): return create_from_access_path(self.inference_state, self.access_handle.py__class__()) @CheckAttribute() def py__mro__(self): return (self,) + tuple( create_from_access_path(self.inference_state, access) for access in self.access_handle.py__mro__accesses() ) @CheckAttribute() def py__bases__(self): return tuple( create_from_access_path(self.inference_state, access) for access in self.access_handle.py__bases__() ) def py__path__(self): paths = self.access_handle.py__path__() if paths is None: return None return map(cast_path, paths) def is_package(self): return self.py__path__() is not None @property def string_names(self): # For modules name = self.py__name__() if name is None: return () return tuple(name.split('.')) def get_qualified_names(self): return self.access_handle.get_qualified_names() def py__bool__(self): return self.access_handle.py__bool__() def py__file__(self): return cast_path(self.access_handle.py__file__()) def is_class(self): return self.access_handle.is_class() def is_module(self): return self.access_handle.is_module() def is_compiled(self): return True def is_stub(self): return False def is_instance(self): return self.access_handle.is_instance() def py__doc__(self): return self.access_handle.py__doc__() @to_list def get_param_names(self): try: signature_params = self.access_handle.get_signature_params() except ValueError: # Has no signature params_str, ret = self._parse_function_doc() if not params_str: tokens = [] else: tokens = params_str.split(',') if self.access_handle.ismethoddescriptor(): tokens.insert(0, 'self') for p in tokens: name, _, default = p.strip().partition('=') yield UnresolvableParamName(self, name, default) else: for signature_param in signature_params: yield SignatureParamName(self, signature_param) def get_signatures(self): _, return_string = self._parse_function_doc() return [BuiltinSignature(self, return_string)] def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.access_handle.get_repr()) @underscore_memoization def _parse_function_doc(self): doc = self.py__doc__() if doc is None: return '', '' return _parse_function_doc(doc) @property def api_type(self): return self.access_handle.get_api_type() @underscore_memoization def _cls(self): """ We used to limit the lookups for instantiated objects like list(), but this is not the case anymore. Python itself """ # Ensures that a CompiledObject is returned that is not an instance (like list) return self def get_filters(self, is_instance=False, origin_scope=None): yield self._ensure_one_filter(is_instance) @memoize_method def _ensure_one_filter(self, is_instance): return CompiledObjectFilter(self.inference_state, self, is_instance) def py__simple_getitem__(self, index): with reraise_getitem_errors(IndexError, KeyError, TypeError): try: access = self.access_handle.py__simple_getitem__(index) except AttributeError: return super(CompiledObject, self).py__simple_getitem__(index) if access is None: return NO_VALUES return ValueSet([create_from_access_path(self.inference_state, access)]) def py__getitem__(self, index_value_set, contextualized_node): all_access_paths = self.access_handle.py__getitem__all_values() if all_access_paths is None: # This means basically that no __getitem__ has been defined on this # object. return super(CompiledObject, self).py__getitem__(index_value_set, contextualized_node) return ValueSet( create_from_access_path(self.inference_state, access) for access in all_access_paths ) def py__iter__(self, contextualized_node=None): # Python iterators are a bit strange, because there's no need for # the __iter__ function as long as __getitem__ is defined (it will # just start with __getitem__(0). This is especially true for # Python 2 strings, where `str.__iter__` is not even defined. if not self.access_handle.has_iter(): for x in super(CompiledObject, self).py__iter__(contextualized_node): yield x access_path_list = self.access_handle.py__iter__list() if access_path_list is None: # There is no __iter__ method on this object. return for access in access_path_list: yield LazyKnownValue(create_from_access_path(self.inference_state, access)) def py__name__(self): return self.access_handle.py__name__() @property def name(self): name = self.py__name__() if name is None: name = self.access_handle.get_repr() return CompiledValueName(self, name) def _execute_function(self, params): from jedi.inference import docstrings from jedi.inference.compiled import builtin_from_name if self.api_type != 'function': return for name in self._parse_function_doc()[1].split(): try: # TODO wtf is this? this is exactly the same as the thing # below. It uses getattr as well. self.inference_state.builtins_module.access_handle.getattr_paths(name) except AttributeError: continue else: bltn_obj = builtin_from_name(self.inference_state, name) for result in self.inference_state.execute(bltn_obj, params): yield result for type_ in docstrings.infer_return_types(self): yield type_ def get_safe_value(self, default=_sentinel): try: return self.access_handle.get_safe_value() except ValueError: if default == _sentinel: raise return default def execute_operation(self, other, operator): return create_from_access_path( self.inference_state, self.access_handle.execute_operation(other.access_handle, operator) ) def execute_annotation(self): if self.access_handle.get_repr() == 'None': # None as an annotation doesn't need to be executed. return ValueSet([self]) return super(CompiledObject, self).execute_annotation() def negate(self): return create_from_access_path(self.inference_state, self.access_handle.negate()) def get_metaclasses(self): return NO_VALUES def _as_context(self): if self.parent_context is None: return CompiledModuleContext(self) return CompiledContext(self) class CompiledName(AbstractNameDefinition): def __init__(self, inference_state, parent_context, name): self._inference_state = inference_state self.parent_context = parent_context self.string_name = name def _get_qualified_names(self): parent_qualified_names = self.parent_context.get_qualified_names() if parent_qualified_names is None: return None return parent_qualified_names + (self.string_name,) def __repr__(self): try: name = self.parent_context.name # __name__ is not defined all the time except AttributeError: name = None return '<%s: (%s).%s>' % (self.__class__.__name__, name, self.string_name) @property def api_type(self): api = self.infer() # If we can't find the type, assume it is an instance variable if not api: return "instance" return next(iter(api)).api_type @underscore_memoization def infer(self): return ValueSet([_create_from_name( self._inference_state, self.parent_context, self.string_name )]) class SignatureParamName(ParamNameInterface, AbstractNameDefinition): def __init__(self, compiled_obj, signature_param): self.parent_context = compiled_obj.parent_context self._signature_param = signature_param @property def string_name(self): return self._signature_param.name def to_string(self): s = self._kind_string() + self.string_name if self._signature_param.has_annotation: s += ': ' + self._signature_param.annotation_string if self._signature_param.has_default: s += '=' + self._signature_param.default_string return s def get_kind(self): return getattr(Parameter, self._signature_param.kind_name) def infer(self): p = self._signature_param inference_state = self.parent_context.inference_state values = NO_VALUES if p.has_default: values = ValueSet([create_from_access_path(inference_state, p.default)]) if p.has_annotation: annotation = create_from_access_path(inference_state, p.annotation) values |= annotation.execute_with_values() return values class UnresolvableParamName(ParamNameInterface, AbstractNameDefinition): def __init__(self, compiled_obj, name, default): self.parent_context = compiled_obj.parent_context self.string_name = name self._default = default def get_kind(self): return Parameter.POSITIONAL_ONLY def to_string(self): string = self.string_name if self._default: string += '=' + self._default return string def infer(self): return NO_VALUES class CompiledValueName(ValueNameMixin, AbstractNameDefinition): def __init__(self, value, name): self.string_name = name self._value = value self.parent_context = value.parent_context class EmptyCompiledName(AbstractNameDefinition): """ Accessing some names will raise an exception. To avoid not having any completions, just give Jedi the option to return this object. It infers to nothing. """ def __init__(self, inference_state, name): self.parent_context = inference_state.builtins_module self.string_name = name def infer(self): return NO_VALUES class CompiledObjectFilter(AbstractFilter): name_class = CompiledName def __init__(self, inference_state, compiled_object, is_instance=False): self._inference_state = inference_state self.compiled_object = compiled_object self.is_instance = is_instance def get(self, name): return self._get( name, lambda name, unsafe: self.compiled_object.access_handle.is_allowed_getattr(name, unsafe), lambda name: name in self.compiled_object.access_handle.dir(), check_has_attribute=True ) def _get(self, name, allowed_getattr_callback, in_dir_callback, check_has_attribute=False): """ To remove quite a few access calls we introduced the callback here. """ # Always use unicode objects in Python 2 from here. name = force_unicode(name) if self._inference_state.allow_descriptor_getattr: pass has_attribute, is_descriptor = allowed_getattr_callback( name, unsafe=self._inference_state.allow_descriptor_getattr ) if check_has_attribute and not has_attribute: return [] if (is_descriptor or not has_attribute) \ and not self._inference_state.allow_descriptor_getattr: return [self._get_cached_name(name, is_empty=True)] if self.is_instance and not in_dir_callback(name): return [] return [self._get_cached_name(name)] @memoize_method def _get_cached_name(self, name, is_empty=False): if is_empty: return EmptyCompiledName(self._inference_state, name) else: return self._create_name(name) def values(self): from jedi.inference.compiled import builtin_from_name names = [] needs_type_completions, dir_infos = self.compiled_object.access_handle.get_dir_infos() # We could use `unsafe` here as well, especially as a parameter to # get_dir_infos. But this would lead to a lot of property executions # that are probably not wanted. The drawback for this is that we # have a different name for `get` and `values`. For `get` we always # execute. for name in dir_infos: names += self._get( name, lambda name, unsafe: dir_infos[name], lambda name: name in dir_infos, ) # ``dir`` doesn't include the type names. if not self.is_instance and needs_type_completions: for filter in builtin_from_name(self._inference_state, u'type').get_filters(): names += filter.values() return names def _create_name(self, name): return self.name_class(self._inference_state, self.compiled_object, name) def __repr__(self): return "<%s: %s>" % (self.__class__.__name__, self.compiled_object) docstr_defaults = { 'floating point number': u'float', 'character': u'str', 'integer': u'int', 'dictionary': u'dict', 'string': u'str', } def _parse_function_doc(doc): """ Takes a function and returns the params and return value as a tuple. This is nothing more than a docstring parser. TODO docstrings like utime(path, (atime, mtime)) and a(b [, b]) -> None TODO docstrings like 'tuple of integers' """ doc = force_unicode(doc) # parse round parentheses: def func(a, (b,c)) try: count = 0 start = doc.index('(') for i, s in enumerate(doc[start:]): if s == '(': count += 1 elif s == ')': count -= 1 if count == 0: end = start + i break param_str = doc[start + 1:end] except (ValueError, UnboundLocalError): # ValueError for doc.index # UnboundLocalError for undefined end in last line debug.dbg('no brackets found - no param') end = 0 param_str = u'' else: # remove square brackets, that show an optional param ( = None) def change_options(m): args = m.group(1).split(',') for i, a in enumerate(args): if a and '=' not in a: args[i] += '=None' return ','.join(args) while True: param_str, changes = re.subn(r' ?\[([^\[\]]+)\]', change_options, param_str) if changes == 0: break param_str = param_str.replace('-', '_') # see: isinstance.__doc__ # parse return value r = re.search(u'-[>-]* ', doc[end:end + 7]) if r is None: ret = u'' else: index = end + r.end() # get result type, which can contain newlines pattern = re.compile(r'(,\n|[^\n-])+') ret_str = pattern.match(doc, index).group(0).strip() # New object -> object() ret_str = re.sub(r'[nN]ew (.*)', r'\1()', ret_str) ret = docstr_defaults.get(ret_str, ret_str) return param_str, ret def _create_from_name(inference_state, compiled_object, name): access_paths = compiled_object.access_handle.getattr_paths(name, default=None) parent_context = compiled_object if parent_context.is_class(): parent_context = parent_context.parent_context value = None for access_path in access_paths: value = create_cached_compiled_object( inference_state, access_path, parent_context=None if value is None else value.as_context(), ) return value def _normalize_create_args(func): """The cache doesn't care about keyword vs. normal args.""" def wrapper(inference_state, obj, parent_context=None): return func(inference_state, obj, parent_context) return wrapper def create_from_access_path(inference_state, access_path): value = None for name, access in access_path.accesses: value = create_cached_compiled_object( inference_state, access, parent_context=None if value is None else value.as_context() ) return value @_normalize_create_args @inference_state_function_cache() def create_cached_compiled_object(inference_state, access_handle, parent_context): assert not isinstance(parent_context, CompiledObject) return CompiledObject(inference_state, access_handle, parent_context) jedi-0.15.2/jedi/inference/compiled/getattr_static.py0000664000175000017500000001317613577124112022447 0ustar davedave00000000000000""" A static version of getattr. This is a backport of the Python 3 code with a little bit of additional information returned to enable Jedi to make decisions. """ import types from jedi._compatibility import py_version _sentinel = object() def _check_instance(obj, attr): instance_dict = {} try: instance_dict = object.__getattribute__(obj, "__dict__") except AttributeError: pass return dict.get(instance_dict, attr, _sentinel) def _check_class(klass, attr): for entry in _static_getmro(klass): if _shadowed_dict(type(entry)) is _sentinel: try: return entry.__dict__[attr] except KeyError: pass return _sentinel def _is_type(obj): try: _static_getmro(obj) except TypeError: return False return True def _shadowed_dict_newstyle(klass): dict_attr = type.__dict__["__dict__"] for entry in _static_getmro(klass): try: class_dict = dict_attr.__get__(entry)["__dict__"] except KeyError: pass else: if not (type(class_dict) is types.GetSetDescriptorType and class_dict.__name__ == "__dict__" and class_dict.__objclass__ is entry): return class_dict return _sentinel def _static_getmro_newstyle(klass): return type.__dict__['__mro__'].__get__(klass) if py_version >= 30: _shadowed_dict = _shadowed_dict_newstyle _get_type = type _static_getmro = _static_getmro_newstyle else: def _shadowed_dict(klass): """ In Python 2 __dict__ is not overwritable: class Foo(object): pass setattr(Foo, '__dict__', 4) Traceback (most recent call last): File "", line 1, in TypeError: __dict__ must be a dictionary object It applies to both newstyle and oldstyle classes: class Foo(object): pass setattr(Foo, '__dict__', 4) Traceback (most recent call last): File "", line 1, in AttributeError: attribute '__dict__' of 'type' objects is not writable It also applies to instances of those objects. However to keep things straight forward, newstyle classes always use the complicated way of accessing it while oldstyle classes just use getattr. """ if type(klass) is _oldstyle_class_type: return getattr(klass, '__dict__', _sentinel) return _shadowed_dict_newstyle(klass) class _OldStyleClass: pass _oldstyle_instance_type = type(_OldStyleClass()) _oldstyle_class_type = type(_OldStyleClass) def _get_type(obj): type_ = object.__getattribute__(obj, '__class__') if type_ is _oldstyle_instance_type: # Somehow for old style classes we need to access it directly. return obj.__class__ return type_ def _static_getmro(klass): if type(klass) is _oldstyle_class_type: def oldstyle_mro(klass): """ Oldstyle mro is a really simplistic way of look up mro: https://stackoverflow.com/questions/54867/what-is-the-difference-between-old-style-and-new-style-classes-in-python """ yield klass for base in klass.__bases__: for yield_from in oldstyle_mro(base): yield yield_from return oldstyle_mro(klass) return _static_getmro_newstyle(klass) def _safe_hasattr(obj, name): return _check_class(_get_type(obj), name) is not _sentinel def _safe_is_data_descriptor(obj): return _safe_hasattr(obj, '__set__') or _safe_hasattr(obj, '__delete__') def getattr_static(obj, attr, default=_sentinel): """Retrieve attributes without triggering dynamic lookup via the descriptor protocol, __getattr__ or __getattribute__. Note: this function may not be able to retrieve all attributes that getattr can fetch (like dynamically created attributes) and may find attributes that getattr can't (like descriptors that raise AttributeError). It can also return descriptor objects instead of instance members in some cases. See the documentation for details. Returns a tuple `(attr, is_get_descriptor)`. is_get_descripter means that the attribute is a descriptor that has a `__get__` attribute. """ instance_result = _sentinel if not _is_type(obj): klass = _get_type(obj) dict_attr = _shadowed_dict(klass) if (dict_attr is _sentinel or type(dict_attr) is types.MemberDescriptorType): instance_result = _check_instance(obj, attr) else: klass = obj klass_result = _check_class(klass, attr) if instance_result is not _sentinel and klass_result is not _sentinel: if _safe_hasattr(klass_result, '__get__') \ and _safe_is_data_descriptor(klass_result): # A get/set descriptor has priority over everything. return klass_result, True if instance_result is not _sentinel: return instance_result, False if klass_result is not _sentinel: return klass_result, _safe_hasattr(klass_result, '__get__') if obj is klass: # for types we check the metaclass too for entry in _static_getmro(type(klass)): if _shadowed_dict(type(entry)) is _sentinel: try: return entry.__dict__[attr], False except KeyError: pass if default is not _sentinel: return default, False raise AttributeError(attr) jedi-0.15.2/jedi/inference/compiled/access.py0000664000175000017500000004364413577124112020672 0ustar davedave00000000000000from __future__ import print_function import inspect import types import sys import operator as op from collections import namedtuple import warnings from jedi._compatibility import unicode, is_py3, builtins, \ py_version, force_unicode from jedi.inference.compiled.getattr_static import getattr_static ALLOWED_GETITEM_TYPES = (str, list, tuple, unicode, bytes, bytearray, dict) MethodDescriptorType = type(str.replace) # These are not considered classes and access is granted even though they have # a __class__ attribute. NOT_CLASS_TYPES = ( types.BuiltinFunctionType, types.CodeType, types.FrameType, types.FunctionType, types.GeneratorType, types.GetSetDescriptorType, types.LambdaType, types.MemberDescriptorType, types.MethodType, types.ModuleType, types.TracebackType, MethodDescriptorType ) if is_py3: NOT_CLASS_TYPES += ( types.MappingProxyType, types.SimpleNamespace, types.DynamicClassAttribute, ) # Those types don't exist in typing. MethodDescriptorType = type(str.replace) WrapperDescriptorType = type(set.__iter__) # `object.__subclasshook__` is an already executed descriptor. object_class_dict = type.__dict__["__dict__"].__get__(object) ClassMethodDescriptorType = type(object_class_dict['__subclasshook__']) _sentinel = object() # Maps Python syntax to the operator module. COMPARISON_OPERATORS = { '==': op.eq, '!=': op.ne, 'is': op.is_, 'is not': op.is_not, '<': op.lt, '<=': op.le, '>': op.gt, '>=': op.ge, } _OPERATORS = { '+': op.add, '-': op.sub, } _OPERATORS.update(COMPARISON_OPERATORS) ALLOWED_DESCRIPTOR_ACCESS = ( types.FunctionType, types.GetSetDescriptorType, types.MemberDescriptorType, MethodDescriptorType, WrapperDescriptorType, ClassMethodDescriptorType, staticmethod, classmethod, ) def safe_getattr(obj, name, default=_sentinel): try: attr, is_get_descriptor = getattr_static(obj, name) except AttributeError: if default is _sentinel: raise return default else: if isinstance(attr, ALLOWED_DESCRIPTOR_ACCESS): # In case of descriptors that have get methods we cannot return # it's value, because that would mean code execution. # Since it's an isinstance call, code execution is still possible, # but this is not really a security feature, but much more of a # safety feature. Code execution is basically always possible when # a module is imported. This is here so people don't shoot # themselves in the foot. return getattr(obj, name) return attr SignatureParam = namedtuple( 'SignatureParam', 'name has_default default default_string has_annotation annotation annotation_string kind_name' ) def compiled_objects_cache(attribute_name): def decorator(func): """ This decorator caches just the ids, oopposed to caching the object itself. Caching the id has the advantage that an object doesn't need to be hashable. """ def wrapper(inference_state, obj, parent_context=None): cache = getattr(inference_state, attribute_name) # Do a very cheap form of caching here. key = id(obj) try: cache[key] return cache[key][0] except KeyError: # TODO wuaaaarrghhhhhhhh if attribute_name == 'mixed_cache': result = func(inference_state, obj, parent_context) else: result = func(inference_state, obj) # Need to cache all of them, otherwise the id could be overwritten. cache[key] = result, obj, parent_context return result return wrapper return decorator def create_access(inference_state, obj): return inference_state.compiled_subprocess.get_or_create_access_handle(obj) def load_module(inference_state, dotted_name, sys_path): temp, sys.path = sys.path, sys_path try: __import__(dotted_name) except ImportError: # If a module is "corrupt" or not really a Python module or whatever. print('Module %s not importable in path %s.' % (dotted_name, sys_path), file=sys.stderr) return None except Exception: # Since __import__ pretty much makes code execution possible, just # catch any error here and print it. import traceback print("Cannot import:\n%s" % traceback.format_exc(), file=sys.stderr) return None finally: sys.path = temp # Just access the cache after import, because of #59 as well as the very # complicated import structure of Python. module = sys.modules[dotted_name] return create_access_path(inference_state, module) class AccessPath(object): def __init__(self, accesses): self.accesses = accesses # Writing both of these methods here looks a bit ridiculous. However with # the differences of Python 2/3 it's actually necessary, because we will # otherwise have a accesses attribute that is bytes instead of unicode. def __getstate__(self): return self.accesses def __setstate__(self, value): self.accesses = value def create_access_path(inference_state, obj): access = create_access(inference_state, obj) return AccessPath(access.get_access_path_tuples()) def _force_unicode_decorator(func): return lambda *args, **kwargs: force_unicode(func(*args, **kwargs)) def get_api_type(obj): if inspect.isclass(obj): return u'class' elif inspect.ismodule(obj): return u'module' elif inspect.isbuiltin(obj) or inspect.ismethod(obj) \ or inspect.ismethoddescriptor(obj) or inspect.isfunction(obj): return u'function' # Everything else... return u'instance' class DirectObjectAccess(object): def __init__(self, inference_state, obj): self._inference_state = inference_state self._obj = obj def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self.get_repr()) def _create_access(self, obj): return create_access(self._inference_state, obj) def _create_access_path(self, obj): return create_access_path(self._inference_state, obj) def py__bool__(self): return bool(self._obj) def py__file__(self): try: return self._obj.__file__ except AttributeError: return None def py__doc__(self): return force_unicode(inspect.getdoc(self._obj)) or u'' def py__name__(self): if not _is_class_instance(self._obj) or \ inspect.ismethoddescriptor(self._obj): # slots cls = self._obj else: try: cls = self._obj.__class__ except AttributeError: # happens with numpy.core.umath._UFUNC_API (you get it # automatically by doing `import numpy`. return None try: return force_unicode(cls.__name__) except AttributeError: return None def py__mro__accesses(self): return tuple(self._create_access_path(cls) for cls in self._obj.__mro__[1:]) def py__getitem__all_values(self): if isinstance(self._obj, dict): return [self._create_access_path(v) for v in self._obj.values()] return self.py__iter__list() def py__simple_getitem__(self, index): if type(self._obj) not in ALLOWED_GETITEM_TYPES: # Get rid of side effects, we won't call custom `__getitem__`s. return None return self._create_access_path(self._obj[index]) def py__iter__list(self): if not hasattr(self._obj, '__getitem__'): return None if type(self._obj) not in ALLOWED_GETITEM_TYPES: # Get rid of side effects, we won't call custom `__getitem__`s. return [] lst = [] for i, part in enumerate(self._obj): if i > 20: # Should not go crazy with large iterators break lst.append(self._create_access_path(part)) return lst def py__class__(self): return self._create_access_path(self._obj.__class__) def py__bases__(self): return [self._create_access_path(base) for base in self._obj.__bases__] def py__path__(self): paths = getattr(self._obj, '__path__', None) # Avoid some weird hacks that would just fail, because they cannot be # used by pickle. if not isinstance(paths, list) \ or not all(isinstance(p, (bytes, unicode)) for p in paths): return None return paths @_force_unicode_decorator def get_repr(self): builtins = 'builtins', '__builtin__' if inspect.ismodule(self._obj): return repr(self._obj) # Try to avoid execution of the property. if safe_getattr(self._obj, '__module__', default='') in builtins: return repr(self._obj) type_ = type(self._obj) if type_ == type: return type.__repr__(self._obj) if safe_getattr(type_, '__module__', default='') in builtins: # Allow direct execution of repr for builtins. return repr(self._obj) return object.__repr__(self._obj) def is_class(self): return inspect.isclass(self._obj) def is_module(self): return inspect.ismodule(self._obj) def is_instance(self): return _is_class_instance(self._obj) def ismethoddescriptor(self): return inspect.ismethoddescriptor(self._obj) def get_qualified_names(self): def try_to_get_name(obj): return getattr(obj, '__qualname__', getattr(obj, '__name__', None)) if self.is_module(): return () name = try_to_get_name(self._obj) if name is None: name = try_to_get_name(type(self._obj)) if name is None: return () return tuple(force_unicode(n) for n in name.split('.')) def dir(self): return list(map(force_unicode, dir(self._obj))) def has_iter(self): try: iter(self._obj) return True except TypeError: return False def is_allowed_getattr(self, name, unsafe=False): # TODO this API is ugly. if unsafe: # Unsafe is mostly used to check for __getattr__/__getattribute__. # getattr_static works for properties, but the underscore methods # are just ignored (because it's safer and avoids more code # execution). See also GH #1378. # Avoid warnings, see comment in the next function. with warnings.catch_warnings(record=True): warnings.simplefilter("always") try: return hasattr(self._obj, name), False except Exception: # Obviously has an attribute (propably a property) that # gets executed, so just avoid all exceptions here. return False, False try: attr, is_get_descriptor = getattr_static(self._obj, name) except AttributeError: return False, False else: if is_get_descriptor and type(attr) not in ALLOWED_DESCRIPTOR_ACCESS: # In case of descriptors that have get methods we cannot return # it's value, because that would mean code execution. return True, True return True, False def getattr_paths(self, name, default=_sentinel): try: # Make sure no warnings are printed here, this is autocompletion, # warnings should not be shown. See also GH #1383. with warnings.catch_warnings(record=True): warnings.simplefilter("always") return_obj = getattr(self._obj, name) except Exception as e: if default is _sentinel: if isinstance(e, AttributeError): # Happens e.g. in properties of # PyQt4.QtGui.QStyleOptionComboBox.currentText # -> just set it to None raise # Just in case anything happens, return an AttributeError. It # should not crash. raise AttributeError return_obj = default access = self._create_access(return_obj) if inspect.ismodule(return_obj): return [access] try: module = return_obj.__module__ except AttributeError: pass else: if module is not None: try: __import__(module) # For some modules like _sqlite3, the __module__ for classes is # different, in this case it's sqlite3. So we have to try to # load that "original" module, because it's not loaded yet. If # we don't do that, we don't really have a "parent" module and # we would fall back to builtins. except ImportError: pass module = inspect.getmodule(return_obj) if module is None: module = inspect.getmodule(type(return_obj)) if module is None: module = builtins return [self._create_access(module), access] def get_safe_value(self): if type(self._obj) in (bool, bytes, float, int, str, unicode, slice): return self._obj raise ValueError("Object is type %s and not simple" % type(self._obj)) def get_api_type(self): return get_api_type(self._obj) def get_access_path_tuples(self): accesses = [create_access(self._inference_state, o) for o in self._get_objects_path()] return [(access.py__name__(), access) for access in accesses] def _get_objects_path(self): def get(): obj = self._obj yield obj try: obj = obj.__objclass__ except AttributeError: pass else: yield obj try: # Returns a dotted string path. imp_plz = obj.__module__ except AttributeError: # Unfortunately in some cases like `int` there's no __module__ if not inspect.ismodule(obj): yield builtins else: if imp_plz is None: # Happens for example in `(_ for _ in []).send.__module__`. yield builtins else: try: yield sys.modules[imp_plz] except KeyError: # __module__ can be something arbitrary that doesn't exist. yield builtins return list(reversed(list(get()))) def execute_operation(self, other_access_handle, operator): other_access = other_access_handle.access op = _OPERATORS[operator] return self._create_access_path(op(self._obj, other_access._obj)) def needs_type_completions(self): return inspect.isclass(self._obj) and self._obj != type def get_signature_params(self): return [ SignatureParam( name=p.name, has_default=p.default is not p.empty, default=self._create_access_path(p.default), default_string=repr(p.default), has_annotation=p.annotation is not p.empty, annotation=self._create_access_path(p.annotation), annotation_string=str(p.annotation), kind_name=str(p.kind) ) for p in self._get_signature().parameters.values() ] def _get_signature(self): obj = self._obj if py_version < 33: raise ValueError("inspect.signature was introduced in 3.3") if py_version == 34: # In 3.4 inspect.signature are wrong for str and int. This has # been fixed in 3.5. The signature of object is returned, # because no signature was found for str. Here we imitate 3.5 # logic and just ignore the signature if the magic methods # don't match object. # 3.3 doesn't even have the logic and returns nothing for str # and classes that inherit from object. user_def = inspect._signature_get_user_defined_method if (inspect.isclass(obj) and not user_def(type(obj), '__init__') and not user_def(type(obj), '__new__') and (obj.__init__ != object.__init__ or obj.__new__ != object.__new__)): raise ValueError try: return inspect.signature(obj) except (RuntimeError, TypeError): # Reading the code of the function in Python 3.6 implies there are # at least these errors that might occur if something is wrong with # the signature. In that case we just want a simple escape for now. raise ValueError def get_return_annotation(self): try: o = self._obj.__annotations__.get('return') except AttributeError: return None if o is None: return None return self._create_access_path(o) def negate(self): return self._create_access_path(-self._obj) def get_dir_infos(self): """ Used to return a couple of infos that are needed when accessing the sub objects of an objects """ tuples = dict( (force_unicode(name), self.is_allowed_getattr(name)) for name in self.dir() ) return self.needs_type_completions(), tuples def _is_class_instance(obj): """Like inspect.* methods.""" try: cls = obj.__class__ except AttributeError: return False else: return cls != type and not issubclass(cls, NOT_CLASS_TYPES) jedi-0.15.2/jedi/cache.py0000664000175000017500000001023713577124112014732 0ustar davedave00000000000000""" This caching is very important for speed and memory optimizations. There's nothing really spectacular, just some decorators. The following cache types are available: - ``time_cache`` can be used to cache something for just a limited time span, which can be useful if there's user interaction and the user cannot react faster than a certain time. This module is one of the reasons why |jedi| is not thread-safe. As you can see there are global variables, which are holding the cache information. Some of these variables are being cleaned after every API usage. """ import time from functools import wraps from jedi import settings from parso.cache import parser_cache _time_caches = {} def underscore_memoization(func): """ Decorator for methods:: class A(object): def x(self): if self._x: self._x = 10 return self._x Becomes:: class A(object): @underscore_memoization def x(self): return 10 A now has an attribute ``_x`` written by this decorator. """ name = '_' + func.__name__ def wrapper(self): try: return getattr(self, name) except AttributeError: result = func(self) setattr(self, name, result) return result return wrapper def clear_time_caches(delete_all=False): """ Jedi caches many things, that should be completed after each completion finishes. :param delete_all: Deletes also the cache that is normally not deleted, like parser cache, which is important for faster parsing. """ global _time_caches if delete_all: for cache in _time_caches.values(): cache.clear() parser_cache.clear() else: # normally just kill the expired entries, not all for tc in _time_caches.values(): # check time_cache for expired entries for key, (t, value) in list(tc.items()): if t < time.time(): # delete expired entries del tc[key] def call_signature_time_cache(time_add_setting): """ This decorator works as follows: Call it with a setting and after that use the function with a callable that returns the key. But: This function is only called if the key is not available. After a certain amount of time (`time_add_setting`) the cache is invalid. If the given key is None, the function will not be cached. """ def _temp(key_func): dct = {} _time_caches[time_add_setting] = dct def wrapper(*args, **kwargs): generator = key_func(*args, **kwargs) key = next(generator) try: expiry, value = dct[key] if expiry > time.time(): return value except KeyError: pass value = next(generator) time_add = getattr(settings, time_add_setting) if key is not None: dct[key] = time.time() + time_add, value return value return wrapper return _temp def time_cache(seconds): def decorator(func): cache = {} @wraps(func) def wrapper(*args, **kwargs): key = (args, frozenset(kwargs.items())) try: created, result = cache[key] if time.time() < created + seconds: return result except KeyError: pass result = func(*args, **kwargs) cache[key] = time.time(), result return result wrapper.clear_cache = lambda: cache.clear() return wrapper return decorator def memoize_method(method): """A normal memoize function.""" @wraps(method) def wrapper(self, *args, **kwargs): cache_dict = self.__dict__.setdefault('_memoize_method_dct', {}) dct = cache_dict.setdefault(method, {}) key = (args, frozenset(kwargs.items())) try: return dct[key] except KeyError: result = method(self, *args, **kwargs) dct[key] = result return result return wrapper jedi-0.15.2/setup.cfg0000664000175000017500000000041313577125145014225 0ustar davedave00000000000000[bdist_wheel] universal = 1 [flake8] max-line-length = 100 ignore = # do not use bare 'except' E722, # don't know why this was ever even an option, 1+1 should be possible. E226, # line break before binary operator W503, [egg_info] tag_build = tag_date = 0 jedi-0.15.2/conftest.py0000664000175000017500000001131513577124112014577 0ustar davedave00000000000000import tempfile import shutil import os from functools import partial import pytest import jedi from jedi.api.environment import get_system_environment, InterpreterEnvironment from jedi._compatibility import py_version collect_ignore = [ 'setup.py', '__main__.py', 'jedi/inference/compiled/subprocess/__main__.py', 'build/', 'test/examples', ] # The following hooks (pytest_configure, pytest_unconfigure) are used # to modify `jedi.settings.cache_directory` because `clean_jedi_cache` # has no effect during doctests. Without these hooks, doctests uses # user's cache (e.g., ~/.cache/jedi/). We should remove this # workaround once the problem is fixed in pytest. # # See: # - https://github.com/davidhalter/jedi/pull/168 # - https://bitbucket.org/hpk42/pytest/issue/275/ jedi_cache_directory_orig = None jedi_cache_directory_temp = None def pytest_addoption(parser): parser.addoption("--jedi-debug", "-D", action='store_true', help="Enables Jedi's debug output.") parser.addoption("--warning-is-error", action='store_true', help="Warnings are treated as errors.") parser.addoption("--env", action='store', help="Execute the tests in that environment (e.g. 35 for python3.5).") parser.addoption("--interpreter-env", "-I", action='store_true', help="Don't use subprocesses to guarantee having safe " "code execution. Useful for debugging.") def pytest_configure(config): global jedi_cache_directory_orig, jedi_cache_directory_temp jedi_cache_directory_orig = jedi.settings.cache_directory jedi_cache_directory_temp = tempfile.mkdtemp(prefix='jedi-test-') jedi.settings.cache_directory = jedi_cache_directory_temp if config.option.jedi_debug: jedi.set_debug_function() if config.option.warning_is_error: import warnings warnings.simplefilter("error") def pytest_unconfigure(config): global jedi_cache_directory_orig, jedi_cache_directory_temp jedi.settings.cache_directory = jedi_cache_directory_orig shutil.rmtree(jedi_cache_directory_temp) @pytest.fixture(scope='session') def clean_jedi_cache(request): """ Set `jedi.settings.cache_directory` to a temporary directory during test. Note that you can't use built-in `tmpdir` and `monkeypatch` fixture here because their scope is 'function', which is not used in 'session' scope fixture. This fixture is activated in ../pytest.ini. """ from jedi import settings old = settings.cache_directory tmp = tempfile.mkdtemp(prefix='jedi-test-') settings.cache_directory = tmp @request.addfinalizer def restore(): settings.cache_directory = old shutil.rmtree(tmp) @pytest.fixture(scope='session') def environment(request): if request.config.option.interpreter_env: return InterpreterEnvironment() version = request.config.option.env if version is None: version = os.environ.get('JEDI_TEST_ENVIRONMENT', str(py_version)) return get_system_environment(version[0] + '.' + version[1:]) @pytest.fixture(scope='session') def Script(environment): return partial(jedi.Script, environment=environment) @pytest.fixture(scope='session') def names(environment): return partial(jedi.names, environment=environment) @pytest.fixture(scope='session') def has_typing(environment): if environment.version_info >= (3, 5, 0): # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. return True script = jedi.Script('import typing', environment=environment) return bool(script.goto_definitions()) @pytest.fixture(scope='session') def jedi_path(): return os.path.dirname(__file__) @pytest.fixture() def skip_python2(environment): if environment.version_info.major == 2: # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. pytest.skip() @pytest.fixture() def skip_pre_python38(environment): if environment.version_info < (3, 8): # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. pytest.skip() @pytest.fixture() def skip_pre_python37(environment): if environment.version_info < (3, 7): # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. pytest.skip() @pytest.fixture() def skip_pre_python35(environment): if environment.version_info < (3, 5): # This if is just needed to avoid that tests ever skip way more than # they should for all Python versions. pytest.skip()