Uploaded Test files

This commit is contained in:
Batuhan Berk Başoğlu 2020-11-12 11:05:57 -05:00
parent f584ad9d97
commit 2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions

View file

@ -0,0 +1,57 @@
Main Authors
============
David Halter (@davidhalter) <davidhalter88@gmail.com>
Code Contributors
=================
Alisdair Robertson (@robodair)
Code Contributors (to Jedi and therefore possibly to this library)
==================================================================
Takafumi Arakaki (@tkf) <aka.tkf@gmail.com>
Danilo Bargen (@dbrgn) <mail@dbrgn.ch>
Laurens Van Houtven (@lvh) <_@lvh.cc>
Aldo Stracquadanio (@Astrac) <aldo.strac@gmail.com>
Jean-Louis Fuchs (@ganwell) <ganwell@fangorn.ch>
tek (@tek)
Yasha Borevich (@jjay) <j.borevich@gmail.com>
Aaron Griffin <aaronmgriffin@gmail.com>
andviro (@andviro)
Mike Gilbert (@floppym) <floppym@gentoo.org>
Aaron Meurer (@asmeurer) <asmeurer@gmail.com>
Lubos Trilety <ltrilety@redhat.com>
Akinori Hattori (@hattya) <hattya@gmail.com>
srusskih (@srusskih)
Steven Silvester (@blink1073)
Colin Duquesnoy (@ColinDuquesnoy) <colin.duquesnoy@gmail.com>
Jorgen Schaefer (@jorgenschaefer) <contact@jorgenschaefer.de>
Fredrik Bergroth (@fbergroth)
Mathias Fußenegger (@mfussenegger)
Syohei Yoshida (@syohex) <syohex@gmail.com>
ppalucky (@ppalucky)
immerrr (@immerrr) immerrr@gmail.com
Albertas Agejevas (@alga)
Savor d'Isavano (@KenetJervet) <newelevenken@163.com>
Phillip Berndt (@phillipberndt) <phillip.berndt@gmail.com>
Ian Lee (@IanLee1521) <IanLee1521@gmail.com>
Farkhad Khatamov (@hatamov) <comsgn@gmail.com>
Kevin Kelley (@kelleyk) <kelleyk@kelleyk.net>
Sid Shanker (@squidarth) <sid.p.shanker@gmail.com>
Reinoud Elhorst (@reinhrst)
Guido van Rossum (@gvanrossum) <guido@python.org>
Dmytro Sadovnychyi (@sadovnychyi) <jedi@dmit.ro>
Cristi Burcă (@scribu)
bstaint (@bstaint)
Mathias Rav (@Mortal) <rav@cs.au.dk>
Daniel Fiterman (@dfit99) <fitermandaniel2@gmail.com>
Simon Ruggier (@sruggier)
Élie Gouzien (@ElieGouzien)
Tim Gates (@timgates42) <tim.gates@iress.com>
Batuhan Taskaya (@isidentical) <isidentical@gmail.com>
Jocelyn Boullier (@Kazy) <jocelyn@boullier.bzh>
Note: (@user) means a github user name.

View file

@ -0,0 +1 @@
pip

View file

