pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-pylint



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Feb  2 08:32:05 UTC 2023

Modified Files:
        pkgsrc/devel/py-pylint: Makefile PLIST distinfo

Log Message:
py-pylint: updated to 2.16.0

What's new in Pylint 2.16.0?
----------------------------
Release date: 2023-02-01

Changes requiring user actions
------------------------------

- The ``accept-no-raise-doc`` option related to ``missing-raises-doc`` will now
  be correctly taken into account all the time.

  Pylint will no longer raise missing-raises-doc (W9006) when no exceptions are
  documented and accept-no-raise-doc is true (issue 7208).
  If you were expecting missing-raises-doc errors to be raised in that case,
  you
  will now have to add ``accept-no-raise-doc=no`` in your configuration to keep
  the same behavior.

New Features
------------

- Added the ``no-header`` output format. If enabled with
  ``--output-format=no-header``, it will not include the module name in the
  output.

- Added configuration option ``clear-cache-post-run`` to support server-like
  usage.
  Use this flag if you expect the linted files to be altered between runs.

- Add ``--allow-reexport-from-package`` option to configure the
  ``useless-import-alias`` check not to emit a warning if a name
  is reexported from a package.

- Update ``pyreverse`` to differentiate between aggregations and compositions.
  ``pyreverse`` checks if it's an Instance or a Call of an object via method
  parameters (via type hints)
  to decide if it's a composition or an aggregation.

New Checks
----------

- Adds a ``pointless-exception-statement`` check that emits a warning when an
  Exception is created and not assigned, raised or returned.

- Add a ``shadowed-import`` message for aliased imports.

- Add new check called ``unbalanced-dict-unpacking`` to check for unbalanced
  dict unpacking
  in assignment and for loops.

- Add new checker ``positional-only-arguments-expected`` to check for cases
  when
  positional-only arguments have been passed as keyword arguments.

- Added ``singledispatch-method`` which informs that ``@singledispatch`` should
  decorate functions and not class/instance methods.
  Added ``singledispatchmethod-function`` which informs that
  ``@singledispatchmethod`` should decorate class/instance methods and not
  functions.

- Rename ``broad-except`` to ``broad-exception-caught`` and add new checker
  ``broad-exception-raised``
  which will warn if general exceptions ``BaseException`` or ``Exception`` are
  raised.

- Added ``nested-min-max`` which flags ``min(1, min(2, 3))`` to simplify to
  ``min(1, 2, 3)``.

- Extended ``use-dict-literal`` to also warn about call to ``dict()`` when
  passing keyword arguments.

- Add ``named-expr-without-context`` check to emit a warning if a named
  expression is used outside a context like ``if``, ``for``, ``while``, or
  a comprehension.

- Add ``invalid-slice-step`` check to warn about a slice step value of ``0``
  for common builtin sequences.

- Add ``consider-refactoring-into-while-condition`` check to recommend
  refactoring when
  a while loop is defined with a constant condition with an immediate ``if``
  statement to check for ``break`` condition as a first statement.

Extensions
----------

- Add new extension checker ``dict-init-mutate`` that flags mutating a
  dictionary immediately
  after the dictionary was created.

- Added ``bad-dunder-name`` extension check, which flags bad or misspelled
  dunder methods.
  You can use the ``good-dunder-names`` option to allow specific dunder names.

- Added ``consider-using-augmented-assign`` check for ``CodeStyle`` extension
  which flags ``x = x + 1`` to simplify to ``x += 1``.
  This check is disabled by default. To use it, load the code style extension
  with ``load-plugins=pylint.extensions.code_style`` and add
  ``consider-using-augmented-assign`` in the ``enable`` option.

- Add ``magic-number`` plugin checker for comparison with constants instead of
  named constants or enums.
  You can use it with ``--load-plugins=pylint.extensions.magic_value``.

- Add ``redundant-typehint-argument`` message for `typing` plugin for duplicate
  assign typehints.
  Enable the plugin to enable the message with:
  ``--load-plugins=pylint.extensions.typing``.

False Positives Fixed
---------------------

- Fix false positive for ``unused-variable`` and ``unused-import`` when a name
  is only used in a string literal type annotation.

- Document a known false positive for ``useless-suppression`` when disabling
  ``line-too-long`` in a module with only comments and no code.

- ``trailing-whitespaces`` is no longer reported within strings.

