enthought / enthought/pyface

Refactor change handlers which are called standalone

Open
#876 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
115
Forks
54
PR merge metrics
No merged PRs in 30d

Description

see the motivating PR #864
Previously with on trait change, some change handlers would take no arguments and be called standalone completely separately of any trait change trigger.

Now, with observe, the handlers are forced to take a single argument event, and where these handlers were called standalone we pass `event=None` as an argument. These could be refactored so that the code called independently is wrapped in a normal method. Then this method can be called whenever it is needed on its own, and also called by the handler.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.