Skip to content

flicklib.flick returns null when used as annotation #54

@SnowyCoder

Description

@SnowyCoder

If a python user uses an annotation he expects the method to not be deleted, when we use the method as shown in the example the function flick used as an annotation returns None replacing the method defined by the user with nothing.
The same issue can be found in touch, tap, double_tap, garbage, move and airwheel.

Example:

import flicklib
@flicklib.flick()
def on_flick(from, to):
  pass

on_flick("north", "south")  # Error

Workaround (manual annotation call)

import flicklib

def on_flick(from, to):
  pass


flicklib.flick()(on_flick)

on_flick("north", "south")  # Success!

Metadata

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