Skip to content

Define custom exceptions to support new Pylint v2.16 rule: broad-exception-raised

Since Pylint v2.16, following report is raised:

  • W0719: Raising too general exception: Exception (broad-exception-raised)
  • Define more precise (sub-set) exceptions:
    • api.ws2p.requests
    • key.signing_key
    • documents
class XxxException(Exception):
    """Raised when xxxx"""
  • Bump Pylint to latest version (v2.17+, or v3 if released as stable)
  • Silkaj: Remove/fix disable=broad-except in auth.py
Edited by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information