Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Pyreverse: Duplicate arrows when class attribute is assigned more than once #9267

Copy link
Copy link
@bMorgan01

Description

@bMorgan01
Issue body actions

Bug description

I get an issue similar to #8522, but it seems to have a different cause. Supposedly this issue was fixed in pylint 3.0.0, but I still see it.

Code:

class A:
    def __init__(self) -> None:
        self.var = 2

class B:
    def __init__(self) -> None:
        self.a_obj = A()

    def func(self):
        self.a_obj = A()
        self.a_obj = A()

Result:
classes

Configuration

No response

Command used

pyreverse . -o png

Pylint output

Format png is not supported natively. Pyreverse will try to generate it using Graphviz...
Analysed 2 modules with a total of 0 imports

Expected behavior

Duplicate arrows do not appear

Pylint version

pylint 3.0.2
astroid 3.0.1
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]

OS / Environment

Windows 10 / powershell

Additional dependencies

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲Good first issueFriendly and approachable by new contributorsFriendly and approachable by new contributorspyreverseRelated to pyreverse componentRelated to pyreverse component

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.