summaryrefslogtreecommitdiff
path: root/astroid/tests/unittest_scoped_nodes.py
Commit message (Collapse)AuthorAgeFilesLines
* Moved tests out of package directory (#704)Ashley Whetter2019-10-151-2049/+0
|
* Clean new pylint errors from the codebaseClaudiu Popa2019-09-241-2/+1
|
* Remove redundant compatibility code (#693)Hugo van Kemenade2019-09-101-34/+6
|
* Relax the spreading of defaults to both positional only and positional or ↵Claudiu Popa2019-07-101-0/+6
| | | | keywords arguments
* Add support for finding positional only arguments using the Arguments APIsClaudiu Popa2019-07-091-0/+16
|
* Add support for positional only arguments in astroid for python 3.8Claudiu Popa2019-07-091-0/+43
|
* Annotated AST follows PEP8 coding style when converted to string.Łukasz Rogalski2019-06-221-1/+1
|
* Fix lint errorsClaudiu Popa2019-06-021-4/+4
|
* Replace _verify_duplicates_mro with _clean_duplicates_mro.Peter de Blanc2019-06-021-0/+17
| | | | | Only raise DuplicateBasesError if the first node is duplicated; otherwise remove all but the last instance of each duplicated node.
* Reformat according to blackhippo912019-01-271-1/+1
|
* Add docstringhippo912019-01-271-0/+4
|
* Fix unit test devoted to bound_methods and lambda through lambda factoryhippo912019-01-271-11/+11
|
* Add of another unit test devoted to bound method lambdas. Not yet correct.hippo912019-01-271-0/+19
|
* Initial formatting of astroidClaudiu Popa2018-10-021-624/+781
|
* Filter out ``Uninferable`` when inferring the call result result of a class ↵Claudiu Popa2018-08-221-0/+13
| | | | | | with an uninferable ``__call__`` method. Close PyCQA/pylint#2434
* Spelling fixesVille Skyttä2018-07-241-1/+1
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-3/+13
|
* Improve as_string output of operators, elif, with, return & docsbrendanator2018-07-051-1/+1
| | | | | | | | | | | | | 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
* Adapt the ABCMeta test to take in account _py_abcClaudiu Popa2018-06-041-1/+1
|
* Remove some code that's always going to be the same now that we run on Python 3Claudiu Popa2018-06-041-1/+0
|
* pyupgrade (#549)Anthony Sottile2018-05-221-2/+2
|
* Stop infer_call_result from being improperly called in testsBryce Guinta2018-02-171-1/+1
| | | | | The calls previously implied that the result is being called from inside itself
* Fix lint errorsBryce Guinta2018-01-281-1/+1
| | | | Removes an abundance of useless-supression errors
* Assign __module__ and __qualname__ to class locals implicitlyBryce Guinta2018-01-031-4/+9
| | | | | This prevents __qualname__ and __module__, when called as locals in the class definition, from raising a false-positive no-member in pylint
* When verifying duplicates classes in MRO, ignore on-the-fly generated classesClaudiu Popa2017-12-151-0/+29
| | | | Close PyCQA/pylint#1706
* Fix lintClaudiu Popa2017-11-111-1/+0
|
* Remove file_stream since it was slated for removal for 1.6Claudiu Popa2017-11-111-20/+7
|
* Dunder class at method level is now inferred as the class of the methodClaudiu Popa2017-07-081-0/+33
| | | | Close PyCQA/pylint#1328
* Don't raise DuplicateBaseError when classes at different locations are usedClaudiu Popa2017-07-081-1/+4
| | | | | | | | | | For instance, one can implement a namedtuple base class, which gets reused on a class with the same name later on in the file. Until now, we considered these two classes as being the same, because they shared the name, but in fact they are different, being created at different locations and through different means. Close PyCQA/pylint#1458
* Fix lintastroid-1.5.2Claudiu Popa2017-04-171-2/+1
|
* mro() can be computed for classes with old style classes in the hierarchyClaudiu Popa2017-04-151-0/+27
|
* Arguments node gained a new attribute, kwonlyargs_annotations, for holding ↵Claudiu Popa2017-04-121-1/+9
| | | | the keyword-only args annotations
* Mark __init_subclass__ as classmethod (#389)Łukasz Rogalski2017-01-281-0/+11
|
* Make ClassDefs support keyword arguments. (#384)Derek Gustafson2017-01-221-0/+12
|
* Fix some pylint errors over the code base.Claudiu Popa2016-08-241-2/+0
|
* Add `returns` into the proper order in FunctionDef._astroid_fieldsClaudiu Popa2016-07-271-0/+12
| | | | | The order is important, since it determines the last child, which in turn determines the last line number of a scoped node.
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+7
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* New function, astroid.extract_node, exported out from astroid.test_utils.Claudiu Popa2016-06-291-26/+26
|
* Give priority to local special attributes for classes and modulesClaudiu Popa2016-06-051-4/+6
| | | | | | For instance, a module can decide to redefine its __file__ attribute. Previously, this was defaulting to the file name itself, without taking in account local redefinitions.
* Add test for slots and dict.keys.Claudiu Popa2016-06-041-0/+12
|
* Fix typosJakub Wilk2016-06-021-1/+1
|
* Convert all files to new license headerCeridwen2016-05-161-17/+3
|
* imported_names() got replaced by public_names()Claudiu Popa2016-02-201-3/+25
| | | | | | | | | | | Our understanding of wildcard imports through __all__ was half baked to say at least, since we couldn't account for modifications of the list, which results in tons of false positives. Instead, we replaced it with public_names(), a method which returns all the names that are publicly available in a module, that is that don't start with an underscore, even though this means that there is a possibility for other names to be leaked out even though they are not present in the __all__ variable.
* The slots() method conflates all the slots from the ancestors into a list of ↵Claudiu Popa2015-12-181-0/+27
| | | | | | | | current and parent slots. We're doing this because this is the right semantics of slots, they get inherited, as long as each parent defines a __slots__ entry.
* Cleanup pylint's warnings over astroid codebaseClaudiu Popa2015-12-141-5/+6
| | | | | | | | | | Some of the messages were disabled in pylintrc, since they're not very useful for our case. Other parameters, such as the number of arguments / statements / attributes etc were configured so that they won't be too restrictive for our codebase, since making the code to respect them right now requires too much development changes, which is not justified by the end result. Closes issue #284.
* Enable the warnings in tests through a context managerClaudiu Popa2015-12-111-2/+2
| | | | | | | | Previously, we were enabling blindly all the warnings in tests files through `warnings.simplefilter`, which had the side effect of not taking into account the values of the -W flag. This meant that warnings which should have been silenced, weren't, leading to a huge output when running the tests with Python 3.5.
* relative_to_absolute_name will now raise TooManyLevelsError when a relative ↵Claudiu Popa2015-12-061-0/+13
| | | | import is trying to access something beyond the top-level package.
* Merge upstream changesCeridwen2015-11-061-1/+0
|\
| * Rename Uninferable and instantiate_class, fix broken tests, improveCeridwen2015-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | testing. * Rename YES to Uninferable * Rename instanciate_class to instantiate_class. * Use six in test_namedtuple_advanced_inference. * Fix test_file_from_module failure on PyPy. * Add enum34 to unittest_brain. * Add unittest_brain dependencies tox.ini.