summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSushobhit <31987769+sushobhit27@users.noreply.github.com>2018-07-31 22:53:44 +0530
committerBryce Guinta <bryce.guinta@protonmail.com>2018-07-31 11:23:44 -0600
commit676852cedc90c0ed4e7412b03b8d6b58a1f00486 (patch)
tree9dd2f347c0136d4094c29c1352ca8dd2f245cb54 /doc
parent660c3787aa1bcd83d366653e776974b23394db29 (diff)
downloadpylint-git-676852cedc90c0ed4e7412b03b8d6b58a1f00486.tar.gz
Add new check misplaced-format-function. (#2218)
* Add new check misplaced-format-function. check only w.r.t print function. For other use cases no-member check already exists. fix code block not visible for few checkers
Diffstat (limited to 'doc')
-rw-r--r--doc/whatsnew/2.0.rst3
-rw-r--r--doc/whatsnew/2.1.rst12
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/whatsnew/2.0.rst b/doc/whatsnew/2.0.rst
index d8486d350..e01bfa842 100644
--- a/doc/whatsnew/2.0.rst
+++ b/doc/whatsnew/2.0.rst
@@ -31,6 +31,7 @@ New checkers
which is redundant as in Python 3, every class implicitly inherits from object.
.. code-block:: python
+
class A(object):
pass
@@ -44,6 +45,7 @@ New checkers
behaviour.
.. code-block:: python
+
def foo():
return None
@@ -74,6 +76,7 @@ New checkers
This refactoring message is emitted when an import alias does not rename the original package.
.. code-block:: python
+
import numpy as numpy # bad
import numpy as np # good
from collection import OrderedDict as OrderedDict # bad
diff --git a/doc/whatsnew/2.1.rst b/doc/whatsnew/2.1.rst
index e010e0100..b0c9f7a5f 100644
--- a/doc/whatsnew/2.1.rst
+++ b/doc/whatsnew/2.1.rst
@@ -13,6 +13,18 @@ Summary -- Release highlights
New checkers
============
+* A new check was added, ``misplaced-format-function``.
+
+ This message is emitted when pylint detects that a format function is called on non str object.
+ This can occur due to wrong placement of closing bracket, e.g
+
+ .. code-block:: python
+
+ print('value: {}').format(123) # bad
+
+ print('value: {}'.format(123)) # good
+
+
Other Changes
=============