Skip to content

setting settable attribute with default type None does not change #870

@bambu

Description

@bambu

It appears that when a settable attribute is set that a call to utils.cast is made and attempts to cast the new value to the type of orig_value. When the original value is None the result of that value is also None and, in my case, gets passed to my setter as None.

While I understand that this could easily resolved by setting the default value of my attribute to '', it visually looks odd when every other settable is filled besides the one that was not set.

...
allow_style: Terminal
att: 
continuation_prompt: > 
...

Likewise, setting the default value to 'None' does not seem like a good answer to resolving the issue.

In this particular case, I think I would prefer if the original value is 'None' then the str that was passed is set

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions