<86>Feb 3 06:58:02 userdel[1009148]: delete user 'rooter' <86>Feb 3 06:58:02 userdel[1009148]: removed group 'rooter' owned by 'rooter' <86>Feb 3 06:58:02 userdel[1009148]: removed shadow group 'rooter' owned by 'rooter' <86>Feb 3 06:58:02 groupadd[1009173]: group added to /etc/group: name=rooter, GID=1841 <86>Feb 3 06:58:02 groupadd[1009173]: group added to /etc/gshadow: name=rooter <86>Feb 3 06:58:02 groupadd[1009173]: new group: name=rooter, GID=1841 <86>Feb 3 06:58:02 useradd[1009199]: new user: name=rooter, UID=1841, GID=1841, home=/root, shell=/bin/bash, from=none <86>Feb 3 06:58:02 userdel[1009234]: delete user 'builder' <86>Feb 3 06:58:02 userdel[1009234]: removed group 'builder' owned by 'builder' <86>Feb 3 06:58:02 userdel[1009234]: removed shadow group 'builder' owned by 'builder' <86>Feb 3 06:58:02 groupadd[1009267]: group added to /etc/group: name=builder, GID=1842 <86>Feb 3 06:58:02 groupadd[1009267]: group added to /etc/gshadow: name=builder <86>Feb 3 06:58:02 groupadd[1009267]: new group: name=builder, GID=1842 <86>Feb 3 06:58:02 useradd[1009295]: new user: name=builder, UID=1842, GID=1842, home=/usr/src, shell=/bin/bash, from=none <13>Feb 3 06:58:05 rpmi: libmpdec3-2.5.1-alt3 sisyphus+314490.500.5.1 1675432033 installed <13>Feb 3 06:58:05 rpmi: libgdbm-1.8.3-alt10 sisyphus+278100.1600.1.1 1626059138 installed <13>Feb 3 06:58:05 rpmi: libexpat-2.5.0-alt1 sisyphus+309227.100.1.1 1667075766 installed <13>Feb 3 06:58:05 rpmi: libb2-0.98.1-alt1_1 sisyphus+291614.100.1.1 1638962878 installed <13>Feb 3 06:58:05 rpmi: libp11-kit-1:0.25.3-alt2 sisyphus+336533.100.1.1 1702645575 installed <13>Feb 3 06:58:05 rpmi: libtasn1-4.19.0-alt3 sisyphus+327816.100.1.1 1692802618 installed <13>Feb 3 06:58:05 rpmi: rpm-macros-alternatives-0.5.2-alt2 sisyphus+315270.200.2.1 1676457367 installed <13>Feb 3 06:58:05 rpmi: alternatives-0.5.2-alt2 sisyphus+315270.200.2.1 1676457367 installed <13>Feb 3 06:58:05 rpmi: ca-certificates-2023.12.20-alt1 sisyphus+336902.300.1.1 1703105726 installed <13>Feb 3 06:58:05 rpmi: ca-trust-0.1.4-alt1 sisyphus+308690.100.1.1 1666182992 installed <13>Feb 3 06:58:05 rpmi: p11-kit-trust-1:0.25.3-alt2 sisyphus+336533.100.1.1 1702645575 installed <13>Feb 3 06:58:05 rpmi: libcrypto3-3.1.5-alt1 sisyphus+339669.100.1.1 1706908706 installed <13>Feb 3 06:58:05 rpmi: libssl3-3.1.5-alt1 sisyphus+339669.100.1.1 1706908706 installed <13>Feb 3 06:58:05 rpmi: python3-3.12.1-alt2 sisyphus+339293.200.1.1 1706538582 installed <13>Feb 3 06:58:06 rpmi: python3-base-3.12.1-alt2 sisyphus+339293.200.1.1 1706538582 installed <13>Feb 3 06:58:06 rpmi: python3-module-py3dephell-0.1.0-alt2 sisyphus+328191.600.5.1 1693609196 installed <13>Feb 3 06:58:06 rpmi: python3-module-pyproject-installer-0.5.2-alt1 sisyphus+324644.100.2.1 1689089627 installed <13>Feb 3 06:58:06 rpmi: rpm-macros-pyproject-0.0.4-alt1 sisyphus+322305.200.2.1 1686212200 installed <13>Feb 3 06:58:06 rpmi: tests-for-installed-python3-pkgs-0.1.24-alt2 sisyphus+331059.100.4.1 1696870033 installed <13>Feb 3 06:58:06 rpmi: rpm-build-python3-0.1.24-alt2 sisyphus+331059.100.4.1 1696870033 installed <13>Feb 3 06:58:06 rpmi: rpm-build-pyproject-0.0.4-alt1 sisyphus+322305.200.2.1 1686212200 installed <13>Feb 3 06:58:08 rpmi: python3-module-pluggy-1.4.0-alt1 sisyphus+339306.100.2.1 1706605903 installed <13>Feb 3 06:58:08 rpmi: python3-module-pkg_resources-1:69.0.3-alt2 sisyphus+339080.100.1.1 1706272183 installed <13>Feb 3 06:58:08 rpmi: python3-module-packaging-23.2-alt1 sisyphus+330805.100.2.1 1696324248 installed <13>Feb 3 06:58:08 rpmi: python3-module-iniconfig-2.0.0-alt1 sisyphus+314076.200.3.1 1674737275 installed <13>Feb 3 06:58:08 rpmi: libpython3-3.12.1-alt2 sisyphus+339293.200.1.1 1706538582 installed <13>Feb 3 06:58:08 rpmi: libncurses6-6.3.20220618-alt4 sisyphus+328055.40.2.1 1693213017 installed <13>Feb 3 06:58:08 rpmi: libtinfo-devel-6.3.20220618-alt4 sisyphus+328055.40.2.1 1693213017 installed <13>Feb 3 06:58:08 rpmi: libncurses-devel-6.3.20220618-alt4 sisyphus+328055.40.2.1 1693213017 installed <13>Feb 3 06:58:09 rpmi: python3-dev-3.12.1-alt2 sisyphus+339293.200.1.1 1706538582 installed <13>Feb 3 06:58:09 rpmi: python3-module-setuptools-1:69.0.3-alt2 sisyphus+339080.100.1.1 1706272183 installed <13>Feb 3 06:58:09 rpmi: python3-module-wheel-0.42.0-alt1 sisyphus+336049.100.2.1 1702033503 installed <13>Feb 3 06:58:10 rpmi: python3-module-pytest-8.0.0-alt1 sisyphus+339306.200.2.1 1706606050 installed <13>Feb 3 06:58:10 rpmi: python3-module-wrapt-1.16.0-alt1 sisyphus+338885.100.1.2 1706112829 installed <13>Feb 3 06:58:10 rpmi: python3-module-pip-23.3.2-alt1 sisyphus+336969.100.1.1 1703161412 installed <13>Feb 3 06:58:10 rpmi: python3-module-lazy-object-proxy-1.9.0-alt1 sisyphus+333513.55500.77.1 1704963198 installed warning: File /usr/src/in/source/python3-module-astroid-2.15.6-alt.patch is smaller than 8 bytes Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-astroid-2.15.6-alt1.nosrc.rpm (w1.gzdio) warning: File /usr/src/RPM/SOURCES/python3-module-astroid-2.15.6-alt.patch is smaller than 8 bytes Installing python3-module-astroid-2.15.6-alt1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.32561 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-astroid-2.15.6 + echo 'Source #0 (python3-module-astroid-2.15.6.tar):' Source #0 (python3-module-astroid-2.15.6.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-astroid-2.15.6.tar + cd python3-module-astroid-2.15.6 + /bin/chmod -c -Rf u+rwX,go-w . + echo 'Patch #0 (python3-module-astroid-2.15.6-alt.patch):' Patch #0 (python3-module-astroid-2.15.6-alt.patch): + /usr/bin/patch -p1 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show pep518 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync --verify pep518 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show pep517 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync --verify pep517 + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show metadata + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync --verify metadata INFO : Building metadata INFO : Building metadata with prepare_metadata_for_build_wheel INFO : Source tree: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6 INFO : Output dir: /usr/src/tmp/tmpq734d9zj + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json show check + /usr/bin/python3 -m pyproject_installer deps --depsconfig /usr/src/RPM/SOURCES/pyproject_deps.json sync --verify check + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.44402 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-astroid-2.15.6 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + /usr/bin/python3 -m pyproject_installer -v build INFO : pyproject_installer.build_cmd._build : Building wheel INFO : pyproject_installer.build_cmd._build : Source tree: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6 INFO : pyproject_installer.build_cmd._build : Output dir: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6/dist DEBUG : pyproject_installer.lib.build_backend : Validating source path DEBUG : pyproject_installer.lib.build_backend : Checking for PEP517 spec DEBUG : pyproject_installer.lib.build_backend : Parsing configuration file: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6/pyproject.toml INFO : backend_caller.py : Calling hook build_wheel in subprocess INFO : backend_caller.py : Build backend: setuptools.build_meta INFO : backend_caller.py : Hook args: ['/usr/src/RPM/BUILD/python3-module-astroid-2.15.6/dist'] INFO : backend_caller.py : Hook kwargs: {'config_settings': None} INFO : root : running bdist_wheel INFO : root : running build INFO : root : running build_py INFO : root : creating build INFO : root : creating build/lib INFO : root : creating build/lib/astroid INFO : root : copying astroid/util.py -> build/lib/astroid INFO : root : copying astroid/typing.py -> build/lib/astroid INFO : root : copying astroid/transforms.py -> build/lib/astroid INFO : root : copying astroid/test_utils.py -> build/lib/astroid INFO : root : copying astroid/scoped_nodes.py -> build/lib/astroid INFO : root : copying astroid/rebuilder.py -> build/lib/astroid INFO : root : copying astroid/raw_building.py -> build/lib/astroid INFO : root : copying astroid/protocols.py -> build/lib/astroid INFO : root : copying astroid/objects.py -> build/lib/astroid INFO : root : copying astroid/node_classes.py -> build/lib/astroid INFO : root : copying astroid/modutils.py -> build/lib/astroid INFO : root : copying astroid/mixins.py -> build/lib/astroid INFO : root : copying astroid/manager.py -> build/lib/astroid INFO : root : copying astroid/inference_tip.py -> build/lib/astroid INFO : root : copying astroid/inference.py -> build/lib/astroid INFO : root : copying astroid/helpers.py -> build/lib/astroid INFO : root : copying astroid/filter_statements.py -> build/lib/astroid INFO : root : copying astroid/exceptions.py -> build/lib/astroid INFO : root : copying astroid/decorators.py -> build/lib/astroid INFO : root : copying astroid/context.py -> build/lib/astroid INFO : root : copying astroid/constraint.py -> build/lib/astroid INFO : root : copying astroid/const.py -> build/lib/astroid INFO : root : copying astroid/builder.py -> build/lib/astroid INFO : root : copying astroid/bases.py -> build/lib/astroid INFO : root : copying astroid/astroid_manager.py -> build/lib/astroid INFO : root : copying astroid/arguments.py -> build/lib/astroid INFO : root : copying astroid/_cache.py -> build/lib/astroid INFO : root : copying astroid/_backport_stdlib_names.py -> build/lib/astroid INFO : root : copying astroid/_ast.py -> build/lib/astroid INFO : root : copying astroid/__pkginfo__.py -> build/lib/astroid INFO : root : copying astroid/__init__.py -> build/lib/astroid INFO : root : creating build/lib/astroid/nodes INFO : root : copying astroid/nodes/utils.py -> build/lib/astroid/nodes INFO : root : copying astroid/nodes/node_ng.py -> build/lib/astroid/nodes INFO : root : copying astroid/nodes/node_classes.py -> build/lib/astroid/nodes INFO : root : copying astroid/nodes/const.py -> build/lib/astroid/nodes INFO : root : copying astroid/nodes/as_string.py -> build/lib/astroid/nodes INFO : root : copying astroid/nodes/_base_nodes.py -> build/lib/astroid/nodes INFO : root : copying astroid/nodes/__init__.py -> build/lib/astroid/nodes INFO : root : creating build/lib/astroid/interpreter INFO : root : copying astroid/interpreter/objectmodel.py -> build/lib/astroid/interpreter INFO : root : copying astroid/interpreter/dunder_lookup.py -> build/lib/astroid/interpreter INFO : root : copying astroid/interpreter/__init__.py -> build/lib/astroid/interpreter INFO : root : creating build/lib/astroid/brain INFO : root : copying astroid/brain/helpers.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_uuid.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_unittest.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_typing.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_type.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_threading.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_subprocess.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_ssl.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_sqlalchemy.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_six.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_signal.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_scipy_signal.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_responses.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_regex.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_re.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_random.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_qt.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_pytest.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_pkg_resources.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_pathlib.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_utils.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_random_mtrand.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_ndarray.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_ma.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_umath.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_numerictypes.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_numeric.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_multiarray.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_function_base.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_fromnumeric.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_numpy_core_einsumfunc.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_nose.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_namedtuple_enum.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_multiprocessing.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_mechanize.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_io.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_hypothesis.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_http.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_hashlib.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_gi.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_functools.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_fstrings.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_dateutil.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_dataclasses.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_curses.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_ctypes.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_crypt.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_collections.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_builtin_inference.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_boto3.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_attrs.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/brain_argparse.py -> build/lib/astroid/brain INFO : root : copying astroid/brain/__init__.py -> build/lib/astroid/brain INFO : root : creating build/lib/astroid/nodes/scoped_nodes INFO : root : copying astroid/nodes/scoped_nodes/utils.py -> build/lib/astroid/nodes/scoped_nodes INFO : root : copying astroid/nodes/scoped_nodes/scoped_nodes.py -> build/lib/astroid/nodes/scoped_nodes INFO : root : copying astroid/nodes/scoped_nodes/mixin.py -> build/lib/astroid/nodes/scoped_nodes INFO : root : copying astroid/nodes/scoped_nodes/__init__.py -> build/lib/astroid/nodes/scoped_nodes INFO : root : creating build/lib/astroid/interpreter/_import INFO : root : copying astroid/interpreter/_import/util.py -> build/lib/astroid/interpreter/_import INFO : root : copying astroid/interpreter/_import/spec.py -> build/lib/astroid/interpreter/_import INFO : root : copying astroid/interpreter/_import/__init__.py -> build/lib/astroid/interpreter/_import INFO : root : running egg_info INFO : root : writing astroid.egg-info/PKG-INFO INFO : root : writing dependency_links to astroid.egg-info/dependency_links.txt INFO : root : writing requirements to astroid.egg-info/requires.txt INFO : root : writing top-level names to astroid.egg-info/top_level.txt INFO : root : reading manifest file 'astroid.egg-info/SOURCES.txt' INFO : root : reading manifest template 'MANIFEST.in' INFO : root : adding license file 'LICENSE' INFO : root : adding license file 'CONTRIBUTORS.txt' INFO : root : writing manifest file 'astroid.egg-info/SOURCES.txt' INFO : wheel : installing to build/bdist.linux-i686/wheel INFO : root : running install INFO : root : running install_lib INFO : root : creating build/bdist.linux-i686 INFO : root : creating build/bdist.linux-i686/wheel INFO : root : creating build/bdist.linux-i686/wheel/astroid INFO : root : creating build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/__init__.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_argparse.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_attrs.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_boto3.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_builtin_inference.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_collections.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_crypt.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_ctypes.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_curses.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_dataclasses.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_dateutil.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_fstrings.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_functools.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_gi.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_hashlib.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_http.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_hypothesis.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_io.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_mechanize.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_multiprocessing.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_namedtuple_enum.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_nose.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_einsumfunc.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_fromnumeric.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_function_base.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_multiarray.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_numeric.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_numerictypes.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_core_umath.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_ma.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_ndarray.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_random_mtrand.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_numpy_utils.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_pathlib.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_pkg_resources.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_pytest.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_qt.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_random.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_re.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_regex.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_responses.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_scipy_signal.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_signal.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_six.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_sqlalchemy.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_ssl.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_subprocess.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_threading.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_type.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_typing.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_unittest.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/brain_uuid.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : copying build/lib/astroid/brain/helpers.py -> build/bdist.linux-i686/wheel/astroid/brain INFO : root : creating build/bdist.linux-i686/wheel/astroid/interpreter INFO : root : creating build/bdist.linux-i686/wheel/astroid/interpreter/_import INFO : root : copying build/lib/astroid/interpreter/_import/__init__.py -> build/bdist.linux-i686/wheel/astroid/interpreter/_import INFO : root : copying build/lib/astroid/interpreter/_import/spec.py -> build/bdist.linux-i686/wheel/astroid/interpreter/_import INFO : root : copying build/lib/astroid/interpreter/_import/util.py -> build/bdist.linux-i686/wheel/astroid/interpreter/_import INFO : root : copying build/lib/astroid/interpreter/__init__.py -> build/bdist.linux-i686/wheel/astroid/interpreter INFO : root : copying build/lib/astroid/interpreter/dunder_lookup.py -> build/bdist.linux-i686/wheel/astroid/interpreter INFO : root : copying build/lib/astroid/interpreter/objectmodel.py -> build/bdist.linux-i686/wheel/astroid/interpreter INFO : root : creating build/bdist.linux-i686/wheel/astroid/nodes INFO : root : creating build/bdist.linux-i686/wheel/astroid/nodes/scoped_nodes INFO : root : copying build/lib/astroid/nodes/scoped_nodes/__init__.py -> build/bdist.linux-i686/wheel/astroid/nodes/scoped_nodes INFO : root : copying build/lib/astroid/nodes/scoped_nodes/mixin.py -> build/bdist.linux-i686/wheel/astroid/nodes/scoped_nodes INFO : root : copying build/lib/astroid/nodes/scoped_nodes/scoped_nodes.py -> build/bdist.linux-i686/wheel/astroid/nodes/scoped_nodes INFO : root : copying build/lib/astroid/nodes/scoped_nodes/utils.py -> build/bdist.linux-i686/wheel/astroid/nodes/scoped_nodes INFO : root : copying build/lib/astroid/nodes/__init__.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/nodes/_base_nodes.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/nodes/as_string.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/nodes/const.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/nodes/node_classes.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/nodes/node_ng.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/nodes/utils.py -> build/bdist.linux-i686/wheel/astroid/nodes INFO : root : copying build/lib/astroid/__init__.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/__pkginfo__.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/_ast.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/_backport_stdlib_names.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/_cache.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/arguments.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/astroid_manager.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/bases.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/builder.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/const.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/constraint.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/context.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/decorators.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/exceptions.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/filter_statements.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/helpers.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/inference.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/inference_tip.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/manager.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/mixins.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/modutils.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/node_classes.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/objects.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/protocols.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/raw_building.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/rebuilder.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/scoped_nodes.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/test_utils.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/transforms.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/typing.py -> build/bdist.linux-i686/wheel/astroid INFO : root : copying build/lib/astroid/util.py -> build/bdist.linux-i686/wheel/astroid INFO : root : running install_egg_info INFO : root : Copying astroid.egg-info to build/bdist.linux-i686/wheel/astroid-2.15.6-py3.12.egg-info INFO : root : running install_scripts INFO : wheel : creating build/bdist.linux-i686/wheel/astroid-2.15.6.dist-info/WHEEL INFO : wheel : creating '/usr/src/RPM/BUILD/python3-module-astroid-2.15.6/dist/.tmp-s_7hjp2x/astroid-2.15.6-py3-none-any.whl' and adding 'build/bdist.linux-i686/wheel' to it INFO : wheel : adding 'astroid/__init__.py' INFO : wheel : adding 'astroid/__pkginfo__.py' INFO : wheel : adding 'astroid/_ast.py' INFO : wheel : adding 'astroid/_backport_stdlib_names.py' INFO : wheel : adding 'astroid/_cache.py' INFO : wheel : adding 'astroid/arguments.py' INFO : wheel : adding 'astroid/astroid_manager.py' INFO : wheel : adding 'astroid/bases.py' INFO : wheel : adding 'astroid/builder.py' INFO : wheel : adding 'astroid/const.py' INFO : wheel : adding 'astroid/constraint.py' INFO : wheel : adding 'astroid/context.py' INFO : wheel : adding 'astroid/decorators.py' INFO : wheel : adding 'astroid/exceptions.py' INFO : wheel : adding 'astroid/filter_statements.py' INFO : wheel : adding 'astroid/helpers.py' INFO : wheel : adding 'astroid/inference.py' INFO : wheel : adding 'astroid/inference_tip.py' INFO : wheel : adding 'astroid/manager.py' INFO : wheel : adding 'astroid/mixins.py' INFO : wheel : adding 'astroid/modutils.py' INFO : wheel : adding 'astroid/node_classes.py' INFO : wheel : adding 'astroid/objects.py' INFO : wheel : adding 'astroid/protocols.py' INFO : wheel : adding 'astroid/raw_building.py' INFO : wheel : adding 'astroid/rebuilder.py' INFO : wheel : adding 'astroid/scoped_nodes.py' INFO : wheel : adding 'astroid/test_utils.py' INFO : wheel : adding 'astroid/transforms.py' INFO : wheel : adding 'astroid/typing.py' INFO : wheel : adding 'astroid/util.py' INFO : wheel : adding 'astroid/brain/__init__.py' INFO : wheel : adding 'astroid/brain/brain_argparse.py' INFO : wheel : adding 'astroid/brain/brain_attrs.py' INFO : wheel : adding 'astroid/brain/brain_boto3.py' INFO : wheel : adding 'astroid/brain/brain_builtin_inference.py' INFO : wheel : adding 'astroid/brain/brain_collections.py' INFO : wheel : adding 'astroid/brain/brain_crypt.py' INFO : wheel : adding 'astroid/brain/brain_ctypes.py' INFO : wheel : adding 'astroid/brain/brain_curses.py' INFO : wheel : adding 'astroid/brain/brain_dataclasses.py' INFO : wheel : adding 'astroid/brain/brain_dateutil.py' INFO : wheel : adding 'astroid/brain/brain_fstrings.py' INFO : wheel : adding 'astroid/brain/brain_functools.py' INFO : wheel : adding 'astroid/brain/brain_gi.py' INFO : wheel : adding 'astroid/brain/brain_hashlib.py' INFO : wheel : adding 'astroid/brain/brain_http.py' INFO : wheel : adding 'astroid/brain/brain_hypothesis.py' INFO : wheel : adding 'astroid/brain/brain_io.py' INFO : wheel : adding 'astroid/brain/brain_mechanize.py' INFO : wheel : adding 'astroid/brain/brain_multiprocessing.py' INFO : wheel : adding 'astroid/brain/brain_namedtuple_enum.py' INFO : wheel : adding 'astroid/brain/brain_nose.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_einsumfunc.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_fromnumeric.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_function_base.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_multiarray.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_numeric.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_numerictypes.py' INFO : wheel : adding 'astroid/brain/brain_numpy_core_umath.py' INFO : wheel : adding 'astroid/brain/brain_numpy_ma.py' INFO : wheel : adding 'astroid/brain/brain_numpy_ndarray.py' INFO : wheel : adding 'astroid/brain/brain_numpy_random_mtrand.py' INFO : wheel : adding 'astroid/brain/brain_numpy_utils.py' INFO : wheel : adding 'astroid/brain/brain_pathlib.py' INFO : wheel : adding 'astroid/brain/brain_pkg_resources.py' INFO : wheel : adding 'astroid/brain/brain_pytest.py' INFO : wheel : adding 'astroid/brain/brain_qt.py' INFO : wheel : adding 'astroid/brain/brain_random.py' INFO : wheel : adding 'astroid/brain/brain_re.py' INFO : wheel : adding 'astroid/brain/brain_regex.py' INFO : wheel : adding 'astroid/brain/brain_responses.py' INFO : wheel : adding 'astroid/brain/brain_scipy_signal.py' INFO : wheel : adding 'astroid/brain/brain_signal.py' INFO : wheel : adding 'astroid/brain/brain_six.py' INFO : wheel : adding 'astroid/brain/brain_sqlalchemy.py' INFO : wheel : adding 'astroid/brain/brain_ssl.py' INFO : wheel : adding 'astroid/brain/brain_subprocess.py' INFO : wheel : adding 'astroid/brain/brain_threading.py' INFO : wheel : adding 'astroid/brain/brain_type.py' INFO : wheel : adding 'astroid/brain/brain_typing.py' INFO : wheel : adding 'astroid/brain/brain_unittest.py' INFO : wheel : adding 'astroid/brain/brain_uuid.py' INFO : wheel : adding 'astroid/brain/helpers.py' INFO : wheel : adding 'astroid/interpreter/__init__.py' INFO : wheel : adding 'astroid/interpreter/dunder_lookup.py' INFO : wheel : adding 'astroid/interpreter/objectmodel.py' INFO : wheel : adding 'astroid/interpreter/_import/__init__.py' INFO : wheel : adding 'astroid/interpreter/_import/spec.py' INFO : wheel : adding 'astroid/interpreter/_import/util.py' INFO : wheel : adding 'astroid/nodes/__init__.py' INFO : wheel : adding 'astroid/nodes/_base_nodes.py' INFO : wheel : adding 'astroid/nodes/as_string.py' INFO : wheel : adding 'astroid/nodes/const.py' INFO : wheel : adding 'astroid/nodes/node_classes.py' INFO : wheel : adding 'astroid/nodes/node_ng.py' INFO : wheel : adding 'astroid/nodes/utils.py' INFO : wheel : adding 'astroid/nodes/scoped_nodes/__init__.py' INFO : wheel : adding 'astroid/nodes/scoped_nodes/mixin.py' INFO : wheel : adding 'astroid/nodes/scoped_nodes/scoped_nodes.py' INFO : wheel : adding 'astroid/nodes/scoped_nodes/utils.py' INFO : wheel : adding 'astroid-2.15.6.dist-info/CONTRIBUTORS.txt' INFO : wheel : adding 'astroid-2.15.6.dist-info/LICENSE' INFO : wheel : adding 'astroid-2.15.6.dist-info/METADATA' INFO : wheel : adding 'astroid-2.15.6.dist-info/WHEEL' INFO : wheel : adding 'astroid-2.15.6.dist-info/top_level.txt' INFO : wheel : adding 'astroid-2.15.6.dist-info/RECORD' INFO : wheel : removing build/bdist.linux-i686/wheel INFO : pyproject_installer.build_cmd._build : Built wheel: astroid-2.15.6-py3-none-any.whl + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.50322 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-astroid-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-astroid-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd python3-module-astroid-2.15.6 + /usr/bin/python3 -m pyproject_installer -v install --destdir=/usr/src/tmp/python3-module-astroid-buildroot INFO : pyproject_installer.install_cmd._install : Installing wheel INFO : pyproject_installer.install_cmd._install : Wheel directory: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6/dist INFO : pyproject_installer.install_cmd._install : Wheel filename: astroid-2.15.6-py3-none-any.whl INFO : pyproject_installer.install_cmd._install : Destination: /usr/src/tmp/python3-module-astroid-buildroot DEBUG : pyproject_installer.lib.wheel : Parsing wheel filename DEBUG : pyproject_installer.lib.wheel : Validating wheel file DEBUG : pyproject_installer.lib.wheel : Validating wheel spec version DEBUG : pyproject_installer.lib.wheel : Parsing wheel spec metadata DEBUG : pyproject_installer.lib.wheel : Validating RECORD INFO : pyproject_installer.install_cmd._install : Wheel installation root: /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages INFO : pyproject_installer.install_cmd._install : Extracting wheel DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: astroid-2.15.6.dist-info/CONTRIBUTORS.txt DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: astroid-2.15.6.dist-info/LICENSE DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: astroid-2.15.6.dist-info/WHEEL DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: astroid-2.15.6.dist-info/top_level.txt DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: astroid-2.15.6.dist-info/RECORD INFO : pyproject_installer.install_cmd._install : Wheel was installed + rm /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/test_utils.py + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-astroid-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-astroid-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-astroid-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-astroid-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-astroid-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-astroid-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python3 modules in /usr/src/tmp/python3-module-astroid-buildroot using /usr/bin/python3 compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_argparse.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_attrs.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_boto3.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_builtin_inference.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_collections.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_crypt.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_ctypes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_curses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_dataclasses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_dateutil.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_fstrings.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_functools.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_gi.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_hashlib.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_http.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_hypothesis.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_io.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_mechanize.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_multiprocessing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_namedtuple_enum.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_nose.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_einsumfunc.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_fromnumeric.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_function_base.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_multiarray.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_numeric.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_numerictypes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_umath.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_ma.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_ndarray.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_random_mtrand.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pathlib.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pkg_resources.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pytest.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_qt.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_random.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_re.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_regex.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_responses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_scipy_signal.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_signal.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_six.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_sqlalchemy.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_ssl.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_subprocess.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_threading.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_type.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_typing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_unittest.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_uuid.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/helpers.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/spec.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/util.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/dunder_lookup.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/objectmodel.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/mixin.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/_base_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/as_string.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/const.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/node_classes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/node_ng.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/__pkginfo__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_ast.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_backport_stdlib_names.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_cache.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/arguments.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/astroid_manager.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/bases.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/builder.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/const.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/constraint.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/context.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/decorators.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/exceptions.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/filter_statements.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/helpers.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/inference.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/inference_tip.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/manager.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/mixins.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/modutils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/node_classes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/objects.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/protocols.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/raw_building.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/rebuilder.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/scoped_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/transforms.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/typing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/util.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-astroid-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_argparse.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_attrs.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_boto3.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_builtin_inference.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_collections.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_crypt.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_ctypes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_curses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_dataclasses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_dateutil.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_fstrings.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_functools.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_gi.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_hashlib.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_http.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_hypothesis.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_io.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_mechanize.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_multiprocessing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_namedtuple_enum.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_nose.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_einsumfunc.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_fromnumeric.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_function_base.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_multiarray.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_numeric.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_numerictypes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_umath.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_ma.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_ndarray.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_random_mtrand.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pathlib.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pkg_resources.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pytest.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_qt.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_random.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_re.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_regex.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_responses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_scipy_signal.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_signal.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_six.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_sqlalchemy.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_ssl.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_subprocess.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_threading.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_type.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_typing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_unittest.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_uuid.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/helpers.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/spec.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/util.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/dunder_lookup.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/objectmodel.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/mixin.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/_base_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/as_string.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/const.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/node_classes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/node_ng.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/__pkginfo__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_ast.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_backport_stdlib_names.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_cache.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/arguments.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/astroid_manager.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/bases.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/builder.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/const.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/constraint.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/context.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/decorators.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/exceptions.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/filter_statements.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/helpers.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/inference.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/inference_tip.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/manager.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/mixins.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/modutils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/node_classes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/objects.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/protocols.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/raw_building.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/rebuilder.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/scoped_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/transforms.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/typing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/util.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-astroid-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_argparse.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_attrs.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_boto3.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_builtin_inference.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_collections.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_crypt.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_ctypes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_curses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_dataclasses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_dateutil.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_fstrings.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_functools.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_gi.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_hashlib.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_http.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_hypothesis.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_io.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_mechanize.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_multiprocessing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_namedtuple_enum.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_nose.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_einsumfunc.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_fromnumeric.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_function_base.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_multiarray.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_numeric.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_numerictypes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_core_umath.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_ma.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_ndarray.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_random_mtrand.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_numpy_utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pathlib.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pkg_resources.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_pytest.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_qt.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_random.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_re.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_regex.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_responses.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_scipy_signal.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_signal.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_six.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_sqlalchemy.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_ssl.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_subprocess.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_threading.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_type.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_typing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_unittest.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/brain_uuid.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/brain/helpers.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/spec.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/_import/util.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/dunder_lookup.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/interpreter/objectmodel.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/mixin.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/_base_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/as_string.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/const.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/node_classes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/node_ng.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/nodes/utils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/__init__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/__pkginfo__.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_ast.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_backport_stdlib_names.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/_cache.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/arguments.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/astroid_manager.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/bases.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/builder.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/const.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/constraint.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/context.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/decorators.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/exceptions.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/filter_statements.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/helpers.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/inference.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/inference_tip.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/manager.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/mixins.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/modutils.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/node_classes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/objects.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/protocols.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/raw_building.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/rebuilder.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/scoped_nodes.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/transforms.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/typing.py compile /usr/src/tmp/python3-module-astroid-buildroot/usr/lib/python3/site-packages/astroid/util.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/astroid/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/__pkginfo__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/__pkginfo__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/__pkginfo__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/__pkginfo__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/_ast.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/_ast.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/_backport_stdlib_names.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/_backport_stdlib_names.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/_cache.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/_cache.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/arguments.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/arguments.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/astroid_manager.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/astroid_manager.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/const.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/const.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/const.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/const.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/constraint.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/constraint.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/context.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/context.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/decorators.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/decorators.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/exceptions.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/exceptions.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/helpers.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/helpers.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/mixins.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/mixins.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/node_classes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/node_classes.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/node_classes.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/node_classes.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/objects.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/objects.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/protocols.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/protocols.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/scoped_nodes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/scoped_nodes.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/scoped_nodes.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/scoped_nodes.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/transforms.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/transforms.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/typing.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/typing.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/__pycache__/util.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/__pycache__/util.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_argparse.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_argparse.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_argparse.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_argparse.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_attrs.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_attrs.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_boto3.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_boto3.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_collections.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_collections.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_crypt.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_crypt.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_crypt.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_crypt.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_ctypes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_ctypes.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_curses.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_curses.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_curses.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_curses.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_dataclasses.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_dataclasses.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_dateutil.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_dateutil.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_fstrings.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_fstrings.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_fstrings.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_fstrings.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_functools.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_functools.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_gi.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_gi.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_hashlib.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_hashlib.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_hashlib.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_hashlib.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_http.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_http.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_hypothesis.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_hypothesis.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_io.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_io.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_mechanize.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_mechanize.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_mechanize.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_mechanize.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_multiprocessing.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_multiprocessing.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_multiprocessing.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_multiprocessing.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_namedtuple_enum.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_namedtuple_enum.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_nose.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_nose.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_einsumfunc.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_einsumfunc.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_fromnumeric.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_fromnumeric.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_function_base.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_function_base.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_multiarray.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_multiarray.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_numeric.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_numeric.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_numerictypes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_numerictypes.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_umath.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_core_umath.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_ma.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_ma.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_ndarray.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_ndarray.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_random_mtrand.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_random_mtrand.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_utils.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_numpy_utils.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pathlib.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pathlib.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pathlib.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pathlib.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pkg_resources.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pkg_resources.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pkg_resources.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pkg_resources.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pytest.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_pytest.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_qt.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_qt.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_random.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_random.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_random.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_random.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_re.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_re.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_regex.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_regex.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_responses.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_responses.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_scipy_signal.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_scipy_signal.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_signal.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_signal.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_six.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_six.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_sqlalchemy.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_sqlalchemy.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_sqlalchemy.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_sqlalchemy.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_ssl.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_ssl.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_subprocess.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_subprocess.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_subprocess.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_subprocess.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_threading.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_threading.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_threading.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_threading.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_type.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_type.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_typing.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_typing.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_unittest.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_unittest.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_uuid.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/brain_uuid.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/helpers.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/helpers.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/brain/__pycache__/helpers.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/brain/__pycache__/helpers.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/dunder_lookup.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/dunder_lookup.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/objectmodel.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/__pycache__/objectmodel.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/spec.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/spec.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/util.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/util.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/util.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/interpreter/_import/__pycache__/util.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/nodes/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/__pycache__/_base_nodes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/__pycache__/_base_nodes.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/__pycache__/as_string.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/__pycache__/as_string.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/__pycache__/const.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/__pycache__/const.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/__pycache__/const.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/astroid/nodes/__pycache__/const.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/astroid/nodes/__pycache__/utils.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/__pycache__/utils.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/mixin.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/mixin.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/scoped_nodes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/scoped_nodes.cpython-312.pyc' './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/utils.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/astroid/nodes/scoped_nodes/__pycache__/utils.cpython-312.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.99629 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-astroid-2.15.6 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic' + export NO_INTERNET=YES + NO_INTERNET=YES + /usr/bin/python3 -m pyproject_installer run -- python3 -m pytest -ra -Wignore INFO : Creating venv INFO : Installing console scripts INFO : Installing package: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6/dist/astroid-2.15.6-py3-none-any.whl INFO : Running command: ['/usr/src/RPM/BUILD/python3-module-astroid-2.15.6/.run_venv/bin/python3', '-m', 'pyproject_installer', 'install', '/usr/src/RPM/BUILD/python3-module-astroid-2.15.6/dist/astroid-2.15.6-py3-none-any.whl'] INFO : Running command: ['python3', '-m', 'pytest', '-ra', '-Wignore'] ============================= test session starts ============================== platform linux -- Python 3.12.1, pytest-8.0.0, pluggy-1.4.0 rootdir: /usr/src/RPM/BUILD/python3-module-astroid-2.15.6 configfile: pyproject.toml testpaths: tests collected 1554 items tests/brain/numpy/test_core_einsumfunc.py ss [ 0%] tests/brain/numpy/test_core_fromnumeric.py s [ 0%] tests/brain/numpy/test_core_function_base.py s [ 0%] tests/brain/numpy/test_core_multiarray.py sssss [ 0%] tests/brain/numpy/test_core_numeric.py sssss [ 0%] tests/brain/numpy/test_core_numerictypes.py sssssss.. [ 1%] tests/brain/numpy/test_core_umath.py ssssssss [ 1%] tests/brain/numpy/test_ma.py ssss [ 2%] tests/brain/numpy/test_ndarray.py sss [ 2%] tests/brain/numpy/test_random_mtrand.py ss [ 2%] tests/brain/test_argparse.py . [ 2%] tests/brain/test_attr.py sssss [ 2%] tests/brain/test_brain.py .s.....s....ss..F.FFFF.FFFFFFFFFF.FFFFFFFFFFFF [ 5%] FFFFFFF.s..........................................................x.... [ 10%] .................. [ 11%] tests/brain/test_builtin.py .................. [ 12%] tests/brain/test_ctypes.py ....x........................ [ 14%] tests/brain/test_dataclasses.py ............FFF...FFF...FFFFF.F......... [ 17%] FFFFFFFFFFFFFFF.........FFF.........F.x... [ 20%] tests/brain/test_dateutil.py s [ 20%] tests/brain/test_enum.py ......................... [ 21%] tests/brain/test_hashlib.py ... [ 21%] tests/brain/test_multiprocessing.py ... [ 22%] tests/brain/test_named_tuple.py ....................... [ 23%] tests/brain/test_nose.py s [ 23%] tests/brain/test_pathlib.py .... [ 23%] tests/brain/test_pytest.py . [ 23%] tests/brain/test_qt.py sss [ 24%] tests/brain/test_regex.py ss [ 24%] tests/brain/test_signal.py ... [ 24%] tests/brain/test_six.py ssssss [ 24%] tests/brain/test_ssl.py . [ 24%] tests/brain/test_threading.py .... [ 25%] tests/brain/test_typing_extensions.py s [ 25%] tests/brain/test_unittest.py . [ 25%] tests/test_builder.py .................................................. [ 28%] ....s.. [ 28%] tests/test_constraint.py ................................... [ 31%] tests/test_decorators.py .... [ 31%] tests/test_filter_statements.py . [ 31%] tests/test_group_exceptions.py ... [ 31%] tests/test_helpers.py ............. [ 32%] tests/test_inference.py ..........................s.............F.F..... [ 35%] .........................................x..........s.....x............. [ 40%] ........................................x............................... [ 44%] ...................................s.........sss........................ [ 49%] ...............................x........xx.....................x...x.... [ 54%] ...................................s......x............................. [ 58%] .......... [ 59%] tests/test_inference_calls.py ........................ [ 61%] tests/test_lookup.py ................................................... [ 64%] .... [ 64%] tests/test_manager.py .......................................... [ 67%] tests/test_modutils.py ................................................. [ 70%] .............s. [ 71%] tests/test_nodes.py .................................................... [ 74%] .............................................. [ 77%] tests/test_nodes_lineno.py s..................F.... [ 79%] tests/test_nodes_position.py ... [ 79%] tests/test_object_model.py x...............x................. [ 81%] tests/test_objects.py ...................... [ 83%] tests/test_protocols.py .................. [ 84%] tests/test_python3.py .......................... [ 85%] tests/test_raw_building.py ..........F.. [ 86%] tests/test_regrtest.py ............ss........... [ 88%] tests/test_scoped_nodes.py ............................................. [ 91%] ...............................F..............ss.......FFFFFFFFFF....... [ 95%] ........s.s...............................F.... [ 98%] tests/test_stdlib.py .. [ 98%] tests/test_transforms.py ........ [ 99%] tests/test_utils.py ........ [100%] =================================== FAILURES =================================== ___________ CollectionsBrain.test_collections_object_subscriptable_3 ___________ self = @test_utils.require_version(minver="3.9") def test_collections_object_subscriptable_3(self): """With Python 3.9 the ByteString class of the collections module is subscritable (but not the same class from typing module)""" right_node = builder.extract_node( """ import collections.abc collections.abc.ByteString[int] """ ) inferred = next(right_node.infer()) > check_metaclass_is_abc(inferred) tests/brain/test_brain.py:335: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ node = def check_metaclass_is_abc(node: nodes.ClassDef): meta = node.metaclass() assert isinstance(meta, nodes.ClassDef) > assert meta.name == "ABCMeta" E AssertionError: assert '_DeprecateByteStringMeta' == 'ABCMeta' E E - ABCMeta E + _DeprecateByteStringMeta tests/brain/test_brain.py:191: AssertionError ________________________ TypingBrain.test_callable_type ________________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_callable_type(self): node = builder.extract_node( """ from typing import Callable, Any Callable[..., Any] """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:604: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ TypingBrain.test_collections_generic_alias_slots _______________ self = def test_collections_generic_alias_slots(self): """Test slots for a class which is a subclass of a generic alias type.""" > node = builder.extract_node( """ import collections import typing Type = typing.TypeVar('Type') class A(collections.abc.AsyncIterator[Type]): __slots__ = ('_value',) def __init__(self, value: collections.abc.AsyncIterator[Type]): self._value = value """ ) tests/brain/test_brain.py:655: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:169: in _post_build self.delayed_assattr(delayed) astroid/builder.py:240: in delayed_assattr for inferred in node.expr.infer(): astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:1157: in infer_assign stmts = list(self.assigned_stmts(context=context)) astroid/protocols.py:412: in _arguments_infer_argname is_metaclass = isinstance(cls, nodes.ClassDef) and cls.type == "metaclass" astroid/nodes/scoped_nodes/scoped_nodes.py:1874: in _class_type if _is_metaclass(klass): astroid/nodes/scoped_nodes/scoped_nodes.py:1845: in _is_metaclass for baseobj in base.infer(): astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:430: in infer_subscript for index in self.slice.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:270: in infer_call for callee in self.func.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ TypingBrain.test_has_dunder_args _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_has_dunder_args(self) -> None: ast_node = builder.extract_node( """ from typing import Union NumericTypes = Union[int, float] NumericTypes.__args__ #@ """ ) > inferred = next(ast_node.infer()) tests/brain/test_brain.py:681: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ TypingBrain.test_namedtuple_base _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_base(self) -> None: > klass = builder.extract_node( """ from typing import NamedTuple class X(NamedTuple("X", [("a", int), ("b", str), ("c", bytes)])): pass """ ) tests/brain/test_brain.py:365: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________ TypingBrain.test_namedtuple_can_correctly_access_methods ___________ self = def test_namedtuple_can_correctly_access_methods(self) -> None: > klass, called = builder.extract_node( """ from typing import NamedTuple class X(NamedTuple): #@ a: int b: int def as_string(self): return '%s' % self.a def as_integer(self): return 2 + 3 X().as_integer() #@ """ ) tests/brain/test_brain.py:380: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ TypingBrain.test_namedtuple_class_form ____________________ self = def test_namedtuple_class_form(self) -> None: > result = builder.extract_node( """ from typing import NamedTuple class Example(NamedTuple): CLASS_ATTR = "class_attr" mything: int Example(mything=1) """ ) tests/brain/test_brain.py:471: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _____________________ TypingBrain.test_namedtuple_few_args _____________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_few_args(self) -> None: result = builder.extract_node( """ from typing import NamedTuple NamedTuple("A") """ ) > inferred = next(result.infer()) tests/brain/test_brain.py:455: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ TypingBrain.test_namedtuple_few_fields ____________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_few_fields(self) -> None: result = builder.extract_node( """ from typing import NamedTuple NamedTuple("A", [("a",), ("b", str), ("c", bytes)]) """ ) > inferred = next(result.infer()) tests/brain/test_brain.py:466: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ TypingBrain.test_namedtuple_inference _____________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_inference(self) -> None: > klass = builder.extract_node( """ from typing import NamedTuple class X(NamedTuple("X", [("a", int), ("b", str), ("c", bytes)])): pass """ ) tests/brain/test_brain.py:400: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ TypingBrain.test_namedtuple_inference_nonliteral _______________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_inference_nonliteral(self) -> None: # Note: NamedTuples in mypy only work with literals. klass = builder.extract_node( """ from typing import NamedTuple name = "X" fields = [("a", int), ("b", str), ("c", bytes)] NamedTuple(name, fields) """ ) > inferred = next(klass.infer()) tests/brain/test_brain.py:422: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________________ TypingBrain.test_namedtuple_inferred_as_class _________________ self = def test_namedtuple_inferred_as_class(self) -> None: node = builder.extract_node( """ from typing import NamedTuple NamedTuple """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:497: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________________ TypingBrain.test_namedtuple_instance_attrs __________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_instance_attrs(self) -> None: result = builder.extract_node( """ from typing import NamedTuple NamedTuple("A", [("a", int), ("b", str), ("c", bytes)])(1, 2, 3) #@ """ ) > inferred = next(result.infer()) tests/brain/test_brain.py:433: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:270: in infer_call for callee in self.func.infer(context): astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ TypingBrain.test_namedtuple_nested_class ___________________ self = def test_namedtuple_nested_class(self): > result = builder.extract_node( """ from typing import NamedTuple class Example(NamedTuple): class Foo: bar = "bar" Example """ ) tests/brain/test_brain.py:565: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______________________ TypingBrain.test_namedtuple_simple ______________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_namedtuple_simple(self) -> None: result = builder.extract_node( """ from typing import NamedTuple NamedTuple("A", [("a", int), ("b", str), ("c", bytes)]) """ ) > inferred = next(result.infer()) tests/brain/test_brain.py:444: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________________ TypingBrain.test_tuple_type __________________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_tuple_type(self): node = builder.extract_node( """ from typing import Tuple Tuple[int, int] """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:592: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________________ TypingBrain.test_typed_dict __________________________ self = @test_utils.require_version("3.8") def test_typed_dict(self): > code = builder.extract_node( """ from typing import TypedDict class CustomTD(TypedDict): #@ var: int CustomTD(var=1) #@ """ ) tests/brain/test_brain.py:699: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______________________ TypingBrain.test_typing_alias_type ______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_alias_type(self): """ Test that the type aliased thanks to typing._alias function are correctly inferred. typing_alias function is introduced with python37 """ > node = builder.extract_node( """ from typing import TypeVar, MutableSet T = TypeVar("T") MutableSet[T] class Derived1(MutableSet[T]): pass """ ) tests/brain/test_brain.py:727: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _____________________ TypingBrain.test_typing_alias_type_2 _____________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_alias_type_2(self): """ Test that the type aliased thanks to typing._alias function are correctly inferred. typing_alias function is introduced with python37. OrderedDict in the typing module appears only with python 3.7.2 """ > node = builder.extract_node( """ import typing class Derived2(typing.OrderedDict[int, str]): pass """ ) tests/brain/test_brain.py:761: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ TypingBrain.test_typing_annotated_subscriptable ________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = @test_utils.require_version(minver="3.9") def test_typing_annotated_subscriptable(self): """Test typing.Annotated is subscriptable with __class_getitem__""" node = builder.extract_node( """ import typing typing.Annotated[str, "data"] """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:631: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________________ TypingBrain.test_typing_cast _________________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_cast(self) -> None: node = builder.extract_node( """ from typing import cast class A: pass b = 42 cast(A, b) """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:913: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:399: in infer_typing_cast func = next(node.func.infer(context=ctx)) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ TypingBrain.test_typing_cast_attribute ____________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_cast_attribute(self) -> None: node = builder.extract_node( """ import typing class A: pass b = 42 typing.cast(A, b) """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:928: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:399: in infer_typing_cast func = next(node.func.infer(context=ctx)) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________ TypingBrain.test_typing_cast_multiple_inference_calls _____________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_cast_multiple_inference_calls(self) -> None: """Inference of an outer function should not store the result for cast. https://github.com/PyCQA/pylint/issues/8074 Possible solution caused RecursionErrors with Python 3.8 and CPython + PyPy. https://github.com/PyCQA/astroid/pull/1982 """ ast_nodes = builder.extract_node( """ from typing import TypeVar, cast T = TypeVar("T") def ident(var: T) -> T: return cast(T, var) ident(2) #@ ident("Hello") #@ """ ) > i0 = next(ast_nodes[0].infer()) tests/brain/test_brain.py:951: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:279: in infer_call yield from callee.infer_call_result(caller=self, context=callcontext) astroid/nodes/scoped_nodes/scoped_nodes.py:1758: in infer_call_result yield from returnnode.value.infer(context) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:399: in infer_typing_cast func = next(node.func.infer(context=ctx)) astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ TypingBrain.test_typing_generic_slots _____________________ self = def test_typing_generic_slots(self): """Test slots for Generic subclass.""" > node = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') class A(Generic[T]): __slots__ = ['value'] def __init__(self, value): self.value = value """ ) tests/brain/test_brain.py:637: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:169: in _post_build self.delayed_assattr(delayed) astroid/builder.py:240: in delayed_assattr for inferred in node.expr.infer(): astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:1157: in infer_assign stmts = list(self.assigned_stmts(context=context)) astroid/protocols.py:412: in _arguments_infer_argname is_metaclass = isinstance(cls, nodes.ClassDef) and cls.type == "metaclass" astroid/nodes/scoped_nodes/scoped_nodes.py:1874: in _class_type if _is_metaclass(klass): astroid/nodes/scoped_nodes/scoped_nodes.py:1845: in _is_metaclass for baseobj in base.infer(): astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:426: in infer_subscript for value in self.value.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________________ TypingBrain.test_typing_generic_subscriptable _________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_generic_subscriptable(self): """Test typing.Generic is subscriptable with __class_getitem__ (added in PY37)""" node = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') Generic[T] """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:618: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________ TypingBrain.test_typing_namedtuple_dont_crash_on_no_fields __________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_namedtuple_dont_crash_on_no_fields(self) -> None: node = builder.extract_node( """ from typing import NamedTuple Bar = NamedTuple("bar", []) Bar() """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:694: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:270: in infer_call for callee in self.func.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_namedtuple_enum.py:549: in infer_typing_namedtuple func = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _____________ TypingBrain.test_typing_object_builtin_subscriptable _____________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = @test_utils.require_version(minver="3.9") def test_typing_object_builtin_subscriptable(self): """ Test that builtins alias, such as typing.List, are subscriptable """ for typename in ("List", "Dict", "Set", "FrozenSet", "Tuple"): src = f""" import typing typing.{typename:s}[int] """ right_node = builder.extract_node(src) > inferred = next(right_node.infer()) tests/brain/test_brain.py:884: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ TypingBrain.test_typing_object_not_subscriptable _______________ @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_object_not_subscriptable(self): """Hashable is not subscriptable""" wrong_node = builder.extract_node( """ import typing typing.Hashable[int] """ ) with self.assertRaises(InferenceError): > next(wrong_node.infer()) tests/brain/test_brain.py:789: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______________ TypingBrain.test_typing_object_notsubscriptable_3 _______________ self = def test_typing_object_notsubscriptable_3(self): """Until python39 ByteString class of the typing module is not subscriptable (whereas it is in the collections' module)""" right_node = builder.extract_node( """ import typing typing.ByteString """ ) > inferred = next(right_node.infer()) tests/brain/test_brain.py:866: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________ TypingBrain.test_typing_object_subscriptable _________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_object_subscriptable(self): """Test that MutableSet is subscriptable""" right_node = builder.extract_node( """ import typing typing.MutableSet[int] """ ) > inferred = next(right_node.infer()) tests/brain/test_brain.py:816: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________________ TypingBrain.test_typing_object_subscriptable_2 ________________ self = def test_typing_object_subscriptable_2(self): """Multiple inheritance with subscriptable typing alias""" > node = builder.extract_node( """ import typing class Derived(typing.Hashable, typing.Iterator[int]): pass """ ) tests/brain/test_brain.py:836: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________________ TypingBrain.test_typing_type_subscriptable __________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: @staticmethod @test_utils.require_version(minver="3.9") def test_typing_type_subscriptable(): node = builder.extract_node( """ from typing import Type Type[int] """ ) > inferred = next(node.infer()) tests/brain/test_brain.py:897: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ TypingBrain.test_typing_type_without_tip ___________________ self = def test_typing_type_without_tip(self): """Regression test for https://github.com/PyCQA/pylint/issues/5770""" node = builder.extract_node( """ from typing import NewType def make_new_type(t): new_type = NewType(f'IntRange_{t}', t) #@ """ ) with self.assertRaises(UseInferenceDefault): > astroid.brain.brain_typing.infer_typing_typevar_or_newtype(node.value) tests/brain/test_brain.py:562: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/brain/brain_typing.py:127: in infer_typing_typevar_or_newtype func = next(node.func.infer(context=context_itton)) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________________________ TypingBrain.test_typing_types _________________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_typing_types(self) -> None: ast_nodes = builder.extract_node( """ from typing import TypeVar, Iterable, Tuple, NewType, Dict, Union TypeVar('MyTypeVar', int, float, complex) #@ Iterable[Tuple[MyTypeVar, MyTypeVar]] #@ TypeVar('AnyStr', str, bytes) #@ NewType('UserId', str) #@ Dict[str, str] #@ Union[int, str] #@ """ ) for node in ast_nodes: > inferred = next(node.infer()) tests/brain/test_brain.py:548: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:127: in infer_typing_typevar_or_newtype func = next(node.func.infer(context=context_itton)) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______________________ test_inference_method[dataclasses] ______________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_inference_method(module: str): """Test inference of dataclass attribute within a method, with a default_factory field. Based on https://github.com/PyCQA/pylint/issues/2600 """ > node = astroid.extract_node( f""" from typing import Dict from {module} import dataclass from dataclasses import field @dataclass class TestClass: foo: str bar: str baz_dict: Dict[str, str] = field(default_factory=dict) def some_func(self) -> None: f = self.baz_dict.items #@ for key, value in f(): print(key) print(value) """ ) tests/brain/test_dataclasses.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________ test_inference_method[pydantic.dataclasses] __________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_inference_method(module: str): """Test inference of dataclass attribute within a method, with a default_factory field. Based on https://github.com/PyCQA/pylint/issues/2600 """ > node = astroid.extract_node( f""" from typing import Dict from {module} import dataclass from dataclasses import field @dataclass class TestClass: foo: str bar: str baz_dict: Dict[str, str] = field(default_factory=dict) def some_func(self) -> None: f = self.baz_dict.items #@ for key, value in f(): print(key) print(value) """ ) tests/brain/test_dataclasses.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________ test_inference_method[marshmallow_dataclass] _________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_inference_method(module: str): """Test inference of dataclass attribute within a method, with a default_factory field. Based on https://github.com/PyCQA/pylint/issues/2600 """ > node = astroid.extract_node( f""" from typing import Dict from {module} import dataclass from dataclasses import field @dataclass class TestClass: foo: str bar: str baz_dict: Dict[str, str] = field(default_factory=dict) def some_func(self) -> None: f = self.baz_dict.items #@ for key, value in f(): print(key) print(value) """ ) tests/brain/test_dataclasses.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ test_inference_class_var[dataclasses] _____________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_inference_class_var(module: str): """Test that class variables with a ClassVar type annotations are not turned into instance attributes. """ > class_def, klass, instance = astroid.extract_node( f""" from {module} import dataclass from typing import ClassVar @dataclass class A: name: ClassVar[str] = 'hi' A #@ A.name #@ A().name #@ """ ) tests/brain/test_dataclasses.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________________ test_inference_class_var[pydantic.dataclasses] ________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_inference_class_var(module: str): """Test that class variables with a ClassVar type annotations are not turned into instance attributes. """ > class_def, klass, instance = astroid.extract_node( f""" from {module} import dataclass from typing import ClassVar @dataclass class A: name: ClassVar[str] = 'hi' A #@ A.name #@ A().name #@ """ ) tests/brain/test_dataclasses.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ test_inference_class_var[marshmallow_dataclass] ________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_inference_class_var(module: str): """Test that class variables with a ClassVar type annotations are not turned into instance attributes. """ > class_def, klass, instance = astroid.extract_node( f""" from {module} import dataclass from typing import ClassVar @dataclass class A: name: ClassVar[str] = 'hi' A #@ A.name #@ A().name #@ """ ) tests/brain/test_dataclasses.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________ test_inference_generic_collection_attribute[dataclasses] ___________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_inference_generic_collection_attribute(module: str): """Test that an attribute with a generic collection type from the typing module is inferred correctly. """ > attr_nodes = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field import typing @dataclass class A: dict_prop: typing.Dict[str, str] frozenset_prop: typing.FrozenSet[str] list_prop: typing.List[str] set_prop: typing.Set[str] tuple_prop: typing.Tuple[int, str] a = A({{}}, frozenset(), [], set(), (1, 'hi')) a.dict_prop #@ a.frozenset_prop #@ a.list_prop #@ a.set_prop #@ a.tuple_prop #@ """ ) tests/brain/test_dataclasses.py:271: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______ test_inference_generic_collection_attribute[pydantic.dataclasses] _______ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_inference_generic_collection_attribute(module: str): """Test that an attribute with a generic collection type from the typing module is inferred correctly. """ > attr_nodes = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field import typing @dataclass class A: dict_prop: typing.Dict[str, str] frozenset_prop: typing.FrozenSet[str] list_prop: typing.List[str] set_prop: typing.Set[str] tuple_prop: typing.Tuple[int, str] a = A({{}}, frozenset(), [], set(), (1, 'hi')) a.dict_prop #@ a.frozenset_prop #@ a.list_prop #@ a.set_prop #@ a.tuple_prop #@ """ ) tests/brain/test_dataclasses.py:271: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______ test_inference_generic_collection_attribute[marshmallow_dataclass] ______ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_inference_generic_collection_attribute(module: str): """Test that an attribute with a generic collection type from the typing module is inferred correctly. """ > attr_nodes = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field import typing @dataclass class A: dict_prop: typing.Dict[str, str] frozenset_prop: typing.FrozenSet[str] list_prop: typing.List[str] set_prop: typing.Set[str] tuple_prop: typing.Tuple[int, str] a = A({{}}, frozenset(), [], set(), (1, 'hi')) a.dict_prop #@ a.frozenset_prop #@ a.list_prop #@ a.set_prop #@ a.tuple_prop #@ """ ) tests/brain/test_dataclasses.py:271: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________ test_inference_callable_attribute[dataclasses-typing] _____________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses', typing_module = 'typing' @pytest.mark.parametrize( ("module", "typing_module"), [ ("dataclasses", "typing"), ("pydantic.dataclasses", "typing"), ("pydantic.dataclasses", "collections.abc"), ("marshmallow_dataclass", "typing"), ("marshmallow_dataclass", "collections.abc"), ], ) def test_inference_callable_attribute(module: str, typing_module: str): """Test that an attribute with a Callable annotation is inferred as Uninferable. See issue #1129 and PyCQA/pylint#4895 """ > instance = astroid.extract_node( f""" from {module} import dataclass from {typing_module} import Any, Callable @dataclass class A: enabled: Callable[[Any], bool] A(lambda x: x == 42).enabled #@ """ ) tests/brain/test_dataclasses.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________ test_inference_callable_attribute[pydantic.dataclasses-typing] ________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses', typing_module = 'typing' @pytest.mark.parametrize( ("module", "typing_module"), [ ("dataclasses", "typing"), ("pydantic.dataclasses", "typing"), ("pydantic.dataclasses", "collections.abc"), ("marshmallow_dataclass", "typing"), ("marshmallow_dataclass", "collections.abc"), ], ) def test_inference_callable_attribute(module: str, typing_module: str): """Test that an attribute with a Callable annotation is inferred as Uninferable. See issue #1129 and PyCQA/pylint#4895 """ > instance = astroid.extract_node( f""" from {module} import dataclass from {typing_module} import Any, Callable @dataclass class A: enabled: Callable[[Any], bool] A(lambda x: x == 42).enabled #@ """ ) tests/brain/test_dataclasses.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______ test_inference_callable_attribute[marshmallow_dataclass-typing] ________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass', typing_module = 'typing' @pytest.mark.parametrize( ("module", "typing_module"), [ ("dataclasses", "typing"), ("pydantic.dataclasses", "typing"), ("pydantic.dataclasses", "collections.abc"), ("marshmallow_dataclass", "typing"), ("marshmallow_dataclass", "collections.abc"), ], ) def test_inference_callable_attribute(module: str, typing_module: str): """Test that an attribute with a Callable annotation is inferred as Uninferable. See issue #1129 and PyCQA/pylint#4895 """ > instance = astroid.extract_node( f""" from {module} import dataclass from {typing_module} import Any, Callable @dataclass class A: enabled: Callable[[Any], bool] A(lambda x: x == 42).enabled #@ """ ) tests/brain/test_dataclasses.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______________________ test_init_no_defaults[dataclasses] ______________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_init_no_defaults(module: str): """Test init for a dataclass with attributes and no defaults.""" > node = astroid.extract_node( f""" from {module} import dataclass from typing import List @dataclass class A: x: int y: str z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________ test_init_no_defaults[pydantic.dataclasses] __________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_init_no_defaults(module: str): """Test init for a dataclass with attributes and no defaults.""" > node = astroid.extract_node( f""" from {module} import dataclass from typing import List @dataclass class A: x: int y: str z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________ test_init_no_defaults[marshmallow_dataclass] _________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_init_no_defaults(module: str): """Test init for a dataclass with attributes and no defaults.""" > node = astroid.extract_node( f""" from {module} import dataclass from typing import List @dataclass class A: x: int y: str z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ test_init_defaults[dataclasses] ________________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_init_defaults(module: str): """Test init for a dataclass with attributes and some defaults.""" > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field from typing import List @dataclass class A: w: int x: int = 10 y: str = field(default="hi") z: List[bool] = field(default_factory=list) A.__init__ #@ """ ) tests/brain/test_dataclasses.py:518: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ test_init_defaults[pydantic.dataclasses] ___________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_init_defaults(module: str): """Test init for a dataclass with attributes and some defaults.""" > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field from typing import List @dataclass class A: w: int x: int = 10 y: str = field(default="hi") z: List[bool] = field(default_factory=list) A.__init__ #@ """ ) tests/brain/test_dataclasses.py:518: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________________ test_init_defaults[marshmallow_dataclass] ___________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_init_defaults(module: str): """Test init for a dataclass with attributes and some defaults.""" > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field from typing import List @dataclass class A: w: int x: int = 10 y: str = field(default="hi") z: List[bool] = field(default_factory=list) A.__init__ #@ """ ) tests/brain/test_dataclasses.py:518: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ________________________ test_init_initvar[dataclasses] ________________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_init_initvar(module: str): """Test init for a dataclass with attributes and an InitVar.""" > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import InitVar from typing import List @dataclass class A: x: int y: str init_var: InitVar[int] z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ test_init_initvar[pydantic.dataclasses] ____________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_init_initvar(module: str): """Test init for a dataclass with attributes and an InitVar.""" > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import InitVar from typing import List @dataclass class A: x: int y: str init_var: InitVar[int] z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ test_init_initvar[marshmallow_dataclass] ___________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_init_initvar(module: str): """Test init for a dataclass with attributes and an InitVar.""" > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import InitVar from typing import List @dataclass class A: x: int y: str init_var: InitVar[int] z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _________________ test_init_decorator_init_false[dataclasses] __________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_init_decorator_init_false(module: str): """Test that no init is generated when init=False is passed to dataclass decorator. """ > node = astroid.extract_node( f""" from {module} import dataclass from typing import List @dataclass(init=False) class A: x: int y: str z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:585: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _____________ test_init_decorator_init_false[pydantic.dataclasses] _____________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_init_decorator_init_false(module: str): """Test that no init is generated when init=False is passed to dataclass decorator. """ > node = astroid.extract_node( f""" from {module} import dataclass from typing import List @dataclass(init=False) class A: x: int y: str z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:585: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________ test_init_decorator_init_false[marshmallow_dataclass] _____________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_init_decorator_init_false(module: str): """Test that no init is generated when init=False is passed to dataclass decorator. """ > node = astroid.extract_node( f""" from {module} import dataclass from typing import List @dataclass(init=False) class A: x: int y: str z: List[bool] A.__init__ #@ """ ) tests/brain/test_dataclasses.py:585: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ test_init_field_init_false[dataclasses] ____________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'dataclasses' @parametrize_module def test_init_field_init_false(module: str): """Test init for a dataclass with attributes with a field value where init=False (these attributes should not be included in the initializer). """ > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field from typing import List @dataclass class A: x: int y: str z: List[bool] = field(init=False) A.__init__ #@ """ ) tests/brain/test_dataclasses.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ test_init_field_init_false[pydantic.dataclasses] _______________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'pydantic.dataclasses' @parametrize_module def test_init_field_init_false(module: str): """Test init for a dataclass with attributes with a field value where init=False (these attributes should not be included in the initializer). """ > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field from typing import List @dataclass class A: x: int y: str z: List[bool] = field(init=False) A.__init__ #@ """ ) tests/brain/test_dataclasses.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ______________ test_init_field_init_false[marshmallow_dataclass] _______________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: module = 'marshmallow_dataclass' @parametrize_module def test_init_field_init_false(module: str): """Test init for a dataclass with attributes with a field value where init=False (these attributes should not be included in the initializer). """ > node = astroid.extract_node( f""" from {module} import dataclass from dataclasses import field from typing import List @dataclass class A: x: int y: str z: List[bool] = field(init=False) A.__init__ #@ """ ) tests/brain/test_dataclasses.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________ test_annotated_enclosed_field_call[dataclasses] ________________ module = 'dataclasses' @parametrize_module def test_annotated_enclosed_field_call(module: str): """Test inference of dataclass attribute with a field call in another function call. """ > node = astroid.extract_node( f""" from {module} import dataclass, field from typing import cast @dataclass class A: attribute: int = cast(int, field(default_factory=dict)) """ ) tests/brain/test_dataclasses.py:727: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_dataclasses.py:500: in _looks_like_dataclass_field_call inferred = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________ test_annotated_enclosed_field_call[pydantic.dataclasses] ___________ module = 'pydantic.dataclasses' @parametrize_module def test_annotated_enclosed_field_call(module: str): """Test inference of dataclass attribute with a field call in another function call. """ > node = astroid.extract_node( f""" from {module} import dataclass, field from typing import cast @dataclass class A: attribute: int = cast(int, field(default_factory=dict)) """ ) tests/brain/test_dataclasses.py:727: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_dataclasses.py:500: in _looks_like_dataclass_field_call inferred = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________ test_annotated_enclosed_field_call[marshmallow_dataclass] ___________ module = 'marshmallow_dataclass' @parametrize_module def test_annotated_enclosed_field_call(module: str): """Test inference of dataclass attribute with a field call in another function call. """ > node = astroid.extract_node( f""" from {module} import dataclass, field from typing import cast @dataclass class A: attribute: int = cast(int, field(default_factory=dict)) """ ) tests/brain/test_dataclasses.py:727: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_dataclasses.py:500: in _looks_like_dataclass_field_call inferred = next(node.func.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _____________________ test_dataclass_with_default_factory ______________________ func = , instance = None args = (, None), kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: def test_dataclass_with_default_factory() -> None: """Regression test for dataclasses with default values. Reported in https://github.com/PyCQA/pylint/issues/7425 """ > bad_node, good_node = astroid.extract_node( """ from dataclasses import dataclass from typing import Union @dataclass class BadExampleParentClass: xyz: Union[str, int] @dataclass class BadExampleClass(BadExampleParentClass): xyz: str = "" BadExampleClass.__init__ #@ @dataclass class GoodExampleParentClass: xyz: str @dataclass class GoodExampleClass(GoodExampleParentClass): xyz: str = "" GoodExampleClass.__init__ #@ """ ) tests/brain/test_dataclasses.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:39: in _transform ret = transform_func(node) astroid/brain/brain_dataclasses.py:66: in dataclass_transform for assign_node in _get_dataclass_attributes(node): astroid/brain/brain_dataclasses.py:126: in _get_dataclass_attributes if _is_class_var(assign_node.annotation): # type: ignore[arg-type] astroid/brain/brain_dataclasses.py:546: in _is_class_var inferred = next(node.infer()) astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________ InferenceTest.test_binary_op_not_used_in_boolean_context ___________ self = @pytest.mark.filterwarnings("error::DeprecationWarning") def test_binary_op_not_used_in_boolean_context(self) -> None: > ast_node = extract_node("not NotImplemented") tests/test_inference.py:1121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:151: in string_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:245: in visit_module node, doc_ast_node = self._get_doc(node) astroid/rebuilder.py:84: in _get_doc if isinstance(first_value, self._module.Str) or ( /usr/lib/python3.12/ast.py:555: in __instancecheck__ warnings._deprecated( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'ast.Str' message = '{name} is deprecated and will be removed in Python {remove}; use ast.Constant instead' def _deprecated(name, message=_DEPRECATED_MSG, *, remove, _version=sys.version_info): """Warn that *name* is deprecated or should be removed. RuntimeError is raised if *remove* specifies a major/minor tuple older than the current Python version or the same version but past the alpha. The *message* argument is formatted with *name* and *remove* as a Python version (e.g. "3.11"). """ remove_formatted = f"{remove[0]}.{remove[1]}" if (_version[:2] > remove) or (_version[:2] == remove and _version[3] != "alpha"): msg = f"{name!r} was slated for removal after Python {remove_formatted} alpha" raise RuntimeError(msg) else: msg = message.format(name=name, remove=remove_formatted) > warn(msg, DeprecationWarning, stacklevel=3) E DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead /usr/lib/python3.12/warnings.py:529: DeprecationWarning __________________ InferenceTest.test_binary_op_or_union_type __________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_binary_op_or_union_type(self) -> None: """Binary or union is only defined for Python 3.10+.""" code = """ class A: ... int | 2 #@ int | "Hello" #@ int | ... #@ int | A() #@ int | None | 2 #@ """ ast_nodes = extract_node(code) for n in ast_nodes: assert n.inferred() == [util.Uninferable] code = """ from typing import List class A: ... class B: ... int | None #@ int | str #@ int | str | None #@ A | B #@ A | None #@ List[int] | int #@ tuple | int #@ """ ast_nodes = extract_node(code) if not PY310_PLUS: for n in ast_nodes: assert n.inferred() == [util.Uninferable] else: i0 = ast_nodes[0].inferred()[0] assert isinstance(i0, UnionType) assert isinstance(i0.left, nodes.ClassDef) assert i0.left.name == "int" assert isinstance(i0.right, nodes.Const) assert i0.right.value is None # Assert basic UnionType properties and methods assert i0.callable() is False assert i0.bool_value() is True assert i0.pytype() == "types.UnionType" assert i0.display_type() == "UnionType" assert str(i0) == "UnionType(UnionType)" assert repr(i0) == f"" i1 = ast_nodes[1].inferred()[0] assert isinstance(i1, UnionType) i2 = ast_nodes[2].inferred()[0] assert isinstance(i2, UnionType) assert isinstance(i2.left, UnionType) assert isinstance(i2.left.left, nodes.ClassDef) assert i2.left.left.name == "int" assert isinstance(i2.left.right, nodes.ClassDef) assert i2.left.right.name == "str" assert isinstance(i2.right, nodes.Const) assert i2.right.value is None i3 = ast_nodes[3].inferred()[0] assert isinstance(i3, UnionType) assert isinstance(i3.left, nodes.ClassDef) assert i3.left.name == "A" assert isinstance(i3.right, nodes.ClassDef) assert i3.right.name == "B" i4 = ast_nodes[4].inferred()[0] assert isinstance(i4, UnionType) > i5 = ast_nodes[5].inferred()[0] tests/test_inference.py:1284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:613: in inferred return list(self.infer()) astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:130: in yes_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:551: in _filter_operation_errors for result in infer_callable(self, context): astroid/inference.py:964: in _infer_binop for lhs, rhs in itertools.product(lhs_iter, rhs_iter): astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________________ TestLinenoColOffset.test_end_lineno_string __________________ @staticmethod def test_end_lineno_string() -> None: """FormattedValue, JoinedStr.""" code = textwrap.dedent( """ f"Hello World: {42.1234:02d}" #@ f"Hello: {name=}" #@ """ ).strip() ast_nodes = builder.extract_node(code) assert isinstance(ast_nodes, list) and len(ast_nodes) == 2 s1 = ast_nodes[0] assert isinstance(s1, nodes.JoinedStr) assert isinstance(s1.values[0], nodes.Const) assert (s1.lineno, s1.col_offset) == (1, 0) assert (s1.end_lineno, s1.end_col_offset) == (1, 29) > assert (s1.values[0].lineno, s1.values[0].col_offset) == (1, 0) E assert (1, 2) == (1, 0) E E At index 1 diff: 2 != 0 E Use -v to get more diff tests/test_nodes_lineno.py:980: AssertionError _________________________ RawBuildingTC.test_io_is__io _________________________ self = @unittest.skipIf(IS_PYPY, "Only affects CPython") def test_io_is__io(self): # _io module calls itself io. This leads # to cyclic dependencies when astroid tries to resolve # what io.BufferedReader is. The code that handles this # is in astroid.raw_building.imported_member, which verifies # the true name of the module. builder = AstroidBuilder() module = builder.inspect_build(_io) buffered_reader = module.getattr("BufferedReader")[0] > self.assertEqual(buffered_reader.root().name, "io") E AssertionError: '_io' != 'io' E - _io E ? - E + io tests/test_raw_building.py:103: AssertionError ____________________ ClassNodeTest.test_has_dynamic_getattr ____________________ self = def test_has_dynamic_getattr(self) -> None: module = builder.parse( """ class Getattr(object): def __getattr__(self, attrname): pass class Getattribute(object): def __getattribute__(self, attrname): pass class ParentGetattr(Getattr): pass """ ) self.assertTrue(module["Getattr"].has_dynamic_getattr()) self.assertTrue(module["Getattribute"].has_dynamic_getattr()) self.assertTrue(module["ParentGetattr"].has_dynamic_getattr()) # Test that objects analyzed through the live introspection # aren't considered to have dynamic getattr implemented. astroid_builder = builder.AstroidBuilder() module = astroid_builder.module_build(datetime) > self.assertFalse(module["timedelta"].has_dynamic_getattr()) E AttributeError: 'ImportFrom' object has no attribute 'has_dynamic_getattr' tests/test_scoped_nodes.py:2122: AttributeError _______________________ ClassNodeTest.test_mro_generic_1 _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_1(self): > cls = builder.extract_node( """ import typing T = typing.TypeVar('T') class A(typing.Generic[T]): ... class B: ... class C(A[T], B): ... """ ) tests/test_scoped_nodes.py:1777: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:358: in infer_attribute for owner in self.expr.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:304: in infer_import yield self.do_import_module(self.real_name(name)) astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ ClassNodeTest.test_mro_generic_2 _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_2(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') class A: ... class B(Generic[T]): ... class C(Generic[T], A, B[T]): ... """ ) tests/test_scoped_nodes.py:1792: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ ClassNodeTest.test_mro_generic_3 _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_3(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') class A: ... class B(A, Generic[T]): ... class C(Generic[T]): ... class D(B[T], C[T], Generic[T]): ... """ ) tests/test_scoped_nodes.py:1807: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ ClassNodeTest.test_mro_generic_4 _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_4(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') class A: ... class B(Generic[T]): ... class C(A, Generic[T], B[T]): ... """ ) tests/test_scoped_nodes.py:1823: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ ClassNodeTest.test_mro_generic_5 _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_5(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T1 = TypeVar('T1') T2 = TypeVar('T2') class A(Generic[T1]): ... class B(Generic[T2]): ... class C(A[T1], B[T2]): ... """ ) tests/test_scoped_nodes.py:1838: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ ClassNodeTest.test_mro_generic_6 _______________________ self = def test_mro_generic_6(self): > cls = builder.extract_node( """ from typing import Generic as TGeneric, TypeVar T = TypeVar('T') class Generic: ... class A(Generic): ... class B(TGeneric[T]): ... class C(A, B[T]): ... """ ) tests/test_scoped_nodes.py:1854: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:426: in infer_subscript for value in self.value.infer(context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError _______________________ ClassNodeTest.test_mro_generic_7 _______________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_7(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') class A(): ... class B(Generic[T]): ... class C(A, B[T]): ... class D: ... class E(C[str], D): ... """ ) tests/test_scoped_nodes.py:1870: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ ClassNodeTest.test_mro_generic_error_1 ____________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_error_1(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T1 = TypeVar('T1') T2 = TypeVar('T2') class A(Generic[T1], Generic[T2]): ... """ ) tests/test_scoped_nodes.py:1887: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ____________________ ClassNodeTest.test_mro_generic_error_2 ____________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: self = def test_mro_generic_error_2(self): > cls = builder.extract_node( """ from typing import Generic, TypeVar T = TypeVar('T') class A(Generic[T]): ... class B(A[T], A[T]): ... """ ) tests/test_scoped_nodes.py:1900: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:450: in extract_node tree = parse(code, module_name=module_name) astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ___________________ ClassNodeTest.test_mro_typing_extensions ___________________ self = def test_mro_typing_extensions(self): """Regression test for mro() inference on typing_extesnions. Regression reported in: https://github.com/PyCQA/astroid/issues/1124 """ > module = parse( """ import abc import typing import dataclasses if sys.version_info >= (3, 8): from typing import Protocol else: from typing_extensions import Protocol T = typing.TypeVar("T") class MyProtocol(Protocol): pass class EarlyBase(typing.Generic[T], MyProtocol): pass class Base(EarlyBase[T], abc.ABC): pass class Final(Base[object]): pass """ ) tests/test_scoped_nodes.py:1918: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError __________________________ test_ancestor_with_generic __________________________ func = , instance = None args = (, ) kwargs = {} @wrapt.decorator def _inference_tip_cached( func: InferFn, instance: None, args: typing.Any, kwargs: typing.Any ) -> Iterator[InferenceResult]: """Cache decorator used for inference tips.""" node = args[0] try: > result = _cache[func, node] E KeyError: (, ) astroid/inference_tip.py:33: KeyError During handling of the above exception, another exception occurred: def test_ancestor_with_generic() -> None: # https://github.com/PyCQA/astroid/issues/942 > tree = builder.parse( """ from typing import TypeVar, Generic T = TypeVar("T") class A(Generic[T]): def a_method(self): print("hello") class B(A[T]): pass class C(B[str]): pass """ ) tests/test_scoped_nodes.py:2737: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/builder.py:307: in parse return builder.string_build(code, modname=module_name, path=path) astroid/builder.py:153: in string_build return self._post_build(module, builder, "utf-8") astroid/builder.py:173: in _post_build module = self._manager.visit_transforms(module) astroid/manager.py:109: in visit_transforms return self._transform.visit(node) astroid/transforms.py:89: in visit return self._visit(module) astroid/transforms.py:54: in _visit visited = self._visit_generic(value) astroid/transforms.py:61: in _visit_generic return [self._visit_generic(child) for child in node] astroid/transforms.py:67: in _visit_generic return self._visit(node) astroid/transforms.py:57: in _visit return self._transform(node) astroid/transforms.py:38: in _transform if predicate is None or predicate(node): astroid/brain/brain_namedtuple_enum.py:613: in _is_enum_subclass for klass in cls.mro() astroid/nodes/scoped_nodes/scoped_nodes.py:3066: in mro return self._compute_mro(context=context) astroid/nodes/scoped_nodes/scoped_nodes.py:3035: in _compute_mro inferred_bases = list(self._inferred_bases(context=context)) astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in _inferred_bases baseobj = next( astroid/nodes/scoped_nodes/scoped_nodes.py:3018: in baseobj = next( astroid/nodes/node_ng.py:161: in infer results = list(self._explicit_inference(self, context, **kwargs)) astroid/inference_tip.py:40: in _inference_tip_cached result = _cache[func, node] = list(func(*args, **kwargs)) astroid/brain/brain_typing.py:160: in infer_typing_attr value = next(node.value.infer()) # type: ignore[union-attr] # value shouldn't be None for Subscript. astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/bases.py:177: in _infer_stmts for inf in stmt.infer(context=context): astroid/nodes/node_ng.py:184: in infer for i, result in enumerate(self._infer(context=context, **kwargs)): astroid/decorators.py:143: in raise_if_nothing_inferred yield next(generator) astroid/decorators.py:112: in wrapped for res in _func(node, context, **kwargs): astroid/inference.py:334: in infer_import_from module = self.do_import_module() astroid/nodes/_base_nodes.py:146: in do_import_module return mymodule.import_module( astroid/nodes/scoped_nodes/scoped_nodes.py:530: in import_module return AstroidManager().ast_from_module_name( astroid/manager.py:246: in ast_from_module_name return self.ast_from_file(found_spec.location, modname, fallback=False) astroid/manager.py:138: in ast_from_file return AstroidBuilder(self).file_build(filepath, modname) astroid/builder.py:144: in file_build module, builder = self._data_build(data, modname, path) astroid/builder.py:204: in _data_build module = builder.visit_module(node, modname, node_file, package) astroid/rebuilder.py:254: in visit_module [self.visit(child, newnode) for child in node.body], _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = node = parent = def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None: if node is None: return None cls = node.__class__ if cls in self._visit_meths: visit_method = self._visit_meths[cls] else: cls_name = cls.__name__ visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower() > visit_method = getattr(self, visit_name) E AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias' astroid/rebuilder.py:609: AttributeError ================================== XFAILURES =================================== ______________ TestLenBuiltinInference.test_int_subclass_argument ______________ func = > instance = , args = (), kwargs = {'context': None} @wrapt.decorator def raise_if_nothing_inferred(func, instance, args, kwargs): generator = func(*args, **kwargs) try: > yield next(generator) E StopIteration astroid/decorators.py:143: StopIteration The above exception was the direct cause of the following exception: self = @pytest.mark.xfail(reason="Can't use list special astroid fields") def test_int_subclass_argument(self): """I am unable to access the length of an object which subclasses list""" node = astroid.extract_node( """ class ListSubclass(list): pass len(ListSubclass([1,2,3,4,4])) """ ) > assert next(node.infer()).as_string() == "5" tests/brain/test_brain.py:1591: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ astroid/nodes/node_ng.py:171: in infer yield from self._infer(context=context, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ func = > instance = , args = (), kwargs = {'context': None} @wrapt.decorator def raise_if_nothing_inferred(func, instance, args, kwargs): generator = func(*args, **kwargs) try: yield next(generator) except StopIteration as error: # generator is empty if error.args: # pylint: disable=not-a-mapping raise InferenceError(**error.args[0]) from error > raise InferenceError( "StopIteration raised without any error information." ) from error E astroid.exceptions.InferenceError: StopIteration raised without any error information. astroid/decorators.py:149: InferenceError _ test_ctypes_redefined_types_members[c_buffer-bytes-] __ c_type = 'c_buffer', builtin_type = 'bytes' type_code = "" @pytest.mark.parametrize( "c_type,builtin_type,type_code", [ ("c_bool", "bool", "?"), ("c_byte", "int", "b"), ("c_char", "bytes", "c"), ("c_double", "float", "d"), pytest.param( "c_buffer", "bytes", "", marks=pytest.mark.xfail( reason="c_buffer is Uninferable but for now we do not know why" ), ), ("c_float", "float", "f"), ("c_int", "int", "i"), ("c_int16", "int", "h"), ("c_int32", "int", "i"), ("c_int64", "int", "l"), ("c_int8", "int", "b"), ("c_long", "int", "l"), ("c_longdouble", "float", "g"), ("c_longlong", "int", "l"), ("c_short", "int", "h"), ("c_size_t", "int", "L"), ("c_ssize_t", "int", "l"), ("c_ubyte", "int", "B"), ("c_uint", "int", "I"), ("c_uint16", "int", "H"), ("c_uint32", "int", "I"), ("c_uint64", "int", "L"), ("c_uint8", "int", "B"), ("c_ulong", "int", "L"), ("c_ulonglong", "int", "L"), ("c_ushort", "int", "H"), ("c_wchar", "str", "u"), ], ) def test_ctypes_redefined_types_members(c_type, builtin_type, type_code): """Test that the "value" and "_type_" member of each redefined types are correct. """ src = f""" import ctypes x=ctypes.{c_type}("toto") x.value """ node = extract_node(src) assert isinstance(node, nodes.NodeNG) node_inf = node.inferred()[0] > assert node_inf.pytype() == f"builtins.{builtin_type}" E AssertionError: assert Uninferable == 'builtins.bytes' E + where Uninferable = Uninferable() E + where Uninferable = Uninferable.pytype tests/brain/test_ctypes.py:71: AssertionError ______________ test_dataclass_non_default_argument_after_default _______________ @pytest.mark.xfail(reason="Transforms returning Uninferable isn't supported.") def test_dataclass_non_default_argument_after_default() -> None: """Test that a non-default argument after a default argument is not allowed. This should succeed, but the dataclass brain is a transform which currently can't return an Uninferable correctly. Therefore, we can't set the dataclass ClassDef node to be Uninferable currently. Eventually it can be merged into test_dataclass_with_multiple_inheritance. """ impossible = astroid.extract_node( """ from dataclasses import dataclass @dataclass class BaseParent: required: bool @dataclass class FirstChild(BaseParent): ... @dataclass class SecondChild(BaseParent): optional: bool = False @dataclass class ThirdChild: other: bool = False @dataclass class ImpossibleGrandChild(FirstChild, SecondChild, ThirdChild): ... ImpossibleGrandChild() #@ """ ) > assert next(impossible.infer()) is Uninferable E assert is Uninferable E + where = next() E + where = >() E + where > = .infer tests/brain/test_dataclasses.py:1173: AssertionError __________________ InferenceTest.test_descriptor_are_callable __________________ self = @pytest.mark.xfail(reason="Descriptors are not properly inferred as callable") def test_descriptor_are_callable(self): code = """ class A: statm = staticmethod(open) clsm = classmethod('whatever') """ ast = parse(code, __name__) statm = next(ast["A"].igetattr("statm")) > self.assertTrue(statm.callable()) E AssertionError: Uninferable is not true tests/test_inference.py:517: AssertionError ___________________ InferenceTest.test_function_metaclasses ____________________ self = @pytest.mark.xfail(reason="Does not support function metaclasses") def test_function_metaclasses(self): # These are not supported right now, although # they will be in the future. ast_node = extract_node( """ class BookMeta(type): author = 'Rushdie' def metaclass_function(*args): return BookMeta class Book(object, metaclass=metaclass_function): pass Book #@ """ ) inferred = next(ast_node.infer()) metaclass = inferred.metaclass() > self.assertIsInstance(metaclass, nodes.ClassDef) E AssertionError: is not an instance of tests/test_inference.py:3991: AssertionError _______ InferenceTest.test_metaclass_arguments_are_classes_not_instances _______ self = @pytest.mark.xfail(reason="Metaclass arguments not inferred as classes") def test_metaclass_arguments_are_classes_not_instances(self): ast_node = extract_node( """ class A(type): def test(cls): return cls A.test() #@ """ ) # This is not supported yet inferred = next(ast_node.infer()) > self.assertIsInstance(inferred, nodes.ClassDef) E AssertionError: is not an instance of tests/test_inference.py:4168: AssertionError ____________ TestInferencePropagation.test_call_context_propagation ____________ self = @pytest.mark.xfail(reason="Relying on path copy") def test_call_context_propagation(self): n = extract_node( """ def chest(a): return a * a def best(a, b): return chest(a) def test(a, b, c): return best(a, b) test(4, 5, 6) #@ """ ) > assert next(n.infer()).as_string() == "16" E AssertionError: assert Uninferable == '16' E + where Uninferable = Uninferable() E + where Uninferable = Uninferable.as_string E + where Uninferable = next() E + where = >() E + where > = .infer tests/test_inference.py:5561: AssertionError ________________________ test_compare_identity[is-True] ________________________ op = 'is', result = True @pytest.mark.xfail(reason="uninferable") @pytest.mark.parametrize( "op,result", [ ("is", True), ("is not", False), ], ) def test_compare_identity(op, result) -> None: code = f""" obj = object() obj {op} obj """ node = extract_node(code) inferred = next(node.infer()) > assert inferred.value == result E assert Uninferable == True E + where Uninferable = Uninferable.value tests/test_inference.py:5619: AssertionError _____________________ test_compare_identity[is not-False] ______________________ op = 'is not', result = False @pytest.mark.xfail(reason="uninferable") @pytest.mark.parametrize( "op,result", [ ("is", True), ("is not", False), ], ) def test_compare_identity(op, result) -> None: code = f""" obj = object() obj {op} obj """ node = extract_node(code) inferred = next(node.infer()) > assert inferred.value == result E assert Uninferable == False E + where Uninferable = Uninferable.value tests/test_inference.py:5619: AssertionError _____________________________ test_compare_dynamic _____________________________ @pytest.mark.xfail(reason="unimplemented") def test_compare_dynamic() -> None: code = """ class A: def __le__(self, other): return True A() <= None """ node = extract_node(code) inferred = next(node.infer()) > assert inferred.value is True E assert Uninferable is True E + where Uninferable = Uninferable.value tests/test_inference.py:5713: AssertionError _______________________ test_compare_known_false_branch ________________________ @pytest.mark.xfail(reason="unimplemented") def test_compare_known_false_branch() -> None: code = """ a = 'hello' if 1 < 2: a = 'goodbye' a """ node = extract_node(code) inferred = list(node.infer()) > assert len(inferred) == 1 E assert 2 == 1 E + where 2 = len([, ]) tests/test_inference.py:5756: AssertionError ________________ test_recursion_error_self_reference_type_call _________________ @pytest.mark.xfail(reason="Cannot fully infer all the base classes properly.") def test_recursion_error_self_reference_type_call() -> None: # Fix for https://github.com/PyCQA/astroid/issues/199 code = """ class A(object): pass class SomeClass(object): route_class = A def __init__(self): self.route_class = type('B', (self.route_class, ), {}) self.route_class() #@ """ node = extract_node(code) inferred = next(node.infer()) > assert isinstance(inferred, Instance) E assert False E + where False = isinstance(Uninferable, Instance) tests/test_inference.py:6687: AssertionError ___ InstanceModelTest.test_instance_local_attributes_overrides_object_model ____ self = @pytest.mark.xfail(reason="Instance lookup cannot override object model") def test_instance_local_attributes_overrides_object_model(self): # The instance lookup needs to be changed in order for this to work. ast_node = builder.extract_node( """ class A: @property def __dict__(self): return [] A().__dict__ """ ) inferred = next(ast_node.infer()) > self.assertIsInstance(inferred, astroid.List) E AssertionError: is not an instance of tests/test_object_model.py:71: AssertionError ____________ FunctionModelTest.test_descriptor_not_inferrring_self _____________ self = @pytest.mark.xfail(reason="Descriptors cannot infer what self is") def test_descriptor_not_inferrring_self(self): # We can't infer __get__(X, Y)() when the bounded function # uses self, because of the tree's parent not being propagating good enough. result = builder.extract_node( """ class A(object): x = 42 def test(self): return self.x f = test.__get__(A(), A) f() #@ """ ) result = next(result.infer()) > self.assertIsInstance(result, astroid.Const) E AssertionError: Uninferable is not an instance of tests/test_object_model.py:380: AssertionError =========================== short test summary info ============================ SKIPPED [1] tests/brain/numpy/test_core_einsumfunc.py:30: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_einsumfunc.py:44: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_fromnumeric.py:33: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_function_base.py:37: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_multiarray.py:104: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_multiarray.py:126: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_multiarray.py:82: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_multiarray.py:148: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_multiarray.py:170: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numeric.py:42: This test requires the numpy library. SKIPPED [4] tests/brain/numpy/test_core_numeric.py:60: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:293: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:304: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:332: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:206: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:94: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:264: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_numerictypes.py:87: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:112: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:119: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:127: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:173: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:134: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:195: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:214: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_core_umath.py:153: This test requires the numpy library. SKIPPED [4] tests/brain/numpy/test_ma.py:26: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_ndarray.py:127: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_ndarray.py:142: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_ndarray.py:157: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_random_mtrand.py:82: This test requires the numpy library. SKIPPED [1] tests/brain/numpy/test_random_mtrand.py:89: This test requires the numpy library. SKIPPED [1] tests/brain/test_attr.py:22: These tests require the attr library SKIPPED [1] tests/brain/test_attr.py:84: These tests require the attr library SKIPPED [1] tests/brain/test_attr.py:211: These tests require the attr library SKIPPED [1] tests/brain/test_attr.py:197: These tests require the attr library SKIPPED [1] tests/brain/test_attr.py:181: These tests require the attr library SKIPPED [1] astroid/test_utils.py:45: Needs Python <= 3.8. Current version is 3.12.1.final.0. SKIPPED [1] tests/brain/test_brain.py:115: Needs Python 3 io model / doesn't work with plain pytest.use pytest -s for this test to work SKIPPED [3] astroid/test_utils.py:45: Needs Python <= 3.9. Current version is 3.12.1.final.0. SKIPPED [1] tests/brain/test_dateutil.py:21: This test requires the dateutil library. SKIPPED [1] tests/brain/test_nose.py:24: This test requires nose library. SKIPPED [1] tests/brain/test_qt.py:21: These tests require the PyQt6 library. SKIPPED [1] tests/brain/test_qt.py:41: These tests require the PyQt6 library. SKIPPED [1] tests/brain/test_qt.py:56: These tests require the PyQt6 library. SKIPPED [1] tests/brain/test_regex.py:19: This test requires the regex library. SKIPPED [1] tests/brain/test_regex.py:27: This test requires the regex library. SKIPPED [1] tests/brain/test_six.py:24: These tests require the six library SKIPPED [1] tests/brain/test_six.py:67: These tests require the six library SKIPPED [1] tests/brain/test_six.py:79: These tests require the six library SKIPPED [1] tests/brain/test_six.py:120: These tests require the six library SKIPPED [1] tests/brain/test_six.py:135: These tests require the six library SKIPPED [1] tests/brain/test_six.py:93: These tests require the six library SKIPPED [1] tests/brain/test_typing_extensions.py:26: Need typing_extensions>=4.4.0 to test TypeVar SKIPPED [1] tests/test_builder.py:926: The builtin ast module does not fail with a specific error for syntax error caused by invalid type comments. SKIPPED [1] tests/test_inference.py:3240: These tests require the six library SKIPPED [1] tests/test_inference.py:954: pathlib.Path cannot be inferred on Python 3.8 SKIPPED [1] tests/test_inference.py:3596: These tests require the six library SKIPPED [1] tests/test_inference.py:3206: These tests require the six library SKIPPED [1] tests/test_inference.py:4104: These tests require the six library SKIPPED [1] tests/test_inference.py:4122: These tests require the six library SKIPPED [1] tests/test_inference.py:6549: Exact inference with dataclasses (replace function) in python3.9 SKIPPED [1] tests/test_modutils.py:553: This test requires urllib3 < 2. SKIPPED [1] tests/test_nodes_lineno.py:23: end_lineno and end_col_offset were added in PY38 SKIPPED [1] tests/test_regrtest.py:87: Needs numpy SKIPPED [1] tests/test_regrtest.py:103: Needs numpy SKIPPED [1] tests/test_scoped_nodes.py:1392: These tests require the six library SKIPPED [1] tests/test_scoped_nodes.py:1406: These tests require the six library SKIPPED [1] tests/test_scoped_nodes.py:1435: These tests require the six library SKIPPED [1] tests/test_scoped_nodes.py:1607: These tests require the six library XFAIL tests/brain/test_brain.py::TestLenBuiltinInference::test_int_subclass_argument - Can't use list special astroid fields XFAIL tests/brain/test_ctypes.py::test_ctypes_redefined_types_members[c_buffer-bytes-] - c_buffer is Uninferable but for now we do not know why XFAIL tests/brain/test_dataclasses.py::test_dataclass_non_default_argument_after_default - Transforms returning Uninferable isn't supported. XFAIL tests/test_inference.py::InferenceTest::test_descriptor_are_callable - Descriptors are not properly inferred as callable XFAIL tests/test_inference.py::InferenceTest::test_function_metaclasses - Does not support function metaclasses XFAIL tests/test_inference.py::InferenceTest::test_metaclass_arguments_are_classes_not_instances - Metaclass arguments not inferred as classes XFAIL tests/test_inference.py::TestInferencePropagation::test_call_context_propagation - Relying on path copy XFAIL tests/test_inference.py::test_compare_identity[is-True] - uninferable XFAIL tests/test_inference.py::test_compare_identity[is not-False] - uninferable XFAIL tests/test_inference.py::test_compare_dynamic - unimplemented XFAIL tests/test_inference.py::test_compare_known_false_branch - unimplemented XFAIL tests/test_inference.py::test_recursion_error_self_reference_type_call - Cannot fully infer all the base classes properly. XFAIL tests/test_object_model.py::InstanceModelTest::test_instance_local_attributes_overrides_object_model - Instance lookup cannot override object model XFAIL tests/test_object_model.py::FunctionModelTest::test_descriptor_not_inferrring_self - Descriptors cannot infer what self is FAILED tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscriptable_3 FAILED tests/brain/test_brain.py::TypingBrain::test_callable_type - Attribute... FAILED tests/brain/test_brain.py::TypingBrain::test_collections_generic_alias_slots FAILED tests/brain/test_brain.py::TypingBrain::test_has_dunder_args - Attribu... FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_base - Attribu... FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_can_correctly_access_methods FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_class_form - A... FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_args - Att... FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_fields - A... FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_inference - At... FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_inference_nonliteral FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_inferred_as_class FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_instance_attrs FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_nested_class FAILED tests/brain/test_brain.py::TypingBrain::test_namedtuple_simple - Attri... FAILED tests/brain/test_brain.py::TypingBrain::test_tuple_type - AttributeErr... FAILED tests/brain/test_brain.py::TypingBrain::test_typed_dict - AttributeErr... FAILED tests/brain/test_brain.py::TypingBrain::test_typing_alias_type - Attri... FAILED tests/brain/test_brain.py::TypingBrain::test_typing_alias_type_2 - Att... FAILED tests/brain/test_brain.py::TypingBrain::test_typing_annotated_subscriptable FAILED tests/brain/test_brain.py::TypingBrain::test_typing_cast - AttributeEr... FAILED tests/brain/test_brain.py::TypingBrain::test_typing_cast_attribute - A... FAILED tests/brain/test_brain.py::TypingBrain::test_typing_cast_multiple_inference_calls FAILED tests/brain/test_brain.py::TypingBrain::test_typing_generic_slots - At... FAILED tests/brain/test_brain.py::TypingBrain::test_typing_generic_subscriptable FAILED tests/brain/test_brain.py::TypingBrain::test_typing_namedtuple_dont_crash_on_no_fields FAILED tests/brain/test_brain.py::TypingBrain::test_typing_object_builtin_subscriptable FAILED tests/brain/test_brain.py::TypingBrain::test_typing_object_not_subscriptable FAILED tests/brain/test_brain.py::TypingBrain::test_typing_object_notsubscriptable_3 FAILED tests/brain/test_brain.py::TypingBrain::test_typing_object_subscriptable FAILED tests/brain/test_brain.py::TypingBrain::test_typing_object_subscriptable_2 FAILED tests/brain/test_brain.py::TypingBrain::test_typing_type_subscriptable FAILED tests/brain/test_brain.py::TypingBrain::test_typing_type_without_tip FAILED tests/brain/test_brain.py::TypingBrain::test_typing_types - AttributeE... FAILED tests/brain/test_dataclasses.py::test_inference_method[dataclasses] - ... FAILED tests/brain/test_dataclasses.py::test_inference_method[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_inference_method[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_inference_class_var[dataclasses] FAILED tests/brain/test_dataclasses.py::test_inference_class_var[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_inference_class_var[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_inference_generic_collection_attribute[dataclasses] FAILED tests/brain/test_dataclasses.py::test_inference_generic_collection_attribute[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_inference_generic_collection_attribute[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_inference_callable_attribute[dataclasses-typing] FAILED tests/brain/test_dataclasses.py::test_inference_callable_attribute[pydantic.dataclasses-typing] FAILED tests/brain/test_dataclasses.py::test_inference_callable_attribute[marshmallow_dataclass-typing] FAILED tests/brain/test_dataclasses.py::test_init_no_defaults[dataclasses] - ... FAILED tests/brain/test_dataclasses.py::test_init_no_defaults[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_no_defaults[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_init_defaults[dataclasses] - Att... FAILED tests/brain/test_dataclasses.py::test_init_defaults[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_defaults[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_init_initvar[dataclasses] - Attr... FAILED tests/brain/test_dataclasses.py::test_init_initvar[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_initvar[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_init_decorator_init_false[dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_decorator_init_false[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_decorator_init_false[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_init_field_init_false[dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_field_init_false[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_init_field_init_false[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_annotated_enclosed_field_call[dataclasses] FAILED tests/brain/test_dataclasses.py::test_annotated_enclosed_field_call[pydantic.dataclasses] FAILED tests/brain/test_dataclasses.py::test_annotated_enclosed_field_call[marshmallow_dataclass] FAILED tests/brain/test_dataclasses.py::test_dataclass_with_default_factory FAILED tests/test_inference.py::InferenceTest::test_binary_op_not_used_in_boolean_context FAILED tests/test_inference.py::InferenceTest::test_binary_op_or_union_type FAILED tests/test_nodes_lineno.py::TestLinenoColOffset::test_end_lineno_string FAILED tests/test_raw_building.py::RawBuildingTC::test_io_is__io - AssertionE... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_has_dynamic_getattr - ... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_1 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_2 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_3 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_4 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_5 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_6 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_7 - Attrib... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_error_1 - ... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_generic_error_2 - ... FAILED tests/test_scoped_nodes.py::ClassNodeTest::test_mro_typing_extensions FAILED tests/test_scoped_nodes.py::test_ancestor_with_generic - AttributeErro... =========== 81 failed, 1381 passed, 78 skipped, 14 xfailed in 47.20s =========== INFO : Command's result: FAILURE INFO : Command's error: Command '['python3', '-m', 'pytest', '-ra', '-Wignore']' returned non-zero exit status 1. error: Bad exit status from /usr/src/tmp/rpm-tmp.99629 (%check) RPM build errors: File /usr/src/RPM/SOURCES/python3-module-astroid-2.15.6-alt.patch is smaller than 8 bytes Bad exit status from /usr/src/tmp/rpm-tmp.99629 (%check) Command exited with non-zero status 1 51.84user 1.55system 0:53.50elapsed 99%CPU (0avgtext+0avgdata 122636maxresident)k 0inputs+0outputs (0major+258471minor)pagefaults 0swaps hsh-rebuild: rebuild of `python3-module-astroid-2.15.6-alt1.src.rpm' failed. Command exited with non-zero status 1 3.79user 1.53system 1:05.00elapsed 8%CPU (0avgtext+0avgdata 125700maxresident)k 0inputs+0outputs (0major+291479minor)pagefaults 0swaps