Skip to content

Modify BuiltIn string helpers for cleaner output #2403

Closed

Description

@jimni

@pekkaklarck suggested the following:

There are extra quotes around the list of items but that's due to the _get_string_msg helper unconditionally adding them. I guess the helper could get a new config parameters like quote_str1=True and quote_str2=True to control that, and the new keywords could call it like quote_str2=False. What do you think?

Somewhat related to this, I'd prefer the _get_string_msg to add a full stop at the end of the default message.

Activity

  1. jimni commented on Jul 1, 2016

    @jimni
    ContributorAuthor

    I would generally like to take up this challenge as soon as we resolve the details.

    My main concern is that the product of this helper might be indirectly used in other libraries (both RF and third party). The unconditional addition of a full stop might break others' tests which might be considered backwards incompatible.

    Am I correct in my guess?
    If so, we could add the full stop as a parameter, but would it still be worth the effort this way?

  2. pekkaklarck commented on Jul 4, 2016

    @pekkaklarck
    Member

    It's good to think about backwards compatibility, but in this case there shouldn't bee too big risks. We aren't changing the API, only making the error message a bit better. I think we should just add . at the end without making it configurable.

    Notice also that internal changes like this don't really need an issue. An issue is needed if the topic needs to be listed on the release notes because they are partly generated based on issues with a certain milestone.

  3. jimni commented on Jul 4, 2016

    @jimni
    ContributorAuthor

    I see your point. Nonetheless, we needed a place to discuss this compatibility risk, didn't we?
    If you don't mind, I will address this issue, hopefully, this week.

  4. pekkaklarck commented on Jul 4, 2016

    @pekkaklarck
    Member

    Yeah, talking about possible compatibility issues is important. Slack would probably be best place for such discussion although I haven't lately been too active there. Definitely no harm using the tracker either, but I'll close this issue anyway as we anyway have #2120 about the actual issue at hand and PR #2393 implementing it. Just submit a new PR once you get _get_string_msg enhanced and then update #2393.

    This week I finally have time to actually concentrate on work and should be able to review PRs and participate discussion on Slack and elsewhere.

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