v2.10.0
-
Fixed inference of
selfin binary operations in whichself
is part of a list or tuple.Closes pylint-dev/pylint#4826
-
Fixed builtin inference on
propertycalls not calling thepostinitof the new node, which
resulted in instance arguments missing on these nodes. -
Fixed a crash on
Super.getattrwhen the attribute was previously uninferable due to a cache
limit size. This limit can be hit when the inheritance pattern of a class (and therefore of the
__init__attribute) is very large.Closes pylint-dev/pylint#5679
-
Include names of keyword-only arguments in
astroid.scoped_nodes.Lambda.argnames.Closes pylint-dev/pylint#5771
-
Fixed a crash inferring on a
NewTypenamed with an f-string.Closes pylint-dev/pylint#5770
-
Add support for attrs v21.3.0 which
added a newattrsmodule alongside the existingattr.Closes #1330
-
Use the
end_linenoattribute for theNodeNG.tolinenoproperty
when it is available.Closes #1350
-
Add
is_dataclassattribute toClassDefnodes. -
Use
sysconfiginstead ofdistutilsto determine the location of
python stdlib files and packages.Related pull requests: #1322, #1323, #1324
Closes #1282
Ref #1103 -
Fixed crash with recursion error for inference of class attributes that referenced
the class itself.Closes pylint-dev/pylint#5408
-
Fixed crash when trying to infer
items()on the__dict__
attribute of an imported module.Closes #1085
-
Add optional
NodeNG.positionattribute.
Used for block nodes to highlight position of keyword(s) and name
in cases where the AST doesn't provide good enough positional information.
E.g.nodes.ClassDef,nodes.FunctionDef. -
Fix
ClassDef.fromlineno. For Python < 3.8 thelinenoattribute includes decorators.
fromlinenoshould return the line of theclassstatement itself. -
Performance improvements. Only run expensive decorator functions when
non-default Deprecation warnings are enabled, eg. during a Pytest run.Closes #1383