- Fix false positive for ``global-variable-not-assigned`` when a global
  variable is re-assigned via an ``ImportFrom`` node.

- Fix false positive for ``use-maxsplit-arg`` with custom split method.

- Fix ``logging-fstring-interpolation`` false positive raised when logging and
  f-string with ``%s`` formatting.

- Fix false-positive for ``used-before-assignment`` in pattern matching
  with a guard.

- Fix ``use-sequence-for-iteration`` when unpacking a set with ``*``.

- Fix ``deprecated-method`` false positive when alias for method is similar to
  name of deprecated method.

- Fix false positive ``assigning-non-slot`` when a class attribute is
  re-assigned.

- Fix false positive for ``too-many-function-args`` when a function call is
  assigned to a class attribute inside the class where the function is defined.

- Fixes false positive ``abstract-method`` on Protocol classes.

- Pylint now understands the ``kw_only`` keyword argument for ``dataclass``.

- Fix false positive for ``undefined-loop-variable`` in ``for-else`` loops that
  use a function
  having a return type annotation of ``NoReturn`` or ``Never``.

- Fix ``used-before-assignment`` for functions/classes defined in type checking
  guard.

- Fix false positive for ``unhashable-member`` when subclassing ``dict`` and
  using the subclass as a dictionary key.

- Fix the message for ``unnecessary-dunder-call`` for ``__aiter__`` and
  ``__aneext__``. Also
  only emit the warning when ``py-version`` >= 3.10.

- Fix ``used-before-assignment`` false positive when else branch calls
  ``sys.exit`` or similar terminating functions.

- Fix a false positive for ``used-before-assignment`` for imports guarded by
  ``typing.TYPE_CHECKING`` later used in variable annotations.

- Fix a false positive for ``simplify-boolean-expression`` when multiple values
  are inferred for a constant.

- ``unnecessary-list-index-lookup`` will not be wrongly emitted if
  ``enumerate`` is called with ``start``.

- Don't warn about ``stop-iteration-return`` when using ``next()`` over
  ``itertools.cycle``.

- Fixes ``used-before-assignment`` false positive when the walrus operator
  is used in a ternary operator.

- Fix ``missing-param-doc`` false positive when function parameter has an
  escaped underscore.

- Fixes ``method-cache-max-size-none`` false positive for methods inheriting
  from ``Enum``.

- ``multiple-statements`` no longer triggers for function stubs using inlined
  ``...``.

- Fix a false positive for ``used-before-assignment`` when a name guarded by
  ``if TYPE_CHECKING:`` is used as a type annotation in a function body and
  later re-imported in the same scope.

- Prevent ``used-before-assignment`` when imports guarded by ``if
  TYPE_CHECKING``
  are guarded again when used.

- Fixes false positive for ``try-except-raise`` with multiple exceptions in one
  except statement if exception are in different namespace.

- Fix ``invalid-name`` errors for ``typing_extension.TypeVar``.

- Fix ``no-kwoa`` false positive for context managers.

- Fix a false positive for ``redefined-variable-type`` when ``async`` methods
  are present.

False Negatives Fixed
---------------------

- Code following a call to  ``quit``,  ``exit``, ``sys.exit`` or ``os._exit``
  will be marked as `unreachable`.

- Emit ``used-before-assignment`` when function arguments are redefined inside
  an inner function and accessed there before assignment.

- Fix a false negative for ``unused-import`` when one module used an import in
  a type annotation that was also used in another module.

- Flag ``superfluous-parens`` if parentheses are used during string
  concatenation.

- Emit ``used-before-assignment`` when relying on names only defined under
  conditions always testing false.

- ``consider-using-join`` can now be emitted for non-empty string separators.

- Emit ``used-before-assignment`` for further imports guarded by
  ``TYPE_CHECKING``

  Previously, this message was only emitted for imports guarded directly under
  ``TYPE_CHECKING``, not guarded two if-branches deep, nor when
  ``TYPE_CHECKING``
  was imported from ``typing`` under an alias.

- Fix a false negative for ``unused-import`` when a constant inside
  ``typing.Annotated`` was treated as a reference to an import.

- ``consider-using-any-or-all`` message will now be raised in cases when
  boolean is initialized, reassigned during loop, and immediately returned.

- Extend ``invalid-slice-index`` to emit an warning for invalid slice indices
  used with string and byte sequences, and range objects.

