summaryrefslogtreecommitdiff
path: root/astroid/context.py
Commit message (Collapse)AuthorAgeFilesLines
* Add `InferenceContext.is_empty()`Jacob Walls2023-05-141-0/+12
|
* Complete typing of ``context.py``Daniël van Noord2023-04-301-30/+14
|
* Expand typing on ``CallContext``Daniël van Noord2023-04-221-1/+3
|
* [PyCQA migration] Upgrade links to the repositories in code and docPierre Sassoulas2023-03-291-2/+2
|
* Revert CallContext change since it caused a RecursionError regression (#2000)Marc Mueller2023-01-311-5/+1
| | | This reverts commit a0d219cb3403cda3338a14ce67a60954b4ff5cd7 (#1982).
* Preserve parent CallContext when inferring nested functions (#1982)Marc Mueller2023-01-291-1/+5
|
* Initial pass with ``pydocstringformatter``Daniël van Noord2023-01-091-8/+10
|
* Support "is None" constraints from if statements during inference (#1189)David Liu2023-01-061-0/+6
| | | | | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add some InferenceContext annotations (#1883)Nick Drozd2022-11-221-9/+11
|
* Add some bool annotations (#1877)Nick Drozd2022-11-221-3/+2
|
* Add some 'str' annotations (#1878)Nick Drozd2022-11-201-1/+1
|
* Type ``_infer`` of ``Call``, ``Import`` and ``ImportFrom`` (#1653)Daniël van Noord2022-06-241-11/+4
|
* Update typing for Python 3.7 (1) (#1555)Marc Mueller2022-05-131-5/+8
|
* Fix typing in context.py (#1471)Daniël van Noord2022-03-141-11/+10
|
* Simplify hard to maintain copyright notice (#1441)Pierre Sassoulas2022-03-121-14/+1
| | | | | | | | | | | | | | * Simplify hard to maintain copyright notice git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names. * Add a pre-commit hook to check the copyright notice * Fix the existing file so they have a notice * Fix the spacing after the copyright notice * Add a script to generate the CONTRIBUTORS.txt Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Bump astroid to 2.10.0, update changelogv2.10.0Pierre Sassoulas2022-02-271-0/+1
|
* Bump astroid to 2.9.2, update changelogv2.9.2Alexander Shadchin2022-01-041-1/+1
|
* Bump astroid to 2.9.1, update changelogv2.9.1Pierre Sassoulas2021-12-311-0/+1
|
* Fix typos (#1288)Kian Meng, Ang2021-12-131-1/+1
|
* Bump astroid to 2.8.3, update changelogv2.8.3Pierre Sassoulas2021-10-171-1/+1
|
* Bump astroid to 2.8.1, update changelogv2.8.1-rc1Pierre Sassoulas2021-10-061-0/+1
|
* Add f-strings with `flynt`Daniël van Noord2021-09-171-2/+1
|
* Bump astroid to 2.8.0, update changelogv2.8.0Pierre Sassoulas2021-09-141-1/+1
|
* Bump astroid to 2.7.3, update changelogv2.7.3Pierre Sassoulas2021-08-301-0/+1
|
* Fix bug in attribute inference from inside method calls.David Liu2021-08-281-10/+12
| | | | | Add callee attribute to inference CallContext to keep track of the function currently being called.
* Remove use of deprecated node_classes and scoped_node API in astroidPierre Sassoulas2021-08-101-1/+1
|
* Bump astroid to 2.6.4, update changelogPierre Sassoulas2021-07-201-1/+1
|
* Bump astroid to 2.6.3, update changelogv2.6.3Pierre Sassoulas2021-07-191-0/+1
|
* Fix copyright links (#1084)Marc Mueller2021-07-011-1/+1
| | | | * Fix link in license header * Fix link to cpython
* Bump astroid to 2.6.0, update changelogv2.6.0Pierre Sassoulas2021-06-221-1/+1
|
* Remove the __all__ that aren't necessaryPierre Sassoulas2021-06-191-0/+1
|
* Import without wildcard for Context in astroid.__init_.pyPierre Sassoulas2021-06-191-2/+1
|
* Performance improvements to counter context.clone slowdown (#1009)Andrew Haigh2021-06-071-12/+48
| | | | | | | | | | | | | | | * Add limit to the total number of nodes inferred per context This change abuses mutable references to create a sort of interior mutable cell shared between a context and all of its clones. The idea is that when a node is inferred at the toplevel, it is called with context = None, creating a new InferenceContext and starting a count from zero. However, when a context is cloned we re-use the cell and cause the count in the "parent" context to be incremented when nodes are inferred in the "child" context. * Add global inference cache * Update safe_infer to catch StopIteration
* Update copyright notice for 2.5.7v2.5.7Pierre Sassoulas2021-05-291-0/+1
|
* Fix strong references to mutable objects in context.clone (#927)Andrew Haigh2021-05-121-1/+1
|
* Fix issue #891Pierre Sassoulas2021-04-101-1/+1
| | | | Remove outdated COPYING and rename COPYING.LESSER
* Upgrade copyrite noticePierre Sassoulas2021-02-281-1/+2
|
* Revert "Turns the context.path from a set to a dict which values are the ↵hippo912021-02-211-6/+4
| | | | | | number of times the node has been visited. The push method return True depending on a condition of the number of visits." This reverts commit cc3bfc5dc94062a582b7b3226598f09d7ec7044e.
* Move from % syntax to format or f-stringsPierre Sassoulas2021-02-211-1/+1
| | | | This is possible with python 3.6
* Update copyright noticehippo912021-02-151-0/+1
|
* Merge branch 'sum_and_multiply' of https://github.com/hippo91/astroidsum_and_multiplyhippo912021-01-231-4/+6
|\
| * Merge branch 'master' into sum_and_multiplyhippo912020-06-201-1/+1
| |\
| * | Turns the context.path from a set to a dict which values are the number of ↵hippo912019-12-301-4/+6
| | | | | | | | | | | | times the node has been visited. The push method return True depending on a condition of the number of visits.
* | | New copyright noticeshippo912020-12-271-1/+2
| | |
* | | Squash one-off inference utility functions to help reduce recursion errors ↵Bryce Guinta2020-06-221-11/+0
| |/ |/| | | | | | | | | (#804) This also makes debugging a lot simpler reducing the complexity of the function stack.
* | Add missing copyright annotations for the past releasesClaudiu Popa2020-04-271-1/+1
|/
* Revert "Remove the restore_path() method"Claudiu Popa2019-01-171-1/+7
| | | | | | This reverts commit 8151853e9525252b75ae560273a709cbed47ddc5 which was added while investigating the slowdown caused by context's path copying. Turns out this change doesn't have a negative impact on the performance but it has a positive one on the inference.
* Revert path copying in InferenceContext()Claudiu Popa2018-12-301-1/+1
| | | | | | | | While copying the path solves some inference issues, it also leads to horrenduous performance hits on large libraries such as pandas. We still want to have the path copying, but we need a better understanding on why that is needed, as well as a change on how we operate with the inference contexts.
* Replace copy.copy() with a simple set() callClaudiu Popa2018-10-101-9/+1
|
* Use copy_context where it makes senseClaudiu Popa2018-10-101-5/+4
|