Skip to content

Clean up API #22

Description

@nickbattam

The API contains a lot of repetition of words:
e.g. in cssgen.borders.OpiBorderRenderer
self._text_renderer = text_renderer
self._text_renderer.render(...)
and in cssgen.render.get_opi_renderer()
tr = OpiTextRenderer()
wr = OpiWidgetRenderer(tr)
cr = colors.OpiColorRenderer()
wr.add_renderer('background_color', cr)
This makes the API unnecessarily verbose.

The class, module and package names are not always self explanatory.

Renaming some classes, methods and package could simplify this, e.g. <renderer>.add_renderer() to <renderer>.add() and make it simpler to understand.

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

    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