- Fixes ``unnecessary-list-index-lookup`` false negative when ``enumerate`` is
  called with ``iterable`` as a kwarg.

- ``no-else-return`` or ``no-else-raise`` will be emitted if ``except`` block
  always returns or raises.

- Fix ``dangerous-default-value`` false negative when ``*`` is used.

- ``consider-using-with`` now triggers for ``pathlib.Path.open``.

Other Bug Fixes
---------------

- Fix bug in detecting ``unused-variable`` when iterating on variable.

- Fix bug in scanning of names inside arguments to ``typing.Literal``.
  See https://peps.python.org/pep-0586/#literals-enums-and-forward-references
  for details.

- Update ``disallowed-name`` check to flag module-level variables.

- Pylint will no longer deadlock if a parallel job is killed but fail
  immediately instead.

- Fix ignored files being linted when passed on stdin.

- Fix ``no-member`` false negative when augmented assign is done manually,
  without ``+=``.

- Any assertion on a populated tuple will now receive a ``assert-on-tuple``
  warning.

- ``missing-return-doc``, ``missing-raises-doc`` and ``missing-yields-doc`` now
  respect
  the ``no-docstring-rgx`` option.

- Update ``reimported`` help message for clarity.

- ``consider-iterating-dictionary`` will no longer be raised if bitwise
  operations are used.

- Using custom braces in ``msg-template`` will now work properly.

- Pylint will now filter duplicates given to it before linting. The output
  should
  be the same whether a file is given/discovered multiple times or not.

- Remove ``__index__`` dunder method call from ``unnecessary-dunder-call``
  check.

- Fixed handling of ``--`` as separator between positional arguments and flags.
  This was not actually fixed in 2.14.5.

- Don't crash on ``OSError`` in config file discovery.

- Messages sent to reporter are now copied so a reporter cannot modify the
  message sent to other reporters.

- Fixed a case where custom plugins specified by command line could silently
  fail.

  Specifically, if a plugin relies on the ``init-hook`` option changing
  ``sys.path`` before
  it can be imported, this will now emit a ``bad-plugin-value`` message. Before
  this
  change, it would silently fail to register the plugin for use, but would load
  any configuration, which could have unintended effects.

- Update ``modified_iterating`` checker to fix a crash with ``for`` loops on
  empty list.

- Update wording for ``arguments-differ`` and ``arguments-renamed`` to clarify
  overriding object.

- ``disable-next`` is now correctly scoped to only the succeeding line.

- Fixed a crash in the ``unhashable-member`` checker when using a ``lambda`` as
  a dict key.

- Add ``mailcap`` to deprecated modules list.

- Fix a crash in the ``modified-iterating-dict`` checker involving instance
  attributes.

- ``invalid-class-object`` does not crash anymore when ``__class__`` is
  assigned alongside another variable.

- ``--help-msg`` now accepts a comma-separated list of message IDs again.

- Allow specifying non-builtin exceptions in the ``overgeneral-exception``
  option
  using an exception's qualified name.

- Report ``no-self-argument`` rather than ``no-method-argument`` for methods
  with variadic arguments.

- Fixed an issue where ``syntax-error`` couldn't be raised on files with
  invalid encodings.

- Fix false positive for ``redefined-outer-name`` when aliasing ``typing``
  e.g. as ``t`` and guarding imports under ``t.TYPE_CHECKING``.

- Fixed a crash of the ``modified_iterating`` checker when iterating on a set
  defined as a class attribute.

- Use ``py-version`` to determine if a message should be emitted for messages
  defined with ``max-version`` or ``min-version``.

- Improve ``bad-thread-instantiation`` check to warn if ``target`` is not
  passed in as a keyword argument
  or as a second argument.

- Fixes edge case of custom method named ``next`` raised an astroid error.

- Fixed a multi-processing crash that prevents using any more than 1 thread on
  MacOS.

  The returned module objects and errors that were cached by the linter plugin
  loader
  cannot be reliably pickled. This means that ``dill`` would throw an error
  when
  attempting to serialise the linter object for multi-processing use.

- Fix crash that happened when parsing files with unexpected encoding starting
  with 'utf' like ``utf13``.

- Fix a crash when a child class with an ``__init__`` method inherits from a
  parent class with an ``__init__`` class attribute.

- Fix ``valid-metaclass-classmethod-first-arg`` default config value from "cls"
  to "mcs"
  which would cause both a false-positive and false-negative.

