Skip to content

Make the "additional docs" customizable #30

@seberg

Description

@seberg

I suspect that different libraries will want a different way to include docs from backends.
It would be nice to develop a common pattern, but overall, I am not convinced that it is a priority.

It seems fine to do some default here (i.e. what we currently have), but I think it would make sense to just allow to customize this and just pass on the full metadata defined in the .toml file.
(Or just the additional_docs field, but allow it to be anything and not just a string.)

Adding such a function, begs the question whether it wouldn't be nicer to define a backend as a subclass:

class _BS(spatch.backend_system.BackendSystem):
    def documentation_hook():

(or fake class) just to make it less weird to pass functions (but passing a function is also not a big deal for now).

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