• Strykker@programming.dev
    link
    fedilink
    arrow-up
    10
    arrow-down
    2
    ·
    1 month ago

    It’s python, just use type hinting already and your linter will catch that.

    Also some winters can look at the use of food and see the type being passed in.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      15
      ·
      1 month ago

      Autocorrect got you pretty bad, there.

      I was very confused, why we’re suddenly talking about rationing food during winter. 🙃

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      1 month ago

      Yes you can use static type hinting and the static type checker (Mypy or Pyright) will catch that. Linters (Pylint) won’t.