summaryrefslogtreecommitdiff
path: root/tests/unittest_brain.py
Commit message (Collapse)AuthorAgeFilesLines
* [brain tests] Move the file to their dir and shorten namePierre Sassoulas2023-02-091-3495/+0
|
* Revert CallContext change since it caused a RecursionError regression (#2000)Marc Mueller2023-01-311-1/+8
| | | This reverts commit a0d219cb3403cda3338a14ce67a60954b4ff5cd7 (#1982).
* Add Lock to multiprocessing (#1976)Dani Alcala2023-01-311-0/+5
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Preserve parent CallContext when inferring nested functions (#1982)Marc Mueller2023-01-291-4/+22
|
* Fix issues with `typing_extensions.TypeVar` (#1973)Marc Mueller2023-01-221-0/+32
| | | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a false positive with user-defined `Enum` class (#1967)Mark Byrne2023-01-151-0/+44
| | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Ignore DeprecationWarning from importing `nose` in testJacob Walls2022-11-201-2/+4
|
* Infer the `length` argument of the `random.sample` function. (#1862)Mark Byrne2022-11-041-0/+23
| | | Refs PyCQA/pylint#7706
* Prevent returning an empty list for `ClassDef.slots()` (#1861)Mark Byrne2022-11-031-0/+20
| | | | | Prevent returning an empty list for `ClassDef.slots()` when the mro list contains one class & it is not `object`. Refs PyCQA/pylint#5099 Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Update the ``hashlib`` brain ``hash.digest`` & ``hash.hexdigest`` methods. ↵Mark Byrne2022-10-151-5/+25
| | | | | | | | | (#1827) * Add the ``length`` parameter to ``hash.digest`` & ``hash.hexdigest`` in the ``hashlib`` brain. * Move content in Changelog to a different section. Refs PyCQA/pylint#4039
* [flake8] Set the max line length to 110 instead of 138Pierre Sassoulas2022-09-191-2/+4
| | | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix a crash on ``namedtuples`` that use ``typename`` (#1773)Daniël van Noord2022-09-071-0/+17
| | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix a crash involving `Uninferable` args to `namedtuple` (#1763)Jacob Walls2022-09-041-0/+20
|
* Fix false positive with inference of `http` module (#1742)Mark Byrne2022-08-231-1/+14
| | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Refs #1662: Condition `usedforsecurity` support on Py3.9+ (#1665)Jacob Walls2022-06-251-2/+6
|
* `hashlib`: Add support for `usedforsecurity` keyword (#1662)Jacob Walls2022-06-251-2/+2
|
* Revert #893: Avoid setting a Call as a base for metaclasses from ↵Jacob Walls2022-06-231-1/+17
| | | | six.with_metaclass() (#1622)
* Fix inference of ``Enums`` when they are imported under an alias (#1587)Daniël van Noord2022-06-021-0/+14
|
* Permit subscripting additional builtin classes (#1572)Jacob Walls2022-05-231-4/+3
| | | Treat other classes such as enumerate and staticmethod identically to list, dict, tuple, set, frozenset.
* Update typing for Python 3.7 (1) (#1555)Marc Mueller2022-05-131-2/+5
|
* Require Python 3.7.2 (#1542)Jacob Walls2022-05-101-15/+1
|
* Avoid adding the name of a parent namedtuple to child's locals (#1489)Jacob Walls2022-03-261-0/+2
|
* Simplify hard to maintain copyright notice (#1441)Pierre Sassoulas2022-03-121-45/+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>
* Do no pass ``doc`` attribute to ``nodes.Module`` in tests (#1455)Daniël van Noord2022-03-091-1/+1
|
* Pass ``doc_node`` to postinit of all ``PartialFunction`` constructors (#1437)Daniël van Noord2022-03-071-0/+24
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Bump astroid to 2.10.0, update changelogv2.10.0Pierre Sassoulas2022-02-271-0/+3
|
* Fix crash inferring on NewType named with f-string (#1400)Jacob Walls2022-02-191-1/+18
|
* Add support for attrs v21.3.0+ (#1331)Jacob Bogdanov2022-01-201-0/+67
| | | | | | | | | | | | * Add support for attrs v21.3.0+ Since version [21.3.0](https://github.com/python-attrs/attrs/releases/tag/21.3.0) you can now `import attrs` instead of just `import attr`. This patch adds support so that astroid doesn't barf on classes created using `@attrs.define`. Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Bump astroid to 2.9.2, update changelogv2.9.2Alexander Shadchin2022-01-041-1/+1
|
* Bump astroid to 2.9.1, update changelogv2.9.1Pierre Sassoulas2021-12-311-1/+2
|
* Fix typos (#1288)Kian Meng, Ang2021-12-131-2/+2
|
* Upgrade to pylint 2.12 and enable ``for_any_all`` checker (#1277)Nick Drozd2021-11-271-4/+1
| | | | | | | | * Enable for_any_all check * Upgrade to pylint 2.12 in pre-commit configuration * Fix new Pylint warnings * Upgrade the regex for Mixin Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.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-2/+2
|
* Fix crash on inference of __len__ (#1234)Daniël van Noord2021-11-081-0/+53
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Bump astroid to 2.8.4, update changelogv2.8.4Pierre Sassoulas2021-10-251-1/+2
|
* Add test for __members__ (#1216)Joshua Cannon2021-10-211-0/+15
| | | Adding a new test which ensures the local __members__ defined on an enum class isn't used for __members__ afterwards. This matches the behavior of Python.
* Bump astroid to 2.8.3, update changelogv2.8.3Pierre Sassoulas2021-10-171-1/+2
|
* Add recognition of previous partial args/kwargs when chaining (#1209)Craig Franklin2021-10-101-0/+28
| | | | | | | | | | | | * Add recognition of previous partial args/kwargs when chaining Repeat use of functools.partial on the same function would only keep the args & kwargs locked in by the last call to partial. By checking if the wrapped function is itself a partial, and including its filled args/kwargs if it is, we can keep track of all locked args/kwargs across any number of nested partial calls. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Bump astroid to 2.8.1, update changelogv2.8.1-rc1Pierre Sassoulas2021-10-061-1/+3
|
* Improve brain for typing.Callable + typing.Type (#1192)Marc Mueller2021-09-291-2/+28
|
* continuing #839: Extend attrs brain to support provisional APIs (#1187)Jonathan Striebel2021-09-281-2/+23
| | | | | | | | * Extend attrs brain to support provisional APIs See https://www.attrs.org/en/stable/api.html?highlight=field#provisional-apis Co-authored-by: Tamir Bahar <tbahar@vdoo.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add f-strings with `flynt`Daniël van Noord2021-09-171-10/+6
|
* Fix all R6201: Consider using set for membershipPierre Sassoulas2021-09-171-2/+2
| | | | Following the upgrade to pylint 2.11.1
* Bump astroid to 2.8.0, update changelogv2.8.0Pierre Sassoulas2021-09-141-0/+1
|
* Add typing in tests directory (#1163)Pierre Sassoulas2021-09-141-164/+182
| | | | | | | * Add typing in the tests/ directory * Add some assert for mypy's sake * Avoid adding mypy_extension by using pytest skip
* Recognize nested classes in classes inherited from NamedTupleDimitri Prybysh2021-09-061-0/+21
| | | | Fixes PyCQA/pylint#4370
* Replace the constant BUILTINS by the string 'builtins'Pierre Sassoulas2021-08-191-5/+3
| | | | | | | | This make for clearer and also sligtly faster code (means time seems to decrese by 0.68% with this change alone (astroid/pylint) in the pylint tests benchmarks). Done because we were using an import from astroid from astroid.bases for one of those, which is kinda messy.
* Bump astroid to 2.7.1, update changelogv2.7.1Pierre Sassoulas2021-08-161-1/+1
|
* Bump astroid to 2.7.0, update changelogv2.7.0Pierre Sassoulas2021-08-151-1/+3
|