diff --git a/doc/data/messages/b/bad-string-format-type/bad.py b/doc/data/messages/b/bad-string-format-type/bad.py new file mode 100644 index 0000000000..a58a5ba7b5 --- /dev/null +++ b/doc/data/messages/b/bad-string-format-type/bad.py @@ -0,0 +1 @@ +print("%d" % "1") # [bad-string-format-type] diff --git a/doc/data/messages/b/bad-string-format-type/details.rst b/doc/data/messages/b/bad-string-format-type/details.rst new file mode 100644 index 0000000000..65752275c3 --- /dev/null +++ b/doc/data/messages/b/bad-string-format-type/details.rst @@ -0,0 +1,2 @@ +This check is currently only active for "old-style" string formatting as seen in the examples. +See `Issue #6085 `_ for more information. diff --git a/doc/data/messages/b/bad-string-format-type/good.py b/doc/data/messages/b/bad-string-format-type/good.py new file mode 100644 index 0000000000..00ee8aff79 --- /dev/null +++ b/doc/data/messages/b/bad-string-format-type/good.py @@ -0,0 +1 @@ +print("%d" % 1) diff --git a/doc/data/messages/b/bad-string-format-type/related.rst b/doc/data/messages/b/bad-string-format-type/related.rst new file mode 100644 index 0000000000..b6aadf541e --- /dev/null +++ b/doc/data/messages/b/bad-string-format-type/related.rst @@ -0,0 +1,2 @@ +- `Format String Syntax `_ +- `PyFormat `_