diff options
author | Ollie <46904826+ollie-iterators@users.noreply.github.com> | 2023-02-15 15:37:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 21:37:50 +0100 |
commit | 884034d342eeb3fd753733176ff99774f822f336 (patch) | |
tree | a743b3af26975d33168f0e72f8fa830fe5ad84c9 | |
parent | e3c8d677871ddd834a7968086f854a62801caf03 (diff) | |
download | pylint-git-884034d342eeb3fd753733176ff99774f822f336.tar.gz |
[doc] 'truncated-format-string' and 'logging-unsupported-format' (#8295)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
6 files changed, 12 insertions, 4 deletions
diff --git a/doc/data/messages/l/logging-unsupported-format/bad.py b/doc/data/messages/l/logging-unsupported-format/bad.py new file mode 100644 index 000000000..5b5ea5a5f --- /dev/null +++ b/doc/data/messages/l/logging-unsupported-format/bad.py @@ -0,0 +1,3 @@ +import logging + +logging.info("%s %y !", "Hello", "World") # [logging-unsupported-format] diff --git a/doc/data/messages/l/logging-unsupported-format/details.rst b/doc/data/messages/l/logging-unsupported-format/details.rst deleted file mode 100644 index ab8204529..000000000 --- a/doc/data/messages/l/logging-unsupported-format/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/l/logging-unsupported-format/good.py b/doc/data/messages/l/logging-unsupported-format/good.py index c40beb573..53e06d36a 100644 --- a/doc/data/messages/l/logging-unsupported-format/good.py +++ b/doc/data/messages/l/logging-unsupported-format/good.py @@ -1 +1,3 @@ -# This is a placeholder for correct code for this message. +import logging + +logging.info("%s %s !", "Hello", "World") diff --git a/doc/data/messages/t/truncated-format-string/bad.py b/doc/data/messages/t/truncated-format-string/bad.py new file mode 100644 index 000000000..961582bff --- /dev/null +++ b/doc/data/messages/t/truncated-format-string/bad.py @@ -0,0 +1,3 @@ +PARG_2 = 1 + +print("strange format %2" % PARG_2) # [truncated-format-string] diff --git a/doc/data/messages/t/truncated-format-string/details.rst b/doc/data/messages/t/truncated-format-string/details.rst deleted file mode 100644 index ab8204529..000000000 --- a/doc/data/messages/t/truncated-format-string/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/t/truncated-format-string/good.py b/doc/data/messages/t/truncated-format-string/good.py index c40beb573..fd65df984 100644 --- a/doc/data/messages/t/truncated-format-string/good.py +++ b/doc/data/messages/t/truncated-format-string/good.py @@ -1 +1,3 @@ -# This is a placeholder for correct code for this message. +PARG_2 = 1 + +print(f"strange format {PARG_2}") |