pylint-bot / astroid-unofficial

UNOFFICIAL playground for astroid github migration
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Duplicated code in ClassDef._infer_type_call and BoundMethod._infer_type_new_call #247

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: BitBucket: ceridwenv, GitHub: ceridwenv


These two methods are doing very similar things, building a ClassDef node for the result of a call of type, to the point that when I was fixing bugs in modular-locals I was literally copy-pasting code from one to the other.


pylint-bot commented 9 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: PCManticore):


In 2.0 BoundMethod._infer_type_new_call is moved in brain by the way. Also, they are doing different things, even though they share some code. One of them could be implemented in terms of the other in this case.