Skip to content

Are hooks correctly saving assigned priority? #3150

Closed
@aGitForEveryone

Description

From _hooks.py we see that hook decorators, e.g. @hooks.layout, are actually just wrappers around self.add_hook. Looking at self.add_hook and how it handles input parameter priority, how is the value given to priority passed down to the hook?

It is only used in the check if not priority, which fails if a non-zero value is given and is otherwise not used. The value given to _Hook, is priority=p, and p=0 is set.

Is this a bug or am I misunderstanding how hooks are later used/called?

See: https://github.com/plotly/dash/blob/v3.0.0rc1/dash/_hooks.py#L58-L81

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions