summaryrefslogtreecommitdiff
path: root/astroid/exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* Broaden annotations that are too narrowDaniël van Noord2023-05-011-4/+4
|
* Fix ``infer_argument`` partiallyDaniël van Noord2023-04-301-1/+1
|
* Expand typing on some exceptionsDaniël van Noord2023-04-221-3/+3
|
* Expand signature of ``InferenceError``Daniël van Noord2023-04-031-4/+5
|
* [PyCQA migration] Upgrade links to the repositories in code and docPierre Sassoulas2023-03-291-2/+2
|
* Some modifications for pep237 with pydocstringformatter (#1792)Pierre Sassoulas2023-01-091-3/+4
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Initial pass with ``pydocstringformatter``Daniël van Noord2023-01-091-12/+13
|
* Finish typing of ``astroid.builder.py`` (#1807)Daniël van Noord2022-09-221-1/+1
|
* Finish typing of ``astroid.manager.py`` (#1806)Daniël van Noord2022-09-211-1/+1
|
* Make the potential attributes of all exceptions explicitDaniël van Noord2022-07-101-34/+166
|
* Fix ``pylint`` issues and remove useless disablesDaniël van Noord2022-07-061-3/+0
|
* Update typing for Python 3.7 (1) (#1555)Marc Mueller2022-05-131-2/+5
|
* Simplify hard to maintain copyright notice (#1441)Pierre Sassoulas2022-03-121-12/+1
| | | | | | | | | | | | | | * Simplify hard to maintain copyright notice git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names. * Add a pre-commit hook to check the copyright notice * Fix the existing file so they have a notice * Fix the spacing after the copyright notice * Add a script to generate the CONTRIBUTORS.txt Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Fix F403 wildcart import used in astroid/__init__.py (#1271)Pierre Sassoulas2022-03-031-0/+2
| | | | | | | * Fix F403 wildcart import used in astroid/__init__.py And apply flake8 on setup.py and astroid/__init__.py Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Bump astroid to 2.8.6, update changelogv2.8.6Pierre Sassoulas2021-11-211-1/+1
|
* Bump astroid to 2.8.5, update changelogv2.8.5Pierre Sassoulas2021-11-121-1/+1
|
* Add typing and deprecation warnings to ``NodeNG.statement`` (#1217)Daniël van Noord2021-11-071-0/+18
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Bump astroid to 2.8.3, update changelogv2.8.3Pierre Sassoulas2021-10-171-1/+1
|
* Bump astroid to 2.8.1, update changelogv2.8.1-rc1Pierre Sassoulas2021-10-061-0/+1
|
* Add f-strings with `flynt`Daniël van Noord2021-09-171-3/+1
|
* Add typing to scope() (#1170)Daniël van Noord2021-09-151-1/+18
|
* Bump astroid to 2.6.4, update changelogPierre Sassoulas2021-07-201-1/+1
|
* Bump astroid to 2.6.3, update changelogv2.6.3Pierre Sassoulas2021-07-191-0/+1
|
* Fix copyright links (#1084)Marc Mueller2021-07-011-1/+1
| | | | * Fix link in license header * Fix link to cpython
* Create a __all__ in astroid.exceptions and import with wildcardPierre Sassoulas2021-06-151-0/+29
|
* Prepare for 2.5.8 release (#1013)v2.5.8Pierre Sassoulas2021-06-071-1/+1
|
* Update copyright notice for 2.5.7v2.5.7Pierre Sassoulas2021-05-291-0/+1
|
* Fix unhandled AstroidSyntaxError raised by infer_named_tuple brain (#929)Andrew Haigh2021-05-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix uncaught AstroidSyntaxErrors in namedtuple brain Ref #920. This adds a test suite and updates the infer_named_tuple brain with some additional behaviours expected by `collections.namedtuple`, specifically about rejecting invalid type and field names. Some of these cases inferred as namedtuples/`ClassDef` when they would have raised `ValueError` and some of these raise unhandled `AstroidSyntaxError`s due to attempts to parse class fakes with type names that would have raised `ValueError`. For example: from collections import namedtuple Tuple = namedtuple('X', 'abc abc') # Traceback (most recent call last): # ... # ValueError: Encountered duplicate field name: 'abc' import astroid node = astroid.extract_node(""" from collections import namedtuple Tuple = namedtuple('X', 'abc abc') Tuple """) next(node.infer()) # <ClassDef.X l.3 at 0x...> from collections import namedtuple Tuple = namedtuple('123', 'abc') # Traceback (most recent call last): # ... # ValueError: Type names and field names must be valid identifiers: '123' import astroid node = astroid.extract_node(""" from collections import namedtuple Tuple = namedtuple('123', 'abc') Tuple """) next(node.infer()) # Traceback (most recent call last): # ... # KeyError: (<function infer_named_tuple at 0x...>, <Call l.3 at 0x...>) # # During handling of the above exception, another exception occurred: # # Traceback (most recent call last): # ... # File "<unknown>", line 2 # class 123(tuple): # ^ # SyntaxError: invalid syntax # # The above exception was the direct cause of the following exception: # # Traceback (most recent call last): # ... # astroid.exceptions.AstroidSyntaxError: Parsing Python code failed: # invalid syntax (<unknown>, line 2)
* Fix issue #891Pierre Sassoulas2021-04-101-1/+1
| | | | Remove outdated COPYING and rename COPYING.LESSER
* Prepare for 2.5.2 releaseastroid-2.5.2Pierre Sassoulas2021-03-281-0/+1
|
* Upgrade copyrite noticePierre Sassoulas2021-02-281-1/+1
|
* Update copyright noticehippo912021-02-151-0/+1
|
* New copyright noticeshippo912020-12-271-1/+1
|
* Fix the new violations of super-without-argumentsClaudiu Popa2020-05-121-7/+7
|
* Initial formatting of astroidClaudiu Popa2018-10-021-10/+23
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-2/+4
|
* Allow google style docs to be built along side sphinx style docs, using ↵Claudiu Popa2018-06-041-3/+2
| | | | napoleon extension
* Fix inference tip collisionsBryce Guinta2018-02-061-0/+7
| | | | | Set predicates for transforms which use inference_tips to prevent a node's _explicit_inference from being overwritten
* Fix lint warningsClaudiu Popa2017-10-121-6/+0
|
* Let the type error propagate as an AstroidTypeError.Claudiu Popa2016-12-031-0/+8
|
* Remove pylint errorsDerek Gustafson2016-12-031-0/+6
|
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+5
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* Now is_subtype / is_supertype raises an internal exception when a type ↵Claudiu Popa2016-06-031-0/+4
| | | | | | | | hierarchy can't be determined It used to return Uninferable, but no call site was actually taking care of this potential return. It is better though to simply raise an exception and to let the call sites to handle them in which way they want to.
* 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.
* relative_to_absolute_name will now raise TooManyLevelsError when a relative ↵Claudiu Popa2015-12-061-0/+15
| | | | import is trying to access something beyond the top-level package.
* AstroidBuildingException is now AstroidBuildingError.Claudiu Popa2015-12-061-4/+5
| | | | The first name will exist until astroid 2.0.
* Add two new exceptions, AstroidImportError and AstroidSyntaxError.Claudiu Popa2015-12-061-0/+10
| | | | | | | | 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.
* Merge upstream changesCeridwen2015-11-061-3/+3
|\