• Strykker@programming.dev
    link
    fedilink
    arrow-up
    5
    arrow-down
    2
    ·
    2 hours 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
      6
      ·
      2 hours 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
      4
      ·
      2 hours ago

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