summaryrefslogtreecommitdiff
path: root/astroid/tests
Commit message (Collapse)AuthorAgeFilesLines
* Moved tests out of package directory (#704)Ashley Whetter2019-10-15145-17495/+0
|
* Fix lint warningsClaudiu Popa2019-10-111-15/+0
|
* All type comments have as parent the corresponding `astroid` nodeClaudiu Popa2019-10-091-0/+21
| | | | | | | Until now they had as parent the builtin `ast` node which meant we were operating with primitive objects instead of our own. Close PyCQA/pylint#3174
* Allow annotated assign with attrsTomas Novak2019-09-261-0/+13
|
* A transform for the builtin `dataclasses` module was added.Claudiu Popa2019-09-261-0/+33
| | | | | | | | | | This should address various `dataclasses` issues that were surfaced even more after the release of pylint 2.4.0. In the previous versions of `astroid`, annotated assign nodes were allowed to be retrieved via `getattr()` but that no longer happens with the latest `astroid` release, as those attribute are not actual attributes, but rather virtual ones, thus an operation such as `getattr()` does not make sense for them.
* Clean new pylint errors from the codebaseClaudiu Popa2019-09-246-46/+15
|
* Skip test that does not work on Python 3.8 due to library differencesClaudiu Popa2019-09-121-0/+5
|
* Update http brain tips to support `phrase` and `description`Claudiu Popa2019-09-121-0/+13
| | | | Close PyCQA/pylint#2950
* Fix linting errorsClaudiu Popa2019-09-112-3/+0
|
* Add a brain tip for ``subprocess.check_output``Claudiu Popa2019-09-111-0/+12
| | | | Close #689
* Remove copyright header and simplify the files to a simple classClaudiu Popa2019-09-112-18/+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
* Remove redundant compatibility code (#693)Hugo van Kemenade2019-09-108-130/+33
|
* Add brain tips for `crypt`. Close PyCQA/pylint#3047Grygorii Iermolenko2019-08-221-0/+16
|
* Fix typed_ast based tests for Python 3.8Claudiu Popa2019-07-101-2/+8
|
* Run f string debug test on Python 3.8+Claudiu Popa2019-07-101-0/+1
|
* Remove `__class__` from FunctionDef locals, instead look it up in the ↵Claudiu Popa2019-07-101-2/+2
| | | | | | | | | | current scope Previously `__class__` was added as an implicit local for methods, but that causes some issues as it now is counted as a local instead of a special object created by the compiler. A better way to be able to find `__class__` is to look it up in the current scope. Close PyCQA/pylint#1825
* Add a simple test for f-string debug modeClaudiu Popa2019-07-101-0/+6
|
* Relax the spreading of defaults to both positional only and positional or ↵Claudiu Popa2019-07-101-0/+6
| | | | keywords arguments
* Use inspect.signature instead of using inspect.getargspecClaudiu Popa2019-07-091-1/+5
|
* Add support for finding positional only arguments using the Arguments APIsClaudiu Popa2019-07-092-0/+31
|
* Build FunctionDef.__get__ to use positional only arguments when inferring ↵Claudiu Popa2019-07-091-2/+12
| | | | the bound method
* Introduce a new argument to `Arguments` for storing the positional only ↵Claudiu Popa2019-07-091-0/+16
| | | | | | | | | annotations The annotations were stored until now in `.annotations` and `kwonlyargs_annotations`, but given the addition of `posonlyargs`, we need to store the positional only annotations somewhere else as well. This new attribute should simplify the handling of annotations for both positional only and positional or keyword parameters.
* Add support for positional only arguments in astroid for python 3.8Claudiu Popa2019-07-091-0/+43
|
* Grab only Constant strings for docstringsClaudiu Popa2019-07-061-0/+9
|
* Add test for extracting a doc to make sure we have it working on Python 3.8Claudiu Popa2019-07-061-0/+11
|
* Annotated AST follows PEP8 coding style when converted to string.Łukasz Rogalski2019-06-222-3/+3
|
* Adjust a line number test for Python 3.8Claudiu Popa2019-06-021-8/+2
|
* 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.
* Use the proper test index for a NamedExpr testClaudiu Popa2019-06-021-1/+1
|
* ``assert`` only functions are properly inferred as returning ``None``Claudiu Popa2019-06-021-0/+14
| | | | Close #668
* Merge pull request #664 from hippo91/bug_pylint_2721Claudiu Popa2019-06-029-660/+1072
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deep rework of the numpy brain. The original brain has been split into numerous one. Each numpy brain module corresponds to a numpyone. There are: brain_numpy_core_fromnumeric => numpy.core.fromnumeric brain_numpy_core_function_base => numpy.core.function_base brain_numpy_core_multiarray => numpy.core.multiarray brain_numpy_core_numeric => numpy.core.numeric brain_core_numerictypes => numpy.core.numerictypes brain_core_umath => numpy.core.umath brain_numpy_random_mtrand => numpy.random.mtrand Last but not least, the numpy.ndarray class has its corresponding astroid's brain (brain_numpy_ndarray). The major improvement, besides a clearer organisation, is the fact that each method of the ndarray class should now be correctly inferred. Especially those returning ndarray objects. It has been made possible by ensuring that the return type of those methods is inferred as ndarray and nothing else. To achieve this, the inference_tip function has been used. When a numpy callable may return two different kinds of objects, for example bool or ndarray, the choice to prefer ndarray has been made in the corresponding astroid brain method.
| * Merge branch 'master' into bug_pylint_2721Claudiu Popa2019-06-023-0/+108
| |\
| * | Deleting useless subTest mock for python version prior to 3.4hippo912019-05-258-192/+8
| | |
| * | Merge branch 'master' into bug_pylint_2721hippo912019-05-254-0/+64
| |\ \
| * | | Refomat according to blackhippo912019-04-216-58/+105
| | | |
| * | | Add definition for numpy.ones and numpy.zeros functionshippo912019-04-202-0/+2
| | | |
| * | | Add the function numpy.emptyhippo912019-04-201-0/+1
| | | |
| * | | Add the tests concerning ndarray classic methodshippo912019-04-201-1/+41
| | | |
| * | | Rename brain_numpy module and associated unit test modulehippo912019-04-201-1/+1
| | | |
| * | | Refactor in order to test the methods of ndarrayhippo912019-04-201-14/+49
| | | |
| * | | Merge branch 'master' into bug_pylint_2721hippo912019-04-131-0/+58
| |\ \ \
| * | | | Add a unittest dedicated to the numpy_core_fromnumeric brainhippo912019-04-071-0/+77
| | | | |
| * | | | Typo.hippo912019-04-071-1/+1
| | | | |
| * | | | Split the unittest_brain_numpy modulehippo912019-04-073-12/+164
| | | | |
| * | | | Check that functions return a ndarrayhippo912019-04-071-0/+26
| | | | |
| * | | | Split the unittest_brain_numpyhippo912019-04-074-305/+421
| | | | |
| * | | | Split the unittest_brain_numpy module in parts so that each brain_numpy_* ↵hippo912019-04-063-94/+368
| | | | | | | | | | | | | | | | | | | | module has its own unittest module
| * | | | Deleting test about __inv__ method which doesn't exists in ndarrayhippo912019-04-061-187/+1
| | | | |
| * | | | Merge branch 'master' into bug_pylint_2721hippo912019-04-062-0/+44
| |\ \ \ \