• bjornsno@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    I believe raises is the de facto Python version of throws, but no tools seem to exist to actually handle it.

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      that’s still a docstring, idk of linters that take docstrings into account at all. We need a semantic approach for this kind of annotation.

      • bjornsno@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        6 months ago

        That’s way harder to ask for. A docstring solution is fine so long as the linters know to pick it up.