• spuds_in_town@fediverser.communick.devB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Yeah I get it that it’s one of -those- issues. I can live with the trailing comma at the end of a line, but a trailing comma on its own line triggers me badly, it tells my subconscious that “something is missing here”.

        I understand the argument around diffs, but I spend way longer looking at code than I do diffs of code.

        • anentropic@fediverser.communick.devB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          (Replying just for the chit chat - no criticism of opposite views implied)

          For me it’s not even about the diffs, but like if you want to bulk edit the lines with a multi cursor, or copy and paste to add some new lines, it helps if they’re all uniform

            • anentropic@fediverser.communick.devB
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              I’m sorry you got downvoted, I totally get that trailing commas are ‘grammatically’ wrong and would look weird.

              But I find these kind of common edits a bit of a pain in formats like JSON or SQL which don’t allow trailing comma. So I was happy to use a linter which enforces them, and then I got very used to them being there.

      • Ph0X@fediverser.communick.devB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I know some people love Black for its lack of configuration, but if Ruff adds a couple more config, then it’ll definitely be my go to formatter.

        I’m not about to fuck up my entire projects formatting to match one persons opinion.

    • muntoo@fediverser.communick.devB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Trailing commas:

      1. generate cleaner diffs,
      2. facilitate reordering,
      3. facilitate adding a new item at the end without needing to edit the previous one,
      4. are visually consistent,