astroid icon indicating copy to clipboard operation
astroid copied to clipboard

Infer instance from the result of call to __new__

Open mymedia2 opened this issue 3 years ago • 0 comments

Steps

  • [x] For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • [x] Write a good description on what the PR does.

Description

In Python, parentheses over class type implicitly invoke the __new__ method. The method may override instance of the class. If the case is relatively simple so astroid is able to infer the actual class, give it a try.

Type of Changes

Type
:sparkles: New feature

Related Issue

Refs: PyCQA/pylint#7258

mymedia2 avatar Aug 02 '22 15:08 mymedia2