diff options
| author | clavedeluna <danalitovsky+git@gmail.com> | 2022-11-29 08:18:41 -0300 |
|---|---|---|
| committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-11-29 16:30:44 +0100 |
| commit | e51413859d8ff82ead6868d3b3e150b9e79ae57c (patch) | |
| tree | e18f99e37972c7728f2a56049b33c09e22447978 /doc/data | |
| parent | 00a17816d492ba718b4e74f4cf618d82428e7f74 (diff) | |
| download | pylint-git-e51413859d8ff82ead6868d3b3e150b9e79ae57c.tar.gz | |
add docs for wrong-exception-op
Diffstat (limited to 'doc/data')
| -rw-r--r-- | doc/data/messages/w/wrong-exception-operation/bad.py | 4 | ||||
| -rw-r--r-- | doc/data/messages/w/wrong-exception-operation/details.rst | 1 | ||||
| -rw-r--r-- | doc/data/messages/w/wrong-exception-operation/good.py | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/doc/data/messages/w/wrong-exception-operation/bad.py b/doc/data/messages/w/wrong-exception-operation/bad.py new file mode 100644 index 000000000..20fcc2aab --- /dev/null +++ b/doc/data/messages/w/wrong-exception-operation/bad.py @@ -0,0 +1,4 @@ +try: + 1/0 +except (ValueError + TypeError): # [wrong-exception-operation] + pass diff --git a/doc/data/messages/w/wrong-exception-operation/details.rst b/doc/data/messages/w/wrong-exception-operation/details.rst deleted file mode 100644 index ab8204529..000000000 --- a/doc/data/messages/w/wrong-exception-operation/details.rst +++ /dev/null @@ -1 +0,0 @@ -You can help us make the doc better `by contributing <https://github.com/PyCQA/pylint/issues/5953>`_ ! diff --git a/doc/data/messages/w/wrong-exception-operation/good.py b/doc/data/messages/w/wrong-exception-operation/good.py index c40beb573..4171dbb60 100644 --- a/doc/data/messages/w/wrong-exception-operation/good.py +++ b/doc/data/messages/w/wrong-exception-operation/good.py @@ -1 +1,4 @@ -# This is a placeholder for correct code for this message. +try: + 1/0 +except (ValueError, TypeError): + pass |
