• witx@lemmy.sdf.org
    link
    fedilink
    arrow-up
    3
    ·
    1 年前

    That’s actually a good idea, enforcing it. Still, do these linters protect against misuse? E.g I have an int but place a string on it somewhere?

    • sirdorius@programming.dev
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      edit-2
      1 年前

      Yes, in a good dev workflow mypy errors will not pass basic CI tests to get merged. Types are not really a problem in modern Python workflows, you can basically have a better type checker than Java out of the box (which can be improved with static analysis tools). The biggest problem with Python remains performance.