Skip to content

rename create_filler() #132

Closed
Closed

Description

@lorenzwalthert

I think this function name is a bit confusing and I would change it so somthing that reflects the purpose of the function better, like initialize_attributes() or something like that. I think this is important because people developing their own style guides will get in touch with this function, so it is not purely internal. Alternatively, we can also spit it up into multiple functions and give each a specific name like

  • initialize_multi_line
  • compute_space
  • compute_newline
  • initialize_ref_id
  • initialize_indent

Which may be more clear but calling 5 functions instead of 1 on every level of nesting might add too much overhead. @krlmlr What's your take on that?

Activity

  1. krlmlr commented on Aug 18, 2017

    @krlmlr
    Member

    We should keep exposing one function for initializing internal attributes with a clear name like initialize_attributes(), which calls the five functions you're suggesting. I wouldn't worry about performance unless we can measure it.

    Is this function part of the public API?

  2. lorenzwalthert commented on Aug 18, 2017

    @lorenzwalthert
    CollaboratorAuthor

    Ok, fine. No, it's not part of the public API but create_style_guide()has an argument filler, which stems from create_filler() and I think it's not very clear. So we would change both I suggest.

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