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

Disable colourisation when not writing to a terminal

    XMLWordPrintable

Details

    • 0.5
    • DRP F16-5
    • 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

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

            rhl Robert Lupton added a comment - Trivial change, needed to make DM-5421 more user friendly
            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.

            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.

            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.

            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

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

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.