1. 24
  1. 4

    This is super cool!

    Was there consideration to just run everything through black? Would that have even helped in this situation?

    1. 3

      I assume you’re talking about https://github.com/psf/black ? From the name my first guess was it was specifically for blind folk, but I guess not.

      We use code formatters, just not black. It would not have helped.

      A python-specific lint checker for diffs is possibly helpful. Alternately, adding an explicit “pass”, IE a closing brace, to the end of each block could have also helped.

      Either of those would have helped the specific bug, but the general problem would remain. There are file formats other than python which use significant whitespace, for example yaml.

      1. 1

        Thought so. It’s definitely a far cry from the JavaScript “pretty much anything is valid code”, but it definitely is a major problem with python.

        1. 0

          I don’t write much Python, but when I do, here is how I format it:

          def SomePythonFunction (firstArgument, argumentTheSecond): #{
          	WriteLog("SomePythonFunction(", firstArgument, argumentTheSecond, ")")#;
          	print("Hello, World!")#;
          1. 5


            1. 1

              So that if I ever have to copy and paste the code from somewhere, I know that a whitespace fuckup won’t ruin me.