minus-squarecatastrophicblues@lemmy.catoProgrammer Humor@lemmy.ml•1 hour in Javalinkfedilinkarrow-up2·1 month agoIf you’re going to post a code example, at least check that it works. Here’s your example, with no type hints, giving me errors both from the LSP, and when trying to run via mypy: https://imgur.com/a/Hq5Y5Gt. linkfedilink
minus-squarecatastrophicblues@lemmy.catoProgrammer Humor@lemmy.ml•1 hour in Javalinkfedilinkarrow-up4·1 month agoYou can use mypy and/or Pydantic. linkfedilink
If you’re going to post a code example, at least check that it works. Here’s your example, with no type hints, giving me errors both from the LSP, and when trying to run via mypy: https://imgur.com/a/Hq5Y5Gt.