summaryrefslogtreecommitdiff
path: root/doc/whatsnew/2.0.rst
diff options
context:
space:
mode:
authorssolanki <sushobhitsolanki@gmail.com>2018-05-20 00:05:34 +0530
committerClaudiu Popa <pcmanticore@gmail.com>2018-06-15 13:56:37 +0200
commit3e76fca8afbc0810ea82bc5d4b9185ac7f1b8989 (patch)
tree63a561d86c6e112336084ea97766cbd0235dfa42 /doc/whatsnew/2.0.rst
parentfa637644b68aacd18229c37a73516c2e1b583be0 (diff)
downloadpylint-git-3e76fca8afbc0810ea82bc5d4b9185ac7f1b8989.tar.gz
Add new check `comparison-with-callable`
This check warn for comparison with bare callable, without calling it.
Diffstat (limited to 'doc/whatsnew/2.0.rst')
-rw-r--r--doc/whatsnew/2.0.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/whatsnew/2.0.rst b/doc/whatsnew/2.0.rst
index 8e0b3c1b7..ffc516cd8 100644
--- a/doc/whatsnew/2.0.rst
+++ b/doc/whatsnew/2.0.rst
@@ -25,6 +25,24 @@ Summary -- Release highlights
New checkers
============
+* A new check was added, ``comparison-with-callable``.
+
+ This refactoring message is emitted when a comparison involves callable without parenthesis, which if compared
+ can result in unwanted behaviour.
+
+ .. code-block:: python
+ def foo():
+ return None
+
+ def goo():
+ return None
+
+ if foo == 786: # bad
+ pass
+
+ if foo() == 786: # good
+ pass
+
* A new check was added, ``useless-import-alias``.
This refactoring message is emitted when a import alias does not rename the original package.
@@ -166,6 +184,7 @@ New checkers
Other Changes
=============
+
* Don't warn for ``missing-type-doc`` and/or ``missing-return-type-doc``, if type annotations
exist on the function signature for a parameter and/or return type.