summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix pylint warnings in astroid/brain/brain_fstringsPierre Sassoulas2021-04-191-1/+1
|
* Ignore the too-many-warnings we're not refactoring anywayPierre Sassoulas2021-04-191-1/+7
|
* Fix pylint warnings in astroid/brain/brain_namedtuple_enumPierre Sassoulas2021-04-191-5/+5
|
* Fix pylint warnings in astroid/brain/brain_sixPierre Sassoulas2021-04-191-1/+2
|
* Fix pylint warnings in astroid.brain.brain_builtin_inferencePierre Sassoulas2021-04-191-9/+9
|
* Fix redefining name 'bases' from outer scopePierre Sassoulas2021-04-191-2/+1
|
* Fix Expression is assigned to nothingPierre Sassoulas2021-04-191-0/+1
|
* Fix inconsistent return statementsPierre Sassoulas2021-04-191-2/+3
|
* Fix useless return at end of function or methodPierre Sassoulas2021-04-191-2/+1
|
* Ignore duplicate code for now because astroid/brain is full of itPierre Sassoulas2021-04-191-1/+3
|
* Ignore cyclic import and wrong import position for nowPierre Sassoulas2021-04-191-3/+4
|
* Fix Unused variable 'meth_inf'Pierre Sassoulas2021-04-191-1/+1
|
* Fix Unused variable 'ex'Pierre Sassoulas2021-04-191-2/+2
|
* Fix a yoda constant in unittest_regrtest.pyPierre Sassoulas2021-04-191-1/+1
|
* Fix legacy no-member by disabling the warningPierre Sassoulas2021-04-194-6/+15
|
* Fix no exception type(s) specified on getattrPierre Sassoulas2021-04-191-1/+1
|
* Remove conditional for having pytest, we have pytestPierre Sassoulas2021-04-191-3/+0
|
* Remove python < 3.4 compatibility code for enum modulePierre Sassoulas2021-04-192-19/+0
|
* Remove non-breaking whitespaces from the codebasePierre Sassoulas2021-04-185-7/+9
|
* We need astroid to be installed for conf.py to workPierre Sassoulas2021-04-181-0/+1
|
* Add .readthedocs.yaml so every contributor can change read the doc configPierre Sassoulas2021-04-183-1/+13
|
* Remove all warnings in generated documentationPierre Sassoulas2021-04-182-25/+20
|
* Formatting test now take all pre-commit hook into acccountPierre Sassoulas2021-04-181-3/+3
|
* Remove empty line between comments in configurationPierre Sassoulas2021-04-181-43/+1
|
* Fix issue #891Pierre Sassoulas2021-04-1094-436/+96
| | | | Remove outdated COPYING and rename COPYING.LESSER
* Upgrading pyupgrade in pre-commit configurationPierre Sassoulas2021-04-105-19/+19
|
* Add prettier to pre-commit configurationPierre Sassoulas2021-04-106-82/+88
|
* Prepare for 2.5.3 releaseastroid-2.5.3Pierre Sassoulas2021-04-105-4/+5
|
* Modify infernce tip for typing.Generic and typing.Annotated with ↵Marc Mueller2021-04-105-9/+265
| | | | | | | ``__class_getitem__`` (#931) * Modify infernce tip for typing.Generic and typing.Annotated with __class_getitem__ * Fix issue with slots caching * Clean typing.Generic from mro
* Better handling of generic aliases (#923)Marc Mueller2021-04-074-93/+325
| | | | | | * Better handling of generic aliases * Use qname for tests mro * Add inference for re.Pattern and re.Match * Add comments
* Use inference_tip for typing.TypedDict brain (#928)Marc Mueller2021-04-073-10/+8
|
* Bug pylint 4206 (#921)hippo912021-04-065-101/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Takes into account the fact that inferring subscript when the node is a class may use the __class_getitem__ method of the current class instead of looking for __getitem__ in the metaclass. * OrderedDict in the collections module inherit from dict which is C coded and thus have no metaclass but starting from python3.9 it supports subscripting thanks to the __class_getitem__ method. * check_metaclass becomes a static class method because we need it in the class scope. The brain_typing module does not add a ABCMeta_typing class thus there is no need to test it. Moreover it doesn't add neither a __getitem__ to the metaclass * The brain_typing module does not add anymore _typing suffixed classes in the mro * The OrderedDict class inherits from C coded dict class and thus doesn't have a metaclass. * When trying to inherit from typing.Pattern the REPL says : TypeError: type 're.Pattern' is not an acceptable base type * The REPL says that Derived as ABCMeta for metaclass and the mro is Derived => Iterator => Iterable => object * Adds comments * Starting with Python39 some collections of the collections.abc module support subscripting thanks to __class_getitem__ method. However the wat it is implemented is not straigthforward and instead of complexifying the way __class_getitem__ is handled inside the getitem method of the ClassDef class, we prefer to hack a bit. * Thanks to __class_getitem__ method there is no need to hack the metaclass * SImplifies the inference system for typing objects before python3.9. Before python3.9 the objects of the typing module that are alias of the same objects in the collections.abc module have subscripting possibility thanks to the _GenericAlias metaclass. To mock the subscripting capability we add __class_getitem__ method on those objects. * check_metaclass_is_abc become global to be shared among different classes * Create a test class dedicated to the Collections brain * Rewrites and adds test * Corrects syntax error * Deque, defaultdict and OrderedDict are part of the _collections module which is a pure C lib. While letting those class mocks inside collections module is fair for astroid it leds to pylint acceptance tests fail. * Formatting according to black * Adds two entries * Extends the filter to determine what is subscriptable to include OrderedDict * Formatting according to black * Takes into account the fact that inferring subscript when the node is a class may use the __class_getitem__ method of the current class instead of looking for __getitem__ in the metaclass. * OrderedDict in the collections module inherit from dict which is C coded and thus have no metaclass but starting from python3.9 it supports subscripting thanks to the __class_getitem__ method. * check_metaclass becomes a static class method because we need it in the class scope. The brain_typing module does not add a ABCMeta_typing class thus there is no need to test it. Moreover it doesn't add neither a __getitem__ to the metaclass * The brain_typing module does not add anymore _typing suffixed classes in the mro * The OrderedDict class inherits from C coded dict class and thus doesn't have a metaclass. * When trying to inherit from typing.Pattern the REPL says : TypeError: type 're.Pattern' is not an acceptable base type * The REPL says that Derived as ABCMeta for metaclass and the mro is Derived => Iterator => Iterable => object * Adds comments * Starting with Python39 some collections of the collections.abc module support subscripting thanks to __class_getitem__ method. However the wat it is implemented is not straigthforward and instead of complexifying the way __class_getitem__ is handled inside the getitem method of the ClassDef class, we prefer to hack a bit. * Thanks to __class_getitem__ method there is no need to hack the metaclass * SImplifies the inference system for typing objects before python3.9. Before python3.9 the objects of the typing module that are alias of the same objects in the collections.abc module have subscripting possibility thanks to the _GenericAlias metaclass. To mock the subscripting capability we add __class_getitem__ method on those objects. * check_metaclass_is_abc become global to be shared among different classes * Create a test class dedicated to the Collections brain * Rewrites and adds test * Corrects syntax error * Deque, defaultdict and OrderedDict are part of the _collections module which is a pure C lib. While letting those class mocks inside collections module is fair for astroid it leds to pylint acceptance tests fail. * Formatting according to black * Adds two entries * Extends the filter to determine what is subscriptable to include OrderedDict * Formatting according to black * Takes into account AWhetter remarks * Deactivates access to __class_getitem__ method * OrderedDict appears in typing module with python3.7.2 * _alias function in the typing module appears with python3.7 * Formatting according to black * _alias function is used also for builtins type and not only for collections.abc ones * Adds tests for both builtins type that are subscriptable and typing builtin alias type that are also subscriptable * No need to handle builtin types in this brain. It is better suited inside brain_bulitin_inference * Adds brain to handle builtin types that are subscriptable starting with python39 * Formatting according to black * Uses partial function instead of closure in order pylint acceptance to be ok * Handling the __class_getitem__ method associated to EmptyNode for builtin types is made directly inside the getitem method * infer_typing_alias has to be an inference_tip to avoid interferences between typing module and others (collections or builtin) * Formatting * Removes useless code * Adds comment * Takes into account cdce8p remarks * Formatting * Style changes Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Astroid master branch version is 2.6.0Pierre Sassoulas2021-03-281-1/+1
|
* Add 2.5.3 to the changelog2.5Pierre Sassoulas2021-03-282-2/+7
|
* Prepare for 2.5.2 releaseastroid-2.5.2Pierre Sassoulas2021-03-2835-4/+35
|
* Add 2.5.2 in changelogPierre Sassoulas2021-03-282-4/+3
|
* Fix version for 2.5.1 tagPierre Sassoulas2021-03-281-2/+2
|
* Merge pull request #919 from cdce8p/fix-classdef-keywordshippo912021-03-133-1/+13
|\ | | | | Iterate over Keywords when using ClassDef.get_children
| * Add testMarc Mueller2021-03-071-0/+6
| |
| * Check if keywords is not None before iterating over itMarc Mueller2021-03-071-1/+2
| |
| * Iterate over Keywords when using ClassDef.get_childrenMarc Mueller2021-03-072-1/+6
|/
* Merge pull request #918 from hippo91/bug_pylint_3974hippo912021-03-073-77/+115
|\ | | | | Bug pylint 3974
| * Removes dead codehippo912021-03-071-1/+0
| |
| * Reformats according to blackhippo912021-03-052-6/+24
| |
| * DIsables the test for ravel_multi_index because strangely it fails when ↵hippo912021-03-051-1/+1
| | | | | | | | numpy is imported without alias whereas it is ok when numpy is imported with an alias. It should be investigated but is probably beyond the scope of this work.
| * Double the test by import numpy module without aliasing ithippo912021-03-051-75/+92
| |
| * Adds an entryhippo912021-03-051-0/+4
| |
| * "import numpy" has to be detected as a valid import of numpyhippo912021-03-051-1/+1
|/
* Astroid do not have automatic release on tagPierre Sassoulas2021-02-281-4/+3
|
* Add 2.5.2 and 2.6.0 in the changelogPierre Sassoulas2021-02-281-0/+10
|