- Fixes a crash in the ``unnecessary_list_index_lookup`` check when using
  ``enumerate`` with ``start`` and a class attribute.

- Fixes a crash in ``stop-iteration-return`` when the ``next`` builtin is
  called without arguments.

- When pylint exit due to bad arguments being provided the exit code will now
  be the expected ``32``.

- Fixes a ``ModuleNotFound`` exception when running pylint on a Django project
  with the ``pylint_django`` plugin enabled.

- Fixed a crash when inferring a value and using its qname on a slice that was
  being incorrectly called.

- Use better regex to check for private attributes.

- Fix issue with new typing Union syntax in runtime context for Python 3.10+.

Other Changes
-------------

- Pylint now provides basic support for Python 3.11.

- Update message for ``abstract-method`` to include child class name.

- Update Pyreverse's dot and plantuml printers to detect when class methods are
  abstract and show them with italic font.
  For the dot printer update the label to use html-like syntax.

- The ``docparams`` extension now considers typing in Numpy style docstrings
  as "documentation" for the ``missing-param-doc`` message.

- Relevant ``DeprecationWarnings`` are now raised with ``stacklevel=2``, so
  they have the callsite attached in the message.

- Add a ``minimal`` option to ``pylint-config`` and its toml generator.

- Add method name to the error messages of ``no-method-argument`` and
  ``no-self-argument``.

- Prevent leaving the pip install cache in the Docker image.

- Add a keyword-only ``compare_constants`` argument to ``safe_infer``.

- Add ``default_enabled`` option to optional message dict. Provides an option
  to disable a checker message by default.
  To use a disabled message, the user must enable it explicitly by adding the
  message to the ``enable`` option.

- Sort ``--generated-rcfile`` output.

- epylint is now deprecated and will be removed in pylint 3.0.0. All emacs and
  flymake related
  files were removed and their support will now happen in an external
  repository :
  https://github.com/emacsorphanage/pylint.

- Adds test for existing preferred-modules configuration functionality.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 pkgsrc/devel/py-pylint/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/devel/py-pylint/PLIST
cvs rdiff -u -r1.66 -r1.67 pkgsrc/devel/py-pylint/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-pylint/Makefile
diff -u pkgsrc/devel/py-pylint/Makefile:1.77 pkgsrc/devel/py-pylint/Makefile:1.78
--- pkgsrc/devel/py-pylint/Makefile:1.77        Tue Jan 24 10:08:07 2023
+++ pkgsrc/devel/py-pylint/Makefile     Thu Feb  2 08:32:04 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.77 2023/01/24 10:08:07 adam Exp $
+# $NetBSD: Makefile,v 1.78 2023/02/02 08:32:04 adam Exp $
 
-DISTNAME=      pylint-2.15.10
+DISTNAME=      pylint-2.16.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pylint/}
@@ -11,7 +11,7 @@ COMMENT=      Python source code analyzer
 LICENSE=       gnu-gpl-v2
 
 TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel>=0.37.1:../../devel/py-wheel
-DEPENDS+=      ${PYPKGPREFIX}-astroid>=2.12.13:../../devel/py-astroid
+DEPENDS+=      ${PYPKGPREFIX}-astroid>=2.14.1:../../devel/py-astroid
 DEPENDS+=      ${PYPKGPREFIX}-dill>=0.3.6:../../textproc/py-dill
 DEPENDS+=      ${PYPKGPREFIX}-isort>=4.2.5:../../devel/py-isort
 DEPENDS+=      ${PYPKGPREFIX}-mccabe>=0.6:../../devel/py-mccabe

Index: pkgsrc/devel/py-pylint/PLIST
diff -u pkgsrc/devel/py-pylint/PLIST:1.28 pkgsrc/devel/py-pylint/PLIST:1.29
--- pkgsrc/devel/py-pylint/PLIST:1.28   Tue Aug 30 10:01:18 2022
+++ pkgsrc/devel/py-pylint/PLIST        Thu Feb  2 08:32:04 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.28 2022/08/30 10:01:18 adam Exp $
+@comment $NetBSD: PLIST,v 1.29 2023/02/02 08:32:04 adam Exp $
 bin/epylint-${PYVERSSUFFIX}
 bin/pylint-${PYVERSSUFFIX}
 bin/pylint-config-${PYVERSSUFFIX}
