summaryrefslogtreecommitdiff
path: root/astroid/tests/testdata/python2
Commit message (Collapse)AuthorAgeFilesLines
* Remove copyright header and simplify the files to a simple classClaudiu Popa2019-09-111-9/+0
| | | | | | | | We had two "copyrighted" files in the repo but they were containing a basic class with a simple `__init__` method, so there's no need to keep that around. Close #685
* Improve as_string output of operators, elif, with, return & docsbrendanator2018-07-053-21/+49
| | | | | | | | | | | | | The precedence and associativity rules of operators are respected and parens are only wrapped around child nodes when needed A single If node inside the else block is output as `elif` Unneccesary parens in with statements are removed Unneccesary parens in tuple returns are removed Doc strings in classes and functions no longer get additional indenting
* Get rid of the astpeephole (it's not an actual peephole and it's optimized ↵Claudiu Popa2018-05-131-1051/+0
| | | | just for once single use case
* fix nested namespace package importChris Philip2018-04-021-0/+1
|
* Builder: fix detection of whether file is a package when there is a ↵Łukasz Rogalski2017-04-021-0/+0
| | | | | | __init__.py in filename (#408) Fixes PyCQA/pylint#1348
* Add support for discovering .pth file created by certain namespace packages.Claudiu Popa2016-08-243-0/+2
|
* Build a dummy module object for namespace directories and add a test for ↵Claudiu Popa2016-05-092-0/+2
| | | | multiple directories contributing to the same namespace.
* Don't introduce empty values for non-zip importers in path_importer_cache ↵Claudiu Popa2016-05-081-0/+0
| | | | and add a test for implicit namespace packages.
* Add test for old namespace packages protocol.Claudiu Popa2016-05-0712-0/+9
|
* Add two new exceptions, AstroidImportError and AstroidSyntaxError.Claudiu Popa2015-12-061-0/+1
| | | | | | | | They are subclasses of AstroidBuildingException and are raised when a module can't be imported from various reasons. Also do_import_module lets the errors to bubble up without converting them to InferenceError. This particular conversion happens only during the inference.
* Replace __future__.print_statement with print_functionJohn Vandenberg2015-10-191-1/+1
| | | | | | | | | 1c35a97 fixed Python 2 only print statements, and imported a mix of __future__.print_function and __future__.print_statement. 1826d98 fixed most of them, however this one still remains. --HG-- branch : print_statement
* MergeClaudiu Popa2015-07-251-1/+1
|\
| * Get rid of logilab.common.shellutils in test data.Florian Bruhin2015-07-251-1/+1
| | | | | | | | | | | | | | | | Instead of logilab.common.shellutils.ProgressBar we use astroid.node_classes.Name now. --HG-- branch : no-logilab-common
* | Add option to search for all Python files in get_module_filesRadosław Ganczarek2015-07-251-0/+0
|/
* astroid.inspector was moved to pylint.pyreverse.Claudiu Popa2015-06-172-45/+0
| | | | | | | This was moved since it is the only known client of this module. No other change was made to the exported API. This doesn't go through a normal deprecation cycle, since I really want to clean it up at a faster pace.
* Fix failing tests.Claudiu Popa2015-06-022-7/+6
|
* print_statement -> print_function.Omer Katz2015-06-023-3/+3
| | | | | --HG-- branch : fix-python3-tests
* Fixed syntax errors in Python 3.Omer Katz2015-06-017-15/+16
| | | | | --HG-- branch : fix-python3-tests
* Add the ability to optimize small ast subtrees.Claudiu Popa2015-01-181-0/+1051
| | | | | | | | The first use of the AST peephole optimizer is the optimization of multiple BinOp nodes. This removes recursivity in the rebuilder when dealing with a lot of small strings joined by the addition operator. which are now precomputed to the final string. Closes issue #59.
* Merge all test data into a single package per Python version.Torsten Marek2014-11-0940-0/+557
Also modernized a lot of test code. This makes it possible to run the tests from both the base directory of the project as well as the astroid package. Since the packages have the same name for Python 2 and 3, there is less version-dependent code in the tests.