Skip to content

Talon captures do not permit colons in their docstring descriptions.  #517

Description

@tararoys

The bug: When attempting to modify prose_number_with_colon capture to include an example, discovered that the desc abruptly terminates on a colon.

When I changed the docstring for the following capture in dictation.py:

@mod.capture(rule="numeral <user.number_string> colon <user.number_string>")
def prose_number_with_colon(m) -> str:
    "Writes a number as a time.  For example, 'eight colon thirty' becomes 8:30"
    return m.number_string_1 + ":" + m.number_string_2

I discovered that you can't use colons in your docstrings.

To reproduce in the Talon repl:

>>> registry.decls.captures["user.prose_number_with_colon"].desc
"Writes a number as a time.  For example, 'eight colon thirty' becomes 8"

As you can see, it cuts off at the colon.

OS: Windows 10
Talon version: v0.2.0-509-gb460 (509)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions