pylint-bot / test

0 stars 0 forks source link

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

Open pylint-bot opened 8 years ago

pylint-bot commented 8 years ago

Originally reported by: BitBucket: ceridwenv, GitHub: @ceridwen?


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 8 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.