summaryrefslogtreecommitdiff
path: root/astroid/bases.py
Commit message (Collapse)AuthorAgeFilesLines
* Move from % syntax to format or f-stringsPierre Sassoulas2021-02-171-18/+9
| | | | This is possible with python 3.6
* Remove the # coding, since PEP3120 the default is UTF8Pierre Sassoulas2021-02-171-1/+0
|
* Fix the new violations of super-without-argumentsClaudiu Popa2020-05-121-1/+1
|
* Add missing copyright annotations for the past releasesClaudiu Popa2020-04-271-1/+5
|
* ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__``Claudiu Popa2020-03-261-0/+3
| | | | Close PyCQA/pylint#2335
* ``NodeNG.bool_value()`` gained an optional ``context`` parameterClaudiu Popa2020-03-051-5/+5
| | | | | | | | | We need to pass an inference context downstream when inferring the boolean value of a node in order to prevent recursion errors and double inference. This fix prevents a recursion error with dask library. Close PyCQA/pylint#2985
* Add support for inferring propertiesClaudiu Popa2019-12-041-6/+5
| | | | | These new capabilities will allow inferring both the `property` builtin as well as property attributes such as `.deleter` and `.setter`.
* Allow inferring positional only arguments on Python 3.8Claudiu Popa2019-11-141-1/+1
|
* Fix lint warningsClaudiu Popa2019-10-111-0/+1
|
* Remove redundant compatibility code (#693)Hugo van Kemenade2019-09-101-8/+4
|
* Replace InferenceError bubble up with a simple raiseClaudiu Popa2019-07-161-1/+1
|
* ``igetattr`` raises ``InferenceError`` on re-inference of the same objectClaudiu Popa2019-04-091-1/+5
| | | | | | | | | | | This prevents ``StopIteration`` from leaking when we encounter the same object in the current context, which could result in various ``RuntimeErrors`` leaking in other parts of the inference. Until we get a global context per inference, the solution is sort of a hack, as with the suggested global context improvement, we could theoretically reuse the same inference object. Close #663
* Deleting irrelevant commenthippo912019-01-271-5/+0
|
* Deleting a conditional that prevent return of a BoundMethod instancehippo912019-01-261-4/+3
|
* Revert "Just breakpoint to debug and mark the origin of the problem"hippo912018-12-221-1/+0
| | | | This reverts commit b3fa94a409ba16c3b556cf08ce650f2dd587e73f.
* Just breakpoint to debug and mark the origin of the problemhippo912018-12-221-0/+1
|
* Fix a bug where an Attribute used as a base class was triggering a crashClaudiu Popa2018-12-041-0/+2
| | | | Close #626
* Use copy_context where it makes senseClaudiu Popa2018-10-101-1/+0
|
* Initial formatting of astroidClaudiu Popa2018-10-021-79/+116
|
* `async` functions are now inferred as `AsyncGenerator` when inferring their ↵Claudiu Popa2018-08-161-0/+16
| | | | call result.
* infer_call_result can raise InferenceError so make sure to handle that for ↵Claudiu Popa2018-07-311-5/+8
| | | | | | | | | | | the call sites where it is used infer_call_result started recently to raise InferenceError for objects for which it could not find any returns. Previously it was silently raising a StopIteration, which was especially leaking when calling builtin methods. Since it is after all an inference method, it is expected that it could raise an InferenceError rather than returning nothing. Close PyCQA/pylint#2350
* Spelling fixesVille Skyttä2018-07-241-2/+2
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-2/+10
|
* Fix attributes of ancestor classes from appearing in attribute inferenceBryce Guinta2018-07-131-7/+2
| | | | Close #581
* Fix type.__new__ calls with incorrect arguments creating instancesBryce Guinta2018-07-081-1/+1
|
* Avoid calling object.__new__ for type.__new__Bryce Guinta2018-07-051-1/+3
| | | | See #581
* Allow technically valid (but weird) type.__new__ callsBryce Guinta2018-07-051-9/+5
| | | | Ignore non-string keys
* Fix inference for nested callsBryce Guinta2018-07-051-11/+6
| | | | | | | | | Add context_lookup to the context class as extra_context. Deliver the correct context with the correct boundnode for function argument nodes. Close #177
* Refactor assinging boundnode to contextBryce Guinta2018-07-041-10/+2
| | | | | Code in multiple places had the same pattern for infering call results.
* Fix issue with inherited __call__ improperly inferencing selfBryce Guinta2018-06-291-0/+5
|
* Fix useless-object-inheritance lint error (#573)Nick Drozd2018-06-281-1/+1
| | | See https://github.com/PyCQA/pylint/pull/2209
* Prevent Const copy resulting in recursionBryce Guinta2018-06-231-1/+7
| | | | | | | | | | | | Calling object.__new__ on a Const node would result in infinite recursion Fix infinite recursion by explicitly raising AttributeError if __getattr__ is called for value See https://nedbatchelder.com/blog/201010/surprising_getattr_recursion.html for more details Close #565
* Add cache_readonly to POSSIBLE_PROPERTIES for pandasDaniel Colascione2018-06-211-1/+1
|
* Remove useless TODOs that are either issues in the issue tracker or things ↵Claudiu Popa2018-06-121-3/+1
| | | | which we'll never get to fix/change
* Convert to yield fromNick Drozd2018-06-081-2/+1
| | | | | | | I tried this to see if it would improve performance. It didn't, but it does look nicer, so we might as well keep it. See also 5fd5aa81483e709cb5c464c7d4bb37c8c39f2afa
* Callables gained an implicit_parameter() method which returns the number of ↵Claudiu Popa2018-06-071-0/+6
| | | | implicit parameters they have (self/cls etc)
* Fix lintClaudiu Popa2018-06-061-1/+1
|
* Subclasses of *property* are now interpreted as propertiesClaudiu Popa2018-06-051-1/+18
| | | | Close PyCQA/pylint#1601
* Replace some for statements with yield fromClaudiu Popa2018-05-311-5/+2
|
* Remove reraise() in favour of using raise..fromClaudiu Popa2018-05-311-8/+8
|
* Remove six from a couple of filesClaudiu Popa2018-05-311-2/+4
|
* Protect against passing lookup_class to non-class proxied objectsClaudiu Popa2018-05-261-1/+4
| | | | | | | | | In some cases the _proxied object points to another Instance, not to the Class of an Instance node (usually this happens with enum and with our hardcoded inference support for this library). Instead of getting a TypeError, we check before if the _proxied matches what we expect. Found by #2080
* Add context_lookup to infer_call_result for function argumentsBryce Guinta2018-03-301-6/+25
| | | | | | | | This allows inference of function arguments to be different than the inference of the function body Currently this is only used for object.__new__(cls) calls but can be expanded later
* Fix lint warningsClaudiu Popa2017-10-121-9/+9
|
* Fix an infinite loop that could occur during inference of __nonzero__. (#412)Calen Pennington2017-03-111-1/+2
|
* Make ClassDefs support keyword arguments. (#384)Derek Gustafson2017-01-221-1/+1
|
* Remove pylint errorsDerek Gustafson2016-12-031-0/+5
|
* Correct the generator comprehension to return Instances only when the ↵Claudiu Popa2016-11-011-1/+1
| | | | element is not Uninferable.
* Fix some pylint errors over the code base.Claudiu Popa2016-08-241-1/+0
|
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+5
|