Skip to content

Cannot use .. autovariant_(function|method) #3

@pganssle

Description

@pganssle

I believe this is a problem with the import_object mechanism, for some function in example_variants.py, if you have:

from variants import primary

@primary
def func(a, b):
    """The primary function"""

@func.variant('onearg')
def func(a):
    """A variant with only one argument"""

And you create a document like so:

=======
Example
=======

.. autovariant_function:: example_variants.func.onearg

You'll get an error failing to import example_variants.func.onearg.

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