| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The result is usually static, but we're hitting this function quite
a lot for big projects such as pandas. This change is a matter of compromising
between the amount of memory astroid needs for analysis (e.g. storing the
results in memory) vs the wasted CPU time in calling the same
function over and over.
|
| |
|
| |
|
|
|
| |
See https://github.com/PyCQA/pylint/pull/2209
|
|
|
|
| |
This allows consolidating all the empty get_children methods.
|
| |
|
|
|
|
|
|
|
|
| |
`_multi_line_block_fields` is a list of strings indicating which
fields contain multi-line blocks. `_get_multi_line_blocks` dynamically
accesses these attributes the first time it is called and then caches
the resulting references so as to avoid repeated expensive attribute
lookups.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some of the messages were disabled in pylintrc, since they're not
very useful for our case. Other parameters, such as the number of
arguments / statements / attributes etc were configured so that they
won't be too restrictive for our codebase, since making the code
to respect them right now requires too much development changes,
which is not justified by the end result.
Closes issue #284.
|
|
|
|
|
|
|
|
| |
They are subclasses of AstroidBuildingException and are raised when
a module can't be imported from various reasons.
Also do_import_module lets the errors to bubble up without converting
them to InferenceError. This particular conversion happens only
during the inference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Major changes:
* AstroidError has an __init__ that accepts arbitrary keyword-only
arguments for adding information to exceptions, and a __str__ that
lazily uses exception attributes to generate a message. The first
positional argument to an exception is assigned to .message. The new
API should be fully backwards compatible in general.
* Some exceptions are combined or renamed; the old names are still
available.
* The OperationErrors used by pylint are now BadOperationMessages and
located in util.py.
* The AstroidBuildingException in _data_build stores the SyntaxError
in its .error attribute rather than args[0].
* Many places where exceptions are raised have new, hopefully more
useful error messages.
The only major issue remaining is how to propagate information into decorators.
|
| |
|
| |
|
|
|
|
| |
deprecated method should be warned upon.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The cleanup consisted in a couple of changes:
* import only modules, not objects, in order
to not clutter the module namespace and to not
leak accidentally objects which aren't public API
for the said modules.
* use two spaces between module level functions
* move some mixins from astroid.node_classes in
the proper order, starting at the left,
not being last in the MRO.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This also implements an easier @cache decorator and removes @classproperty as
it only was used in an insignificant test.
--HG--
branch : no-logilab-common
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
than 1.
This has the side effect that using `from .something import something`
in a non-package will finally result in an import-error on Pylint's side.
Until now relative_only was ignored, leading to the import of `something`,
if it was globally available.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Added aliases for inferred() and assign_type(), refactor some uses of
ternary if, remove some now-unused internal functions in rebuilder,
replaced the mutating docstring function with one that returns values
as well as side-effects, change back to lazy-object-proxy, and add keyword
args to the Module call in rebuilder.
|
|/ |
|
|
|
|
| |
do_import_module call.
|
|
python setup.py develop now works.
|