Skip to content

[F&E]: Remove optional attributes from classes #16

@alfonsoSR

Description

@alfonsoSR

Description:

Several types in pride include optional attributes, initialized to NotImplemented and then updated internally through methods other than the constructor. Proper error handling when an attribute is not set is performed via a custom __getattribute__ method. The implementation is functional, but it should be refactored away for a couple of reasons:

  • The custom __getattribute__ prevents the syntax highlighter from raising an error when trying to access an undefined attribute of a class.
  • The initialization of class attributes out of the constructor obscures the flow inside the program, and encourages bad practices when extending it with new functionality

Suggestions for implementation:

No response

Additional context:

No response

Metadata

Metadata

Assignees

Projects

Status

To Start

Relationships

None yet

Development

No branches or pull requests

Issue actions