./devel/py-pylint, Python source code analyzer

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.1.1, Package name: py37-pylint-2.1.1, Maintainer: pkgsrc-users

Pylint is a Python source code analyzer which looks for programming
errors, helps enforcing a coding standard and sniffs for some code
smells (as defined in Martin Fowler's Refactoring book).
Pylint can be seen as another PyChecker since nearly all tests you
can do with PyChecker can also be done with Pylint. However, Pylint
offers some more features, like checking length of lines of code,
checking if variable names are well-formed according to your coding
standard, or checking if declared interfaces are truly implemented,
and much more. . Additionally, it is possible to write plugins to
add your own checks.


Required to run:
[devel/py-setuptools] [devel/py-astroid] [devel/py-mccabe] [devel/py-isort] [lang/python37]

Required to build:
[pkgtools/cwrappers] [devel/py-test-runner]

Master sites:

SHA1: a3612d88b9f21a7134c12379a9243f73438897fd
RMD160: 8caa95cd011b974fb0e450bc2f92ce6adbfa3736
Filesize: 542.744 KB

Version history: (Expand)


CVS history: (Expand)


   2018-08-06 21:58:41 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pylint: updated to 2.1.1

What's New in Pylint 2.1.1?
* fix pylint crash due to misplaced-format-function not correctly handling class \ 
attribute.
   2018-08-02 17:19:23 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-pylint: updated to 2.1.0

What's New in Pylint 2.1?

   * trailing-comma-tuple gets emitted for yield statements as well.

   * Get only the arguments of the scope function for redefined-argument-from-local

   * Add a check misplaced-format-function which is emitted if format function \ 
is used on
     non str object.

   * chain.from_iterable no longer emits dict-{}-not-iterating when dealing with \ 
dict values and keys

   * Demote the try-except-raise message from an error to a warning (E0705 -> \ 
W0706)

   * Correctly handle the new name of the Python implementation of the abc module.

    * Modules with __getattr__ are exempted by default from no-member

      There's no easy way to figure out if a module has a particular member when
      the said module uses __getattr__, which is a new addition to Python 3.7.
      Instead we assume the safe thing to do, in the same way we do for classes,
      and skip those modules from checking.

    * Fix a false positive invalid name message when method or attribute name is \ 
longer then 30 characters.

    * Include the type of the next branch in no-else-return

    * Fix inconsistent behaviour for bad-continuation on first line of file

     * Fix not being able to disable certain messages on the last line through
       the global disable option

    * Don't emit useless-return when we have a single statement that is the \ 
return itself

      We still want to be explicit when a function is supposed to return
      an optional value; even though pass could still work, it's not explicit
      enough and the function might look like it's missing an implementation.

   * Fix false-positive undefined-variable for self referential class name in lamdbas

    * Don't crash when pylint is unable to infer the value of an argument to next()

    * Don't emit not-an-iterable when dealing with async iterators.

      But do emit it when using the usual iteration protocol against
      async iterators.

   * Can specify a default docstring type for when the check cannot guess the type
   2018-07-24 08:15:31 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pylint: updated to 2.0.1

2.0.1:
Don't crash when pylint is unable to infer the value of an argument to next()
   2018-07-17 12:08:42 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
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-06-07 08:44:02 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pylint: updated to 1.9.2

Pylint 1.9.2:
* Fix `KeyError` raised when using docparams and NotImplementedError is documented.

* Don't include excepthandlers that don't have a name when looking for \ 
exception-escape

* Rewrite the comprehension-escape and exception-escape to work only on the \ 
corresponding nodes

These two checks were implemented in terms of visit_namne, that is, for every \ 
name in the tree,
we looked to see if that name leaked. This was resulting in a couple of false \ 
positives
and also in a performance issue, since we were calling nodes_of_class() and \ 
scope() for each
name node. Instead, this approach uses the visit methods for exception and \ 
comprehension nodes
and looks to see from there if the current scope uses leaked names.
This is not the ideal situation as well, ideal would be to have access to the \ 
definition
frame of each name, but that requires some extra engineering effort in astroid \ 
to get it right.

* builtins is allowed to redefine builtins.
   2018-05-17 12:35:32 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pylint: updated to 1.9.1

Pylint 1.9.1:
* Fixed old-raise-syntax always erroring in Python 3.
   2018-05-16 08:59:22 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-pylint: updated to 1.9.0

1.9.0:
* Added two new Python 3 porting checks, exception-escape and comprehension-escape
* Added a new deprecated-sys-function, emitted when accessing removed sys members.
* Added xreadlines-attribute, emitted when the xreadlines() attribute is accessed.
* The Python 3 porting mode can now run with Python 3 as well.
* docparams extension allows abstract methods to document what overriding
  implementations should return, and to raise NotImplementedError without
  documenting it.
* Special methods do not count towards too-few-methods,
  and are considered part of the public API.
* Enum classes do not trigger too-few-methods
* undefined-loop-variable takes in consideration non-empty iterred objects \ 
before emitting
* Add support for nupmydoc 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
* Added a new Python 2/3 check for accessing operator.div, which is removed in \ 
Python 3
* Added a new Python 2/3 check for accessing removed urllib functions
* 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.
* no-else-return accounts for multiple cases
* Added two new checks, invalid-envvar-value and invalid-envvar-default.
* 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.
* 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
* Updated the default report format to include paths that can be clicked on in \ 
some terminals (e.g. iTerm).
   2018-04-06 14:13:15 by Adam Ciarcinski | Files touched by this commit (1)
Log message:
py-pylint: require newer py-astroid