@@ -76,6 +76,8 @@ ${PYSITELIB}/pylint/checkers/misc.py
 ${PYSITELIB}/pylint/checkers/misc.pyc
 ${PYSITELIB}/pylint/checkers/modified_iterating_checker.py
 ${PYSITELIB}/pylint/checkers/modified_iterating_checker.pyc
+${PYSITELIB}/pylint/checkers/nested_min_max.py
+${PYSITELIB}/pylint/checkers/nested_min_max.pyc
 ${PYSITELIB}/pylint/checkers/newstyle.py
 ${PYSITELIB}/pylint/checkers/newstyle.pyc
 ${PYSITELIB}/pylint/checkers/non_ascii_names.py
@@ -184,12 +186,18 @@ ${PYSITELIB}/pylint/extensions/compariso
 ${PYSITELIB}/pylint/extensions/comparison_placement.pyc
 ${PYSITELIB}/pylint/extensions/confusing_elif.py
 ${PYSITELIB}/pylint/extensions/confusing_elif.pyc
+${PYSITELIB}/pylint/extensions/consider_refactoring_into_while_condition.py
+${PYSITELIB}/pylint/extensions/consider_refactoring_into_while_condition.pyc
 ${PYSITELIB}/pylint/extensions/consider_ternary_expression.py
 ${PYSITELIB}/pylint/extensions/consider_ternary_expression.pyc
+${PYSITELIB}/pylint/extensions/dict_init_mutate.py
+${PYSITELIB}/pylint/extensions/dict_init_mutate.pyc
 ${PYSITELIB}/pylint/extensions/docparams.py
 ${PYSITELIB}/pylint/extensions/docparams.pyc
 ${PYSITELIB}/pylint/extensions/docstyle.py
 ${PYSITELIB}/pylint/extensions/docstyle.pyc
+${PYSITELIB}/pylint/extensions/dunder.py
+${PYSITELIB}/pylint/extensions/dunder.pyc
 ${PYSITELIB}/pylint/extensions/empty_comment.py
 ${PYSITELIB}/pylint/extensions/empty_comment.pyc
 ${PYSITELIB}/pylint/extensions/emptystring.py
@@ -198,6 +206,8 @@ ${PYSITELIB}/pylint/extensions/eq_withou
 ${PYSITELIB}/pylint/extensions/eq_without_hash.pyc
 ${PYSITELIB}/pylint/extensions/for_any_all.py
 ${PYSITELIB}/pylint/extensions/for_any_all.pyc
+${PYSITELIB}/pylint/extensions/magic_value.py
+${PYSITELIB}/pylint/extensions/magic_value.pyc
 ${PYSITELIB}/pylint/extensions/mccabe.py
 ${PYSITELIB}/pylint/extensions/mccabe.pyc
 ${PYSITELIB}/pylint/extensions/no_self_use.py

Index: pkgsrc/devel/py-pylint/distinfo
diff -u pkgsrc/devel/py-pylint/distinfo:1.66 pkgsrc/devel/py-pylint/distinfo:1.67
--- pkgsrc/devel/py-pylint/distinfo:1.66        Tue Jan 24 10:08:07 2023
+++ pkgsrc/devel/py-pylint/distinfo     Thu Feb  2 08:32:04 2023
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.66 2023/01/24 10:08:07 adam Exp $
+$NetBSD: distinfo,v 1.67 2023/02/02 08:32:04 adam Exp $
 
-BLAKE2s (pylint-2.15.10.tar.gz) = 0c060ae65b53f0a6beafc420cf02640b9624930f7272f1843c5f56ad85445f21
-SHA512 (pylint-2.15.10.tar.gz) = 9c3ae0979f023ede518377630f8bc1540783323013af57b2caa073a31ede571fe5d975f66f358bff288942cf1cd34a8b3143236dba580f5e20cfb19261358984
-Size (pylint-2.15.10.tar.gz) = 411656 bytes
+BLAKE2s (pylint-2.16.0.tar.gz) = fe0439b6821e848265c803e293e9c166aefd21ccc0f3175f6145a8dd2580484c
+SHA512 (pylint-2.16.0.tar.gz) = f6fcaaf6a938f4c480a316c00f1c33aedc34c4fd6e036198a448bd6bd733f7512d023c7af65cdd397e74f83091954ff8447d56d81ce3e43fa27791862b2e8c50
+Size (pylint-2.16.0.tar.gz) = 427805 bytes



Home | Main Index | Thread Index | Old Index