-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[raise-missing-from] Clearer message and example in the documentation (…
…#6576) * [raise-missing-from] Clearer message and example in the documentation Co-authored-by: cool-RR <[email protected]> Co-authored-by: Daniël van Noord <[email protected]> Refs #5953 Closes #3707
- Loading branch information
1 parent
b986bcb
commit 366fd72
Showing
6 changed files
with
77 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
try: | ||
1 / 0 | ||
except ZeroDivisionError as e: | ||
raise ValueError("Rectangle Area cannot be zero") # [raise-missing-from] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
try: | ||
1 / 0 | ||
except ZeroDivisionError as e: | ||
raise ValueError("Rectangle Area cannot be zero") from e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- `PEP 3132 <https://peps.python.org/pep-3132/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
raise-missing-from:11:4:11:18::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:19:4:19:25::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:25:4:25:18::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:31:4:31:18::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:45:20:45:34::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:53:4:53:20::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:59:4:59:47::Consider explicitly re-raising using the 'from' keyword:UNDEFINED | ||
raise-missing-from:7:4:7:39::Consider explicitly re-raising using 'except Exception as exc' and 'raise ValueError('Invalid integer') from exc':HIGH | ||
raise-missing-from:13:4:13:18::Consider explicitly re-raising using 'except ZeroDivisionError as exc' and 'raise KeyError from exc':HIGH | ||
raise-missing-from:20:4:20:25::Consider explicitly re-raising using 'except ZeroDivisionError as exc' and 'raise (foo + bar).baz from exc':HIGH | ||
raise-missing-from:26:4:26:18::Consider explicitly re-raising using 'raise KeyError from e':HIGH | ||
raise-missing-from:32:4:32:18::Consider explicitly re-raising using 'raise KeyError from e':HIGH | ||
raise-missing-from:46:20:46:34::Consider explicitly re-raising using 'raise KeyError from e':HIGH | ||
raise-missing-from:54:4:54:20::Consider explicitly re-raising using 'raise KeyError() from e':HIGH | ||
raise-missing-from:60:4:60:47::Consider explicitly re-raising using 'raise KeyError(whatever, whatever=whatever) from e':HIGH | ||
raise-missing-from:72:16:72:59::Consider explicitly re-raising using 'except (ZeroDivisionError, ValueError, KeyError) as exc' and 'raise KeyError(whatever, whatever=whatever) from exc':HIGH | ||
raise-missing-from:75:8:75:45::Consider explicitly re-raising using 'except (ZeroDivisionError, ValueError, KeyError) as exc' and 'raise KeyError(whatever, overever=12) from exc':HIGH | ||
raise-missing-from:82:4:82:32::Consider explicitly re-raising using 'except (OSError, IndexError, struct.error, OverflowError, ValueError) as exc' and 'raise InvalidFileException() from exc':HIGH |
366fd72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, I want to put it in Hafez, but Google Play doesn't download it, now the filtering is too much to upgrade
366fd72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
بخدا خسته شدم دخترم یه طرف تویتر هدیه دادن برای بچه درمانش همچی درست نمیدن کد. بید کوبین. از این طرف هزینه دارو فشار آورد هزینه گران بودنش دیگه نمیدونم چکار کنم
366fd72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
سه تا هدیه. بید کوبین تویتر داده ولی نمیتونم برداشت کنم همچی درست ولی دارن سواستفاده میکنند مرگم میخوام هزینه درمان دختر ۶ سالم سحر سرطان داره. کمک کمکم کنید