@ -0,0 +1,86 @@
All contributions towards parso are MIT licensed.
Some Python files have been taken from the standard library and are therefore
PSF licensed. Modifications on these files are dual licensed (both MIT and
PSF). These files are:
- parso/pgen2/*
- parso/tokenize.py
- parso/token.py
- test/test_pgen2.py
Also some test files under test/normalizer_issue_files have been copied from
https://github.com/PyCQA/pycodestyle (Expat License == MIT License).
-------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) <2013-2017> <David Halter and others, see AUTHORS.txt>
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.
-------------------------------------------------------------------------------
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------
1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved"
are retained in Python alone or in any derivative version prepared by Licensee.
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.
4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.

View file

@ -0,0 +1,253 @@
Metadata-Version: 2.1
Name: parso
Version: 0.7.1
Summary: A Python Parser
Home-page: https://github.com/davidhalter/parso
Author: David Halter
Author-email: davidhalter88@gmail.com
Maintainer: David Halter
Maintainer-email: davidhalter88@gmail.com
License: MIT
Keywords: python parser parsing
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Provides-Extra: testing
Requires-Dist: docopt ; extra == 'testing'
Requires-Dist: pytest (>=3.0.7) ; extra == 'testing'
###################################################################
parso - A Python Parser
###################################################################
.. image:: https://travis-ci.org/davidhalter/parso.svg?branch=master
:target: https://travis-ci.org/davidhalter/parso
:alt: Travis CI build status
.. image:: https://coveralls.io/repos/github/davidhalter/parso/badge.svg?branch=master
:target: https://coveralls.io/github/davidhalter/parso?branch=master
:alt: Coverage Status
.. image:: https://pepy.tech/badge/parso
:target: https://pepy.tech/project/parso
:alt: PyPI Downloads
.. image:: https://raw.githubusercontent.com/davidhalter/parso/master/docs/_static/logo_characters.png
Parso is a Python parser that supports error recovery and round-trip parsing
for different Python versions (in multiple Python versions). Parso is also able
to list multiple syntax errors in your python file.
Parso has been battle-tested by jedi_. It was pulled out of jedi to be useful
for other projects as well.
Parso consists of a small API to parse Python and analyse the syntax tree.
A simple example:
.. code-block:: python
>>> import parso
>>> module = parso.parse('hello + 1', version="3.6")
>>> expr = module.children[0]
>>> expr
PythonNode(arith_expr, [<Name: hello@1,0>, <Operator: +>, <Number: 1>])
>>> print(expr.get_code())
hello + 1
>>> name = expr.children[0]
>>> name
<Name: hello@1,0>
>>> name.end_pos
(1, 5)
>>> expr.end_pos
(1, 9)
To list multiple issues:
.. code-block:: python
>>> grammar = parso.load_grammar()
>>> module = grammar.parse('foo +\nbar\ncontinue')
>>> error1, error2 = grammar.iter_errors(module)
>>> error1.message
'SyntaxError: invalid syntax'
>>> error2.message
"SyntaxError: 'continue' not properly in loop"
Resources
=========
- `Testing <https://parso.readthedocs.io/en/latest/docs/development.html#testing>`_
- `PyPI <https://pypi.python.org/pypi/parso>`_
- `Docs <https://parso.readthedocs.org/en/latest/>`_
- Uses `semantic versioning <https://semver.org/>`_
Installation
============
pip install parso
Future
======
- There will be better support for refactoring and comments. Stay tuned.
- There's a WIP PEP8 validator. It's however not in a good shape, yet.
Known Issues
============
- `async`/`await` are already used as keywords in Python3.6.
- `from __future__ import print_function` is not ignored.
Acknowledgements
================
- Guido van Rossum (@gvanrossum) for creating the parser generator pgen2
(originally used in lib2to3).
- `Salome Schneider <https://www.crepes-schnaegg.ch/cr%C3%AApes-schn%C3%A4gg/kunst-f%C3%BCrs-cr%C3%AApes-mobil/>`_
for the extremely awesome parso logo.
.. _jedi: https://github.com/davidhalter/jedi
.. :changelog:
Changelog
---------
0.7.1 (2020-07-24)
++++++++++++++++++
- Fixed a couple of smaller bugs (mostly syntax error detection in
``Grammar.iter_errors``)
This is going to be the last release that supports Python 2.7, 3.4 and 3.5.
0.7.0 (2020-04-13)
++++++++++++++++++
- Fix a lot of annoying bugs in the diff parser. The fuzzer did not find
issues anymore even after running it for more than 24 hours (500k tests).
- Small grammar change: suites can now contain newlines even after a newline.
This should really not matter if you don't use error recovery. It allows for
nicer error recovery.
0.6.2 (2020-02-27)
++++++++++++++++++
- Bugfixes
- Add Grammar.refactor (might still be subject to change until 0.7.0)
0.6.1 (2020-02-03)
++++++++++++++++++
- Add ``parso.normalizer.Issue.end_pos`` to make it possible to know where an
issue ends
0.6.0 (2020-01-26)
++++++++++++++++++
- Dropped Python 2.6/Python 3.3 support
- del_stmt names are now considered as a definition
(for ``name.is_definition()``)
- Bugfixes
0.5.2 (2019-12-15)
++++++++++++++++++
- Add include_setitem to get_definition/is_definition and get_defined_names (#66)
- Fix named expression error listing (#89, #90)
- Fix some f-string tokenizer issues (#93)
0.5.1 (2019-07-13)
++++++++++++++++++
- Fix: Some unicode identifiers were not correctly tokenized
- Fix: Line continuations in f-strings are now working
0.5.0 (2019-06-20)
++++++++++++++++++
- **Breaking Change** comp_for is now called sync_comp_for for all Python
versions to be compatible with the Python 3.8 Grammar
- Added .pyi stubs for a lot of the parso API
- Small FileIO changes
0.4.0 (2019-04-05)
++++++++++++++++++
- Python 3.8 support
- FileIO support, it's now possible to use abstract file IO, support is alpha
0.3.4 (2019-02-13)
+++++++++++++++++++
- Fix an f-string tokenizer error
0.3.3 (2019-02-06)
+++++++++++++++++++
- Fix async errors in the diff parser
- A fix in iter_errors
- This is a very small bugfix release
0.3.2 (2019-01-24)
+++++++++++++++++++
- 20+ bugfixes in the diff parser and 3 in the tokenizer
- A fuzzer for the diff parser, to give confidence that the diff parser is in a
good shape.
- Some bugfixes for f-string
0.3.1 (2018-07-09)
+++++++++++++++++++
- Bugfixes in the diff parser and keyword-only arguments
0.3.0 (2018-06-30)
+++++++++++++++++++
- Rewrote the pgen2 parser generator.
0.2.1 (2018-05-21)
+++++++++++++++++++
- A bugfix for the diff parser.
- Grammar files can now be loaded from a specific path.
0.2.0 (2018-04-15)
+++++++++++++++++++
- f-strings are now parsed as a part of the normal Python grammar. This makes
it way easier to deal with them.
0.1.1 (2017-11-05)
+++++++++++++++++++
- Fixed a few bugs in the caching layer
- Added support for Python 3.7
0.1.0 (2017-09-04)
+++++++++++++++++++
- Pulling the library out of Jedi. Some APIs will definitely change.

View file

@ -0,0 +1,67 @@
parso-0.7.1.dist-info/AUTHORS.txt,sha256=3mYpcmx0UTVJWBylRbQqcsIi0gTBlwaLBcWTKZxbfZk,1974
parso-0.7.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
parso-0.7.1.dist-info/LICENSE.txt,sha256=-meXMHN1PRdiTK-GhNXugW1wyJ2RLFvKfKDwjnsVDts,4176
parso-0.7.1.dist-info/METADATA,sha256=VRUmQfJJTRtJmqfmXm1HX6VPZ4gFUfUqGBeXXr5Rqno,7001
parso-0.7.1.dist-info/RECORD,,
parso-0.7.1.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
parso-0.7.1.dist-info/top_level.txt,sha256=GOOKQCPcnr0_7IRArxyI0CX5LLu4WLlzIRAVWS-vJ4s,6
parso/__init__.py,sha256=MB6wH5_N8D8asxUoSPvGZMrEPvGBS82a1HTD_oXXtHM,1607
parso/__init__.pyi,sha256=3jWug9bcGHsR_s7b-sB3voWDzWlv2iTRJqcXPXaHL6g,612
parso/__pycache__/__init__.cpython-36.pyc,,
parso/__pycache__/_compatibility.cpython-36.pyc,,
parso/__pycache__/cache.cpython-36.pyc,,
parso/__pycache__/file_io.cpython-36.pyc,,
parso/__pycache__/grammar.cpython-36.pyc,,
parso/__pycache__/normalizer.cpython-36.pyc,,
parso/__pycache__/parser.cpython-36.pyc,,
parso/__pycache__/tree.cpython-36.pyc,,
parso/__pycache__/utils.cpython-36.pyc,,
parso/_compatibility.py,sha256=eOsGk0mzUyrDcQv312MLPbv8NyOtA2TzgeNv-BOjkvU,2452
parso/cache.py,sha256=XcXZLx1f2RLzQ4875KCn06kGZZ6_E_nWYjmdF_K93pQ,8668
parso/file_io.py,sha256=0N0GiXqO7f8KTBiXkzyhulrVry8PzNy0_VDedQnnlcM,1333
parso/grammar.py,sha256=Wh-QfcikBRRwCfML-DTV-kditYMtl4z5hnzi2cb1K-U,10504
parso/grammar.pyi,sha256=0uLe17ZuGQARQKBYgeL64p_8qdZUAI8rNmsggfIBIxY,1192
parso/normalizer.py,sha256=tBQ0-QAIBF7kly7Aru29xrzSGaVZkpn39AxXG9X-xlM,5754
parso/parser.py,sha256=f8laqzUHWNhT0XhdhliuRm4j61Zyv51-_suok3VENfs,7161
parso/pgen2/__init__.py,sha256=kFfRZsSReM49V0YIJ_cG0_TMTew2t4IMbG95KO2BI8E,382
parso/pgen2/__init__.pyi,sha256=-UkGH-plKfp64DPyguchM_Dt5TYjG07b0Ql7BGqS_10,71
parso/pgen2/__pycache__/__init__.cpython-36.pyc,,
parso/pgen2/__pycache__/generator.cpython-36.pyc,,
parso/pgen2/__pycache__/grammar_parser.cpython-36.pyc,,
parso/pgen2/generator.py,sha256=0tfpeIvtx9cvrAj4r_KKNcOun3Z02E0u_Ppr8F6YBBQ,14242
parso/pgen2/generator.pyi,sha256=zpCiqN5U0gLVFhtWdGSB5VAxNuXiu7zcoLnUiD3UWOs,1243
parso/pgen2/grammar_parser.py,sha256=Dm_v-_k1TgH4kibwdoTTTFK73-qLU65WD2BGqOMr284,5399
parso/pgen2/grammar_parser.pyi,sha256=R9hg4_CSl1veamWxFLma3VeiGAjWnrVgQpyQ5IZIKMo,586
parso/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
parso/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
parso/python/__pycache__/__init__.cpython-36.pyc,,
parso/python/__pycache__/diff.cpython-36.pyc,,
parso/python/__pycache__/errors.cpython-36.pyc,,
parso/python/__pycache__/parser.cpython-36.pyc,,
parso/python/__pycache__/pep8.cpython-36.pyc,,
parso/python/__pycache__/prefix.cpython-36.pyc,,
parso/python/__pycache__/token.cpython-36.pyc,,
parso/python/__pycache__/tokenize.cpython-36.pyc,,
parso/python/__pycache__/tree.cpython-36.pyc,,
parso/python/diff.py,sha256=HpAYqglR5wLFDp49FT5QZns4lYlz0R3GUdUENVOQV3Q,34230
parso/python/errors.py,sha256=EizcIKflllrTHYVECFIbiuOFnNAlEdQN1elXBeK52tA,48022
parso/python/grammar27.txt,sha256=bSMrnz8PI-v7kQLitd_y9LLkn8j-N4AOv69weOXNlE8,5958
parso/python/grammar310.txt,sha256=6F3fMJ9I4kyz9yA3yMstPBhPoMUcDEaP-vvUC6SH19w,7552
parso/python/grammar33.txt,sha256=bAnmVVIABN_IvU4l1iyGLFfnc34JMFRtoRFSuuxnMN4,6124
parso/python/grammar34.txt,sha256=ayMV3Fkbluck6L5sx3irpYpCo0HMzimFmk-eMsxj3rM,6128
parso/python/grammar35.txt,sha256=_URL6-AnMMl2Jabd_Y59yJFd3qf47533DyXGx7onu4E,6933
parso/python/grammar36.txt,sha256=96mIObHv6QlajN3mrUE-W8xE2nkqr1gKjWjdOfWxumA,6933
parso/python/grammar37.txt,sha256=WT1RER3yp5hMXRTsCbH7ThxfqGiJygd9Xv6Mr5ieLrw,6784
parso/python/grammar38.txt,sha256=eUmU6Mcrzd-LyXiWBmO-vmATGsxqvwH_vxRUqdjdqW4,7571
parso/python/grammar39.txt,sha256=6F3fMJ9I4kyz9yA3yMstPBhPoMUcDEaP-vvUC6SH19w,7552
parso/python/parser.py,sha256=B4-vG7uuLUWKGlo1OCo1aXG3PREzY4QTVVWil46tJZ8,8579
parso/python/pep8.py,sha256=igaMWYAftazeoxlcNVrEYDCofI8omn8SKXPsbJsEzhE,32216
parso/python/prefix.py,sha256=KNIwOhF6jP6E4QSEpV3ddrj91wm9a7P8OYQb9qe_zpc,2405
parso/python/token.py,sha256=prRZHr4vVMK35JUWVC9M9kyeqqEWLDyOKjgwLQN4hzo,811
parso/python/token.pyi,sha256=x5pZldVHUcRW8YKhO-spOmnNMIHF6LVFRiNeqghFzKM,810
parso/python/tokenize.py,sha256=dzu4IW2Vg-usd19jLv7fV8XQ2HeNL5Jkk6rKF3sZWT8,27649
parso/python/tokenize.pyi,sha256=ErpIw3JIaGkMldGiduzc_qn5yqkpx2igkhUJYhE64Ec,686
parso/python/tree.py,sha256=pcYo0f8A0jt6kWaGFIPgun8MFptTppf-SxEcdJs0AaI,38111
parso/tree.py,sha256=FbgT76nYvub2QDKXN_BtIKJAbEZsQLTt2Rg11FEYylU,11572
parso/utils.py,sha256=PMgEepK2kYOLokSPHYS20NeTLIiIknJzFilX7QVbZHk,6504
parso/utils.pyi,sha256=12GehYRj7haWpIyi-37ozh_zEbckxAsSll6HggSKa_s,792

View file

@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.34.2)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

View file

@ -0,0 +1 @@
parso