| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
| |
Close PyCQA/pylint#3209
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Close PyCQA/pylint#3414
|
| |
|
| |
Close PyCQA/pylint#3417
|
| |
|
| |
Closes PyCQA/astroid#755
|
| | |
|
| |
|
|
|
|
|
| |
This fixes PyCQA/pylint#3332. The bug was due to the fact that datetime64 class
inherited from generic one and in this last class the astype method was returning
uninferable. Now it returns ndarray object.
This fix should be generalized to all other methods of the generic class as the numpy doc specifies that the generic object API should be the same as the ndarray one.
|
| |
|
|
| |
Closes PyCQA/pylint#3365
|
| | |
|
| |
|
| |
Close PyCQA/pylint#3322
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
statement
In 19b5af02304e3339fdd2a26cfafc337960eeebce we added a check for `AugAssign` nodes
when inferring `Assign` values. Unfortunately the `infer_assign` function was also
used by `infer_assignname`, which meant that when trying to infer an `AssignName` node,
we were inferring its value as the result of the `AugAssign` inference, leading
to spurious false positives.
Close PyCQA/pylint#2911
Close PyCQA/pylint#3214
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
node is an astroid.Name instance
The problem was that astroid could not infer the result of a call to `numpy.append`
because this function calls the `concatenate` function.
This last function is inferred thanks to the `brain_numpy_core_multiarray` module
but only when the corresponding node is an `astroid.Attribute` (for example numpy.concatenate).
It turns out that in the source of the append function the node that realises the call to concatenate is a `astroid.Name`. Thus the correction proposed here is to register
the concatenate inference tip function in order to apply it, also, to `astroid.Name`.
Close #666
|
| |
|
|
|
|
|
|
| |
The bug PyCQA/pylint#3319 was caused due to a missing function, named float_power inside the brain_numpy_core_umath module. This brain is used to infer all the numpy's ufunc functions. The problem is that in the website documentation of numpy, in the section that list all those functions, there is not entry dealing with the float_power function.
Also adds 5 missing functions detected by @texadactyl
Closes PyCQA/pylint#3319
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Closes PyCQA/pylint#3208
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As of now, the transformation of builtin containers which
members, in turn, are containers relies on `safe_infer`
helper. `safe_infer` tries to infer the node to get its
values. Doing this without a cache containing a previously
inferred nodes lead to infinite recursion, for example, on
resolving a class attribute.
Note: this doesn't help to infer a class attribute by itself
is such a case, but prevents crash.
Closes: https://github.com/PyCQA/pylint/issues/3245
Signed-off-by: Stanislav Levin <slev@altlinux.org>
|
| | |
|
| | |
|
| |
|
|
| |
Close PyCQA/pylint#3296
|
| | |
|
| |
|
|
|
|
|
| |
Because ``Const.itered`` was not returning proper nodes, pylint was failing
when trying to infer objects created from those nodes.
Close PyCQA/pylint#3306
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes https://github.com/PyCQA/pylint/issues/3274.
Prior to Python 3.7, StopIteration errors bubbled up through generators,
so this wasn't an issue for astroid because the StopIteration error was
handled later. Now StopIteration errors are converted to RuntimeErrors
[1],
so the same error handling doesn't work.
[1]: https://www.python.org/dev/peps/pep-0479/
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
uninferable.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
ufunc functions are now instances of FakeUfunc class and that the call
to these functions implies the use of __call__ protocol.
|
| | |
|
| |
|
|
| |
behavior of ufunc numpy objects
|
| | |
|
| |
|
|
|
| |
These new capabilities will allow inferring both the `property` builtin
as well as property attributes such as `.deleter` and `.setter`.
|
| |
|
|
|
| |
Ignoring all special methods while inspecting gi classes leads to pylint
not detecting that objects are e.g. iterable or subscriptable
|
| | |
|
| |
|
|
|
|
|
|
| |
It is possible for a module to use comments that might be interpreted
as type comments by the `ast` library. We do not want to completely crash on those
invalid type comments.
Close #708
|
| |
|
| |
When profiling locally, approximately 7% of a full pylint run is spent in `os.getcwd`, despite its value effectively not being used if `context_file` is `None`. A quick grep over this project and others seem to indicate that `context_file` is rarely used, so this should almost entirely get rid of this system call.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
classes
When inferring instances of classes from arguments, such as ``self``
in a bound method, we could use as a hint the context's ``boundnode``,
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 the ``self`` to point to it instead of pointing
to the parent class.
Close PyCQA/pylint#3157
|