The problem
There was a class field being defined outside the class __init__
It might be problematic in some scenarios where the code tries to access the field before it is created. It also could hinder the understanding of the code due to the fact the class field definitions are scattered on the source instead of centralized into a single place.
This pitfall was detected automatically via Pylint, which triggered the warning code W0201 which is described here
The solution
Refactored the code to create the field on the __init__
The problem There was a class field being defined outside the class __init__ It might be problematic in some scenarios where the code tries to access the field before it is created. It also could hinder the understanding of the code due to the fact the class field definitions are scattered on the source instead of centralized into a single place.
This pitfall was detected automatically via Pylint, which triggered the warning code W0201 which is described here
The solution Refactored the code to create the field on the __init__