diff options
Diffstat (limited to 'doc/whatsnew')
27 files changed, 165 insertions, 90 deletions
diff --git a/doc/whatsnew/2/2.17/index.rst b/doc/whatsnew/2/2.17/index.rst index 393fb86de..3197bc7c7 100644 --- a/doc/whatsnew/2/2.17/index.rst +++ b/doc/whatsnew/2/2.17/index.rst @@ -12,3 +12,168 @@ Summary -- Release highlights ============================= .. towncrier release notes start + +What's new in Pylint 2.17.0? +---------------------------- +Release date: 2023-03-07 + + +New Features +------------ + +- `pyreverse` now supports custom color palettes with the `--color-palette` + option. + + Closes #6738 (`#6738 <https://github.com/PyCQA/pylint/issues/6738>`_) + +- Add ``invalid-name`` check for ``TypeAlias`` names. + + Closes #7081. (`#7081 <https://github.com/PyCQA/pylint/issues/7081>`_) + +- Accept values of the form ``<class name>.<attribute name>`` for the + ``exclude-protected`` list. + + Closes #7343 (`#7343 <https://github.com/PyCQA/pylint/issues/7343>`_) + +- Add `--version` option to `pyreverse`. + + Refs #7851 (`#7851 <https://github.com/PyCQA/pylint/issues/7851>`_) + +- Adds new functionality with preferred-modules configuration to detect + submodules. + + Refs #7957 (`#7957 <https://github.com/PyCQA/pylint/issues/7957>`_) + +- Support implicit namespace packages (PEP 420). + + Closes #8154 (`#8154 <https://github.com/PyCQA/pylint/issues/8154>`_) + +- Add globbing pattern support for ``--source-roots``. + + Closes #8290 (`#8290 <https://github.com/PyCQA/pylint/issues/8290>`_) + +- Support globbing pattern when defining which file/directory/module to lint. + + Closes #8310 (`#8310 <https://github.com/PyCQA/pylint/issues/8310>`_) + +- pylint now supports ``TryStar`` nodes from Python 3.11 and should be fully + compatible with Python 3.11. + + Closes #8387 (`#8387 <https://github.com/PyCQA/pylint/issues/8387>`_) + + + +New Checks +---------- + +- Add a ``bad-chained-comparison`` check that emits a warning when + there is a chained comparison where one expression is semantically + incompatible with the other. + + Closes #6559 (`#6559 <https://github.com/PyCQA/pylint/issues/6559>`_) + +- Adds an ``implicit-flag-alias`` check that emits a warning when a class + derived from ``enum.IntFlag`` assigns distinct integer values that share + common bit positions. + + Refs #8102 (`#8102 <https://github.com/PyCQA/pylint/issues/8102>`_) + + + +False Positives Fixed +--------------------- + +- Fix various false positives for functions that return directly from + structural pattern matching cases. + + Closes #5288 (`#5288 <https://github.com/PyCQA/pylint/issues/5288>`_) + +- Fix false positive for ``used-before-assignment`` when + ``typing.TYPE_CHECKING`` is used with if/elif/else blocks. + + Closes #7574 (`#7574 <https://github.com/PyCQA/pylint/issues/7574>`_) + +- Fix false positive for isinstance-second-argument-not-valid-type with union + types. + + Closes #8205 (`#8205 <https://github.com/PyCQA/pylint/issues/8205>`_) + +- Fix false positive for ``used-before-assignment`` for named expressions + appearing after the first element in a list, tuple, or set. + + Closes #8252 (`#8252 <https://github.com/PyCQA/pylint/issues/8252>`_) + +- Fix false positive for ``wrong-spelling-in-comment`` with class names in a + python 2 type comment. + + Closes #8370 (`#8370 <https://github.com/PyCQA/pylint/issues/8370>`_) + + + +False Negatives Fixed +--------------------- + +- Fix a false negative for 'missing-parentheses-for-call-in-test' when + inference + failed for the internal of the call as we did not need that information to + raise + correctly. + + Refs #8185 (`#8185 <https://github.com/PyCQA/pylint/issues/8185>`_) + +- Fix false negative for inconsistent-returns with while-loops. + + Closes #8280 (`#8280 <https://github.com/PyCQA/pylint/issues/8280>`_) + + + +Other Bug Fixes +--------------- + +- Fix ``used-before-assignment`` false positive when the walrus operator + is used with a ternary operator in dictionary key/value initialization. + + Closes #8125 (`#8125 <https://github.com/PyCQA/pylint/issues/8125>`_) + +- Fix ``no-name-in-module`` false positive raised when a package defines a + variable with the + same name as one of its submodules. + + Closes #8148 (`#8148 <https://github.com/PyCQA/pylint/issues/8148>`_) + +- Fix a crash happening for python interpreter < 3.9 following a failed typing + update. + + Closes #8161 (`#8161 <https://github.com/PyCQA/pylint/issues/8161>`_) + +- Fix ``nested-min-max`` suggestion message to indicate it's possible to splat + iterable objects. + + Closes #8168 (`#8168 <https://github.com/PyCQA/pylint/issues/8168>`_) + +- Fix a crash happening when a class attribute was negated in the start + argument of an enumerate. + + Closes #8207 (`#8207 <https://github.com/PyCQA/pylint/issues/8207>`_) + +- Prevent emitting ``invalid-name`` for the line on which a ``global`` + statement is declared. + + Closes #8307 (`#8307 <https://github.com/PyCQA/pylint/issues/8307>`_) + + + +Other Changes +------------- + +- Update explanation for ``global-variable-not-assigned`` and add confidence. + + Closes #5073 (`#5073 <https://github.com/PyCQA/pylint/issues/5073>`_) + +- The governance model and the path to become a maintainer have been documented + as + part of our effort to guarantee that the software supply chain in which + pylint is + included is secure. + + Refs #8329 (`#8329 <https://github.com/PyCQA/pylint/issues/8329>`_) diff --git a/doc/whatsnew/fragments/5073.other b/doc/whatsnew/fragments/5073.other deleted file mode 100644 index 610bda9fb..000000000 --- a/doc/whatsnew/fragments/5073.other +++ /dev/null @@ -1,3 +0,0 @@ -Update explanation for ``global-variable-not-assigned`` and add confidence. - -Closes #5073 diff --git a/doc/whatsnew/fragments/5288.false_positive b/doc/whatsnew/fragments/5288.false_positive deleted file mode 100644 index bdc696622..000000000 --- a/doc/whatsnew/fragments/5288.false_positive +++ /dev/null @@ -1,4 +0,0 @@ -Fix various false positives for functions that return directly from -structural pattern matching cases. - -Closes #5288 diff --git a/doc/whatsnew/fragments/6559.new_check b/doc/whatsnew/fragments/6559.new_check deleted file mode 100644 index fa4f146e3..000000000 --- a/doc/whatsnew/fragments/6559.new_check +++ /dev/null @@ -1,4 +0,0 @@ -Add a ``bad-chained-comparison`` check that emits a warning when -there is a chained comparison where one expression is semantically incompatible with the other. - -Closes #6559 diff --git a/doc/whatsnew/fragments/6738.feature b/doc/whatsnew/fragments/6738.feature deleted file mode 100644 index d6895df36..000000000 --- a/doc/whatsnew/fragments/6738.feature +++ /dev/null @@ -1,3 +0,0 @@ -`pyreverse` now supports custom color palettes with the `--color-palette` option. - -Closes #6738 diff --git a/doc/whatsnew/fragments/7081.feature b/doc/whatsnew/fragments/7081.feature deleted file mode 100644 index 07e3a236e..000000000 --- a/doc/whatsnew/fragments/7081.feature +++ /dev/null @@ -1,3 +0,0 @@ -Add ``invalid-name`` check for ``TypeAlias`` names. - -Closes #7081. diff --git a/doc/whatsnew/fragments/7343.feature b/doc/whatsnew/fragments/7343.feature deleted file mode 100644 index 2e9fa83c1..000000000 --- a/doc/whatsnew/fragments/7343.feature +++ /dev/null @@ -1,3 +0,0 @@ -Accept values of the form ``<class name>.<attribute name>`` for the ``exclude-protected`` list. - -Closes #7343 diff --git a/doc/whatsnew/fragments/7574.false_positive b/doc/whatsnew/fragments/7574.false_positive deleted file mode 100644 index a7b91b481..000000000 --- a/doc/whatsnew/fragments/7574.false_positive +++ /dev/null @@ -1,4 +0,0 @@ -Fix false positive for ``used-before-assignment`` when -``typing.TYPE_CHECKING`` is used with if/elif/else blocks. - -Closes #7574 diff --git a/doc/whatsnew/fragments/7851.feature b/doc/whatsnew/fragments/7851.feature deleted file mode 100644 index 36860ae12..000000000 --- a/doc/whatsnew/fragments/7851.feature +++ /dev/null @@ -1,3 +0,0 @@ -Add `--version` option to `pyreverse`. - -Refs #7851 diff --git a/doc/whatsnew/fragments/7957.feature b/doc/whatsnew/fragments/7957.feature deleted file mode 100644 index 325f61d13..000000000 --- a/doc/whatsnew/fragments/7957.feature +++ /dev/null @@ -1,3 +0,0 @@ -Adds new functionality with preferred-modules configuration to detect submodules. - -Refs #7957 diff --git a/doc/whatsnew/fragments/8102.new_check b/doc/whatsnew/fragments/8102.new_check deleted file mode 100644 index 0bffd4add..000000000 --- a/doc/whatsnew/fragments/8102.new_check +++ /dev/null @@ -1,5 +0,0 @@ -Adds an ``implicit-flag-alias`` check that emits a warning when a class -derived from ``enum.IntFlag`` assigns distinct integer values that share -common bit positions. - -Refs #8102 diff --git a/doc/whatsnew/fragments/8125.bugfix b/doc/whatsnew/fragments/8125.bugfix deleted file mode 100644 index bb7860f92..000000000 --- a/doc/whatsnew/fragments/8125.bugfix +++ /dev/null @@ -1,4 +0,0 @@ -Fix ``used-before-assignment`` false positive when the walrus operator -is used with a ternary operator in dictionary key/value initialization. - -Closes #8125 diff --git a/doc/whatsnew/fragments/8148.bugfix b/doc/whatsnew/fragments/8148.bugfix deleted file mode 100644 index de3c8ab57..000000000 --- a/doc/whatsnew/fragments/8148.bugfix +++ /dev/null @@ -1,4 +0,0 @@ -Fix ``no-name-in-module`` false positive raised when a package defines a variable with the -same name as one of its submodules. - -Closes #8148 diff --git a/doc/whatsnew/fragments/8154.feature b/doc/whatsnew/fragments/8154.feature deleted file mode 100644 index 9c46a1c8d..000000000 --- a/doc/whatsnew/fragments/8154.feature +++ /dev/null @@ -1,3 +0,0 @@ -Support implicit namespace packages (PEP 420). - -Closes #8154 diff --git a/doc/whatsnew/fragments/8161.bugfix b/doc/whatsnew/fragments/8161.bugfix deleted file mode 100644 index 957099180..000000000 --- a/doc/whatsnew/fragments/8161.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Fix a crash happening for python interpreter < 3.9 following a failed typing update. - -Closes #8161 diff --git a/doc/whatsnew/fragments/8168.bugfix b/doc/whatsnew/fragments/8168.bugfix deleted file mode 100644 index dd846b734..000000000 --- a/doc/whatsnew/fragments/8168.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Fix ``nested-min-max`` suggestion message to indicate it's possible to splat iterable objects. - -Closes #8168 diff --git a/doc/whatsnew/fragments/8185.false_negative b/doc/whatsnew/fragments/8185.false_negative deleted file mode 100644 index 4d2f878cd..000000000 --- a/doc/whatsnew/fragments/8185.false_negative +++ /dev/null @@ -1,5 +0,0 @@ -Fix a false negative for 'missing-parentheses-for-call-in-test' when inference -failed for the internal of the call as we did not need that information to raise -correctly. - -Refs #8185 diff --git a/doc/whatsnew/fragments/8205.false_positive b/doc/whatsnew/fragments/8205.false_positive deleted file mode 100644 index 6bf596592..000000000 --- a/doc/whatsnew/fragments/8205.false_positive +++ /dev/null @@ -1,3 +0,0 @@ -Fix false positive for isinstance-second-argument-not-valid-type with union types. - -Closes #8205 diff --git a/doc/whatsnew/fragments/8207.bugfix b/doc/whatsnew/fragments/8207.bugfix deleted file mode 100644 index fc7001b0c..000000000 --- a/doc/whatsnew/fragments/8207.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Fix a crash happening when a class attribute was negated in the start argument of an enumerate. - -Closes #8207 diff --git a/doc/whatsnew/fragments/8252.false_positive b/doc/whatsnew/fragments/8252.false_positive deleted file mode 100644 index 2c449ac36..000000000 --- a/doc/whatsnew/fragments/8252.false_positive +++ /dev/null @@ -1,4 +0,0 @@ -Fix false positive for ``used-before-assignment`` for named expressions -appearing after the first element in a list, tuple, or set. - -Closes #8252 diff --git a/doc/whatsnew/fragments/8280.false_negative b/doc/whatsnew/fragments/8280.false_negative deleted file mode 100644 index 848b71d7c..000000000 --- a/doc/whatsnew/fragments/8280.false_negative +++ /dev/null @@ -1,3 +0,0 @@ -Fix false negative for inconsistent-returns with while-loops. - -Closes #8280 diff --git a/doc/whatsnew/fragments/8290.feature b/doc/whatsnew/fragments/8290.feature deleted file mode 100644 index 1099518d8..000000000 --- a/doc/whatsnew/fragments/8290.feature +++ /dev/null @@ -1,3 +0,0 @@ -Add globbing pattern support for ``--source-roots``. - -Closes #8290 diff --git a/doc/whatsnew/fragments/8307.bugfix b/doc/whatsnew/fragments/8307.bugfix deleted file mode 100644 index f86f7b67b..000000000 --- a/doc/whatsnew/fragments/8307.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Prevent emitting ``invalid-name`` for the line on which a ``global`` statement is declared. - -Closes #8307 diff --git a/doc/whatsnew/fragments/8310.feature b/doc/whatsnew/fragments/8310.feature deleted file mode 100644 index a835be097..000000000 --- a/doc/whatsnew/fragments/8310.feature +++ /dev/null @@ -1,3 +0,0 @@ -Support globbing pattern when defining which file/directory/module to lint. - -Closes #8310 diff --git a/doc/whatsnew/fragments/8329.other b/doc/whatsnew/fragments/8329.other deleted file mode 100644 index 1c22feacd..000000000 --- a/doc/whatsnew/fragments/8329.other +++ /dev/null @@ -1,5 +0,0 @@ -The governance model and the path to become a maintainer have been documented as -part of our effort to guarantee that the software supply chain in which pylint is -included is secure. - -Refs #8329 diff --git a/doc/whatsnew/fragments/8370.false_positive b/doc/whatsnew/fragments/8370.false_positive deleted file mode 100644 index a641ecbbf..000000000 --- a/doc/whatsnew/fragments/8370.false_positive +++ /dev/null @@ -1,3 +0,0 @@ -Fix false positive for ``wrong-spelling-in-comment`` with class names in a python 2 type comment. - -Closes #8370 diff --git a/doc/whatsnew/fragments/8387.feature b/doc/whatsnew/fragments/8387.feature deleted file mode 100644 index 2b4df0001..000000000 --- a/doc/whatsnew/fragments/8387.feature +++ /dev/null @@ -1,3 +0,0 @@ -pylint now supports ``TryStar`` nodes from Python 3.11 and should be fully compatible with Python 3.11. - -Closes #8387 |