2019-11-14 11:03:46 +01:00
|
|
|
# $NetBSD: Makefile,v 1.38 2019/11/14 10:03:46 adam Exp $
|
2014-03-12 02:26:03 +01:00
|
|
|
|
2019-11-14 11:03:46 +01:00
|
|
|
DISTNAME= pylint-2.4.4
|
2014-03-12 02:26:03 +01:00
|
|
|
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
|
2014-03-12 02:35:52 +01:00
|
|
|
CATEGORIES= devel python
|
2016-06-08 19:43:20 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_PYPI:=p/pylint/}
|
2014-03-12 02:26:03 +01:00
|
|
|
|
2018-05-17 12:35:32 +02:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2016-07-12 11:23:50 +02:00
|
|
|
HOMEPAGE= https://www.pylint.org/
|
2017-03-01 14:08:43 +01:00
|
|
|
COMMENT= Python source code analyzer
|
|
|
|
LICENSE= gnu-gpl-v2
|
2014-03-12 02:26:03 +01:00
|
|
|
|
py-pylint: updated to 2.3.0
What's New in Pylint 2.3.0?
* Protect against NonDeducibleTypeHierarchy when calling semi-private is_subtype
astroid.helpers.is_subtype raises NonDeducibleTypeHierarchy when it cannot infer
the base classes of the given types, but that makes sense in its context given that
the method is mostly used to inform the inference process about the hierarchy of classes.
Doesn't make that much sense for pylint itself, which is why we're handling the
exception here, rather than in astroid
* Added a new command line option list-groups for listing all the check groups pylint knows about.
* Allow BaseException for emitting broad-except, just like Exception.
* Fixed a crash that occurred for bad-str-strip-call when strip() received None
* Don't emit *-not-iterating checks for builtins consumed by itertools
* Fix a crash caused by iterating over Uninferable in a string formatting check.
* Fixed false positives for no-self-argument and unsubscriptable-object when using __class_getitem__ (new in Python 3.7)
* Support Ellipsis as a synonym for pass statements.
* fixme gets triggered only on comments.
* Fixed a false positive for unused-variable and nonlocal assignments
* Added load_configuration() hook for plugins
New optional hook for plugins is added: load_configuration().
This hook is executed after configuration is loaded to prevent
overwriting plugin specific configuration via user-based
configuration.
* Fix missing-raises-doc false positive (W9006)
* Exempt starred unpacking from *-not-iterating Python 3 checks
* Make compare-to-zero less zealous by checking against equality and identity
* Add no-else-raise warning (R1720)
* Exempt yield from from *-not-iterating Python 3 checks.
* Fix incorrect generation of no-else-return warnings (R1705)
Fixed issue where if statements with nested if statements
were incorrectly being flagged as no-else-return in some cases and
not being flagged as no-else-return in other cases. Added tests
for verification and updated pylint source files to eliminate newly
exposed warnings.
* Fix false positive with not-async-context-manager caused by not understanding contextlib.asynccontextmanager
* Refactor bad-reversed-sequence to account for more objects that can define __reversed__
One such object would be an enum class, for which __reversed__ yields each individual enum.
As such, the check for bad-reversed-sequence needs to not differentiate between classes
and instances when it comes for checking of __reversed__ presence.
* Added wrong-exception-operation
Used when an operation is done against an exception, but the operation
is not valid for the exception in question. Usually emitted when having
binary operations between exceptions in except handlers.
* no-member is emitted for enums when they lack a member
Previously we weren't doing this because we detected a
__getattr__ implementation on the Enum class
(and this check is skipped for classes with __getattr__),
but that is fine for Enums, given that they are inferred in a customised
way in astroid.
* Generalize chained-comparison
Previous version incorrectly detects a < b < c and b < d and fails to
detect a < b < c and c < d.
* Avoid popping __main__ when using multiple jobs
* Add a new option 'check-str-concat-over-line-jumps' to check 'implicit-str-concat-in-sequence'
* Fixes for the new style logging format linter.
The number of arguments was not handled properly, leading to an always
successful check.
* Fix false positive not-callable for uninferable properties.
* Fix false positive useless-else-on-loop if the break is deep in the else
of an inner loop.
2019-02-28 10:20:07 +01:00
|
|
|
DEPENDS+= ${PYPKGPREFIX}-astroid>=2.2.0:../../devel/py-astroid
|
2017-03-01 14:08:43 +01:00
|
|
|
DEPENDS+= ${PYPKGPREFIX}-isort>=4.2.5:../../devel/py-isort
|
py-pylint: updated to 2.4.2
What's New in Pylint 2.4.2?
* ``ignored-modules`` can skip submodules.
* ``self-assigning-variable`` skips class level assignments.
* ``consider-using-sys-exit`` is exempted when `exit()` is imported from `sys`
* Exempt annotated assignments without variable from ``class-variable-slots-conflict``
* Fix ``utils.is_error`` to account for functions returning early.
This fixes a false negative with ``unused-variable`` which was no longer triggered
when a function raised an exception as the last instruction, but the body of the function
still had unused variables.
What's New in Pylint 2.4.1?
* Exempt type checking definitions defined in both clauses of a type checking guard
* Exempt type checking definitions inside the type check guard
In a7f236528bb3758886b97285a56f3f9ce5b13a99 we added basic support
for emitting `used-before-assignment` if a variable was only defined
inside a type checking guard (using `TYPE_CHECKING` variable from `typing`)
Unfortunately that missed the case of using those type checking imports
inside the guard itself, which triggered spurious used-before-assignment errors.
* Require astroid >= 2.3 to avoid any compatibility issues.
What's New in Pylint 2.4.0?
* New check: ``import-outside-toplevel``
This check warns when modules are imported from places other than a
module toplevel, e.g. inside a function or a class.
* Handle inference ambiguity for ``invalid-format-index``
* Removed Python 2 specific checks such as ``relative-import``,
``invalid-encoded-data``, ``missing-super-argument``.
* Support forward references for ``function-redefined`` check.
* Handle redefinitions in case of type checking imports.
* Added a new check, ``consider-using-sys-exit``
This check is emitted when we detect that a quit() or exit() is invoked
instead of sys.exit(), which is the preferred way of exiting in program.
* ``useless-suppression`` check now ignores ``cyclic-import`` suppressions,
which could lead to false postiives due to incomplete context at the time
of the check.
* Added new checks, ``no-else-break`` and ``no-else-continue``
These checks highlight unnecessary ``else`` and ``elif`` blocks after
``break`` and ``continue`` statements.
* Don't emit ``protected-access`` when a single underscore prefixed attribute
is used inside a special method
* Fix the "statement" values in the PyLinter's stats reports by module.
* Added a new check, ``invalid-overridden-method``
This check is emitted when we detect that a method is overridden
as a property or a property is overridden as a method. This can indicate
a bug in the application code that will trigger a runtime error.
* Added a new check, ``arguments-out-of-order``
This check warns if you have arguments with names that match those in
a function's signature but you are passing them in to the function
in a different order.
* Added a new check, ``redeclared-assigned-name``
This check is emitted when ``pylint`` detects that a name
was assigned one or multiple times in the same assignment,
which indicate a potential bug.
* Ignore lambda calls with variadic arguments without a context.
Inferring variadic positional arguments and keyword arguments
will result into empty Tuples and Dicts, which can lead in
some cases to false positives with regard to no-value-for-parameter.
In order to avoid this, until we'll have support for call context
propagation, we're ignoring such cases if detected.
We already did that for function calls, but the previous fix
was not taking in consideration ``lambdas``
* Added a new check, ``self-assigning-variable``
This check is emitted when we detect that a variable is assigned
to itself, which might indicate a potential bug in the code application.
* Added a new check, ``property-with-parameters``.
This check is emitted when we detect that a defined property also
has parameters, which are useless.
* Excluded protocol classes from a couple of checks.
* Add a check `unnecessary-comprehension` that detects unnecessary comprehensions.
This check is emitted when ``pylint`` finds list-, set- or dict-comprehensions,
that are unnecessary and can be rewritten with the list-, set- or dict-constructors.
* Excluded PEP 526 instance and class variables from ``no-member``.
* Excluded `attrs` from `too-few-public-methods` check.
* ``unused-import`` emitted for the right import names in function scopes.
* Dropped support for Python 3.4.
* ``assignment-from-no-return`` not triggered for async methods.
* Don't emit ``attribute-defined-outside-init`` for variables defined in setters.
* Syntax errors report the column number.
* Support fully qualified typing imports for type annotations.
* Exclude ``__dict__`` from ``attribute-defined-outside-init``
* Fix pointer on spelling check when the error are more than one time in the same line.
* Fix crash happening when parent of called object cannot be determined
* Allow of in `GoogleDocstring.re_multiple_type`
* Added `subprocess-run-check` to handle subrocess.run without explicitly set `check` keyword.
* When we can't infer bare except handlers, skip ``try-except-raise``
* Handle more `unnecessary-lambda` cases when dealing with additional kwargs in wrapped calls
* Better postponed evaluation of annotations handling
* Support postponed evaluation of annotations for variable annotations.
* ``epylint.py_run`` defaults to ``python`` in case the current executable is not a Python one.
* Ignore raw docstrings when running Similarities checker with `ignore-docstrings=yes` option
* Fix crash when calling ``inherit_from_std_ex`` on a class which is its own ancestor
* Added a new check that warns the user if a function call is used inside a test but parentheses are missing.
* ``len-as-condition`` now only fires when a ``len(x)`` call is made without an explicit comparison
The message and description accompanying this checker has been changed
reflect this new behavior, by explicitly asking to either rely on the
fact that empty sequence are false or to compare the length with a scalar.
* Add ``preferred-module`` checker that notify if an import has a replacement module that should be used.
This check is emitted when ``pylint`` finds an imported module that has a
preferred replacement listed in ``preferred-modules``.
* ``assigning-non-slot`` not emitted for classes with unknown base classes.
* ``old-division`` is not emitted for non-Const nodes.
* Added method arguments to the dot writer for pyreverse.
* Support for linting file from stdin.
IDEs may benefit from the support for linting from an in-memory file.
* Added a new check `class-variable-slots-conflict`
This check is emitted when ``pylint`` finds a class variable that conflicts with a slot
name, which would raise a ``ValueError`` at runtime.
* Added new check: dict-iter-missing-items (E1141)
* Fix issue with pylint name in output of python -m pylint --version
* Relicense logo material under the CC BY-SA 4.0 license.
* Skip `if` expressions from f-strings for the `check_elif` checker
* C0412 (ungrouped-import) is now compatible with isort.
* Added new extension to detect too much code in a try clause
* ``signature-mutators`` option was added
With this option, users can choose to ignore `too-many-function-args`, `unexpected-keyword-arg`,
and `no-value-for-parameter` for functions decorated with decorators that change
the signature of a decorated function.
* Fixed a pragma comment on its own physical line being ignored when part
of a logical line with the previous physical line.
* Fixed false `undefined-loop-variable` for a function defined in the loop,
that uses the variable defined in that loop.
* Fixed `unused-argument` and `function-redefined` getting raised for
functions decorated with `typing.overload`.
* Fixed a false positive with ``consider-using-dict-comprehension`` for constructions that can't be converted to a comprehension
* Added ``__post_init__`` to ``defining-attr-methods`` in order to avoid ``attribute-defined-outside-init`` in dataclasses.
* Changed description of W0199 to use the term 2-item-tuple instead of 2-uple.
* Allow a `.` as a prefix for Sphinx name resolution.
* Checkers must now keep a 1 to 1 relationship between "msgid" (ie: C1234) and "symbol" (ie : human-readable-symbol)
* In checkers, an old_names can now be used for multiple new messages and pylint is now a little faster
* Allow the choice of f-strings as a valid way of formatting logging strings.
* Added ``--list-msgs-enabled`` command to list all enabled and disabled messages given the current RC file and command line arguments.
2019-10-01 13:38:06 +02:00
|
|
|
DEPENDS+= ${PYPKGPREFIX}-mccabe>=0.6:../../devel/py-mccabe
|
2017-10-02 01:30:50 +02:00
|
|
|
BUILD_DEPENDS+= ${PYPKGPREFIX}-test-runner-[0-9]*:../../devel/py-test-runner
|
2018-04-06 10:35:07 +02:00
|
|
|
TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
|
2014-03-12 02:26:03 +01:00
|
|
|
|
|
|
|
USE_LANGUAGES= # none
|
|
|
|
|
py-pylint: updated to 2.0.0
Pylint 2.0:
* trailing-comma-tuple can be emitted for return statements as well.
* Fix a false positive inconsistent-return-statements message when exception is raised
inside an else statement.
* ImportFrom nodes correctly use the full name for the import sorting checks.
* [].extend and similar builtin operations don't emit dict-*-not-iterating with the Python 3 porting checker
* Add a check consider-using-dict-comprehension which is emitted if for dict initialization
the old style with list comprehensions is used.
* Add a check consider-using-set-comprehension which is emitted if for set initialization
the old style with list comprehensions is used.
* logging-not-lazy is emitted whenever pylint infers that a string is built with addition
* Add a check chained-comparison which is emitted if a boolean operation can be simplified
by chaining some of its operations.
e.g "a < b and b < c", can be simplified as "a < b < c".
* Add a check consider-using-in for comparisons of a variable against
multiple values with "==" and "or"s instead of checking if the variable
is contained "in" a tuple of those values.
* in is considered iterating context for some of the Python 3 porting checkers
* Add --ignore-none flag to control if pylint should warn about no-member where the owner is None
* Fix a false positive related to too-many-arguments and bounded __get__ methods
* mcs as the first parameter of metaclass's __new__ method was replaced by cls
* assignment-from-no-return considers methods as well.
* Support typing.TYPE_CHECKING for *unused-import* errors
* Inferred classes at a function level no longer emit invalid-name
when they don't respect the variable regular expression
* Added basic support for postponed evaluation of function annotations.
* Fix a bug with missing-kwoa and variadics parameters
* simplifiable-if-statement takes in account only when assigning to same targets
* Make len-as-condition test more cases, such as len() < 1 or len <= 0'
* Fix false-positive line-too-long message emission for
commented line at the end of a module
* Fix false-positive bad-continuation for with statements
* Don't warn about stop-iteration-return when using next() over itertools.count
* Add a check consider-using-get for unidiomatic usage of value/default-retrieval
for a key from a dictionary
* invalid-slice-index is not emitted when the slice is used as index for a complex object.
We only use a handful of known objects (list, set and friends) to figure out if
we should emit invalid-slice-index when the slice is used to subscript an object.
* Don't emit unused-import anymore for typing imports used in type comments.
* Add a new check 'useless-import-alias'.
* Add comparison-with-callable to warn for comparison with bare callable, without calling it.
* 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.
* Add --exit-zero option for continuous integration scripts to more
easily call Pylint in environments that abort when a program returns a
non-zero (error) status code.
* Warn if the first argument of an instance/ class method gets assigned
* New check comparison-with-itself to check comparison between same value.
* Add a new warning, 'logging-fstring-interpolation', emitted when f-string
is used within logging function calls.
* Don't show 'useless-super-delegation' if the subclass method has different type annotations.
* Add unhashable-dict-key check.
* Don't warn that a global variable is unused if it is defined by an import
* Skip wildcard import check for __init__.py.
* The Python 3 porting mode can now run with Python 3 as well.
* too-few-public-methods is not emitted for dataclasses.
* New verbose mode option, enabled with --verbose command line flag, to
display of extra non-checker-related output. It is disabled by default.
* undefined-loop-variable takes in consideration non-empty iterred objects before emitting
* Add support for numpydoc optional return value names.
* singleton-comparison accounts for negative checks
* Add a check consider-using-in for comparisons of a variable against
multiple values with "==" and "or"s instead of checking if the variable
is contained "in" a tuple of those values.
* defaultdict and subclasses of dict are now handled for dict-iter-* checks
* logging-format-interpolation also emits when f-strings are used instead of % syntax.
* Don't trigger misplaced-bare-raise when the raise is in a finally clause
* Add a new check, possibly-unused-variable.
This is similar to unused-variable, the only difference is that it is
emitted when we detect a locals() call in the scope of the unused variable.
The locals() call could potentially use the said variable, by consuming
all values that are present up to the point of the call. This new check
allows to disable this error when the user intentionally uses locals()
to consume everything.
* no-else-return accounts for multiple cases
The check was a bit overrestrictive because we were checking for
return nodes in the .orelse node. At that point though the if statement
can be refactored to not have the orelse. This improves the detection of
other cases, for instance it now detects TryExcept nodes that are part of
the .else branch.
* Added two new checks, invalid-envvar-value and invalid-envvar-default.
The former is trigger whenever pylint detects that environment variable manipulation
functions uses a different type than strings, while the latter is emitted whenever
the said functions are using a default variable of different type than expected.
* Add a check consider-using-join for concatenation of strings using str.join(sequence)
* Add a check consider-swap-variables for swapping variables with tuple unpacking
* Add new checker try-except-raise that warns the user if an except handler block
has a raise statement as its first operator. The warning is shown when there is
a bare raise statement, effectively re-raising the exception that was caught or the
type of the exception being raised is the same as the one being handled.
* Don't crash on invalid strings when checking for logging-format-interpolation
* Exempt __doc__ from triggering a redefined-builtin
__doc__ can be used to specify a docstring for a module without
passing it as a first-statement string.
* Fix false positive bad-whitespace from function arguments with default
values and annotations
* Fix stop-iteration-return false positive when next builtin has a
default value in a generator
* Fix emission of false positive no-member message for class with "private" attributes whose name is mangled.
* Fixed a crash which occurred when Uninferable wasn't properly handled in stop-iteration-return
* Use the proper node to get the name for redefined functions
* Don't crash when encountering bare raises while checking inconsistent returns
* Fix a false positive inconsistent-return-statements message when if statement is inside try/except.
* Fix a false positive inconsistent-return-statements message when while loop are used.
* Correct column number for whitespace conventions.
Previously the column was stuck at 0
* Fix unused-argument false positives with overshadowed variable in
dictionary comprehension.
* Fix false positive inconsistent-return-statements message when never
returning functions are used (i.e sys.exit for example).
* Fix error when checking if function is exception, as in bad-exception-context.
* Fix false positive inconsistent-return-statements message when a
function is defined under an if statement.
* New useless-return message when function or method ends with a "return" or
"return None" statement and this is the only return statement in the body.
* Fix false positive inconsistent-return-statements message by
avoiding useless exception inference if the exception is not handled.
* Fix bad thread instantiation check when target function is provided in args.
* Fixed false positive when a numpy Attributes section follows a Parameters
section
* Fix incorrect file path when file absolute path contains multiple path_strip_prefix strings.
* Fix false positive undefined-variable for lambda argument in class definitions
* Add of a new checker that warns the user if some messages are enabled or disabled
by id instead of symbol.
* Suppress false-positive not-callable messages from certain
staticmethod descriptors
* Fix indentation handling with tabs
* Fix false-positive bad-continuation error
* Fix false positive unused-variable in lambda default arguments
* Updated the default report format to include paths that can be clicked on in some terminals (e.g. iTerm).
* Fix inline def behavior with too-many-statements checker
* Fix KeyError raised when using docparams and NotImplementedError is documented.
* Fix 'method-hidden' raised when assigning to a property or data descriptor.
* Fix emitting useless-super-delegation when changing the default value of keyword arguments.
* Expand ignored-argument-names include starred arguments and keyword arguments
* Fix false-postive undefined-variable in nested lambda
* Fix false-positive bad-whitespace message for typing annoatations
with ellipses in them
2018-07-17 12:08:42 +02:00
|
|
|
PYTHON_VERSIONS_INCOMPATIBLE= 27
|
|
|
|
|
2017-03-01 14:08:43 +01:00
|
|
|
INSTALLATION_DIRS= ${PKGMANDIR}/man1
|
|
|
|
|
|
|
|
REPLACE_PYTHON+= pylint/test/data/ascript
|
2014-03-12 02:26:03 +01:00
|
|
|
|
|
|
|
post-install:
|
2017-07-16 22:33:32 +02:00
|
|
|
.for file in epylint pylint pyreverse symilar
|
py-pylint: updated to 2.2.0
What's New in Pylint 2.2?
* Consider range() objects for undefined-loop-variable leaking from iteration.
* deprecated-method can use the attribute name for identifying a deprecated method
Previously we were using the fully qualified name, which we still do, but the fully
qualified name for some unittest deprecated aliases leads to a generic
deprecation function. Instead on relying on that, we now also rely on the attribute
name, which should solve some false positives.
* Fix compatibility with changes to stdlib tokenizer.
* pylint is less eager to consume the whole line for pragmas
* Obtain the correct number of CPUs for virtualized or containerized environments.
* Change unbalanced-tuple-unpacking back to a warning.
It used to be a warning until a couple of years ago, after it was promoted to
an error. But the check might be suggesting the wrong thing in some cases,
for instance when checking against sys.argv which cannot be known at static
analysis time. Given it might rely on potential unknown data, it's best to
have it as a warning.
* Remove enumerate usage suggestion when defining __iter__ (C0200)
* Emit too-many-starred-assignment only when the number of Starred nodes is per assignment elements
* try-except-raise checker now handles multilevel inheritance hirerachy for exceptions correctly.
* Add a new check, simplifiable-if-expression for expressions like True if cond else False.
* too-few-public-methods is not reported for typing.NamedTuple
* too-few-public-methods is not reported for dataclasses created with options.
* Remove wrong modules from 'bad-python3-import'.
* The json reporter prints an empty list when no messages are emitted
* Add a new check, duplicate-string-formatting-argument
This new check is emitted whenever a duplicate string formatting argument
is found.
* assignment-from-no-return is not emitted for coroutines.
* Report format string type mismatches.
* consider-using-ternary and simplified-boolean-expression no longer emit for sequence based checks
* Handle AstroidSyntaxError when trying to import a module.
* Allow __module__ to be redefined at a class level.
* pylint used to emit a unused-variable error if unused import was found in the function. Now instead of
unused-variable, unused-import is emitted.
* Handle asyncio.coroutine when looking for not-an-iterable check.
* The locally-enabled check is gone.
* Infer decorated methods when looking for method-hidden
* Pick the latest value from the inferred values when looking for raising-non-exception
* Extend the TYPE_CHECKING guard to TYPE_CHECKING name as well, not just the attribute
* Ignore import x.y.z as z cases for checker useless-import-alias.
* Fix false positive undefined-variable and used-before-assignment with nonlocal keyword usage.
* Stop protected-access exception for missing class attributes
* Don't emit assignment-from-no-return for decorated function nodes
* unnecessary-pass is now also emitted when a function or class contains only docstring and pass statement.
In Python, stubbed functions often have a body that contains just a single pass statement,
indicating that the function doesn't do anything. However, a stubbed function can also have just a
docstring, and function with a docstring and no body also does nothing.
* duplicate-argument-name is emitted for more than one duplicate argument per function
* Allow double indentation levels for more distinguishable indentations
* Consider tuples in exception handler for try-except-raise.
* Fix astroid.ClassDef check in checkers.utils.is_subclass_of
* Fix wildcard imports being ignored by the import checker
* Fix external/internal distinction being broken in the import graph
* Fix wildcard import check not skipping __init__.py
* Fix --ignore-imports to understand multi-line imports
* Add a new check 'implicit-str-concat-in-sequence' to spot string concatenation inside lists, sets & tuples.
* literal-comparison is now emitted for 0 and 1 literals.
2018-11-26 10:09:34 +01:00
|
|
|
cd ${DESTDIR}${PREFIX}/bin && \
|
py-pylint: updated to 2.3.0
What's New in Pylint 2.3.0?
* Protect against NonDeducibleTypeHierarchy when calling semi-private is_subtype
astroid.helpers.is_subtype raises NonDeducibleTypeHierarchy when it cannot infer
the base classes of the given types, but that makes sense in its context given that
the method is mostly used to inform the inference process about the hierarchy of classes.
Doesn't make that much sense for pylint itself, which is why we're handling the
exception here, rather than in astroid
* Added a new command line option list-groups for listing all the check groups pylint knows about.
* Allow BaseException for emitting broad-except, just like Exception.
* Fixed a crash that occurred for bad-str-strip-call when strip() received None
* Don't emit *-not-iterating checks for builtins consumed by itertools
* Fix a crash caused by iterating over Uninferable in a string formatting check.
* Fixed false positives for no-self-argument and unsubscriptable-object when using __class_getitem__ (new in Python 3.7)
* Support Ellipsis as a synonym for pass statements.
* fixme gets triggered only on comments.
* Fixed a false positive for unused-variable and nonlocal assignments
* Added load_configuration() hook for plugins
New optional hook for plugins is added: load_configuration().
This hook is executed after configuration is loaded to prevent
overwriting plugin specific configuration via user-based
configuration.
* Fix missing-raises-doc false positive (W9006)
* Exempt starred unpacking from *-not-iterating Python 3 checks
* Make compare-to-zero less zealous by checking against equality and identity
* Add no-else-raise warning (R1720)
* Exempt yield from from *-not-iterating Python 3 checks.
* Fix incorrect generation of no-else-return warnings (R1705)
Fixed issue where if statements with nested if statements
were incorrectly being flagged as no-else-return in some cases and
not being flagged as no-else-return in other cases. Added tests
for verification and updated pylint source files to eliminate newly
exposed warnings.
* Fix false positive with not-async-context-manager caused by not understanding contextlib.asynccontextmanager
* Refactor bad-reversed-sequence to account for more objects that can define __reversed__
One such object would be an enum class, for which __reversed__ yields each individual enum.
As such, the check for bad-reversed-sequence needs to not differentiate between classes
and instances when it comes for checking of __reversed__ presence.
* Added wrong-exception-operation
Used when an operation is done against an exception, but the operation
is not valid for the exception in question. Usually emitted when having
binary operations between exceptions in except handlers.
* no-member is emitted for enums when they lack a member
Previously we weren't doing this because we detected a
__getattr__ implementation on the Enum class
(and this check is skipped for classes with __getattr__),
but that is fine for Enums, given that they are inferred in a customised
way in astroid.
* Generalize chained-comparison
Previous version incorrectly detects a < b < c and b < d and fails to
detect a < b < c and c < d.
* Avoid popping __main__ when using multiple jobs
* Add a new option 'check-str-concat-over-line-jumps' to check 'implicit-str-concat-in-sequence'
* Fixes for the new style logging format linter.
The number of arguments was not handled properly, leading to an always
successful check.
* Fix false positive not-callable for uninferable properties.
* Fix false positive useless-else-on-loop if the break is deep in the else
of an inner loop.
2019-02-28 10:20:07 +01:00
|
|
|
${MV} ${file} ${file}-${PYVERSSUFFIX} || ${TRUE}
|
2017-03-01 14:08:43 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/man/${file}.1 \
|
py-pylint: updated to 2.2.0
What's New in Pylint 2.2?
* Consider range() objects for undefined-loop-variable leaking from iteration.
* deprecated-method can use the attribute name for identifying a deprecated method
Previously we were using the fully qualified name, which we still do, but the fully
qualified name for some unittest deprecated aliases leads to a generic
deprecation function. Instead on relying on that, we now also rely on the attribute
name, which should solve some false positives.
* Fix compatibility with changes to stdlib tokenizer.
* pylint is less eager to consume the whole line for pragmas
* Obtain the correct number of CPUs for virtualized or containerized environments.
* Change unbalanced-tuple-unpacking back to a warning.
It used to be a warning until a couple of years ago, after it was promoted to
an error. But the check might be suggesting the wrong thing in some cases,
for instance when checking against sys.argv which cannot be known at static
analysis time. Given it might rely on potential unknown data, it's best to
have it as a warning.
* Remove enumerate usage suggestion when defining __iter__ (C0200)
* Emit too-many-starred-assignment only when the number of Starred nodes is per assignment elements
* try-except-raise checker now handles multilevel inheritance hirerachy for exceptions correctly.
* Add a new check, simplifiable-if-expression for expressions like True if cond else False.
* too-few-public-methods is not reported for typing.NamedTuple
* too-few-public-methods is not reported for dataclasses created with options.
* Remove wrong modules from 'bad-python3-import'.
* The json reporter prints an empty list when no messages are emitted
* Add a new check, duplicate-string-formatting-argument
This new check is emitted whenever a duplicate string formatting argument
is found.
* assignment-from-no-return is not emitted for coroutines.
* Report format string type mismatches.
* consider-using-ternary and simplified-boolean-expression no longer emit for sequence based checks
* Handle AstroidSyntaxError when trying to import a module.
* Allow __module__ to be redefined at a class level.
* pylint used to emit a unused-variable error if unused import was found in the function. Now instead of
unused-variable, unused-import is emitted.
* Handle asyncio.coroutine when looking for not-an-iterable check.
* The locally-enabled check is gone.
* Infer decorated methods when looking for method-hidden
* Pick the latest value from the inferred values when looking for raising-non-exception
* Extend the TYPE_CHECKING guard to TYPE_CHECKING name as well, not just the attribute
* Ignore import x.y.z as z cases for checker useless-import-alias.
* Fix false positive undefined-variable and used-before-assignment with nonlocal keyword usage.
* Stop protected-access exception for missing class attributes
* Don't emit assignment-from-no-return for decorated function nodes
* unnecessary-pass is now also emitted when a function or class contains only docstring and pass statement.
In Python, stubbed functions often have a body that contains just a single pass statement,
indicating that the function doesn't do anything. However, a stubbed function can also have just a
docstring, and function with a docstring and no body also does nothing.
* duplicate-argument-name is emitted for more than one duplicate argument per function
* Allow double indentation levels for more distinguishable indentations
* Consider tuples in exception handler for try-except-raise.
* Fix astroid.ClassDef check in checkers.utils.is_subclass_of
* Fix wildcard imports being ignored by the import checker
* Fix external/internal distinction being broken in the import graph
* Fix wildcard import check not skipping __init__.py
* Fix --ignore-imports to understand multi-line imports
* Add a new check 'implicit-str-concat-in-sequence' to spot string concatenation inside lists, sets & tuples.
* literal-comparison is now emitted for 0 and 1 literals.
2018-11-26 10:09:34 +01:00
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/${file}-${PYVERSSUFFIX}.1
|
2017-03-01 14:08:43 +01:00
|
|
|
.endfor
|
2014-03-12 02:26:03 +01:00
|
|
|
|
Update to 1.4.3
Update DEPENDS
Add test target
Upstream changes:
2015-03-14 -- 1.4.3
* Remove three warnings: star-args, abstract-class-little-used,
abstract-class-not-used. These warnings don't add any real value
and they don't imply errors or problems in the code.
* Added a new option for controlling the peephole optimizer in astroid.
The option ``--optimize-ast`` will control the peephole optimizer,
which is used to optimize a couple of AST subtrees. The current problem
solved by the peephole optimizer is when multiple joined strings,
with the addition operator, are encountered. If the numbers of such
strings is high enough, Pylint will then fail with a maximum recursion
depth exceeded error, due to its visitor architecture. The peephole
just transforms such calls, if it can, into the final resulting string
and this exhibit a problem, because the visit_binop method stops being
called (in the optimized AST it will be a Const node).
2015-03-11 -- 1.4.2
* Don't require a docstring for empty modules. Closes issue #261.
* Fix a false positive with `too-few-format-args` string warning,
emitted when the string format contained a normal positional
argument ('{0}'), mixed with a positional argument which did
an attribute access ('{0.__class__}').
Closes issue #463.
* Take in account all the methods from the ancestors
when checking for too-few-public-methods. Closes issue #471.
* Catch enchant errors and emit 'invalid-characters-in-docstring'
when checking for spelling errors. Closes issue #469.
* Use all the inferred statements for the super-init-not-called
check. Closes issue #389.
* Add a new warning, 'unichr-builtin', emitted by the Python 3
porting checker, when the unichr builtin is found. Closes issue #472.
* Add a new warning, 'intern-builtin', emitted by the Python 3
porting checker, when the intern builtin is found. Closes issue #473.
* Add support for editable installations.
* The HTML output accepts the `--msg-template` option. Patch by
Dan Goldsmith.
* Add 'map-builtin-not-iterating' (replacing 'implicit-map-evaluation'),
'zip-builtin-not-iterating', 'range-builtin-not-iterating', and
'filter-builtin-not-iterating' which are emitted by `--py3k` when the
appropriate built-in is not used in an iterating context (semantics
taken from 2to3).
* Add a new warning, 'unidiomatic-typecheck', emitted when an explicit
typecheck uses type() instead of isinstance(). For example,
`type(x) == Y` instead of `isinstance(x, Y)`. Patch by Chris Rebert.
Closes issue #299.
* Add support for combining the Python 3 checker mode with the --jobs
flag (--py3k and --jobs). Closes issue #467.
* Add a new warning for the Python 3 porting checker, 'using-cmp-argument',
emitted when the `cmp` argument for the `list.sort` or `sorted builtin`
is encountered.
* Make the --py3k flag commutative with the -E flag. Also, this patch
fixes the leaks of error messages from the Python 3 checker when
the errors mode was activated. Closes issue #437.
2015-01-16 -- 1.4.1
* Look only in the current function's scope for bad-super-call.
Closes issue #403.
* Check the return of properties when checking for not-callable.
Closes issue #406.
* Warn about using the input() or round() built-ins for Python 3.
Closes issue #411.
* Proper abstract method lookup while checking for
abstract-class-instantiated. Closes issue #401.
* Use a mro traversal for finding abstract methods. Closes issue #415.
* Fix a false positive with catching-non-exception and tuples of
exceptions.
* Fix a false negative with raising-non-exception, when the raise used
an uninferrable exception context.
* Fix a false positive on Python 2 for raising-bad-type, when
raising tuples in the form 'raise (ZeroDivisionError, None)'.
* Fix a false positive with invalid-slots-objects, where the slot entry
was an unicode string on Python 2. Closes issue #421.
* Add a new warning, 'redundant-unittest-assert', emitted when using
unittest's methods assertTrue and assertFalse with constant value
as argument. Patch by Vlad Temian.
* Add a new JSON reporter, usable through -f flag.
* Add the method names for the 'signature-differs' and 'argument-differs'
warnings. Closes issue #433.
* Don't compile test files when installing.
* Fix a crash which occurred when using multiple jobs and the files
given as argument didn't exist at all.
2014-11-23 -- 1.4.0
* Added new options for controlling the loading of C extensions.
By default, only C extensions from the stdlib will be loaded
into the active Python interpreter for inspection, because they
can run arbitrary code on import. The option
`--extension-pkg-whitelist` can be used to specify modules
or packages that are safe to load.
* Change default max-line-length to 100 rather than 80
* Drop BaseRawChecker class which were only there for backward
compat for a while now
* Don't try to analyze string formatting with objects coming from
function arguments. Closes issue #373.
* Port source code to be Python 2/3 compatible. This drops the
need for 2to3, but does drop support for Python 2.5.
* Each message now comes with a confidence level attached, and
can be filtered base on this level. This allows to filter out
all messages that were emitted even though an inference failure
happened during checking.
* Improved presenting unused-import message. Closes issue #293.
* Add new checker for finding spelling errors. New messages:
wrong-spelling-in-comment, wrong-spelling-in-docstring.
New options: spelling-dict, spelling-ignore-words.
* Add new '-j' option for running checks in sub-processes.
* Added new checks for line endings if they are mixed (LF vs CRLF)
or if they are not as expected. New messages: mixed-line-endings,
unexpected-line-ending-format. New option: expected-line-ending-format.
* 'dangerous-default-value' no longer evaluates the value of the arguments,
which could result in long error messages or sensitive data being leaked.
Closes issue #282
* Fix a false positive with string formatting checker, when
encountering a string which uses only position-based arguments.
Closes issue #285.
* Fix a false positive with string formatting checker, when using
keyword argument packing. Closes issue #288.
* Proper handle class level scope for lambdas.
* Handle 'too-few-format-args' or 'too-many-format-args' for format
strings with both named and positional fields. Closes issue #286.
* Analyze only strings by the string format checker. Closes issue #287.
* Properly handle nested format string fields. Closes issue #294.
* Don't emit 'attribute-defined-outside-init' if the attribute
was set by a function call in a defining method. Closes issue #192.
* Properly handle unicode format strings for Python 2.
Closes issue #296.
* Don't emit 'import-error' if an import was protected by a try-except,
which excepted ImportError.
* Fix an 'unused-import' false positive, when the error was emitted
for all the members imported with 'from import' form.
Closes issue #304.
* Don't emit 'invalid-name' when assigning a name in an
ImportError handler. Closes issue #302.
* Don't count branches from nested functions.
* Fix a false positive with 'too-few-format-args', when the format
strings contains duplicate manual position arguments.
Closes issue #310.
* fixme regex handles comments without spaces after the hash.
Closes issue #311.
* Don't emit 'unused-import' when a special object is imported
(__all__, __doc__ etc.). Closes issue #309.
* Look in the metaclass, if defined, for members not found in the current
class. Closes issue #306.
* Don't emit 'protected-access' if the attribute is accessed using
a property defined at the class level.
* Detect calls of the parent's __init__, through a binded super() call.
* Check that a class has an explicitly defined metaclass before
emitting 'old-style-class' for Python 2.
* Emit 'catching-non-exception' for non-class nodes. Closes issue #303.
* Order of reporting is consistent.
* Add a new warning, 'boolean-datetime', emitted when an instance
of 'datetime.time' is used in a boolean context. Closes issue #239.
* Fix a crash which ocurred while checking for 'method-hidden',
when the parent frame was something different than a function.
* Generate html output for missing files. Closes issue #320.
* Fix a false positive with 'too-many-format-args', when the format
string contains mixed attribute access arguments and manual
fields. Closes issue #322.
* Extend the cases where 'undefined-variable' and 'used-before-assignment'
can be detected. Closes issue #291.
* Add support for customising callback identifiers, by adding a new
'--callbacks' command line option. Closes issue #326.
* Add a new warning, 'logging-format-interpolation', emitted when .format()
string interpolation is used within logging function calls.
* Don't emit 'unbalanced-tuple-unpacking' when the rhs of the assignment
is a variable length argument. Closes issue #329.
* Add a new warning, 'inherit-non-class', emitted when a class inherits
from something which is not a class. Closes issue #331.
* Fix another false positives with 'undefined-variable', where the variable
can be found as a class assignment and used in a function annotation.
Closes issue #342.
* Handle assignment of the string format method to a variable.
Closes issue #351.
* Support wheel packaging format for PyPi. Closes issue #334.
* Check that various built-ins that do not exist in Python 3 are not
used: apply, basestring, buffer, cmp, coerce, execfile, file, long
raw_input, reduce, StandardError, unicode, reload and xrange.
* Warn for magic methods which are not used in any way in Python 3:
__coerce__, __delslice__, __getslice__, __setslice__, __cmp__,
__oct__, __nonzero__ and __hex__.
* Don't emit 'assigning-non-slot' when the assignment is for a property.
Closes issue #359.
* Fix for regression: '{path}' was no longer accepted in '--msg-template'.
* Report the percentage of all messages, not just for errors and warnings.
Closes issue #319.
* 'too-many-public-methods' is reported only for methods defined in a class,
not in its ancestors. Closes issue #248.
* 'too-many-lines' disable pragma can be located on any line, not only the
first. Closes issue #321.
* Warn in Python 2 when an import statement is found without a
corresponding `from __future__ import absolute_import`.
* Warn in Python 2 when a non-floor division operation is found without
a corresponding `from __future__ import division`.
* Add a new option, 'exclude-protected', for excluding members
from the protected-access warning. Closes issue #48.
* Warn in Python 2 when using dict.iter*(), dict.view*(); none of these
methods are available in Python 3.
* Warn in Python 2 when calling an object's next() method; Python 3 uses
__next__() instead.
* Warn when assigning to __metaclass__ at a class scope; in Python 3 a
metaclass is specified as an argument to the 'class' statement.
* Warn when performing parameter tuple unpacking; it is not supported in
Python 3.
* 'abstract-class-instantiated' is also emitted for Python 2.
It was previously disabled.
* Add 'long-suffix' error, emitted when encountering the long suffix
on numbers.
* Add support for disabling a checker, by specifying an 'enabled'
attribute on the checker class.
* Add a new CLI option, --py3k, for enabling Python 3 porting mode. This
mode will disable all other checkers and will emit warnings and
errors for constructs which are invalid or removed in Python 3.
* Add 'old-octal-literal' to Python 3 porting checker, emitted when
encountering octals with the old syntax.
* Add 'implicit-map-evaluation' to Python 3 porting checker, emitted
when encountering the use of map builtin, without explicit evaluation.
2014-07-26 -- 1.3.0
* Allow hanging continued indentation for implicitly concatenated
strings. Closes issue #232.
* Pylint works under Python 2.5 again, and its test suite passes.
* Fix some false positives for the cellvar-from-loop warnings.
Closes issue #233.
* Return new astroid class nodes when the inferencer can detect that
that result of a function invocation on a type (like `type` or
`abc.ABCMeta`) is requested. Closes #205.
* Emit 'undefined-variable' for undefined names when using the
Python 3 `metaclass=` argument.
* Checkers respect priority now. Close issue #229.
* Fix a false positive regarding W0511. Closes issue #149.
* Fix unused-import false positive with Python 3 metaclasses (#143).
* Don't warn with 'bad-format-character' when encountering
the 'a' format on Python 3.
* Add multiple checks for PEP 3101 advanced string formatting:
'bad-format-string', 'missing-format-argument-key',
'unused-format-string-argument', 'format-combined-specification',
'missing-format-attribute' and 'invalid-format-index'.
* Issue broad-except and bare-except even if the number
of except handlers is different than 1. Fixes issue #113.
* Issue attribute-defined-outside-init for all cases, not just
for the last assignment. Closes issue #262.
* Emit 'not-callable' when calling properties. Closes issue #268.
* Fix a false positive with unbalanced iterable unpacking,
when encountering starred nodes. Closes issue #273.
* Add new checks, 'invalid-slice-index' and 'invalid-sequence-index'
for invalid sequence and slice indices.
* Add 'assigning-non-slot' warning, which detects assignments to
attributes not defined in slots.
* Don't emit 'no-name-in-module' for ignored modules.
Closes issue #223.
* Fix an 'unused-variable' false positive, where the variable is
assigned through an import. Closes issue #196.
* Definition order is considered for classes, function arguments
and annotations. Closes issue #257.
* Don't emit 'unused-variable' when assigning to a nonlocal.
Closes issue #275.
* Do not let ImportError propagate from the import checker, leading to crash
in some namespace package related cases. Closes issue #203.
* Don't emit 'pointless-string-statement' for attribute docstrings.
Closes issue #193.
* Use the proper mode for pickle when opening and writing the stats file.
Closes issue #148.
* Don't emit hidden-method message when the attribute has been
monkey-patched, you're on your own when you do that.
* Only emit attribute-defined-outside-init for definition within the same
module as the offended class, avoiding to mangle the output in some cases.
* Don't emit 'unnecessary-lambda' if the body of the lambda call contains
call chaining. Closes issue #243.
* Don't emit 'missing-docstring' when the actual docstring uses `.format`.
Closes issue #281.
2014-04-30 -- 1.2.1
* Restore the ability to specify the init-hook option via the
configuration file, which was accidentally broken in 1.2.0.
* Add a new warning [bad-continuation] for badly indentend continued
lines.
* Emit [assignment-from-none] when the function contains bare returns.
Fixes BitBucket issue #191.
* Added a new warning for closing over variables that are
defined in loops. Fixes Bitbucket issue #176.
* Do not warn about \u escapes in string literals when Unicode literals
are used for Python 2.*. Fixes BitBucket issue #151.
* Extend the checking for unbalanced-tuple-unpacking and
unpacking-non-sequence to instance attribute unpacking as well.
* Fix explicit checking of python script (1.2 regression, #219)
* Restore --init-hook, renamed accidentally into --init-hooks in 1.2.0
(#211)
* Add 'indexing-exception' warning, which detects that indexing
an exception occurs in Python 2 (behaviour removed in Python 3).
2014-04-18 -- 1.2.0
* Pass the current python paths to pylint process when invoked via
epylint. Fixes BitBucket issue #133.
* Add -i / --include-ids and -s / --symbols back as completely ignored
options. Fixes BitBucket issue #180.
* Extend the number of cases in which logging calls are detected. Fixes
bitbucket issue #182.
* Improve pragma handling to not detect pylint:* strings in non-comments.
Fixes BitBucket issue #79.
* Do not crash with UnknownMessage if an unknown message ID/name appears
in disable or enable in the configuration. Patch by Cole Robinson.
Fixes bitbucket issue #170.
* Add new warning 'eval-used', checking that the builtin function `eval`
was used.
* Make it possible to show a naming hint for invalid name by setting
include-naming-hint. Also make the naming hints configurable. Fixes
BitBucket issue #138.
* Added support for enforcing multiple, but consistent name styles for
different name types inside a single module; based on a patch written
by morbo@google.com.
* Also warn about empty docstrings on overridden methods; contributed
by sebastianu@google.com.
* Also inspect arguments to constructor calls, and emit relevant
warnings; contributed by sebastianu@google.com.
* Added a new configuration option logging-modules to make the list
of module names that can be checked for 'logging-not-lazy' et. al.
configurable; contributed by morbo@google.com.
* ensure init-hooks is evaluated before other options, notably load-plugins
(#166)
* Python 2.5 support restored: fixed small issues preventing pylint to run
on python 2.5. Bitbucket issues #50 and #62.
* bitbucket #128: pylint doesn't crash when looking
for used-before-assignment in context manager
assignments.
* Add new warning, 'bad-reversed-sequence', for checking that the
reversed() builtin receive a sequence (implements __getitem__ and __len__,
without being a dict or a dict subclass) or an instance which implements
__reversed__.
* Mark `file` as a bad function when using python2 (closes #8).
* Add new warning 'bad-exception-context', checking
that `raise ... from ...` uses a proper exception context
(None or an exception).
* Enhance the check for 'used-before-assignment' to look
for 'nonlocal' uses.
* Emit 'undefined-all-variable' if a package's __all__
variable contains a missing submodule (closes #126).
* Add a new warning 'abstract-class-instantiated' for checking
that abstract classes created with `abc` module and
with abstract methods are instantied.
* Do not warn about 'return-arg-in-generator' in Python 3.3+.
* Do not warn about 'abstract-method' when the abstract method
is implemented through assignment (#155).
* Improve cyclic import detection in the case of packages, patch by Buck
Golemon
* Add new warnings for checking proper class __slots__:
`invalid-slots-object` and `invalid-slots`.
* Search for rc file in `~/.config/pylintrc` if `~/.pylintrc`
doesn't exists (#121)
* Don't register the newstyle checker w/ python >= 3
* Fix unused-import false positive w/ augment assignment (#78)
* Fix access-member-before-definition false negative wrt aug assign (#164)
* Do not attempt to analyze non python file, eg .so file (#122)
2015-04-05 17:59:54 +02:00
|
|
|
do-test:
|
py-pylint: updated to 2.0.0
Pylint 2.0:
* trailing-comma-tuple can be emitted for return statements as well.
* Fix a false positive inconsistent-return-statements message when exception is raised
inside an else statement.
* ImportFrom nodes correctly use the full name for the import sorting checks.
* [].extend and similar builtin operations don't emit dict-*-not-iterating with the Python 3 porting checker
* Add a check consider-using-dict-comprehension which is emitted if for dict initialization
the old style with list comprehensions is used.
* Add a check consider-using-set-comprehension which is emitted if for set initialization
the old style with list comprehensions is used.
* logging-not-lazy is emitted whenever pylint infers that a string is built with addition
* Add a check chained-comparison which is emitted if a boolean operation can be simplified
by chaining some of its operations.
e.g "a < b and b < c", can be simplified as "a < b < c".
* Add a check consider-using-in for comparisons of a variable against
multiple values with "==" and "or"s instead of checking if the variable
is contained "in" a tuple of those values.
* in is considered iterating context for some of the Python 3 porting checkers
* Add --ignore-none flag to control if pylint should warn about no-member where the owner is None
* Fix a false positive related to too-many-arguments and bounded __get__ methods
* mcs as the first parameter of metaclass's __new__ method was replaced by cls
* assignment-from-no-return considers methods as well.
* Support typing.TYPE_CHECKING for *unused-import* errors
* Inferred classes at a function level no longer emit invalid-name
when they don't respect the variable regular expression
* Added basic support for postponed evaluation of function annotations.
* Fix a bug with missing-kwoa and variadics parameters
* simplifiable-if-statement takes in account only when assigning to same targets
* Make len-as-condition test more cases, such as len() < 1 or len <= 0'
* Fix false-positive line-too-long message emission for
commented line at the end of a module
* Fix false-positive bad-continuation for with statements
* Don't warn about stop-iteration-return when using next() over itertools.count
* Add a check consider-using-get for unidiomatic usage of value/default-retrieval
for a key from a dictionary
* invalid-slice-index is not emitted when the slice is used as index for a complex object.
We only use a handful of known objects (list, set and friends) to figure out if
we should emit invalid-slice-index when the slice is used to subscript an object.
* Don't emit unused-import anymore for typing imports used in type comments.
* Add a new check 'useless-import-alias'.
* Add comparison-with-callable to warn for comparison with bare callable, without calling it.
* 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.
* Add --exit-zero option for continuous integration scripts to more
easily call Pylint in environments that abort when a program returns a
non-zero (error) status code.
* Warn if the first argument of an instance/ class method gets assigned
* New check comparison-with-itself to check comparison between same value.
* Add a new warning, 'logging-fstring-interpolation', emitted when f-string
is used within logging function calls.
* Don't show 'useless-super-delegation' if the subclass method has different type annotations.
* Add unhashable-dict-key check.
* Don't warn that a global variable is unused if it is defined by an import
* Skip wildcard import check for __init__.py.
* The Python 3 porting mode can now run with Python 3 as well.
* too-few-public-methods is not emitted for dataclasses.
* New verbose mode option, enabled with --verbose command line flag, to
display of extra non-checker-related output. It is disabled by default.
* undefined-loop-variable takes in consideration non-empty iterred objects before emitting
* Add support for numpydoc optional return value names.
* singleton-comparison accounts for negative checks
* Add a check consider-using-in for comparisons of a variable against
multiple values with "==" and "or"s instead of checking if the variable
is contained "in" a tuple of those values.
* defaultdict and subclasses of dict are now handled for dict-iter-* checks
* logging-format-interpolation also emits when f-strings are used instead of % syntax.
* Don't trigger misplaced-bare-raise when the raise is in a finally clause
* Add a new check, possibly-unused-variable.
This is similar to unused-variable, the only difference is that it is
emitted when we detect a locals() call in the scope of the unused variable.
The locals() call could potentially use the said variable, by consuming
all values that are present up to the point of the call. This new check
allows to disable this error when the user intentionally uses locals()
to consume everything.
* no-else-return accounts for multiple cases
The check was a bit overrestrictive because we were checking for
return nodes in the .orelse node. At that point though the if statement
can be refactored to not have the orelse. This improves the detection of
other cases, for instance it now detects TryExcept nodes that are part of
the .else branch.
* Added two new checks, invalid-envvar-value and invalid-envvar-default.
The former is trigger whenever pylint detects that environment variable manipulation
functions uses a different type than strings, while the latter is emitted whenever
the said functions are using a default variable of different type than expected.
* Add a check consider-using-join for concatenation of strings using str.join(sequence)
* Add a check consider-swap-variables for swapping variables with tuple unpacking
* Add new checker try-except-raise that warns the user if an except handler block
has a raise statement as its first operator. The warning is shown when there is
a bare raise statement, effectively re-raising the exception that was caught or the
type of the exception being raised is the same as the one being handled.
* Don't crash on invalid strings when checking for logging-format-interpolation
* Exempt __doc__ from triggering a redefined-builtin
__doc__ can be used to specify a docstring for a module without
passing it as a first-statement string.
* Fix false positive bad-whitespace from function arguments with default
values and annotations
* Fix stop-iteration-return false positive when next builtin has a
default value in a generator
* Fix emission of false positive no-member message for class with "private" attributes whose name is mangled.
* Fixed a crash which occurred when Uninferable wasn't properly handled in stop-iteration-return
* Use the proper node to get the name for redefined functions
* Don't crash when encountering bare raises while checking inconsistent returns
* Fix a false positive inconsistent-return-statements message when if statement is inside try/except.
* Fix a false positive inconsistent-return-statements message when while loop are used.
* Correct column number for whitespace conventions.
Previously the column was stuck at 0
* Fix unused-argument false positives with overshadowed variable in
dictionary comprehension.
* Fix false positive inconsistent-return-statements message when never
returning functions are used (i.e sys.exit for example).
* Fix error when checking if function is exception, as in bad-exception-context.
* Fix false positive inconsistent-return-statements message when a
function is defined under an if statement.
* New useless-return message when function or method ends with a "return" or
"return None" statement and this is the only return statement in the body.
* Fix false positive inconsistent-return-statements message by
avoiding useless exception inference if the exception is not handled.
* Fix bad thread instantiation check when target function is provided in args.
* Fixed false positive when a numpy Attributes section follows a Parameters
section
* Fix incorrect file path when file absolute path contains multiple path_strip_prefix strings.
* Fix false positive undefined-variable for lambda argument in class definitions
* Add of a new checker that warns the user if some messages are enabled or disabled
by id instead of symbol.
* Suppress false-positive not-callable messages from certain
staticmethod descriptors
* Fix indentation handling with tabs
* Fix false-positive bad-continuation error
* Fix false positive unused-variable in lambda default arguments
* Updated the default report format to include paths that can be clicked on in some terminals (e.g. iTerm).
* Fix inline def behavior with too-many-statements checker
* Fix KeyError raised when using docparams and NotImplementedError is documented.
* Fix 'method-hidden' raised when assigning to a property or data descriptor.
* Fix emitting useless-super-delegation when changing the default value of keyword arguments.
* Expand ignored-argument-names include starred arguments and keyword arguments
* Fix false-postive undefined-variable in nested lambda
* Fix false-positive bad-whitespace message for typing annoatations
with ellipses in them
2018-07-17 12:08:42 +02:00
|
|
|
cd ${WRKSRC} && pytest-${PYVERSSUFFIX}
|
Update to 1.4.3
Update DEPENDS
Add test target
Upstream changes:
2015-03-14 -- 1.4.3
* Remove three warnings: star-args, abstract-class-little-used,
abstract-class-not-used. These warnings don't add any real value
and they don't imply errors or problems in the code.
* Added a new option for controlling the peephole optimizer in astroid.
The option ``--optimize-ast`` will control the peephole optimizer,
which is used to optimize a couple of AST subtrees. The current problem
solved by the peephole optimizer is when multiple joined strings,
with the addition operator, are encountered. If the numbers of such
strings is high enough, Pylint will then fail with a maximum recursion
depth exceeded error, due to its visitor architecture. The peephole
just transforms such calls, if it can, into the final resulting string
and this exhibit a problem, because the visit_binop method stops being
called (in the optimized AST it will be a Const node).
2015-03-11 -- 1.4.2
* Don't require a docstring for empty modules. Closes issue #261.
* Fix a false positive with `too-few-format-args` string warning,
emitted when the string format contained a normal positional
argument ('{0}'), mixed with a positional argument which did
an attribute access ('{0.__class__}').
Closes issue #463.
* Take in account all the methods from the ancestors
when checking for too-few-public-methods. Closes issue #471.
* Catch enchant errors and emit 'invalid-characters-in-docstring'
when checking for spelling errors. Closes issue #469.
* Use all the inferred statements for the super-init-not-called
check. Closes issue #389.
* Add a new warning, 'unichr-builtin', emitted by the Python 3
porting checker, when the unichr builtin is found. Closes issue #472.
* Add a new warning, 'intern-builtin', emitted by the Python 3
porting checker, when the intern builtin is found. Closes issue #473.
* Add support for editable installations.
* The HTML output accepts the `--msg-template` option. Patch by
Dan Goldsmith.
* Add 'map-builtin-not-iterating' (replacing 'implicit-map-evaluation'),
'zip-builtin-not-iterating', 'range-builtin-not-iterating', and
'filter-builtin-not-iterating' which are emitted by `--py3k` when the
appropriate built-in is not used in an iterating context (semantics
taken from 2to3).
* Add a new warning, 'unidiomatic-typecheck', emitted when an explicit
typecheck uses type() instead of isinstance(). For example,
`type(x) == Y` instead of `isinstance(x, Y)`. Patch by Chris Rebert.
Closes issue #299.
* Add support for combining the Python 3 checker mode with the --jobs
flag (--py3k and --jobs). Closes issue #467.
* Add a new warning for the Python 3 porting checker, 'using-cmp-argument',
emitted when the `cmp` argument for the `list.sort` or `sorted builtin`
is encountered.
* Make the --py3k flag commutative with the -E flag. Also, this patch
fixes the leaks of error messages from the Python 3 checker when
the errors mode was activated. Closes issue #437.
2015-01-16 -- 1.4.1
* Look only in the current function's scope for bad-super-call.
Closes issue #403.
* Check the return of properties when checking for not-callable.
Closes issue #406.
* Warn about using the input() or round() built-ins for Python 3.
Closes issue #411.
* Proper abstract method lookup while checking for
abstract-class-instantiated. Closes issue #401.
* Use a mro traversal for finding abstract methods. Closes issue #415.
* Fix a false positive with catching-non-exception and tuples of
exceptions.
* Fix a false negative with raising-non-exception, when the raise used
an uninferrable exception context.
* Fix a false positive on Python 2 for raising-bad-type, when
raising tuples in the form 'raise (ZeroDivisionError, None)'.
* Fix a false positive with invalid-slots-objects, where the slot entry
was an unicode string on Python 2. Closes issue #421.
* Add a new warning, 'redundant-unittest-assert', emitted when using
unittest's methods assertTrue and assertFalse with constant value
as argument. Patch by Vlad Temian.
* Add a new JSON reporter, usable through -f flag.
* Add the method names for the 'signature-differs' and 'argument-differs'
warnings. Closes issue #433.
* Don't compile test files when installing.
* Fix a crash which occurred when using multiple jobs and the files
given as argument didn't exist at all.
2014-11-23 -- 1.4.0
* Added new options for controlling the loading of C extensions.
By default, only C extensions from the stdlib will be loaded
into the active Python interpreter for inspection, because they
can run arbitrary code on import. The option
`--extension-pkg-whitelist` can be used to specify modules
or packages that are safe to load.
* Change default max-line-length to 100 rather than 80
* Drop BaseRawChecker class which were only there for backward
compat for a while now
* Don't try to analyze string formatting with objects coming from
function arguments. Closes issue #373.
* Port source code to be Python 2/3 compatible. This drops the
need for 2to3, but does drop support for Python 2.5.
* Each message now comes with a confidence level attached, and
can be filtered base on this level. This allows to filter out
all messages that were emitted even though an inference failure
happened during checking.
* Improved presenting unused-import message. Closes issue #293.
* Add new checker for finding spelling errors. New messages:
wrong-spelling-in-comment, wrong-spelling-in-docstring.
New options: spelling-dict, spelling-ignore-words.
* Add new '-j' option for running checks in sub-processes.
* Added new checks for line endings if they are mixed (LF vs CRLF)
or if they are not as expected. New messages: mixed-line-endings,
unexpected-line-ending-format. New option: expected-line-ending-format.
* 'dangerous-default-value' no longer evaluates the value of the arguments,
which could result in long error messages or sensitive data being leaked.
Closes issue #282
* Fix a false positive with string formatting checker, when
encountering a string which uses only position-based arguments.
Closes issue #285.
* Fix a false positive with string formatting checker, when using
keyword argument packing. Closes issue #288.
* Proper handle class level scope for lambdas.
* Handle 'too-few-format-args' or 'too-many-format-args' for format
strings with both named and positional fields. Closes issue #286.
* Analyze only strings by the string format checker. Closes issue #287.
* Properly handle nested format string fields. Closes issue #294.
* Don't emit 'attribute-defined-outside-init' if the attribute
was set by a function call in a defining method. Closes issue #192.
* Properly handle unicode format strings for Python 2.
Closes issue #296.
* Don't emit 'import-error' if an import was protected by a try-except,
which excepted ImportError.
* Fix an 'unused-import' false positive, when the error was emitted
for all the members imported with 'from import' form.
Closes issue #304.
* Don't emit 'invalid-name' when assigning a name in an
ImportError handler. Closes issue #302.
* Don't count branches from nested functions.
* Fix a false positive with 'too-few-format-args', when the format
strings contains duplicate manual position arguments.
Closes issue #310.
* fixme regex handles comments without spaces after the hash.
Closes issue #311.
* Don't emit 'unused-import' when a special object is imported
(__all__, __doc__ etc.). Closes issue #309.
* Look in the metaclass, if defined, for members not found in the current
class. Closes issue #306.
* Don't emit 'protected-access' if the attribute is accessed using
a property defined at the class level.
* Detect calls of the parent's __init__, through a binded super() call.
* Check that a class has an explicitly defined metaclass before
emitting 'old-style-class' for Python 2.
* Emit 'catching-non-exception' for non-class nodes. Closes issue #303.
* Order of reporting is consistent.
* Add a new warning, 'boolean-datetime', emitted when an instance
of 'datetime.time' is used in a boolean context. Closes issue #239.
* Fix a crash which ocurred while checking for 'method-hidden',
when the parent frame was something different than a function.
* Generate html output for missing files. Closes issue #320.
* Fix a false positive with 'too-many-format-args', when the format
string contains mixed attribute access arguments and manual
fields. Closes issue #322.
* Extend the cases where 'undefined-variable' and 'used-before-assignment'
can be detected. Closes issue #291.
* Add support for customising callback identifiers, by adding a new
'--callbacks' command line option. Closes issue #326.
* Add a new warning, 'logging-format-interpolation', emitted when .format()
string interpolation is used within logging function calls.
* Don't emit 'unbalanced-tuple-unpacking' when the rhs of the assignment
is a variable length argument. Closes issue #329.
* Add a new warning, 'inherit-non-class', emitted when a class inherits
from something which is not a class. Closes issue #331.
* Fix another false positives with 'undefined-variable', where the variable
can be found as a class assignment and used in a function annotation.
Closes issue #342.
* Handle assignment of the string format method to a variable.
Closes issue #351.
* Support wheel packaging format for PyPi. Closes issue #334.
* Check that various built-ins that do not exist in Python 3 are not
used: apply, basestring, buffer, cmp, coerce, execfile, file, long
raw_input, reduce, StandardError, unicode, reload and xrange.
* Warn for magic methods which are not used in any way in Python 3:
__coerce__, __delslice__, __getslice__, __setslice__, __cmp__,
__oct__, __nonzero__ and __hex__.
* Don't emit 'assigning-non-slot' when the assignment is for a property.
Closes issue #359.
* Fix for regression: '{path}' was no longer accepted in '--msg-template'.
* Report the percentage of all messages, not just for errors and warnings.
Closes issue #319.
* 'too-many-public-methods' is reported only for methods defined in a class,
not in its ancestors. Closes issue #248.
* 'too-many-lines' disable pragma can be located on any line, not only the
first. Closes issue #321.
* Warn in Python 2 when an import statement is found without a
corresponding `from __future__ import absolute_import`.
* Warn in Python 2 when a non-floor division operation is found without
a corresponding `from __future__ import division`.
* Add a new option, 'exclude-protected', for excluding members
from the protected-access warning. Closes issue #48.
* Warn in Python 2 when using dict.iter*(), dict.view*(); none of these
methods are available in Python 3.
* Warn in Python 2 when calling an object's next() method; Python 3 uses
__next__() instead.
* Warn when assigning to __metaclass__ at a class scope; in Python 3 a
metaclass is specified as an argument to the 'class' statement.
* Warn when performing parameter tuple unpacking; it is not supported in
Python 3.
* 'abstract-class-instantiated' is also emitted for Python 2.
It was previously disabled.
* Add 'long-suffix' error, emitted when encountering the long suffix
on numbers.
* Add support for disabling a checker, by specifying an 'enabled'
attribute on the checker class.
* Add a new CLI option, --py3k, for enabling Python 3 porting mode. This
mode will disable all other checkers and will emit warnings and
errors for constructs which are invalid or removed in Python 3.
* Add 'old-octal-literal' to Python 3 porting checker, emitted when
encountering octals with the old syntax.
* Add 'implicit-map-evaluation' to Python 3 porting checker, emitted
when encountering the use of map builtin, without explicit evaluation.
2014-07-26 -- 1.3.0
* Allow hanging continued indentation for implicitly concatenated
strings. Closes issue #232.
* Pylint works under Python 2.5 again, and its test suite passes.
* Fix some false positives for the cellvar-from-loop warnings.
Closes issue #233.
* Return new astroid class nodes when the inferencer can detect that
that result of a function invocation on a type (like `type` or
`abc.ABCMeta`) is requested. Closes #205.
* Emit 'undefined-variable' for undefined names when using the
Python 3 `metaclass=` argument.
* Checkers respect priority now. Close issue #229.
* Fix a false positive regarding W0511. Closes issue #149.
* Fix unused-import false positive with Python 3 metaclasses (#143).
* Don't warn with 'bad-format-character' when encountering
the 'a' format on Python 3.
* Add multiple checks for PEP 3101 advanced string formatting:
'bad-format-string', 'missing-format-argument-key',
'unused-format-string-argument', 'format-combined-specification',
'missing-format-attribute' and 'invalid-format-index'.
* Issue broad-except and bare-except even if the number
of except handlers is different than 1. Fixes issue #113.
* Issue attribute-defined-outside-init for all cases, not just
for the last assignment. Closes issue #262.
* Emit 'not-callable' when calling properties. Closes issue #268.
* Fix a false positive with unbalanced iterable unpacking,
when encountering starred nodes. Closes issue #273.
* Add new checks, 'invalid-slice-index' and 'invalid-sequence-index'
for invalid sequence and slice indices.
* Add 'assigning-non-slot' warning, which detects assignments to
attributes not defined in slots.
* Don't emit 'no-name-in-module' for ignored modules.
Closes issue #223.
* Fix an 'unused-variable' false positive, where the variable is
assigned through an import. Closes issue #196.
* Definition order is considered for classes, function arguments
and annotations. Closes issue #257.
* Don't emit 'unused-variable' when assigning to a nonlocal.
Closes issue #275.
* Do not let ImportError propagate from the import checker, leading to crash
in some namespace package related cases. Closes issue #203.
* Don't emit 'pointless-string-statement' for attribute docstrings.
Closes issue #193.
* Use the proper mode for pickle when opening and writing the stats file.
Closes issue #148.
* Don't emit hidden-method message when the attribute has been
monkey-patched, you're on your own when you do that.
* Only emit attribute-defined-outside-init for definition within the same
module as the offended class, avoiding to mangle the output in some cases.
* Don't emit 'unnecessary-lambda' if the body of the lambda call contains
call chaining. Closes issue #243.
* Don't emit 'missing-docstring' when the actual docstring uses `.format`.
Closes issue #281.
2014-04-30 -- 1.2.1
* Restore the ability to specify the init-hook option via the
configuration file, which was accidentally broken in 1.2.0.
* Add a new warning [bad-continuation] for badly indentend continued
lines.
* Emit [assignment-from-none] when the function contains bare returns.
Fixes BitBucket issue #191.
* Added a new warning for closing over variables that are
defined in loops. Fixes Bitbucket issue #176.
* Do not warn about \u escapes in string literals when Unicode literals
are used for Python 2.*. Fixes BitBucket issue #151.
* Extend the checking for unbalanced-tuple-unpacking and
unpacking-non-sequence to instance attribute unpacking as well.
* Fix explicit checking of python script (1.2 regression, #219)
* Restore --init-hook, renamed accidentally into --init-hooks in 1.2.0
(#211)
* Add 'indexing-exception' warning, which detects that indexing
an exception occurs in Python 2 (behaviour removed in Python 3).
2014-04-18 -- 1.2.0
* Pass the current python paths to pylint process when invoked via
epylint. Fixes BitBucket issue #133.
* Add -i / --include-ids and -s / --symbols back as completely ignored
options. Fixes BitBucket issue #180.
* Extend the number of cases in which logging calls are detected. Fixes
bitbucket issue #182.
* Improve pragma handling to not detect pylint:* strings in non-comments.
Fixes BitBucket issue #79.
* Do not crash with UnknownMessage if an unknown message ID/name appears
in disable or enable in the configuration. Patch by Cole Robinson.
Fixes bitbucket issue #170.
* Add new warning 'eval-used', checking that the builtin function `eval`
was used.
* Make it possible to show a naming hint for invalid name by setting
include-naming-hint. Also make the naming hints configurable. Fixes
BitBucket issue #138.
* Added support for enforcing multiple, but consistent name styles for
different name types inside a single module; based on a patch written
by morbo@google.com.
* Also warn about empty docstrings on overridden methods; contributed
by sebastianu@google.com.
* Also inspect arguments to constructor calls, and emit relevant
warnings; contributed by sebastianu@google.com.
* Added a new configuration option logging-modules to make the list
of module names that can be checked for 'logging-not-lazy' et. al.
configurable; contributed by morbo@google.com.
* ensure init-hooks is evaluated before other options, notably load-plugins
(#166)
* Python 2.5 support restored: fixed small issues preventing pylint to run
on python 2.5. Bitbucket issues #50 and #62.
* bitbucket #128: pylint doesn't crash when looking
for used-before-assignment in context manager
assignments.
* Add new warning, 'bad-reversed-sequence', for checking that the
reversed() builtin receive a sequence (implements __getitem__ and __len__,
without being a dict or a dict subclass) or an instance which implements
__reversed__.
* Mark `file` as a bad function when using python2 (closes #8).
* Add new warning 'bad-exception-context', checking
that `raise ... from ...` uses a proper exception context
(None or an exception).
* Enhance the check for 'used-before-assignment' to look
for 'nonlocal' uses.
* Emit 'undefined-all-variable' if a package's __all__
variable contains a missing submodule (closes #126).
* Add a new warning 'abstract-class-instantiated' for checking
that abstract classes created with `abc` module and
with abstract methods are instantied.
* Do not warn about 'return-arg-in-generator' in Python 3.3+.
* Do not warn about 'abstract-method' when the abstract method
is implemented through assignment (#155).
* Improve cyclic import detection in the case of packages, patch by Buck
Golemon
* Add new warnings for checking proper class __slots__:
`invalid-slots-object` and `invalid-slots`.
* Search for rc file in `~/.config/pylintrc` if `~/.pylintrc`
doesn't exists (#121)
* Don't register the newstyle checker w/ python >= 3
* Fix unused-import false positive w/ augment assignment (#78)
* Fix access-member-before-definition false negative wrt aug assign (#164)
* Do not attempt to analyze non python file, eg .so file (#122)
2015-04-05 17:59:54 +02:00
|
|
|
|
2014-03-12 02:26:03 +01:00
|
|
|
.include "../../lang/python/application.mk"
|
|
|
|
.include "../../lang/python/egg.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|