diff options
author | Julthep Nandakwang <julthep@nandakwang.com> | 2022-07-08 01:36:12 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 20:36:12 +0200 |
commit | 3d1c72164e48b5112a616e4a0505b6af72b01859 (patch) | |
tree | f0fa1b38cc3d7a261aa460b9b6d688d58ad6e642 /doc/data/messages/t/too-many-return-statements/good.py | |
parent | c0710af0a54d8bb6f16b115ee41ff353a9c6c2ec (diff) | |
download | pylint-git-3d1c72164e48b5112a616e4a0505b6af72b01859.tar.gz |
Add documentation examples for `too-many-return-statements` (#7070)
Co-authored-by: Vladyslav Krylasov <vladyslav.krylasov@gmail.com>
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'doc/data/messages/t/too-many-return-statements/good.py')
-rw-r--r-- | doc/data/messages/t/too-many-return-statements/good.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/data/messages/t/too-many-return-statements/good.py b/doc/data/messages/t/too-many-return-statements/good.py index c40beb573..0c4032f53 100644 --- a/doc/data/messages/t/too-many-return-statements/good.py +++ b/doc/data/messages/t/too-many-return-statements/good.py @@ -1 +1,13 @@ -# This is a placeholder for correct code for this message. +NUMBERS_TO_STRINGS = { + 1: 'one', + 2: 'two', + 3: 'three', + 4: 'four', + 5: 'five', + 6: 'six', + 7: 'seven' +} + + +def to_string(x): + return f'This is {NUMBERS_TO_STRINGS.get(x)}.' |