Releases: pylint-dev/astroid
astroid-2.5.5: Fix discord server invitation
- Fixes the discord link in the project urls of the package.
Closes pylint-dev/pylint#4393
astroid-2.5.4
-
The packaging is now done via setuptools exclusively.
doc,tests, andChangelogare
not packaged anymore - reducing the size of the package greatly. -
Debian packaging is now (officially) done in https://salsa.debian.org/python-team/packages/astroid.
-
__pkginfo__now only contain__version__(also accessible withastroid.__version__),
other meta-information are still accessible withimport importlib;metadata.metadata('astroid'). -
Added inference tip for
typing.Tuplealias -
Fix crash when evaluating
typing.NamedTupleCloses pylint-dev/pylint#4383
-
COPYING was removed in favor of COPYING.LESSER and the latter was renamed to LICENSE to make more apparent
that the code is licensed under LGPLv2 or later. -
Moved from appveyor and travis to Github Actions for continuous integration.
astroid-2.5.3
-
Takes into account the fact that subscript inferring for a ClassDef may involve class_getitem method
-
Reworks the
collectionsandtypingbrain so that pylint`s acceptance tests are fine.Closes pylint-dev/pylint#4206
-
Use
inference_tipfortyping.TypedDictbrain. -
Fix mro for classes that inherit from typing.Generic
-
Add inference tip for typing.Generic and typing.Annotated with
__class_getitem__Closes pylint-dev/pylint#2822
astroid-2.5.2
-
Detects
import numpyas a validnumpyimport.Closes pylint-dev/pylint#3974
-
Iterate over
Keywordswhen usingClassDef.get_childrenCloses pylint-dev/pylint#3202
astroid-2.5.1
-
The
context.pathis reverted to a set because otherwise it leads to false positives
for nonnumpyfunctions. -
Don't transform dataclass ClassVars
-
Improve typing.TypedDict inference
-
Fix the
Duplicates found in MROsfalse positive.Closes #905
Closes pylint-dev/pylint#2717
Closes pylint-dev/pylint#3247
Closes pylint-dev/pylint#4093
Closes pylint-dev/pylint#4131
Closes pylint-dev/pylint#4145
astroid 2.5
-
Adds
attr_fsetin thePropertyModelclass.Fixes pylint-dev/pylint#3480
-
Remove support for Python 3.5.
-
Remove the runtime dependency on
six. Thesixbrain remains in
astroid.Fixes #863
-
Enrich the
brain_collectionmodule so that__class_getitem__method is added todequefor
pythonversion above 3.9. -
The
context.pathis now adictand thecontext.pushmethod
returnsTrueif the node has been visited a certain amount of times.Close #669
-
Adds a brain for type object so that it is possible to write
type[int]in annotation.Fixes pylint-dev/pylint#4001
-
Add
__class_getitem__method tosubprocess.Popenbrain under Python 3.9 so that it is seen as subscriptable by pylint.Fixes pylint-dev/pylint#4034
-
Adds
degrees,radians, which arenumpy ufuncfunctions, in thenumpybrain. Addsrandomfunction in thenumpy.randombrain.Fixes pylint-dev/pylint#3856
-
Fix deprecated importlib methods
Closes #703
-
Fix a crash in inference caused by
Uninferablecontainer elementsClose #866
-
Add
python 3.9support. -
The flat attribute of
numpy.ndarrayis now inferred as annumpy.ndarrayitself.
It should be anumpy.flatiterinstance, but this class is not yet available in the numpy brain.Fixes pylint-dev/pylint#3640
-
Fix a bug for dunder methods inference of function objects
Fixes #819
-
Fixes a bug in the signature of the
ndarray.__or__method,
in thebrain_numpy_ndarray.pymodule.Fixes #815
-
Fixes a to-list cast bug in
starred_assigned_stmtsmethod,
in the ``protocols.py` module. -
Added a brain for
hypothesis.strategies.composite -
The transpose of a
numpy.ndarrayis also anumpy.ndarrayFixes pylint-dev/pylint#3387
-
Added a brain for
sqlalchemy.orm.session -
Separate string and bytes classes patching
Fixes pylint-dev/pylint#3599
-
Prevent recursion error for self referential length calls
Close #777
-
Added missing methods to the brain for
mechanize, to fix pylint false positivesClose #793
-
Added more supported parameters to
subprocess.check_output -
Fix recursion errors with pandas
Fixes pylint-dev/pylint#2843
Fixes pylint-dev/pylint#2811 -
Added exception inference for
UnicodeDecodeErrorClose pylint-dev/pylint#3639
-
FunctionDef.is_generatorproperly handlesyieldnodes inIftestsClose pylint-dev/pylint#3583
-
Fixed exception-chaining error messages.
-
Fix failure to infer base class type with multiple inheritance and qualified names
Fixes #843
-
Fix interpretation of
six.with_metaclassclass definitions.Fixes #713
-
Reduce memory usage of astroid's module cache.
-
Remove dependency on
imp. -
Do not crash when encountering starred assignments in enums.
Close #835
-
Fix a crash in functools.partial inference when the arguments cannot be determined
Close pylint-dev/pylint#3776
-
Fix a crash caused by a lookup of a monkey-patched method
Close pylint-dev/pylint#3686
-
is_generatorcorrectly considersYieldnodes inAugAssignnodesThis fixes a false positive with the
assignment-from-no-returnpylint check.Close pylint-dev/pylint#3904
-
Corrected the parent of function type comment nodes.
These nodes used to be parented to their original ast.FunctionDef parent
but are now correctly parented to their astroid.FunctionDef parent.Close #851
astroid-2.4.2
-
FunctionDef.is_generatorproperly handlesyieldnodes inWhiletestsClose pylint-dev/pylint#3519
-
Properly construct the arguments of infered property descriptors
Close pylint-dev/pylint#3648
astroid-2.4.1
-
Handle the case where the raw builder fails to retrieve the
__all__attributeClose #772
-
Restructure the AST parsing heuristic to always pick the same module
Close pylint-dev/pylint#3540
Close #773 -
Changed setup.py to work with distlib
Close #779
-
Do not crash with SyntaxError when parsing namedtuples with invalid label
Close pylint-dev/pylint#3549
-
Protect against
infer_call_resultfailing withInferenceErrorinSuper.getattr()Close pylint-dev/pylint#3529
astroid 2.4.0
Release Date: 2020-04-27
-
Expose a ast_from_string method in AstroidManager, which will accept
source code as a string and return the corresponding astroid objectCloses #725
-
BoundMethod.implicit_parametersreturns a proper value for__new__Close pylint-dev/pylint#2335
-
Allow slots added dynamically to a class to still be inferred
Close pylint-dev/pylint#2334
-
Allow
FunctionDef.getattrto look into both instance attrs and special attributesClose pylint-dev/pylint#1078
-
Infer qualified
classmethodas a classmethod.Close pylint-dev/pylint#3417
-
Prevent a recursion error to happen when inferring the declared metaclass of a class
Close #749
-
Raise
AttributeInferenceErrorwhengetattr()receives an empty nameClose pylint-dev/pylint#2991
-
Prevent a recursion error for self reference variables and
type()calls.Close #199
-
Do not infer the first argument of a staticmethod in a metaclass as the class itself
Close pylint-dev/pylint#3032
-
NodeNG.bool_value()gained an optionalcontextparameterWe need to pass an inference context downstream when inferring the boolean
value of a node in order to prevent recursion errors and double inference.This fix prevents a recursion error with dask library.
Close pylint-dev/pylint#2985
-
Pass a context argument to
astroid.Argumentsto prevent recursion errorsClose pylint-dev/pylint#3414
-
Better inference of class and static methods decorated with custom methods
Close pylint-dev/pylint#3209
-
Reverse the order of decorators for
infer_subscriptpath_wrapperneeds to come first, followed byraise_if_nothing_inferred,
otherwise we won't handleStopIterationcorrectly.Close #762
-
Prevent a recursion error when inferring self-referential variables without definition
Close pylint-dev/pylint#1285
-
Numpy
datetime64.astypereturn value is inferred as andarray.Close pylint-dev/pylint#3332
-
Skip non
AssignandAnnAssignnodes from enum reinterpretationCloses pylint-dev/pylint#3365
-
Numpy
ndarrayattributesimagandrealare now inferred asndarray.Close pylint-dev/pylint#3322
-
Added a call to
register_transformfor all functions of thebrain_numpy_core_multiarray
module in case the current node is an instance ofastroid.NameClose #666
-
Use the parent of the node when inferring aug assign nodes instead of the statement
Close pylint-dev/pylint#2911
Close pylint-dev/pylint#3214 -
Added some functions to the
brain_numpy_core_umathmoduleClose pylint-dev/pylint#3319
-
Added some functions of the
numpy.core.multiarraymoduleClose pylint-dev/pylint#3208
-
All the
numpy ufuncfunctions derived now from a common class that
implements the specificreduce,accumulate,reduceat,
outerandatmethods.Close pylint-dev/pylint#2885
-
nodes.Const.iteredreturns a list ofConstnodes, not stringsClose pylint-dev/pylint#3306
-
The
shapeattribute of anumpy ndarrayis now andarrayClose pylint-dev/pylint#3139
-
Don't ignore special methods when inspecting gi classes
Close #728
-
Added transform for
scipy.gaussian -
Add suport for inferring properties.
-
Added a brain for
responses -
Allow inferring positional only arguments.
-
Retry parsing a module that has invalid type comments
It is possible for a module to use comments that might be interpreted
as type comments by theastlibrary. We do not want to completely crash on those
invalid type comments.Close #708
-
Scope the inference to the current bound node when inferring instances of classes
When inferring instances of classes from arguments, such as
self
in a bound method, we could use as a hint the context'sboundnode,
which indicates the instance from which the inference originated.
As an example, a subclass that uses a parent's method which returns
self, will override theselfto point to it instead of pointing
to the parent class.Close pylint-dev/pylint#3157
-
Add support for inferring exception instances in all contexts
We were able to infer exception instances as
ExceptionInstance
only for a handful of cases, but not all.ExceptionInstancehas
support for better inference of.argsand other exception related
attributes that normal instances do not have.
This additional support should remove certain false positives related
to.argsand other exception attributes inpylint.Close pylint-dev/pylint#2333
-
Add more supported parameters to
subprocess.check_outputClose #722
-
Infer args unpacking of
selfCertain stdlib modules use
*argsto encapsulate
theselfparameter, which results in uninferable
instances given we rely on the presence of theself
argument to figure out the instance where we should be
setting attributes.Close pylint-dev/pylint#3216
-
Clean up setup.py
Make pytest-runner a requirement only if running tests, similar to what was
done with McCabe.Clean up the setup.py file, resolving a handful of minor warnings with it.
-
Handle StopIteration error in infer_int.
Close pylint-dev/pylint#3274
-
Can access per argument type comments for positional only and keyword only arguments.
The comments are accessed through through the new
Arguments.type_comment_posonlyargsand
Arguments.type_comment_kwonlyargsattributes respectively. -
Relax upper bound on
wraptClose #755
-
Properly analyze CFFI compiled extensions.
astroid 2.3.2
-
All type comments have as parent the corresponding
astroidnodeUntil now they had as parent the builtin
astnode which meant
we were operating with primitive objects instead of our own.Close pylint-dev/pylint#3174
-
Pass an inference context to
metaclass()when inferring an object typeThis should prevent a bunch of recursion errors happening in pylint.
Also refactor the inference ofIfExpnodes to use separate contexts
for each potential branch.Close pylint-dev/pylint#3152
Close pylint-dev/pylint#3159