summaryrefslogtreecommitdiff
path: root/astroid/arguments.py
Commit message (Collapse)AuthorAgeFilesLines
* New copyright noticeshippo912020-12-271-0/+1
|
* Fix incorrect error message formattingClaudiu Popa2020-12-261-1/+1
|
* When inferring argument takes into account possible posonyargs before ↵hippo912020-11-221-1/+1
| | | | raising 'too many positional arguments'
* Add missing copyright annotations for the past releasesClaudiu Popa2020-04-271-1/+1
|
* Pass a context argument to ``astroid.Arguments`` to prevent recursion errorsClaudiu Popa2020-03-021-13/+28
| | | | Close PyCQA/pylint#3414
* Add support for inferring exception instances in all contextsClaudiu Popa2019-11-171-1/+1
| | | | | | | | | | | We were able to infer exception instances as ``ExceptionInstance`` only for a handful of cases, but not all. ``ExceptionInstance`` has support for better inference of `.args` and other exception related attributes that normal instances do not have. This additional support should remove certain false positives related to ``.args`` and other exception attributes in ``pylint``. Close PyCQA/pylint#2333
* Initial formatting of astroidClaudiu Popa2018-10-021-38/+62
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-2/+5
|
* Fix inference for nested callsBryce Guinta2018-07-051-3/+7
| | | | | | | | | Add context_lookup to the context class as extra_context. Deliver the correct context with the correct boundnode for function argument nodes. Close #177
* Fix useless-object-inheritance lint error (#573)Nick Drozd2018-06-281-1/+1
| | | See https://github.com/PyCQA/pylint/pull/2209
* Fix lintingClaudiu Popa2018-06-141-1/+1
|
* Remove useless TODOs that are either issues in the issue tracker or things ↵Claudiu Popa2018-06-121-1/+1
| | | | which we'll never get to fix/change
* Replace some for statements with yield fromClaudiu Popa2018-05-311-1/+0
|
* Remove six from a couple of filesClaudiu Popa2018-05-311-3/+1
|
* pyupgrade (#549)Anthony Sottile2018-05-221-1/+1
|
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+3
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* Convert all files to new license headerCeridwen2016-05-161-17/+3
|
* Cleanup pylint's warnings over astroid codebaseClaudiu Popa2015-12-141-1/+2
| | | | | | | | | | 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.
* Merge upstream changesCeridwen2015-11-061-1/+11
|\
| * Merge upstreamCeridwen2015-11-061-0/+10
| |\
| | * Fix pylint warnings.Claudiu Popa2015-11-041-2/+2
| | |
| | * Fix some inconsistencies with accessing the first argument of methodsClaudiu Popa2015-10-311-0/+10
| | | | | | | | | | | | | | | If the current class is a metaclass (inherits from `type`), then the first argument is always a class, not an instance.
| * | Rename Uninferable and instantiate_class, fix broken tests, improveCeridwen2015-11-061-12/+12
| |/ | | | | | | | | | | | | | | | | | | | | testing. * Rename YES to Uninferable * Rename instanciate_class to instantiate_class. * Use six in test_namedtuple_advanced_inference. * Fix test_file_from_module failure on PyPy. * Add enum34 to unittest_brain. * Add unittest_brain dependencies tox.ini.
* | Rename Uninferable and instatiate_classCeridwen2015-11-061-12/+12
| |
* | This bookmark adds structured exceptions to astroid.Ceridwen2015-11-021-6/+33
|/ | | | | | | | | | | | | | | | | | | 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.
* Make duplicated_kwargs a public API.Claudiu Popa2015-10-081-4/+3
|
* Change arguments.ArgumentsInference to arguments.CallSiteClaudiu Popa2015-10-071-26/+64
| | | | | | This new class can be used to obtain the already unpacked arguments and keyword arguments that a call site uses, which is especially useful when some of arguments are packed into Starred nodes.
* Change the signature of the ArgumentInference class to accept directly the ↵Claudiu Popa2015-10-071-7/+7
| | | | arguments and the keywords of a call site.
* Improve the understanding of argumentsClaudiu Popa2015-09-091-0/+193
This changeset introduces a better way to understand arguments passed into call sites. The original logic was moved from astroid.context.CallContext, which become only a container for arguments and keyword arguments, to astroid.arguments.ArgumentInferator, a new class for understanding arguments.