-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyreverse: Duplicated class variables #8046
Comments
A slightly simpler reproducing example: class ExampleClass():
example1: int
example2: int
def __init__(self):
self.example1 = 1
self.example2 = 2 Output: @startuml classes
set namespaceSeparator none
class "ExampleClass" as asdf.ExampleClass {
example1 : int
example1 : int
example2 : int
example2 : int
}
@enduml It seems like it doesn't understand the difference between declaration and assignment. |
There is a subtle difference between the original example and the new one. In the original example, you have both class attributes So the original example comes down to differentiating class attributes from instance attributes. For your (@nickdrozd) example there should only be an instance attribute. |
Let's track both bugs on two separate issues? Or the root cause is the same? |
I created a new issue for Nick's example: I also changed the label for this issue from Bug to Enhancement, as it is more fitting I think. |
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
Pylint version
OS / Environment
5.15.85-1-MANJARO
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: