diff options
author | Sushobhit <31987769+sushobhit27@users.noreply.github.com> | 2018-05-19 14:27:08 +0530 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-05-19 10:57:08 +0200 |
commit | b0f6184e03182736f8423441dfb87985da28e209 (patch) | |
tree | a89d985c4ded27538c0a0bf10fa889c580eab166 /doc/whatsnew/2.0.rst | |
parent | e090ea0acfa54c70b78d6345be1d32a8ddd36d74 (diff) | |
download | pylint-git-b0f6184e03182736f8423441dfb87985da28e209.tar.gz |
Add checker to warn when imported package is renamed as original one.
Given an import, we'll emit this error whenever pylint finds an alias
with the same name as the import module.
Close #2052.
Diffstat (limited to 'doc/whatsnew/2.0.rst')
-rw-r--r-- | doc/whatsnew/2.0.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/whatsnew/2.0.rst b/doc/whatsnew/2.0.rst index 1f34c1d4b..c97506f57 100644 --- a/doc/whatsnew/2.0.rst +++ b/doc/whatsnew/2.0.rst @@ -25,6 +25,16 @@ Summary -- Release highlights New checkers ============ +* A new check was added, ``useless-import-alias``. + + This refactoring message is emitted when a 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 + from collection import OrderedDict as ordered_dict # good + * A new check was added, ``comparison-with-itself``. This refactoring message is emitted when a variable is compared against itself. |