diff options
author | Dani Alcala <112832187+clavedeluna@users.noreply.github.com> | 2022-11-05 09:54:13 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 12:54:13 +0000 |
commit | 3c180dff050af44e7b4f9adf1ab872031fb9f6a8 (patch) | |
tree | 6ef83078272c01ab98accaf8133fdab2430979ab /pylint/pyreverse | |
parent | 6fc8fada69ff787977ba90c5f02d00b5b2f9336a (diff) | |
download | pylint-git-3c180dff050af44e7b4f9adf1ab872031fb9f6a8.tar.gz |
Rename `broad-except` and new check `broad-exception-raised` (#7709)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/pyreverse')
-rw-r--r-- | pylint/pyreverse/vcg_printer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/pyreverse/vcg_printer.py b/pylint/pyreverse/vcg_printer.py index 805a22d49..7a1d2d02d 100644 --- a/pylint/pyreverse/vcg_printer.py +++ b/pylint/pyreverse/vcg_printer.py @@ -273,7 +273,7 @@ class VCGPrinter(Printer): try: _type = attributes_dict[key] except KeyError as e: - raise Exception( + raise AttributeError( f"no such attribute {key}\npossible attributes are {attributes_dict.keys()}" ) from e @@ -284,6 +284,6 @@ class VCGPrinter(Printer): elif value in _type: self.emit(f"{key}:{value}\n") else: - raise Exception( + raise ValueError( f"value {value} isn't correct for attribute {key} correct values are {type}" ) |