summaryrefslogtreecommitdiff
path: root/astroid/transforms.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue #891Pierre Sassoulas2021-04-101-1/+1
| | | | Remove outdated COPYING and rename COPYING.LESSER
* Add some caching to the transforms and skip non nodes in visit_genericClaudiu Popa2018-10-101-3/+10
|
* Initial formatting of astroidClaudiu Popa2018-10-021-1/+1
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-1/+3
|
* Fix useless-object-inheritance lint error (#573)Nick Drozd2018-06-281-1/+1
| | | See https://github.com/PyCQA/pylint/pull/2209
* Fix lintingClaudiu Popa2018-06-141-1/+1
|
* If a transform returns a different node type, don't apply the rest of the ↵Claudiu Popa2018-06-041-0/+3
| | | | transforms
* Remove warnings for nodes that were replaced multiple timeClaudiu Popa2018-06-041-6/+0
| | | | | | | It is possible to have nodes that are transformed multiple times, so this warning doesn't make that much sense. It is also a bit useless in case we replace the node even once, since it only verifies that the returned node from a transform is the same node that was passed in.
* Remove occurrences of no-else-return and consider-using-ternaryClaudiu Popa2016-12-181-2/+2
|
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+2
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* Convert all files to new license headerCeridwen2016-05-161-17/+3
|
* There's a new separate step for transforms.Claudiu Popa2015-08-021-0/+96
Until now, the transforms were applied at the same time the tree was being built. This was problematic if the transform functions were using inference, since the inference was executed on a partially constructed tree, which led to failures when post-building information was needed (such as setting the _from_names for the From imports). Now there's a separate step for transforms, which are applied using transform.TransformVisitor. There's a couple of other related changes: * astroid.parse and AstroidBuilder gained a new parameter `apply_transforms`, which is a boolean flag, which will control if the transforms are applied. We do this because there are uses when the vanilla tree is wanted, without any implicit modification. * the transforms are also applied for builtin modules, as a side effect of the fact that transform visiting was moved in AstroidBuilder._post_build from AstroidBuilder._data_build. Closes issue #116.