diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-03-03 19:48:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 19:48:39 +0100 |
commit | 81bb644a82fcbc7c3d53d7a4faa297c57925f1c7 (patch) | |
tree | e2a420ff8fb1ffb6deadd6321389eaefde8602b4 | |
parent | 6846a1371be7dbbd836124b3b8506b95d24bf9f8 (diff) | |
download | pylint-git-81bb644a82fcbc7c3d53d7a4faa297c57925f1c7.tar.gz |
[doc] Add an example for 'missing-format-string-key' (#8379)
-rw-r--r-- | doc/data/messages/m/missing-format-string-key/bad.py | 7 | ||||
-rw-r--r-- | doc/data/messages/m/missing-format-string-key/details.rst | 1 | ||||
-rw-r--r-- | doc/data/messages/m/missing-format-string-key/good.py | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/doc/data/messages/m/missing-format-string-key/bad.py b/doc/data/messages/m/missing-format-string-key/bad.py new file mode 100644 index 000000000..4bbfcacbc --- /dev/null +++ b/doc/data/messages/m/missing-format-string-key/bad.py @@ -0,0 +1,7 @@ +# +1: [missing-format-string-key] +fruit_prices = """ +Apple: %(apple_price)d ¤ +Orange: %(orange_price)d ¤ +""" % { + "apple_price": 42 +} diff --git a/doc/data/messages/m/missing-format-string-key/details.rst b/doc/data/messages/m/missing-format-string-key/details.rst deleted file mode 100644 index ab8204529..000000000 --- a/doc/data/messages/m/missing-format-string-key/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/m/missing-format-string-key/good.py b/doc/data/messages/m/missing-format-string-key/good.py index c40beb573..11b856762 100644 --- a/doc/data/messages/m/missing-format-string-key/good.py +++ b/doc/data/messages/m/missing-format-string-key/good.py @@ -1 +1,7 @@ -# This is a placeholder for correct code for this message. +fruit_prices = """ +Apple: %(apple_price)d ¤ +Orange: %(orange_price)d ¤ +""" % { + "apple_price": 42, + "orange_price": 87, +} |