Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7940

Disable colourisation when not writing to a terminal

    XMLWordPrintable

    Details

    • Story Points:
      0.5
    • Epic Link:
    • Sprint:
      DRP F16-5
    • Team:
      Data Release Production

      Description

      There's code in pex.config.history to colour output, but it's en/disabled unconditionally. Please change it to never colour text that isn't going to the terminal.

        Attachments

          Issue Links

            Activity

            Hide
            rhl Robert Lupton added a comment -

            Trivial change, needed to make DM-5421 more user friendly

            Show
            rhl Robert Lupton added a comment - Trivial change, needed to make DM-5421 more user friendly
            Hide
            rowen Russell Owen added a comment - - edited

            Please document the change in the doc string for the Color.colorize method. Other than that it looks fine.

            As an aside: I am surprised that Color._colorize is a class variable instead of an instance variable, and similarly that Color.colorize is static. I wish the class had a doc string, but it's out of scope to ask you to add one.

            Show
            rowen Russell Owen added a comment - - edited Please document the change in the doc string for the Color.colorize method. Other than that it looks fine. As an aside: I am surprised that Color._colorize is a class variable instead of an instance variable, and similarly that Color.colorize is static. I wish the class had a doc string, but it's out of scope to ask you to add one.
            Hide
            rhl Robert Lupton added a comment -

            Done; I also added a class doc string.

            I think it makes sense for that to be a class variable – it's state about how you want to use colour. It would be nice to add 'with' support, but I think that's out of scope.

            Show
            rhl Robert Lupton added a comment - Done; I also added a class doc string. I think it makes sense for that to be a class variable – it's state about how you want to use colour. It would be nice to add 'with' support, but I think that's out of scope.

              People

              Assignee:
              rhl Robert Lupton
              Reporter:
              rhl Robert Lupton
              Reviewers:
              Russell Owen
              Watchers:
              Robert Lupton, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.