Repository: KotlinIsland/basedmypy
Branch: master
Commit: 85d1ec9ab723
Files: 1670
Total size: 15.8 MB
Directory structure:
gitextract_o56s0563/
├── .editorconfig
├── .git-blame-ignore-revs
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug.md
│ │ ├── bug.yml
│ │ ├── config.yml
│ │ ├── documentation.md
│ │ └── feature.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── build_wheels.yml
│ ├── docs.yml
│ ├── mypy_primer.yml
│ ├── mypy_primer_comment.yml
│ ├── publish.yml
│ ├── sync_typeshed.yml
│ ├── test.yml
│ └── test_stubgenc.yml
├── .gitignore
├── .mypy/
│ └── baseline.json
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── CREDITS
├── LICENSE
├── MANIFEST.in
├── README.md
├── action.yml
├── build-requirements.txt
├── conftest.py
├── docs/
│ ├── Makefile
│ ├── README.md
│ ├── make.bat
│ ├── requirements-docs.txt
│ └── source/
│ ├── additional_features.rst
│ ├── based_features.rst
│ ├── based_inference.rst
│ ├── baseline.rst
│ ├── builtin_types.rst
│ ├── changelog.md
│ ├── cheat_sheet_py3.rst
│ ├── class_basics.rst
│ ├── command_line.rst
│ ├── common_issues.rst
│ ├── conf.py
│ ├── config_file.rst
│ ├── duck_type_compatibility.rst
│ ├── dynamic_typing.rst
│ ├── error_code_list.rst
│ ├── error_code_list2.rst
│ ├── error_code_list3.rst
│ ├── error_codes.rst
│ ├── existing_code.rst
│ ├── extending_mypy.rst
│ ├── faq.rst
│ ├── final_attrs.rst
│ ├── generics.rst
│ ├── getting_started.rst
│ ├── html_builder.py
│ ├── index.rst
│ ├── inline_config.rst
│ ├── installed_packages.rst
│ ├── kinds_of_types.rst
│ ├── literal_types.rst
│ ├── metaclasses.rst
│ ├── more_types.rst
│ ├── mypy_daemon.rst
│ ├── protocols.rst
│ ├── running_mypy.rst
│ ├── runtime_troubles.rst
│ ├── stubgen.rst
│ ├── stubs.rst
│ ├── stubtest.rst
│ ├── supported_python_features.rst
│ ├── type_inference_and_annotations.rst
│ ├── type_narrowing.rst
│ └── typed_dict.rst
├── misc/
│ ├── analyze_cache.py
│ ├── apply-cache-diff.py
│ ├── build-debug-python.sh
│ ├── build_wheel.py
│ ├── cherry-pick-typeshed.py
│ ├── clean-mypyc.sh
│ ├── convert-cache.py
│ ├── diff-cache.py
│ ├── docker/
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── build.py
│ │ ├── run-wrapper.sh
│ │ └── run.sh
│ ├── dump-ast.py
│ ├── find_type.py
│ ├── gen_blog_post_html.py
│ ├── generate_changelog.py
│ ├── incremental_checker.py
│ ├── install.py
│ ├── macs.el
│ ├── perf_checker.py
│ ├── perf_compare.py
│ ├── sync-typeshed.py
│ ├── test-stubgenc.sh
│ ├── trigger_wheel_build.sh
│ ├── typeshed_patches/
│ │ ├── 0001-Remove-use-of-LiteralString-in-builtins-13743.patch
│ │ ├── 0001-Revert-Remove-redundant-inheritances-from-Iterator.patch
│ │ ├── 0001-Revert-sum-literal-integer-change-13961.patch
│ │ └── 0001-Revert-typeshed-ctypes-change.patch
│ ├── update-stubinfo.py
│ └── upload-pypi.py
├── mypy/
│ ├── __init__.py
│ ├── __main__.py
│ ├── api.py
│ ├── applytype.py
│ ├── argmap.py
│ ├── binder.py
│ ├── bogus_type.py
│ ├── build.py
│ ├── checker.py
│ ├── checkexpr.py
│ ├── checkmember.py
│ ├── checkpattern.py
│ ├── checkstrformat.py
│ ├── config_parser.py
│ ├── constant_fold.py
│ ├── constraints.py
│ ├── copytype.py
│ ├── defaults.py
│ ├── dmypy/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ └── client.py
│ ├── dmypy_os.py
│ ├── dmypy_server.py
│ ├── dmypy_util.py
│ ├── erasetype.py
│ ├── error_formatter.py
│ ├── errorcodes.py
│ ├── errors.py
│ ├── evalexpr.py
│ ├── expandtype.py
│ ├── exprtotype.py
│ ├── fastparse.py
│ ├── fastparse2.py
│ ├── find_sources.py
│ ├── fixup.py
│ ├── freetree.py
│ ├── fscache.py
│ ├── fswatcher.py
│ ├── gclogger.py
│ ├── git.py
│ ├── graph_utils.py
│ ├── indirection.py
│ ├── infer.py
│ ├── inspections.py
│ ├── ipc.py
│ ├── join.py
│ ├── literals.py
│ ├── lookup.py
│ ├── main.py
│ ├── maptype.py
│ ├── meet.py
│ ├── memprofile.py
│ ├── message_registry.py
│ ├── messages.py
│ ├── metastore.py
│ ├── mixedtraverser.py
│ ├── modulefinder.py
│ ├── moduleinspect.py
│ ├── mro.py
│ ├── nodes.py
│ ├── operators.py
│ ├── options.py
│ ├── parse.py
│ ├── partially_defined.py
│ ├── patterns.py
│ ├── plugin.py
│ ├── plugins/
│ │ ├── __init__.py
│ │ ├── attrs.py
│ │ ├── common.py
│ │ ├── ctypes.py
│ │ ├── dataclasses.py
│ │ ├── default.py
│ │ ├── enums.py
│ │ ├── functools.py
│ │ ├── proper_plugin.py
│ │ ├── re.py
│ │ └── singledispatch.py
│ ├── py.typed
│ ├── pyinfo.py
│ ├── reachability.py
│ ├── refinfo.py
│ ├── renaming.py
│ ├── report.py
│ ├── scope.py
│ ├── semanal.py
│ ├── semanal_classprop.py
│ ├── semanal_enum.py
│ ├── semanal_infer.py
│ ├── semanal_main.py
│ ├── semanal_namedtuple.py
│ ├── semanal_newtype.py
│ ├── semanal_pass1.py
│ ├── semanal_shared.py
│ ├── semanal_typeargs.py
│ ├── semanal_typeddict.py
│ ├── server/
│ │ ├── __init__.py
│ │ ├── astdiff.py
│ │ ├── astmerge.py
│ │ ├── aststrip.py
│ │ ├── deps.py
│ │ ├── mergecheck.py
│ │ ├── objgraph.py
│ │ ├── subexpr.py
│ │ ├── target.py
│ │ ├── trigger.py
│ │ └── update.py
│ ├── sharedparse.py
│ ├── solve.py
│ ├── split_namespace.py
│ ├── state.py
│ ├── stats.py
│ ├── strconv.py
│ ├── stubdoc.py
│ ├── stubgen.py
│ ├── stubgenc.py
│ ├── stubinfo.py
│ ├── stubtest.py
│ ├── stubutil.py
│ ├── subtypes.py
│ ├── suggestions.py
│ ├── test/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── data.py
│ │ ├── helpers.py
│ │ ├── meta/
│ │ │ ├── __init__.py
│ │ │ ├── _pytest.py
│ │ │ ├── test_diff_helper.py
│ │ │ ├── test_parse_data.py
│ │ │ └── test_update_data.py
│ │ ├── test_find_sources.py
│ │ ├── test_ref_info.py
│ │ ├── testapi.py
│ │ ├── testargs.py
│ │ ├── testcheck.py
│ │ ├── testcmdline.py
│ │ ├── testconstraints.py
│ │ ├── testdaemon.py
│ │ ├── testdeps.py
│ │ ├── testdiff.py
│ │ ├── testerrorstream.py
│ │ ├── testfinegrained.py
│ │ ├── testfinegrainedcache.py
│ │ ├── testformatter.py
│ │ ├── testfscache.py
│ │ ├── testgraph.py
│ │ ├── testinfer.py
│ │ ├── testipc.py
│ │ ├── testmerge.py
│ │ ├── testmodulefinder.py
│ │ ├── testmypyc.py
│ │ ├── testoutput.py
│ │ ├── testparse.py
│ │ ├── testpep561.py
│ │ ├── testplugins.py
│ │ ├── testpythoneval.py
│ │ ├── testreports.py
│ │ ├── testsemanal.py
│ │ ├── testsolve.py
│ │ ├── teststubgen.py
│ │ ├── teststubinfo.py
│ │ ├── teststubtest.py
│ │ ├── testsubtypes.py
│ │ ├── testtransform.py
│ │ ├── testtypegen.py
│ │ ├── testtypes.py
│ │ ├── testutil.py
│ │ ├── typefixture.py
│ │ ├── typetest/
│ │ │ ├── __init__.py
│ │ │ ├── functools.py
│ │ │ └── operator.py
│ │ ├── update_data.py
│ │ └── visitors.py
│ ├── traverser.py
│ ├── treetransform.py
│ ├── tvar_scope.py
│ ├── type_visitor.py
│ ├── typeanal.py
│ ├── typeops.py
│ ├── types.py
│ ├── types_utils.py
│ ├── typeshed/
│ │ ├── LICENSE
│ │ ├── stdlib/
│ │ │ ├── VERSIONS
│ │ │ ├── __future__.pyi
│ │ │ ├── __main__.pyi
│ │ │ ├── _ast.pyi
│ │ │ ├── _asyncio.pyi
│ │ │ ├── _bisect.pyi
│ │ │ ├── _blake2.pyi
│ │ │ ├── _bootlocale.pyi
│ │ │ ├── _bz2.pyi
│ │ │ ├── _codecs.pyi
│ │ │ ├── _collections_abc.pyi
│ │ │ ├── _compat_pickle.pyi
│ │ │ ├── _compression.pyi
│ │ │ ├── _contextvars.pyi
│ │ │ ├── _csv.pyi
│ │ │ ├── _ctypes.pyi
│ │ │ ├── _curses.pyi
│ │ │ ├── _curses_panel.pyi
│ │ │ ├── _dbm.pyi
│ │ │ ├── _decimal.pyi
│ │ │ ├── _dummy_thread.pyi
│ │ │ ├── _dummy_threading.pyi
│ │ │ ├── _frozen_importlib.pyi
│ │ │ ├── _frozen_importlib_external.pyi
│ │ │ ├── _gdbm.pyi
│ │ │ ├── _hashlib.pyi
│ │ │ ├── _heapq.pyi
│ │ │ ├── _imp.pyi
│ │ │ ├── _interpchannels.pyi
│ │ │ ├── _interpqueues.pyi
│ │ │ ├── _interpreters.pyi
│ │ │ ├── _io.pyi
│ │ │ ├── _json.pyi
│ │ │ ├── _locale.pyi
│ │ │ ├── _lsprof.pyi
│ │ │ ├── _lzma.pyi
│ │ │ ├── _markupbase.pyi
│ │ │ ├── _msi.pyi
│ │ │ ├── _multibytecodec.pyi
│ │ │ ├── _operator.pyi
│ │ │ ├── _osx_support.pyi
│ │ │ ├── _pickle.pyi
│ │ │ ├── _posixsubprocess.pyi
│ │ │ ├── _py_abc.pyi
│ │ │ ├── _pydecimal.pyi
│ │ │ ├── _queue.pyi
│ │ │ ├── _random.pyi
│ │ │ ├── _sitebuiltins.pyi
│ │ │ ├── _socket.pyi
│ │ │ ├── _sqlite3.pyi
│ │ │ ├── _ssl.pyi
│ │ │ ├── _stat.pyi
│ │ │ ├── _struct.pyi
│ │ │ ├── _thread.pyi
│ │ │ ├── _threading_local.pyi
│ │ │ ├── _tkinter.pyi
│ │ │ ├── _tracemalloc.pyi
│ │ │ ├── _typeshed/
│ │ │ │ ├── README.md
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── dbapi.pyi
│ │ │ │ ├── importlib.pyi
│ │ │ │ ├── wsgi.pyi
│ │ │ │ └── xml.pyi
│ │ │ ├── _warnings.pyi
│ │ │ ├── _weakref.pyi
│ │ │ ├── _weakrefset.pyi
│ │ │ ├── _winapi.pyi
│ │ │ ├── abc.pyi
│ │ │ ├── aifc.pyi
│ │ │ ├── antigravity.pyi
│ │ │ ├── argparse.pyi
│ │ │ ├── array.pyi
│ │ │ ├── ast.pyi
│ │ │ ├── asynchat.pyi
│ │ │ ├── asyncio/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── base_events.pyi
│ │ │ │ ├── base_futures.pyi
│ │ │ │ ├── base_subprocess.pyi
│ │ │ │ ├── base_tasks.pyi
│ │ │ │ ├── constants.pyi
│ │ │ │ ├── coroutines.pyi
│ │ │ │ ├── events.pyi
│ │ │ │ ├── exceptions.pyi
│ │ │ │ ├── format_helpers.pyi
│ │ │ │ ├── futures.pyi
│ │ │ │ ├── locks.pyi
│ │ │ │ ├── log.pyi
│ │ │ │ ├── mixins.pyi
│ │ │ │ ├── proactor_events.pyi
│ │ │ │ ├── protocols.pyi
│ │ │ │ ├── queues.pyi
│ │ │ │ ├── runners.pyi
│ │ │ │ ├── selector_events.pyi
│ │ │ │ ├── sslproto.pyi
│ │ │ │ ├── staggered.pyi
│ │ │ │ ├── streams.pyi
│ │ │ │ ├── subprocess.pyi
│ │ │ │ ├── taskgroups.pyi
│ │ │ │ ├── tasks.pyi
│ │ │ │ ├── threads.pyi
│ │ │ │ ├── timeouts.pyi
│ │ │ │ ├── transports.pyi
│ │ │ │ ├── trsock.pyi
│ │ │ │ ├── unix_events.pyi
│ │ │ │ ├── windows_events.pyi
│ │ │ │ └── windows_utils.pyi
│ │ │ ├── asyncore.pyi
│ │ │ ├── atexit.pyi
│ │ │ ├── audioop.pyi
│ │ │ ├── base64.pyi
│ │ │ ├── bdb.pyi
│ │ │ ├── binascii.pyi
│ │ │ ├── binhex.pyi
│ │ │ ├── bisect.pyi
│ │ │ ├── builtins.pyi
│ │ │ ├── bz2.pyi
│ │ │ ├── cProfile.pyi
│ │ │ ├── calendar.pyi
│ │ │ ├── cgi.pyi
│ │ │ ├── cgitb.pyi
│ │ │ ├── chunk.pyi
│ │ │ ├── cmath.pyi
│ │ │ ├── cmd.pyi
│ │ │ ├── code.pyi
│ │ │ ├── codecs.pyi
│ │ │ ├── codeop.pyi
│ │ │ ├── collections/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── abc.pyi
│ │ │ ├── colorsys.pyi
│ │ │ ├── compileall.pyi
│ │ │ ├── concurrent/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── futures/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _base.pyi
│ │ │ │ ├── process.pyi
│ │ │ │ └── thread.pyi
│ │ │ ├── configparser.pyi
│ │ │ ├── contextlib.pyi
│ │ │ ├── contextvars.pyi
│ │ │ ├── copy.pyi
│ │ │ ├── copyreg.pyi
│ │ │ ├── crypt.pyi
│ │ │ ├── csv.pyi
│ │ │ ├── ctypes/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _endian.pyi
│ │ │ │ ├── macholib/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── dyld.pyi
│ │ │ │ │ ├── dylib.pyi
│ │ │ │ │ └── framework.pyi
│ │ │ │ ├── util.pyi
│ │ │ │ └── wintypes.pyi
│ │ │ ├── curses/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── ascii.pyi
│ │ │ │ ├── has_key.pyi
│ │ │ │ ├── panel.pyi
│ │ │ │ └── textpad.pyi
│ │ │ ├── dataclasses.pyi
│ │ │ ├── datetime.pyi
│ │ │ ├── dbm/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── dumb.pyi
│ │ │ │ ├── gnu.pyi
│ │ │ │ ├── ndbm.pyi
│ │ │ │ └── sqlite3.pyi
│ │ │ ├── decimal.pyi
│ │ │ ├── difflib.pyi
│ │ │ ├── dis.pyi
│ │ │ ├── distutils/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _msvccompiler.pyi
│ │ │ │ ├── archive_util.pyi
│ │ │ │ ├── bcppcompiler.pyi
│ │ │ │ ├── ccompiler.pyi
│ │ │ │ ├── cmd.pyi
│ │ │ │ ├── command/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── bdist.pyi
│ │ │ │ │ ├── bdist_dumb.pyi
│ │ │ │ │ ├── bdist_msi.pyi
│ │ │ │ │ ├── bdist_packager.pyi
│ │ │ │ │ ├── bdist_rpm.pyi
│ │ │ │ │ ├── bdist_wininst.pyi
│ │ │ │ │ ├── build.pyi
│ │ │ │ │ ├── build_clib.pyi
│ │ │ │ │ ├── build_ext.pyi
│ │ │ │ │ ├── build_py.pyi
│ │ │ │ │ ├── build_scripts.pyi
│ │ │ │ │ ├── check.pyi
│ │ │ │ │ ├── clean.pyi
│ │ │ │ │ ├── config.pyi
│ │ │ │ │ ├── install.pyi
│ │ │ │ │ ├── install_data.pyi
│ │ │ │ │ ├── install_egg_info.pyi
│ │ │ │ │ ├── install_headers.pyi
│ │ │ │ │ ├── install_lib.pyi
│ │ │ │ │ ├── install_scripts.pyi
│ │ │ │ │ ├── register.pyi
│ │ │ │ │ ├── sdist.pyi
│ │ │ │ │ └── upload.pyi
│ │ │ │ ├── config.pyi
│ │ │ │ ├── core.pyi
│ │ │ │ ├── cygwinccompiler.pyi
│ │ │ │ ├── debug.pyi
│ │ │ │ ├── dep_util.pyi
│ │ │ │ ├── dir_util.pyi
│ │ │ │ ├── dist.pyi
│ │ │ │ ├── errors.pyi
│ │ │ │ ├── extension.pyi
│ │ │ │ ├── fancy_getopt.pyi
│ │ │ │ ├── file_util.pyi
│ │ │ │ ├── filelist.pyi
│ │ │ │ ├── log.pyi
│ │ │ │ ├── msvccompiler.pyi
│ │ │ │ ├── spawn.pyi
│ │ │ │ ├── sysconfig.pyi
│ │ │ │ ├── text_file.pyi
│ │ │ │ ├── unixccompiler.pyi
│ │ │ │ ├── util.pyi
│ │ │ │ └── version.pyi
│ │ │ ├── doctest.pyi
│ │ │ ├── dummy_threading.pyi
│ │ │ ├── email/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _header_value_parser.pyi
│ │ │ │ ├── _policybase.pyi
│ │ │ │ ├── base64mime.pyi
│ │ │ │ ├── charset.pyi
│ │ │ │ ├── contentmanager.pyi
│ │ │ │ ├── encoders.pyi
│ │ │ │ ├── errors.pyi
│ │ │ │ ├── feedparser.pyi
│ │ │ │ ├── generator.pyi
│ │ │ │ ├── header.pyi
│ │ │ │ ├── headerregistry.pyi
│ │ │ │ ├── iterators.pyi
│ │ │ │ ├── message.pyi
│ │ │ │ ├── mime/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── application.pyi
│ │ │ │ │ ├── audio.pyi
│ │ │ │ │ ├── base.pyi
│ │ │ │ │ ├── image.pyi
│ │ │ │ │ ├── message.pyi
│ │ │ │ │ ├── multipart.pyi
│ │ │ │ │ ├── nonmultipart.pyi
│ │ │ │ │ └── text.pyi
│ │ │ │ ├── parser.pyi
│ │ │ │ ├── policy.pyi
│ │ │ │ ├── quoprimime.pyi
│ │ │ │ └── utils.pyi
│ │ │ ├── encodings/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── aliases.pyi
│ │ │ │ ├── ascii.pyi
│ │ │ │ ├── base64_codec.pyi
│ │ │ │ ├── big5.pyi
│ │ │ │ ├── big5hkscs.pyi
│ │ │ │ ├── bz2_codec.pyi
│ │ │ │ ├── charmap.pyi
│ │ │ │ ├── cp037.pyi
│ │ │ │ ├── cp1006.pyi
│ │ │ │ ├── cp1026.pyi
│ │ │ │ ├── cp1125.pyi
│ │ │ │ ├── cp1140.pyi
│ │ │ │ ├── cp1250.pyi
│ │ │ │ ├── cp1251.pyi
│ │ │ │ ├── cp1252.pyi
│ │ │ │ ├── cp1253.pyi
│ │ │ │ ├── cp1254.pyi
│ │ │ │ ├── cp1255.pyi
│ │ │ │ ├── cp1256.pyi
│ │ │ │ ├── cp1257.pyi
│ │ │ │ ├── cp1258.pyi
│ │ │ │ ├── cp273.pyi
│ │ │ │ ├── cp424.pyi
│ │ │ │ ├── cp437.pyi
│ │ │ │ ├── cp500.pyi
│ │ │ │ ├── cp720.pyi
│ │ │ │ ├── cp737.pyi
│ │ │ │ ├── cp775.pyi
│ │ │ │ ├── cp850.pyi
│ │ │ │ ├── cp852.pyi
│ │ │ │ ├── cp855.pyi
│ │ │ │ ├── cp856.pyi
│ │ │ │ ├── cp857.pyi
│ │ │ │ ├── cp858.pyi
│ │ │ │ ├── cp860.pyi
│ │ │ │ ├── cp861.pyi
│ │ │ │ ├── cp862.pyi
│ │ │ │ ├── cp863.pyi
│ │ │ │ ├── cp864.pyi
│ │ │ │ ├── cp865.pyi
│ │ │ │ ├── cp866.pyi
│ │ │ │ ├── cp869.pyi
│ │ │ │ ├── cp874.pyi
│ │ │ │ ├── cp875.pyi
│ │ │ │ ├── cp932.pyi
│ │ │ │ ├── cp949.pyi
│ │ │ │ ├── cp950.pyi
│ │ │ │ ├── euc_jis_2004.pyi
│ │ │ │ ├── euc_jisx0213.pyi
│ │ │ │ ├── euc_jp.pyi
│ │ │ │ ├── euc_kr.pyi
│ │ │ │ ├── gb18030.pyi
│ │ │ │ ├── gb2312.pyi
│ │ │ │ ├── gbk.pyi
│ │ │ │ ├── hex_codec.pyi
│ │ │ │ ├── hp_roman8.pyi
│ │ │ │ ├── hz.pyi
│ │ │ │ ├── idna.pyi
│ │ │ │ ├── iso2022_jp.pyi
│ │ │ │ ├── iso2022_jp_1.pyi
│ │ │ │ ├── iso2022_jp_2.pyi
│ │ │ │ ├── iso2022_jp_2004.pyi
│ │ │ │ ├── iso2022_jp_3.pyi
│ │ │ │ ├── iso2022_jp_ext.pyi
│ │ │ │ ├── iso2022_kr.pyi
│ │ │ │ ├── iso8859_1.pyi
│ │ │ │ ├── iso8859_10.pyi
│ │ │ │ ├── iso8859_11.pyi
│ │ │ │ ├── iso8859_13.pyi
│ │ │ │ ├── iso8859_14.pyi
│ │ │ │ ├── iso8859_15.pyi
│ │ │ │ ├── iso8859_16.pyi
│ │ │ │ ├── iso8859_2.pyi
│ │ │ │ ├── iso8859_3.pyi
│ │ │ │ ├── iso8859_4.pyi
│ │ │ │ ├── iso8859_5.pyi
│ │ │ │ ├── iso8859_6.pyi
│ │ │ │ ├── iso8859_7.pyi
│ │ │ │ ├── iso8859_8.pyi
│ │ │ │ ├── iso8859_9.pyi
│ │ │ │ ├── johab.pyi
│ │ │ │ ├── koi8_r.pyi
│ │ │ │ ├── koi8_t.pyi
│ │ │ │ ├── koi8_u.pyi
│ │ │ │ ├── kz1048.pyi
│ │ │ │ ├── latin_1.pyi
│ │ │ │ ├── mac_arabic.pyi
│ │ │ │ ├── mac_centeuro.pyi
│ │ │ │ ├── mac_croatian.pyi
│ │ │ │ ├── mac_cyrillic.pyi
│ │ │ │ ├── mac_farsi.pyi
│ │ │ │ ├── mac_greek.pyi
│ │ │ │ ├── mac_iceland.pyi
│ │ │ │ ├── mac_latin2.pyi
│ │ │ │ ├── mac_roman.pyi
│ │ │ │ ├── mac_romanian.pyi
│ │ │ │ ├── mac_turkish.pyi
│ │ │ │ ├── mbcs.pyi
│ │ │ │ ├── oem.pyi
│ │ │ │ ├── palmos.pyi
│ │ │ │ ├── ptcp154.pyi
│ │ │ │ ├── punycode.pyi
│ │ │ │ ├── quopri_codec.pyi
│ │ │ │ ├── raw_unicode_escape.pyi
│ │ │ │ ├── rot_13.pyi
│ │ │ │ ├── shift_jis.pyi
│ │ │ │ ├── shift_jis_2004.pyi
│ │ │ │ ├── shift_jisx0213.pyi
│ │ │ │ ├── tis_620.pyi
│ │ │ │ ├── undefined.pyi
│ │ │ │ ├── unicode_escape.pyi
│ │ │ │ ├── utf_16.pyi
│ │ │ │ ├── utf_16_be.pyi
│ │ │ │ ├── utf_16_le.pyi
│ │ │ │ ├── utf_32.pyi
│ │ │ │ ├── utf_32_be.pyi
│ │ │ │ ├── utf_32_le.pyi
│ │ │ │ ├── utf_7.pyi
│ │ │ │ ├── utf_8.pyi
│ │ │ │ ├── utf_8_sig.pyi
│ │ │ │ ├── uu_codec.pyi
│ │ │ │ └── zlib_codec.pyi
│ │ │ ├── ensurepip/
│ │ │ │ └── __init__.pyi
│ │ │ ├── enum.pyi
│ │ │ ├── errno.pyi
│ │ │ ├── faulthandler.pyi
│ │ │ ├── fcntl.pyi
│ │ │ ├── filecmp.pyi
│ │ │ ├── fileinput.pyi
│ │ │ ├── fnmatch.pyi
│ │ │ ├── formatter.pyi
│ │ │ ├── fractions.pyi
│ │ │ ├── ftplib.pyi
│ │ │ ├── functools.pyi
│ │ │ ├── gc.pyi
│ │ │ ├── genericpath.pyi
│ │ │ ├── getopt.pyi
│ │ │ ├── getpass.pyi
│ │ │ ├── gettext.pyi
│ │ │ ├── glob.pyi
│ │ │ ├── graphlib.pyi
│ │ │ ├── grp.pyi
│ │ │ ├── gzip.pyi
│ │ │ ├── hashlib.pyi
│ │ │ ├── heapq.pyi
│ │ │ ├── hmac.pyi
│ │ │ ├── html/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── entities.pyi
│ │ │ │ └── parser.pyi
│ │ │ ├── http/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── client.pyi
│ │ │ │ ├── cookiejar.pyi
│ │ │ │ ├── cookies.pyi
│ │ │ │ └── server.pyi
│ │ │ ├── imaplib.pyi
│ │ │ ├── imghdr.pyi
│ │ │ ├── imp.pyi
│ │ │ ├── importlib/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _abc.pyi
│ │ │ │ ├── _bootstrap.pyi
│ │ │ │ ├── _bootstrap_external.pyi
│ │ │ │ ├── abc.pyi
│ │ │ │ ├── machinery.pyi
│ │ │ │ ├── metadata/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── _meta.pyi
│ │ │ │ │ └── diagnose.pyi
│ │ │ │ ├── readers.pyi
│ │ │ │ ├── resources/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── _common.pyi
│ │ │ │ │ ├── _functional.pyi
│ │ │ │ │ ├── abc.pyi
│ │ │ │ │ ├── readers.pyi
│ │ │ │ │ └── simple.pyi
│ │ │ │ ├── simple.pyi
│ │ │ │ └── util.pyi
│ │ │ ├── inspect.pyi
│ │ │ ├── io.pyi
│ │ │ ├── ipaddress.pyi
│ │ │ ├── itertools.pyi
│ │ │ ├── json/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── decoder.pyi
│ │ │ │ ├── encoder.pyi
│ │ │ │ ├── scanner.pyi
│ │ │ │ └── tool.pyi
│ │ │ ├── keyword.pyi
│ │ │ ├── lib2to3/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── btm_matcher.pyi
│ │ │ │ ├── fixer_base.pyi
│ │ │ │ ├── fixes/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── fix_apply.pyi
│ │ │ │ │ ├── fix_asserts.pyi
│ │ │ │ │ ├── fix_basestring.pyi
│ │ │ │ │ ├── fix_buffer.pyi
│ │ │ │ │ ├── fix_dict.pyi
│ │ │ │ │ ├── fix_except.pyi
│ │ │ │ │ ├── fix_exec.pyi
│ │ │ │ │ ├── fix_execfile.pyi
│ │ │ │ │ ├── fix_exitfunc.pyi
│ │ │ │ │ ├── fix_filter.pyi
│ │ │ │ │ ├── fix_funcattrs.pyi
│ │ │ │ │ ├── fix_future.pyi
│ │ │ │ │ ├── fix_getcwdu.pyi
│ │ │ │ │ ├── fix_has_key.pyi
│ │ │ │ │ ├── fix_idioms.pyi
│ │ │ │ │ ├── fix_import.pyi
│ │ │ │ │ ├── fix_imports.pyi
│ │ │ │ │ ├── fix_imports2.pyi
│ │ │ │ │ ├── fix_input.pyi
│ │ │ │ │ ├── fix_intern.pyi
│ │ │ │ │ ├── fix_isinstance.pyi
│ │ │ │ │ ├── fix_itertools.pyi
│ │ │ │ │ ├── fix_itertools_imports.pyi
│ │ │ │ │ ├── fix_long.pyi
│ │ │ │ │ ├── fix_map.pyi
│ │ │ │ │ ├── fix_metaclass.pyi
│ │ │ │ │ ├── fix_methodattrs.pyi
│ │ │ │ │ ├── fix_ne.pyi
│ │ │ │ │ ├── fix_next.pyi
│ │ │ │ │ ├── fix_nonzero.pyi
│ │ │ │ │ ├── fix_numliterals.pyi
│ │ │ │ │ ├── fix_operator.pyi
│ │ │ │ │ ├── fix_paren.pyi
│ │ │ │ │ ├── fix_print.pyi
│ │ │ │ │ ├── fix_raise.pyi
│ │ │ │ │ ├── fix_raw_input.pyi
│ │ │ │ │ ├── fix_reduce.pyi
│ │ │ │ │ ├── fix_reload.pyi
│ │ │ │ │ ├── fix_renames.pyi
│ │ │ │ │ ├── fix_repr.pyi
│ │ │ │ │ ├── fix_set_literal.pyi
│ │ │ │ │ ├── fix_standarderror.pyi
│ │ │ │ │ ├── fix_sys_exc.pyi
│ │ │ │ │ ├── fix_throw.pyi
│ │ │ │ │ ├── fix_tuple_params.pyi
│ │ │ │ │ ├── fix_types.pyi
│ │ │ │ │ ├── fix_unicode.pyi
│ │ │ │ │ ├── fix_urllib.pyi
│ │ │ │ │ ├── fix_ws_comma.pyi
│ │ │ │ │ ├── fix_xrange.pyi
│ │ │ │ │ ├── fix_xreadlines.pyi
│ │ │ │ │ └── fix_zip.pyi
│ │ │ │ ├── main.pyi
│ │ │ │ ├── pgen2/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── driver.pyi
│ │ │ │ │ ├── grammar.pyi
│ │ │ │ │ ├── literals.pyi
│ │ │ │ │ ├── parse.pyi
│ │ │ │ │ ├── pgen.pyi
│ │ │ │ │ ├── token.pyi
│ │ │ │ │ └── tokenize.pyi
│ │ │ │ ├── pygram.pyi
│ │ │ │ ├── pytree.pyi
│ │ │ │ └── refactor.pyi
│ │ │ ├── linecache.pyi
│ │ │ ├── locale.pyi
│ │ │ ├── logging/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── config.pyi
│ │ │ │ └── handlers.pyi
│ │ │ ├── lzma.pyi
│ │ │ ├── mailbox.pyi
│ │ │ ├── mailcap.pyi
│ │ │ ├── marshal.pyi
│ │ │ ├── math.pyi
│ │ │ ├── mimetypes.pyi
│ │ │ ├── mmap.pyi
│ │ │ ├── modulefinder.pyi
│ │ │ ├── msilib/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── schema.pyi
│ │ │ │ ├── sequence.pyi
│ │ │ │ └── text.pyi
│ │ │ ├── msvcrt.pyi
│ │ │ ├── multiprocessing/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── connection.pyi
│ │ │ │ ├── context.pyi
│ │ │ │ ├── dummy/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ └── connection.pyi
│ │ │ │ ├── forkserver.pyi
│ │ │ │ ├── heap.pyi
│ │ │ │ ├── managers.pyi
│ │ │ │ ├── pool.pyi
│ │ │ │ ├── popen_fork.pyi
│ │ │ │ ├── popen_forkserver.pyi
│ │ │ │ ├── popen_spawn_posix.pyi
│ │ │ │ ├── popen_spawn_win32.pyi
│ │ │ │ ├── process.pyi
│ │ │ │ ├── queues.pyi
│ │ │ │ ├── reduction.pyi
│ │ │ │ ├── resource_sharer.pyi
│ │ │ │ ├── resource_tracker.pyi
│ │ │ │ ├── shared_memory.pyi
│ │ │ │ ├── sharedctypes.pyi
│ │ │ │ ├── spawn.pyi
│ │ │ │ ├── synchronize.pyi
│ │ │ │ └── util.pyi
│ │ │ ├── netrc.pyi
│ │ │ ├── nis.pyi
│ │ │ ├── nntplib.pyi
│ │ │ ├── nt.pyi
│ │ │ ├── ntpath.pyi
│ │ │ ├── nturl2path.pyi
│ │ │ ├── numbers.pyi
│ │ │ ├── opcode.pyi
│ │ │ ├── operator.pyi
│ │ │ ├── optparse.pyi
│ │ │ ├── os/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── path.pyi
│ │ │ ├── ossaudiodev.pyi
│ │ │ ├── parser.pyi
│ │ │ ├── pathlib.pyi
│ │ │ ├── pdb.pyi
│ │ │ ├── pickle.pyi
│ │ │ ├── pickletools.pyi
│ │ │ ├── pipes.pyi
│ │ │ ├── pkgutil.pyi
│ │ │ ├── platform.pyi
│ │ │ ├── plistlib.pyi
│ │ │ ├── poplib.pyi
│ │ │ ├── posix.pyi
│ │ │ ├── posixpath.pyi
│ │ │ ├── pprint.pyi
│ │ │ ├── profile.pyi
│ │ │ ├── pstats.pyi
│ │ │ ├── pty.pyi
│ │ │ ├── pwd.pyi
│ │ │ ├── py_compile.pyi
│ │ │ ├── pyclbr.pyi
│ │ │ ├── pydoc.pyi
│ │ │ ├── pydoc_data/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── topics.pyi
│ │ │ ├── pyexpat/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── errors.pyi
│ │ │ │ └── model.pyi
│ │ │ ├── queue.pyi
│ │ │ ├── quopri.pyi
│ │ │ ├── random.pyi
│ │ │ ├── re.pyi
│ │ │ ├── readline.pyi
│ │ │ ├── reprlib.pyi
│ │ │ ├── resource.pyi
│ │ │ ├── rlcompleter.pyi
│ │ │ ├── runpy.pyi
│ │ │ ├── sched.pyi
│ │ │ ├── secrets.pyi
│ │ │ ├── select.pyi
│ │ │ ├── selectors.pyi
│ │ │ ├── shelve.pyi
│ │ │ ├── shlex.pyi
│ │ │ ├── shutil.pyi
│ │ │ ├── signal.pyi
│ │ │ ├── site.pyi
│ │ │ ├── smtpd.pyi
│ │ │ ├── smtplib.pyi
│ │ │ ├── sndhdr.pyi
│ │ │ ├── socket.pyi
│ │ │ ├── socketserver.pyi
│ │ │ ├── spwd.pyi
│ │ │ ├── sqlite3/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── dbapi2.pyi
│ │ │ │ └── dump.pyi
│ │ │ ├── sre_compile.pyi
│ │ │ ├── sre_constants.pyi
│ │ │ ├── sre_parse.pyi
│ │ │ ├── ssl.pyi
│ │ │ ├── stat.pyi
│ │ │ ├── statistics.pyi
│ │ │ ├── string.pyi
│ │ │ ├── stringprep.pyi
│ │ │ ├── struct.pyi
│ │ │ ├── subprocess.pyi
│ │ │ ├── sunau.pyi
│ │ │ ├── symbol.pyi
│ │ │ ├── symtable.pyi
│ │ │ ├── sys/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── _monitoring.pyi
│ │ │ ├── sysconfig.pyi
│ │ │ ├── syslog.pyi
│ │ │ ├── tabnanny.pyi
│ │ │ ├── tarfile.pyi
│ │ │ ├── telnetlib.pyi
│ │ │ ├── tempfile.pyi
│ │ │ ├── termios.pyi
│ │ │ ├── textwrap.pyi
│ │ │ ├── this.pyi
│ │ │ ├── threading.pyi
│ │ │ ├── time.pyi
│ │ │ ├── timeit.pyi
│ │ │ ├── tkinter/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── colorchooser.pyi
│ │ │ │ ├── commondialog.pyi
│ │ │ │ ├── constants.pyi
│ │ │ │ ├── dialog.pyi
│ │ │ │ ├── dnd.pyi
│ │ │ │ ├── filedialog.pyi
│ │ │ │ ├── font.pyi
│ │ │ │ ├── messagebox.pyi
│ │ │ │ ├── scrolledtext.pyi
│ │ │ │ ├── simpledialog.pyi
│ │ │ │ ├── tix.pyi
│ │ │ │ └── ttk.pyi
│ │ │ ├── token.pyi
│ │ │ ├── tokenize.pyi
│ │ │ ├── tomllib.pyi
│ │ │ ├── trace.pyi
│ │ │ ├── traceback.pyi
│ │ │ ├── tracemalloc.pyi
│ │ │ ├── tty.pyi
│ │ │ ├── turtle.pyi
│ │ │ ├── types.pyi
│ │ │ ├── typing.pyi
│ │ │ ├── typing_extensions.pyi
│ │ │ ├── unicodedata.pyi
│ │ │ ├── unittest/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _log.pyi
│ │ │ │ ├── async_case.pyi
│ │ │ │ ├── case.pyi
│ │ │ │ ├── loader.pyi
│ │ │ │ ├── main.pyi
│ │ │ │ ├── mock.pyi
│ │ │ │ ├── result.pyi
│ │ │ │ ├── runner.pyi
│ │ │ │ ├── signals.pyi
│ │ │ │ ├── suite.pyi
│ │ │ │ └── util.pyi
│ │ │ ├── urllib/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── error.pyi
│ │ │ │ ├── parse.pyi
│ │ │ │ ├── request.pyi
│ │ │ │ ├── response.pyi
│ │ │ │ └── robotparser.pyi
│ │ │ ├── uu.pyi
│ │ │ ├── uuid.pyi
│ │ │ ├── warnings.pyi
│ │ │ ├── wave.pyi
│ │ │ ├── weakref.pyi
│ │ │ ├── webbrowser.pyi
│ │ │ ├── winreg.pyi
│ │ │ ├── winsound.pyi
│ │ │ ├── wsgiref/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── handlers.pyi
│ │ │ │ ├── headers.pyi
│ │ │ │ ├── simple_server.pyi
│ │ │ │ ├── types.pyi
│ │ │ │ ├── util.pyi
│ │ │ │ └── validate.pyi
│ │ │ ├── xdrlib.pyi
│ │ │ ├── xml/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── dom/
│ │ │ │ │ ├── NodeFilter.pyi
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── domreg.pyi
│ │ │ │ │ ├── expatbuilder.pyi
│ │ │ │ │ ├── minicompat.pyi
│ │ │ │ │ ├── minidom.pyi
│ │ │ │ │ ├── pulldom.pyi
│ │ │ │ │ └── xmlbuilder.pyi
│ │ │ │ ├── etree/
│ │ │ │ │ ├── ElementInclude.pyi
│ │ │ │ │ ├── ElementPath.pyi
│ │ │ │ │ ├── ElementTree.pyi
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ └── cElementTree.pyi
│ │ │ │ ├── parsers/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ └── expat/
│ │ │ │ │ ├── __init__.pyi
│ │ │ │ │ ├── errors.pyi
│ │ │ │ │ └── model.pyi
│ │ │ │ └── sax/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── _exceptions.pyi
│ │ │ │ ├── expatreader.pyi
│ │ │ │ ├── handler.pyi
│ │ │ │ ├── saxutils.pyi
│ │ │ │ └── xmlreader.pyi
│ │ │ ├── xmlrpc/
│ │ │ │ ├── __init__.pyi
│ │ │ │ ├── client.pyi
│ │ │ │ └── server.pyi
│ │ │ ├── xxlimited.pyi
│ │ │ ├── zipapp.pyi
│ │ │ ├── zipfile/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── _path/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── glob.pyi
│ │ │ ├── zipimport.pyi
│ │ │ ├── zlib.pyi
│ │ │ └── zoneinfo/
│ │ │ ├── __init__.pyi
│ │ │ ├── _common.pyi
│ │ │ └── _tzpath.pyi
│ │ └── stubs/
│ │ └── mypy-extensions/
│ │ ├── @tests/
│ │ │ └── stubtest_allowlist.txt
│ │ ├── METADATA.toml
│ │ └── mypy_extensions.pyi
│ ├── typestate.py
│ ├── typetraverser.py
│ ├── typevars.py
│ ├── typevartuples.py
│ ├── util.py
│ ├── version.py
│ ├── versionutil.py
│ ├── visitor.py
│ └── xml/
│ ├── mypy-html.css
│ ├── mypy-html.xslt
│ ├── mypy-txt.xslt
│ └── mypy.xsd
├── mypy-requirements.txt
├── mypy_bootstrap.ini
├── mypy_self_check.ini
├── mypy_self_check_strict.ini
├── mypyc/
│ ├── .readthedocs.yaml
│ ├── README.md
│ ├── __init__.py
│ ├── __main__.py
│ ├── analysis/
│ │ ├── __init__.py
│ │ ├── attrdefined.py
│ │ ├── blockfreq.py
│ │ ├── dataflow.py
│ │ ├── ircheck.py
│ │ └── selfleaks.py
│ ├── build.py
│ ├── codegen/
│ │ ├── __init__.py
│ │ ├── cstring.py
│ │ ├── emit.py
│ │ ├── emitclass.py
│ │ ├── emitfunc.py
│ │ ├── emitmodule.py
│ │ ├── emitwrapper.py
│ │ └── literals.py
│ ├── common.py
│ ├── crash.py
│ ├── doc/
│ │ ├── Makefile
│ │ ├── bool_operations.rst
│ │ ├── bytes_operations.rst
│ │ ├── compilation_units.rst
│ │ ├── conf.py
│ │ ├── cpython-timings.md
│ │ ├── dev-intro.md
│ │ ├── dict_operations.rst
│ │ ├── differences_from_python.rst
│ │ ├── float_operations.rst
│ │ ├── future.md
│ │ ├── getting_started.rst
│ │ ├── index.rst
│ │ ├── int_operations.rst
│ │ ├── introduction.rst
│ │ ├── list_operations.rst
│ │ ├── make.bat
│ │ ├── native_classes.rst
│ │ ├── native_operations.rst
│ │ ├── performance_tips_and_tricks.rst
│ │ ├── set_operations.rst
│ │ ├── str_operations.rst
│ │ ├── tuple_operations.rst
│ │ └── using_type_annotations.rst
│ ├── errors.py
│ ├── external/
│ │ └── googletest/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── make/
│ │ │ └── Makefile
│ │ └── src/
│ │ ├── gtest-all.cc
│ │ ├── gtest-death-test.cc
│ │ ├── gtest-filepath.cc
│ │ ├── gtest-internal-inl.h
│ │ ├── gtest-port.cc
│ │ ├── gtest-printers.cc
│ │ ├── gtest-test-part.cc
│ │ ├── gtest-typed-test.cc
│ │ ├── gtest.cc
│ │ └── gtest_main.cc
│ ├── ir/
│ │ ├── __init__.py
│ │ ├── class_ir.py
│ │ ├── func_ir.py
│ │ ├── module_ir.py
│ │ ├── ops.py
│ │ ├── pprint.py
│ │ └── rtypes.py
│ ├── irbuild/
│ │ ├── __init__.py
│ │ ├── ast_helpers.py
│ │ ├── builder.py
│ │ ├── callable_class.py
│ │ ├── classdef.py
│ │ ├── constant_fold.py
│ │ ├── context.py
│ │ ├── env_class.py
│ │ ├── expression.py
│ │ ├── for_helpers.py
│ │ ├── format_str_tokenizer.py
│ │ ├── function.py
│ │ ├── generator.py
│ │ ├── ll_builder.py
│ │ ├── main.py
│ │ ├── mapper.py
│ │ ├── match.py
│ │ ├── nonlocalcontrol.py
│ │ ├── prebuildvisitor.py
│ │ ├── prepare.py
│ │ ├── specialize.py
│ │ ├── statement.py
│ │ ├── targets.py
│ │ ├── util.py
│ │ ├── visitor.py
│ │ └── vtable.py
│ ├── lib-rt/
│ │ ├── CPy.h
│ │ ├── bytes_ops.c
│ │ ├── dict_ops.c
│ │ ├── exc_ops.c
│ │ ├── float_ops.c
│ │ ├── generic_ops.c
│ │ ├── getargs.c
│ │ ├── getargsfast.c
│ │ ├── init.c
│ │ ├── int_ops.c
│ │ ├── list_ops.c
│ │ ├── misc_ops.c
│ │ ├── module_shim.tmpl
│ │ ├── mypyc_util.h
│ │ ├── pythoncapi_compat.h
│ │ ├── pythonsupport.c
│ │ ├── pythonsupport.h
│ │ ├── set_ops.c
│ │ ├── setup.py
│ │ ├── str_ops.c
│ │ ├── test_capi.cc
│ │ └── tuple_ops.c
│ ├── lower/
│ │ ├── __init__.py
│ │ ├── int_ops.py
│ │ ├── list_ops.py
│ │ ├── misc_ops.py
│ │ └── registry.py
│ ├── namegen.py
│ ├── options.py
│ ├── primitives/
│ │ ├── __init__.py
│ │ ├── bytes_ops.py
│ │ ├── dict_ops.py
│ │ ├── exc_ops.py
│ │ ├── float_ops.py
│ │ ├── generic_ops.py
│ │ ├── int_ops.py
│ │ ├── list_ops.py
│ │ ├── misc_ops.py
│ │ ├── registry.py
│ │ ├── set_ops.py
│ │ ├── str_ops.py
│ │ └── tuple_ops.py
│ ├── py.typed
│ ├── rt_subtype.py
│ ├── sametype.py
│ ├── subtype.py
│ ├── test/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── test_alwaysdefined.py
│ │ ├── test_analysis.py
│ │ ├── test_cheader.py
│ │ ├── test_commandline.py
│ │ ├── test_emit.py
│ │ ├── test_emitclass.py
│ │ ├── test_emitfunc.py
│ │ ├── test_emitwrapper.py
│ │ ├── test_exceptions.py
│ │ ├── test_external.py
│ │ ├── test_irbuild.py
│ │ ├── test_ircheck.py
│ │ ├── test_literals.py
│ │ ├── test_lowering.py
│ │ ├── test_namegen.py
│ │ ├── test_optimizations.py
│ │ ├── test_pprint.py
│ │ ├── test_rarray.py
│ │ ├── test_refcount.py
│ │ ├── test_run.py
│ │ ├── test_serialization.py
│ │ ├── test_struct.py
│ │ ├── test_tuplename.py
│ │ ├── test_typeops.py
│ │ └── testutil.py
│ ├── test-data/
│ │ ├── alwaysdefined.test
│ │ ├── analysis.test
│ │ ├── commandline.test
│ │ ├── driver/
│ │ │ └── driver.py
│ │ ├── exceptions-freq.test
│ │ ├── exceptions.test
│ │ ├── fixtures/
│ │ │ ├── ir.py
│ │ │ ├── testutil.py
│ │ │ └── typing-full.pyi
│ │ ├── irbuild-any.test
│ │ ├── irbuild-basic.test
│ │ ├── irbuild-bool.test
│ │ ├── irbuild-bytes.test
│ │ ├── irbuild-classes.test
│ │ ├── irbuild-constant-fold.test
│ │ ├── irbuild-dict.test
│ │ ├── irbuild-dunders.test
│ │ ├── irbuild-float.test
│ │ ├── irbuild-generics.test
│ │ ├── irbuild-glue-methods.test
│ │ ├── irbuild-i16.test
│ │ ├── irbuild-i32.test
│ │ ├── irbuild-i64.test
│ │ ├── irbuild-int.test
│ │ ├── irbuild-isinstance.test
│ │ ├── irbuild-lists.test
│ │ ├── irbuild-match.test
│ │ ├── irbuild-math.test
│ │ ├── irbuild-nested.test
│ │ ├── irbuild-optional.test
│ │ ├── irbuild-set.test
│ │ ├── irbuild-singledispatch.test
│ │ ├── irbuild-statements.test
│ │ ├── irbuild-str.test
│ │ ├── irbuild-strip-asserts.test
│ │ ├── irbuild-try.test
│ │ ├── irbuild-tuple.test
│ │ ├── irbuild-u8.test
│ │ ├── irbuild-unreachable.test
│ │ ├── irbuild-vectorcall.test
│ │ ├── lowering-int.test
│ │ ├── lowering-list.test
│ │ ├── opt-copy-propagation.test
│ │ ├── opt-flag-elimination.test
│ │ ├── refcount.test
│ │ ├── run-async.test
│ │ ├── run-attrs.test
│ │ ├── run-bench.test
│ │ ├── run-bools.test
│ │ ├── run-bytes.test
│ │ ├── run-classes.test
│ │ ├── run-dicts.test
│ │ ├── run-dunders-special.test
│ │ ├── run-dunders.test
│ │ ├── run-exceptions.test
│ │ ├── run-floats.test
│ │ ├── run-functions.test
│ │ ├── run-generators.test
│ │ ├── run-i16.test
│ │ ├── run-i32.test
│ │ ├── run-i64.test
│ │ ├── run-imports.test
│ │ ├── run-integers.test
│ │ ├── run-lists.test
│ │ ├── run-loops.test
│ │ ├── run-match.test
│ │ ├── run-math.test
│ │ ├── run-misc.test
│ │ ├── run-multimodule.test
│ │ ├── run-mypy-sim.test
│ │ ├── run-primitives.test
│ │ ├── run-python312.test
│ │ ├── run-python37.test
│ │ ├── run-python38.test
│ │ ├── run-sets.test
│ │ ├── run-singledispatch.test
│ │ ├── run-strings.test
│ │ ├── run-traits.test
│ │ ├── run-tuples.test
│ │ └── run-u8.test
│ └── transform/
│ ├── __init__.py
│ ├── copy_propagation.py
│ ├── exceptions.py
│ ├── flag_elimination.py
│ ├── ir_transform.py
│ ├── lower.py
│ ├── refcount.py
│ └── uninit.py
├── pw
├── pw.bat
├── pyproject.toml
├── runtests.py
├── setup.py
├── test-data/
│ ├── packages/
│ │ ├── modulefinder/
│ │ │ ├── nsx-pkg1/
│ │ │ │ └── nsx/
│ │ │ │ └── a/
│ │ │ │ └── __init__.py
│ │ │ ├── nsx-pkg2/
│ │ │ │ └── nsx/
│ │ │ │ └── b/
│ │ │ │ └── __init__.py
│ │ │ ├── nsx-pkg3/
│ │ │ │ └── nsx/
│ │ │ │ └── c/
│ │ │ │ ├── c
│ │ │ │ └── c.py
│ │ │ ├── nsy-pkg1/
│ │ │ │ └── nsy/
│ │ │ │ └── a/
│ │ │ │ ├── __init__.py
│ │ │ │ └── __init__.pyi
│ │ │ ├── nsy-pkg2/
│ │ │ │ └── nsy/
│ │ │ │ ├── b/
│ │ │ │ │ └── __init__.py
│ │ │ │ ├── b.pyi
│ │ │ │ ├── c.py
│ │ │ │ └── c.pyi
│ │ │ ├── pkg1/
│ │ │ │ ├── a
│ │ │ │ └── a.py
│ │ │ ├── pkg2/
│ │ │ │ └── b/
│ │ │ │ └── __init__.py
│ │ │ └── readme.txt
│ │ ├── modulefinder-site-packages/
│ │ │ ├── baz/
│ │ │ │ ├── baz_pkg/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── py.typed
│ │ │ │ └── ns_baz_pkg/
│ │ │ │ ├── a.py
│ │ │ │ └── py.typed
│ │ │ ├── foo/
│ │ │ │ ├── __init__.py
│ │ │ │ └── bar.py
│ │ │ ├── foo-stubs/
│ │ │ │ ├── __init__.pyi
│ │ │ │ └── bar.pyi
│ │ │ ├── ns_pkg_typed/
│ │ │ │ ├── a.py
│ │ │ │ ├── b/
│ │ │ │ │ └── c.py
│ │ │ │ └── py.typed
│ │ │ ├── ns_pkg_untyped/
│ │ │ │ ├── a.py
│ │ │ │ └── b/
│ │ │ │ └── c.py
│ │ │ ├── ns_pkg_w_stubs/
│ │ │ │ ├── typed/
│ │ │ │ │ └── __init__.py
│ │ │ │ ├── typed_inline/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── py.typed
│ │ │ │ └── untyped/
│ │ │ │ └── __init__.py
│ │ │ ├── ns_pkg_w_stubs-stubs/
│ │ │ │ └── typed/
│ │ │ │ └── __init__.pyi
│ │ │ ├── pkg_typed/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── a.py
│ │ │ │ ├── b/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── c.py
│ │ │ │ └── py.typed
│ │ │ ├── pkg_untyped/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── a.py
│ │ │ │ └── b/
│ │ │ │ ├── __init__.py
│ │ │ │ └── c.py
│ │ │ └── standalone.py
│ │ ├── modulefinder-src/
│ │ │ ├── neighbor_pkg/
│ │ │ │ ├── __init__.py
│ │ │ │ └── py.typed
│ │ │ └── ns_neighbor_pkg/
│ │ │ ├── a.py
│ │ │ └── py.typed
│ │ ├── typedpkg/
│ │ │ ├── pyproject.toml
│ │ │ └── typedpkg/
│ │ │ ├── __init__.py
│ │ │ ├── dne.py
│ │ │ ├── pkg/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── aaa.py
│ │ │ │ └── py.typed
│ │ │ ├── py.typed
│ │ │ └── sample.py
│ │ ├── typedpkg-stubs/
│ │ │ ├── pyproject.toml
│ │ │ └── typedpkg-stubs/
│ │ │ ├── __init__.pyi
│ │ │ ├── py.typed
│ │ │ └── sample.pyi
│ │ ├── typedpkg_ns_a/
│ │ │ ├── pyproject.toml
│ │ │ └── typedpkg_ns/
│ │ │ ├── __init__.py
│ │ │ └── a/
│ │ │ ├── __init__.py
│ │ │ ├── bbb.py
│ │ │ └── py.typed
│ │ ├── typedpkg_ns_b/
│ │ │ ├── pyproject.toml
│ │ │ └── typedpkg_ns/
│ │ │ ├── __init__.py
│ │ │ └── b/
│ │ │ ├── __init__.py
│ │ │ └── bbb.py
│ │ └── typedpkg_ns_b-stubs/
│ │ ├── pyproject.toml
│ │ └── typedpkg_ns-stubs/
│ │ └── b/
│ │ ├── __init__.pyi
│ │ └── bbb.pyi
│ ├── pybind11_fixtures/
│ │ ├── expected_stubs_no_docs/
│ │ │ └── pybind11_fixtures/
│ │ │ ├── __init__.pyi
│ │ │ └── demo.pyi
│ │ ├── expected_stubs_with_docs/
│ │ │ └── pybind11_fixtures/
│ │ │ ├── __init__.pyi
│ │ │ └── demo.pyi
│ │ ├── pyproject.toml
│ │ ├── setup.py
│ │ └── src/
│ │ └── main.cpp
│ └── unit/
│ ├── README.md
│ ├── check-abstract.test
│ ├── check-annotated.test
│ ├── check-assert-type-fail.test
│ ├── check-async-await.test
│ ├── check-based-bare-literals.test
│ ├── check-based-callable.test
│ ├── check-based-cast.test
│ ├── check-based-conditional-types.test
│ ├── check-based-default-return.test
│ ├── check-based-format.test
│ ├── check-based-generic-typevar-bound.test
│ ├── check-based-ignore-any-from-error.test
│ ├── check-based-incomplete-defs.test
│ ├── check-based-infer-function-types.test
│ ├── check-based-intersection.test
│ ├── check-based-misc.test
│ ├── check-based-none.test
│ ├── check-based-overload.test
│ ├── check-based-python313.test
│ ├── check-based-tuple-literal.test
│ ├── check-based-type-check-only.test
│ ├── check-based-type-render.test
│ ├── check-based-typechecking.test
│ ├── check-based-typeguard.test
│ ├── check-based-typevar.test
│ ├── check-based-union-join.test
│ ├── check-based-unsafe-variance.test
│ ├── check-based-untyped.test
│ ├── check-basic.test
│ ├── check-bound.test
│ ├── check-callable.test
│ ├── check-class-namedtuple.test
│ ├── check-classes.test
│ ├── check-classvar.test
│ ├── check-columns.test
│ ├── check-ctypes.test
│ ├── check-custom-plugin.test
│ ├── check-dataclass-transform.test
│ ├── check-dataclasses.test
│ ├── check-deprecated.test
│ ├── check-dynamic-typing.test
│ ├── check-enum.test
│ ├── check-errorcodes.test
│ ├── check-expressions.test
│ ├── check-fastparse.test
│ ├── check-final.test
│ ├── check-flags.test
│ ├── check-formatting.test
│ ├── check-functions.test
│ ├── check-functools.test
│ ├── check-generic-alias.test
│ ├── check-generic-subtyping.test
│ ├── check-generics.test
│ ├── check-ignore.test
│ ├── check-incomplete-fixture.test
│ ├── check-incremental.test
│ ├── check-inference-context.test
│ ├── check-inference.test
│ ├── check-inline-config.test
│ ├── check-isinstance.test
│ ├── check-kwargs.test
│ ├── check-lists.test
│ ├── check-literal.test
│ ├── check-lowercase.test
│ ├── check-modules-case.test
│ ├── check-modules-fast.test
│ ├── check-modules.test
│ ├── check-multiple-inheritance.test
│ ├── check-namedtuple.test
│ ├── check-narrowing.test
│ ├── check-native-int.test
│ ├── check-newsemanal.test
│ ├── check-newsyntax.test
│ ├── check-newtype.test
│ ├── check-optional.test
│ ├── check-overloading.test
│ ├── check-parameter-specification.test
│ ├── check-plugin-attrs.test
│ ├── check-possibly-undefined.test
│ ├── check-protocols.test
│ ├── check-python310.test
│ ├── check-python311.test
│ ├── check-python312.test
│ ├── check-python313.test
│ ├── check-python38.test
│ ├── check-python39.test
│ ├── check-recursive-types.test
│ ├── check-redefine.test
│ ├── check-reports.test
│ ├── check-selftype.test
│ ├── check-semanal-error.test
│ ├── check-serialize.test
│ ├── check-singledispatch.test
│ ├── check-slots.test
│ ├── check-statements.test
│ ├── check-super.test
│ ├── check-tuples.test
│ ├── check-type-aliases.test
│ ├── check-type-checks.test
│ ├── check-type-object-type-inference.test
│ ├── check-type-promotion.test
│ ├── check-typeddict.test
│ ├── check-typeguard.test
│ ├── check-typeis.test
│ ├── check-typevar-defaults.test
│ ├── check-typevar-tuple.test
│ ├── check-typevar-unbound.test
│ ├── check-typevar-values.test
│ ├── check-underscores.test
│ ├── check-union-error-syntax.test
│ ├── check-union-or-syntax.test
│ ├── check-unions.test
│ ├── check-unreachable-code.test
│ ├── check-unsupported.test
│ ├── check-varargs.test
│ ├── check-warnings.test
│ ├── cmdline-based-baseline.test
│ ├── cmdline-based-regex.test
│ ├── cmdline-based.test
│ ├── cmdline.pyproject.test
│ ├── cmdline.test
│ ├── daemon-based.test
│ ├── daemon.test
│ ├── deps-classes.test
│ ├── deps-expressions.test
│ ├── deps-generics.test
│ ├── deps-statements.test
│ ├── deps-types.test
│ ├── deps.test
│ ├── diff.test
│ ├── envvars.test
│ ├── errorstream.test
│ ├── fine-grained-attr.test
│ ├── fine-grained-blockers.test
│ ├── fine-grained-cache-incremental.test
│ ├── fine-grained-cycles.test
│ ├── fine-grained-dataclass-transform.test
│ ├── fine-grained-dataclass.test
│ ├── fine-grained-follow-imports.test
│ ├── fine-grained-inspect.test
│ ├── fine-grained-modules.test
│ ├── fine-grained-python312.test
│ ├── fine-grained-suggest.test
│ ├── fine-grained.test
│ ├── fixtures/
│ │ ├── __init_subclass__.pyi
│ │ ├── __new__.pyi
│ │ ├── alias.pyi
│ │ ├── any.pyi
│ │ ├── args.pyi
│ │ ├── async_await.pyi
│ │ ├── bool.pyi
│ │ ├── callable.pyi
│ │ ├── classmethod.pyi
│ │ ├── complex.pyi
│ │ ├── complex_tuple.pyi
│ │ ├── dataclasses.pyi
│ │ ├── dict-full.pyi
│ │ ├── dict.pyi
│ │ ├── divmod.pyi
│ │ ├── enum.pyi
│ │ ├── exception.pyi
│ │ ├── f_string.pyi
│ │ ├── fine_grained.pyi
│ │ ├── float.pyi
│ │ ├── floatdict.pyi
│ │ ├── for.pyi
│ │ ├── function.pyi
│ │ ├── isinstance.pyi
│ │ ├── isinstance_python3_10.pyi
│ │ ├── isinstancelist.pyi
│ │ ├── len.pyi
│ │ ├── list.pyi
│ │ ├── module.pyi
│ │ ├── module_all.pyi
│ │ ├── narrowing.pyi
│ │ ├── notimplemented.pyi
│ │ ├── object_hashable.pyi
│ │ ├── object_with_init_subclass.pyi
│ │ ├── ops.pyi
│ │ ├── paramspec.pyi
│ │ ├── plugin_attrs.pyi
│ │ ├── primitives.pyi
│ │ ├── property.pyi
│ │ ├── set.pyi
│ │ ├── slice.pyi
│ │ ├── staticmethod.pyi
│ │ ├── transform.pyi
│ │ ├── tuple-simple.pyi
│ │ ├── tuple.pyi
│ │ ├── type.pyi
│ │ ├── typing-async.pyi
│ │ ├── typing-full.pyi
│ │ ├── typing-medium.pyi
│ │ ├── typing-namedtuple.pyi
│ │ ├── typing-override.pyi
│ │ ├── typing-typeddict-iror.pyi
│ │ ├── typing-typeddict.pyi
│ │ └── union.pyi
│ ├── hacks.txt
│ ├── lib-stub/
│ │ ├── _decimal.pyi
│ │ ├── _typeshed.pyi
│ │ ├── abc.pyi
│ │ ├── attr/
│ │ │ ├── __init__.pyi
│ │ │ └── converters.pyi
│ │ ├── attrs/
│ │ │ ├── __init__.pyi
│ │ │ └── converters.pyi
│ │ ├── basedtyping.pyi
│ │ ├── blocker.pyi
│ │ ├── blocker2.pyi
│ │ ├── broken.pyi
│ │ ├── builtins.pyi
│ │ ├── collections.pyi
│ │ ├── contextlib.pyi
│ │ ├── dataclasses.pyi
│ │ ├── datetime.pyi
│ │ ├── decimal.pyi
│ │ ├── enum.pyi
│ │ ├── functools.pyi
│ │ ├── future/
│ │ │ ├── __init__.pyi
│ │ │ └── utils.pyi
│ │ ├── helper.pyi
│ │ ├── math.pyi
│ │ ├── mypy_extensions.pyi
│ │ ├── numbers.pyi
│ │ ├── six.pyi
│ │ ├── sys.pyi
│ │ ├── traceback.pyi
│ │ ├── types.pyi
│ │ ├── typing.pyi
│ │ ├── typing_extensions.pyi
│ │ └── unannotated_lib.pyi
│ ├── merge.test
│ ├── outputjson.test
│ ├── parse-errors.test
│ ├── parse-python310.test
│ ├── parse-python312.test
│ ├── parse-python313.test
│ ├── parse.test
│ ├── pep561.test
│ ├── plugins/
│ │ ├── add_classmethod.py
│ │ ├── add_method.py
│ │ ├── add_overloaded_method.py
│ │ ├── arg_kinds.py
│ │ ├── arg_names.py
│ │ ├── attrhook.py
│ │ ├── attrhook2.py
│ │ ├── badreturn.py
│ │ ├── badreturn2.py
│ │ ├── callable_instance.py
│ │ ├── class_attr_hook.py
│ │ ├── class_callable.py
│ │ ├── common_api_incremental.py
│ │ ├── config_data.py
│ │ ├── custom_errorcode.py
│ │ ├── customentry.py
│ │ ├── customize_mro.py
│ │ ├── decimal_to_int.py
│ │ ├── depshook.py
│ │ ├── descriptor.py
│ │ ├── dyn_class.py
│ │ ├── dyn_class_from_method.py
│ │ ├── fnplugin.py
│ │ ├── fully_qualified_test_hook.py
│ │ ├── function_sig_hook.py
│ │ ├── method_in_decorator.py
│ │ ├── method_sig_hook.py
│ │ ├── named_callable.py
│ │ ├── noentry.py
│ │ ├── plugin2.py
│ │ ├── type_anal_hook.py
│ │ └── union_method.py
│ ├── pythoneval-asyncio.test
│ ├── pythoneval.test
│ ├── ref-info.test
│ ├── reports.test
│ ├── semanal-abstractclasses.test
│ ├── semanal-basic.test
│ ├── semanal-classes.test
│ ├── semanal-classvar.test
│ ├── semanal-errors-python310.test
│ ├── semanal-errors.test
│ ├── semanal-expressions.test
│ ├── semanal-lambda.test
│ ├── semanal-literal.test
│ ├── semanal-modules.test
│ ├── semanal-namedtuple.test
│ ├── semanal-python310.test
│ ├── semanal-statements.test
│ ├── semanal-symtable.test
│ ├── semanal-typealiases.test
│ ├── semanal-typeddict.test
│ ├── semanal-typeinfo.test
│ ├── semanal-types.test
│ ├── stubgen-based.test
│ ├── stubgen.test
│ └── typexport-basic.test
├── test-requirements.in
├── test-requirements.txt
└── tox.ini
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*.{py,pyi,c,cpp,h,rst,md,yml,yaml,json,test}]
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
[*.{py,pyi,c,h,json,test}]
indent_size = 4
[*.{yml,yaml}]
indent_size = 2
================================================
FILE: .git-blame-ignore-revs
================================================
# Adopt black and isort
97c5ee99bc98dc475512e549b252b23a6e7e0997
# Use builtin generics and PEP 604 for type annotations wherever possible (#13427)
23ee1e7aff357e656e3102435ad0fe3b5074571e
# Use variable annotations (#10723)
f98f78216ba9d6ab68c8e69c19e9f3c7926c5efe
# run pyupgrade (#12711)
fc335cb16315964b923eb1927e3aad1516891c28
# update black to 23.3.0 (#15059)
4276308be01ea498d946a79554b4a10b1cf13ccb
# Update black to 24.1.1 (#16847)
8107e53158d83d30bb04d290ac10d8d3ccd344f8
================================================
FILE: .gitattributes
================================================
# We vendor typeshed from https://github.com/python/typeshed
mypy/typeshed/** linguist-vendored
================================================
FILE: .github/ISSUE_TEMPLATE/bug.md
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug.yml
================================================
name: Bug Report
description: Something isn't working as it should
labels: "bug"
body:
- type: textarea
attributes:
label: Describe the problem
description: add expected and actual result if it's not blatantly obvious
- type: textarea
attributes:
label: Gist to reproduce
description: >
Full source code is appreciated. We also very much appreciate
it if you try to narrow the source down to a small stand-alone example.
render: python
- type: dropdown
attributes:
label: Severity
description: How does this affect you?
options:
- annoying but workaround is available
- annoying but i can live with it
- blocker (literally unusable)
validations:
required: true
- type: textarea
attributes:
label: Your Environment
description: include any relevant information such as operating system and the output of `mypy --version`
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
contact_links:
- about: "Please ask and answer usage questions in our official Discord."
name: Questions, help and discussion
url: "https://discord.gg/7y9upqPrk2"
================================================
FILE: .github/ISSUE_TEMPLATE/documentation.md
================================================
---
name: Documentation
about: Report a problem with the documentation
labels: "documentation"
---
(A clear and concise description of the issue.)
================================================
FILE: .github/ISSUE_TEMPLATE/feature.md
================================================
---
name: Feature
about: Submit a proposal for a based new mypy feature
labels: "feature"
---
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================

================================================
FILE: .github/workflows/build_wheels.yml
================================================
name: Trigger wheel build
on:
push:
branches: [main, master, 'release*']
tags: ['*']
permissions:
contents: read
jobs:
build-wheels:
if: github.repository == 'KotlinIsland/basedmypy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Trigger script
env:
WHEELS_PUSH_TOKEN: ${{ secrets.WHEELS_PUSH_TOKEN }}
run: ./misc/trigger_wheel_build.sh
================================================
FILE: .github/workflows/docs.yml
================================================
name: Check documentation build
on:
workflow_dispatch:
push:
branches: [main, master, 'release*']
tags: ['*']
pull_request:
paths:
- 'docs/**'
# We now have a docs check that fails if any error codes don't have documentation,
# so it's important to do the docs build on all PRs touching mypy/errorcodes.py
# in case somebody's adding a new error code without any docs
- 'mypy/errorcodes.py'
- 'mypyc/doc/**'
- '**/*.rst'
- '**/*.md'
- CREDITS
- LICENSE
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TOXENV: docs
TOX_SKIP_MISSING_INTERPRETERS: False
VERIFY_MYPY_ERROR_CODES: 1
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install tox
run: pip install tox==4.21.2
- name: Setup tox environment
run: tox run -e ${{ env.TOXENV }} --notest
- name: Test
run: tox run -e ${{ env.TOXENV }} --skip-pkg-install
================================================
FILE: .github/workflows/mypy_primer.yml
================================================
name: Run mypy_primer
on:
# Only run on PR, since we diff against master
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.rst'
- '**/*.md'
- 'misc/**'
- 'mypyc/**'
- 'mypy/stubtest.py'
- 'mypy/stubgen.py'
- 'mypy/stubgenc.py'
- 'mypy/test/**'
- 'test-data/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
mypy_primer:
name: Run mypy_primer
runs-on: ubuntu-latest
strategy:
matrix:
shard-index: [0, 1, 2, 3, 4]
fail-fast: false
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
path: mypy_to_test
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install -U pip
pip install git+https://github.com/hauntsaninja/mypy_primer.git
- name: Run mypy_primer
shell: bash
run: |
cd mypy_to_test
echo "new commit"
git rev-list --format=%s --max-count=1 $GITHUB_SHA
MERGE_BASE=$(git merge-base $GITHUB_SHA origin/$GITHUB_BASE_REF)
git checkout -b base_commit $MERGE_BASE
echo "base commit"
git rev-list --format=%s --max-count=1 base_commit
echo ''
cd ..
# fail action if exit code isn't zero or one
(
mypy_primer \
--repo mypy_to_test \
--new $GITHUB_SHA --old base_commit \
--num-shards 5 --shard-index ${{ matrix.shard-index }} \
--debug \
--additional-flags="--debug-serialize --no-color-output --enable-error-code=helpful-string" \
--output concise \
`# We don't want to run on spack because it has massive inferred types` \
`# https://github.com/KotlinIsland/basedmypy/issues/399` \
--project-selector "^(?!https://github.com/(spack/spack|mitmproxy/mitmproxy))" \
| tee diff_${{ matrix.shard-index }}.txt
) || [ $? -eq 1 ]
- if: ${{ matrix.shard-index == 0 }}
name: Save PR number
run: |
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
- name: Upload mypy_primer diff + PR number
uses: actions/upload-artifact@v4
if: ${{ matrix.shard-index == 0 }}
with:
name: mypy_primer_diffs-${{ matrix.shard-index }}
path: |
diff_${{ matrix.shard-index }}.txt
pr_number.txt
- name: Upload mypy_primer diff
uses: actions/upload-artifact@v4
if: ${{ matrix.shard-index != 0 }}
with:
name: mypy_primer_diffs-${{ matrix.shard-index }}
path: diff_${{ matrix.shard-index }}.txt
join_artifacts:
name: Join artifacts
runs-on: ubuntu-latest
needs: [mypy_primer]
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: mypy_primer_diffs
pattern: mypy_primer_diffs-*
delete-merged: true
================================================
FILE: .github/workflows/mypy_primer_comment.yml
================================================
name: Comment with mypy_primer diff
on: # zizmor: ignore[dangerous-triggers]
workflow_run:
workflows:
- Run mypy_primer
types:
- completed
permissions: {}
jobs:
comment:
name: Comment PR from mypy_primer
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download diffs
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }},
});
const [matchArtifact] = artifacts.data.artifacts.filter((artifact) =>
artifact.name == "mypy_primer_diffs");
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: "zip",
});
fs.writeFileSync("diff.zip", Buffer.from(download.data));
- run: unzip diff.zip
- run: |
cat diff_*.txt | tee fulldiff.txt
- name: Post comment
id: post-comment
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const MAX_CHARACTERS = 261544
const MAX_CHARACTERS_PER_PROJECT = MAX_CHARACTERS / 3
const fs = require('fs')
let data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
function truncateIfNeeded(original, maxLength, suffix='') {
maxLength -= suffix.length
if (original.length <= maxLength) {
return original + suffix
}
suffix += '\n\n... (truncated {lines_truncated} lines) ...'
let truncated = original.substring(0, maxLength)
// further, remove last line that might be truncated
truncated = truncated.substring(0, truncated.lastIndexOf('\n'))
let lines_truncated = original.split('\n').length - truncated.split('\n').length
return `${truncated}${suffix.replace("{lines_truncated}", lines_truncated)}`
}
if (data.length >= MAX_CHARACTERS) {
const projects = data.split('\n\n')
// don't let one project dominate
data = projects.map(project => truncateIfNeeded(project, MAX_CHARACTERS_PER_PROJECT)).join('\n\n')
}
console.log("Diff from mypy_primer:")
console.log(data)
let body
if (data.trim()) {
data = '```diff\n' + data
if (data.split('\n').length > 500) {
data = '
\n\n' + data + '```'
}
body = 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), showing the effect of this PR on open source code:\n' + data
body = truncateIfNeeded(body, MAX_CHARACTERS, data.split('\n').length > 500 ? '``` ' : '')
} else {
body = "According to [mypy_primer](https://github.com/hauntsaninja/mypy_primer), this change doesn't affect type check results on a corpus of open source code. ✅"
}
const prNumber = parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))
await github.rest.issues.createComment({
issue_number: prNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body
})
return prNumber
- name: Hide old comments
# v0.4.0
uses: kanga333/comment-hider@c12bb20b48aeb8fc098e35967de8d4f8018fffdf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
leave_visible: 1
issue_number: ${{ steps.post-comment.outputs.result }}
================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish
on:
release:
types: [published]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
shell: bash
run: |
version=$(python -c "import mypy.version; print(mypy.version.__based_version__)")
python misc/upload-pypi.py $version --save-dist
# Upload wheels as a release asset
- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./dist/* # zizmor: ignore[template-injection]
docs:
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
env:
TOXENV: docs
TOX_SKIP_MISSING_INTERPRETERS: False
environment:
name: docs
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install tox
run: pip install --upgrade 'setuptools!=50' tox==4.11.0
- name: Setup tox environment
run: tox run -e ${{ env.TOXENV }} --notest
- name: Test
run: tox run -e ${{ env.TOXENV }} --skip-pkg-install
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ".tox/docs_out"
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment
================================================
FILE: .github/workflows/sync_typeshed.yml
================================================
name: Sync typeshed
on:
workflow_dispatch:
schedule:
- cron: "0 0 1,15 * *"
permissions: {}
jobs:
sync_typeshed:
name: Sync typeshed
if: github.repository == 'python/mypy'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true # needed to `git push` the PR branch
# TODO: use whatever solution ends up working for
# https://github.com/python/typeshed/issues/8434
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: git config
run: |
git config --global user.name mypybot
git config --global user.email '<>'
- name: Sync typeshed
run: |
python -m pip install requests==2.28.1
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python misc/sync-typeshed.py --make-pr
================================================
FILE: .github/workflows/test.yml
================================================
name: Tests
on:
workflow_dispatch:
push:
branches: [main, master, 'release*', 'merge-mypy-*', 'merge-upstream']
tags: ['*']
pull_request:
paths-ignore:
- 'docs/**'
- 'mypyc/doc/**'
- '**/*.rst'
- '**/*.md'
- .gitignore
- CREDITS
- LICENSE
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
main:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Make sure to run mypyc compiled unit tests for both
# the oldest and newest supported Python versions
- name: Test suite with py39-ubuntu, mypyc-compiled
python: '3.9'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 4"
test_mypyc: true
- name: Test suite with py39-windows-64
python: '3.9'
arch: x64
os: windows-latest
toxenv: py39
tox_extra_args: "-n 4"
- name: Test suite with py310-ubuntu
python: '3.10'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 4"
- name: Test suite with py311-ubuntu, mypyc-compiled
python: '3.11'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 4"
test_mypyc: true
- name: Test suite with py312-ubuntu, mypyc-compiled
python: '3.12'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 4"
test_mypyc: true
- name: Test suite with py313-ubuntu, mypyc-compiled
python: '3.13'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 4"
test_mypyc: true
# - name: Test suite with py314-dev-ubuntu
# python: '3.14-dev'
# arch: x64
# os: ubuntu-latest
# toxenv: py
# tox_extra_args: "-n 4"
# allow_failure: true
# test_mypyc: true
- name: mypyc runtime tests with py39-macos
python: '3.9.21'
arch: x64
# TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version
os: macos-13
toxenv: py
tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
# This is broken. See
# - https://github.com/python/mypy/issues/17819
# - https://github.com/python/mypy/pull/17822
# - name: mypyc runtime tests with py38-debug-build-ubuntu
# python: '3.9.21'
# arch: x64
# os: ubuntu-latest
# toxenv: py
# tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
# debug_build: true
- name: Type check our own code (py39-ubuntu)
python: '3.9'
arch: x64
os: ubuntu-latest
toxenv: type
- name: Type check our own code (py39-windows-64)
python: '3.9'
arch: x64
os: windows-latest
toxenv: type
# We also run these checks with pre-commit in CI,
# but it's useful to run them with tox too,
# to ensure the tox env works as expected
- name: Formatting and code style with Black + ruff
python: '3.10'
arch: x64
os: ubuntu-latest
toxenv: lint
name: ${{ matrix.name }}
timeout-minutes: 60
env:
TOX_SKIP_MISSING_INTERPRETERS: False
# Rich (pip) -- Disable color for windows + pytest
FORCE_COLOR: ${{ !(startsWith(matrix.os, 'windows-') && startsWith(matrix.toxenv, 'py')) && 1 || 0 }}
# Tox
PY_COLORS: 1
# Pytest
PYTEST_ADDOPTS: --color=yes
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Debug build
if: ${{ matrix.debug_build }}
run: |
PYTHONVERSION=${{ matrix.python }}
PYTHONDIR=~/python-debug/python-$PYTHONVERSION
VENV=$PYTHONDIR/env
./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV
# TODO: does this do anything? env vars aren't passed to the next step right
source $VENV/bin/activate
- name: Latest dev build
if: ${{ endsWith(matrix.python, '-dev') }}
run: |
git clone --depth 1 https://github.com/python/cpython.git /tmp/cpython --branch $( echo ${{ matrix.python }} | sed 's/-dev//' )
cd /tmp/cpython
echo git rev-parse HEAD; git rev-parse HEAD
git show --no-patch
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential gdb lcov libbz2-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev \
libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev
./configure --prefix=/opt/pythondev
make -j$(nproc)
sudo make install
sudo ln -s /opt/pythondev/bin/python3 /opt/pythondev/bin/python
sudo ln -s /opt/pythondev/bin/pip3 /opt/pythondev/bin/pip
echo "/opt/pythondev/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v5
if: ${{ !(matrix.debug_build || endsWith(matrix.python, '-dev')) }}
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
- name: Install tox
run: |
echo PATH; echo $PATH
echo which python; which python
echo which pip; which pip
echo python version; python -c 'import sys; print(sys.version)'
echo debug build; python -c 'import sysconfig; print(bool(sysconfig.get_config_var("Py_DEBUG")))'
echo os.cpu_count; python -c 'import os; print(os.cpu_count())'
echo os.sched_getaffinity; python -c 'import os; print(len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))'
pip install setuptools==75.1.0 tox==4.21.2
- name: Compiled with mypyc
if: ${{ matrix.test_mypyc }}
run: |
pip install -r test-requirements.txt
CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e .
- name: Setup tox environment
run: |
tox run -e ${{ matrix.toxenv }} --notest
- name: Test
run: tox run -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }}
continue-on-error: ${{ matrix.allow_failure == 'true' }}
- name: Mark as success (check failures manually)
if: ${{ matrix.allow_failure == 'true' }}
run: exit 0
python_32bits:
runs-on: ubuntu-latest
name: Test mypyc suite with 32-bit Python
timeout-minutes: 60
env:
TOX_SKIP_MISSING_INTERPRETERS: False
# Rich (pip)
FORCE_COLOR: 1
# Tox
PY_COLORS: 1
# Pytest
PYTEST_ADDOPTS: --color=yes
CXX: i686-linux-gnu-g++
CC: i686-linux-gnu-gcc
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install 32-bit build dependencies
run: |
sudo dpkg --add-architecture i386 && \
sudo apt-get update && sudo apt-get install -y \
zlib1g-dev:i386 \
libgcc-s1:i386 \
g++-i686-linux-gnu \
gcc-i686-linux-gnu \
libffi-dev:i386 \
libssl-dev:i386 \
libbz2-dev:i386 \
libncurses-dev:i386 \
libreadline-dev:i386 \
libsqlite3-dev:i386 \
liblzma-dev:i386 \
uuid-dev:i386
- name: Compile, install, and activate 32-bit Python
uses: gabrielfalcao/pyenv-action@v13
with:
default: 3.11.1
command: python -c "import platform; print(f'{platform.architecture()=} {platform.machine()=}');"
- name: Install tox
run: pip install setuptools==75.1.0 tox==4.21.2
- name: Setup tox environment
run: tox run -e py --notest
- name: Test
run: tox run -e py --skip-pkg-install -- -n 4 mypyc/test/
================================================
FILE: .github/workflows/test_stubgenc.yml
================================================
name: Test stubgenc on pybind11_fixtures
on:
workflow_dispatch:
push:
branches: [main, master, 'release*']
tags: ['*']
pull_request:
paths:
- 'misc/test-stubgenc.sh'
- 'mypy/stubgenc.py'
- 'mypy/stubdoc.py'
- 'mypy/stubutil.py'
- 'test-data/stubgen/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
stubgenc:
# Check stub file generation for a small pybind11 project
# (full text match is required to pass)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup 🐍 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Test stubgenc
run: misc/test-stubgenc.sh
================================================
FILE: .gitignore
================================================
build/
__pycache__
*.py[cod]
*~
/build
/env*/
docs/build/
docs/source/_build
mypyc/doc/_build
*.iml
/out/
.venv*
venv/
.mypy_cache/
.incremental_checker_cache.json
.cache
test-data/packages/.pip_lock
dmypy.json
.dmypy.json
/.mypyc_test_output
# Packages
*.egg
*.egg-info
*.eggs
# IDEs
.idea
.vscode
# vim temporary files
.*.sw?
*.sw?
# Operating Systems
.DS_Store
# Coverage Files
htmlcov
.coverage*
# pytest cache
.pytest_cache/
# virtualenv
.Python
bin/
lib/
include/
.python-version
pyvenv.cfg
.tox
pip-wheel-metadata
test_capi
*.o
*.a
test_capi
/mypyc/lib-rt/build/
/mypyc/lib-rt/*.so
.pyprojectx
================================================
FILE: .mypy/baseline.json
================================================
{
"files": {
"mypy/__main__.py": [
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"int | Any\")",
"offset": 22,
"src": "os.dup2(devnull, sys.stdout.fileno())",
"target": "mypy.__main__.console_entry"
}
],
"mypy/build.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 343,
"src": "plugin_data: Any # config data from plugins",
"target": "mypy.build"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 15,
"src": "def cache_meta_from_dict(meta: dict[str, Any], data_json: str) -> CacheMeta:",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 7,
"src": "sentinel: Any = None # Values to be validated by the caller",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "return CacheMeta(",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"id\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"id\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"id\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"path\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"path\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"path\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"int | Any\")",
"offset": 1,
"src": "int(meta[\"mtime\"]) if \"mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "int(meta[\"mtime\"]) if \"mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "int(meta[\"mtime\"]) if \"mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 41,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "int(meta[\"mtime\"]) if \"mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 51,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "int(meta[\"mtime\"]) if \"mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"size\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"size\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"size\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"hash\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"hash\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"hash\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"dependencies\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"dependencies\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "meta.get(\"dependencies\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"int | Any\")",
"offset": 1,
"src": "int(meta[\"data_mtime\"]) if \"data_mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "int(meta[\"data_mtime\"]) if \"data_mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "int(meta[\"data_mtime\"]) if \"data_mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "int(meta[\"data_mtime\"]) if \"data_mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 61,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "int(meta[\"data_mtime\"]) if \"data_mtime\" in meta else sentinel,",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "meta.get(\"suppressed\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"suppressed\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "meta.get(\"suppressed\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"options\"),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "meta.get(\"options\"),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"dep_prios\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"dep_prios\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "meta.get(\"dep_prios\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"dep_lines\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"dep_lines\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "meta.get(\"dep_lines\", []),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"interface_hash\", \"\"),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"interface_hash\", \"\"),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"version_id\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"version_id\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"version_id\", sentinel),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"ignore_all\", True),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"ignore_all\", True),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"plugin_data\", None),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"plugin_data\", None),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "meta.get(\"baseline_hash\", None),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta.get(\"baseline_hash\", None),",
"target": "mypy.build.cache_meta_from_dict"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 93,
"src": "plugin_type = getattr(module, func_name)(__version__)",
"target": "mypy.build.load_plugins_from_config"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if not isinstance(plugin_type, type):",
"target": "mypy.build.load_plugins_from_config"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "plugin_type, plugin_path",
"target": "mypy.build.load_plugins_from_config"
},
{
"code": "any",
"column": 10,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 52,
"src": "ver = getattr(module, \"__version__\", \"none\")",
"target": "mypy.build.take_module_snapshot"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 1,
"src": "return f\"{ver}:{digest}\"",
"target": "mypy.build.take_module_snapshot"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 86,
"src": "self.stats: dict[str, Any] = {} # Values are ints or floats",
"target": "mypy.build.BuildManager.__init__"
},
{
"code": "helpful-string",
"column": 38,
"message": "The string for \"object\" isn't helpful in a user-facing or semantic string",
"offset": 102,
"src": "print(f\"{key + ':':24}{value}\")",
"target": "mypy.build.BuildManager.dump_stats"
},
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 145,
"src": "deps: Any = json_loads(self.metastore.read(self.fg_deps_meta[id][\"path\"]))",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "deps: Any = json_loads(self.metastore.read(self.fg_deps_meta[id][\"path\"]))",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[Any, Any]\")",
"offset": 2,
"src": "deps = {}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "val = {k: set(v) for k, v in deps.items()}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 14,
"message": "Expression type contains \"Any\" (has type \"dict[Any, set[Any]]\")",
"offset": 0,
"src": "val = {k: set(v) for k, v in deps.items()}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = {k: set(v) for k, v in deps.items()}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 0,
"src": "val = {k: set(v) for k, v in deps.items()}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = {k: set(v) for k, v in deps.items()}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = {k: set(v) for k, v in deps.items()}",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[Any, set[Any]]\")",
"offset": 2,
"src": "return val",
"target": "mypy.build.BuildManager.load_fine_grained_deps"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 37,
"src": "def add_stats(self, **kwds: Any) -> None:",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 1,
"src": "for key, value in kwds.items():",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for key, value in kwds.items():",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "for key, value in kwds.items():",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict_items[str, Any]\")",
"offset": 0,
"src": "for key, value in kwds.items():",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "if key in self.stats:",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "self.stats[key] += value",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.stats[key] += value",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.stats[key] += value",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "self.stats[key] = value",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.stats[key] = value",
"target": "mypy.build.BuildManager.add_stats"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 3,
"src": "return self.stats",
"target": "mypy.build.BuildManager.stats_summary"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 66,
"src": "if st.meta:",
"target": "mypy.build.write_deps_cache"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "hash = st.meta.hash",
"target": "mypy.build.write_deps_cache"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 139,
"src": "data: Any = json.loads(file.read_text())",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 24,
"src": "if not isinstance(data, dict) and error():",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "baseline_format = data.get(\"format\")",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not baseline_format:",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "metadata = data.get(\"__baseline_metadata__\")",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 63,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "baseline_format = metadata.get(\"format\") if isinstance(metadata, dict) else None",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if baseline_format is None and error():",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 9,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif baseline_format != \"1.7\":",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "not isinstance(data.get(\"files\"), dict) or not isinstance(data.get(\"targets\"), list)",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 66,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "not isinstance(data.get(\"files\"), dict) or not isinstance(data.get(\"targets\"), list)",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "baseline_errors = data.get(\"files\", {})",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "targets = data.get(\"targets\")",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if baseline_errors and targets:",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if baseline_errors and targets:",
"target": "mypy.build.load_baseline"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 27,
"src": "snapshot = _load_json_file(",
"target": "mypy.build.read_plugins_snapshot"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 6,
"src": "if snapshot is None:",
"target": "mypy.build.read_plugins_snapshot"
},
{
"code": "redundant-expr",
"column": 7,
"message": "Condition is always false",
"offset": 2,
"src": "if not isinstance(snapshot, dict):",
"target": "mypy.build.read_plugins_snapshot"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "if not isinstance(snapshot, dict):",
"target": "mypy.build.read_plugins_snapshot"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 1,
"src": "manager.log(f\"Could not load plugins snapshot: cache is not a dict: {type(snapshot)}\")",
"target": "mypy.build.read_plugins_snapshot"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "raw_quickstart = json_loads(f.read())",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"(Any, Any, Any)\")",
"offset": 0,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 65,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "quickstart = {file: (x, y, z) for file, (x, y, z) in raw_quickstart.items()}",
"target": "mypy.build.read_quickstart_file"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 14,
"src": "deps_meta = _load_json_file(",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 6,
"src": "if deps_meta is None:",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "meta_snapshot = deps_meta[\"snapshot\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "meta_snapshot = deps_meta[\"snapshot\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 8,
"src": "common = set(meta_snapshot.keys()) & set(current_meta_snapshot.keys())",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "common = set(meta_snapshot.keys()) & set(current_meta_snapshot.keys())",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 10,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if any(meta_snapshot[id] != current_meta_snapshot[id] for id in common):",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if any(meta_snapshot[id] != current_meta_snapshot[id] for id in common):",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if any(meta_snapshot[id] != current_meta_snapshot[id] for id in common):",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if any(meta_snapshot[id] != current_meta_snapshot[id] for id in common):",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 68,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 0,
"src": "if any(meta_snapshot[id] != current_meta_snapshot[id] for id in common):",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 5,
"src": "module_deps_metas = deps_meta[\"deps_meta\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "module_deps_metas = deps_meta[\"deps_meta\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(module_deps_metas, dict)",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "matched = manager.getmtime(meta[\"path\"]) == meta[\"mtime\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "matched = manager.getmtime(meta[\"path\"]) == meta[\"mtime\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "matched = manager.getmtime(meta[\"path\"]) == meta[\"mtime\"]",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if not matched:",
"target": "mypy.build.read_deps_cache"
},
{
"code": "any",
"column": 74,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "manager.log(f\"Invalid or missing fine-grained deps cache: {meta['path']}\")",
"target": "mypy.build.read_deps_cache"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "def _load_json_file(",
"target": "mypy.build._load_json_file"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 16,
"src": "result = json_loads(data)",
"target": "mypy.build._load_json_file"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 15,
"src": "assert isinstance(result, dict)",
"target": "mypy.build._load_json_file"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 92,
"src": "def find_cache_meta(id: str, path: str, manager: BuildManager) -> CacheMeta | None:",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 16,
"src": "meta = _load_json_file(",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 4,
"src": "if meta is None:",
"target": "mypy.build.find_cache_meta"
},
{
"code": "redundant-expr",
"column": 7,
"message": "Condition is always false",
"offset": 2,
"src": "if not isinstance(meta, dict):",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "if not isinstance(meta, dict):",
"target": "mypy.build.find_cache_meta"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 1,
"src": "manager.log(f\"Could not load cache for {id}: meta cache is not a dict: {repr(meta)}\")",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "m = cache_meta_from_dict(meta, data_json)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 8,
"src": "m.id != id",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or m.mtime is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Left operand of \"or\" is always false",
"offset": 0,
"src": "or m.mtime is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or m.size is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Left operand of \"or\" is always false",
"offset": 0,
"src": "or m.size is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or m.dependencies is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Left operand of \"or\" is always false",
"offset": 0,
"src": "or m.dependencies is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or m.data_mtime is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 9,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 7,
"src": "(m.version_id != manager.version_id and not manager.options.skip_version_check)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or m.options is None",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or len(m.dependencies) + len(m.suppressed) != len(m.dep_prios)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "or len(m.dependencies) + len(m.suppressed) != len(m.dep_prios)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 58,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "or len(m.dependencies) + len(m.suppressed) != len(m.dep_prios)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "or len(m.dependencies) + len(m.suppressed) != len(m.dep_lines)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "or len(m.dependencies) + len(m.suppressed) != len(m.dep_lines)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 58,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "or len(m.dependencies) + len(m.suppressed) != len(m.dep_lines)",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 7,
"src": "cached_options = m.options",
"target": "mypy.build.find_cache_meta"
},
{
"code": "helpful-string",
"column": 24,
"message": "The string for \"object\" isn't helpful in a user-facing or semantic string",
"offset": 14,
"src": "\" {}: {} != {}\".format(",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 13,
"src": "plugin_data = json_loads(",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "json_dumps(manager.plugin.report_config_data(ReportConfigContext(id, path, is_check=True)))",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "if m.plugin_data != plugin_data:",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if m.plugin_data != plugin_data:",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if m.plugin_data != plugin_data:",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 17,
"src": "if baseline_hash != m.baseline_hash:",
"target": "mypy.build.find_cache_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 7,
"src": "return m",
"target": "mypy.build.find_cache_meta"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def validate_meta(",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 15,
"src": "if meta is None:",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 4,
"src": "if meta.ignore_all and not ignore_all:",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 10,
"src": "data_mtime = manager.getmtime(meta.data_json)",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 4,
"src": "if data_mtime != meta.data_mtime:",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 34,
"src": "if size != meta.size and not bazel and not fine_grained_cache:",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 6,
"src": "if not bazel and (mtime != meta.mtime or path != meta.path):",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 53,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "if not bazel and (mtime != meta.mtime or path != meta.path):",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 7,
"src": "if int(qmtime) == mtime and qsize == size and qhash == meta.hash:",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "meta = meta._replace(mtime=mtime, path=path)",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "return meta",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 12,
"src": "if source_hash != meta.hash:",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 3,
"src": "return meta",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 7,
"src": "meta = meta._replace(mtime=mtime, path=path)",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"dict[str, str | int | list[str] | Mapping[str, object] | list[int] | Any]\")",
"offset": 2,
"src": "meta_dict = {",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 6,
"src": "\"data_mtime\": meta.data_mtime,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "\"dependencies\": meta.dependencies,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "\"suppressed\": meta.suppressed,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "\"dep_prios\": meta.dep_prios,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "\"dep_lines\": meta.dep_lines,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "\"interface_hash\": meta.interface_hash,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "\"ignore_all\": meta.ignore_all,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 1,
"src": "\"plugin_data\": meta.plugin_data,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "\"plugin_data\": meta.plugin_data,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "\"plugin_data\": meta.plugin_data,",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"dict[str, str | int | list[str] | Mapping[str, object] | list[int] | Any]\")",
"offset": 2,
"src": "meta_bytes = json_dumps(meta_dict, manager.options.debug_cache)",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 41,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 4,
"src": "id, path, meta_json, meta.mtime",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 6,
"src": "return meta",
"target": "mypy.build.validate_meta"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 4,
"src": "return meta",
"target": "mypy.build.validate_meta"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 12,
"src": "def write_cache(",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 56,
"src": "plugin_data = manager.plugin.report_config_data(ReportConfigContext(id, path, is_check=False))",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, str | int | list[str] | Mapping[str, object] | list[int] | Any | None]\")",
"offset": 64,
"src": "meta = {",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 15,
"src": "\"plugin_data\": plugin_data,",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "\"plugin_data\": plugin_data,",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, str | int | list[str] | Mapping[str, object] | list[int] | Any | None]\")",
"offset": 5,
"src": "meta_str = json_dumps(meta, manager.options.debug_cache)",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"(str, CacheMeta)\")",
"offset": 7,
"src": "return interface_hash, cache_meta_from_dict(meta, data_json)",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "return interface_hash, cache_meta_from_dict(meta, data_json)",
"target": "mypy.build.write_cache"
},
{
"code": "any",
"column": 48,
"message": "Expression type contains \"Any\" (has type \"dict[str, str | int | list[str] | Mapping[str, object] | list[int] | Any | None]\")",
"offset": 0,
"src": "return interface_hash, cache_meta_from_dict(meta, data_json)",
"target": "mypy.build.write_cache"
},
{
"code": "helpful-string",
"column": 68,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 22,
"src": "manager.log(f\"Error deleting cache file {filename}: {e.strerror}\")",
"target": "mypy.build.delete_cache"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 161,
"src": "meta: CacheMeta | None = None",
"target": "mypy.build"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 120,
"src": "if self.meta is not None:",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "self.interface_hash = self.meta.interface_hash",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "self.meta_source_hash = self.meta.hash",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 7,
"src": "self.meta = validate_meta(self.meta, self.id, self.path, self.ignore_all, manager)",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 2,
"src": "if self.meta:",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 3,
"src": "self.dependencies = list(self.meta.dependencies)",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "self.suppressed = list(self.meta.suppressed)",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 3,
"src": "assert len(all_deps) == len(self.meta.dep_prios)",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 68,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "self.priorities = {id: pri for id, pri in zip(all_deps, self.meta.dep_prios)}",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "assert len(all_deps) == len(self.meta.dep_lines)",
"target": "mypy.build.State.__init__"
},
{
"code": "any",
"column": 72,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "self.dep_line_map = {id: line for id, line in zip(all_deps, self.meta.dep_lines)}",
"target": "mypy.build.State.__init__"
},
{
"code": "helpful-string",
"column": 70,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 21,
"src": "manager.log(f\"Deferring module to fine-grained update {path} ({id})\")",
"target": "mypy.build.State.__init__"
},
{
"code": "helpful-string",
"column": 78,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 0,
"src": "manager.log(f\"Deferring module to fine-grained update {path} ({id})\")",
"target": "mypy.build.State.__init__"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 8,
"src": "def xmeta(self) -> CacheMeta:",
"target": "mypy.build.State.xmeta"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (self: State) -> CacheMeta\")",
"offset": 0,
"src": "def xmeta(self) -> CacheMeta:",
"target": "mypy.build"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 1,
"src": "assert self.meta, \"missing meta on allegedly fresh module\"",
"target": "mypy.build.State.xmeta"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "return self.meta",
"target": "mypy.build.State.xmeta"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 25,
"src": "self.meta is not None",
"target": "mypy.build.State.is_fresh"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "and self.dependencies == self.meta.dependencies",
"target": "mypy.build.State.is_fresh"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 59,
"src": "self.meta is not None",
"target": "mypy.build.State.load_tree"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 3,
"src": "data = _load_json_file(",
"target": "mypy.build.State.load_tree"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 1,
"src": "self.meta.data_json, self.manager, \"Load tree \", \"Could not load tree: \"",
"target": "mypy.build.State.load_tree"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 2,
"src": "if data is None:",
"target": "mypy.build.State.load_tree"
},
{
"code": "any",
"column": 41,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 5,
"src": "self.tree = MypyFile.deserialize(data)",
"target": "mypy.build.State.load_tree"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"(str, CacheMeta | None)\")",
"offset": 409,
"src": "new_interface_hash, self.meta = write_cache(",
"target": "mypy.build.State.write_cache"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 80,
"src": "if self.meta:",
"target": "mypy.build.State.generate_unused_ignore_notes"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 347,
"src": "elif manager.stats.get(\"fresh_metas\", 0) > 0:",
"target": "mypy.build.dispatch"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "elif manager.stats.get(\"fresh_metas\", 0) > 0:",
"target": "mypy.build.dispatch"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "manager.stats.clear()",
"target": "mypy.build.dispatch"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 339,
"src": "oldest_in_scc = min(graph[id].xmeta.data_mtime for id in scc)",
"target": "mypy.build.process_graph"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 1,
"src": "viable = {id for id in stale_deps if graph[id].meta is not None}",
"target": "mypy.build.process_graph"
},
{
"code": "any",
"column": 41,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 2,
"src": "0 if not viable else max(graph[dep].xmeta.data_mtime for dep in viable)",
"target": "mypy.build.process_graph"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 3,
"src": "all_ids = sorted(ascc | viable, key=lambda id: graph[id].xmeta.data_mtime)",
"target": "mypy.build.process_graph"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 3,
"src": "if graph[id].xmeta.data_mtime < newest_in_deps:",
"target": "mypy.build.process_graph"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 5,
"src": "if graph[id].xmeta.data_mtime > oldest_in_scc:",
"target": "mypy.build.process_graph"
},
{
"code": "any",
"column": 57,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 4,
"src": "manager.trace(\" %5s %.0f %s\" % (key, graph[id].xmeta.data_mtime, id))",
"target": "mypy.build.process_graph"
}
],
"mypy/checker.py": [
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 781,
"src": "elif isinstance(defn.impl, Decorator):",
"target": "mypy.checker.TypeChecker.check_overlapping_overloads"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 2246,
"src": "if isinstance(sym.node, FuncBase):",
"target": "mypy.checker.TypeChecker.determine_type_of_member"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 1,
"src": "return self.function_type(sym.node)",
"target": "mypy.checker.TypeChecker.determine_type_of_member"
},
{
"code": "truthy-bool",
"column": 23,
"message": "\"signature\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 409,
"src": "if signature:",
"target": "mypy.checker.TypeChecker.check_assignment"
},
{
"code": "truthy-bool",
"column": 24,
"message": "\"rvalue_type\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 164,
"src": "and rvalue_type",
"target": "mypy.checker.TypeChecker.check_assignment"
},
{
"code": "truthy-bool",
"column": 11,
"message": "\"compare_type\" has type \"ProperType\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 184,
"src": "if compare_type:",
"target": "mypy.checker.TypeChecker.check_compatibility_super"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"zip[tuple[Any, ...]]\")",
"offset": 533,
"src": "types, declared_types = zip(*clean_items)",
"target": "mypy.checker.TypeChecker.check_multi_assignment_from_union"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "types, declared_types = zip(*clean_items)",
"target": "mypy.checker.TypeChecker.check_multi_assignment_from_union"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 3,
"src": "make_simplified_union(list(types)),",
"target": "mypy.checker.TypeChecker.check_multi_assignment_from_union"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "make_simplified_union(list(declared_types)),",
"target": "mypy.checker.TypeChecker.check_multi_assignment_from_union"
},
{
"code": "truthy-bool",
"column": 11,
"message": "\"var\" has type \"Var\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 364,
"src": "if var and not self.current_node_deferred:",
"target": "mypy.checker.TypeChecker.set_inferred_type"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always false",
"offset": 41,
"src": "if isinstance(rvalue.callee, RefExpr) and isinstance(rvalue.callee.node, FuncBase):",
"target": "mypy.checker.TypeChecker.simple_rvalue"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 1,
"src": "typ = rvalue.callee.node.type",
"target": "mypy.checker.TypeChecker.simple_rvalue"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1828,
"src": "if called_type.items[0].def_extras.get(\"first_arg\"):",
"target": "mypy.checker.TypeChecker.find_isinstance_check_helper"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "if called_type.items[0].def_extras.get(\"first_arg\"):",
"target": "mypy.checker.TypeChecker.find_isinstance_check_helper"
},
{
"code": "redundant-expr",
"column": 9,
"message": "Condition is always true",
"offset": 2313,
"src": "elif isinstance(t, FunctionLike):",
"target": "mypy.checker.is_more_general_arg_prefix"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 1,
"src": "if isinstance(s, FunctionLike):",
"target": "mypy.checker.is_more_general_arg_prefix"
},
{
"code": "redundant-expr",
"column": 9,
"message": "Condition is always true",
"offset": 418,
"src": "elif isinstance(func, FuncBase):",
"target": "mypy.checker.is_static"
}
],
"mypy/checkexpr.py": [
{
"code": "helpful-string",
"column": 61,
"message": "The type \"type[mypy.nodes.RefExpr]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 286,
"src": "raise AssertionError(f\"Unknown RefExpr subclass: {type(expr)}\")",
"target": "mypy.checkexpr.extract_refexpr_names"
},
{
"code": "truthy-bool",
"column": 34,
"message": "\"item_name_expr\" has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 631,
"src": "key_context = item_name_expr or item_arg",
"target": "mypy.checkexpr.ExpressionChecker.validate_typeddict_kwargs"
},
{
"code": "possibly-undefined",
"column": 23,
"message": "Name \"actual_types\" may be undefined",
"offset": 1762,
"src": "assert len(actual_types) == len(actuals) == len(actual_kinds)",
"target": "mypy.checkexpr"
},
{
"code": "possibly-undefined",
"column": 19,
"message": "Name \"callee_arg_types\" may be undefined",
"offset": 2,
"src": "if len(callee_arg_types) != len(actual_types):",
"target": "mypy.checkexpr"
},
{
"code": "possibly-undefined",
"column": 48,
"message": "Name \"callee_arg_kinds\" may be undefined",
"offset": 8,
"src": "assert len(callee_arg_types) == len(callee_arg_kinds)",
"target": "mypy.checkexpr"
},
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always false",
"offset": 4,
"src": "if actual_type is None:",
"target": "mypy.checkexpr.ExpressionChecker.check_argument_types"
},
{
"code": "unreachable",
"column": 20,
"message": "Statement is unreachable",
"offset": 1,
"src": "continue # Some kind of error was already reported.",
"target": "mypy.checkexpr.ExpressionChecker.check_argument_types"
},
{
"code": "any",
"column": 46,
"message": "Expression type contains \"Any\" (has type \"zip[tuple[Any, ...]]\")",
"offset": 126,
"src": "returns, inferred_types = zip(*unioned_return)",
"target": "mypy.checkexpr.ExpressionChecker.check_overload_call"
},
{
"code": "any",
"column": 46,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "returns, inferred_types = zip(*unioned_return)",
"target": "mypy.checkexpr.ExpressionChecker.check_overload_call"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 6,
"src": "make_simplified_union(list(returns), context.line, context.column),",
"target": "mypy.checkexpr.ExpressionChecker.check_overload_call"
},
{
"code": "any",
"column": 74,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "self.combine_function_signatures(get_proper_types(inferred_types)),",
"target": "mypy.checkexpr.ExpressionChecker.check_overload_call"
},
{
"code": "helpful-string",
"column": 46,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 634,
"src": "name = f\"{context.callee.name} of {object_type}\"",
"target": "mypy.checkexpr.ExpressionChecker.check_intersection_call"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 224,
"src": "elif use_reverse is UseReverse.ALWAYS:",
"target": "mypy.checkexpr.ExpressionChecker.visit_op_expr"
},
{
"code": "possibly-undefined",
"column": 16,
"message": "Name \"left_map\" may be undefined",
"offset": 739,
"src": "and left_map is None",
"target": "mypy.checkexpr"
},
{
"code": "possibly-undefined",
"column": 16,
"message": "Name \"right_map\" may be undefined",
"offset": 8,
"src": "and right_map is None",
"target": "mypy.checkexpr"
},
{
"code": "possibly-undefined",
"column": 22,
"message": "Name \"restricted_left_type\" may be undefined",
"offset": 27,
"src": "if isinstance(restricted_left_type, UninhabitedType):",
"target": "mypy.checkexpr"
},
{
"code": "possibly-undefined",
"column": 13,
"message": "Name \"result_is_left\" may be undefined",
"offset": 3,
"src": "elif result_is_left:",
"target": "mypy.checkexpr"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1173,
"src": "if called_type.items[0].def_extras.get(\"first_arg\") == target:",
"target": "mypy.checkexpr.ExpressionChecker.visit_lambda_expr"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "if called_type.items[0].def_extras.get(\"first_arg\") == target:",
"target": "mypy.checkexpr.ExpressionChecker.visit_lambda_expr"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if called_type.items[0].def_extras.get(\"first_arg\") == target:",
"target": "mypy.checkexpr.ExpressionChecker.visit_lambda_expr"
},
{
"code": "possibly-undefined",
"column": 82,
"message": "Name \"t0\" may be undefined",
"offset": 577,
"src": "self.per_line_checking_time_ns[node.line] += time.perf_counter_ns() - t0",
"target": "mypy.checkexpr"
}
],
"mypy/checkmember.py": [
{
"code": "truthy-bool",
"column": 7,
"message": "\"result\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 890,
"src": "if result and not mx.is_lvalue and not implicit:",
"target": "mypy.checkmember.analyze_var"
},
{
"code": "unreachable",
"column": 48,
"message": "Right operand of \"and\" is never evaluated",
"offset": 267,
"src": "isinstance(node.node, FuncBase) and node.node.is_class",
"target": "mypy.checkmember.analyze_class_attribute_access"
},
{
"code": "unreachable",
"column": 48,
"message": "Right operand of \"and\" is never evaluated",
"offset": 3,
"src": "isinstance(node.node, FuncBase) and node.node.is_static",
"target": "mypy.checkmember.analyze_class_attribute_access"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 47,
"src": "typ = function_type(node.node, mx.named_type(\"builtins.function\"))",
"target": "mypy.checkmember.analyze_class_attribute_access"
},
{
"code": "redundant-expr",
"column": 7,
"message": "Condition is always false",
"offset": 258,
"src": "if isinstance(n, FuncBase):",
"target": "mypy.checkmember.is_valid_constructor"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 1,
"src": "return True",
"target": "mypy.checkmember.is_valid_constructor"
}
],
"mypy/checkpattern.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 218,
"src": "elif value is None:",
"target": "mypy.checkpattern.PatternChecker.visit_singleton_pattern"
},
{
"code": "helpful-string",
"column": 20,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 468,
"src": "message_registry.CLASS_PATTERN_UNKNOWN_KEYWORD.format(",
"target": "mypy.checkpattern.PatternChecker.visit_class_pattern"
}
],
"mypy/checkstrformat.py": [
{
"code": "helpful-string",
"column": 16,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 724,
"src": "\"Only index and member expressions are allowed in\"",
"target": "mypy.checkstrformat.StringFormatterChecker.validate_and_transform_accessors"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 55,
"src": "elif isinstance(expr, StrExpr):",
"target": "mypy.checkstrformat.StringFormatterChecker.check_str_interpolation"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 163,
"src": "elif isinstance(expr, StrExpr):",
"target": "mypy.checkstrformat.StringFormatterChecker.build_dict_type"
}
],
"mypy/config_parser.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 28,
"src": "_INI_PARSER_CALLABLE: _TypeAlias = Callable[[Any], _CONFIG_VALUE_TYPES]",
"target": "mypy.config_parser"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 163,
"src": "\"exclude\": lambda s: [s.strip()],",
"target": ""
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 59,
"src": "toml_data = tomllib.load(f)",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "toml_data = toml_data.get(\"tool\", {})",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 50,
"message": "Expression type contains \"Any\" (has type \"dict[Any, Any]\")",
"offset": 0,
"src": "toml_data = toml_data.get(\"tool\", {})",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "if \"mypy\" not in toml_data:",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 2,
"src": "toml_data = {\"mypy\": toml_data[\"mypy\"]}",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "toml_data = {\"mypy\": toml_data[\"mypy\"]}",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "toml_data = {\"mypy\": toml_data[\"mypy\"]}",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "explicit-any",
"column": 16,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "parser: MutableMapping[str, Any] = destructure_overrides(toml_data)",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 73,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "parser: MutableMapping[str, Any] = destructure_overrides(toml_data)",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 77,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | RawConfigParser\")",
"offset": 9,
"src": "if config_file in defaults.SHARED_CONFIG_FILES and \"mypy\" not in parser:",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | RawConfigParser\")",
"offset": 10,
"src": "if \"mypy\" not in parser:",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "possibly-undefined",
"column": 21,
"message": "Name \"parser\" may be undefined",
"offset": 0,
"src": "if \"mypy\" not in parser:",
"target": "mypy.config_parser"
},
{
"code": "possibly-undefined",
"column": 23,
"message": "Name \"file_read\" may be undefined",
"offset": 1,
"src": "if filename or file_read not in defaults.SHARED_CONFIG_FILES:",
"target": "mypy.config_parser"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | RawConfigParser\")",
"offset": 3,
"src": "section = parser[\"mypy\"]",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | SectionProxy\")",
"offset": 0,
"src": "section = parser[\"mypy\"]",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "possibly-undefined",
"column": 19,
"message": "Name \"file_read\" may be undefined",
"offset": 1,
"src": "prefix = f\"{file_read}: [mypy]: \"",
"target": "mypy.config_parser"
},
{
"code": "any",
"column": 47,
"message": "Expression type contains \"Any\" (has type \"Any | SectionProxy\")",
"offset": 2,
"src": "prefix, options, set_strict_flags, section, config_types, stderr",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "possibly-undefined",
"column": 56,
"message": "Name \"config_types\" may be undefined",
"offset": 0,
"src": "prefix, options, set_strict_flags, section, config_types, stderr",
"target": "mypy.config_parser"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"(str, Any) | (str, SectionProxy)\")",
"offset": 6,
"src": "for name, section in parser.items():",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | RawConfigParser\")",
"offset": 0,
"src": "for name, section in parser.items():",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"dict_items[str, Any] | ItemsView[str, SectionProxy]\")",
"offset": 0,
"src": "for name, section in parser.items():",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"Any | SectionProxy\")",
"offset": 4,
"src": "prefix, options, set_strict_flags, section, config_types, stderr",
"target": "mypy.config_parser.parse_config_file"
},
{
"code": "possibly-undefined",
"column": 60,
"message": "Name \"config_types\" may be undefined",
"offset": 0,
"src": "prefix, options, set_strict_flags, section, config_types, stderr",
"target": "mypy.config_parser"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 53,
"src": "def destructure_overrides(toml_data: dict[str, Any]) -> dict[str, Any]:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 32,
"src": "if \"overrides\" not in toml_data[\"mypy\"]:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if \"overrides\" not in toml_data[\"mypy\"]:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "return toml_data",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "if not isinstance(toml_data[\"mypy\"][\"overrides\"], list):",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not isinstance(toml_data[\"mypy\"][\"overrides\"], list):",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 6,
"src": "result = toml_data.copy()",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "for override in result[\"mypy\"][\"overrides\"]:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "for override in result[\"mypy\"][\"overrides\"]:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for override in result[\"mypy\"][\"overrides\"]:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if \"module\" not in override:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "if isinstance(override[\"module\"], str):",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "modules = [override[\"module\"]]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(override[\"module\"], list):",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "modules = override[\"module\"]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "module_overrides = override.copy()",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "del module_overrides[\"module\"]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "del module_overrides[\"module\"]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "if old_config_name not in result:",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "result[old_config_name] = module_overrides",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "result[old_config_name] = module_overrides",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "for new_key, new_value in module_overrides.items():",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for new_key, new_value in module_overrides.items():",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "new_key in result[old_config_name]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"False | Any\")",
"offset": 0,
"src": "new_key in result[old_config_name]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "new_key in result[old_config_name]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "new_key in result[old_config_name]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "and result[old_config_name][new_key] != new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "and result[old_config_name][new_key] != new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "and result[old_config_name][new_key] != new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 64,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "and result[old_config_name][new_key] != new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 7,
"src": "result[old_config_name][new_key] = new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "result[old_config_name][new_key] = new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "result[old_config_name][new_key] = new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "result[old_config_name][new_key] = new_value",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "del result[\"mypy\"][\"overrides\"]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "del result[\"mypy\"][\"overrides\"]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "del result[\"mypy\"][\"overrides\"]",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "return result",
"target": "mypy.config_parser.destructure_overrides"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def parse_section(",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 22,
"src": "for key in section:",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 3,
"src": "if key in config_types:",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "ct = config_types[key]",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ct = config_types[key]",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "f\"{prefix}Unrecognized option: {key} = {section[key]}\"",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 56,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 0,
"src": "f\"{prefix}Unrecognized option: {key} = {section[key]}\"",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 55,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 11,
"src": "report_dirs[report_type] = str(section[key])",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "report_dirs[report_type] = str(section[key])",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 65,
"message": "Expression has type \"Any\"",
"offset": 21,
"src": "print(f\"{prefix}Unrecognized option: {key} = {section[key]}\", file=stderr)",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 66,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 0,
"src": "print(f\"{prefix}Unrecognized option: {key} = {section[key]}\", file=stderr)",
"target": "mypy.config_parser.parse_section"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "v: Any = None",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if ct is bool:",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 1,
"src": "if isinstance(section, dict):",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 3,
"src": "v = section.getboolean(key) # type: ignore[attr-defined] # Until better stub",
"target": "mypy.config_parser.parse_section"
},
{
"code": null,
"column": 24,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "v = section.getboolean(key) # type: ignore[attr-defined] # Until better stub",
"target": null
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "v = not v",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif callable(ct):",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "v = ct(section.get(key))",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 0,
"src": "v = ct(section.get(key))",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "v = ct(section.get(key))",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "if v:",
"target": "mypy.config_parser.parse_section"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "results[options_key] = v",
"target": "mypy.config_parser.parse_section"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 11,
"src": "def convert_to_boolean(value: Any | None) -> bool:",
"target": "mypy.config_parser.convert_to_boolean"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 2,
"src": "if isinstance(value, bool):",
"target": "mypy.config_parser.convert_to_boolean"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 2,
"src": "if not isinstance(value, str):",
"target": "mypy.config_parser.convert_to_boolean"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "value = str(value)",
"target": "mypy.config_parser.convert_to_boolean"
}
],
"mypy/constant_fold.py": [
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 144,
"src": "ret = left**right",
"target": "mypy.constant_fold.constant_fold_binary_int_op"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(ret, int)",
"target": "mypy.constant_fold.constant_fold_binary_int_op"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | float\")",
"offset": 25,
"src": "ret = left**right",
"target": "mypy.constant_fold.constant_fold_binary_float_op"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"Any | float\")",
"offset": 4,
"src": "assert isinstance(ret, float), ret",
"target": "mypy.constant_fold.constant_fold_binary_float_op"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert isinstance(ret, float), ret",
"target": "mypy.constant_fold.constant_fold_binary_float_op"
}
],
"mypy/constraints.py": [
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always false",
"offset": 133,
"src": "if actual is None and callee.arg_kinds[i] in (ARG_STAR, ARG_STAR2):",
"target": "mypy.constraints.infer_constraints_for_callable"
},
{
"code": "unreachable",
"column": 34,
"message": "Right operand of \"and\" is never evaluated",
"offset": 0,
"src": "if actual is None and callee.arg_kinds[i] in (ARG_STAR, ARG_STAR2):",
"target": "mypy.constraints.infer_constraints_for_callable"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 3,
"src": "incomplete_star_mapping = True",
"target": "mypy.constraints.infer_constraints_for_callable"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 52,
"src": "elif isinstance(unpacked_type, TupleType):",
"target": "mypy.constraints.infer_constraints_for_callable"
},
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always true",
"offset": 405,
"src": "if option is not None:",
"target": "mypy.constraints.any_constraints"
},
{
"code": "unreachable",
"column": 20,
"message": "Statement is unreachable",
"offset": 3,
"src": "merged_option = None",
"target": "mypy.constraints.any_constraints"
}
],
"mypy/copytype.py": [
{
"code": "explicit-any",
"column": 44,
"message": "Explicit \"Any\" is not allowed",
"offset": 130,
"src": "return self.copy_common(t, TypeType(cast(Any, t.item)))",
"target": "mypy.copytype.TypeShallowCopier.visit_type_type"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return self.copy_common(t, TypeType(cast(Any, t.item)))",
"target": "mypy.copytype.TypeShallowCopier.visit_type_type"
}
],
"mypy/dmypy/client.py": [
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 274,
"src": "if args.version:",
"target": "mypy.dmypy.client.main"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "if not args.action:",
"target": "mypy.dmypy.client.main"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 6,
"src": "fail(err.args[0])",
"target": "mypy.dmypy.client.main"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "fail(err.args[0])",
"target": "mypy.dmypy.client.main"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 42,
"src": "get_status(args.status_file)",
"target": "mypy.dmypy.client.do_start"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 34,
"src": "start_options = process_start_options(args.flags, allow_sources)",
"target": "mypy.dmypy.client.start_server"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if daemonize(start_options, args.status_file, timeout=args.timeout, log_file=args.log_file):",
"target": "mypy.dmypy.client.start_server"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if daemonize(start_options, args.status_file, timeout=args.timeout, log_file=args.log_file):",
"target": "mypy.dmypy.client.start_server"
},
{
"code": "any",
"column": 81,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if daemonize(start_options, args.status_file, timeout=args.timeout, log_file=args.log_file):",
"target": "mypy.dmypy.client.start_server"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "wait_for_server(args.status_file)",
"target": "mypy.dmypy.client.start_server"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 37,
"src": "if not is_running(args.status_file):",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 4,
"src": "response = request(",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "args.status_file,",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "args=args.flags,",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "export_types=args.export_types,",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 3,
"src": "if \"restart\" in response:",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "print(f\"Restarting: {response['restart']}\")",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "print(f\"Restarting: {response['restart']}\")",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "args.status_file,",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "args=args.flags,",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "export_types=args.export_types,",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 4,
"src": "response[\"roundtrip_time\"] = t1 - t0",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_run"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "status = read_status(args.status_file)",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if args.verbose:",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 5,
"src": "response = request(",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "args.status_file, \"status\", fswatcher_dump_file=args.fswatcher_dump_file, timeout=5",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "args.status_file, \"status\", fswatcher_dump_file=args.fswatcher_dump_file, timeout=5",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if args.verbose or \"error\" in response:",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if args.verbose or \"error\" in response:",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "if args.verbose or \"error\" in response:",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "show_stats(response)",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "if \"error\" in response:",
"target": "mypy.dmypy.client.do_status"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 9,
"src": "response = request(args.status_file, \"stop\", timeout=5)",
"target": "mypy.dmypy.client.do_stop"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response = request(args.status_file, \"stop\", timeout=5)",
"target": "mypy.dmypy.client.do_stop"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "if \"error\" in response:",
"target": "mypy.dmypy.client.do_stop"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "show_stats(response)",
"target": "mypy.dmypy.client.do_stop"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "pid, _ = get_status(args.status_file)",
"target": "mypy.dmypy.client.do_kill"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 13,
"src": "response = request(args.status_file, \"check\", files=args.files, export_types=args.export_types)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response = request(args.status_file, \"check\", files=args.files, export_types=args.export_types)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response = request(args.status_file, \"check\", files=args.files, export_types=args.export_types)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 81,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response = request(args.status_file, \"check\", files=args.files, export_types=args.export_types)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "response[\"roundtrip_time\"] = t1 - t0",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_check"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 19,
"src": "if args.remove is not None or args.update is not None:",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if args.remove is not None or args.update is not None:",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "response = request(",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "args.status_file,",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "export_types=args.export_types,",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "remove=args.remove,",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "update=args.update,",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "response = request(args.status_file, \"recheck\", export_types=args.export_types)",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 69,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response = request(args.status_file, \"recheck\", export_types=args.export_types)",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "response[\"roundtrip_time\"] = t1 - t0",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "check_output(response, args.verbose, args.junit_xml, args.perf_stats_file)",
"target": "mypy.dmypy.client.do_recheck"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 10,
"src": "response = request(",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "args.status_file,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "function=args.function,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "json=args.json,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "callsites=args.callsites,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "no_errors=args.no_errors,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "no_any=args.no_any,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "flex_any=args.flex_any,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "use_fixme=args.use_fixme,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "max_guesses=args.max_guesses,",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "check_output(response, verbose=False, junit_xml=None, perf_stats_file=None)",
"target": "mypy.dmypy.client.do_suggest"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 6,
"src": "response = request(",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "args.status_file,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "show=args.show,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "location=args.location,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "verbosity=args.verbose,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "limit=args.limit,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "include_span=args.include_span,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "include_kind=args.include_kind,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "include_object_attrs=args.include_object_attrs,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "union_attrs=args.union_attrs,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "force_reload=args.force_reload,",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "check_output(response, verbose=False, junit_xml=None, perf_stats_file=None)",
"target": "mypy.dmypy.client.do_inspect"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def check_output(",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 7,
"src": "if \"error\" in response:",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "fail(response[\"error\"])",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "fail(response[\"error\"])",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "out, err, status_code = response[\"out\"], response[\"err\"], response[\"status\"]",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "out, err, status_code = response[\"out\"], response[\"err\"], response[\"status\"]",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "out, err, status_code = response[\"out\"], response[\"err\"], response[\"status\"]",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "out, err, status_code = response[\"out\"], response[\"err\"], response[\"status\"]",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 66,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "out, err, status_code = response[\"out\"], response[\"err\"], response[\"status\"]",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 66,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "out, err, status_code = response[\"out\"], response[\"err\"], response[\"status\"]",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "fail(f\"Response: {str(response)}\")",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "sys.stdout.write(out)",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "sys.stderr.write(err)",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 3,
"src": "show_stats(response)",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "messages = (out + err).splitlines()",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "messages = (out + err).splitlines()",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "messages = (out + err).splitlines()",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "response[\"roundtrip_time\"],",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response[\"roundtrip_time\"],",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "bool(err),",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"(None, Any)\")",
"offset": 1,
"src": "{None: messages} if messages else {},",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{None: messages} if messages else {},",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{None: messages} if messages else {},",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "response[\"python_version\"],",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response[\"python_version\"],",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "response[\"platform\"],",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "response[\"platform\"],",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 3,
"src": "telemetry = response.get(\"stats\", {})",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "telemetry = response.get(\"stats\", {})",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"dict[Any, Any]\")",
"offset": 0,
"src": "telemetry = response.get(\"stats\", {})",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "json.dump(telemetry, f)",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if status_code:",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "sys.exit(status_code)",
"target": "mypy.dmypy.client.check_output"
},
{
"code": "any",
"column": 10,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 18,
"src": "print(request(args.status_file, \"hang\", timeout=1))",
"target": "mypy.dmypy.client.do_hang"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "print(request(args.status_file, \"hang\", timeout=1))",
"target": "mypy.dmypy.client.do_hang"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "if args.log_file:",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "sys.stdout = sys.stderr = open(args.log_file, \"a\", buffering=1)",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if args.legacy:",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if args.options_data:",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "options_dict = pickle.loads(base64.b64decode(args.options_data))",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "options_dict = pickle.loads(base64.b64decode(args.options_data))",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "options = options_obj.apply_changes(options_dict)",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "options = process_start_options(args.flags, allow_sources=False)",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if args.legacy:",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "Server(options, args.status_file, timeout=args.timeout).serve()",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "Server(options, args.status_file, timeout=args.timeout).serve()",
"target": "mypy.dmypy.client.do_daemon"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 12,
"src": "def request(",
"target": "mypy.dmypy.client.request"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 19,
"src": "args[\"is_tty\"] = sys.stdout.isatty() or should_force_color()",
"target": "mypy.dmypy.client.request"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "args[\"is_tty\"] = sys.stdout.isatty() or should_force_color()",
"target": "mypy.dmypy.client.request"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 21,
"src": "return {\"error\": str(err)}",
"target": "mypy.dmypy.client.request"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 17,
"src": "def check_status(data: dict[str, Any]) -> tuple[int, str]:",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 7,
"src": "if \"pid\" not in data:",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 10,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "pid = data[\"pid\"]",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 10,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "pid = data[\"pid\"]",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not isinstance(pid, int):",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 4,
"src": "if \"connection_name\" not in data:",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "connection_name = data[\"connection_name\"]",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "connection_name = data[\"connection_name\"]",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not isinstance(connection_name, str):",
"target": "mypy.dmypy.client.check_status"
},
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 15,
"src": "data: Any = json.load(f)",
"target": "mypy.dmypy.client.read_status"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if not isinstance(data, dict):",
"target": "mypy.dmypy.client.read_status"
}
],
"mypy/dmypy_server.py": [
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 210,
"src": "return {\"platform\": self.options.platform, \"python_version\": py_version}",
"target": "mypy.dmypy_server.Server._response_metadata"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {\"platform\": self.options.platform, \"python_version\": py_version}",
"target": "mypy.dmypy_server.Server._response_metadata"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 16,
"src": "data = receive(server)",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 1,
"src": "sys.stdout = WriteToConn(server, \"stdout\", sys.stdout.isatty())",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 1,
"src": "sys.stderr = WriteToConn(server, \"stderr\", sys.stderr.isatty())",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "explicit-any",
"column": 20,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "resp: dict[str, Any] = {}",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if \"command\" not in data:",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "command = data[\"command\"]",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not isinstance(command, str):",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "command = data.pop(\"command\")",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "resp = self.run_command(command, data)",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 65,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "resp = self.run_command(command, data)",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 5,
"src": "resp.update(self._response_metadata())",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "resp[\"final\"] = True",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 45,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "send(server, resp)",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | dict[str, object]\")",
"offset": 2,
"src": "resp[\"final\"] = True",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | dict[str, object]\")",
"offset": 2,
"src": "resp.update(self._response_metadata())",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | dict[str, object]\")",
"offset": 1,
"src": "send(server, resp)",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 3,
"src": "if command == \"stop\":",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if command == \"stop\":",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 13,
"src": "if command != \"stop\":",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if command != \"stop\":",
"target": "mypy.dmypy_server.Server.serve"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 13,
"src": "method = getattr(self.__class__, key, None)",
"target": "mypy.dmypy_server.Server.run_command"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if method is None:",
"target": "mypy.dmypy_server.Server.run_command"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "ret = method(self, **data)",
"target": "mypy.dmypy_server.Server.run_command"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(ret, dict)",
"target": "mypy.dmypy_server.Server.run_command"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 8,
"src": "res.update(get_meminfo())",
"target": "mypy.dmypy_server.Server.cmd_status"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 59,
"src": "return self.check(sources, export_types, is_tty, terminal_width)",
"target": "mypy.dmypy_server.Server.cmd_run"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 10,
"src": "return self.check(sources, export_types, is_tty, terminal_width)",
"target": "mypy.dmypy_server.Server.cmd_check"
},
{
"code": "any",
"column": 14,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 47,
"src": "res = self.increment_output(messages, sources, is_tty, terminal_width)",
"target": "mypy.dmypy_server.Server.cmd_recheck"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "self.update_stats(res)",
"target": "mypy.dmypy_server.Server.cmd_recheck"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "return res",
"target": "mypy.dmypy_server.Server.cmd_recheck"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def check(",
"target": "mypy.dmypy_server.Server.check"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 11,
"src": "res = self.initialize_fine_grained(sources, is_tty, terminal_width)",
"target": "mypy.dmypy_server.Server.check"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 10,
"src": "self.update_stats(res)",
"target": "mypy.dmypy_server.Server.check"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "return res",
"target": "mypy.dmypy_server.Server.check"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 7,
"src": "def update_stats(self, res: dict[str, Any]) -> None:",
"target": "mypy.dmypy_server.Server.update_stats"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 4,
"src": "res[\"stats\"] = manager.stats",
"target": "mypy.dmypy_server.Server.update_stats"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "res[\"stats\"] = manager.stats",
"target": "mypy.dmypy_server.Server.update_stats"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 8,
"src": "def initialize_fine_grained(",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 15,
"src": "return {\"out\": out, \"err\": err, \"status\": 2}",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 19,
"src": "meta = state.meta",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 1,
"src": "if meta is None:",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 44,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 5,
"src": "FileData(st_mtime=float(meta.mtime), st_size=meta.size, hash=meta.hash),",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 65,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "FileData(st_mtime=float(meta.mtime), st_size=meta.size, hash=meta.hash),",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 81,
"message": "Expression type contains \"Any\" (has type \"CacheMeta\")",
"offset": 0,
"src": "FileData(st_mtime=float(meta.mtime), st_size=meta.size, hash=meta.hash),",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 46,
"src": "return {\"out\": \"\".join(s + \"\\n\" for s in messages), \"err\": \"\", \"status\": status}",
"target": "mypy.dmypy_server.Server.initialize_fine_grained"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 277,
"src": "def increment_output(",
"target": "mypy.dmypy_server.Server.increment_output"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 5,
"src": "return {\"out\": \"\".join(s + \"\\n\" for s in messages), \"err\": \"\", \"status\": status}",
"target": "mypy.dmypy_server.Server.increment_output"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 144,
"src": "def cmd_suggest(self, function: str, callsites: bool, **kwargs: Any) -> dict[str, object]:",
"target": "mypy.dmypy_server.Server.cmd_suggest"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 7,
"src": "engine = SuggestionEngine(self.fine_grained_manager, **kwargs)",
"target": "mypy.dmypy_server.Server.cmd_suggest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 29,
"src": "def get_meminfo() -> dict[str, Any]:",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "res: dict[str, Any] = {}",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 4,
"src": "res[\"memory_psutil_missing\"] = (",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"pmem\")",
"offset": 6,
"src": "meminfo = process.memory_info()",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "res[\"memory_rss_mib\"] = meminfo.rss / MiB",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"pmem\")",
"offset": 0,
"src": "res[\"memory_rss_mib\"] = meminfo.rss / MiB",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "res[\"memory_rss_mib\"] = meminfo.rss / MiB",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "res[\"memory_vms_mib\"] = meminfo.vms / MiB",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"pmem\")",
"offset": 0,
"src": "res[\"memory_vms_mib\"] = meminfo.vms / MiB",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "res[\"memory_vms_mib\"] = meminfo.vms / MiB",
"target": "mypy.dmypy_server.get_meminfo"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 13,
"src": "return res",
"target": "mypy.dmypy_server.get_meminfo"
}
],
"mypy/dmypy_util.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 19,
"src": "def receive(connection: IPCBase) -> Any:",
"target": "mypy.dmypy_util.receive"
},
{
"code": "helpful-string",
"column": 53,
"message": "The type \"type[list[dict[str, ...] | list[...] | float | int | bool | str | None]]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 14,
"src": "raise OSError(f\"Data received is not a dict ({type(data)})\")",
"target": "mypy.dmypy_util.receive"
},
{
"code": "helpful-string",
"column": 53,
"message": "The type \"type[float]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 0,
"src": "raise OSError(f\"Data received is not a dict ({type(data)})\")",
"target": "mypy.dmypy_util.receive"
},
{
"code": "helpful-string",
"column": 53,
"message": "The type \"type[int]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 0,
"src": "raise OSError(f\"Data received is not a dict ({type(data)})\")",
"target": "mypy.dmypy_util.receive"
},
{
"code": "helpful-string",
"column": 53,
"message": "The type \"type[str]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 0,
"src": "raise OSError(f\"Data received is not a dict ({type(data)})\")",
"target": "mypy.dmypy_util.receive"
},
{
"code": "helpful-string",
"column": 53,
"message": "The type \"type[None]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 0,
"src": "raise OSError(f\"Data received is not a dict ({type(data)})\")",
"target": "mypy.dmypy_util.receive"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 4,
"src": "def send(connection: IPCBase, data: Any) -> None:",
"target": "mypy.dmypy_util.send"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "connection.write(json.dumps(data))",
"target": "mypy.dmypy_util.send"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 65,
"src": "resp: dict[str, Any] = {self.output_key: output}",
"target": "mypy.dmypy_util.WriteToConn.write"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "send(self.server, resp)",
"target": "mypy.dmypy_util.WriteToConn.write"
}
],
"mypy/errors.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 232,
"src": "elif callable(self._filter):",
"target": "mypy.errors.ErrorWatcher.on_error"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"options\" has type \"Options\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 516,
"src": "if self.options:",
"target": "mypy.errors.Errors.is_error_code_enabled"
},
{
"code": "truthy-bool",
"column": 69,
"message": "Member \"options\" has type \"Options\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 33,
"src": "is_typeshed_file(self.options.abs_custom_typeshed_dir if self.options else None, file)",
"target": "mypy.errors.Errors.generate_unused_ignore_errors"
},
{
"code": "truthy-bool",
"column": 69,
"message": "Member \"options\" has type \"Options\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 53,
"src": "is_typeshed_file(self.options.abs_custom_typeshed_dir if self.options else None, file)",
"target": "mypy.errors.Errors.generate_ignore_without_code_errors"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always false",
"offset": 423,
"src": "if isinstance(e.message, ErrorMessage):",
"target": "mypy.errors.Errors.render_messages"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 1,
"src": "result.append(",
"target": "mypy.errors.Errors.render_messages"
}
],
"mypy/evalexpr.py": [
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 30,
"src": "return ast.literal_eval(f\"b'{o.value}'\")",
"target": "mypy.evalexpr._NodeEvaluator.visit_bytes_expr"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "return ast.literal_eval(f'b\"{o.value}\"')",
"target": "mypy.evalexpr._NodeEvaluator.visit_bytes_expr"
}
],
"mypy/fastparse.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 169,
"src": "Match = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchValue = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchSingleton = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchSequence = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchStar = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchMapping = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchClass = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchAs = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "MatchOr = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "TryStar = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 8,
"src": "ast_TypeAlias = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "ast_ParamSpec = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "ast_TypeVar = Any",
"target": "mypy.fastparse"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "ast_TypeVarTuple = Any",
"target": "mypy.fastparse"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 46,
"src": "tree = ASTConverter(",
"target": "mypy.fastparse.parse"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 21,
"src": "assert isinstance(tree, MypyFile)",
"target": "mypy.fastparse.parse"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 153,
"src": "self.visitor_cache: dict[type, Callable[[AST | None], Any]] = {}",
"target": "mypy.fastparse.ASTConverter.__init__"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 21,
"src": "def visit(self, node: AST | None) -> Any:",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[type, (AST | None) -> Any]\")",
"offset": 4,
"src": "visitor = self.visitor_cache.get(typeobj)",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"(AST | None) -> Any | None\")",
"offset": 0,
"src": "visitor = self.visitor_cache.get(typeobj)",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"(AST | None) -> Any | None\")",
"offset": 1,
"src": "if visitor is None:",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[type, (AST | None) -> Any]\")",
"offset": 3,
"src": "self.visitor_cache[typeobj] = visitor",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"(AST | None) -> Any | Any\")",
"offset": 0,
"src": "self.visitor_cache[typeobj] = visitor",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return visitor(node)",
"target": "mypy.fastparse.ASTConverter.visit"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 13,
"src": "exp = self.visit(e)",
"target": "mypy.fastparse.ASTConverter.translate_opt_expr_list"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "res.append(exp)",
"target": "mypy.fastparse.ASTConverter.translate_opt_expr_list"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 60,
"src": "node = self.visit(stmt)",
"target": "mypy.fastparse.ASTConverter.translate_stmt_list"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "res.append(node)",
"target": "mypy.fastparse.ASTConverter.translate_stmt_list"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 436,
"src": "and func_type_ast.argtypes[0].value is Ellipsis",
"target": "mypy.fastparse.ASTConverter.do_func_def"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 74,
"src": "end_line = getattr(n, \"end_lineno\", None)",
"target": "mypy.fastparse.ASTConverter.do_func_def"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "end_column = getattr(n, \"end_col_offset\", None)",
"target": "mypy.fastparse.ASTConverter.do_func_def"
},
{
"code": "any",
"column": 58,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 25,
"src": "deco.set_line(first.lineno, first.col_offset, end_line, end_column)",
"target": "mypy.fastparse.ASTConverter.do_func_def"
},
{
"code": "any",
"column": 68,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "deco.set_line(first.lineno, first.col_offset, end_line, end_column)",
"target": "mypy.fastparse.ASTConverter.do_func_def"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 23,
"src": "posonlyargs = getattr(args, \"posonlyargs\", cast(list[ast3.arg], []))",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 1,
"src": "args_args = posonlyargs + args.args",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 2,
"src": "num_no_defaults = len(args_args) - len(args_defaults)",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(int, Any | arg)\")",
"offset": 2,
"src": "for i, a in enumerate(args_args[:num_no_defaults]):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"Any | arg\")",
"offset": 0,
"src": "for i, a in enumerate(args_args[:num_no_defaults]):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"enumerate[Any | arg]\")",
"offset": 0,
"src": "for i, a in enumerate(args_args[:num_no_defaults]):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 0,
"src": "for i, a in enumerate(args_args[:num_no_defaults]):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 1,
"src": "pos_only = i < len(posonlyargs)",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 47,
"message": "Expression type contains \"Any\" (has type \"Any | arg\")",
"offset": 1,
"src": "new_args.append(self.make_argument(a, None, ARG_POS, no_type_check, pos_only))",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"Any | arg\")",
"offset": 1,
"src": "names.append(a)",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(int, (Any | arg, expr))\")",
"offset": 3,
"src": "for i, (a, d) in enumerate(zip(args_args[num_no_defaults:], args_defaults)):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(Any | arg, expr)\")",
"offset": 0,
"src": "for i, (a, d) in enumerate(zip(args_args[num_no_defaults:], args_defaults)):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"enumerate[(Any | arg, expr)]\")",
"offset": 0,
"src": "for i, (a, d) in enumerate(zip(args_args[num_no_defaults:], args_defaults)):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"zip[(Any | arg, expr)]\")",
"offset": 0,
"src": "for i, (a, d) in enumerate(zip(args_args[num_no_defaults:], args_defaults)):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 0,
"src": "for i, (a, d) in enumerate(zip(args_args[num_no_defaults:], args_defaults)):",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"Any | list[arg]\")",
"offset": 1,
"src": "pos_only = num_no_defaults + i < len(posonlyargs)",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 47,
"message": "Expression type contains \"Any\" (has type \"Any | arg\")",
"offset": 1,
"src": "new_args.append(self.make_argument(a, d, ARG_OPT, no_type_check, pos_only))",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"Any | arg\")",
"offset": 1,
"src": "names.append(a)",
"target": "mypy.fastparse.ASTConverter.transform_args"
},
{
"code": "any",
"column": 62,
"message": "Expression has type \"Any\"",
"offset": 48,
"src": "argument = Argument(Var(arg.arg, arg_type), arg_type, self.visit(default), kind, pos_only)",
"target": "mypy.fastparse.ASTConverter.make_argument"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"Any | int | None\")",
"offset": 4,
"src": "getattr(arg, \"end_lineno\", None),",
"target": "mypy.fastparse.ASTConverter.make_argument"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"Any | int | None\")",
"offset": 1,
"src": "getattr(arg, \"end_col_offset\", None),",
"target": "mypy.fastparse.ASTConverter.make_argument"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 14,
"src": "keywords = [(kw.arg, self.visit(kw.value)) for kw in n.keywords if kw.arg]",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "keywords = [(kw.arg, self.visit(kw.value)) for kw in n.keywords if kw.arg]",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keywords = [(kw.arg, self.visit(kw.value)) for kw in n.keywords if kw.arg]",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 13,
"src": "metaclass=dict(keywords).get(\"metaclass\"),",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "metaclass=dict(keywords).get(\"metaclass\"),",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "metaclass=dict(keywords).get(\"metaclass\"),",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 1,
"src": "keywords=keywords,",
"target": "mypy.fastparse.ASTConverter.visit_ClassDef"
},
{
"code": "any",
"column": 72,
"message": "Expression has type \"Any\"",
"offset": 15,
"src": "incorrect_expr = find_disallowed_expression_in_annotation_scope(type_param.bound)",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "type_param.lineno,",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_param.col_offset,",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "type_param.lineno,",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_param.col_offset,",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "type_param.lineno,",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_param.col_offset,",
"target": "mypy.fastparse.ASTConverter.validate_type_param"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def translate_type_params(self, type_params: list[Any]) -> list[TypeParam]:",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "for p in type_params:",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "for p in type_params:",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "if isinstance(p, ast_ParamSpec): # type: ignore[misc]",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": null,
"column": 26,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "if isinstance(p, ast_ParamSpec): # type: ignore[misc]",
"target": null
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if isinstance(p, ast_ParamSpec): # type: ignore[misc]",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": null,
"column": 29,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "if isinstance(p, ast_ParamSpec): # type: ignore[misc]",
"target": null
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "explicit_type_params.append(TypeParam(p.name, PARAM_SPEC_KIND, None, [], default))",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(p, ast_TypeVarTuple): # type: ignore[misc]",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": null,
"column": 28,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "elif isinstance(p, ast_TypeVarTuple): # type: ignore[misc]",
"target": null
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "elif isinstance(p, ast_TypeVarTuple): # type: ignore[misc]",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": null,
"column": 31,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "elif isinstance(p, ast_TypeVarTuple): # type: ignore[misc]",
"target": null
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "TypeParam(p.name, TYPE_VAR_TUPLE_KIND, None, [], default)",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if isinstance(p.bound, ast3.Tuple):",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if len(p.bound.elts) < 2:",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "p.lineno,",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "p.col_offset,",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 63,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "conv = TypeConverter(self.errors, line=p.lineno)",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "values = [conv.visit(t) for t in p.bound.elts]",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif p.bound is not None:",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.validate_type_param(p)",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "bound = TypeConverter(self.errors, line=p.lineno).visit(p.bound)",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 76,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "bound = TypeConverter(self.errors, line=p.lineno).visit(p.bound)",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "TypeParam(p.name, TYPE_VAR_KIND, bound, values, default)",
"target": "mypy.fastparse.ASTConverter.translate_type_params"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "node = ReturnStmt(self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_Return"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "node = DelStmt(self.visit(n.targets[0]))",
"target": "mypy.fastparse.ASTConverter.visit_Delete"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "rvalue = self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_Assign"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "s = AssignmentStmt(lvalues, rvalue, type=typ, new_syntax=False)",
"target": "mypy.fastparse.ASTConverter.visit_Assign"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "s = AssignmentStmt([self.visit(n.target)], rvalue, type=typ, new_syntax=True)",
"target": "mypy.fastparse.ASTConverter.visit_AnnAssign"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "self.from_operator(n.op), self.visit(n.target), self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_AugAssign"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.from_operator(n.op), self.visit(n.target), self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_AugAssign"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "self.visit(n.target),",
"target": "mypy.fastparse.ASTConverter.visit_For"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.visit(n.iter),",
"target": "mypy.fastparse.ASTConverter.visit_For"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "self.visit(n.target),",
"target": "mypy.fastparse.ASTConverter.visit_AsyncFor"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.visit(n.iter),",
"target": "mypy.fastparse.ASTConverter.visit_AsyncFor"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "self.visit(n.test), self.as_required_block(n.body), self.as_block(n.orelse)",
"target": "mypy.fastparse.ASTConverter.visit_While"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "[self.visit(n.test)], [self.as_required_block(n.body)], self.as_block(n.orelse)",
"target": "mypy.fastparse.ASTConverter.visit_If"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "[self.visit(i.context_expr) for i in n.items],",
"target": "mypy.fastparse.ASTConverter.visit_With"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[self.visit(i.optional_vars) for i in n.items],",
"target": "mypy.fastparse.ASTConverter.visit_With"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "[self.visit(i.context_expr) for i in n.items],",
"target": "mypy.fastparse.ASTConverter.visit_AsyncWith"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[self.visit(i.optional_vars) for i in n.items],",
"target": "mypy.fastparse.ASTConverter.visit_AsyncWith"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "node = RaiseStmt(self.visit(n.exc), self.visit(n.cause))",
"target": "mypy.fastparse.ASTConverter.visit_Raise"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = RaiseStmt(self.visit(n.exc), self.visit(n.cause))",
"target": "mypy.fastparse.ASTConverter.visit_Raise"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 8,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_Try"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_Try"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 6,
"src": "types,",
"target": "mypy.fastparse.ASTConverter.visit_Try"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "vs = [",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.set_line(NameExpr(h.name), h) if h.name is not None else None for h in n.handlers",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.set_line(NameExpr(h.name), h) if h.name is not None else None for h in n.handlers",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.set_line(NameExpr(h.name), h) if h.name is not None else None for h in n.handlers",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 88,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.set_line(NameExpr(h.name), h) if h.name is not None else None for h in n.handlers",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "types = [self.visit(h.type) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "handlers = [self.as_required_block(h.body) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "handlers = [self.as_required_block(h.body) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "handlers = [self.as_required_block(h.body) for h in n.handlers]",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "self.as_required_block(n.body),",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "types,",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "self.as_block(n.orelse),",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.as_block(n.finalbody),",
"target": "mypy.fastparse.ASTConverter.visit_TryStar"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "node = AssertStmt(self.visit(n.test), self.visit(n.msg))",
"target": "mypy.fastparse.ASTConverter.visit_Assert"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = AssertStmt(self.visit(n.test), self.visit(n.msg))",
"target": "mypy.fastparse.ASTConverter.visit_Assert"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 46,
"src": "value = self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_Expr"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "node = ExpressionStmt(value)",
"target": "mypy.fastparse.ASTConverter.visit_Expr"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 21,
"src": "s = AssignmentExpr(self.visit(n.target), self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_NamedExpr"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "s = AssignmentExpr(self.visit(n.target), self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_NamedExpr"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 29,
"src": "if op is None:",
"target": "mypy.fastparse.ASTConverter.visit_BinOp"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "e = OpExpr(op, self.visit(n.left), self.visit(n.right))",
"target": "mypy.fastparse.ASTConverter.visit_BinOp"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "e = OpExpr(op, self.visit(n.left), self.visit(n.right))",
"target": "mypy.fastparse.ASTConverter.visit_BinOp"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 18,
"src": "e = UnaryExpr(op, self.visit(n.operand))",
"target": "mypy.fastparse.ASTConverter.visit_UnaryOp"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 17,
"src": "e = ConditionalExpr(self.visit(n.test), self.visit(n.body), self.visit(n.orelse))",
"target": "mypy.fastparse.ASTConverter.visit_IfExp"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "e = ConditionalExpr(self.visit(n.test), self.visit(n.body), self.visit(n.orelse))",
"target": "mypy.fastparse.ASTConverter.visit_IfExp"
},
{
"code": "any",
"column": 68,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "e = ConditionalExpr(self.visit(n.test), self.visit(n.body), self.visit(n.orelse))",
"target": "mypy.fastparse.ASTConverter.visit_IfExp"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 27,
"src": "targets = [self.visit(c.target) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "targets = [self.visit(c.target) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "iters = [self.visit(c.iter) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "iters = [self.visit(c.iter) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "self.visit(n.key), self.visit(n.value), targets, iters, ifs_list, is_async",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.visit(n.key), self.visit(n.value), targets, iters, ifs_list, is_async",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 52,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "self.visit(n.key), self.visit(n.value), targets, iters, ifs_list, is_async",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 61,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "self.visit(n.key), self.visit(n.value), targets, iters, ifs_list, is_async",
"target": "mypy.fastparse.ASTConverter.visit_DictComp"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 6,
"src": "targets = [self.visit(c.target) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "targets = [self.visit(c.target) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "iters = [self.visit(c.iter) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "iters = [self.visit(c.iter) for c in n.generators]",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "e = GeneratorExpr(self.visit(n.elt), targets, iters, ifs_list, is_async)",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 45,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "e = GeneratorExpr(self.visit(n.elt), targets, iters, ifs_list, is_async)",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 54,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "e = GeneratorExpr(self.visit(n.elt), targets, iters, ifs_list, is_async)",
"target": "mypy.fastparse.ASTConverter.visit_GeneratorExp"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "v = self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_Await"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "e = AwaitExpr(v)",
"target": "mypy.fastparse.ASTConverter.visit_Await"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "e = YieldExpr(self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_Yield"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "e = YieldFromExpr(self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_YieldFrom"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 23,
"src": "self.visit(n.func),",
"target": "mypy.fastparse.ASTConverter.visit_Call"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 3,
"src": "cast(\"list[Optional[str]]\", [None] * len(args)) + keyword_names,",
"target": "mypy.fastparse.ASTConverter.visit_Call"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "def visit_Constant(self, n: Constant) -> Any:",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "val = n.value",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "e: Any = None",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if val is None:",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(val, str):",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(val, bytes):",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(val, bool): # Must check before int!",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(val, int):",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(val, float):",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(val, complex):",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif val is Ellipsis:",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 69,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 3,
"src": "raise RuntimeError(\"Constant not implemented for \" + str(type(val)))",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 74,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "raise RuntimeError(\"Constant not implemented for \" + str(type(val)))",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return self.set_line(e, n)",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return self.set_line(e, n)",
"target": "mypy.fastparse.ASTConverter.visit_Constant"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 32,
"src": "val_exp = self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_FormattedValue"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "val_exp.set_line(n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.visit_FormattedValue"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "format_spec_exp = self.visit(n.format_spec) if n.format_spec is not None else StrExpr(\"\")",
"target": "mypy.fastparse.ASTConverter.visit_FormattedValue"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"Any | StrExpr\")",
"offset": 0,
"src": "format_spec_exp = self.visit(n.format_spec) if n.format_spec is not None else StrExpr(\"\")",
"target": "mypy.fastparse.ASTConverter.visit_FormattedValue"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "format_method, [val_exp, format_spec_exp], [ARG_POS, ARG_POS], [None, None]",
"target": "mypy.fastparse.ASTConverter.visit_FormattedValue"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"Any | StrExpr\")",
"offset": 0,
"src": "format_method, [val_exp, format_spec_exp], [ARG_POS, ARG_POS], [None, None]",
"target": "mypy.fastparse.ASTConverter.visit_FormattedValue"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "member_expr = MemberExpr(self.visit(value), n.attr)",
"target": "mypy.fastparse.ASTConverter.visit_Attribute"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "e = IndexExpr(self.visit(n.value), self.visit(n.slice))",
"target": "mypy.fastparse.ASTConverter.visit_Subscript"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "e = IndexExpr(self.visit(n.value), self.visit(n.slice))",
"target": "mypy.fastparse.ASTConverter.visit_Subscript"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "e = StarExpr(self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_Starred"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "expr_list: list[Expression] = [self.visit(e) for e in n.elts]",
"target": "mypy.fastparse.ASTConverter.visit_List"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 17,
"src": "e = SliceExpr(self.visit(n.lower), self.visit(n.upper), self.visit(n.step))",
"target": "mypy.fastparse.ASTConverter.visit_Slice"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "e = SliceExpr(self.visit(n.lower), self.visit(n.upper), self.visit(n.step))",
"target": "mypy.fastparse.ASTConverter.visit_Slice"
},
{
"code": "any",
"column": 64,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "e = SliceExpr(self.visit(n.lower), self.visit(n.upper), self.visit(n.step))",
"target": "mypy.fastparse.ASTConverter.visit_Slice"
},
{
"code": "explicit-any",
"column": 50,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "return TupleExpr(self.translate_expr_list(cast(Any, n).dims))",
"target": "mypy.fastparse.ASTConverter.visit_ExtSlice"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return TupleExpr(self.translate_expr_list(cast(Any, n).dims))",
"target": "mypy.fastparse.ASTConverter.visit_ExtSlice"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "value = self.visit(cast(Any, n).value)",
"target": "mypy.fastparse.ASTConverter.visit_Index"
},
{
"code": "explicit-any",
"column": 27,
"message": "Explicit \"Any\" is not allowed",
"offset": 0,
"src": "value = self.visit(cast(Any, n).value)",
"target": "mypy.fastparse.ASTConverter.visit_Index"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "value = self.visit(cast(Any, n).value)",
"target": "mypy.fastparse.ASTConverter.visit_Index"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(value, Node)",
"target": "mypy.fastparse.ASTConverter.visit_Index"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "self.visit(n.subject),",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.visit(n.subject),",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[self.visit(c.pattern) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.visit(c.pattern) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.visit(c.pattern) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.visit(c.pattern) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[self.visit(c.guard) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.visit(c.guard) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.visit(c.guard) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.visit(c.guard) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[self.as_required_block(c.body) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.as_required_block(c.body) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[self.as_required_block(c.body) for c in n.cases],",
"target": "mypy.fastparse.ASTConverter.visit_Match"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "node = ValuePattern(self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_MatchValue"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = ValuePattern(self.visit(n.value))",
"target": "mypy.fastparse.ASTConverter.visit_MatchValue"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "node = SingletonPattern(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_MatchSingleton"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "patterns = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "patterns = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "patterns = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "patterns = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "patterns = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "stars = [p for p in patterns if isinstance(p, StarredPattern)]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "stars = [p for p in patterns if isinstance(p, StarredPattern)]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 51,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "stars = [p for p in patterns if isinstance(p, StarredPattern)]",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 3,
"src": "node = SequencePattern(patterns)",
"target": "mypy.fastparse.ASTConverter.visit_MatchSequence"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if n.name is None:",
"target": "mypy.fastparse.ASTConverter.visit_MatchStar"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "name = self.set_line(NameExpr(n.name), n)",
"target": "mypy.fastparse.ASTConverter.visit_MatchStar"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "keys = [self.visit(k) for k in n.keys]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "keys = [self.visit(k) for k in n.keys]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keys = [self.visit(k) for k in n.keys]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keys = [self.visit(k) for k in n.keys]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keys = [self.visit(k) for k in n.keys]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "values = [self.visit(v) for v in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "values = [self.visit(v) for v in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "values = [self.visit(v) for v in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "values = [self.visit(v) for v in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "values = [self.visit(v) for v in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if n.rest is None:",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "rest = NameExpr(n.rest)",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "node = MappingPattern(keys, values, rest)",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "node = MappingPattern(keys, values, rest)",
"target": "mypy.fastparse.ASTConverter.visit_MatchMapping"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "class_ref = self.visit(n.cls)",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "class_ref = self.visit(n.cls)",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(class_ref, RefExpr)",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "positionals = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "positionals = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "positionals = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "positionals = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "positionals = [self.visit(p) for p in n.patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "keyword_keys = n.kwd_attrs",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "keyword_values = [self.visit(p) for p in n.kwd_patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "keyword_values = [self.visit(p) for p in n.kwd_patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keyword_values = [self.visit(p) for p in n.kwd_patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keyword_values = [self.visit(p) for p in n.kwd_patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "keyword_values = [self.visit(p) for p in n.kwd_patterns]",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "node = ClassPattern(class_ref, positionals, keyword_keys, keyword_values)",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = ClassPattern(class_ref, positionals, keyword_keys, keyword_values)",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 66,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "node = ClassPattern(class_ref, positionals, keyword_keys, keyword_values)",
"target": "mypy.fastparse.ASTConverter.visit_MatchClass"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if n.name is None:",
"target": "mypy.fastparse.ASTConverter.visit_MatchAs"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "name = NameExpr(n.name)",
"target": "mypy.fastparse.ASTConverter.visit_MatchAs"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "node = AsPattern(self.visit(n.pattern), name)",
"target": "mypy.fastparse.ASTConverter.visit_MatchAs"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = AsPattern(self.visit(n.pattern), name)",
"target": "mypy.fastparse.ASTConverter.visit_MatchAs"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "node = OrPattern([self.visit(pattern) for pattern in n.patterns])",
"target": "mypy.fastparse.ASTConverter.visit_MatchOr"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = OrPattern([self.visit(pattern) for pattern in n.patterns])",
"target": "mypy.fastparse.ASTConverter.visit_MatchOr"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = OrPattern([self.visit(pattern) for pattern in n.patterns])",
"target": "mypy.fastparse.ASTConverter.visit_MatchOr"
},
{
"code": "any",
"column": 61,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "node = OrPattern([self.visit(pattern) for pattern in n.patterns])",
"target": "mypy.fastparse.ASTConverter.visit_MatchOr"
},
{
"code": "any",
"column": 72,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "incorrect_expr = find_disallowed_expression_in_annotation_scope(n.value)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 73,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "self.fail(message_registry.TYPE_ALIAS_WITH_YIELD_EXPRESSION, n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 83,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.fail(message_registry.TYPE_ALIAS_WITH_YIELD_EXPRESSION, n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 73,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "self.fail(message_registry.TYPE_ALIAS_WITH_NAMED_EXPRESSION, n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 83,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.fail(message_registry.TYPE_ALIAS_WITH_NAMED_EXPRESSION, n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 73,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "self.fail(message_registry.TYPE_ALIAS_WITH_AWAIT_EXPRESSION, n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 83,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.fail(message_registry.TYPE_ALIAS_WITH_AWAIT_EXPRESSION, n.lineno, n.col_offset)",
"target": "mypy.fastparse.ASTConverter.validate_type_alias"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "type_params = self.translate_type_params(n.type_params)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "value = self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "value = self.visit(n.value)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "ret = ReturnStmt(value)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.set_line(ret, n.value)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "self.set_line(value_func, n.value)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "node = TypeAliasStmt(self.visit_Name(n.name), type_params, value_func)",
"target": "mypy.fastparse.ASTConverter.visit_TypeAlias"
},
{
"code": "any",
"column": 55,
"message": "Expression type contains \"Any\" (has type \"Any | int\")",
"offset": 40,
"src": "None, \"typing.Any\", line=self.line, column=getattr(node, \"col_offset\", -1), note=note",
"target": "mypy.fastparse.TypeConverter.invalid_type"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 16,
"src": "visitor = getattr(self, method, None)",
"target": "mypy.fastparse.TypeConverter.visit"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if visitor is not None:",
"target": "mypy.fastparse.TypeConverter.visit"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "typ = visitor(node)",
"target": "mypy.fastparse.TypeConverter.visit"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(typ, ProperType)",
"target": "mypy.fastparse.TypeConverter.visit"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 81,
"src": "if isinstance(n, Constant) and isinstance(n.value, str):",
"target": "mypy.fastparse.TypeConverter._extract_argument_name"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(n, Constant) and n.value is None:",
"target": "mypy.fastparse.TypeConverter._extract_argument_name"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 69,
"src": "val = n.value",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if val is None:",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if isinstance(val, str):",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if val is Ellipsis:",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if isinstance(val, bool):",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if isinstance(val, (int, float, complex)):",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if isinstance(val, bytes):",
"target": "mypy.fastparse.TypeConverter.visit_Constant"
},
{
"code": "any",
"column": 61,
"message": "Expression type contains \"Any\" (has type \"Any | int\")",
"offset": 38,
"src": "numeric_value, type_name, line=self.line, column=getattr(n, \"col_offset\", -1)",
"target": "mypy.fastparse.TypeConverter.numeric_type"
},
{
"code": "explicit-any",
"column": 27,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "value = self.visit(cast(Any, n).value)",
"target": "mypy.fastparse.TypeConverter.visit_Index"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "value = self.visit(cast(Any, n).value)",
"target": "mypy.fastparse.TypeConverter.visit_Index"
},
{
"code": "any",
"column": 74,
"message": "Expression has type \"Any\"",
"offset": 44,
"src": "if not isinstance(item_name, ast3.Constant) or not isinstance(item_name.value, str):",
"target": "mypy.fastparse.TypeConverter.visit_Dict"
}
],
"mypy/fixup.py": [
{
"code": "truthy-bool",
"column": 15,
"message": "Member \"defn\" has type \"ClassDef\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 70,
"src": "if info.defn:",
"target": "mypy.fixup.NodeFixer.visit_type_info"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"func\" has type \"FuncDef\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 113,
"src": "if d.func:",
"target": "mypy.fixup.NodeFixer.visit_decorator"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"var\" has type \"Var\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 2,
"src": "if d.var:",
"target": "mypy.fixup.NodeFixer.visit_decorator"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 74,
"src": "def visit_any(self, o: Any) -> None:",
"target": "mypy.fixup.TypeFixer.visit_any"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"fallback\" has type \"Instance\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 4,
"src": "if ct.fallback:",
"target": "mypy.fixup.TypeFixer.visit_callable_type"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always true",
"offset": 4,
"src": "if argt is not None:",
"target": "mypy.fixup.TypeFixer.visit_callable_type"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 2,
"src": "if ct.ret_type is not None:",
"target": "mypy.fixup.TypeFixer.visit_callable_type"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 16,
"src": "def visit_erased_type(self, o: Any) -> None:",
"target": "mypy.fixup.TypeFixer.visit_erased_type"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "raise RuntimeError(\"Shouldn't get here\", o)",
"target": "mypy.fixup.TypeFixer.visit_erased_type"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def visit_deleted_type(self, o: Any) -> None:",
"target": "mypy.fixup.TypeFixer.visit_deleted_type"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def visit_none_type(self, o: Any) -> None:",
"target": "mypy.fixup.TypeFixer.visit_none_type"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def visit_uninhabited_type(self, o: Any) -> None:",
"target": "mypy.fixup.TypeFixer.visit_uninhabited_type"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def visit_partial_type(self, o: Any) -> None:",
"target": "mypy.fixup.TypeFixer.visit_partial_type"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "raise RuntimeError(\"Shouldn't get here\", o)",
"target": "mypy.fixup.TypeFixer.visit_partial_type"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 6,
"src": "if tt.partial_fallback is not None:",
"target": "mypy.fixup.TypeFixer.visit_tuple_type"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 7,
"src": "if tdt.fallback is not None:",
"target": "mypy.fixup.TypeFixer.visit_typeddict_type"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always true",
"offset": 39,
"src": "if argt is not None:",
"target": "mypy.fixup.TypeFixer.visit_parameters"
}
],
"mypy/fscache.py": [
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 296,
"src": "new = OSError(*e.args)",
"target": "mypy.fscache.copy_os_error"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "new.filename = e.filename",
"target": "mypy.fscache.copy_os_error"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if e.filename2:",
"target": "mypy.fscache.copy_os_error"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "new.filename2 = e.filename2",
"target": "mypy.fscache.copy_os_error"
}
],
"mypy/inspections.py": [
{
"code": "helpful-string",
"column": 43,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 57,
"src": "return f\"{expr.line}:{expr.column + 1}:{expr.end_line}:{expr.end_column}\"",
"target": "mypy.inspections.expr_span"
},
{
"code": "helpful-string",
"column": 59,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 0,
"src": "return f\"{expr.line}:{expr.column + 1}:{expr.end_line}:{expr.end_column}\"",
"target": "mypy.inspections.expr_span"
},
{
"code": "helpful-string",
"column": 17,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 305,
"src": "return f\"{module.path}:{node.line}:{node.column + 1}:{node.name}\"",
"target": "mypy.inspections.InspectionEngine.format_node"
}
],
"mypy/literals.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 132,
"src": "Key: _TypeAlias = tuple[Any, ...]",
"target": "mypy.literals"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 16,
"src": "if len(key) == 2 and key[0] == \"Var\" and isinstance(key[1], Var):",
"target": "mypy.literals.extract_var_from_literal_hash"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if len(key) == 2 and key[0] == \"Var\" and isinstance(key[1], Var):",
"target": "mypy.literals.extract_var_from_literal_hash"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"tuple[str | Any, ...]\")",
"offset": 41,
"src": "return (\"Comparison\",) + rest",
"target": "mypy.literals._Hasher.visit_comparison_expr"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"tuple[str | Any, ...]\")",
"offset": 8,
"src": "return (name,) + rest",
"target": "mypy.literals._Hasher.seq_expr"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"tuple[str | Any, ...]\")",
"offset": 11,
"src": "return (\"Dict\",) + rest",
"target": "mypy.literals._Hasher.visit_dict_expr"
}
],
"mypy/main.py": [
{
"code": "helpful-string",
"column": 12,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 249,
"src": "\"Warning: unused section(s) in {}: {}\".format(",
"target": "mypy.main.run_build"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 110,
"src": "python_executable = special_opts.python_executable or options.python_executable",
"target": "mypy.main.infer_python_executable"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Any | str | None\")",
"offset": 0,
"src": "python_executable = special_opts.python_executable or options.python_executable",
"target": "mypy.main.infer_python_executable"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | str | None\")",
"offset": 2,
"src": "if python_executable is None:",
"target": "mypy.main.infer_python_executable"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not special_opts.no_executable and not options.no_site_packages:",
"target": "mypy.main.infer_python_executable"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 48,
"src": "def __init__(self, *args: Any, **kwargs: Any) -> None:",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "self.stdout = kwargs.pop(\"stdout\", sys.stdout)",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.stdout = kwargs.pop(\"stdout\", sys.stdout)",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "self.stderr = kwargs.pop(\"stderr\", sys.stderr)",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.stderr = kwargs.pop(\"stderr\", sys.stderr)",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "super().__init__(*args, **kwargs)",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "super().__init__(*args, **kwargs)",
"target": "mypy.main.CapturableArgumentParser.__init__"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "file = self.stdout",
"target": "mypy.main.CapturableArgumentParser.print_usage"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"SupportsWrite[str] | Any\")",
"offset": 1,
"src": "self._print_message(self.format_usage(), file)",
"target": "mypy.main.CapturableArgumentParser.print_usage"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "file = self.stdout",
"target": "mypy.main.CapturableArgumentParser.print_help"
},
{
"code": "any",
"column": 48,
"message": "Expression type contains \"Any\" (has type \"SupportsWrite[str] | Any\")",
"offset": 1,
"src": "self._print_message(self.format_help(), file)",
"target": "mypy.main.CapturableArgumentParser.print_help"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "file = self.stderr",
"target": "mypy.main.CapturableArgumentParser._print_message"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"SupportsWrite[str] | Any\")",
"offset": 1,
"src": "file.write(message)",
"target": "mypy.main.CapturableArgumentParser._print_message"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "self._print_message(message, self.stderr)",
"target": "mypy.main.CapturableArgumentParser.exit"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 12,
"src": "self.print_usage(self.stderr)",
"target": "mypy.main.CapturableArgumentParser.error"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 31,
"src": "def __call__(",
"target": "mypy.main.CapturableVersionAction.__call__"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 270,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 7,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 69,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 171,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 7,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 295,
"src": "\"--package-root\", metavar=\"ROOT\", action=\"append\", default=[], help=argparse.SUPPRESS",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 53,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 12,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 9,
"src": "default=[],",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 23,
"src": "config_file = dummy.config_file",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if config_file and not os.path.exists(config_file):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if config_file and not os.path.exists(config_file):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if config_file and not os.path.exists(config_file):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "parser.error(f\"Cannot find config file '{config_file}'\")",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 46,
"src": "parse_config_file(options, set_strict_flags, config_file, stdout, stderr)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if dummy.ide:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 15,
"src": "options.python_version = special_opts.python_version or options.python_version",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | (int, int)\")",
"offset": 1,
"src": "if options.python_version < (3,):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if options.python_version < (3,):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "if special_opts.no_executable or options.no_site_packages:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if special_opts.no_executable or options.no_site_packages:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if not (special_opts.files or special_opts.packages or special_opts.modules):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not (special_opts.files or special_opts.packages or special_opts.modules):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 59,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not (special_opts.files or special_opts.packages or special_opts.modules):",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "code_methods = sum(",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "bool(c)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "for c in [",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "special_opts.modules + special_opts.packages,",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "special_opts.modules + special_opts.packages,",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "special_opts.command,",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "special_opts.files,",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 33,
"src": "if special_opts.find_occurrences:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "_find_occurrences = tuple(special_opts.find_occurrences.split(\".\"))",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "_find_occurrences = tuple(special_opts.find_occurrences.split(\".\"))",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "if len(_find_occurrences) < 2:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 2,
"src": "if len(_find_occurrences) != 2:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 5,
"src": "for flag, val in vars(special_opts).items():",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for flag, val in vars(special_opts).items():",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "for flag, val in vars(special_opts).items():",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"dict_items[str, Any]\")",
"offset": 0,
"src": "for flag, val in vars(special_opts).items():",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if flag.endswith(\"_report\") and val is not None:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "report_dir = val",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "options.report_dirs[report_type] = report_dir",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "if special_opts.cache_map:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 35,
"src": "[f\"module:{el}\" for el in special_opts.modules]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[f\"module:{el}\" for el in special_opts.modules]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[f\"module:{el}\" for el in special_opts.modules]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 10,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "+ [f\"package:{el}\" for el in special_opts.packages]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "+ [f\"package:{el}\" for el in special_opts.packages]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "+ [f\"package:{el}\" for el in special_opts.packages]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 10,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "+ [f\"file:{el}\" for el in special_opts.files]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "+ [f\"file:{el}\" for el in special_opts.files]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "+ [f\"file:{el}\" for el in special_opts.files]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if special_opts.modules + special_opts.packages:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if special_opts.modules + special_opts.packages:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "for p in special_opts.packages:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for p in special_opts.packages:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if os.sep in p or os.altsep and os.altsep in p:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if os.sep in p or os.altsep and os.altsep in p:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "fail(f\"Package name '{p}' cannot have a slash in it.\", stderr, options)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "p_targets = cache.find_modules_recursive(p)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "reason = cache.find_module(p)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "f\"Package '{p}' cannot be type checked due to missing py.typed marker. See https://mypy.readthedocs.io/en/stable/installed_packages.html for more details\",",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "fail(f\"Can't find package '{p}'\", stderr, options)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "for m in special_opts.modules:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for m in special_opts.modules:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "targets.append(BuildSource(None, m, None))",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 9,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif special_opts.command:",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "targets = [BuildSource(None, None, \"\\n\".join(special_opts.command))]",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "targets = create_source_list(special_opts.files, options, fscache)",
"target": "mypy.main.process_options"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 48,
"src": "n = len(special_opts.cache_map)",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "source, meta_file, data_file = special_opts.cache_map[i : i + 3]",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if source in options.cache_map:",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "parser.error(f\"Duplicate --cache-map source {source})\")",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not source.endswith(\".py\") and not source.endswith(\".pyi\"):",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not source.endswith(\".py\") and not source.endswith(\".pyi\"):",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "parser.error(f\"Invalid --cache-map source {source} (triple[0] must be *.py[i])\")",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not meta_file.endswith(\".meta.json\"):",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 85,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "\"Invalid --cache-map meta_file %s (triple[1] must be *.meta.json)\" % meta_file",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if not data_file.endswith(\".data.json\"):",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 85,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "\"Invalid --cache-map data_file %s (triple[2] must be *.data.json)\" % data_file",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "options.cache_map[source] = (meta_file, data_file)",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"(Any, Any)\")",
"offset": 0,
"src": "options.cache_map[source] = (meta_file, data_file)",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "options.cache_map[source] = (meta_file, data_file)",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "options.cache_map[source] = (meta_file, data_file)",
"target": "mypy.main.process_cache_map"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 19,
"src": "options.platform,",
"target": "mypy.main.maybe_write_junit_xml"
},
{
"code": "any",
"column": 78,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "td, serious, messages_by_file, options.junit_xml, py_version, options.platform",
"target": "mypy.main.maybe_write_junit_xml"
}
],
"mypy/meet.py": [
{
"code": "helpful-string",
"column": 40,
"message": "The type \"type[mypy.types.ProperType]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 623,
"src": "assert type(left) != type(right), f\"{type(left)} vs {type(right)}\"",
"target": "mypy.meet.is_overlapping_types"
},
{
"code": "helpful-string",
"column": 56,
"message": "The type \"type[mypy.types.ProperType]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 0,
"src": "assert type(left) != type(right), f\"{type(left)} vs {type(right)}\"",
"target": "mypy.meet.is_overlapping_types"
}
],
"mypy/memprofile.py": [
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 27,
"src": "objs = gc.get_objects()",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "find_recursive_objects(objs)",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "for obj in objs:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "for obj in objs:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 1,
"src": "if type(obj) is FakeInfo:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if type(obj) is FakeInfo:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 3,
"src": "n = type(obj).__name__",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "n = type(obj).__name__",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if hasattr(obj, \"__dict__\"):",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "inferred[id(obj.__dict__)] = f\"{n} (__dict__)\"",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(obj, (Node, Type)): # type: ignore[misc]",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": null,
"column": 22,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "if isinstance(obj, (Node, Type)): # type: ignore[misc]",
"target": null
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 19,
"src": "for obj in objs:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "for obj in objs:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if id(obj) in inferred:",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "name = inferred[id(obj)]",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 2,
"src": "name = type(obj).__name__",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "name = type(obj).__name__",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 59,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "memuse[name] = memuse.get(name, 0) + sys.getsizeof(obj)",
"target": "mypy.memprofile.collect_memory_stats"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 56,
"src": "for slot in getattr(base, \"__slots__\", ()):",
"target": "mypy.memprofile.find_recursive_objects"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"Any | ()\")",
"offset": 0,
"src": "for slot in getattr(base, \"__slots__\", ()):",
"target": "mypy.memprofile.find_recursive_objects"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if hasattr(obj, slot):",
"target": "mypy.memprofile.find_recursive_objects"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "visit(getattr(obj, slot))",
"target": "mypy.memprofile.find_recursive_objects"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "visit(getattr(obj, slot))",
"target": "mypy.memprofile.find_recursive_objects"
}
],
"mypy/messages.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 575,
"src": "def unsupported_operand_types(",
"target": "mypy.messages.MessageBuilder.unsupported_operand_types"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "if isinstance(left_type, str):",
"target": "mypy.messages.MessageBuilder.unsupported_operand_types"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "left_str = format_type(left_type, self.options)",
"target": "mypy.messages.MessageBuilder.unsupported_operand_types"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if isinstance(right_type, str):",
"target": "mypy.messages.MessageBuilder.unsupported_operand_types"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "right_str = format_type(right_type, self.options)",
"target": "mypy.messages.MessageBuilder.unsupported_operand_types"
},
{
"code": "helpful-string",
"column": 46,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 352,
"src": "f'This is likely because \"{original_caller_type.name}\" has named arguments: '",
"target": "mypy.messages.MessageBuilder.maybe_note_concatenate_pos_args"
},
{
"code": "possibly-undefined",
"column": 18,
"message": "Name \"msg\" may be undefined",
"offset": 84,
"src": "self.fail(msg, context)",
"target": "mypy.messages"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 14,
"src": "first_arg = callee.def_extras.get(\"first_arg\")",
"target": "mypy.messages.MessageBuilder.maybe_note_about_special_args"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "first_arg = callee.def_extras.get(\"first_arg\")",
"target": "mypy.messages.MessageBuilder.maybe_note_about_special_args"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if first_arg and first_arg not in {\"self\", \"cls\", \"mcs\"}:",
"target": "mypy.messages.MessageBuilder.maybe_note_about_special_args"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None | bool\")",
"offset": 0,
"src": "if first_arg and first_arg not in {\"self\", \"cls\", \"mcs\"}:",
"target": "mypy.messages.MessageBuilder.maybe_note_about_special_args"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if first_arg and first_arg not in {\"self\", \"cls\", \"mcs\"}:",
"target": "mypy.messages.MessageBuilder.maybe_note_about_special_args"
},
{
"code": "helpful-string",
"column": 12,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 51,
"src": "'{} gets multiple values for keyword argument \"{}\"'.format(",
"target": "mypy.messages.MessageBuilder.duplicate_argument_value"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 202,
"src": "elif isinstance(tp, Overloaded):",
"target": "mypy.messages.MessageBuilder.pretty_callable_or_overload"
},
{
"code": "helpful-string",
"column": 37,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 530,
"src": "self.note(f\" {k}: {v.accept(visitor) if v is not None else None}\", context)",
"target": "mypy.messages.MessageBuilder.reveal_locals"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always false",
"offset": 384,
"src": "if not isinstance(subtype.partial_fallback, Instance):",
"target": "mypy.messages.MessageBuilder.report_protocol_problems"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 1,
"src": "return",
"target": "mypy.messages.MessageBuilder.report_protocol_problems"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always false",
"offset": 3,
"src": "if not isinstance(subtype.fallback, Instance):",
"target": "mypy.messages.MessageBuilder.report_protocol_problems"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 1,
"src": "return",
"target": "mypy.messages.MessageBuilder.report_protocol_problems"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 189,
"src": "def print_more(",
"target": "mypy.messages.MessageBuilder.print_more"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Sequence[Any]\")",
"offset": 9,
"src": "if len(conflicts) > max_items:",
"target": "mypy.messages.MessageBuilder.print_more"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Sequence[Any]\")",
"offset": 2,
"src": "f\"<{len(conflicts) - max_items} more conflict(s) not shown>\",",
"target": "mypy.messages.MessageBuilder.print_more"
},
{
"code": "helpful-string",
"column": 37,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 164,
"src": "arg_strings.append(f\"{arg_name}: {format(arg_type)}\")",
"target": "mypy.messages.format_callable_args"
},
{
"code": "helpful-string",
"column": 37,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 3,
"src": "arg_strings.append(f\"{arg_name}: {format(arg_type)}\")",
"target": "mypy.messages.format_callable_args"
},
{
"code": "helpful-string",
"column": 37,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 6,
"src": "arg_strings.append(f\"{arg_name}: {format(arg_type)}=...\")",
"target": "mypy.messages.format_callable_args"
},
{
"code": "helpful-string",
"column": 37,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 3,
"src": "arg_strings.append(f\"{arg_name}: {format(arg_type)} = ...\")",
"target": "mypy.messages.format_callable_args"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 7,
"src": "elif arg_kind is ARG_STAR2:",
"target": "mypy.messages.format_callable_args"
},
{
"code": "redundant-expr",
"column": 9,
"message": "Condition is always false",
"offset": 293,
"src": "elif typ is None:",
"target": "mypy.messages.format_type_inner"
},
{
"code": "possibly-undefined",
"column": 21,
"message": "Name \"strs\" may be undefined",
"offset": 135,
"src": "return tuple(strs)",
"target": "mypy.messages"
},
{
"code": "possibly-undefined",
"column": 51,
"message": "Name \"strs\" may be undefined",
"offset": 2,
"src": "return tuple(quote_type_string(s) for s in strs)",
"target": "mypy.messages"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 74,
"src": "first_arg = tp.def_extras.get(\"first_arg\")",
"target": "mypy.messages.pretty_callable"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "first_arg = tp.def_extras.get(\"first_arg\")",
"target": "mypy.messages.pretty_callable"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if first_arg:",
"target": "mypy.messages.pretty_callable"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "s = first_arg + s",
"target": "mypy.messages.pretty_callable"
}
],
"mypy/metastore.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 168,
"src": "def _query(self, name: str, field: str) -> Any:",
"target": "mypy.metastore.SqliteMetadataStore._query"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 6,
"src": "results = cur.fetchall()",
"target": "mypy.metastore.SqliteMetadataStore._query"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "if not results:",
"target": "mypy.metastore.SqliteMetadataStore._query"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "assert len(results) == 1",
"target": "mypy.metastore.SqliteMetadataStore._query"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return results[0][0]",
"target": "mypy.metastore.SqliteMetadataStore._query"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return results[0][0]",
"target": "mypy.metastore.SqliteMetadataStore._query"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "mtime = self._query(name, \"mtime\")",
"target": "mypy.metastore.SqliteMetadataStore.getmtime"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(mtime, float)",
"target": "mypy.metastore.SqliteMetadataStore.getmtime"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "data = self._query(name, \"data\")",
"target": "mypy.metastore.SqliteMetadataStore.read"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(data, bytes)",
"target": "mypy.metastore.SqliteMetadataStore.read"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 31,
"src": "for row in self.db.execute(\"SELECT path FROM files2\"):",
"target": "mypy.metastore.SqliteMetadataStore.list_all"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield row[0]",
"target": "mypy.metastore.SqliteMetadataStore.list_all"
}
],
"mypy/modulefinder.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 103,
"src": "elif self is ModuleNotFoundReason.APPROVED_STUBS_NOT_INSTALLED:",
"target": "mypy.modulefinder.ModuleNotFoundReason.error_message_templates"
},
{
"code": "possibly-undefined",
"column": 32,
"message": "Name \"parent_id\" may be undefined",
"offset": 496,
"src": "if self.find_module(parent_id) is ModuleNotFoundReason.APPROVED_STUBS_NOT_INSTALLED:",
"target": "mypy.modulefinder"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 184,
"src": "sys_path, site_packages = ast.literal_eval(",
"target": "mypy.modulefinder.get_search_dirs"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "print(err.stderr)",
"target": "mypy.modulefinder.get_search_dirs"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "print(err.stdout)",
"target": "mypy.modulefinder.get_search_dirs"
}
],
"mypy/moduleinspect.py": [
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 37,
"src": "if module.__dict__.get(\"__file__\") is None:",
"target": "mypy.moduleinspect.is_c_module"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "if module.__dict__.get(\"__file__\") is None:",
"target": "mypy.moduleinspect.is_c_module"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"(Any, Any)\")",
"offset": 4,
"src": "return os.path.splitext(module.__dict__[\"__file__\"])[-1] in [\".so\", \".pyd\", \".dll\"]",
"target": "mypy.moduleinspect.is_c_module"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return os.path.splitext(module.__dict__[\"__file__\"])[-1] in [\".so\", \".pyd\", \".dll\"]",
"target": "mypy.moduleinspect.is_c_module"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "return os.path.splitext(module.__dict__[\"__file__\"])[-1] in [\".so\", \".pyd\", \".dll\"]",
"target": "mypy.moduleinspect.is_c_module"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return os.path.splitext(module.__dict__[\"__file__\"])[-1] in [\".so\", \".pyd\", \".dll\"]",
"target": "mypy.moduleinspect.is_c_module"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 17,
"src": "name = getattr(package, \"__name__\", package_id)",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "file = getattr(package, \"__file__\", None)",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 2,
"src": "if not isinstance(path, list):",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 14,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 2,
"src": "pkg_all = getattr(package, \"__all__\", None)",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if pkg_all is not None:",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "pkg_all = list(pkg_all)",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 11,
"src": "subpackages = [",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "subpackages = [",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 2,
"src": "for name, val in inspect.getmembers(package)",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if inspect.ismodule(val) and val.__name__ == package.__name__ + \".\" + name",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 11,
"src": "name=name, file=file, path=path, all=pkg_all, is_c_module=is_c, subpackages=subpackages",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "name=name, file=file, path=path, all=pkg_all, is_c_module=is_c, subpackages=subpackages",
"target": "mypy.moduleinspect.get_package_properties"
},
{
"code": "any",
"column": 45,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "name=name, file=file, path=path, all=pkg_all, is_c_module=is_c, subpackages=subpackages",
"target": "mypy.moduleinspect.get_package_properties"
}
],
"mypy/mro.py": [
{
"code": "possibly-undefined",
"column": 22,
"message": "Name \"head\" may be undefined",
"offset": 59,
"src": "result.append(head)",
"target": "mypy.mro"
}
],
"mypy/nodes.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 71,
"src": "JsonDict: _TypeAlias = dict[str, Any]",
"target": "mypy.nodes"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 116,
"src": "if ans is None:",
"target": "mypy.nodes.Node.__str__"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 1,
"src": "return repr(self)",
"target": "mypy.nodes.Node.__str__"
},
{
"code": "unreachable",
"column": 12,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-unreachable for more info",
"offset": 0,
"src": "return repr(self)",
"target": null
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 198,
"src": "return {",
"target": "mypy.nodes.MypyFile.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 7,
"src": "\"future_import_flags\": list(self.future_import_flags),",
"target": "mypy.nodes.MypyFile.serialize"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"future_import_flags\": list(self.future_import_flags),",
"target": "mypy.nodes.MypyFile.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "assert data[\".class\"] == \"MypyFile\", data",
"target": "mypy.nodes.MypyFile.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 197,
"src": "return {",
"target": "mypy.nodes.OverloadedFuncDef.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"items\": [i.serialize() for i in self.items],",
"target": "mypy.nodes.OverloadedFuncDef.serialize"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"items\": [i.serialize() for i in self.items],",
"target": "mypy.nodes.OverloadedFuncDef.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "assert data[\".class\"] == \"OverloadedFuncDef\"",
"target": "mypy.nodes.OverloadedFuncDef.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "[cast(OverloadPart, SymbolNode.deserialize(d)) for d in data[\"items\"]]",
"target": "mypy.nodes.OverloadedFuncDef.deserialize"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[cast(OverloadPart, SymbolNode.deserialize(d)) for d in data[\"items\"]]",
"target": "mypy.nodes.OverloadedFuncDef.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 227,
"src": "return {",
"target": "mypy.nodes.FuncDef.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 5,
"src": "\"arg_kinds\": [int(x.value) for x in self.arg_kinds],",
"target": "mypy.nodes.FuncDef.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"arg_kinds\": [int(x.value) for x in self.arg_kinds],",
"target": "mypy.nodes.FuncDef.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 15,
"src": "assert data[\".class\"] == \"FuncDef\"",
"target": "mypy.nodes.FuncDef.deserialize"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 16,
"src": "ret.arg_kinds = [ArgKind(x) for x in data[\"arg_kinds\"]]",
"target": "mypy.nodes.FuncDef.deserialize"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ret.arg_kinds = [ArgKind(x) for x in data[\"arg_kinds\"]]",
"target": "mypy.nodes.FuncDef.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 70,
"src": "return {",
"target": "mypy.nodes.Decorator.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "assert data[\".class\"] == \"Decorator\"",
"target": "mypy.nodes.Decorator.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 152,
"src": "assert data[\".class\"] == \"Var\"",
"target": "mypy.nodes.Var.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 98,
"src": "return {",
"target": "mypy.nodes.ClassDef.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 4,
"src": "\"type_vars\": [v.serialize() for v in self.type_vars],",
"target": "mypy.nodes.ClassDef.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"type_vars\": [v.serialize() for v in self.type_vars],",
"target": "mypy.nodes.ClassDef.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "assert data[\".class\"] == \"ClassDef\"",
"target": "mypy.nodes.ClassDef.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "[",
"target": "mypy.nodes.ClassDef.deserialize"
},
{
"code": "any",
"column": 77,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "cast(mypy.types.TypeVarLikeType, mypy.types.deserialize_type(v))",
"target": "mypy.nodes.ClassDef.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1413,
"src": "return {",
"target": "mypy.nodes.TypeVarExpr.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 4,
"src": "\"values\": [t.serialize() for t in self.values],",
"target": "mypy.nodes.TypeVarExpr.serialize"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"values\": [t.serialize() for t in self.values],",
"target": "mypy.nodes.TypeVarExpr.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "assert data[\".class\"] == \"TypeVarExpr\"",
"target": "mypy.nodes.TypeVarExpr.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "[mypy.types.deserialize_type(v) for v in data[\"values\"]],",
"target": "mypy.nodes.TypeVarExpr.deserialize"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[mypy.types.deserialize_type(v) for v in data[\"values\"]],",
"target": "mypy.nodes.TypeVarExpr.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 16,
"src": "return {",
"target": "mypy.nodes.ParamSpecExpr.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "assert data[\".class\"] == \"ParamSpecExpr\"",
"target": "mypy.nodes.ParamSpecExpr.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 37,
"src": "return {",
"target": "mypy.nodes.TypeVarTupleExpr.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 12,
"src": "assert data[\".class\"] == \"TypeVarTupleExpr\"",
"target": "mypy.nodes.TypeVarTupleExpr.deserialize"
},
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always false",
"offset": 569,
"src": "if isinstance(node, FuncBase):",
"target": "mypy.nodes.TypeInfo.get_method"
},
{
"code": "unreachable",
"column": 20,
"message": "Statement is unreachable",
"offset": 1,
"src": "return node",
"target": "mypy.nodes.TypeInfo.get_method"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 153,
"src": "ti.abstract_attributes = [(attr[0], attr[1]) for attr in data[\"abstract_attributes\"]]",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"(Any, Any)\")",
"offset": 0,
"src": "ti.abstract_attributes = [(attr[0], attr[1]) for attr in data[\"abstract_attributes\"]]",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ti.abstract_attributes = [(attr[0], attr[1]) for attr in data[\"abstract_attributes\"]]",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ti.abstract_attributes = [(attr[0], attr[1]) for attr in data[\"abstract_attributes\"]]",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "ti.bases = [mypy.types.Instance.deserialize(b) for b in data[\"bases\"]]",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ti.bases = [mypy.types.Instance.deserialize(b) for b in data[\"bases\"]]",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "for p in data[\"_promote\"]:",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "t = mypy.types.deserialize_type(p)",
"target": "mypy.nodes.TypeInfo.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 286,
"src": "\"alias_tvars\": [v.serialize() for v in self.alias_tvars],",
"target": "mypy.nodes.TypeAlias.serialize"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"alias_tvars\": [v.serialize() for v in self.alias_tvars],",
"target": "mypy.nodes.TypeAlias.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "assert data[\".class\"] == \"TypeAlias\"",
"target": "mypy.nodes.TypeAlias.deserialize"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "alias_tvars = [mypy.types.deserialize_type(v) for v in data[\"alias_tvars\"]]",
"target": "mypy.nodes.TypeAlias.deserialize"
},
{
"code": "any",
"column": 51,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "alias_tvars = [mypy.types.deserialize_type(v) for v in data[\"alias_tvars\"]]",
"target": "mypy.nodes.TypeAlias.deserialize"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always true",
"offset": 240,
"src": "if prefix is not None:",
"target": "mypy.nodes.SymbolTableNode.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 17,
"src": "assert data[\".class\"] == \"SymbolTableNode\"",
"target": "mypy.nodes.SymbolTableNode.deserialize"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always true",
"offset": 33,
"src": "if isinstance(value, SymbolTableNode):",
"target": "mypy.nodes.SymbolTable.__str__"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 7,
"src": "a.append(\" \")",
"target": "mypy.nodes.SymbolTable.__str__"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 23,
"src": "assert data[\".class\"] == \"SymbolTable\"",
"target": "mypy.nodes.SymbolTable.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 39,
"src": "return {",
"target": "mypy.nodes.DataclassTransformSpec.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 5,
"src": "\"field_specifiers\": list(self.field_specifiers),",
"target": "mypy.nodes.DataclassTransformSpec.serialize"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"field_specifiers\": list(self.field_specifiers),",
"target": "mypy.nodes.DataclassTransformSpec.serialize"
},
{
"code": "any",
"column": 64,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 10,
"src": "field_specifiers=tuple(data.get(\"field_specifiers\", [])),",
"target": "mypy.nodes.DataclassTransformSpec.deserialize"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 69,
"src": "elif kind == ARG_STAR2:",
"target": "mypy.nodes.check_arg_kinds"
}
],
"mypy/options.py": [
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 135,
"src": "MACHDEP = sysconfig.get_config_var(\"MACHDEP\")",
"target": "mypy.options.Options.__init__"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if MACHDEP == \"emscripten\":",
"target": "mypy.options.Options.__init__"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.platform = MACHDEP",
"target": "mypy.options.Options.__init__"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 281,
"src": "self.transform_source: Callable[[Any], Any] | None = None",
"target": "mypy.options.Options.__init__"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"Any | Iterable[(Any, Any)]\")",
"offset": 53,
"src": "d = dict(getattr(self, \"__dict__\", ()))",
"target": "mypy.options.Options.snapshot"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "d[k] = getattr(self, k)",
"target": "mypy.options.Options.snapshot"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "d = {k: v for k, v in d.items() if not k.startswith(\"_\")}",
"target": "mypy.options.Options.snapshot"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "def process_error_codes(",
"target": "mypy.options.Options.process_error_codes"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 20,
"src": "def process_incomplete_features(",
"target": "mypy.options.Options.process_incomplete_features"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 150,
"src": "val = getattr(self, opt)",
"target": "mypy.options.Options.select_options_affecting_cache"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "val = sorted([code.code for code in val])",
"target": "mypy.options.Options.select_options_affecting_cache"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = sorted([code.code for code in val])",
"target": "mypy.options.Options.select_options_affecting_cache"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "val = sorted([code.code for code in val])",
"target": "mypy.options.Options.select_options_affecting_cache"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = sorted([code.code for code in val])",
"target": "mypy.options.Options.select_options_affecting_cache"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = sorted([code.code for code in val])",
"target": "mypy.options.Options.select_options_affecting_cache"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "result[opt] = val",
"target": "mypy.options.Options.select_options_affecting_cache"
}
],
"mypy/parse.py": [
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"(Any) -> Any | None\")",
"offset": 23,
"src": "if options.transform_source is not None:",
"target": "mypy.parse.parse"
}
],
"mypy/partially_defined.py": [
{
"code": "truthy-bool",
"column": 15,
"message": "Member \"else_body\" has type \"Block\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 603,
"src": "if o.else_body:",
"target": "mypy.partially_defined.PossiblyUndefinedVariableVisitor.visit_while_stmt"
}
],
"mypy/plugin.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 388,
"src": "def add_symbol_table_node(self, name: str, symbol: SymbolTableNode) -> Any:",
"target": "mypy.plugin.SemanticAnalyzerPluginInterface.add_symbol_table_node"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (self: SemanticAnalyzerPluginInterface, name: str, symbol: SymbolTableNode) -> Any\")",
"offset": 0,
"src": "def add_symbol_table_node(self, name: str, symbol: SymbolTableNode) -> Any:",
"target": "mypy.plugin"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 158,
"src": "def report_config_data(self, ctx: ReportConfigContext) -> Any:",
"target": "mypy.plugin.Plugin.report_config_data"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 289,
"src": "def report_config_data(self, ctx: ReportConfigContext) -> Any:",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "config_data = [plugin.report_config_data(ctx) for plugin in self._plugins]",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "config_data = [plugin.report_config_data(ctx) for plugin in self._plugins]",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return config_data if any(x is not None for x in config_data) else None",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any] | None\")",
"offset": 0,
"src": "return config_data if any(x is not None for x in config_data) else None",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return config_data if any(x is not None for x in config_data) else None",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return config_data if any(x is not None for x in config_data) else None",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
},
{
"code": "any",
"column": 57,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "return config_data if any(x is not None for x in config_data) else None",
"target": "mypy.plugin.ChainedPlugin.report_config_data"
}
],
"mypy/plugins/attrs.py": [
{
"code": "truthy-bool",
"column": 19,
"message": "\"init_type\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 136,
"src": "if init_type and self.init_type and self.converter.ret_type:",
"target": "mypy.plugins.attrs.Attribute.argument"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 47,
"src": "return {",
"target": "mypy.plugins.attrs.Attribute.serialize"
},
{
"code": "any",
"column": 41,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 116,
"src": "ctx.cls.info.metadata[\"attrs_tag\"] = {}",
"target": "mypy.plugins.attrs.attr_tag_callback"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 75,
"src": "ctx.cls.info.metadata[\"attrs\"] = {",
"target": "mypy.plugins.attrs.attr_class_maker_callback_impl"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"attributes\": [attr.serialize() for attr in attributes],",
"target": "mypy.plugins.attrs.attr_class_maker_callback_impl"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"attributes\": [attr.serialize() for attr in attributes],",
"target": "mypy.plugins.attrs.attr_class_maker_callback_impl"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 92,
"src": "for data in super_info.metadata[\"attrs\"][\"attributes\"]:",
"target": "mypy.plugins.attrs._analyze_class"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if data[\"name\"] not in taken_attr_names:",
"target": "mypy.plugins.attrs._analyze_class"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "a = Attribute.deserialize(super_info, data, ctx.api)",
"target": "mypy.plugins.attrs._analyze_class"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 31,
"src": "info.metadata[\"attrs\"] = {\"attributes\": [], \"frozen\": False}",
"target": "mypy.plugins.attrs._add_empty_metadata"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "info.metadata[\"attrs\"] = {\"attributes\": [], \"frozen\": False}",
"target": "mypy.plugins.attrs._add_empty_metadata"
},
{
"code": "any",
"column": 44,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "info.metadata[\"attrs\"] = {\"attributes\": [], \"frozen\": False}",
"target": "mypy.plugins.attrs._add_empty_metadata"
},
{
"code": "truthy-bool",
"column": 12,
"message": "Expression has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 205,
"src": "and converter_expr.args[0]",
"target": "mypy.plugins.attrs._parse_converter"
},
{
"code": "helpful-string",
"column": 24,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 417,
"src": "ctx.api.fail(f'\"{ctx.default_signature.name}\" has unexpected type annotation', ctx.context)",
"target": "mypy.plugins.attrs.evolve_function_sig_callback"
},
{
"code": "helpful-string",
"column": 15,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 21,
"src": "name=f\"{ctx.default_signature.name} of {inst_type_str}\",",
"target": "mypy.plugins.attrs.evolve_function_sig_callback"
}
],
"mypy/plugins/dataclasses.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 140,
"src": "elif of == \"__post_init__\":",
"target": "mypy.plugins.dataclasses.DataclassAttribute.to_argument"
},
{
"code": "possibly-undefined",
"column": 17,
"message": "Name \"arg_kind\" may be undefined",
"offset": 18,
"src": "kind=arg_kind,",
"target": "mypy.plugins.dataclasses"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 20,
"src": "return {",
"target": "mypy.plugins.dataclasses.DataclassAttribute.serialize"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 219,
"src": "info.metadata[\"dataclass\"] = {",
"target": "mypy.plugins.dataclasses.DataclassTransformer.transform"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"attributes\": [attr.serialize() for attr in attributes],",
"target": "mypy.plugins.dataclasses.DataclassTransformer.transform"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"attributes\": [attr.serialize() for attr in attributes],",
"target": "mypy.plugins.dataclasses.DataclassTransformer.transform"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 161,
"src": "for data in info.metadata[\"dataclass\"][\"attributes\"]:",
"target": "mypy.plugins.dataclasses.DataclassTransformer.collect_attributes"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "name: str = data[\"name\"]",
"target": "mypy.plugins.dataclasses.DataclassTransformer.collect_attributes"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "attr = DataclassAttribute.deserialize(info, data, self._api)",
"target": "mypy.plugins.dataclasses.DataclassTransformer.collect_attributes"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 390,
"src": "info.metadata[\"dataclass_tag\"] = {}",
"target": "mypy.plugins.dataclasses.add_dataclass_tag"
},
{
"code": "helpful-string",
"column": 24,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 128,
"src": "ctx.api.fail(f'\"{ctx.default_signature.name}\" has unexpected type annotation', ctx.context)",
"target": "mypy.plugins.dataclasses.replace_function_sig_callback"
},
{
"code": "helpful-string",
"column": 15,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 21,
"src": "name=f\"{ctx.default_signature.name} of {inst_type_str}\",",
"target": "mypy.plugins.dataclasses.replace_function_sig_callback"
}
],
"mypy/plugins/default.py": [
{
"code": "redundant-expr",
"column": 9,
"message": "Condition is always false",
"offset": 591,
"src": "elif isinstance(ctx.type, LiteralType):",
"target": "mypy.plugins.default.tuple_mul_callback"
},
{
"code": "unreachable",
"column": 20,
"message": "Intersection of \"TupleType & LiteralType\" cannot exist: would have incompatible method signatures",
"offset": 0,
"src": "elif isinstance(ctx.type, LiteralType):",
"target": "mypy.plugins.default.tuple_mul_callback"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 1,
"src": "value = arg_type.value",
"target": "mypy.plugins.default.tuple_mul_callback"
}
],
"mypy/plugins/enums.py": [
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always true",
"offset": 216,
"src": "if underlying_type is not None:",
"target": "mypy.plugins.enums.enum_value_callback"
}
],
"mypy/plugins/functools.py": [
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always false",
"offset": 111,
"src": "if isinstance(node, FuncItem) and isinstance(node.type, CallableType):",
"target": "mypy.plugins.functools._analyze_class"
},
{
"code": "unreachable",
"column": 50,
"message": "Right operand of \"and\" is never evaluated",
"offset": 0,
"src": "if isinstance(node, FuncItem) and isinstance(node.type, CallableType):",
"target": "mypy.plugins.functools._analyze_class"
},
{
"code": "unreachable",
"column": 20,
"message": "Statement is unreachable",
"offset": 1,
"src": "comparison_methods[name] = _MethodInfo(node.is_static, node.type)",
"target": "mypy.plugins.functools._analyze_class"
}
],
"mypy/reachability.py": [
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 150,
"src": "result = consider_sys_platform(expr, options.platform)",
"target": "mypy.reachability.infer_condition_value"
}
],
"mypy/report.py": [
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 474,
"src": "self.schema = etree.XMLSchema(etree.parse(xsd_path))",
"target": "mypy.report.MemoryXmlReporter.__init__"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "self.schema = etree.XMLSchema(etree.parse(xsd_path))",
"target": "mypy.report.MemoryXmlReporter.__init__"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "self.last_xml: Any | None = None",
"target": "mypy.report.MemoryXmlReporter.__init__"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 34,
"src": "root = etree.Element(\"mypy-report-file\", name=path, module=tree._fullname)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "doc = etree.ElementTree(root)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "doc = etree.ElementTree(root)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 6,
"src": "etree.SubElement(",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "root,",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 9,
"src": "transform_pi = etree.ProcessingInstruction(",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "root.addprevious(transform_pi)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "root.addprevious(transform_pi)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.schema.assertValid(doc)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "self.schema.assertValid(doc)",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 2,
"src": "self.last_xml = doc",
"target": "mypy.report.MemoryXmlReporter.on_file"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 21,
"src": "root = etree.Element(\"mypy-report-index\", name=\"index\")",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "doc = etree.ElementTree(root)",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "doc = etree.ElementTree(root)",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "etree.SubElement(",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "root,",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 8,
"src": "transform_pi = etree.ProcessingInstruction(",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "root.addprevious(transform_pi)",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "root.addprevious(transform_pi)",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.schema.assertValid(doc)",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "self.schema.assertValid(doc)",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 2,
"src": "self.last_xml = doc",
"target": "mypy.report.MemoryXmlReporter.on_finish"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 18,
"src": "self.classes: dict[str, Any] = {}",
"target": "mypy.report.CoberturaPackage.__init__"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "def as_xml(self) -> Any:",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "package_element = etree.Element(\"package\", complexity=\"1.0\", name=self.name)",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "package_element.attrib[\"branch-rate\"] = \"0\"",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "package_element.attrib[\"line-rate\"] = get_line_rate(self.covered_lines, self.total_lines)",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "classes_element = etree.SubElement(package_element, \"classes\")",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "classes_element = etree.SubElement(package_element, \"classes\")",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "for class_name in sorted(self.classes):",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "classes_element.append(self.classes[class_name])",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "classes_element.append(self.classes[class_name])",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "classes_element.append(self.classes[class_name])",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.add_packages(package_element)",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "return package_element",
"target": "mypy.report.CoberturaPackage.as_xml"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def add_packages(self, parent_element: Any) -> None:",
"target": "mypy.report.CoberturaPackage.add_packages"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 2,
"src": "packages_element = etree.SubElement(parent_element, \"packages\")",
"target": "mypy.report.CoberturaPackage.add_packages"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "packages_element = etree.SubElement(parent_element, \"packages\")",
"target": "mypy.report.CoberturaPackage.add_packages"
},
{
"code": "any",
"column": 62,
"message": "Expression type contains \"Any\" (has type \"attrgetter[Any]\")",
"offset": 1,
"src": "for package in sorted(self.packages.values(), key=attrgetter(\"name\")):",
"target": "mypy.report.CoberturaPackage.add_packages"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "packages_element.append(package.as_xml())",
"target": "mypy.report.CoberturaPackage.add_packages"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "packages_element.append(package.as_xml())",
"target": "mypy.report.CoberturaPackage.add_packages"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 9,
"src": "self.root = etree.Element(",
"target": "mypy.report.CoberturaXmlReporter.__init__"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "self.doc = etree.ElementTree(self.root)",
"target": "mypy.report.CoberturaXmlReporter.__init__"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "self.doc = etree.ElementTree(self.root)",
"target": "mypy.report.CoberturaXmlReporter.__init__"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 22,
"src": "class_element = etree.Element(\"class\", complexity=\"1.0\", filename=path, name=class_name)",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "etree.SubElement(class_element, \"methods\")",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "etree.SubElement(class_element, \"methods\")",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "lines_element = etree.SubElement(class_element, \"lines\")",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "lines_element = etree.SubElement(class_element, \"lines\")",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 17,
"src": "line_element = etree.SubElement(",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "lines_element,",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 8,
"src": "line_element.attrib[\"condition-coverage\"] = \"50% (1/2)\"",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "class_element.attrib[\"branch-rate\"] = \"0\"",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "class_element.attrib[\"line-rate\"] = get_line_rate(class_lines_covered, class_total_lines)",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 15,
"src": "current_package.classes[class_name] = class_element",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "current_package.classes[class_name] = class_element",
"target": "mypy.report.CoberturaXmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "self.root.attrib[\"line-rate\"] = get_line_rate(",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "self.root.attrib[\"branch-rate\"] = \"0\"",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.root.attrib[\"lines-covered\"] = str(self.root_package.covered_lines)",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.root.attrib[\"lines-valid\"] = str(self.root_package.total_lines)",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "sources = etree.SubElement(self.root, \"sources\")",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "sources = etree.SubElement(self.root, \"sources\")",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "source_element = etree.SubElement(sources, \"source\")",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "source_element = etree.SubElement(sources, \"source\")",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "source_element.text = os.getcwd()",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.root_package.add_packages(self.root)",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 2,
"src": "self.doc.write(out_path, encoding=\"utf-8\", pretty_print=True)",
"target": "mypy.report.CoberturaXmlReporter.on_finish"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 36,
"src": "last_xml = self.memory_xml.last_xml",
"target": "mypy.report.XmlReporter.on_file"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if last_xml is None:",
"target": "mypy.report.XmlReporter.on_file"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "last_xml.write(out_path, encoding=\"utf-8\")",
"target": "mypy.report.XmlReporter.on_file"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 3,
"src": "last_xml = self.memory_xml.last_xml",
"target": "mypy.report.XmlReporter.on_finish"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "assert last_xml is not None",
"target": "mypy.report.XmlReporter.on_finish"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "last_xml.write(out_path, encoding=\"utf-8\")",
"target": "mypy.report.XmlReporter.on_finish"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 19,
"src": "self.xslt_html = etree.XSLT(etree.parse(self.memory_xml.xslt_html_path))",
"target": "mypy.report.XsltHtmlReporter.__init__"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "self.xslt_html = etree.XSLT(etree.parse(self.memory_xml.xslt_html_path))",
"target": "mypy.report.XsltHtmlReporter.__init__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 1,
"src": "self.param_html = etree.XSLT.strparam(\"html\")",
"target": "mypy.report.XsltHtmlReporter.__init__"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 9,
"src": "last_xml = self.memory_xml.last_xml",
"target": "mypy.report.XsltHtmlReporter.on_file"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if last_xml is None:",
"target": "mypy.report.XsltHtmlReporter.on_file"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 7,
"src": "transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))",
"target": "mypy.report.XsltHtmlReporter.on_file"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))",
"target": "mypy.report.XsltHtmlReporter.on_file"
},
{
"code": "any",
"column": 62,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))",
"target": "mypy.report.XsltHtmlReporter.on_file"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 5,
"src": "last_xml = self.memory_xml.last_xml",
"target": "mypy.report.XsltHtmlReporter.on_finish"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "assert last_xml is not None",
"target": "mypy.report.XsltHtmlReporter.on_finish"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 3,
"src": "transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))",
"target": "mypy.report.XsltHtmlReporter.on_finish"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))",
"target": "mypy.report.XsltHtmlReporter.on_finish"
},
{
"code": "any",
"column": 62,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))",
"target": "mypy.report.XsltHtmlReporter.on_finish"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 19,
"src": "self.xslt_txt = etree.XSLT(etree.parse(self.memory_xml.xslt_txt_path))",
"target": "mypy.report.XsltTxtReporter.__init__"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "self.xslt_txt = etree.XSLT(etree.parse(self.memory_xml.xslt_txt_path))",
"target": "mypy.report.XsltTxtReporter.__init__"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 12,
"src": "last_xml = self.memory_xml.last_xml",
"target": "mypy.report.XsltTxtReporter.on_finish"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "assert last_xml is not None",
"target": "mypy.report.XsltTxtReporter.on_finish"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 2,
"src": "transformed_txt = bytes(self.xslt_txt(last_xml))",
"target": "mypy.report.XsltTxtReporter.on_finish"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "transformed_txt = bytes(self.xslt_txt(last_xml))",
"target": "mypy.report.XsltTxtReporter.on_finish"
}
],
"mypy/scope.py": [
{
"code": "truthy-bool",
"column": 19,
"message": "Member \"function\" has type \"FuncBase\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 82,
"src": "assert self.function",
"target": "mypy.scope.Scope.function_scope"
}
],
"mypy/semanal.py": [
{
"code": "possibly-undefined",
"column": 60,
"message": "Name \"old_return_stmt_flag\" may be undefined",
"offset": 550,
"src": "self.return_stmt_inside_except_star_block = old_return_stmt_flag",
"target": "mypy.semanal"
},
{
"code": "redundant-expr",
"column": 21,
"message": "Condition is always true",
"offset": 426,
"src": "elif self.options.infer_function_types:",
"target": "mypy.semanal.SemanticAnalyzer.analyze_func_def"
},
{
"code": "possibly-undefined",
"column": 41,
"message": "Name \"original_target\" may be undefined",
"offset": 73,
"src": "if defn.info and original_target == defn.arguments[0].variable.name:",
"target": "mypy.semanal"
},
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always true",
"offset": 20,
"src": "if isinstance(defn, FuncDef):",
"target": "mypy.semanal.SemanticAnalyzer.analyze_func_def"
},
{
"code": "helpful-string",
"column": 39,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 62,
"src": "overlapped = \", \".join([f'\"{name}\"' for name in overlap])",
"target": "mypy.semanal.SemanticAnalyzer.remove_unpack_kwargs"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 349,
"src": "elif isinstance(item, FuncDef):",
"target": "mypy.semanal.SemanticAnalyzer.analyze_overload_sigs_and_impl"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 89,
"src": "elif isinstance(item, FuncDef):",
"target": "mypy.semanal.SemanticAnalyzer.process_static_or_class_method_in_overload"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 10,
"src": "elif isinstance(defn.impl, FuncDef):",
"target": "mypy.semanal.SemanticAnalyzer.process_static_or_class_method_in_overload"
},
{
"code": "possibly-undefined",
"column": 35,
"message": "Name \"type_params_names\" may be undefined",
"offset": 501,
"src": "self.locals.append(type_params_names)",
"target": "mypy.semanal"
},
{
"code": "helpful-string",
"column": 59,
"message": "The type \"type[mypy.types.ProperType]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 39,
"src": "assert False, f\"Unexpected special alias type: {type(target)}\"",
"target": "mypy.semanal.SemanticAnalyzer.setup_alias_type_vars"
},
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always false",
"offset": 1110,
"src": "if node is None:",
"target": "mypy.semanal.SemanticAnalyzer.visit_import_all"
},
{
"code": "unreachable",
"column": 20,
"message": "Statement is unreachable",
"offset": 1,
"src": "continue",
"target": "mypy.semanal.SemanticAnalyzer.visit_import_all"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"rvalue\" has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 439,
"src": "if s.rvalue:",
"target": "mypy.semanal.SemanticAnalyzer.analyze_lvalues"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 286,
"src": "elif isinstance(value, float):",
"target": "mypy.semanal.SemanticAnalyzer.analyze_simple_literal_type"
},
{
"code": "possibly-undefined",
"column": 38,
"message": "Name \"type_name\" may be undefined",
"offset": 3,
"src": "typ = self.named_type_or_none(type_name)",
"target": "mypy.semanal"
},
{
"code": "helpful-string",
"column": 71,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 963,
"src": "f'{message_registry.TYPEVAR_UNEXPECTED_ARGUMENT}: \"{param_name}\"', context",
"target": "mypy.semanal.SemanticAnalyzer.process_typevar_parameters"
},
{
"code": "truthy-bool",
"column": 15,
"message": "\"call\" has type \"CallExpr\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 75,
"src": "if not call:",
"target": "mypy.semanal.SemanticAnalyzer.extract_typevarlike_name"
},
{
"code": "helpful-string",
"column": 57,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 112,
"src": "self.fail(f'Unexpected keyword argument \"{param_name}\" for \"TypeVarTuple\"', s)",
"target": "mypy.semanal.SemanticAnalyzer.process_typevartuple_declaration"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"zip[tuple[Any, ...]]\")",
"offset": 165,
"src": "elementwise_assignments = zip(rval.items, *[v.items for v in seq_lvals])",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "for rv, *lvs in elementwise_assignments:",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for rv, *lvs in elementwise_assignments:",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "for rv, *lvs in elementwise_assignments:",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"zip[tuple[Any, ...]]\")",
"offset": 0,
"src": "for rv, *lvs in elementwise_assignments:",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "any",
"column": 47,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "self.process_module_assignment(lvs, rv, ctx)",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.process_module_assignment(lvs, rv, ctx)",
"target": "mypy.semanal.SemanticAnalyzer.process_module_assignment"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"expr\" has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 164,
"src": "if s.expr:",
"target": "mypy.semanal.SemanticAnalyzer.visit_assert_stmt"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"expr\" has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 403,
"src": "if e.expr:",
"target": "mypy.semanal.SemanticAnalyzer.visit_yield_from_expr"
},
{
"code": "redundant-expr",
"column": 16,
"message": "Condition is always false",
"offset": 45,
"src": "reveal_type_node",
"target": "mypy.semanal.SemanticAnalyzer.visit_call_expr"
},
{
"code": "unreachable",
"column": 20,
"message": "Right operand of \"and\" is never evaluated",
"offset": 2,
"src": "and reveal_type_node.fullname in IMPORTED_REVEAL_TYPE_NAMES",
"target": "mypy.semanal.SemanticAnalyzer.visit_call_expr"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 2,
"src": "reveal_imported = True",
"target": "mypy.semanal.SemanticAnalyzer.visit_call_expr"
},
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always true",
"offset": 30,
"src": "if self.locals is not None:",
"target": "mypy.semanal.SemanticAnalyzer.visit_call_expr"
},
{
"code": "truthy-bool",
"column": 27,
"message": "\"n\" has type \"SymbolTableNode\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 154,
"src": "if not n:",
"target": "mypy.semanal.SemanticAnalyzer.visit_member_expr"
},
{
"code": "possibly-undefined",
"column": 23,
"message": "Name \"implicit_node\" may be undefined",
"offset": 407,
"src": "return implicit_node",
"target": "mypy.semanal"
},
{
"code": "truthy-bool",
"column": 15,
"message": "\"sym\" has type \"SymbolTableNode\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 273,
"src": "assert sym, \"Internal error: attempted to construct unknown type\"",
"target": "mypy.semanal.SemanticAnalyzer.named_type"
},
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 207,
"src": "f = cast(Callable[[object], Any], lambda x: x)",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(object) -> Any\")",
"offset": 0,
"src": "f = cast(Callable[[object], Any], lambda x: x)",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(f(symbol_node), (Decorator, FuncBase, Var)):",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 7,
"src": "existing is not None",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "and isinstance(f(existing.node), (Decorator, FuncBase, Var))",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"True | Any\")",
"offset": 2,
"src": "isinstance(f(existing.type), f(AnyType))",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "isinstance(f(existing.type), f(AnyType))",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "isinstance(f(existing.type), f(AnyType))",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "or f(existing.type) == f(symbol_node).type",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "or f(existing.type) == f(symbol_node).type",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "if isinstance(f(symbol_node), (FuncBase, Decorator)):",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "typ = f(symbol_node).type",
"target": "mypy.semanal.SemanticAnalyzer._get_node_for_class_scoped_import"
},
{
"code": "possibly-undefined",
"column": 19,
"message": "Name \"names\" may be undefined",
"offset": 288,
"src": "assert names is not None",
"target": "mypy.semanal"
}
],
"mypy/semanal_enum.py": [
{
"code": "helpful-string",
"column": 71,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 174,
"src": "self.fail_enum_call_arg(f'Unexpected keyword argument \"{arg_name}\"', call)",
"target": "mypy.semanal_enum.EnumCallAnalyzer.parse_enum_call_args"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always false",
"offset": 25,
"src": "if is_StrExpr_list(seq_items):",
"target": "mypy.semanal_enum.EnumCallAnalyzer.parse_enum_call_args"
},
{
"code": "unreachable",
"column": 31,
"message": "Intersection of \"list[Expression] & list[StrExpr]\" cannot exist: would have inconsistent method resolution order",
"offset": 0,
"src": "if is_StrExpr_list(seq_items):",
"target": "mypy.semanal_enum.EnumCallAnalyzer.parse_enum_call_args"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 1,
"src": "it = cast(list[StrExpr], seq_items)",
"target": "mypy.semanal_enum.EnumCallAnalyzer.parse_enum_call_args"
}
],
"mypy/semanal_main.py": [
{
"code": "possibly-undefined",
"column": 4,
"message": "Name \"state\" may be undefined",
"offset": 191,
"src": "state.manager.incomplete_namespaces.update(scc)",
"target": "mypy.semanal_main"
}
],
"mypy/semanal_namedtuple.py": [
{
"code": "redundant-expr",
"column": 19,
"message": "Condition is always true",
"offset": 415,
"src": "if not is_StrExpr_list(listexpr.items):",
"target": "mypy.semanal_namedtuple.NamedTupleAnalyzer.parse_namedtuple_args"
},
{
"code": "unreachable",
"column": 39,
"message": "Intersection of \"list[Expression] & list[StrExpr]\" cannot exist: would have inconsistent method resolution order",
"offset": 0,
"src": "if not is_StrExpr_list(listexpr.items):",
"target": "mypy.semanal_namedtuple.NamedTupleAnalyzer.parse_namedtuple_args"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 3,
"src": "it = cast(list[StrExpr], listexpr.items)",
"target": "mypy.semanal_namedtuple.NamedTupleAnalyzer.parse_namedtuple_args"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 119,
"src": "info.metadata[\"namedtuple\"] = {\"fields\": items.copy()}",
"target": "mypy.semanal_namedtuple.NamedTupleAnalyzer.build_namedtuple_typeinfo"
}
],
"mypy/semanal_pass1.py": [
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 59,
"src": "self.platform = options.platform",
"target": "mypy.semanal_pass1.SemanticAnalyzerPreAnalysis.visit_file"
}
],
"mypy/semanal_typeargs.py": [
{
"code": "helpful-string",
"column": 57,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 92,
"src": "assert t.alias is not None, f\"Unfixed type alias {t.type_ref}\"",
"target": "mypy.semanal_typeargs.TypeArgumentAnalyzer.visit_type_alias_type"
}
],
"mypy/semanal_typeddict.py": [
{
"code": "helpful-string",
"column": 47,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 514,
"src": "f'Unexpected keyword argument \"{call.arg_names[2]}\" for \"TypedDict\"', call",
"target": "mypy.semanal_typeddict.TypedDictAnalyzer.parse_typeddict_args"
}
],
"mypy/server/astdiff.py": [
{
"code": "redundant-expr",
"column": 7,
"message": "Condition is always false",
"offset": 238,
"src": "if isinstance(node, FuncBase):",
"target": "mypy.server.astdiff.snapshot_definition"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 2,
"src": "if node.type:",
"target": "mypy.server.astdiff.snapshot_definition"
}
],
"mypy/server/astmerge.py": [
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 305,
"src": "if isinstance(node.analyzed, SymbolNode):",
"target": "mypy.server.astmerge.NodeReplaceVisitor.visit_call_expr"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 1,
"src": "node.analyzed = self.fixup(node.analyzed)",
"target": "mypy.server.astmerge.NodeReplaceVisitor.visit_call_expr"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 143,
"src": "if typ.fallback is not None:",
"target": "mypy.server.astmerge.TypeReplaceVisitor.visit_callable_type"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 12,
"src": "if t.fallback is not None:",
"target": "mypy.server.astmerge.TypeReplaceVisitor.visit_overloaded"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 17,
"src": "if typ.partial_fallback is not None:",
"target": "mypy.server.astmerge.TypeReplaceVisitor.visit_tuple_type"
}
],
"mypy/server/deps.py": [
{
"code": "redundant-expr",
"column": 23,
"message": "Condition is always false",
"offset": 505,
"src": "if init and isinstance(init.node, FuncBase):",
"target": "mypy.server.deps.DependencyVisitor.visit_assignment_stmt"
},
{
"code": "unreachable",
"column": 24,
"message": "Statement is unreachable",
"offset": 1,
"src": "fname = init.node.fullname",
"target": "mypy.server.deps.DependencyVisitor.visit_assignment_stmt"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"upper_bound\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 534,
"src": "if typ.upper_bound:",
"target": "mypy.server.deps.TypeTriggersVisitor.visit_type_var"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"default\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 2,
"src": "if typ.default:",
"target": "mypy.server.deps.TypeTriggersVisitor.visit_type_var"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"upper_bound\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 10,
"src": "if typ.upper_bound:",
"target": "mypy.server.deps.TypeTriggersVisitor.visit_param_spec"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"default\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 2,
"src": "if typ.default:",
"target": "mypy.server.deps.TypeTriggersVisitor.visit_param_spec"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"upper_bound\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 9,
"src": "if typ.upper_bound:",
"target": "mypy.server.deps.TypeTriggersVisitor.visit_type_var_tuple"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"default\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 2,
"src": "if typ.default:",
"target": "mypy.server.deps.TypeTriggersVisitor.visit_type_var_tuple"
}
],
"mypy/server/mergecheck.py": [
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 31,
"src": "if fn is None:",
"target": "mypy.server.mergecheck.check_consistency"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 1,
"src": "continue",
"target": "mypy.server.mergecheck.check_consistency"
},
{
"code": "helpful-string",
"column": 29,
"message": "The string for \"object\" isn't helpful in a user-facing or semantic string",
"offset": 44,
"src": "result += f\".{attr}({t}:{obj.name})\"",
"target": "mypy.server.mergecheck.path_to_str"
},
{
"code": "helpful-string",
"column": 29,
"message": "The string for \"object\" isn't helpful in a user-facing or semantic string",
"offset": 4,
"src": "result += f\".{attr}\"",
"target": "mypy.server.mergecheck.path_to_str"
},
{
"code": "helpful-string",
"column": 29,
"message": "The string for \"object\" isn't helpful in a user-facing or semantic string",
"offset": 2,
"src": "result += f\".{attr}({t})\"",
"target": "mypy.server.mergecheck.path_to_str"
}
],
"mypy/server/objgraph.py": [
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 43,
"src": "if \"__getattribute__\" in getattr(type(o), \"__dict__\"):",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "e = getattr(o, attr)",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 1,
"src": "if type(e) not in ATOMIC_TYPE_BLACKLIST:",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if type(e) not in ATOMIC_TYPE_BLACKLIST:",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 1,
"src": "yield attr, e",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "yield attr, e",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(int, Any)\")",
"offset": 6,
"src": "for i, e in enumerate(o):",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for i, e in enumerate(o):",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"enumerate[Any]\")",
"offset": 0,
"src": "for i, e in enumerate(o):",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"(int, Any)\")",
"offset": 1,
"src": "yield i, e",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "yield i, e",
"target": "mypy.server.objgraph.get_edge_candidates"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"((object, str), tuple[CellType, ...] | None | Any (unannotated))\")",
"offset": 10,
"src": "yield (s, \"__closure__\"), e.__closure__",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"tuple[CellType, ...] | None | Any (unannotated)\")",
"offset": 0,
"src": "yield (s, \"__closure__\"), e.__closure__",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"object | Any (unannotated)\")",
"offset": 2,
"src": "se = e.__self__",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"object | Any (unannotated)\")",
"offset": 1,
"src": "if se is not o and se is not type(o) and hasattr(s, \"__self__\"):",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"object | Any (unannotated)\")",
"offset": 0,
"src": "if se is not o and se is not type(o) and hasattr(s, \"__self__\"):",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any (unannotated)\"",
"offset": 1,
"src": "yield s.__self__, se",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"(Any (unannotated), object | Any (unannotated))\")",
"offset": 0,
"src": "yield s.__self__, se",
"target": "mypy.server.objgraph.get_edges"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"object | Any (unannotated)\")",
"offset": 0,
"src": "yield s.__self__, se",
"target": "mypy.server.objgraph.get_edges"
}
],
"mypy/server/update.py": [
{
"code": "any",
"column": 53,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 252,
"src": "\"previous targets with errors: %s\" % sorted(self.previous_targets_with_errors)",
"target": "mypy.server.update.FineGrainedBuildManager.update"
}
],
"mypy/solve.py": [
{
"code": "possibly-undefined",
"column": 23,
"message": "Name \"solvable_tv\" may be undefined",
"offset": 216,
"src": "s_batch.remove(solvable_tv)",
"target": "mypy.solve"
},
{
"code": "truthy-iterable",
"column": 26,
"message": "\"lowers\" has type \"Iterable[Type]\" which can always be true in boolean context. Consider using \"Collection[Type]\" instead.",
"offset": 49,
"src": "if not uppers and not lowers:",
"target": "mypy.solve.solve_one"
},
{
"code": "truthy-iterable",
"column": 26,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-truthy-iterable for more info",
"offset": 0,
"src": "if not uppers and not lowers:",
"target": null
}
],
"mypy/split_namespace.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 22,
"src": "def _get(self) -> tuple[Any, Any]:",
"target": "mypy.split_namespace.SplitNamespace._get"
},
{
"code": "explicit-any",
"column": 4,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-explicit-any for more info",
"offset": 0,
"src": "def _get(self) -> tuple[Any, Any]:",
"target": null
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"(Any, Any)\")",
"offset": 1,
"src": "return (self._standard_namespace, self._alt_namespace)",
"target": "mypy.split_namespace.SplitNamespace._get"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return (self._standard_namespace, self._alt_namespace)",
"target": "mypy.split_namespace.SplitNamespace._get"
},
{
"code": "any",
"column": 16,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-any for more info",
"offset": 0,
"src": "return (self._standard_namespace, self._alt_namespace)",
"target": null
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return (self._standard_namespace, self._alt_namespace)",
"target": "mypy.split_namespace.SplitNamespace._get"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def __setattr__(self, name: str, value: Any) -> None:",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if name.startswith(self._alt_prefix):",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "setattr(self._alt_namespace, name[len(self._alt_prefix) :], value)",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "setattr(self._alt_namespace, name[len(self._alt_prefix) :], value)",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "any",
"column": 72,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "setattr(self._alt_namespace, name[len(self._alt_prefix) :], value)",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "setattr(self._standard_namespace, name, value)",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "setattr(self._standard_namespace, name, value)",
"target": "mypy.split_namespace.SplitNamespace.__setattr__"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def __getattr__(self, name: str) -> Any:",
"target": "mypy.split_namespace.SplitNamespace.__getattr__"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if name.startswith(self._alt_prefix):",
"target": "mypy.split_namespace.SplitNamespace.__getattr__"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return getattr(self._alt_namespace, name[len(self._alt_prefix) :])",
"target": "mypy.split_namespace.SplitNamespace.__getattr__"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return getattr(self._alt_namespace, name[len(self._alt_prefix) :])",
"target": "mypy.split_namespace.SplitNamespace.__getattr__"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "return getattr(self._standard_namespace, name)",
"target": "mypy.split_namespace.SplitNamespace.__getattr__"
}
],
"mypy/stats.py": [
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"expr\" has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 249,
"src": "if o.expr:",
"target": "mypy.stats.StatisticsVisitor.visit_yield_from_expr"
}
],
"mypy/strconv.py": [
{
"code": "helpful-string",
"column": 22,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 53,
"src": "return f\"<{self.get_id(o)}>\"",
"target": "mypy.strconv.StrConv.format_id"
},
{
"code": "helpful-string",
"column": 22,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 14,
"src": "tag += f\"<{self.get_id(obj)}>\"",
"target": "mypy.strconv.StrConv.dump"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 22,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 3,
"src": "a.append(self.type_param(p))",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a.append(self.type_param(p))",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Args\", args))",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(o.type)",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(\"Generator\")",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.extend(extra)",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append(o.body)",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return a",
"target": "mypy.strconv.StrConv.func_helper"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "a: list[Any] = [o.defs]",
"target": "mypy.strconv.StrConv.visit_mypy_file"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.insert(0, \"BOM\")",
"target": "mypy.strconv.StrConv.visit_mypy_file"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 7,
"src": "a.insert(0, o.path.replace(os.getcwd() + os.sep, \"\").replace(os.sep, \"/\"))",
"target": "mypy.strconv.StrConv.visit_mypy_file"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(\"IgnoredLines(%s)\" % \", \".join(str(line) for line in sorted(o.ignored_lines)))",
"target": "mypy.strconv.StrConv.visit_mypy_file"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_mypy_file"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 42,
"src": "a: Any = o.items.copy()",
"target": "mypy.strconv.StrConv.visit_overloaded_func_def"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "a.insert(0, o.type)",
"target": "mypy.strconv.StrConv.visit_overloaded_func_def"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "a.insert(0, o.impl)",
"target": "mypy.strconv.StrConv.visit_overloaded_func_def"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "a.insert(-1, \"Static\")",
"target": "mypy.strconv.StrConv.visit_overloaded_func_def"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "a.insert(-1, \"Class\")",
"target": "mypy.strconv.StrConv.visit_overloaded_func_def"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_overloaded_func_def"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 26,
"src": "a.insert(1, self.type_param(p))",
"target": "mypy.strconv.StrConv.visit_class_def"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 29,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_assignment_stmt"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 5,
"src": "a.append(o.rvalue)",
"target": "mypy.strconv.StrConv.visit_assignment_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(o.type)",
"target": "mypy.strconv.StrConv.visit_assignment_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_assignment_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "a: list[Any] = [o.expr, o.body]",
"target": "mypy.strconv.StrConv.visit_while_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Else\", o.else_body.body))",
"target": "mypy.strconv.StrConv.visit_while_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_while_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Async\", \"\"))",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append(o.index)",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(o.index_type)",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.extend([o.expr, o.body])",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a.extend([o.expr, o.body])",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Else\", o.else_body.body))",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_for_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_if_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"If\", [o.expr[i]]))",
"target": "mypy.strconv.StrConv.visit_if_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append((\"Then\", o.body[i].body))",
"target": "mypy.strconv.StrConv.visit_if_stmt"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 3,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_if_stmt"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "return self.dump([a, (\"Else\", o.else_body.body)], o)",
"target": "mypy.strconv.StrConv.visit_if_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 27,
"src": "a: list[Any] = [o.body]",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(\"*\")",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 3,
"src": "a.append(o.types[i])",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(o.vars[i])",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append(o.handlers[i])",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 3,
"src": "a.append((\"Else\", o.else_body.body))",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Finally\", o.finally_body.body))",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_try_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Async\", \"\"))",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Expr\", [o.expr[i]]))",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Target\", [o.target[i]]))",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(o.unanalyzed_type)",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a + [o.body], o)",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "return self.dump(a + [o.body], o)",
"target": "mypy.strconv.StrConv.visit_with_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "a: list[Any] = [o.subject]",
"target": "mypy.strconv.StrConv.visit_match_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Pattern\", [o.patterns[i]]))",
"target": "mypy.strconv.StrConv.visit_match_stmt"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Guard\", [o.guards[i]]))",
"target": "mypy.strconv.StrConv.visit_match_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append((\"Body\", o.bodies[i].body))",
"target": "mypy.strconv.StrConv.visit_match_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_match_stmt"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "a: list[Any] = [o.name]",
"target": "mypy.strconv.StrConv.visit_type_alias_stmt"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(self.type_param(p))",
"target": "mypy.strconv.StrConv.visit_type_alias_stmt"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a.append(self.type_param(p))",
"target": "mypy.strconv.StrConv.visit_type_alias_stmt"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append(o.value)",
"target": "mypy.strconv.StrConv.visit_type_alias_stmt"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_type_alias_stmt"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def type_param(self, p: mypy.nodes.TypeParam) -> list[Any]:",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 7,
"src": "a.append(prefix + p.name)",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append(p.upper_bound)",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Values\", p.values))",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Default\", [p.default]))",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return [(\"TypeParam\", a)]",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "return [(\"TypeParam\", a)]",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "return [(\"TypeParam\", a)]",
"target": "mypy.strconv.StrConv.type_param"
},
{
"code": "helpful-string",
"column": 27,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 36,
"src": "pretty += f\" = {o.node.final_value}\"",
"target": "mypy.strconv.StrConv.visit_name_expr"
},
{
"code": "helpful-string",
"column": 21,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 22,
"src": "n += f\" [{fullname}{id}]\"",
"target": "mypy.strconv.StrConv.pretty_name"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"expr\" has type \"Expression\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 19,
"src": "if o.expr:",
"target": "mypy.strconv.StrConv.visit_yield_from_expr"
},
{
"code": "truthy-bool",
"column": 11,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-truthy-bool for more info",
"offset": 0,
"src": "if o.expr:",
"target": null
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 9,
"src": "extra: list[str | tuple[str, list[Any]]] = []",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"list[str | (str, list[Any])]\")",
"offset": 5,
"src": "extra.append(\"VarArg\")",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[str | (str, list[Any])]\")",
"offset": 2,
"src": "extra.append((\"KwArgs\", [o.arg_names[i], o.args[i]]))",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "extra.append((\"KwArgs\", [o.arg_names[i], o.args[i]]))",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "extra.append((\"KwArgs\", [o.arg_names[i], o.args[i]]))",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[str | (str, list[Any])]\")",
"offset": 2,
"src": "extra.append((\"DictVarArg\", [o.args[i]]))",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "extra.append((\"DictVarArg\", [o.args[i]]))",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 44,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "extra.append((\"DictVarArg\", [o.args[i]]))",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "a: list[Any] = [o.callee, (\"Args\", args)]",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a + extra, o)",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[str | (str, list[Any])]\")",
"offset": 0,
"src": "return self.dump(a + extra, o)",
"target": "mypy.strconv.StrConv.visit_call_expr"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 55,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [\"Variance(COVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [\"Variance(COVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [\"Variance(CONTRAVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [\"Variance(CONTRAVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [(\"Values\", o.values)]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [(\"Values\", o.values)]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [f\"UpperBound({self.stringify_type(o.upper_bound)})\"]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [f\"UpperBound({self.stringify_type(o.upper_bound)})\"]",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_type_var_expr"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [\"Variance(COVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [\"Variance(COVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [\"Variance(CONTRAVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [\"Variance(CONTRAVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [f\"UpperBound({self.stringify_type(o.upper_bound)})\"]",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [f\"UpperBound({self.stringify_type(o.upper_bound)})\"]",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_paramspec_expr"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [\"Variance(COVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [\"Variance(COVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [\"Variance(CONTRAVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [\"Variance(CONTRAVARIANT)\"]",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a += [f\"UpperBound({self.stringify_type(o.upper_bound)})\"]",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "a += [f\"UpperBound({self.stringify_type(o.upper_bound)})\"]",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_type_var_tuple_expr"
},
{
"code": "helpful-string",
"column": 56,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 6,
"src": "return f\"NamedTupleExpr:{o.line}({o.info.name}, {self.stringify_type(o.info.tuple_type) if o.info.tuple_type is not None else None})\"",
"target": "mypy.strconv.StrConv.visit_namedtuple_expr"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 36,
"src": "a: list[Any] = [o.begin_index, o.end_index, o.stride]",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "if not a[0]:",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not a[0]:",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a[0] = \"\"",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "if not a[1]:",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not a[1]:",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a[1] = \"\"",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_slice_expr"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 24,
"src": "a: list[Any] = []",
"target": "mypy.strconv.StrConv.visit_mapping_pattern"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Key\", [o.keys[i]]))",
"target": "mypy.strconv.StrConv.visit_mapping_pattern"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "a.append((\"Value\", [o.values[i]]))",
"target": "mypy.strconv.StrConv.visit_mapping_pattern"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Rest\", [o.rest]))",
"target": "mypy.strconv.StrConv.visit_mapping_pattern"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_mapping_pattern"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "a: list[Any] = [o.class_ref]",
"target": "mypy.strconv.StrConv.visit_class_pattern"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Positionals\", o.positionals))",
"target": "mypy.strconv.StrConv.visit_class_pattern"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "a.append((\"Keyword\", [o.keyword_keys[i], o.keyword_values[i]]))",
"target": "mypy.strconv.StrConv.visit_class_pattern"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 2,
"src": "return self.dump(a, o)",
"target": "mypy.strconv.StrConv.visit_class_pattern"
}
],
"mypy/stubdoc.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 65,
"src": "def __eq__(self, other: Any) -> bool:",
"target": "mypy.stubdoc.ArgSig.__eq__"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(other, ArgSig):",
"target": "mypy.stubdoc.ArgSig.__eq__"
}
],
"mypy/stubgen.py": [
{
"code": "helpful-string",
"column": 30,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 297,
"src": "args.append(f\"{name}={arg.accept(self)}\")",
"target": "mypy.stubgen.AliasPrinter.visit_call_expr"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1639,
"src": "default=[],",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 9,
"src": "default=[],",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 18,
"src": "if ns.modules + ns.packages and ns.files:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if ns.modules + ns.packages and ns.files:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if ns.modules + ns.packages and ns.files:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if ns.quiet and ns.verbose:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if ns.quiet and ns.verbose:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if ns.inspect and ns.parse_only:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if ns.inspect and ns.parse_only:",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "os.makedirs(ns.output_dir, exist_ok=True)",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "no_import=ns.no_import,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "inspect=ns.inspect,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "doc_dir=ns.doc_dir,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "search_path=ns.search_path.split(\":\"),",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "ignore_errors=ns.ignore_errors,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "parse_only=ns.parse_only,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "include_private=ns.include_private,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "output_dir=ns.output_dir,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "modules=ns.modules,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "packages=ns.packages,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "files=ns.files,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "verbose=ns.verbose,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "quiet=ns.quiet,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "export_less=ns.export_less,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "include_docstrings=ns.include_docstrings,",
"target": "mypy.stubgen.parse_options"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "legacy=ns.legacy,",
"target": "mypy.stubgen.parse_options"
}
],
"mypy/stubgenc.py": [
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 272,
"src": "argspec = inspect.getfullargspec(func)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec | None\")",
"offset": 4,
"src": "if argspec is None:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 17,
"src": "args = argspec.args",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 1,
"src": "defaults = argspec.defaults",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...] | None\")",
"offset": 0,
"src": "defaults = argspec.defaults",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 1,
"src": "varargs = argspec.varargs",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 1,
"src": "kwargs = argspec.varkw",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 1,
"src": "annotations = argspec.annotations",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "annotations = argspec.annotations",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 1,
"src": "kwonlyargs = argspec.kwonlyargs",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"FullArgSpec\")",
"offset": 1,
"src": "kwonlydefaults = argspec.kwonlydefaults",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 0,
"src": "kwonlydefaults = argspec.kwonlydefaults",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 3,
"src": "if key not in annotations:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "argtype = annotations[key]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "argtype = annotations[key]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if argtype is None:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if not isinstance(argtype, str):",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return self.get_type_fullname(argtype)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 13,
"src": "if arg in annotations:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "argtype = annotations[arg]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "argtype = annotations[arg]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if argtype == \"None\":",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "arglist.append(ArgSig(arg, argtype, default=True))",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 4,
"src": "def get_pos_default(i: int, _arg: str) -> Any | None:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...] | None\")",
"offset": 1,
"src": "if defaults and i >= len(args) - len(defaults):",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...] | None | bool\")",
"offset": 0,
"src": "if defaults and i >= len(args) - len(defaults):",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "if defaults and i >= len(args) - len(defaults):",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "return defaults[i - (len(args) - len(defaults))]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return defaults[i - (len(args) - len(defaults))]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 53,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "return defaults[i - (len(args) - len(defaults))]",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"def (i: int, _arg: str) -> Any | None\")",
"offset": 4,
"src": "add_args(args, get_pos_default)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 9,
"src": "def get_kw_default(_i: int, arg: str) -> Any | None:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 1,
"src": "if kwonlydefaults:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "return kwonlydefaults.get(arg)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "return kwonlydefaults.get(arg)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"def (_i: int, arg: str) -> Any | None\")",
"offset": 4,
"src": "add_args(kwonlyargs, get_kw_default)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_default_function_sig"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | str | None\")",
"offset": 45,
"src": "return getattr(obj, \"__module__\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_obj_module"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 8,
"src": "all_items = self.get_members(self.module)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 2,
"src": "all_items = sorted(all_items, key=lambda x: x[0])",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 46,
"message": "Expression type contains \"Any\" (has type \"def (x: (str, Any)) -> str\")",
"offset": 0,
"src": "all_items = sorted(all_items, key=lambda x: x[0])",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 56,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "all_items = sorted(all_items, key=lambda x: x[0])",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 2,
"src": "for name, obj in all_items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for name, obj in all_items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "for name, obj in all_items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if inspect.ismodule(obj) and obj.__name__ in self.known_modules:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 12,
"src": "elif self.is_defined_in_module(obj) and not inspect.ismodule(obj):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 73,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "elif self.is_defined_in_module(obj) and not inspect.ismodule(obj):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 2,
"src": "items.append((name, obj))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "items.append((name, obj))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "items.append((name, obj))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "obj_module_name = self.get_obj_module(obj)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 6,
"src": "self.set_defined_names({name for name, obj in all_items if not inspect.ismodule(obj)})",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.set_defined_names({name for name, obj in all_items if not inspect.ismodule(obj)})",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 54,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "self.set_defined_names({name for name, obj in all_items if not inspect.ismodule(obj)})",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 88,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "self.set_defined_names({name for name, obj in all_items if not inspect.ismodule(obj)})",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 10,
"src": "for name, obj in items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for name, obj in items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "for name, obj in items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if self.is_function(obj):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.generate_function_stub(name, obj, output=functions)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif inspect.isclass(obj):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 47,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 1,
"src": "self.generate_class_stub(name, obj, output=types)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "self.generate_variable_stub(name, obj, output=variables)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_module"
},
{
"code": "possibly-undefined",
"column": 37,
"message": "Name \"output\" may be undefined",
"offset": 16,
"src": "for i, line in enumerate(output):",
"target": "mypy.stubgenc"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 39,
"src": "def get_members(self, obj: object) -> list[tuple[str, Any]]:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "obj_dict: Mapping[str, Any] = getattr(obj, \"__dict__\")",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 2,
"src": "for name in obj_dict:",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "value = getattr(obj, name)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 4,
"src": "results.append((name, value))",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "results.append((name, value))",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "results.append((name, value))",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 1,
"src": "return results",
"target": "mypy.stubgenc.InspectionStubGenerator.get_members"
},
{
"code": "any",
"column": 50,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 10,
"src": "return f\"type[{self.get_type_fullname(obj)}]\"",
"target": "mypy.stubgenc.InspectionStubGenerator.get_type_annotation"
},
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 38,
"src": "raw_lookup: Mapping[str, Any] = getattr(class_info.cls, \"__dict__\")",
"target": "mypy.stubgenc.InspectionStubGenerator.is_staticmethod"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 1,
"src": "raw_value = raw_lookup.get(name, obj)",
"target": "mypy.stubgenc.InspectionStubGenerator.is_staticmethod"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "raw_value = raw_lookup.get(name, obj)",
"target": "mypy.stubgenc.InspectionStubGenerator.is_staticmethod"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return isinstance(raw_value, staticmethod)",
"target": "mypy.stubgenc.InspectionStubGenerator.is_staticmethod"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "return isinstance(inspect.getattr_static(class_info.cls, name), staticmethod)",
"target": "mypy.stubgenc.InspectionStubGenerator.is_staticmethod"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 4,
"src": "return getattr(obj, \"__abstractmethod__\", False)",
"target": "mypy.stubgenc.InspectionStubGenerator.is_abstract_method"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 7,
"src": "def is_property_readonly(prop: Any) -> bool:",
"target": "mypy.stubgenc.InspectionStubGenerator.is_property_readonly"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"(prop: Any) -> bool\")",
"offset": 0,
"src": "def is_property_readonly(prop: Any) -> bool:",
"target": "mypy.stubgenc"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return hasattr(prop, \"fset\") and prop.fset is None",
"target": "mypy.stubgenc.InspectionStubGenerator.is_property_readonly"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return hasattr(prop, \"fset\") and prop.fset is None",
"target": "mypy.stubgenc.InspectionStubGenerator.is_property_readonly"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 28,
"src": "docstring: Any = getattr(obj, \"__doc__\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "docstring: Any = getattr(obj, \"__doc__\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not isinstance(docstring, str):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "docstring=docstring,",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 30,
"src": "if docstring:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "docstring = self._indent_docstring(docstring)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 86,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "output.extend(self.format_func_def(inferred, decorators=decorators, docstring=docstring))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_function_stub"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 63,
"src": "docstring = getattr(raw_obj, \"__doc__\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "fget = getattr(raw_obj, \"fget\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if fget:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "alt_docstr = getattr(fget, \"__doc__\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "alt_docstr = getattr(fget, \"__doc__\", None)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if alt_docstr and docstring:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "if alt_docstr and docstring:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "docstring += \"\\n\" + alt_docstr",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "docstring += \"\\n\" + alt_docstr",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "docstring += \"\\n\" + alt_docstr",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "elif alt_docstr:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "docstring = alt_docstr",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 46,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 3,
"src": "self.module_name, name, docstring=docstring, is_abstract=False, class_info=class_info",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_property_stub"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 44,
"src": "typename = getattr(typ, \"__qualname__\", typ.__name__)",
"target": "mypy.stubgenc.InspectionStubGenerator.get_type_fullname"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 4,
"src": "typename = f\"{module_name}.{typename}\"",
"target": "mypy.stubgenc.InspectionStubGenerator.get_type_fullname"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 1,
"src": "return typename",
"target": "mypy.stubgenc.InspectionStubGenerator.get_type_fullname"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 28,
"src": "raw_lookup: Mapping[str, Any] = getattr(cls, \"__dict__\")",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 1,
"src": "items = self.get_members(cls)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 2,
"src": "items = sorted(items, key=lambda x: method_name_sort_key(x[0]))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"def (x: (str, Any)) -> (int, str)\")",
"offset": 0,
"src": "items = sorted(items, key=lambda x: method_name_sort_key(x[0]))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 69,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "items = sorted(items, key=lambda x: method_name_sort_key(x[0]))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 1,
"src": "names = {x[0] for x in items}",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "names = {x[0] for x in items}",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "names = {x[0] for x in items}",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "attrs: list[tuple[str, Any]] = []",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"Any | str | None\")",
"offset": 6,
"src": "class_name, \"\", getattr(cls, \"__doc__\", None), cls, parent=parent_class",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 3,
"src": "for attr, value in items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for attr, value in items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "for attr, value in items:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Mapping[str, Any]\")",
"offset": 2,
"src": "raw_value = raw_lookup.get(attr, value)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "raw_value = raw_lookup.get(attr, value)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "raw_value = raw_lookup.get(attr, value)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if self.is_method(class_info, attr, value) or self.is_classmethod(",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "class_info, attr, value",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "if self.is_staticmethod(class_info, attr, value):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 59,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif self.is_classmethod(class_info, attr, value):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "self.generate_function_stub(attr, value, output=methods, class_info=class_info)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif self.is_property(class_info, attr, raw_value):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "raw_value,",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "value,",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "elif inspect.isclass(value) and self.is_defined_in_module(value):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 70,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "elif inspect.isclass(value) and self.is_defined_in_module(value):",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 47,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 1,
"src": "self.generate_class_stub(attr, value, types, parent_class=class_info)",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 2,
"src": "attrs.append((attr, value))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 0,
"src": "attrs.append((attr, value))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "attrs.append((attr, value))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 2,
"src": "for attr, value in attrs:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for attr, value in attrs:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "for attr, value in attrs:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if attr == \"__hash__\" and value is None:",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
},
{
"code": "any",
"column": 75,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "prop_type_name = self.strip_or_import(self.get_type_annotation(value))",
"target": "mypy.stubgenc.InspectionStubGenerator.generate_class_stub"
}
],
"mypy/stubtest.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 74,
"src": "def _style(message: str, **kwargs: Any) -> str:",
"target": "mypy.stubtest._style"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "kwargs.setdefault(\"color\", \"none\")",
"target": "mypy.stubtest._style"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "return _formatter.style(message, **kwargs)",
"target": "mypy.stubtest._style"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 14,
"src": "def __init__(",
"target": "mypy.stubtest.Error.__init__"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 25,
"src": "self.runtime_object = runtime_object",
"target": "mypy.stubtest.Error.__init__"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 4,
"src": "runtime_sig = safe_inspect_signature(runtime_object)",
"target": "mypy.stubtest.Error.__init__"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 2,
"src": "self.runtime_desc = _truncate(repr(runtime_object), 100)",
"target": "mypy.stubtest.Error.__init__"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 2,
"src": "runtime_is_async = inspect.iscoroutinefunction(runtime_object)",
"target": "mypy.stubtest.Error.__init__"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 40,
"src": "if not isinstance(self.runtime_object, Missing):",
"target": "mypy.stubtest.Error.get_description"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "runtime_line = inspect.getsourcelines(self.runtime_object)[1]",
"target": "mypy.stubtest.Error.get_description"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "runtime_file = inspect.getsourcefile(self.runtime_object)",
"target": "mypy.stubtest.Error.get_description"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 81,
"src": "bottom_module = bottom_frame.f_globals.get(\"__name__\", \"\")",
"target": "mypy.stubtest.test_module"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "bottom_module = bottom_frame.f_globals.get(\"__name__\", \"\")",
"target": "mypy.stubtest.test_module"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if bottom_module == \"__main__\" or bottom_module.split(\".\")[0] == \"mypy\":",
"target": "mypy.stubtest.test_module"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if bottom_module == \"__main__\" or bottom_module.split(\".\")[0] == \"mypy\":",
"target": "mypy.stubtest.test_module"
},
{
"code": "helpful-string",
"column": 68,
"message": "The type \"\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 4,
"src": "f\"encountered unexpected error, {type(e).__name__}: {e}\",",
"target": "mypy.stubtest.test_module"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def [_T] (func: (...) -> _T) -> _SingleDispatchCallable[_T]\")",
"offset": 13,
"src": "@singledispatch",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@singledispatch",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify(",
"target": "mypy.stubtest.verify"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 0,
"src": "def verify(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 62,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 11,
"src": "yield Error(object_path, \"is an unknown mypy node\", stub, runtime)",
"target": "mypy.stubtest.verify"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 50,
"src": "@verify.register(nodes.MypyFile)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[MypyFile, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.MypyFile)",
"target": "mypy.stubtest"
},
{
"code": "redundant-expr",
"column": 7,
"message": "Condition is always false",
"offset": 7,
"src": "if not isinstance(runtime, types.ModuleType):",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 1,
"src": "yield Error(object_path, \"is not a module\", stub, runtime)",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "runtime_all_as_set = set(runtime.__all__)",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 19,
"src": "obj = getattr(r, attr)",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(obj, types.ModuleType):",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 22,
"src": "obj_mod = obj.__module__",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if isinstance(obj_mod, str):",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 28,
"src": "runtime_entry = getattr(runtime, entry, MISSING)",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 5,
"src": "yield from verify(stub_entry, runtime_entry, object_path + [entry])",
"target": "mypy.stubtest.verify_mypyfile"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def _verify_final(",
"target": "mypy.stubtest._verify_final"
},
{
"code": "any",
"column": 48,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 10,
"src": "if not stub.is_final and not issubclass(runtime, enum.Enum):",
"target": "mypy.stubtest._verify_final"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 5,
"src": "runtime,",
"target": "mypy.stubtest._verify_final"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 10,
"src": "runtime_final = getattr(runtime, \"__final__\", False)",
"target": "mypy.stubtest._verify_final"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "runtime_final = getattr(runtime, \"__final__\", False)",
"target": "mypy.stubtest._verify_final"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 4,
"src": "if runtime_final and not stub.is_final:",
"target": "mypy.stubtest._verify_final"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 5,
"src": "runtime,",
"target": "mypy.stubtest._verify_final"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "def _verify_metaclass(",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"type[type[Any]]\")",
"offset": 7,
"src": "runtime_metaclass = type(runtime)",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "runtime_metaclass = type(runtime)",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"type[type[Any]]\")",
"offset": 1,
"src": "if runtime_metaclass is not type and stub.metaclass_type is None:",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 6,
"src": "runtime,",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "helpful-string",
"column": 29,
"message": "The type \"type[type[Any]]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 2,
"src": "runtime_desc=f\"{runtime_metaclass}\",",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"type[type[Any]]\")",
"offset": 0,
"src": "runtime_desc=f\"{runtime_metaclass}\",",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"type[type[Any]]\")",
"offset": 3,
"src": "runtime_metaclass is type",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 13,
"src": "runtime,",
"target": "mypy.stubtest._verify_metaclass"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 6,
"src": "@verify.register(nodes.TypeInfo)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[TypeInfo, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.TypeInfo)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: TypeInfo, runtime: type[Any] | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.TypeInfo)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_typeinfo(",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: TypeInfo, runtime: type[Any] | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_typeinfo(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"type[Any] | Missing\")",
"offset": 6,
"src": "if not isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 5,
"src": "runtime,",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"type[Any] | Missing\")",
"offset": 5,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "redundant-expr",
"column": 7,
"message": "Condition is always false",
"offset": 3,
"src": "if not isinstance(runtime, type):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "if not isinstance(runtime, type):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "unreachable",
"column": 8,
"message": "Statement is unreachable",
"offset": 1,
"src": "yield Error(object_path, \"is not a type\", stub, runtime, stub_desc=repr(stub))",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 3,
"src": "yield from _verify_final(stub, runtime, object_path)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 76,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 1,
"src": "is_runtime_typeddict = stub.typeddict_type is not None and is_typeddict(runtime)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 14,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 2,
"src": "stub, runtime, object_path, is_runtime_typeddict=is_runtime_typeddict",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "to_check.update(",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "m for m in vars(runtime) if not is_probably_private(m) and m not in IGNORABLE_CLASS_DUNDERS",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "m for m in vars(runtime) if not is_probably_private(m) and m not in IGNORABLE_CLASS_DUNDERS",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "m for m in vars(runtime) if not is_probably_private(m) and m not in IGNORABLE_CLASS_DUNDERS",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "m for m in vars(runtime) if not is_probably_private(m) and m not in IGNORABLE_CLASS_DUNDERS",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 67,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "m for m in vars(runtime) if not is_probably_private(m) and m not in IGNORABLE_CLASS_DUNDERS",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 21,
"src": "runtime_attr = getattr(runtime, mangled_entry)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "runtime_attr = getattr(runtime, mangled_entry)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "runtime_attr = inspect.getattr_static(runtime, mangled_entry, MISSING)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 54,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "runtime_attr = inspect.getattr_static(runtime, mangled_entry, MISSING)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "if runtime_attr is not MISSING and type(runtime) is not runtime:",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"type[type[Any]]\")",
"offset": 0,
"src": "if runtime_attr is not MISSING and type(runtime) is not runtime:",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 48,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "if runtime_attr is not MISSING and type(runtime) is not runtime:",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 64,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "if runtime_attr is not MISSING and type(runtime) is not runtime:",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "if getattr(runtime_attr, \"__objclass__\", None) is type(runtime):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if getattr(runtime_attr, \"__objclass__\", None) is type(runtime):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 62,
"message": "Expression type contains \"Any\" (has type \"type[type[Any]]\")",
"offset": 0,
"src": "if getattr(runtime_attr, \"__objclass__\", None) is type(runtime):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "if getattr(runtime_attr, \"__objclass__\", None) is type(runtime):",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "and isinstance(runtime_attr, types.WrapperDescriptorType)",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "yield from verify(stub_to_verify, runtime_attr, object_path + [entry])",
"target": "mypy.stubtest.verify_typeinfo"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def _static_lookup_runtime(object_path: list[str]) -> MaybeMissing[Any]:",
"target": "mypy.stubtest._static_lookup_runtime"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 13,
"src": "def _verify_static_class_methods(",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "if inspect.isbuiltin(runtime):",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"BuiltinFunctionType[[*Untyped, **Untyped], Untyped]\")",
"offset": 3,
"src": "probably_class_method = isinstance(getattr(runtime, \"__self__\", None), type)",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 7,
"src": "if static_runtime is MISSING:",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "if isinstance(static_runtime, classmethod) and not stub.is_class:",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 2,
"src": "if not isinstance(static_runtime, classmethod) and stub.is_class:",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 2,
"src": "if isinstance(static_runtime, staticmethod) and not stub.is_static:",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 2,
"src": "if not isinstance(static_runtime, staticmethod) and stub.is_static:",
"target": "mypy.stubtest._verify_static_class_methods"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 45,
"src": "if runtime_arg.default is not inspect.Parameter.empty:",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "runtime_type = get_mypy_type_of_runtime_value(runtime_arg.default)",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 12,
"src": "and type(runtime_arg.default) is not object",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "and type(runtime_arg.default) is not object",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "and runtime_arg.default is not ...",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 13,
"src": "and runtime_arg.default is not UNREPRESENTABLE",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 5,
"src": "if type(stub_default) is not type(runtime_arg.default):",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if type(stub_default) is not type(runtime_arg.default):",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "defaults_match = bool(stub_default == runtime_arg.default)",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 66,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "defaults_match = bool(stub_default == runtime_arg.default)",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "f\"has a default value of {runtime_arg.default!r}, \"",
"target": "mypy.stubtest._verify_arg_default_value"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 28,
"src": "def get_name(arg: Any) -> str:",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(arg, inspect.Parameter):",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if isinstance(arg, nodes.Argument):",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 4,
"src": "def get_type(arg: Any) -> str | None:",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(arg, inspect.Parameter):",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if isinstance(arg, nodes.Argument):",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 4,
"src": "def has_default(arg: Any) -> bool:",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(arg, inspect.Parameter):",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return arg.default is not inspect.Parameter.empty",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(arg, nodes.Argument):",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 4,
"src": "def get_desc(arg: Any) -> str:",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_type = get_type(arg)",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "get_name(arg)",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "+ (\" = ...\" if has_default(arg) else \"\")",
"target": "mypy.stubtest.Signature.__str__"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 246,
"src": "and arg.default is not inspect.Parameter.empty",
"target": "mypy.stubtest._is_private_parameter"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 4,
"src": "@verify.register(nodes.FuncItem)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[FuncItem, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.FuncItem)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: FuncItem, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.FuncItem)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_funcitem(",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: FuncItem, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_funcitem(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if not is_probably_a_function(runtime):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is not a function\", stub, runtime)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not callable(runtime):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 4,
"src": "static_runtime = _static_lookup_runtime(object_path)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "for error_text in _verify_abstract_status(stub, runtime):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, error_text, stub, runtime)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "for error_text in _verify_final_method(stub, runtime, static_runtime):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 62,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 0,
"src": "for error_text in _verify_final_method(stub, runtime, static_runtime):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, error_text, stub, runtime)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "for message in _verify_static_class_methods(stub, runtime, static_runtime, object_path):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 0,
"src": "for message in _verify_static_class_methods(stub, runtime, static_runtime, object_path):",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 70,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is inconsistent, \" + message, stub, runtime)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "signature = safe_inspect_signature(runtime)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "runtime_is_coroutine = inspect.iscoroutinefunction(runtime)",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 18,
"src": "runtime,",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "possibly-undefined",
"column": 37,
"message": "Name \"stub_sig\" may be undefined",
"offset": 8,
"src": "for message in _verify_signature(stub_sig, runtime_sig, function_name=stub.name):",
"target": "mypy.stubtest"
},
{
"code": "possibly-undefined",
"column": 47,
"message": "Name \"runtime_sig\" may be undefined",
"offset": 0,
"src": "for message in _verify_signature(stub_sig, runtime_sig, function_name=stub.name):",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "runtime,",
"target": "mypy.stubtest.verify_funcitem"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 5,
"src": "@verify.register(Missing)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[Missing, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(Missing)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(Missing)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_none(",
"target": "mypy.stubtest.verify_none"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_none(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 61,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "yield Error(object_path, \"is not present in stub\", stub, runtime)",
"target": "mypy.stubtest.verify_none"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 3,
"src": "@verify.register(nodes.Var)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[Var, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.Var)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: Var, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.Var)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_var(",
"target": "mypy.stubtest.verify_var"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: Var, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_var(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "and is_read_only_property(runtime)",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 86,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "yield Error(object_path, \"is read-only at runtime but not in the stub\", stub, runtime)",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "runtime_type = get_mypy_type_of_runtime_value(runtime)",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "if isinstance(runtime, enum.Enum):",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "runtime_type = get_mypy_type_of_runtime_value(runtime.value)",
"target": "mypy.stubtest.verify_var"
},
{
"code": "helpful-string",
"column": 66,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 13,
"src": "object_path, f\"variable differs from runtime type {runtime_type}\", stub, runtime",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 89,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "object_path, f\"variable differs from runtime type {runtime_type}\", stub, runtime",
"target": "mypy.stubtest.verify_var"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 4,
"src": "@verify.register(nodes.OverloadedFuncDef)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[OverloadedFuncDef, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.OverloadedFuncDef)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: OverloadedFuncDef, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.OverloadedFuncDef)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_overloadedfuncdef(",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: OverloadedFuncDef, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_overloadedfuncdef(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 4,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "if is_read_only_property(runtime):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 90,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is read-only at runtime but not in the stub\", stub, runtime)",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if not is_probably_a_function(runtime):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is not a function\", stub, runtime)",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if not callable(runtime):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "for msg in _verify_abstract_status(first_part.func, runtime):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, msg, stub, runtime)",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "static_runtime = _static_lookup_runtime(object_path)",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "for message in _verify_static_class_methods(stub, runtime, static_runtime, object_path):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 0,
"src": "for message in _verify_static_class_methods(stub, runtime, static_runtime, object_path):",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 70,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is inconsistent, \" + message, stub, runtime)",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "signature = safe_inspect_signature(runtime)",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 18,
"src": "runtime,",
"target": "mypy.stubtest.verify_overloadedfuncdef"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 6,
"src": "@verify.register(nodes.TypeVarExpr)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[TypeVarExpr, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.TypeVarExpr)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: TypeVarExpr, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.TypeVarExpr)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_typevarexpr(",
"target": "mypy.stubtest.verify_typevarexpr"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: TypeVarExpr, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_typevarexpr(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_typevarexpr"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "if not isinstance(runtime, TypeVar):",
"target": "mypy.stubtest.verify_typevarexpr"
},
{
"code": "any",
"column": 59,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is not a TypeVar\", stub, runtime)",
"target": "mypy.stubtest.verify_typevarexpr"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 4,
"src": "@verify.register(nodes.ParamSpecExpr)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[ParamSpecExpr, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.ParamSpecExpr)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: ParamSpecExpr, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.ParamSpecExpr)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_paramspecexpr(",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: ParamSpecExpr, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_paramspecexpr(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 3,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"(Any | None, Any | None)\")",
"offset": 3,
"src": "maybe_paramspec_types = (",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "getattr(typing, \"ParamSpec\", None),",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 1,
"src": "getattr(typing_extensions, \"ParamSpec\", None),",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 2,
"src": "paramspec_types = tuple(t for t in maybe_paramspec_types if t is not None)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "paramspec_types = tuple(t for t in maybe_paramspec_types if t is not None)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"Generator[Any, None, None]\")",
"offset": 0,
"src": "paramspec_types = tuple(t for t in maybe_paramspec_types if t is not None)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "paramspec_types = tuple(t for t in maybe_paramspec_types if t is not None)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"(Any | None, Any | None)\")",
"offset": 0,
"src": "paramspec_types = tuple(t for t in maybe_paramspec_types if t is not None)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 64,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "paramspec_types = tuple(t for t in maybe_paramspec_types if t is not None)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "if not paramspec_types or not isinstance(runtime, paramspec_types):",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if not paramspec_types or not isinstance(runtime, paramspec_types):",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 54,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "if not paramspec_types or not isinstance(runtime, paramspec_types):",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "any",
"column": 61,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, \"is not a ParamSpec\", stub, runtime)",
"target": "mypy.stubtest.verify_paramspecexpr"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 4,
"src": "def _verify_readonly_property(stub: nodes.Decorator, runtime: Any) -> Iterator[str]:",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if isinstance(runtime, property):",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"(Any) -> Any | None\")",
"offset": 1,
"src": "yield from _verify_final_method(stub.func, runtime.fget, MISSING)",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if isinstance(runtime, functools.cached_property):",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"(Any) -> Any\")",
"offset": 1,
"src": "yield from _verify_final_method(stub.func, runtime.func, MISSING)",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if inspect.isdatadescriptor(runtime):",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "runtime_type = get_mypy_type_of_runtime_value(runtime)",
"target": "mypy.stubtest._verify_readonly_property"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 13,
"src": "def _verify_abstract_status(stub: nodes.FuncDef, runtime: Any) -> Iterator[str]:",
"target": "mypy.stubtest._verify_abstract_status"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 2,
"src": "runtime_abstract = getattr(runtime, \"__isabstractmethod__\", False)",
"target": "mypy.stubtest._verify_abstract_status"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "runtime_abstract = getattr(runtime, \"__isabstractmethod__\", False)",
"target": "mypy.stubtest._verify_abstract_status"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 2,
"src": "if runtime_abstract and not stub_abstract:",
"target": "mypy.stubtest._verify_abstract_status"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 5,
"src": "def _verify_final_method(",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 5,
"src": "if getattr(runtime, \"__final__\", False) or (",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if getattr(runtime, \"__final__\", False) or (",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 1,
"src": "static_runtime is not MISSING and getattr(static_runtime, \"__final__\", False)",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "static_runtime is not MISSING and getattr(static_runtime, \"__final__\", False)",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "static_runtime is not MISSING and getattr(static_runtime, \"__final__\", False)",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 50,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 0,
"src": "static_runtime is not MISSING and getattr(static_runtime, \"__final__\", False)",
"target": "mypy.stubtest._verify_final_method"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 60,
"src": "@verify.register(nodes.Decorator)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[Decorator, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.Decorator)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: Decorator, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.Decorator)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_decorator(",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: Decorator, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_decorator(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 6,
"src": "if not isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "runtime,",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 5,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "for message in _verify_readonly_property(stub, runtime):",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, message, stub, runtime)",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "for message in _verify_abstract_status(stub.func, runtime):",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "yield Error(object_path, message, stub, runtime)",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "yield from verify(func, runtime, object_path)",
"target": "mypy.stubtest.verify_decorator"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]\")",
"offset": 3,
"src": "@verify.register(nodes.TypeAlias)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"_SingleDispatchRegisterCallable[TypeAlias, _SingleDispatchCallable[Iterator[Error], def (stub: Node | Missing, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]]]\")",
"offset": 0,
"src": "@verify.register(nodes.TypeAlias)",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"def (stub: TypeAlias, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "@verify.register(nodes.TypeAlias)",
"target": "mypy.stubtest"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def verify_typealias(",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (stub: TypeAlias, runtime: Any | Missing, object_path: list[str]) -> Iterator[Error]\")",
"offset": 0,
"src": "def verify_typealias(",
"target": "mypy.stubtest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"Any | Missing\")",
"offset": 5,
"src": "if isinstance(runtime, Missing):",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "runtime_origin = get_origin(runtime) or runtime",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "runtime_origin = get_origin(runtime) or runtime",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "runtime_origin = get_origin(runtime) or runtime",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if not isinstance(runtime_origin, type):",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "runtime,",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 31,
"src": "if runtime_origin is not Union and (",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 61,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "yield Error(object_path, \"is not a Union\", stub, runtime, stub_desc=str(stub_target))",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Any | ()\")",
"offset": 4,
"src": "if tuple not in getattr(runtime_origin, \"__mro__\", ()):",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if tuple not in getattr(runtime_origin, \"__mro__\", ()):",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 65,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "object_path, \"is not a subclass of tuple\", stub, runtime, stub_desc=stub_desc",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if runtime_origin is not collections.abc.Callable:",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 71,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "object_path, \"is not a type alias for Callable\", stub, runtime, stub_desc=stub_desc",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "any",
"column": 69,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "yield Error(object_path, \"is not a recognised type alias\", stub, runtime, stub_desc=stub_desc)",
"target": "mypy.stubtest.verify_typealias"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 91,
"src": "def is_probably_a_function(runtime: Any) -> bool:",
"target": "mypy.stubtest.is_probably_a_function"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "isinstance(runtime, (types.FunctionType, types.BuiltinFunctionType))",
"target": "mypy.stubtest.is_probably_a_function"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "or isinstance(runtime, (types.MethodType, types.BuiltinMethodType))",
"target": "mypy.stubtest.is_probably_a_function"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "or (inspect.ismethoddescriptor(runtime) and callable(runtime))",
"target": "mypy.stubtest.is_probably_a_function"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "or (isinstance(runtime, types.MethodWrapperType) and callable(runtime))",
"target": "mypy.stubtest.is_probably_a_function"
},
{
"code": "any",
"column": 45,
"message": "Expression type contains \"Any\" (has type \"(Any, Any) -> None | None\")",
"offset": 5,
"src": "return isinstance(runtime, property) and runtime.fset is None",
"target": "mypy.stubtest.is_read_only_property"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def safe_inspect_signature(runtime: Any) -> inspect.Signature | None:",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "return inspect.signature(runtime)",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "hasattr(runtime, \"__text_signature__\")",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "and \"\" in runtime.__text_signature__",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "sig = runtime.__text_signature__.replace(\"\", \"...\")",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "any",
"column": 68,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "sig = inspect._signature_fromstr(inspect.Signature, runtime, sig) # type: ignore[attr-defined]",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": null,
"column": 68,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "sig = inspect._signature_fromstr(inspect.Signature, runtime, sig) # type: ignore[attr-defined]",
"target": null
},
{
"code": "any",
"column": 77,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "sig = inspect._signature_fromstr(inspect.Signature, runtime, sig) # type: ignore[attr-defined]",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": null,
"column": 77,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "sig = inspect._signature_fromstr(inspect.Signature, runtime, sig) # type: ignore[attr-defined]",
"target": null
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(sig, inspect.Signature)",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if parameter.default is ...",
"target": "mypy.stubtest.safe_inspect_signature"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 43,
"src": "def get_mypy_type_of_runtime_value(runtime: Any) -> mypy.types.Type | None:",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "if runtime is None:",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if isinstance(runtime, property):",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "runtime,",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 18,
"src": "no_default = arg.default is inspect.Parameter.empty",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "redundant-expr",
"column": 21,
"message": "Condition is always true",
"offset": 9,
"src": "elif arg.kind == inspect.Parameter.VAR_KEYWORD:",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 19,
"src": "stub = get_stub(type(runtime).__module__)",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "stub = get_stub(type(runtime).__module__)",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 3,
"src": "type_name = type(runtime).__name__",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "type_name = type(runtime).__name__",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "if isinstance(runtime, tuple):",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "if isinstance(runtime, enum.Enum) and isinstance(runtime.name, str):",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(runtime, bytes):",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif isinstance(runtime, (bool, int, str)):",
"target": "mypy.stubtest.get_mypy_type_of_runtime_value"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 386,
"src": "default=[],",
"target": "mypy.stubtest.parse_options"
}
],
"mypy/stubutil.py": [
{
"code": "helpful-string",
"column": 45,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 163,
"src": "print(f\"{mod}: Failed to import, skipping{message}\")",
"target": "mypy.stubutil.report_missing"
},
{
"code": "possibly-undefined",
"column": 15,
"message": "Name \"arg_module\" may be undefined",
"offset": 118,
"src": "if arg_module not in self.local_modules:",
"target": "mypy.stubutil"
}
],
"mypy/suggestions.py": [
{
"code": "possibly-undefined",
"column": 24,
"message": "Name \"arg\" may be undefined",
"offset": 526,
"src": "args.append(arg)",
"target": "mypy.suggestions"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"partial_fallback\" has type \"Instance\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 331,
"src": "if t.partial_fallback and t.partial_fallback.type:",
"target": "mypy.suggestions.TypeFormatter.visit_tuple_type"
}
],
"mypy/test/data.py": [
{
"code": "no-untyped-usage",
"column": 8,
"message": "Usage of untyped name \"suite\" in typed context",
"offset": 324,
"src": "suite = parent.obj()",
"target": "mypy.test.data.DataDrivenTestCase.runtest"
},
{
"code": "no-untyped-usage",
"column": 8,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-no-untyped-usage for more info",
"offset": 0,
"src": "suite = parent.obj()",
"target": null
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Untyped\"",
"offset": 0,
"src": "suite = parent.obj()",
"target": "mypy.test.data.DataDrivenTestCase.runtest"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Untyped\"",
"offset": 1,
"src": "suite.setup()",
"target": "mypy.test.data.DataDrivenTestCase.runtest"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Untyped\"",
"offset": 2,
"src": "suite.run_case(self)",
"target": "mypy.test.data.DataDrivenTestCase.runtest"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 61,
"src": "def repr_failure(",
"target": "mypy.test.data.DataDrivenTestCase.repr_failure"
},
{
"code": "possibly-undefined",
"column": 52,
"message": "Name \"severity\" may be undefined",
"offset": 167,
"src": "output.append(f\"{fnam}:{i + 1}: {severity}: {message}\")",
"target": "mypy.test.data"
},
{
"code": "possibly-undefined",
"column": 58,
"message": "Name \"severity\" may be undefined",
"offset": 2,
"src": "output.append(f\"{fnam}:{i + 1}:{col}: {severity}: {message}\")",
"target": "mypy.test.data"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 37,
"src": "def pytest_sessionstart(session: Any) -> None:",
"target": "mypy.test.data.pytest_sessionstart"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 9,
"src": "def pytest_addoption(parser: Any) -> None:",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "group = parser.getgroup(\"mypy\")",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "group.addoption(",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "group.addoption(",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "group.addoption(",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "group.addoption(",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 4,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "group.addoption(",
"target": "mypy.test.data.pytest_addoption"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"[_F: (...) -> object] (_F) -> _F\")",
"offset": 9,
"src": "@pytest.hookimpl(tryfirst=True)",
"target": "mypy.test.data"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Untyped\"",
"offset": 2,
"src": "if config.getoption(\"--collectonly\"):",
"target": "mypy.test.data.pytest_cmdline_main"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Untyped\"",
"offset": 3,
"src": "if config.getoption(\"--update-data\"):",
"target": "mypy.test.data.pytest_cmdline_main"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "def pytest_pycollect_makeitem(collector: Any, name: str, obj: object) -> Any | None:",
"target": "mypy.test.data.pytest_pycollect_makeitem"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 11,
"src": "return DataSuiteCollector.from_parent(parent=collector, name=name) # type: ignore[no-untyped-call, unused-ignore]",
"target": "mypy.test.data.pytest_pycollect_makeitem"
},
{
"code": null,
"column": 57,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "return DataSuiteCollector.from_parent(parent=collector, name=name) # type: ignore[no-untyped-call, unused-ignore]",
"target": null
},
{
"code": "no-untyped-usage",
"column": 27,
"message": "Usage of untyped name \"obj\" in typed context",
"offset": 73,
"src": "suite: DataSuite = self.obj",
"target": "mypy.test.data.DataSuiteCollector.collect"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Untyped\"",
"offset": 37,
"src": "suite=self.parent.obj,",
"target": "mypy.test.data.DataFileCollector.collect"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Untyped\"",
"offset": 1,
"src": "file=os.path.join(self.parent.obj.data_prefix, self.name),",
"target": "mypy.test.data.DataFileCollector.collect"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Untyped\"",
"offset": 17,
"src": "data_path = Path(self.parent.obj.data_prefix) / self.name",
"target": "mypy.test.data.DataFileCollector._apply_fixes"
}
],
"mypy/test/helpers.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 278,
"src": "def retry_on_error(func: Callable[[], Any], max_wait: float = 1.0) -> None:",
"target": "mypy.test.helpers.retry_on_error"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Untyped\"",
"offset": 123,
"src": "if testcase.config.getoption(\"--mypy-verbose\"):",
"target": "mypy.test.helpers.parse_options"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 99,
"src": "base_version = getattr(mypy.version, \"base_based_version\", version)",
"target": "mypy.test.helpers.normalize_file_output"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"Any | str\")",
"offset": 1,
"src": "result = [re.sub(r\"\\b\" + re.escape(base_version) + r\"\\b\", \"$VERSION\", x) for x in result]",
"target": "mypy.test.helpers.normalize_file_output"
}
],
"mypy/test/meta/_pytest.py": [
{
"code": "possibly-undefined",
"column": 19,
"message": "Name \"proc\" may be undefined",
"offset": 68,
"src": "stdout=proc.stdout.decode(),",
"target": "mypy.test.meta._pytest"
},
{
"code": "possibly-undefined",
"column": 19,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-possibly-undefined for more info",
"offset": 0,
"src": "stdout=proc.stdout.decode(),",
"target": null
}
],
"mypy/test/test_ref_info.py": [
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 42,
"src": "data: Any = json.load(refs_file)",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "for item in data:",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for item in data:",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "a.append(f\"{item['line']}:{item['column']}:{item['target']}\")",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "a.append(f\"{item['line']}:{item['column']}:{item['target']}\")",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "a.append(f\"{item['line']}:{item['column']}:{item['target']}\")",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "a.append(f\"{item['line']}:{item['column']}:{item['target']}\")",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "a.append(f\"{item['line']}:{item['column']}:{item['target']}\")",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "a.append(f\"{item['line']}:{item['column']}:{item['target']}\")",
"target": "mypy.test.test_ref_info.RefInfoSuite.run_case"
}
],
"mypy/test/testcheck.py": [
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 64,
"src": "if lxml is None and os.path.basename(testcase.file) == \"check-reports.test\":",
"target": "mypy.test.testcheck.TypeCheckSuite.run_case"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"False | Untyped\")",
"offset": 144,
"src": "if output != a and testcase.config.getoption(\"--update-data\", False):",
"target": "mypy.test.testcheck.TypeCheckSuite.run_case_once"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Untyped\"",
"offset": 0,
"src": "if output != a and testcase.config.getoption(\"--update-data\", False):",
"target": "mypy.test.testcheck.TypeCheckSuite.run_case_once"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 82,
"src": "meta = build.find_cache_meta(id, path, manager)",
"target": "mypy.test.testcheck.TypeCheckSuite.find_missing_cache_files"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 1,
"src": "if not build.validate_meta(meta, id, path, ignore_errors, manager):",
"target": "mypy.test.testcheck.TypeCheckSuite.find_missing_cache_files"
},
{
"code": "any",
"column": 39,
"message": "Expression type contains \"Any\" (has type \"CacheMeta | None\")",
"offset": 0,
"src": "if not build.validate_meta(meta, id, path, ignore_errors, manager):",
"target": "mypy.test.testcheck.TypeCheckSuite.find_missing_cache_files"
}
],
"mypy/test/testcmdline.py": [
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 49,
"src": "if lxml is None and os.path.basename(testcase.file) == \"reports.test\":",
"target": "mypy.test.testcmdline.PythonCmdlineSuite.run_case"
}
],
"mypy/test/testdaemon.py": [
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"(int, Any)\")",
"offset": 106,
"src": "return err.returncode, err.output",
"target": "mypy.test.testdaemon.run_cmd"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return err.returncode, err.output",
"target": "mypy.test.testdaemon.run_cmd"
}
],
"mypy/test/testfinegrained.py": [
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 78,
"src": "return",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_case"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 97,
"src": "response = server.check(sources, export_types=False, is_tty=False, terminal_width=-1)",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_check"
},
{
"code": "any",
"column": 14,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "out = response[\"out\"] or response[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_check"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "out = response[\"out\"] or response[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_check"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "out = response[\"out\"] or response[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_check"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "out = response[\"out\"] or response[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_check"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert isinstance(out, str)",
"target": "mypy.test.testfinegrained.FineGrainedSuite.run_check"
},
{
"code": "explicit-any",
"column": 18,
"message": "Explicit \"Any\" is not allowed",
"offset": 136,
"src": "res = cast(",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "res = cast(",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 13,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 45,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 54,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 67,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "val = val.replace(\"\\\\\\\\\", \"\\\\\")",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "val = val.replace(tmp_dir + os.path.sep, \"\")",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "val = val.replace(os.path.realpath(tmp_dir) + os.path.sep, \"\")",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "val = val.replace(os.path.abspath(tmp_dir) + os.path.sep, \"\")",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "output.extend(val.strip().split(\"\\n\"))",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_suggest"
},
{
"code": "explicit-any",
"column": 18,
"message": "Explicit \"Any\" is not allowed",
"offset": 21,
"src": "res = cast(",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "res = cast(",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 14,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 45,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 54,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 67,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "val = res[\"error\"] if \"error\" in res else res[\"out\"] + res[\"err\"]",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "output.extend(val.strip().split(\"\\n\"))",
"target": "mypy.test.testfinegrained.FineGrainedSuite.maybe_inspect"
}
],
"mypy/test/testinfer.py": [
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 164,
"src": "d.items(), [({0, 1}, {\"group1\"}), ({2, 3, 4}, {\"group2\"}), ({5, 6, 7}, {\"group3\"})]",
"target": "mypy.test.testinfer.OperandDisjointDictSuite.test_independent_maps"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 14,
"src": "[",
"target": "mypy.test.testinfer.OperandDisjointDictSuite.test_partial_merging"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 17,
"src": "[({0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16}, {\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"})],",
"target": "mypy.test.testinfer.OperandDisjointDictSuite.test_full_merging"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 11,
"src": "self.assertEqual(d.items(), [({0, 1, 2, 3, 4, 5, 6}, {\"a\", \"b\", \"c\", \"d\", \"e\"})])",
"target": "mypy.test.testinfer.OperandDisjointDictSuite.test_merge_with_multiple_overlaps"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 29,
"src": "[(\"==\", [0, 1]), (\"==\", [1, 2]), (\"<\", [2, 3]), (\"==\", [3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_basic_cases"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 4,
"src": "[(\"==\", [0, 1, 2]), (\"<\", [2, 3]), (\"==\", [3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_basic_cases"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 4,
"src": "[(\"==\", [0, 1]), (\"==\", [1, 2]), (\"<\", [2, 3]), (\"==\", [3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_basic_cases"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 4,
"src": "[(\"==\", [0, 1, 2]), (\"<\", [2, 3]), (\"==\", [3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_basic_cases"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 17,
"src": "[(\"==\", [0, 1, 2]), (\"is\", [2, 3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_multiple_groups"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 8,
"src": "[(\"==\", [0, 1, 2, 3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_multiple_groups"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 8,
"src": "[(\"is\", [0, 1]), (\"==\", [1, 2, 3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_multiple_groups"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 8,
"src": "[(\"is\", [0, 1, 2]), (\"<\", [2, 3]), (\"==\", [3, 4, 5])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_multiple_groups"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 58,
"src": "[(\"==\", [0, 1, 2]), (\"is\", [2, 3, 4])],",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_multiple_groups_different_operators"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 26,
"src": "self.assertEqual(group_comparison_operands([], {}, set()), [])",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_empty_pair_list"
},
{
"code": "any",
"column": 68,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "self.assertEqual(group_comparison_operands([], {}, {\"==\"}), [])",
"target": "mypy.test.testinfer.OperandComparisonGroupingSuite.test_empty_pair_list"
}
],
"mypy/test/testmerge.py": [
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 175,
"src": "if isinstance(node.node, Node):",
"target": "mypy.test.testmerge.ASTMergeSuite.format_symbol_table_node"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 3,
"src": "s = f\"? ({type(node.node)})\"",
"target": "mypy.test.testmerge.ASTMergeSuite.format_symbol_table_node"
}
],
"mypy/test/testpep561.py": [
{
"code": "possibly-undefined",
"column": 22,
"message": "Name \"program\" may be undefined",
"offset": 169,
"src": "os.remove(program)",
"target": "mypy.test.testpep561"
},
{
"code": "unreachable",
"column": 4,
"message": "Statement is unreachable",
"offset": 20,
"src": "packages = \"packages\"",
"target": "mypy.test.testpep561.test_mypy_path_is_respected"
}
],
"mypy/test/testreports.py": [
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 19,
"src": "@pytest.mark.skipif(lxml is None, reason=\"Cannot import lxml. Is it installed?\")",
"target": "mypy.test.testreports"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 5,
"src": "@pytest.mark.skipif(lxml is None, reason=\"Cannot import lxml. Is it installed?\")",
"target": "mypy.test.testreports"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 11,
"src": "child_package.classes[\"class\"] = etree.Element(\"class\")",
"target": "mypy.test.testreports.CoberturaReportSuite.test_as_xml"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 0,
"src": "child_package.classes[\"class\"] = etree.Element(\"class\")",
"target": "mypy.test.testreports.CoberturaReportSuite.test_as_xml"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any (from unimported type)\"",
"offset": 19,
"src": "expected_output, etree.tostring(cobertura_package.as_xml(), pretty_print=True)",
"target": "mypy.test.testreports.CoberturaReportSuite.test_as_xml"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "expected_output, etree.tostring(cobertura_package.as_xml(), pretty_print=True)",
"target": "mypy.test.testreports.CoberturaReportSuite.test_as_xml"
}
],
"mypy/test/teststubgen.py": [
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 55,
"src": "@unittest.skipIf(sys.platform == \"win32\", \"clean up fails on Windows\")",
"target": "mypy.test.teststubgen"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 27,
"src": "@unittest.skipIf(sys.platform == \"win32\", \"clean up fails on Windows\")",
"target": "mypy.test.teststubgen"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 26,
"src": "@unittest.skipIf(sys.platform == \"win32\", \"clean up fails on Windows\")",
"target": "mypy.test.teststubgen"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 21,
"src": "def run(self, result: Any | None = None) -> Any | None:",
"target": "mypy.test.teststubgen.StubgenCmdLineSuite.run"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 2,
"src": "return super().run(result)",
"target": "mypy.test.teststubgen.StubgenCmdLineSuite.run"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 452,
"src": "@unittest.skipIf(sys.platform == \"win32\", \"Tests building the paths common ancestor on *nix\")",
"target": "mypy.test.teststubgen"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 16,
"src": "@unittest.skipIf(",
"target": "mypy.test.teststubgen"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 95,
"src": "@unittest.skipIf(sys.platform == \"win32\", \"clean up fails on Windows\")",
"target": "mypy.test.teststubgen"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"Any | str | None\")",
"offset": 191,
"src": "docstring=getattr(TestClass, \"__doc__\", None),",
"target": "mypy.test.teststubgen.StubgencSuite.test_non_c_generate_signature_with_kw_only_args"
},
{
"code": "any",
"column": 32,
"message": "Expression type contains \"Any\" (has type \"def (self: Any) -> str\")",
"offset": 298,
"src": "test.__doc__ = property(lambda self: \"test(arg0: str) -> None\") # type: ignore[assignment]",
"target": "mypy.test.teststubgen.StubgencSuite.test_generate_c_function_no_crash_for_non_str_docstring"
},
{
"code": null,
"column": 32,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "test.__doc__ = property(lambda self: \"test(arg0: str) -> None\") # type: ignore[assignment]",
"target": null
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 31,
"src": "TestClass.attribute,",
"target": "mypy.test.teststubgen.StubgencSuite.test_generate_c_property_with_pybind11"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"Any | str | None\")",
"offset": 202,
"src": "docstring=getattr(TestClass, \"__doc__\", None),",
"target": "mypy.test.teststubgen.StubgencSuite.test_generate_c_type_with_overload_shiboken"
}
],
"mypy/test/teststubtest.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 206,
"src": "def collect_cases(fn: Callable[..., Iterator[Case]]) -> FunctionType[..., None]:",
"target": "mypy.test.teststubtest.collect_cases"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 8,
"src": "def test(*args: Any, **kwargs: Any) -> None:",
"target": "mypy.test.teststubtest.collect_cases"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 1,
"src": "cases = list(fn(*args, **kwargs))",
"target": "mypy.test.teststubtest.collect_cases"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "cases = list(fn(*args, **kwargs))",
"target": "mypy.test.teststubtest.collect_cases"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"def (*args: Any, **kwargs: Any) -> None\")",
"offset": 30,
"src": "return test",
"target": "mypy.test.teststubtest.collect_cases"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 4,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_basic_good(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 18,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_types(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 21,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_coroutines(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 9,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_arg_name(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 39,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_arg_kind(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 32,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_private_parameters(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 71,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_default_presence(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 34,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_default_value(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 74,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_static_class_method(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 64,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_arg_mismatch(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 17,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_varargs_varkwargs(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 66,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_overload(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 122,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_property(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 103,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_cached_property(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 99,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_var(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 63,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_type_alias(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 190,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_enum(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 117,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_decorator(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 16,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_all_at_runtime_not_stub(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 9,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_all_in_stub_not_at_runtime(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 3,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_all_in_stub_different_to_all_at_runtime(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 16,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_missing(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 43,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_missing_no_runtime_all(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 8,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_missing_no_runtime_all_terrible(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 17,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_non_public_1(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 6,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_non_public_2(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 5,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_dunders(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 27,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_not_subclassable(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 10,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_has_runtime_final_decorator(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 256,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_name_mangling(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 58,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_mro(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 31,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_good_literal(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 33,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_bad_literal(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 35,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_special_subtype(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 34,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_runtime_typing_objects(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 31,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_named_tuple(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 35,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_named_tuple_typing_and_collections(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 29,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_type_var(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 14,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_metaclass_match(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 48,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_metaclass_abcmeta(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 13,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_abstract_methods(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 97,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_abstract_properties(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 66,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_type_check_only(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"def (fn: (...) -> Iterator[Case]) -> def (...) -> None\")",
"offset": 65,
"src": "@collect_cases",
"target": "mypy.test.teststubtest"
},
{
"code": "decorated-any",
"column": 4,
"message": "Type of decorated function contains type \"Any\" (\"def (...) -> None\")",
"offset": 1,
"src": "def test_no_param_defaults_bool_eval(self) -> Iterator[Case]:",
"target": "mypy.test.teststubtest"
},
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 176,
"src": "def f(a: int, b: int, *, c: int, d: int = 0, **kwargs: Any) -> None:",
"target": "mypy.test.teststubtest.StubtestMiscUnit.test_signature"
},
{
"code": "any",
"column": 81,
"message": "Expression type contains \"Any\" (has type \"def (a: int, b: int, *, c: int, d: int = ..., **kwargs: Any) -> None\")",
"offset": 4,
"src": "str(mypy.stubtest.Signature.from_inspect_signature(inspect.signature(f)))",
"target": "mypy.test.teststubtest.StubtestMiscUnit.test_signature"
}
],
"mypy/test/testtypegen.py": [
{
"code": "truthy-bool",
"column": 39,
"message": "Expression has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 65,
"src": "if node.line != -1 and map[node]:",
"target": "mypy.test.testtypegen.TypeExportSuite.run_case"
}
],
"mypy/test/testtypes.py": [
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 1629,
"src": "@skipUnless(mypy.expandtype.__file__.endswith(\".py\"), \"Skip for compiled mypy\")",
"target": "mypy.test.testtypes"
}
],
"mypy/test/update_data.py": [
{
"code": "unreachable",
"column": 22,
"message": "Intersection of \"DataSuiteCollector & DataFileCollector\" cannot exist: would have incompatible method signatures",
"offset": 17,
"src": "assert isinstance(collector, DataFileCollector)",
"target": "mypy.test.update_data.update_testcase_output"
},
{
"code": "unreachable",
"column": 4,
"message": "Statement is unreachable",
"offset": 1,
"src": "for fix in _iter_fixes(testcase, actual, incremental_step=incremental_step):",
"target": "mypy.test.update_data.update_testcase_output"
},
{
"code": "helpful-string",
"column": 30,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 43,
"src": "file_path = f\"tmp/{test_item.arg}\"",
"target": "mypy.test.update_data._iter_fixes"
}
],
"mypy/traverser.py": [
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 123,
"src": "if o.arguments is not None:",
"target": "mypy.traverser.TraverserVisitor.visit_func"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 69,
"src": "if o.expr is not None:",
"target": "mypy.traverser.TraverserVisitor.visit_assert_stmt"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 6,
"src": "if o.expr is not None:",
"target": "mypy.traverser.TraverserVisitor.visit_del_stmt"
}
],
"mypy/type_visitor.py": [
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 278,
"src": "cast(Any, t.partial_fallback.accept(self)),",
"target": "mypy.type_visitor.TypeTranslator.visit_tuple_type"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "cast(Any, t.partial_fallback.accept(self)),",
"target": "mypy.type_visitor.TypeTranslator.visit_tuple_type"
},
{
"code": "explicit-any",
"column": 12,
"message": "Explicit \"Any\" is not allowed",
"offset": 15,
"src": "cast(Any, t.fallback.accept(self)),",
"target": "mypy.type_visitor.TypeTranslator.visit_typeddict_type"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "cast(Any, t.fallback.accept(self)),",
"target": "mypy.type_visitor.TypeTranslator.visit_typeddict_type"
}
],
"mypy/typeanal.py": [
{
"code": "helpful-string",
"column": 60,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 1242,
"src": "f'ParamSpec must have \"*args\" typed as \"{name}.args\" and \"**kwargs\" typed as \"{name}.kwargs\"',",
"target": "mypy.typeanal.TypeAnalyser.visit_callable_type"
},
{
"code": "helpful-string",
"column": 98,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 0,
"src": "f'ParamSpec must have \"*args\" typed as \"{name}.args\" and \"**kwargs\" typed as \"{name}.kwargs\"',",
"target": "mypy.typeanal.TypeAnalyser.visit_callable_type"
},
{
"code": "helpful-string",
"column": 62,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 558,
"src": "self.fail(f'Invalid argument constructor \"{found.fullname}\"', arg)",
"target": "mypy.typeanal.TypeAnalyser.analyze_callable_args"
},
{
"code": "helpful-string",
"column": 57,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 759,
"src": "assert t.alias is not None, f\"Unfixed type alias {t.type_ref}\"",
"target": "mypy.typeanal.DivergingAliasDetector.visit_type_alias_type"
}
],
"mypy/typeops.py": [
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 1084,
"src": "sum_types: dict[str, tuple[set[Any], list[int]]] = {}",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"dict[str, (set[Any], list[int])]\")",
"offset": 6,
"src": "if fullname not in sum_types:",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, (set[Any], list[int])]\")",
"offset": 1,
"src": "sum_types[fullname] = (",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"(set[Any], list[int])\")",
"offset": 0,
"src": "sum_types[fullname] = (",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 2,
"src": "set(typ.fallback.type.enum_members)",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 33,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 2,
"src": "else {True, False}",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"dict[str, (set[Any], list[int])]\")",
"offset": 4,
"src": "literals, indexes = sum_types[fullname]",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"(set[Any], list[int])\")",
"offset": 0,
"src": "literals, indexes = sum_types[fullname]",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 0,
"src": "literals, indexes = sum_types[fullname]",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 1,
"src": "literals.discard(typ.value)",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"set[Any]\")",
"offset": 2,
"src": "if not literals:",
"target": "mypy.typeops.try_contracting_literals_in_union"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 6,
"src": "proper_types, [(i not in marked_for_deletion) for i in range(len(proper_types))]",
"target": "mypy.typeops.try_contracting_literals_in_union"
}
],
"mypy/types.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 44,
"src": "JsonDict: _TypeAlias = dict[str, Any]",
"target": "mypy.types"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 136,
"src": "_dummy: Final[Any] = object()",
"target": "mypy.types"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 245,
"src": "\"args\": [arg.serialize() for arg in self.args],",
"target": "mypy.types.TypeAliasType.serialize"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"args\": [arg.serialize() for arg in self.args],",
"target": "mypy.types.TypeAliasType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "assert data[\".class\"] == \"TypeAliasType\"",
"target": "mypy.types.TypeAliasType.deserialize"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 165,
"src": "def copy_modified(self, *, id: TypeVarId, **kwargs: Any) -> Self:",
"target": "mypy.types.TypeVarLikeType.copy_modified"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 40,
"src": "def copy_modified(",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "values: Bogus[list[Type]] = _dummy,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "upper_bound: Bogus[Type] = _dummy,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "default: Bogus[Type] = _dummy,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "id: Bogus[TypeVarId] = _dummy,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "scopename: Bogus[str | None] = _dummy,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "id=self.id if id is _dummy else id,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "values=self.values if values is _dummy else values,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 59,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "upper_bound=self.upper_bound if upper_bound is _dummy else upper_bound,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "default=self.default if default is _dummy else default,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "scopename=self.scopename if scopename == _dummy else scopename,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "scopename=self.scopename if scopename == _dummy else scopename,",
"target": "mypy.types.TypeVarType.copy_modified"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 20,
"src": "return {",
"target": "mypy.types.TypeVarType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 6,
"src": "\"values\": [v.serialize() for v in self.values],",
"target": "mypy.types.TypeVarType.serialize"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"values\": [v.serialize() for v in self.values],",
"target": "mypy.types.TypeVarType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "assert data[\".class\"] == \"TypeVarType\"",
"target": "mypy.types.TypeVarType.deserialize"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "values=[deserialize_type(v) for v in data[\"values\"]],",
"target": "mypy.types.TypeVarType.deserialize"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "values=[deserialize_type(v) for v in data[\"values\"]],",
"target": "mypy.types.TypeVarType.deserialize"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 68,
"src": "def copy_modified(",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "id: Bogus[TypeVarId] = _dummy,",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "prefix: Bogus[Parameters] = _dummy,",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "default: Bogus[Type] = _dummy,",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "id if id is not _dummy else self.id,",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "default=default if default is not _dummy else self.default,",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "prefix=prefix if prefix is not _dummy else self.prefix,",
"target": "mypy.types.ParamSpecType.copy_modified"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 25,
"src": "return {",
"target": "mypy.types.ParamSpecType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "assert data[\".class\"] == \"ParamSpecType\"",
"target": "mypy.types.ParamSpecType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 41,
"src": "return {",
"target": "mypy.types.TypeVarTupleType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "assert data[\".class\"] == \"TypeVarTupleType\"",
"target": "mypy.types.TypeVarTupleType.deserialize"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 22,
"src": "def copy_modified(",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "id: Bogus[TypeVarId] = _dummy,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "upper_bound: Bogus[Type] = _dummy,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "default: Bogus[Type] = _dummy,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "min_len: Bogus[int] = _dummy,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "self.id if id is _dummy else id,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "self.upper_bound if upper_bound is _dummy else upper_bound,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "self.default if default is _dummy else default,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "min_len=self.min_len if min_len is _dummy else min_len,",
"target": "mypy.types.TypeVarTupleType.copy_modified"
},
{
"code": "any",
"column": 65,
"message": "Expression has type \"Any\"",
"offset": 57,
"src": "def copy_modified(self, args: Bogus[Sequence[Type] | None] = _dummy) -> UnboundType:",
"target": "mypy.types.UnboundType.copy_modified"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if args is _dummy:",
"target": "mypy.types.UnboundType.copy_modified"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any (unannotated)\"",
"offset": 15,
"src": "with visitor.string_type():",
"target": "mypy.types.UnboundType.accept"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 19,
"src": "return {",
"target": "mypy.types.UnboundType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 3,
"src": "\"args\": [a.serialize() for a in self.args],",
"target": "mypy.types.UnboundType.serialize"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"args\": [a.serialize() for a in self.args],",
"target": "mypy.types.UnboundType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "assert data[\".class\"] == \"UnboundType\"",
"target": "mypy.types.UnboundType.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "[deserialize_type(a) for a in data[\"args\"]],",
"target": "mypy.types.UnboundType.deserialize"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[deserialize_type(a) for a in data[\"args\"]],",
"target": "mypy.types.UnboundType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 97,
"src": "return {\".class\": \"UnpackType\", \"type\": self.type.serialize()}",
"target": "mypy.types.UnpackType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"UnpackType\"",
"target": "mypy.types.UnpackType.deserialize"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 58,
"src": "original_any: Bogus[AnyType | None] = _dummy,",
"target": "mypy.types.AnyType.copy_modified"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "missing_import_name: Bogus[str | None] = _dummy,",
"target": "mypy.types.AnyType.copy_modified"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if original_any is _dummy:",
"target": "mypy.types.AnyType.copy_modified"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "if missing_import_name is _dummy:",
"target": "mypy.types.AnyType.copy_modified"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 17,
"src": "return {",
"target": "mypy.types.AnyType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "assert data[\".class\"] == cls.__name__",
"target": "mypy.types.AnyType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 103,
"src": "return {\".class\": \"UninhabitedType\"}",
"target": "mypy.types.UninhabitedType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"UninhabitedType\"",
"target": "mypy.types.UninhabitedType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 28,
"src": "return {\".class\": \"NoneType\"}",
"target": "mypy.types.NoneType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"NoneType\"",
"target": "mypy.types.NoneType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 43,
"src": "return {\".class\": \"DeletedType\", \"source\": self.source}",
"target": "mypy.types.DeletedType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"DeletedType\"",
"target": "mypy.types.DeletedType.deserialize"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 31,
"src": "def copy_modified(self, type_guard: Bogus[Type] = _dummy) -> TypeGuardType:",
"target": "mypy.types.TypeGuardType.copy_modified"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "type_guard if type_guard is not _dummy else self.type_guard,",
"target": "mypy.types.TypeGuardType.copy_modified"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 52,
"src": "return {",
"target": "mypy.types.TypeGuardType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "assert data[\".class\"] == \"TypeGuardType\"",
"target": "mypy.types.TypeGuardType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 44,
"src": "return {",
"target": "mypy.types.ExtraAttrs.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, dict[Any, Any])\")",
"offset": 2,
"src": "\"attrs\": {k: v.serialize() for k, v in self.attrs.items()},",
"target": "mypy.types.ExtraAttrs.serialize"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"dict[Any, Any]\")",
"offset": 0,
"src": "\"attrs\": {k: v.serialize() for k, v in self.attrs.items()},",
"target": "mypy.types.ExtraAttrs.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"immutable\": list(self.immutable),",
"target": "mypy.types.ExtraAttrs.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"immutable\": list(self.immutable),",
"target": "mypy.types.ExtraAttrs.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "assert data[\".class\"] == \"ExtraAttrs\"",
"target": "mypy.types.ExtraAttrs.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "{k: deserialize_type(v) for k, v in data[\"attrs\"].items()},",
"target": "mypy.types.ExtraAttrs.deserialize"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{k: deserialize_type(v) for k, v in data[\"attrs\"].items()},",
"target": "mypy.types.ExtraAttrs.deserialize"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{k: deserialize_type(v) for k, v in data[\"attrs\"].items()},",
"target": "mypy.types.ExtraAttrs.deserialize"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{k: deserialize_type(v) for k, v in data[\"attrs\"].items()},",
"target": "mypy.types.ExtraAttrs.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 124,
"src": "\"args\": [arg.serialize() for arg in self.args],",
"target": "mypy.types.Instance.serialize"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"args\": [arg.serialize() for arg in self.args],",
"target": "mypy.types.Instance.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 13,
"src": "assert data[\".class\"] == \"Instance\"",
"target": "mypy.types.Instance.deserialize"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 17,
"src": "args: Bogus[list[Type]] = _dummy,",
"target": "mypy.types.Instance.copy_modified"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "last_known_value: Bogus[LiteralType | None] = _dummy,",
"target": "mypy.types.Instance.copy_modified"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "args=args if args is not _dummy else self.args,",
"target": "mypy.types.Instance.copy_modified"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "last_known_value if last_known_value is not _dummy else self.last_known_value",
"target": "mypy.types.Instance.copy_modified"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 145,
"src": "arg_types: Bogus[Sequence[Type]] = _dummy,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_kinds: Bogus[list[ArgKind]] = _dummy,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_names: Bogus[Sequence[str | None]] = _dummy,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "variables: Bogus[Sequence[TypeVarLikeType]] = _dummy,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "is_ellipsis_args: Bogus[bool] = _dummy,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "imprecise_arg_kinds: Bogus[bool] = _dummy,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "arg_types=arg_types if arg_types is not _dummy else self.arg_types,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_kinds=arg_kinds if arg_kinds is not _dummy else self.arg_kinds,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_names=arg_names if arg_names is not _dummy else self.arg_names,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "is_ellipsis_args if is_ellipsis_args is not _dummy else self.is_ellipsis_args",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "variables=variables if variables is not _dummy else self.variables,",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if imprecise_arg_kinds is not _dummy",
"target": "mypy.types.Parameters.copy_modified"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 93,
"src": "return {",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"arg_types\": [t.serialize() for t in self.arg_types],",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"arg_types\": [t.serialize() for t in self.arg_types],",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"arg_kinds\": [int(x.value) for x in self.arg_kinds],",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"arg_kinds\": [int(x.value) for x in self.arg_kinds],",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"variables\": [tv.serialize() for tv in self.variables],",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"variables\": [tv.serialize() for tv in self.variables],",
"target": "mypy.types.Parameters.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "assert data[\".class\"] == \"Parameters\"",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "[deserialize_type(t) for t in data[\"arg_types\"]],",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[deserialize_type(t) for t in data[\"arg_types\"]],",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[ArgKind(x) for x in data[\"arg_kinds\"]],",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[ArgKind(x) for x in data[\"arg_kinds\"]],",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "variables=[cast(TypeVarLikeType, deserialize_type(v)) for v in data[\"variables\"]],",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "any",
"column": 62,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "variables=[cast(TypeVarLikeType, deserialize_type(v)) for v in data[\"variables\"]],",
"target": "mypy.types.Parameters.deserialize"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 62,
"src": "def __init__(",
"target": "mypy.types.CallableType.__init__"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any] | None\")",
"offset": 53,
"src": "if def_extras:",
"target": "mypy.types.CallableType.__init__"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "self.def_extras = def_extras",
"target": "mypy.types.CallableType.__init__"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 22,
"src": "def copy_modified(",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "arg_types: Bogus[Sequence[Type]] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_kinds: Bogus[list[ArgKind]] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_names: Bogus[Sequence[str | None]] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ret_type: Bogus[Type] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "fallback: Bogus[Instance] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "name: Bogus[str | None] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "definition: Bogus[SymbolNode] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 54,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "variables: Bogus[Sequence[TypeVarLikeType]] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "is_ellipsis_args: Bogus[bool] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "implicit: Bogus[bool] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "special_sig: Bogus[str | None] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "from_type_type: Bogus[bool] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "bound_args: Bogus[list[Type | None]] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "def_extras: Bogus[dict[str, Any]] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_guard: Bogus[TypeGuardType | None] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_is: Bogus[Type | None] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 40,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "from_concatenate: Bogus[bool] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "imprecise_arg_kinds: Bogus[bool] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "unpack_kwargs: Bogus[bool] = _dummy,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "arg_types=arg_types if arg_types is not _dummy else self.arg_types,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_kinds=arg_kinds if arg_kinds is not _dummy else self.arg_kinds,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "arg_names=arg_names if arg_names is not _dummy else self.arg_names,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ret_type=ret_type if ret_type is not _dummy else self.ret_type,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "fallback=fallback if fallback is not _dummy else self.fallback,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "name=name if name is not _dummy else self.name,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "definition=definition if definition is not _dummy else self.definition,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "variables=variables if variables is not _dummy else self.variables,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "is_ellipsis_args if is_ellipsis_args is not _dummy else self.is_ellipsis_args",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "implicit=implicit if implicit is not _dummy else self.implicit,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 58,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "special_sig=special_sig if special_sig is not _dummy else self.special_sig,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 67,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "from_type_type=from_type_type if from_type_type is not _dummy else self.from_type_type,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "bound_args=bound_args if bound_args is not _dummy else self.bound_args,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "def_extras=def_extras if def_extras is not _dummy else dict(self.def_extras),",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "def_extras=def_extras if def_extras is not _dummy else dict(self.def_extras),",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "def_extras=def_extras if def_extras is not _dummy else dict(self.def_extras),",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 67,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "def_extras=def_extras if def_extras is not _dummy else dict(self.def_extras),",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 72,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "def_extras=def_extras if def_extras is not _dummy else dict(self.def_extras),",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 55,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_guard=type_guard if type_guard is not _dummy else self.type_guard,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "type_is=type_is if type_is is not _dummy else self.type_is,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 60,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "from_concatenate if from_concatenate is not _dummy else self.from_concatenate",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "if imprecise_arg_kinds is not _dummy",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 64,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "unpack_kwargs=unpack_kwargs if unpack_kwargs is not _dummy else self.unpack_kwargs,",
"target": "mypy.types.CallableType.copy_modified"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 301,
"src": "return {",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"arg_types\": [t.serialize() for t in self.arg_types],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"arg_types\": [t.serialize() for t in self.arg_types],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"arg_kinds\": [int(x.value) for x in self.arg_kinds],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"arg_kinds\": [int(x.value) for x in self.arg_kinds],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 6,
"src": "\"variables\": [v.serialize() for v in self.variables],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"variables\": [v.serialize() for v in self.variables],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 3,
"src": "\"bound_args\": [(None if t is None else t.serialize()) for t in self.bound_args],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"bound_args\": [(None if t is None else t.serialize()) for t in self.bound_args],",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "\"def_extras\": dict(self.def_extras),",
"target": "mypy.types.CallableType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 10,
"src": "assert data[\".class\"] == \"CallableType\"",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "[deserialize_type(t) for t in data[\"arg_types\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[deserialize_type(t) for t in data[\"arg_types\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[ArgKind(x) for x in data[\"arg_kinds\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[ArgKind(x) for x in data[\"arg_kinds\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "variables=[cast(TypeVarLikeType, deserialize_type(v)) for v in data[\"variables\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 62,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "variables=[cast(TypeVarLikeType, deserialize_type(v)) for v in data[\"variables\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "bound_args=[(None if t is None else deserialize_type(t)) for t in data[\"bound_args\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "bound_args=[(None if t is None else deserialize_type(t)) for t in data[\"bound_args\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 65,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "bound_args=[(None if t is None else deserialize_type(t)) for t in data[\"bound_args\"]],",
"target": "mypy.types.CallableType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 81,
"src": "return {\".class\": \"Overloaded\", \"items\": [t.serialize() for t in self.items]}",
"target": "mypy.types.Overloaded.serialize"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "return {\".class\": \"Overloaded\", \"items\": [t.serialize() for t in self.items]}",
"target": "mypy.types.Overloaded.serialize"
},
{
"code": "any",
"column": 49,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "return {\".class\": \"Overloaded\", \"items\": [t.serialize() for t in self.items]}",
"target": "mypy.types.Overloaded.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"Overloaded\"",
"target": "mypy.types.Overloaded.deserialize"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return Overloaded([CallableType.deserialize(t) for t in data[\"items\"]])",
"target": "mypy.types.Overloaded.deserialize"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return Overloaded([CallableType.deserialize(t) for t in data[\"items\"]])",
"target": "mypy.types.Overloaded.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 14,
"src": "return {",
"target": "mypy.types.NamedOverloaded.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"items\": [t.serialize() for t in self.items],",
"target": "mypy.types.NamedOverloaded.serialize"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"items\": [t.serialize() for t in self.items],",
"target": "mypy.types.NamedOverloaded.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "assert data[\".class\"] == \"NamedOverloaded\"",
"target": "mypy.types.NamedOverloaded.deserialize"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return NamedOverloaded([CallableType.deserialize(t) for t in data[\"items\"]], data[\"_name\"])",
"target": "mypy.types.NamedOverloaded.deserialize"
},
{
"code": "any",
"column": 57,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return NamedOverloaded([CallableType.deserialize(t) for t in data[\"items\"]], data[\"_name\"])",
"target": "mypy.types.NamedOverloaded.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 82,
"src": "return {",
"target": "mypy.types.TupleType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"items\": [t.serialize() for t in self.items],",
"target": "mypy.types.TupleType.serialize"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"items\": [t.serialize() for t in self.items],",
"target": "mypy.types.TupleType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "assert data[\".class\"] == \"TupleType\"",
"target": "mypy.types.TupleType.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "[deserialize_type(t) for t in data[\"items\"]],",
"target": "mypy.types.TupleType.deserialize"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[deserialize_type(t) for t in data[\"items\"]],",
"target": "mypy.types.TupleType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 157,
"src": "return {",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"items\": [[n, t.serialize()] for (n, t) in self.items.items()],",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"items\": [[n, t.serialize()] for (n, t) in self.items.items()],",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"items\": [[n, t.serialize()] for (n, t) in self.items.items()],",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"required_keys\": sorted(self.required_keys),",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"required_keys\": sorted(self.required_keys),",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"readonly_keys\": sorted(self.readonly_keys),",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"readonly_keys\": sorted(self.readonly_keys),",
"target": "mypy.types.TypedDictType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "assert data[\".class\"] == \"TypedDictType\"",
"target": "mypy.types.TypedDictType.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "{n: deserialize_type(t) for (n, t) in data[\"items\"]},",
"target": "mypy.types.TypedDictType.deserialize"
},
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{n: deserialize_type(t) for (n, t) in data[\"items\"]},",
"target": "mypy.types.TypedDictType.deserialize"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "{n: deserialize_type(t) for (n, t) in data[\"items\"]},",
"target": "mypy.types.TypedDictType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 252,
"src": "return {",
"target": "mypy.types.LiteralType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "assert data[\".class\"] == \"LiteralType\"",
"target": "mypy.types.LiteralType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 88,
"src": "return {",
"target": "mypy.types.UnionType.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 2,
"src": "\"items\": [t.serialize() for t in self.items],",
"target": "mypy.types.UnionType.serialize"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"items\": [t.serialize() for t in self.items],",
"target": "mypy.types.UnionType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "assert data[\".class\"] == \"UnionType\"",
"target": "mypy.types.UnionType.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "[deserialize_type(t) for t in data[\"items\"]],",
"target": "mypy.types.UnionType.deserialize"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[deserialize_type(t) for t in data[\"items\"]],",
"target": "mypy.types.UnionType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 67,
"src": "return {\".class\": \"IntersectionType\", \"items\": [t.serialize() for t in self.items]}",
"target": "mypy.types.IntersectionType.serialize"
},
{
"code": "any",
"column": 46,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "return {\".class\": \"IntersectionType\", \"items\": [t.serialize() for t in self.items]}",
"target": "mypy.types.IntersectionType.serialize"
},
{
"code": "any",
"column": 55,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "return {\".class\": \"IntersectionType\", \"items\": [t.serialize() for t in self.items]}",
"target": "mypy.types.IntersectionType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"IntersectionType\"",
"target": "mypy.types.IntersectionType.deserialize"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return IntersectionType([deserialize_type(t) for t in data[\"items\"]])",
"target": "mypy.types.IntersectionType.deserialize"
},
{
"code": "any",
"column": 50,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return IntersectionType([deserialize_type(t) for t in data[\"items\"]])",
"target": "mypy.types.IntersectionType.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 137,
"src": "return {\".class\": \"TypeType\", \"item\": self.item.serialize()}",
"target": "mypy.types.TypeType.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert data[\".class\"] == \"TypeType\"",
"target": "mypy.types.TypeType.deserialize"
},
{
"code": "helpful-string",
"column": 68,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 43,
"src": "assert False, f\"Internal error: unresolved placeholder type {self.fullname}\"",
"target": "mypy.types.PlaceholderType.serialize"
},
{
"code": "helpful-string",
"column": 21,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 101,
"src": "return f\"{t.constructor}({typ})\"",
"target": "mypy.types.TypeStrVisitor.visit_callable_argument"
},
{
"code": "helpful-string",
"column": 21,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 2,
"src": "return f\"{t.constructor}({typ}, {t.name})\"",
"target": "mypy.types.TypeStrVisitor.visit_callable_argument"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 66,
"src": "if t.name is None:",
"target": "mypy.types.TypeStrVisitor.visit_type_var"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 2,
"src": "s = f\"`{t.id}\"",
"target": "mypy.types.TypeStrVisitor.visit_type_var"
},
{
"code": "truthy-bool",
"column": 30,
"message": "Member \"upper_bound\" has type \"Type\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 13,
"src": "if self.id_mapper and t.upper_bound:",
"target": "mypy.types.TypeStrVisitor.visit_type_var"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 11,
"src": "if t.name is None:",
"target": "mypy.types.TypeStrVisitor.visit_param_spec"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 2,
"src": "s += f\"`{t.id}\"",
"target": "mypy.types.TypeStrVisitor.visit_param_spec"
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always false",
"offset": 40,
"src": "if t.name is None:",
"target": "mypy.types.TypeStrVisitor.visit_type_var_tuple"
},
{
"code": "unreachable",
"column": 12,
"message": "Statement is unreachable",
"offset": 2,
"src": "s = f\"`{t.id}\"",
"target": "mypy.types.TypeStrVisitor.visit_type_var_tuple"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"partial_fallback\" has type \"Instance\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 127,
"src": "if t.partial_fallback and t.partial_fallback.type:",
"target": "mypy.types.TypeStrVisitor.visit_tuple_type"
},
{
"code": "truthy-bool",
"column": 11,
"message": "Member \"fallback\" has type \"Instance\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 23,
"src": "if t.fallback and t.fallback.type:",
"target": "mypy.types.TypeStrVisitor.visit_typeddict_type"
},
{
"code": "helpful-string",
"column": 30,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 41,
"src": "return f\"\"",
"target": "mypy.types.TypeStrVisitor.visit_placeholder_type"
}
],
"mypy/types_utils.py": [
{
"code": "helpful-string",
"column": 50,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 66,
"src": "assert target.alias, f\"Unfixed type alias {target.type_ref}\"",
"target": "mypy.types_utils.is_invalid_recursive_alias"
}
],
"mypy/util.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 19,
"src": "orjson: Any",
"target": "mypy.util"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 356,
"src": "members = inspect.getmembers(",
"target": "mypy.util.get_class_descriptors"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"(str, Any)\")",
"offset": 3,
"src": "fields_cache[cls] = [x for x, y in members if x != \"__weakref__\" and x != \"__dict__\"]",
"target": "mypy.util.get_class_descriptors"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "fields_cache[cls] = [x for x, y in members if x != \"__weakref__\" and x != \"__dict__\"]",
"target": "mypy.util.get_class_descriptors"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"list[(str, Any)]\")",
"offset": 0,
"src": "fields_cache[cls] = [x for x, y in members if x != \"__weakref__\" and x != \"__dict__\"]",
"target": "mypy.util.get_class_descriptors"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 25,
"src": "setattr(new, attr, getattr(old, attr))",
"target": "mypy.util.replace_object_state"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 555,
"src": "def getattr(value: object, name: str) -> Any: ...",
"target": "mypy.util.getattr"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def (value: object, name: str) -> Any\")",
"offset": 0,
"src": "def getattr(value: object, name: str) -> Any: ...",
"target": "mypy.util.getattr"
},
{
"code": "decorated-any",
"column": 0,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-decorated-any for more info",
"offset": 0,
"src": "def getattr(value: object, name: str) -> Any: ...",
"target": null
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def getattr(value: object, name: str, default: T) -> Any | T: ...",
"target": "mypy.util.getattr"
},
{
"code": "decorated-any",
"column": 0,
"message": "Type of decorated function contains type \"Any\" (\"def [T] (value: object, name: str, default: T) -> Any | T\")",
"offset": 0,
"src": "def getattr(value: object, name: str, default: T) -> Any | T: ...",
"target": "mypy.util.getattr"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "def getattr(value, name, default: object = _default):",
"target": "mypy.util.getattr"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 6,
"src": "def attrgetter(name: str) -> operator.attrgetter[Any]:",
"target": "mypy.util.attrgetter"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if orjson is not None:",
"target": "mypy.util.json_dumps"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "dumps_option = orjson.OPT_INDENT_2 | orjson.OPT_SORT_KEYS",
"target": "mypy.util.json_dumps"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "dumps_option = orjson.OPT_INDENT_2 | orjson.OPT_SORT_KEYS",
"target": "mypy.util.json_dumps"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "dumps_option = orjson.OPT_SORT_KEYS",
"target": "mypy.util.json_dumps"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "return orjson.dumps(obj, option=dumps_option) # type: ignore[no-any-return]",
"target": "mypy.util.json_dumps"
},
{
"code": null,
"column": 19,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "return orjson.dumps(obj, option=dumps_option) # type: ignore[no-any-return]",
"target": null
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return orjson.dumps(obj, option=dumps_option) # type: ignore[no-any-return]",
"target": "mypy.util.json_dumps"
},
{
"code": null,
"column": 44,
"message": "Error code \"any\" not covered by \"type: ignore\" comment",
"offset": 0,
"src": "return orjson.dumps(obj, option=dumps_option) # type: ignore[no-any-return]",
"target": null
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 12,
"src": "def json_loads(data: bytes) -> Any:",
"target": "mypy.util.json_loads"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if orjson is not None:",
"target": "mypy.util.json_loads"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return orjson.loads(data)",
"target": "mypy.util.json_loads"
}
],
"mypy/visitor.py": [
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 368,
"src": "def visit_mypy_file(self, o: mypy.nodes.MypyFile, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_mypy_file"
},
{
"code": "empty-body",
"column": 4,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-empty-body for more info",
"offset": 0,
"src": "def visit_mypy_file(self, o: mypy.nodes.MypyFile, /) -> T:",
"target": null
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 6,
"src": "def visit_var(self, o: mypy.nodes.Var, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_var"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 5,
"src": "def visit_import(self, o: mypy.nodes.Import, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_import"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_import_from(self, o: mypy.nodes.ImportFrom, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_import_from"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_import_all(self, o: mypy.nodes.ImportAll, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_import_all"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 5,
"src": "def visit_func_def(self, o: mypy.nodes.FuncDef, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_func_def"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_overloaded_func_def(self, o: mypy.nodes.OverloadedFuncDef, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_overloaded_func_def"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_class_def(self, o: mypy.nodes.ClassDef, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_class_def"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_global_decl(self, o: mypy.nodes.GlobalDecl, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_global_decl"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_nonlocal_decl(self, o: mypy.nodes.NonlocalDecl, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_nonlocal_decl"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_decorator(self, o: mypy.nodes.Decorator, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_decorator"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_type_alias(self, o: mypy.nodes.TypeAlias, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_type_alias"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_placeholder_node(self, o: mypy.nodes.PlaceholderNode, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_placeholder_node"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 5,
"src": "def visit_block(self, o: mypy.nodes.Block, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_block"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_expression_stmt(self, o: mypy.nodes.ExpressionStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_expression_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_assignment_stmt(self, o: mypy.nodes.AssignmentStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_assignment_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_operator_assignment_stmt(self, o: mypy.nodes.OperatorAssignmentStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_operator_assignment_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_while_stmt(self, o: mypy.nodes.WhileStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_while_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_for_stmt(self, o: mypy.nodes.ForStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_for_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_return_stmt(self, o: mypy.nodes.ReturnStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_return_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_assert_stmt(self, o: mypy.nodes.AssertStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_assert_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_del_stmt(self, o: mypy.nodes.DelStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_del_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_if_stmt(self, o: mypy.nodes.IfStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_if_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_break_stmt(self, o: mypy.nodes.BreakStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_break_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_continue_stmt(self, o: mypy.nodes.ContinueStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_continue_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_pass_stmt(self, o: mypy.nodes.PassStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_pass_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_raise_stmt(self, o: mypy.nodes.RaiseStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_raise_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_try_stmt(self, o: mypy.nodes.TryStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_try_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_with_stmt(self, o: mypy.nodes.WithStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_with_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_match_stmt(self, o: mypy.nodes.MatchStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_match_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_type_alias_stmt(self, o: mypy.nodes.TypeAliasStmt, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_type_alias_stmt"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 5,
"src": "def visit_int_expr(self, o: mypy.nodes.IntExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_int_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_str_expr(self, o: mypy.nodes.StrExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_str_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_bytes_expr(self, o: mypy.nodes.BytesExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_bytes_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_float_expr(self, o: mypy.nodes.FloatExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_float_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_complex_expr(self, o: mypy.nodes.ComplexExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_complex_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_ellipsis(self, o: mypy.nodes.EllipsisExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_ellipsis"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_star_expr(self, o: mypy.nodes.StarExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_star_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_name_expr(self, o: mypy.nodes.NameExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_name_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_member_expr(self, o: mypy.nodes.MemberExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_member_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_yield_from_expr(self, o: mypy.nodes.YieldFromExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_yield_from_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_yield_expr(self, o: mypy.nodes.YieldExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_yield_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_call_expr(self, o: mypy.nodes.CallExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_call_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_op_expr(self, o: mypy.nodes.OpExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_op_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_comparison_expr(self, o: mypy.nodes.ComparisonExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_comparison_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_cast_expr(self, o: mypy.nodes.CastExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_cast_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_assert_type_expr(self, o: mypy.nodes.AssertTypeExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_assert_type_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_reveal_expr(self, o: mypy.nodes.RevealExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_reveal_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_super_expr(self, o: mypy.nodes.SuperExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_super_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_assignment_expr(self, o: mypy.nodes.AssignmentExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_assignment_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_unary_expr(self, o: mypy.nodes.UnaryExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_unary_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_list_expr(self, o: mypy.nodes.ListExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_list_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_dict_expr(self, o: mypy.nodes.DictExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_dict_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_tuple_expr(self, o: mypy.nodes.TupleExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_tuple_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_set_expr(self, o: mypy.nodes.SetExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_set_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_index_expr(self, o: mypy.nodes.IndexExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_index_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_type_application(self, o: mypy.nodes.TypeApplication, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_type_application"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_lambda_expr(self, o: mypy.nodes.LambdaExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_lambda_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_list_comprehension(self, o: mypy.nodes.ListComprehension, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_list_comprehension"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_set_comprehension(self, o: mypy.nodes.SetComprehension, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_set_comprehension"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_dictionary_comprehension(self, o: mypy.nodes.DictionaryComprehension, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_dictionary_comprehension"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_generator_expr(self, o: mypy.nodes.GeneratorExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_generator_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_slice_expr(self, o: mypy.nodes.SliceExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_slice_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_conditional_expr(self, o: mypy.nodes.ConditionalExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_conditional_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_type_var_expr(self, o: mypy.nodes.TypeVarExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_type_var_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_paramspec_expr(self, o: mypy.nodes.ParamSpecExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_paramspec_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_type_var_tuple_expr(self, o: mypy.nodes.TypeVarTupleExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_type_var_tuple_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_type_alias_expr(self, o: mypy.nodes.TypeAliasExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_type_alias_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_namedtuple_expr(self, o: mypy.nodes.NamedTupleExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_namedtuple_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_enum_call_expr(self, o: mypy.nodes.EnumCallExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_enum_call_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_typeddict_expr(self, o: mypy.nodes.TypedDictExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_typeddict_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_newtype_expr(self, o: mypy.nodes.NewTypeExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_newtype_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit__promote_expr(self, o: mypy.nodes.PromoteExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit__promote_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_await_expr(self, o: mypy.nodes.AwaitExpr, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_await_expr"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_temp_node(self, o: mypy.nodes.TempNode, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_temp_node"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 5,
"src": "def visit_as_pattern(self, o: mypy.patterns.AsPattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_as_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_or_pattern(self, o: mypy.patterns.OrPattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_or_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_value_pattern(self, o: mypy.patterns.ValuePattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_value_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_singleton_pattern(self, o: mypy.patterns.SingletonPattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_singleton_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_sequence_pattern(self, o: mypy.patterns.SequencePattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_sequence_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_starred_pattern(self, o: mypy.patterns.StarredPattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_starred_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_mapping_pattern(self, o: mypy.patterns.MappingPattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_mapping_pattern"
},
{
"code": "empty-body",
"column": 4,
"message": "Missing return statement",
"offset": 3,
"src": "def visit_class_pattern(self, o: mypy.patterns.ClassPattern, /) -> T:",
"target": "mypy.visitor.NodeVisitor.visit_class_pattern"
}
],
"mypyc/analysis/ircheck.py": [
{
"code": "helpful-string",
"column": 32,
"message": "The type \"mypyc.ir.ops.Op\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 85,
"src": "return f\"FnError(source={self.source}, desc={self.desc})\"",
"target": "mypyc.analysis.ircheck.FnError.__repr__"
},
{
"code": "helpful-string",
"column": 32,
"message": "The type \"mypyc.ir.ops.BasicBlock\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 0,
"src": "return f\"FnError(source={self.source}, desc={self.desc})\"",
"target": "mypyc.analysis.ircheck.FnError.__repr__"
},
{
"code": "helpful-string",
"column": 72,
"message": "The type \"type[object]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 186,
"src": "self.fail(op, f\"Invalid type for item of tuple literal: {type(x)})\")",
"target": "mypyc.analysis.ircheck.OpChecker.check_tuple_items_valid_literals"
},
{
"code": "helpful-string",
"column": 76,
"message": "The type \"type[object]\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 11,
"src": "self.fail(op, f\"Invalid type for item of frozenset literal: {type(x)})\")",
"target": "mypyc.analysis.ircheck.OpChecker.check_frozenset_items_valid_literals"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 21,
"src": "elif isinstance(op.value, frozenset):",
"target": "mypyc.analysis.ircheck.OpChecker.visit_load_literal"
}
],
"mypyc/build.py": [
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 115,
"src": "options.platform,",
"target": "mypyc.build.emit_messages"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 292,
"src": "def mypyc_build(",
"target": "mypyc.build.mypyc_build"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 28,
"src": "if not skip_cgen_input:",
"target": "mypyc.build.mypyc_build"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "group_cfiles = skip_cgen_input",
"target": "mypyc.build.mypyc_build"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 19,
"src": "def mypycify(",
"target": "mypyc.build.mypycify"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 75,
"src": "skip_cgen_input=skip_cgen_input,",
"target": "mypyc.build.mypycify"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 9,
"src": "compiler: Any = ccompiler.new_compiler()",
"target": "mypyc.build.mypycify"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "sysconfig.customize_compiler(compiler)",
"target": "mypyc.build.mypycify"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "if compiler.compiler_type == \"unix\":",
"target": "mypyc.build.mypycify"
},
{
"code": "any",
"column": 9,
"message": "Expression has type \"Any\"",
"offset": 17,
"src": "elif compiler.compiler_type == \"msvc\":",
"target": "mypyc.build.mypycify"
}
],
"mypyc/codegen/emit.py": [
{
"code": "possibly-undefined",
"column": 22,
"message": "Name \"item_type\" may be undefined",
"offset": 457,
"src": "if isinstance(item_type, RTuple):",
"target": "mypyc.codegen.emit"
}
],
"mypyc/codegen/emitclass.py": [
{
"code": "helpful-string",
"column": 44,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 253,
"src": "fields[f\"tp_{table_name}\"] = f\"&{table_struct_name}\"",
"target": "mypyc.codegen.emitclass.generate_class"
},
{
"code": "possibly-undefined",
"column": 54,
"message": "Name \"shadow_vtable_name\" may be undefined",
"offset": 110,
"src": "cl, setup_name, defaults_fn, vtable_name, shadow_vtable_name, emitter",
"target": "mypyc.codegen.emitclass"
}
],
"mypyc/codegen/emitfunc.py": [
{
"code": "possibly-undefined",
"column": 20,
"message": "Name \"dest\" may be undefined",
"offset": 453,
"src": "dest,",
"target": "mypyc.codegen.emitfunc"
},
{
"code": "possibly-undefined",
"column": 41,
"message": "Name \"dest\" may be undefined",
"offset": 33,
"src": "self.emitter.emit_line(f\"{dest} = 1;\")",
"target": "mypyc.codegen.emitfunc"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 142,
"src": "elif isinstance(op.value, Value):",
"target": "mypyc.codegen.emitfunc.FunctionEmitterVisitor.visit_raise_standard_error"
}
],
"mypyc/codegen/emitmodule.py": [
{
"code": "explicit-any",
"column": 8,
"message": "Explicit \"Any\" is not allowed",
"offset": 154,
"src": "ir_data: Any = json.loads(ir_json)",
"target": "mypyc.codegen.emitmodule.MypycPlugin.report_config_data"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "if hash_digest(meta_json) != ir_data[\"meta_hash\"]:",
"target": "mypyc.codegen.emitmodule.MypycPlugin.report_config_data"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if hash_digest(meta_json) != ir_data[\"meta_hash\"]:",
"target": "mypyc.codegen.emitmodule.MypycPlugin.report_config_data"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "for path, hash in ir_data[\"src_hashes\"].items():",
"target": "mypyc.codegen.emitmodule.MypycPlugin.report_config_data"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for path, hash in ir_data[\"src_hashes\"].items():",
"target": "mypyc.codegen.emitmodule.MypycPlugin.report_config_data"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "if hash != real_hash:",
"target": "mypyc.codegen.emitmodule.MypycPlugin.report_config_data"
},
{
"code": "any",
"column": 17,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 217,
"src": "cache_data = {",
"target": "mypyc.codegen.emitmodule.load_scc_from_cache"
},
{
"code": "explicit-any",
"column": 20,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "k.fullname: cast(",
"target": "mypyc.codegen.emitmodule.load_scc_from_cache"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "k.fullname: cast(",
"target": "mypyc.codegen.emitmodule.load_scc_from_cache"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 8,
"src": "modules = deserialize_modules(cache_data, ctx)",
"target": "mypyc.codegen.emitmodule.load_scc_from_cache"
}
],
"mypyc/codegen/literals.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 66,
"src": "elif isinstance(value, frozenset):",
"target": "mypyc.codegen.literals.Literals.record_literal"
},
{
"code": "redundant-expr",
"column": 13,
"message": "See https://kotlinisland.github.io/basedmypy/_refs.html#code-redundant-expr for more info",
"offset": 0,
"src": "elif isinstance(value, frozenset):",
"target": null
},
{
"code": "redundant-expr",
"column": 11,
"message": "Condition is always true",
"offset": 39,
"src": "if isinstance(value, frozenset):",
"target": "mypyc.codegen.literals.Literals.literal_index"
}
],
"mypyc/common.py": [
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 35,
"src": "SIZEOF_SIZE_T_SYSCONFIG: Final = sysconfig.get_config_var(\"SIZEOF_SIZE_T\")",
"target": "mypyc.common"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "int(SIZEOF_SIZE_T_SYSCONFIG)",
"target": "mypyc.common"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if SIZEOF_SIZE_T_SYSCONFIG is not None",
"target": "mypyc.common"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "MAX_SHORT_INT: Final = 2 ** (8 * int(SIZEOF_SIZE_T) - 2) - 1",
"target": "mypyc.common"
},
{
"code": "any",
"column": 23,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "MIN_SHORT_INT: Final = -(MAX_SHORT_INT) - 1",
"target": "mypyc.common"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "MIN_SHORT_INT: Final = -(MAX_SHORT_INT) - 1",
"target": "mypyc.common"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "MAX_LITERAL_SHORT_INT: Final = MAX_SHORT_INT",
"target": "mypyc.common"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "MIN_LITERAL_SHORT_INT: Final = -MAX_LITERAL_SHORT_INT - 1",
"target": "mypyc.common"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "MIN_LITERAL_SHORT_INT: Final = -MAX_LITERAL_SHORT_INT - 1",
"target": "mypyc.common"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 29,
"src": "JsonDict = dict[str, Any]",
"target": "mypyc.common"
}
],
"mypyc/crash.py": [
{
"code": "helpful-string",
"column": 56,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 31,
"src": "print(f\"{module_path}:{line}: {type(err).__name__}: {err}\")",
"target": "mypyc.crash.crash_report"
}
],
"mypyc/ir/class_ir.py": [
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 346,
"src": "return {",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 17,
"src": "\"attributes\": [(k, t.serialize()) for k, t in self.attributes.items()],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"attributes\": [(k, t.serialize()) for k, t in self.attributes.items()],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 3,
"src": "\"method_decls\": [",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"method_decls\": [",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 5,
"src": "\"methods\": [(k, m.id) for k, m in self.methods.items()],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"methods\": [(k, m.id) for k, m in self.methods.items()],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"glue_methods\": [",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"glue_methods\": [",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 5,
"src": "\"property_types\": [(k, t.serialize()) for k, t in self.property_types.items()],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 30,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"property_types\": [(k, t.serialize()) for k, t in self.property_types.items()],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"properties\": list(self.properties),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"properties\": list(self.properties),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 3,
"src": "\"trait_vtables\": [",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"trait_vtables\": [",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 5,
"src": "\"traits\": [cir.fullname for cir in self.traits],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"traits\": [cir.fullname for cir in self.traits],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"mro\": [cir.fullname for cir in self.mro],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 19,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"mro\": [cir.fullname for cir in self.mro],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"base_mro\": [cir.fullname for cir in self.base_mro],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"base_mro\": [cir.fullname for cir in self.base_mro],",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any] | None)\")",
"offset": 1,
"src": "\"children\": (",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 1,
"src": "[cir.fullname for cir in self.children] if self.children is not None else None",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"list[Any] | None\")",
"offset": 0,
"src": "[cir.fullname for cir in self.children] if self.children is not None else None",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 3,
"src": "\"attrs_with_defaults\": sorted(self.attrs_with_defaults),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 35,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"attrs_with_defaults\": sorted(self.attrs_with_defaults),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"_always_initialized_attrs\": sorted(self._always_initialized_attrs),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 41,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"_always_initialized_attrs\": sorted(self._always_initialized_attrs),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"_sometimes_initialized_attrs\": sorted(self._sometimes_initialized_attrs),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 44,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"_sometimes_initialized_attrs\": sorted(self._sometimes_initialized_attrs),",
"target": "mypyc.ir.class_ir.ClassIR.serialize"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "fullname = data[\"module_name\"] + \".\" + data[\"name\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert fullname in ctx.classes, \"Class %s not in deser class map\" % fullname",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 76,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert fullname in ctx.classes, \"Class %s not in deser class map\" % fullname",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir = ctx.classes[fullname]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 15,
"src": "ir.attributes = {k: deserialize_type(t, ctx) for k, t in data[\"attributes\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.attributes = {k: deserialize_type(t, ctx) for k, t in data[\"attributes\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.attributes = {k: deserialize_type(t, ctx) for k, t in data[\"attributes\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir.method_decls = {",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "k: ctx.functions[v].decl if isinstance(v, str) else FuncDecl.deserialize(v, ctx)",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 51,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "k: ctx.functions[v].decl if isinstance(v, str) else FuncDecl.deserialize(v, ctx)",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 85,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "k: ctx.functions[v].decl if isinstance(v, str) else FuncDecl.deserialize(v, ctx)",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "ir.methods = {k: ctx.functions[v] for k, v in data[\"methods\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.methods = {k: ctx.functions[v] for k, v in data[\"methods\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 39,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.methods = {k: ctx.functions[v] for k, v in data[\"methods\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 26,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir.glue_methods = {",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(ClassIR, Any)\")",
"offset": 1,
"src": "(ctx.classes[c], k): ctx.functions[v] for (c, k), v in data[\"glue_methods\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "(ctx.classes[c], k): ctx.functions[v] for (c, k), v in data[\"glue_methods\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "(ctx.classes[c], k): ctx.functions[v] for (c, k), v in data[\"glue_methods\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "(ctx.classes[c], k): ctx.functions[v] for (c, k), v in data[\"glue_methods\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 28,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "ir.property_types = {k: deserialize_type(t, ctx) for k, t in data[\"property_types\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.property_types = {k: deserialize_type(t, ctx) for k, t in data[\"property_types\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.property_types = {k: deserialize_type(t, ctx) for k, t in data[\"property_types\"]}",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir.properties = {",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "k: (ir.methods[k], ir.methods.get(PROPSET_PREFIX + k)) for k in data[\"properties\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "k: (ir.methods[k], ir.methods.get(PROPSET_PREFIX + k)) for k in data[\"properties\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "k: (ir.methods[k], ir.methods.get(PROPSET_PREFIX + k)) for k in data[\"properties\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 63,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "k: (ir.methods[k], ir.methods.get(PROPSET_PREFIX + k)) for k in data[\"properties\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "ir.trait_vtables = {",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 24,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ctx.classes[k]: deserialize_vtable(v, ctx) for k, v in data[\"trait_vtables\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ctx.classes[k]: deserialize_vtable(v, ctx) for k, v in data[\"trait_vtables\"]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "ir.traits = [ctx.classes[s] for s in data[\"traits\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.traits = [ctx.classes[s] for s in data[\"traits\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir.mro = [ctx.classes[s] for s in data[\"mro\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.mro = [ctx.classes[s] for s in data[\"mro\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir.base_mro = [ctx.classes[s] for s in data[\"base_mro\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.base_mro = [ctx.classes[s] for s in data[\"base_mro\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 43,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir.children = data[\"children\"] and [ctx.classes[s] for s in data[\"children\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "ir.children = data[\"children\"] and [ctx.classes[s] for s in data[\"children\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 56,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir.children = data[\"children\"] and [ctx.classes[s] for s in data[\"children\"]]",
"target": "mypyc.ir.class_ir.ClassIR.deserialize"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 25,
"src": "return {",
"target": "mypyc.ir.class_ir.serialize_vtable_entry"
},
{
"code": "any",
"column": 7,
"message": "Expression has type \"Any\"",
"offset": 14,
"src": "if data[\".class\"] == \"VTableMethod\":",
"target": "mypyc.ir.class_ir.deserialize_vtable_entry"
}
],
"mypyc/ir/func_ir.py": [
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 48,
"src": "return {",
"target": "mypyc.ir.func_ir.RuntimeArg.serialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 55,
"src": "return {\"args\": [t.serialize() for t in args], \"ret_type\": self.ret_type.serialize()}",
"target": "mypyc.ir.func_ir.FuncSignature.serialize"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 0,
"src": "return {\"args\": [t.serialize() for t in args], \"ret_type\": self.ret_type.serialize()}",
"target": "mypyc.ir.func_ir.FuncSignature.serialize"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "return {\"args\": [t.serialize() for t in args], \"ret_type\": self.ret_type.serialize()}",
"target": "mypyc.ir.func_ir.FuncSignature.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 5,
"src": "[RuntimeArg.deserialize(arg, ctx) for arg in data[\"args\"]],",
"target": "mypyc.ir.func_ir.FuncSignature.deserialize"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[RuntimeArg.deserialize(arg, ctx) for arg in data[\"args\"]],",
"target": "mypyc.ir.func_ir.FuncSignature.deserialize"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 90,
"src": "return {",
"target": "mypyc.ir.func_ir.FuncDecl.serialize"
},
{
"code": "any",
"column": 47,
"message": "Expression has type \"Any\"",
"offset": 16,
"src": "shortname = FuncDecl.compute_shortname(decl[\"class_name\"], decl[\"name\"])",
"target": "mypyc.ir.func_ir.FuncDecl.get_id_from_json"
},
{
"code": "any",
"column": 67,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "shortname = FuncDecl.compute_shortname(decl[\"class_name\"], decl[\"name\"])",
"target": "mypyc.ir.func_ir.FuncDecl.get_id_from_json"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "fullname = decl[\"module_name\"] + \".\" + shortname",
"target": "mypyc.ir.func_ir.FuncDecl.get_id_from_json"
},
{
"code": "any",
"column": 32,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return get_id_from_name(decl[\"name\"], fullname, func_ir[\"line\"])",
"target": "mypyc.ir.func_ir.FuncDecl.get_id_from_json"
},
{
"code": "any",
"column": 46,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return get_id_from_name(decl[\"name\"], fullname, func_ir[\"line\"])",
"target": "mypyc.ir.func_ir.FuncDecl.get_id_from_json"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 85,
"src": "return {",
"target": "mypyc.ir.func_ir.FuncIR.serialize"
}
],
"mypyc/ir/module_ir.py": [
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 35,
"src": "return {",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 3,
"src": "\"functions\": [f.serialize() for f in self.functions],",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 25,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"functions\": [f.serialize() for f in self.functions],",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"classes\": [c.serialize() for c in self.classes],",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"classes\": [c.serialize() for c in self.classes],",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"(str, list[Any])\")",
"offset": 1,
"src": "\"final_names\": [(k, t.serialize()) for k, t in self.final_names],",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 0,
"src": "\"final_names\": [(k, t.serialize()) for k, t in self.final_names],",
"target": "mypyc.ir.module_ir.ModuleIR.serialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "[ctx.functions[FuncDecl.get_id_from_json(f)] for f in data[\"functions\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 53,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[ctx.functions[FuncDecl.get_id_from_json(f)] for f in data[\"functions\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[ClassIR.deserialize(c, ctx) for c in data[\"classes\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 33,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[ClassIR.deserialize(c, ctx) for c in data[\"classes\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "[(k, deserialize_type(t, ctx)) for k, t in data[\"final_names\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"(Any, RType)\")",
"offset": 0,
"src": "[(k, deserialize_type(t, ctx)) for k, t in data[\"final_names\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 14,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[(k, deserialize_type(t, ctx)) for k, t in data[\"final_names\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "[(k, deserialize_type(t, ctx)) for k, t in data[\"final_names\"]],",
"target": "mypyc.ir.module_ir.ModuleIR.deserialize"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 22,
"src": "for cls in mod[\"classes\"]:",
"target": "mypyc.ir.module_ir.deserialize_modules"
},
{
"code": "any",
"column": 25,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "ir = ClassIR(cls[\"name\"], cls[\"module_name\"])",
"target": "mypyc.ir.module_ir.deserialize_modules"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "ir = ClassIR(cls[\"name\"], cls[\"module_name\"])",
"target": "mypyc.ir.module_ir.deserialize_modules"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 7,
"src": "for method in mod[\"functions\"]:",
"target": "mypyc.ir.module_ir.deserialize_modules"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "func = FuncIR.deserialize(method, ctx)",
"target": "mypyc.ir.module_ir.deserialize_modules"
}
],
"mypyc/ir/ops.py": [
{
"code": "helpful-string",
"column": 50,
"message": "The type \"mypyc.ir.ops.ControlOp\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 321,
"src": "raise AssertionError(f\"Invalid set_target({self}, {i})\")",
"target": "mypyc.ir.ops.ControlOp.set_target"
}
],
"mypyc/ir/pprint.py": [
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 208,
"src": "elif isinstance(op.value, Value):",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.visit_raise_standard_error"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always true",
"offset": 19,
"src": "if arg_type:",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.visit_primitive_op"
},
{
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 4,
"src": "assert op.type_args",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.visit_primitive_op"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 81,
"src": "def format(self, fmt: str, *args: Any) -> str:",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 18,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 14,
"src": "arglist = list(args)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "arglist = list(args)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 8,
"src": "arg = arglist.pop(0)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 22,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "arg = arglist.pop(0)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "assert isinstance(arg, Value)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 9,
"src": "result.append(\"%d\" % arg)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 41,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "result.append(\"%f\" % arg)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 3,
"src": "assert isinstance(arg, BasicBlock)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "assert isinstance(arg, RType)",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
},
{
"code": "any",
"column": 38,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "result.append(str(arg))",
"target": "mypyc.ir.pprint.IRPrettyPrintVisitor.format"
}
],
"mypyc/ir/rtypes.py": [
{
"code": "any",
"column": 9,
"message": "Expression has type \"Any\"",
"offset": 101,
"src": "elif data[\".class\"] == \"RTuple\":",
"target": "mypyc.ir.rtypes.deserialize_type"
},
{
"code": "any",
"column": 9,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "elif data[\".class\"] == \"RUnion\":",
"target": "mypyc.ir.rtypes.deserialize_type"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 556,
"src": "return {\".class\": \"RTuple\", \"types\": types}",
"target": "mypyc.ir.rtypes.RTuple.serialize"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "types = [deserialize_type(t, ctx) for t in data[\"types\"]]",
"target": "mypyc.ir.rtypes.RTuple.deserialize"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "types = [deserialize_type(t, ctx) for t in data[\"types\"]]",
"target": "mypyc.ir.rtypes.RTuple.deserialize"
},
{
"code": "any",
"column": 23,
"message": "Expression type contains \"Any\" (has type \"dict[RType, Any | None]\")",
"offset": 214,
"src": "unique_items = dict.fromkeys(items)",
"target": "mypyc.ir.rtypes.RUnion.make_simplified_union"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[RType, Any | None]\")",
"offset": 1,
"src": "if len(unique_items) > 1:",
"target": "mypyc.ir.rtypes.RUnion.make_simplified_union"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"dict[RType, Any | None]\")",
"offset": 1,
"src": "return RUnion(list(unique_items))",
"target": "mypyc.ir.rtypes.RUnion.make_simplified_union"
},
{
"code": "any",
"column": 29,
"message": "Expression type contains \"Any\" (has type \"dict[RType, Any | None]\")",
"offset": 2,
"src": "return next(iter(unique_items))",
"target": "mypyc.ir.rtypes.RUnion.make_simplified_union"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 20,
"src": "return {\".class\": \"RUnion\", \"types\": types}",
"target": "mypyc.ir.rtypes.RUnion.serialize"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "types = [deserialize_type(t, ctx) for t in data[\"types\"]]",
"target": "mypyc.ir.rtypes.RUnion.deserialize"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "types = [deserialize_type(t, ctx) for t in data[\"types\"]]",
"target": "mypyc.ir.rtypes.RUnion.deserialize"
}
],
"mypyc/irbuild/builder.py": [
{
"code": "any",
"column": 13,
"message": "Expression has type \"Any\"",
"offset": 271,
"src": "with self.catch_errors(node.line):",
"target": "mypyc.irbuild.builder.IRBuilder.accept"
},
{
"code": "helpful-string",
"column": 46,
"message": "The string for \"None\" isn't helpful in a user-facing or semantic string",
"offset": 303,
"src": "error_msg=f'value for final name \"{error_name}\" was not set',",
"target": "mypyc.irbuild.builder.IRBuilder.load_final_static"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 33,
"src": "elif isinstance(val, complex):",
"target": "mypyc.irbuild.builder.IRBuilder.load_literal_value"
},
{
"code": "redundant-expr",
"column": 15,
"message": "Condition is always true",
"offset": 89,
"src": "if reg is not None:",
"target": "mypyc.irbuild.builder.IRBuilder.read"
},
{
"code": "possibly-undefined",
"column": 19,
"message": "Name \"fullname\" may be undefined",
"offset": 364,
"src": "return fullname, final_var, native",
"target": "mypyc.irbuild.builder"
},
{
"code": "possibly-undefined",
"column": 40,
"message": "Name \"native\" may be undefined",
"offset": 0,
"src": "return fullname, final_var, native",
"target": "mypyc.irbuild.builder"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 308,
"src": "def catch_errors(self, line: int) -> Any:",
"target": "mypyc.irbuild.builder.IRBuilder.catch_errors"
}
],
"mypyc/irbuild/classdef.py": [
{
"code": "any",
"column": 21,
"message": "Expression has type \"Any\"",
"offset": 145,
"src": "with builder.catch_errors(stmt.line):",
"target": "mypyc.irbuild.classdef.transform_class_def"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any\"",
"offset": 8,
"src": "with builder.catch_errors(stmt.line):",
"target": "mypyc.irbuild.classdef.transform_class_def"
},
{
"code": "redundant-expr",
"column": 23,
"message": "Condition is always false",
"offset": 399,
"src": "if isinstance(typing_extensions.TypedDict, type):",
"target": "mypyc.irbuild.classdef.populate_non_ext_bases"
},
{
"code": "unreachable",
"column": 34,
"message": "Intersection of \" & type\" cannot exist: \"_SpecialForm\" is final",
"offset": 0,
"src": "if isinstance(typing_extensions.TypedDict, type):",
"target": "mypyc.irbuild.classdef.populate_non_ext_bases"
}
],
"mypyc/irbuild/env_class.py": [
{
"code": "helpful-string",
"column": 46,
"message": "The type \"mypyc.ir.ops.Value\" doesn't define a __format__, __str__ or __repr__ method",
"offset": 129,
"src": "assert isinstance(env.type, RInstance), f\"{env} must be of type RInstance\"",
"target": "mypyc.irbuild.env_class.load_outer_env"
}
],
"mypyc/irbuild/expression.py": [
{
"code": "any",
"column": 45,
"message": "Expression has type \"Any\"",
"offset": 228,
"src": "index = builder.builder.load_int(fields.index(expr.name))",
"target": "mypyc.irbuild.expression.transform_member_expr"
},
{
"code": "any",
"column": 35,
"message": "Expression has type \"Any\"",
"offset": 399,
"src": "end = builder.load_int(MAX_SHORT_INT)",
"target": "mypyc.irbuild.expression.try_gen_slice_op"
},
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 249,
"src": "elif isinstance(rhs, Expression):",
"target": "mypyc.irbuild.expression.translate_printf_style_formatting"
}
],
"mypyc/irbuild/for_helpers.py": [
{
"code": "truthy-bool",
"column": 15,
"message": "\"value_box\" has type \"Value\" which does not implement __bool__ or __len__ so it could always be true in boolean context",
"offset": 754,
"src": "assert value_box",
"target": "mypyc.irbuild.for_helpers.ForSequence.begin_body"
}
],
"mypyc/irbuild/function.py": [
{
"code": "possibly-undefined",
"column": 33,
"message": "Name \"func_ir\" may be undefined",
"offset": 349,
"src": "builder.functions.append(func_ir)",
"target": "mypyc.irbuild.function"
},
{
"code": "possibly-undefined",
"column": 11,
"message": "Name \"func_ir\" may be undefined",
"offset": 5,
"src": "return func_ir, func_reg",
"target": "mypyc.irbuild.function"
}
],
"mypyc/irbuild/ll_builder.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 502,
"src": "elif is_uint8_rprimitive(target_type):",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.coerce_int_to_fixed_width"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 42,
"src": "c1 = self.add(ComparisonOp(src, Integer(MAX_SHORT_INT, src_type), ComparisonOp.SLE))",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.coerce_fixed_width_to_int"
},
{
"code": "any",
"column": 48,
"message": "Expression has type \"Any\"",
"offset": 4,
"src": "c2 = self.add(ComparisonOp(src, Integer(MIN_SHORT_INT, src_type), ComparisonOp.SGE))",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.coerce_fixed_width_to_int"
},
{
"code": "possibly-undefined",
"column": 27,
"message": "Name \"skip\" may be undefined",
"offset": 311,
"src": "assert skip is not out",
"target": "mypyc.irbuild.ll_builder"
},
{
"code": "possibly-undefined",
"column": 35,
"message": "Name \"coerced_args\" may be undefined",
"offset": 90,
"src": "self.add(KeepAlive(coerced_args))",
"target": "mypyc.irbuild.ll_builder"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Any\"",
"offset": 302,
"src": "if value > MAX_LITERAL_SHORT_INT or value < MIN_LITERAL_SHORT_INT:",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.load_int"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if value > MAX_LITERAL_SHORT_INT or value < MIN_LITERAL_SHORT_INT:",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.load_int"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if value > MAX_LITERAL_SHORT_INT or value < MIN_LITERAL_SHORT_INT:",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.load_int"
},
{
"code": "any",
"column": 52,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "if value > MAX_LITERAL_SHORT_INT or value < MIN_LITERAL_SHORT_INT:",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.load_int"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 870,
"src": "elif is_uint8_rprimitive(type):",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.fixed_width_int_op"
},
{
"code": "redundant-expr",
"column": 17,
"message": "Condition is always true",
"offset": 20,
"src": "elif is_uint8_rprimitive(type):",
"target": "mypyc.irbuild.ll_builder.LowLevelIRBuilder.fixed_width_int_op"
},
{
"code": "possibly-undefined",
"column": 36,
"message": "Name \"false_block\" may be undefined",
"offset": 194,
"src": "self.activate_block(false_block)",
"target": "mypyc.irbuild.ll_builder"
}
],
"mypyc/irbuild/main.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 47,
"src": "F = TypeVar(\"F\", bound=Callable[..., Any])",
"target": "mypyc.irbuild.main"
},
{
"code": "explicit-any",
"column": 22,
"message": "Explicit \"Any\" is not allowed",
"offset": 1,
"src": "strict_optional_dec = cast(Callable[[F], F], state.strict_optional_set(True))",
"target": "mypyc.irbuild.main"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"[F: (...) -> Any] (F) -> F\")",
"offset": 0,
"src": "strict_optional_dec = cast(Callable[[F], F], state.strict_optional_set(True))",
"target": "mypyc.irbuild.main"
},
{
"code": "any",
"column": 1,
"message": "Expression type contains \"Any\" (has type \"[F: (...) -> Any] (F) -> F\")",
"offset": 3,
"src": "@strict_optional_dec # Turn on strict optional for any type manipulations we do",
"target": "mypyc.irbuild.main"
}
],
"mypyc/irbuild/prepare.py": [
{
"code": "redundant-expr",
"column": 9,
"message": "Condition is always true",
"offset": 205,
"src": "elif isinstance(node, Decorator):",
"target": "mypyc.irbuild.prepare.prepare_method_def"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 72,
"src": "attrs = get_mypyc_attrs(cdef)",
"target": "mypyc.irbuild.prepare.prepare_class_def"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "if attrs.get(\"allow_interpreted_subclasses\") is True:",
"target": "mypyc.irbuild.prepare.prepare_class_def"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "if attrs.get(\"allow_interpreted_subclasses\") is True:",
"target": "mypyc.irbuild.prepare.prepare_class_def"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "if attrs.get(\"serializable\") is True:",
"target": "mypyc.irbuild.prepare.prepare_class_def"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"Any | None\")",
"offset": 0,
"src": "if attrs.get(\"serializable\") is True:",
"target": "mypyc.irbuild.prepare.prepare_class_def"
}
],
"mypyc/irbuild/statement.py": [
{
"code": "possibly-undefined",
"column": 7,
"message": "Name \"next_block\" may be undefined",
"offset": 516,
"src": "if next_block:",
"target": "mypyc.irbuild.statement"
}
],
"mypyc/irbuild/util.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 86,
"src": "def get_mypyc_attr_literal(e: Expression) -> Any:",
"target": "mypyc.irbuild.util.get_mypyc_attr_literal"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 26,
"src": "def get_mypyc_attrs(stmt: ClassDef | Decorator) -> dict[str, Any]:",
"target": "mypyc.irbuild.util.get_mypyc_attrs"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "attrs: dict[str, Any] = {}",
"target": "mypyc.irbuild.util.get_mypyc_attrs"
},
{
"code": "any",
"column": 24,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 7,
"src": "attrs[arg.value] = True",
"target": "mypyc.irbuild.util.get_mypyc_attrs"
},
{
"code": "any",
"column": 20,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "attrs[name] = get_mypyc_attr_literal(arg)",
"target": "mypyc.irbuild.util.get_mypyc_attrs"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "attrs[name] = get_mypyc_attr_literal(arg)",
"target": "mypyc.irbuild.util.get_mypyc_attrs"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "return attrs",
"target": "mypyc.irbuild.util.get_mypyc_attrs"
}
],
"mypyc/subtype.py": [
{
"code": "redundant-expr",
"column": 13,
"message": "Condition is always true",
"offset": 67,
"src": "elif is_fixed_width_rtype(left):",
"target": "mypyc.subtype.SubtypeVisitor.visit_rprimitive"
}
],
"mypyc/test/test_exceptions.py": [
{
"code": "any",
"column": 57,
"message": "Expression type contains \"Any\" (has type \"list[Any]\")",
"offset": 54,
"src": "actual.append(\"hot blocks: %s\" % sorted(b.label for b in common))",
"target": "mypyc.test.test_exceptions.TestExceptionTransform.run_case"
},
{
"code": "any",
"column": 63,
"message": "Expression type contains \"Any\" (has type \"Generator[Any, None, None]\")",
"offset": 0,
"src": "actual.append(\"hot blocks: %s\" % sorted(b.label for b in common))",
"target": "mypyc.test.test_exceptions.TestExceptionTransform.run_case"
}
],
"mypyc/test/test_external.py": [
{
"code": "any",
"column": 5,
"message": "Expression type contains \"Any\" (has type \"[_FT: (...) -> Any] (_FT) -> _FT\")",
"offset": 17,
"src": "@unittest.skipIf(sys.platform.startswith(\"win\"), \"rt tests don't work on windows\")",
"target": "mypyc.test.test_external"
}
],
"mypyc/test/test_run.py": [
{
"code": "any",
"column": 16,
"message": "Expression has type \"Untyped\"",
"offset": 194,
"src": "bench = testcase.config.getoption(\"--bench\", False) and \"Benchmark\" in testcase.name",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 16,
"message": "Expression type contains \"Any\" (has type \"Any (unannotated) | bool\")",
"offset": 0,
"src": "bench = testcase.config.getoption(\"--bench\", False) and \"Benchmark\" in testcase.name",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 12,
"message": "Expression has type \"Any\"",
"offset": 45,
"src": "self.get_separate(\"\\n\".join(testcase.input), incremental_step)",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "self.get_separate(\"\\n\".join(testcase.input), incremental_step)",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 5,
"src": "groups = construct_groups(sources, separate, len(module_names) > 1)",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 40,
"src": "module_paths, separate, cfiles, self.multi_file, opt_level, debug_level",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Untyped\"",
"offset": 5,
"src": "if testcase.config.getoption(\"--mypyc-showc\"):",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 40,
"message": "Expression type contains \"Any\" (has type \"Any (unannotated) | bool\")",
"offset": 17,
"src": "env[\"MYPYC_RUN_BENCH\"] = \"1\" if bench else \"0\"",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "no-untyped-usage",
"column": 8,
"message": "Usage of untyped name \"debugger\" in typed context",
"offset": 2,
"src": "debugger = testcase.config.getoption(\"debugger\")",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Untyped\"",
"offset": 0,
"src": "debugger = testcase.config.getoption(\"debugger\")",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Untyped\"",
"offset": 1,
"src": "if debugger:",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Untyped\"",
"offset": 1,
"src": "if debugger == \"lldb\":",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any (unannotated)\"",
"offset": 0,
"src": "if debugger == \"lldb\":",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Untyped\"",
"offset": 2,
"src": "elif debugger == \"gdb\":",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 17,
"message": "Expression has type \"Any (unannotated)\"",
"offset": 0,
"src": "elif debugger == \"gdb\":",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 11,
"message": "Expression has type \"Untyped\"",
"offset": 23,
"src": "if testcase.config.getoption(\"--mypyc-showc\"):",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 2,
"src": "if proc.returncode != 0:",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 21,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 2,
"src": "signal = proc.returncode == -11",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 2,
"src": "if signal:",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 3,
"src": "if signal and not sys.platform.startswith(\"win\"):",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"Any | bool\")",
"offset": 0,
"src": "if signal and not sys.platform.startswith(\"win\"):",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "no-untyped-usage",
"column": 20,
"message": "Usage of untyped name \"debugger\" in typed context",
"offset": 5,
"src": "debugger = \"gdb\"",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 61,
"message": "Expression has type \"Untyped\"",
"offset": 2,
"src": "f'hint: Use \"pytest -n0 -s --mypyc-debug={debugger} -k \" to run test in debugger'",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"Any (unannotated) | bool\")",
"offset": 7,
"src": "if bench:",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"bool | Any\")",
"offset": 32,
"src": "assert proc.returncode == 0",
"target": "mypyc.test.test_run.TestRun.run_case_step"
},
{
"code": "explicit-any",
"column": 4,
"message": "Explicit \"Any\" is not allowed",
"offset": 2,
"src": "def get_separate(self, program_text: str, incremental_step: int) -> Any:",
"target": "mypyc.test.test_run.TestRun.get_separate"
},
{
"code": "any",
"column": 19,
"message": "Expression has type \"Any\"",
"offset": 6,
"src": "return ast.literal_eval(safe(m.group(1)))",
"target": "mypyc.test.test_run.TestRun.get_separate"
}
],
"mypyc/test/test_serialization.py": [
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 19,
"src": "def get_dict(x: Any) -> dict[str, Any]:",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if hasattr(x, \"__mypyc_attrs__\"):",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 15,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 30,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 42,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 71,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 74,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "return {k: getattr(x, k) for k in x.__mypyc_attrs__ if hasattr(x, k)}",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "return dict(x.__dict__)",
"target": "mypyc.test.test_serialization.get_dict"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def get_function_dict(x: FuncIR) -> dict[str, Any]:",
"target": "mypyc.test.test_serialization.get_function_dict"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "d = get_dict(x)",
"target": "mypyc.test.test_serialization.get_function_dict"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "d.pop(\"blocks\", None)",
"target": "mypyc.test.test_serialization.get_function_dict"
},
{
"code": "any",
"column": 4,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "d.pop(\"env\", None)",
"target": "mypyc.test.test_serialization.get_function_dict"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 1,
"src": "return d",
"target": "mypyc.test.test_serialization.get_function_dict"
},
{
"code": "explicit-any",
"column": 0,
"message": "Explicit \"Any\" is not allowed",
"offset": 3,
"src": "def assert_blobs_same(x: Any, y: Any, trail: tuple[Any, ...]) -> None:",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 11,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 16,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 16,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 22,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 31,
"message": "Expression type contains \"Any\" (has type \"(str, type[Any], type[Any])\")",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 51,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 61,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 66,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 70,
"message": "Expression type contains \"Any\" (has type \"type[Any]\")",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 75,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert type(x) is type(y), (f\"Type mismatch at {trail}\", type(x), type(y))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 18,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "if isinstance(x, (FuncDecl, FuncIR, ClassIR)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert x.fullname == y.fullname, f\"Name mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 29,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert x.fullname == y.fullname, f\"Name mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 60,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert x.fullname == y.fullname, f\"Name mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(x, dict):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert len(x.keys()) == len(y.keys()), f\"Keys mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 66,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert len(x.keys()) == len(y.keys()), f\"Keys mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"((Any, Any), Any)\")",
"offset": 1,
"src": "for (xk, xv), (yk, yv) in zip(x.items(), y.items()):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for (xk, xv), (yk, yv) in zip(x.items(), y.items()):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 34,
"message": "Expression type contains \"Any\" (has type \"zip[((Any, Any), Any)]\")",
"offset": 0,
"src": "for (xk, xv), (yk, yv) in zip(x.items(), y.items()):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for (xk, xv), (yk, yv) in zip(x.items(), y.items()):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert_blobs_same(xk, yk, trail + (\"keys\",))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert_blobs_same(xk, yk, trail + (\"keys\",))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert_blobs_same(xv, yv, trail + (xk,))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert_blobs_same(xv, yv, trail + (xk,))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(x, dict):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert x.keys() == y.keys(), f\"Keys mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 27,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert x.keys() == y.keys(), f\"Keys mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 56,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert x.keys() == y.keys(), f\"Keys mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "assert_blobs_same(x[k], y[k], trail + (k,))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert_blobs_same(x[k], y[k], trail + (k,))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(x, Iterable) and not isinstance(x, (str, set)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(int, (Any, Any))\")",
"offset": 4,
"src": "for i, (xv, yv) in enumerate(zip(x, y)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 8,
"message": "Expression type contains \"Any\" (has type \"(Any, Any)\")",
"offset": 0,
"src": "for i, (xv, yv) in enumerate(zip(x, y)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 8,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for i, (xv, yv) in enumerate(zip(x, y)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 27,
"message": "Expression type contains \"Any\" (has type \"enumerate[(Any, Any)]\")",
"offset": 0,
"src": "for i, (xv, yv) in enumerate(zip(x, y)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 37,
"message": "Expression type contains \"Any\" (has type \"zip[(Any, Any)]\")",
"offset": 0,
"src": "for i, (xv, yv) in enumerate(zip(x, y)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 44,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "for i, (xv, yv) in enumerate(zip(x, y)):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 34,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert_blobs_same(xv, yv, trail + (i,))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 38,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert_blobs_same(xv, yv, trail + (i,))",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(x, RType):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 31,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert is_same_type(x, y), f\"RType mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 55,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert is_same_type(x, y), f\"RType mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "elif isinstance(x, FuncSignature):",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 36,
"message": "Expression has type \"Any\"",
"offset": 1,
"src": "assert is_same_signature(x, y), f\"Signature mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 64,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert is_same_signature(x, y), f\"Signature mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 2,
"src": "assert x == y, f\"Value mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 20,
"message": "Expression has type \"Any\"",
"offset": 0,
"src": "assert x == y, f\"Value mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 43,
"message": "Expression type contains \"Any\" (has type \"tuple[Any, ...]\")",
"offset": 0,
"src": "assert x == y, f\"Value mismatch at {trail}\"",
"target": "mypyc.test.test_serialization.assert_blobs_same"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 15,
"src": "assert_blobs_same(get_dict(cls1), get_dict(cls2), (ir1.fullname, cls1.fullname))",
"target": "mypyc.test.test_serialization.assert_modules_same"
},
{
"code": "any",
"column": 42,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "assert_blobs_same(get_dict(cls1), get_dict(cls2), (ir1.fullname, cls1.fullname))",
"target": "mypyc.test.test_serialization.assert_modules_same"
},
{
"code": "any",
"column": 12,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 4,
"src": "get_function_dict(fn1), get_function_dict(fn2), (ir1.fullname, fn1.fullname)",
"target": "mypyc.test.test_serialization.assert_modules_same"
},
{
"code": "any",
"column": 36,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "get_function_dict(fn1), get_function_dict(fn2), (ir1.fullname, fn1.fullname)",
"target": "mypyc.test.test_serialization.assert_modules_same"
},
{
"code": "any",
"column": 26,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 2,
"src": "assert_blobs_same(get_dict(fn1.decl), get_dict(fn2.decl), (ir1.fullname, fn1.fullname))",
"target": "mypyc.test.test_serialization.assert_modules_same"
},
{
"code": "any",
"column": 46,
"message": "Expression type contains \"Any\" (has type \"dict[str, Any]\")",
"offset": 0,
"src": "assert_blobs_same(get_dict(fn1.decl), get_dict(fn2.decl), (ir1.fullname, fn1.fullname))",
"target": "mypyc.test.test_serialization.assert_modules_same"
}
],
"mypyc/test/testutil.py": [
{
"code": "possibly-undefined",
"column": 11,
"message": "Name \"default_builtins\" may be undefined",
"offset": 67,
"src": "if default_builtins:",
"target": "mypyc.test.testutil"
},
{
"code": "possibly-undefined",
"column": 22,
"message": "Name \"builtins\" may be undefined",
"offset": 2,
"src": "os.remove(builtins)",
"target": "mypyc.test.testutil"
},
{
"code": "possibly-undefined",
"column": 7,
"message": "Name \"default_builtins\" may be undefined",
"offset": 19,
"src": "if default_builtins:",
"target": "mypyc.test.testutil"
},
{
"code": "possibly-undefined",
"column": 18,
"message": "Name \"builtins\" may be undefined",
"offset": 2,
"src": "os.remove(builtins)",
"target": "mypyc.test.testutil"
},
{
"code": "any",
"column": 7,
"message": "Expression type contains \"Any\" (has type \"False | Untyped\")",
"offset": 96,
"src": "if expected_output != actual and testcase.config.getoption(\"--update-data\", False):",
"target": "mypyc.test.testutil.assert_test_output"
},
{
"code": "any",
"column": 37,
"message": "Expression has type \"Untyped\"",
"offset": 0,
"src": "if expected_output != actual and testcase.config.getoption(\"--update-data\", False):",
"target": "mypyc.test.testutil.assert_test_output"
}
]
},
"format": "1.7",
"targets": [
"package:mypy",
"package:mypyc"
]
}
================================================
FILE: .pre-commit-config.yaml
================================================
exclude: '^(mypyc/external/)|(mypy/typeshed/)|misc/typeshed_patches' # Exclude all vendored code from lints
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: "^.mypy/baseline.json$|^.idea/"
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
exclude: '^(test-data/)'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.0
hooks:
- id: check-github-workflows
- id: check-github-actions
- id: check-readthedocs
- repo: https://github.com/rhysd/actionlint
rev: v1.7.6
hooks:
- id: actionlint
args: [
-ignore=property "debug_build" is not defined,
-ignore=property "allow_failure" is not defined,
-ignore=SC2(046|086),
]
additional_dependencies:
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions
# and checks these with shellcheck. This is arguably its most useful feature,
# but the integration only works if shellcheck is installed
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.10.0"
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.0.1
hooks:
- id: zizmor
# Should be the last one:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
ci:
autoupdate_schedule: quarterly
================================================
FILE: .readthedocs.yaml
================================================
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
sphinx:
configuration: docs/source/conf.py
formats: [pdf, htmlzip, epub]
python:
install:
- requirements: docs/requirements-docs.txt
================================================
FILE: CHANGELOG.md
================================================
# Basedmypy Changelog
## [Unreleased]
### Changes
- don't error on missing arguments on `types.FunctionType` and `types.BuiltinFunctionType`
### Fixed
- allow `@final` decorator on `Protocol` classes with abstract attributes (#867)
## [2.10.0]
### Changes
- codes for `Any` related errors haves been adjusted
## [2.9.1]
### Fixed
- definition of `functools.cache` and `operator.attrgetter`
## [2.9.0]
### Added
- `collections.User*` should have `__repr__`
### Fixed
- cache modules that only have baseline errors
## [2.8.1]
### Fixes
- `stubtest`: the `__bool__` method of function parameter defaults will no longer be unnecessarily evaluated
## [2.8.0]
### Added
- ban variance on `TypeVar` definitions (#817)
- enforce `TypeVar` constraints on type applications (#817)
### Fixes
- check type args on type aliases (#817)
- cache modules that only have baseline errors
- fix dmypy in vscode
- fix `typing.Callable`
### Docs
- correct error code documentation regarding defaults
## [2.7.0]
### Added
- typed `functools.wraps` correctly
- typed `builtins.ellipsis`/`types.EllipsisType` correctly
- disable `bytearray` and `memoryview` promotions by default
- support `typing.type_check_only`
- support default values on type parameters
- support based type notation in type alias statements
- support `basedtyping.FunctionType`
### Fixes
- fixed crash with `re` plugin
- fixed crash with `Intersection` cache
- fixed definition of `types.NoneType`
### Enhancements
- fixed default configuration in the docs
## [2.6.0]
### Added
- Any parameter `_` will be inferred as `object` (#687)
- `work_not_properly_function_names` made available to per module configuration (#699)
- Support `BASEDMYPY_TYPE_CHECKING` (#702)
- Enable stub mode within `TYPE_CHECKING` branches (#702)
- Infer from overloads - add default value in impl (#697)
- Warn for missing returns with explicit `Any` return types (#715)
### Fixes
- positional arguments on overloads break super (#697)
- positional arguments on overloads duplicate unions (#697)
- fix intersection type aliases (#716)
## [2.5.0]
### Added
- `Callable` syntax (`(int) -> str`) (#619)
- `FunctionType` syntax (`def (int) -> str`) (#619)
### Fixes
- `Callable` is no longer `types.FunctionType` (#619)
## [2.4.0]
## [2.3.0]
### Added
- f-string format specs are checked (#543)
- Narrow type on initial assignment (#547)
- Annotations in function bodies are not analyzed as evaluated (#564)
- Invalid `cast`s show an error (#573)
- Argument names are validated for subtypes (#562)
- Type-guards narrow in the negative (#553)
- Conditional types for asymmetric type-guards (#553)
- Static conditions report an error (#553)
- Regex groups are special-cased (#531)
- f-strings will show an error if the value doesn't define a stringification (#565)
### Enhancements
- Show 'narrowed from' in `reveal_type` (#550)
- `--color-output` is enabled by default (#531)
- `--ide` will disable color-output (#531)
- Output lines won't wrap if not connected to a terminal (#531)
### Fixes
- Render star args in error messages properly (#551)
- The first argument to `cast` is analyzed as evaluated (#564)
- Decorated functions that return `None` correctly warn when used (#572)
- Some impossible type-guards were not reporting an error (#553)
## [2.2.1]
### Fixes
- explicit-override is re-enabled by default
## [2.2.0]
### Added
- type-guards have been reworked from the ground up (#516)
- `TypeGuard` is retained in inferred types (#504)
- Type narrowing is applied from lambda execution (#504)
- `--ide` flag (#501)
### Enhancements
- `show-error-context`/`pretty` are now on by default (#501)
- Show fake column number when `--show-error-end` (#501)
- Error messages point to basedmypy docs (#516)
- `Callable` types in error messages don't contain `mypy_extensions` (#516)
### Fixes
- Don't show "X defined here" when error context is hidden (#498)
- Fix issue with reveal code in ignore message (#490)
- Fixed union at join for same `type` literals. (#488)
- Don't report false `Any` expressions when inferring lambda type (#515)
- Correctly match overload when it contains an `Any` expression (#515)
- Fixed the variance of `Mapping`s key type (#527)
## [2.1.0]
## [2.0.0]
### Added
- Deprecate python 3.7 support (#457)
- Allow denotation of tuple types with tuple literals (#458)
- Removed `--legacy` flag in favour of `--no-strict` (#445)
- `default-return` is now enabled by default (#445)
### Enhancements
- Removed `Any` from the typings for `re.Match` group functions. (#459)
- Ignore `Any` from unused `__init__`. (#321)
### Fixes
- Fix unsafe variance note (#452)
- Fix crash with baseline filtering (#471)
## [1.8.0]
### Added
- `Intersection` type (#357)
## [1.7.0]
### Added
- `ignore-missing-py-typed` to use types even if there is no `py.typed` (#337)
### Fixes
- Errors regarding inferred functions didn't have a note (#394)
- Type ignored calls to incomplete functions left a phantom note (#395)
- Fix incorrect plural in summary message (#386)
### Enhancements
- Baseline now stores the source code for better matching (#415)
- Duplicates are no longer stored in the baseline (#231)
## [1.6.0]
### Added
- Support using `TypeVar`s in the bounds of other `TypeVar`s
### Enhancements
- Similar errors on the same line will now not be removed
- Render generic upper bound with `: ` instead of ` <: `
- Render uninhabited type as `Never` instead of ``
- Render Callables with `-> None`
### Fixes
- Handle positional only `/` parameters in overload implementation inference
- Render inferred literal without `?`
- Fix infer from defaults for inner functions
## [1.5.0]
### Added
- Allow literal `int`, `bool` and `Enum`s without `Literal`
### Enhancements
- Unionize at type joins instead of common ancestor
- Render Literal types better in output messages
## [1.4.0]
### Added
- `ignore_any_from_errors` option to suppress `no-any-expr` messages from other errors
- Function types are inferred from Overloads, overrides and default values. (no overrides for now sorry)
- Infer Property types
- Calls to incomplete functions are an error (configurable with `incomplete_is_typed`)
- Added a new type `Untyped`, it's like `Any`, but more specific
- Added a dependency on `basedtyping`
### Enhancements
- Render types a lot better in output messages
### Fixes
- `types.NoneType` now works as a value of `type[None]`
## [1.3.0]
### Added
- `default_return` option to imply unannotated return type as `None`.
- Specific error codes for `Any` errors
- Automatic baseline mode, if there are no new errors then write.
- Ignore baseline with `mypy --baseline-file= src`
### Enhancements
- Baseline will ignore reveals (`reveal_type` and `reveal_locals`).
- `--write-baseline` will report total and new errors.
- Much better baseline matching.
## [1.2.0]
### Added
- Unions in output messages show with new syntax
- `--legacy` flag
- new baseline format
## [1.0.0]
### Added
- Strict by default(`--strict` and disable dynamic typing)
- add baseline support(`--write-baseline`, `--baseline-file`)
- Type ignore must specify error code
- Unused type ignore can be ignored
- Add error code for unsafe variance(`unsafe-variance`)
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Mypy
welcome! basedmypy is a community project that aims to work for a wide
range of Python users and Python codebases. If you're trying basedmypy on
your Python code, your experience and what you can contribute are
important to the project's success
## Getting started with development
### Setup
#### (1) Fork the mypy repository
Within GitHub, navigate to and fork the repository.
#### (2) Clone the mypy repository and enter into it
clone the project using your IDE
if you don't use an IDE, you can also use the terminal (not recommended, the terminal is better left in the 80's):
```shell
git clone https://github.com//basedmypy.git
cd basedmypy
```
#### (3) Setup the project
```shell
./pw install
```
> [!Note]
> You'll need Python 3.9 or higher to install all requirements
> you can specify the version:
>
> ```shell
> ./pw install --python 3.13
> ```
### Running tests
Running the full test suite can take a while, and usually isn't necessary when
preparing a PR. Once you file a PR, the full test suite will run on GitHub.
You'll then be able to see any test failures, and make any necessary changes to
your PR.
However, if you wish to do so, you can run the full test suite
like this:
```bash
python runtests.py
```
Some useful commands for running specific tests include:
```shell
# Use mypy to check mypy's own code
.\pw typecheck
# Run a single test from the test suite
.\pw test test_name
# Run all test cases in the "test-data/unit/check-dataclasses.test" file
pytest mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test
# Run the formatters and linters
.\pw format
.\pw lint
```
For an in-depth guide on running and writing tests,
see [the README in the test-data directory](test-data/unit/README.md).
## First time contributors
If you're looking for things to help with, browse our [issue tracker](https://github.com/KotlinIsland/basedmypy/issues)!
In particular, look for [good first issues](https://github.com/KotlinIsland/basedmypy/labels/good-first-issue)
You do not need to ask for permission to work on any of these issues.
Just fix the issue yourself, [try to add a unit test](#running-tests) and
[open a pull request](#submitting-changes).
To get help fixing a specific issue, it's often best to comment on the issue
itself. You're much more likely to get help if you provide details about what
you've tried and where you've looked (maintainers tend to help those who help
themselves). [gitter](https://gitter.im/python/typing) can also be a good place
to ask for help.
Interactive debuggers like `pdb` and `ipdb` are really useful for getting
started with the mypy codebase. This is a
[useful tutorial](https://realpython.com/python-debugging-pdb/).
It's also extremely easy to get started contributing to our sister project
[typeshed](https://github.com/python/typeshed/issues) that provides type stubs
for libraries. This is a great way to become familiar with type syntax.
## Submitting changes
Even more excellent than a good bug report is a fix for a bug, or the
implementation of a much-needed new feature. We'd love to have
your contributions.
We use the usual GitHub pull-request flow, which may be familiar to
you if you've contributed to other projects on GitHub. For the mechanics,
see [our git and GitHub workflow help page](https://github.com/python/mypy/wiki/Using-Git-And-GitHub),
or [GitHub's own documentation](https://help.github.com/articles/using-pull-requests/).
Anyone interested in Mypy may review your code. One of the Mypy core
developers will merge your pull request when they think it's ready.
If your change will be a significant amount of work
to write, we highly recommend starting by opening an issue laying out
what you want to do. That lets a conversation happen early in case
other contributors disagree with what you'd like to do or have ideas
that will help you do it.
The best pull requests are focused, clearly describe what they're for
and why they're correct, and contain tests for whatever changes they
make to the code's behavior. As a bonus these are easiest for someone
to review, which helps your pull request get merged quickly! Standard
advice about good pull requests for open-source projects applies; we
have [our own writeup](https://github.com/python/mypy/wiki/Good-Pull-Request)
of this advice.
Also, do not squash your commits after you have submitted a pull request, as this
erases context during review. We will squash commits when the pull request is merged.
You may also find other pages in the
[Mypy developer guide](https://github.com/python/mypy/wiki/Developer-Guides)
helpful in developing your change.
## Core developer guidelines
Core developers should follow these rules when processing pull requests:
- Always wait for tests to pass before merging PRs.
- Use "[Squash and merge](https://github.com/blog/2141-squash-your-commits)"
to merge PRs.
- Delete branches for merged PRs (by core devs pushing to the main repo).
- Edit the final commit message before merging to conform to the following
style (we wish to have a clean `git log` output):
- When merging a multi-commit PR make sure that the commit message doesn't
contain the local history from the committer and the review history from
the PR. Edit the message to only describe the end state of the PR.
- Make sure there is a *single* newline at the end of the commit message.
This way there is a single empty line between commits in `git log`
output.
- Split lines as needed so that the maximum line length of the commit
message is under 80 characters, including the subject line.
- Capitalize the subject and each paragraph.
- Make sure that the subject of the commit message has no trailing dot.
- Use the imperative mood in the subject line (e.g. "Fix typo in README").
- If the PR fixes an issue, make sure something like "Fixes #xxx." occurs
in the body of the message (not in the subject).
- Use Markdown for formatting.
================================================
FILE: CREDITS
================================================
Credits
-------
We would like to thank the core basedmypy team:
KotlinIsland
DetachHead
PixieRa
Jorenham
Mypy Credits
------------
For a full list of contributors you can mine the commit history:
https://github.com/python/mypy/commits/master
For lists of contributors per mypy release (including typeshed) see
the release blog posts at https://mypy-lang.blogspot.com/.
Dropbox core team:
Jukka Lehtosalo
Ivan Levkivskyi
Jared Hance
Non-Dropbox core team members:
Ethan Smith
Guido van Rossum
Jelle Zijlstra
Michael J. Sullivan
Shantanu Jain
Xuanda Yang
Jingchen Ye <97littleleaf11@gmail.com>
Nikita Sobolev
Past Dropbox core team members:
David Fisher
Svyatoslav Ilinskiy
Greg Price
Naomi Seyfer
Michael Lee
Reid Barton
Additional thanks to:
Alex Allain
Max Bolingbroke
Peter Calvert
Kannan Goundan
Kathy Gray
David J Greaves
Riitta Ikonen
Terho Ikonen
Stephen Kell
Łukasz Langa
Laura Lehtosalo
Peter Ludemann
Seppo Mattila
Robin Message
Alan Mycroft
Dominic Orchard
Pekka Rapinoja
Matt Robben
Satnam Singh
Juha Sorva
Clay Sweetser
Jorma Tarhio
Jussi Tuovila
Andrey Vlasovskikh
================================================
FILE: LICENSE
================================================
Mypy (and mypyc) are licensed under the terms of the MIT license, reproduced below.
= = = = =
The MIT License
Copyright (c) 2012-2023 Jukka Lehtosalo and contributors
Copyright (c) 2015-2023 Dropbox, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
= = = = =
Portions of mypy and mypyc are licensed under different licenses.
The files
mypyc/lib-rt/pythonsupport.h, mypyc/lib-rt/getargs.c and
mypyc/lib-rt/getargsfast.c are licensed under the PSF 2 License, reproduced
below.
= = = = =
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------
1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012 Python Software Foundation; All Rights Reserved" are retained in Python
alone or in any derivative version prepared by Licensee.
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.
4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").
2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.
3. BeOpen is making the Software available to Licensee on an "AS IS"
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions. Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee. This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party. As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.
7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------
1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.
2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee. Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement. This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013. This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee. This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.
8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.
ACCEPT
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands. All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
================================================
FILE: MANIFEST.in
================================================
# some of the prunes here are so that check-manifest doesn't complain about their exclusion
# as such, be judicious in your use of prune
# stubs
prune mypy/typeshed
include mypy/typeshed/LICENSE
include mypy/typeshed/stdlib/VERSIONS
recursive-include mypy/typeshed *.pyi
# mypy and mypyc
include mypy/py.typed
include mypyc/py.typed
recursive-include mypy *.py
recursive-include mypyc *.py
# random
include mypy_bootstrap.ini
graft mypy/xml
graft scripts
# docs
graft docs
prune docs/build
prune docs/source/_build
# assorted mypyc requirements
graft mypyc/external
graft mypyc/lib-rt
graft mypyc/test
graft mypyc/test-data
graft mypyc/doc
prune mypyc/doc/build
# files necessary for testing sdist
include mypy-requirements.txt
include build-requirements.txt
include test-requirements.in
include test-requirements.txt
include mypy_self_check.ini
prune misc
graft test-data
graft mypy/test
include conftest.py
include runtests.py
include pytest.ini
include tox.ini
include LICENSE mypyc/README.md CHANGELOG.md
exclude .gitmodules CONTRIBUTING.md CREDITS ROADMAP.md action.yml .editorconfig
exclude mypy_self_check_strict.ini .mypy/baseline.json
exclude .git-blame-ignore-revs .pre-commit-config.yaml
global-exclude *.py[cod]
global-exclude .DS_Store
# some random stuff
include pw.bat
include pw.lock
include pw
exclude .idea/watcherTasks.xml
exclude .vscode/extensions.json
exclude .vscode/launch.json
exclude .vscode/settings.json
exclude .vscode/tasks.json
================================================
FILE: README.md
================================================
> [!IMPORTANT]
> **deprecated**: basedmypy is no longer maintained
>
> as of July 2025, this project is deprecated. basedmypy was intended to push the ecosystem forward from mypy, and there are now great alternatives that exist
>
> - basedpyright: https://github.com/DetachHead/basedpyright
> - ty: https://github.com/astral-sh/ty
>
> we recommend migrating to one of the above projects for ongoing improvements and support. thank you to everyone who used, contributed to, and supported basedmypy ❤️
[](https://discord.gg/7y9upqPrk2)
[](https://mypy-play.net/?mypy=basedmypy-latest)
[](https://pypi.org/project/basedmypy/)
[](https://pypistats.org/packages/basedmypy)
[](https://KotlinIsland.github.io/basedmypy)
[](https://github.com/KotlinIsland/basedmypy)
[](https://github.com/psf/black)
[](https://github.com/astral-sh/ruff)


# Based Static Typing for Python
Basedmypy is a Python type checker that is built on top of the work done by the
[mypy project](https://github.com/python/mypy). It resolves fundamental issues, limitations and compromises
that exist within Mypy and Python's type system.
Based features include:
- Typesafe by default (optional and dynamic typing still supported)
- Baseline functionality
- Support for `Intersection` types
- Default return type of `None` instead of `Any`
- Generic `TypeVar` bounds
- Based type-guards
- Infer parameter type from default value
- Infer overload types
- Bare literals
- Tuple literal types
See the [the docs](https://kotlinisland.github.io/basedmypy/based_features.html) for a comprehensive list.
### BasedPyright
Also, take a look at [BasedPyright](https://github.com/DetachHead/basedpyright), a based type checker and language server based on Pyright!
## Usage
Basedmypy is installed as an alternative to, and in place of, the `mypy` installation:
mypy test.py
python -m mypy test.py
## Why?
basedmypy was created to attempt to resolve two issues within Python and Mypy's typing ecosystem
and to demonstrate new typing concepts:
1. Mypy is lacking numerous pieces of functionality
2. Pythons type system is full of deeply concerning compromises
You can find a comprehensive list of features in [the docs](https://kotlinisland.github.io/basedmypy/based_features.html).
## Integrations
If you are using vscode, we recommend the [mypy extension](https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker)
If you are using IntelliJ IDEA/PyCharm, we recommend the [basedtyping plugin](https://plugins.jetbrains.com/plugin/23374-basedtyping)
If you are using [Pydantic](https://github.com/pydantic/pydantic), we recommend [pydantic-basedtyping](https://github.com/KotlinIsland/pydantic-basedtyping)
### Baseline
Basedmypy supports a feature called baseline. It allows you to adopt new strictness or features
without the burden of refactoring and fixing every new error, just save all current errors to the baseline
file and resolve them at what ever pace you want. Only new code will report new errors.
Read more and see examples in [the docs](https://KotlinIsland.github.io/basedmypy/baseline)
================================================
FILE: action.yml
================================================
name: "Mypy"
description: "Optional Static Typing for Python."
author: "Jukka Lehtosalo and contributors"
inputs:
options:
description: >
Options passed to mypy. Use `mypy --help` to see available options.
required: false
paths:
description: >
Explicit paths to run mypy on. Defaults to the current directory.
required: false
default: "."
version:
description: >
Mypy version to use (PEP440) - e.g. "0.910"
required: false
default: ""
install_types:
description: >
Whether to automatically install missing library stub packages.
('yes'|'no', default: 'yes')
default: "yes"
install_project_dependencies:
description: >
Whether to attempt to install project dependencies into mypy
environment. ('yes'|'no', default: 'yes')
default: "yes"
branding:
color: "blue"
icon: "check-circle"
runs:
using: composite
steps:
- name: mypy setup # zizmor: ignore[template-injection]
shell: bash
run: |
echo ::group::Installing mypy...
export PIP_DISABLE_PIP_VERSION_CHECK=1
if [ "$RUNNER_OS" == "Windows" ]; then
HOST_PYTHON=python
else
HOST_PYTHON=python3
fi
venv_script="import os.path; import venv; import sys;
path = os.path.join(r'${{ github.action_path }}', '.mypy-venv');
venv.main([path]);
bin_subdir = 'Scripts' if sys.platform == 'win32' else 'bin';
print(os.path.join(path, bin_subdir, 'python'));
"
VENV_PYTHON=$(echo $venv_script | "$HOST_PYTHON")
mypy_spec="mypy"
if [ -n "${{ inputs.version }}" ]; then
mypy_spec+="==${{ inputs.version }}"
fi
if ! "$VENV_PYTHON" -m pip install "$mypy_spec"; then
echo "::error::Could not install mypy."
exit 1
fi
echo ::endgroup::
if [ "${{ inputs.install_project_dependencies }}" == "yes" ]; then
VENV=$("$VENV_PYTHON" -c 'import sys;print(sys.prefix)')
echo ::group::Installing project dependencies...
"$VENV_PYTHON" -m pip download --dest="$VENV"/deps .
"$VENV_PYTHON" -m pip install -U --find-links="$VENV"/deps "$VENV"/deps/*
echo ::endgroup::
fi
echo ::group::Running mypy...
mypy_opts=""
if [ "${{ inputs.install_types }}" == "yes" ]; then
mypy_opts+="--install-types --non-interactive"
fi
echo "mypy $mypy_opts ${{ inputs.options }} ${{ inputs.paths }}"
"$VENV_PYTHON" -m mypy $mypy_opts ${{ inputs.options }} ${{ inputs.paths }}
echo ::endgroup::
================================================
FILE: build-requirements.txt
================================================
# NOTE: this needs to be kept in sync with the "requires" list in pyproject.toml
-r mypy-requirements.txt
types-psutil
types-setuptools
================================================
FILE: conftest.py
================================================
from __future__ import annotations
import os.path
pytest_plugins = ["mypy.test.data"]
def pytest_configure(config):
mypy_source_root = os.path.dirname(os.path.abspath(__file__))
if os.getcwd() != mypy_source_root:
os.chdir(mypy_source_root)
# This function name is special to pytest. See
# https://doc.pytest.org/en/latest/how-to/writing_plugins.html#initialization-command-line-and-configuration-hooks
def pytest_addoption(parser) -> None:
parser.addoption(
"--bench", action="store_true", default=False, help="Enable the benchmark test runs"
)
================================================
FILE: docs/Makefile
================================================
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Mypy.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Mypy.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Mypy"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Mypy"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
================================================
FILE: docs/README.md
================================================
Mypy Documentation
==================
What's this?
------------
This directory contains the source code for Mypy documentation (under `source/`)
and build scripts. The documentation uses Sphinx and reStructuredText. We use
`furo` as the documentation theme.
Building the documentation
--------------------------
Install Sphinx and other dependencies (i.e. theme) needed for the documentation.
From the `docs` directory, use `pip`:
```
pip install -r requirements-docs.txt
```
Build the documentation like this:
```
make html
```
The built documentation will be placed in the `docs/build` directory. Open
`docs/build/index.html` to view the documentation.
Helpful documentation build commands
------------------------------------
Clean the documentation build:
```
make clean
```
Test and check the links found in the documentation:
```
make linkcheck
```
Documentation on Read The Docs
------------------------------
The mypy documentation is hosted on Read The Docs, and the latest version
can be found at https://kotlinisland.github.io/basedmypy.
================================================
FILE: docs/make.bat
================================================
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^` where ^ is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Mypy.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Mypy.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end
================================================
FILE: docs/requirements-docs.txt
================================================
sphinx>=8.1.0
furo>=2022.3.4
myst-parser>=4.0.0
sphinx_inline_tabs>=2023.04.21
================================================
FILE: docs/source/additional_features.rst
================================================
Additional features
-------------------
This section discusses various features that did not fit in naturally in one
of the previous sections.
.. _dataclasses_support:
Dataclasses
***********
The :py:mod:`dataclasses` module allows defining and customizing simple
boilerplate-free classes. They can be defined using the
:py:func:`@dataclasses.dataclass ` decorator:
.. code-block:: python
from dataclasses import dataclass, field
@dataclass
class Application:
name: str
plugins: list[str] = field(default_factory=list)
test = Application("Testing...") # OK
bad = Application("Testing...", "with plugin") # Error: list[str] expected
Mypy will detect special methods (such as :py:meth:`__lt__ `) depending on the flags used to
define dataclasses. For example:
.. code-block:: python
from dataclasses import dataclass
@dataclass(order=True)
class OrderedPoint:
x: int
y: int
@dataclass(order=False)
class UnorderedPoint:
x: int
y: int
OrderedPoint(1, 2) < OrderedPoint(3, 4) # OK
UnorderedPoint(1, 2) < UnorderedPoint(3, 4) # Error: Unsupported operand types
Dataclasses can be generic and can be used in any other way a normal
class can be used (Python 3.12 syntax):
.. code-block:: python
from dataclasses import dataclass
@dataclass
class BoxedData[T]:
data: T
label: str
def unbox[T](bd: BoxedData[T]) -> T:
...
val = unbox(BoxedData(42, "")) # OK, inferred type is int
For more information see :doc:`official docs `
and :pep:`557`.
Caveats/Known Issues
====================
Some functions in the :py:mod:`dataclasses` module, such as :py:func:`~dataclasses.asdict`,
have imprecise (too permissive) types. This will be fixed in future releases.
Mypy does not yet recognize aliases of :py:func:`dataclasses.dataclass `, and will
probably never recognize dynamically computed decorators. The following example
does **not** work:
.. code-block:: python
from dataclasses import dataclass
dataclass_alias = dataclass
def dataclass_wrapper(cls):
return dataclass(cls)
@dataclass_alias
class AliasDecorated:
"""
Mypy doesn't recognize this as a dataclass because it is decorated by an
alias of `dataclass` rather than by `dataclass` itself.
"""
attribute: int
AliasDecorated(attribute=1) # error: Unexpected keyword argument
To have Mypy recognize a wrapper of :py:func:`dataclasses.dataclass `
as a dataclass decorator, consider using the :py:func:`~typing.dataclass_transform`
decorator (example uses Python 3.12 syntax):
.. code-block:: python
from dataclasses import dataclass, Field
from typing import dataclass_transform
@dataclass_transform(field_specifiers=(Field,))
def my_dataclass[T](cls: type[T]) -> type[T]:
...
return dataclass(cls)
Data Class Transforms
*********************
Mypy supports the :py:func:`~typing.dataclass_transform` decorator as described in
`PEP 681 `_.
.. note::
Pragmatically, mypy will assume such classes have the internal attribute :code:`__dataclass_fields__`
(even though they might lack it in runtime) and will assume functions such as :py:func:`dataclasses.is_dataclass`
and :py:func:`dataclasses.fields` treat them as if they were dataclasses
(even though they may fail at runtime).
.. _attrs_package:
The attrs package
*****************
:doc:`attrs ` is a package that lets you define
classes without writing boilerplate code. Mypy can detect uses of the
package and will generate the necessary method definitions for decorated
classes using the type annotations it finds.
Type annotations can be added as follows:
.. code-block:: python
import attr
@attrs.define
class A:
one: int
two: int = 7
three: int = attrs.field(8)
If you're using ``auto_attribs=False`` you must use ``attrs.field``:
.. code-block:: python
import attrs
@attrs.define
class A:
one: int = attrs.field() # Variable annotation (Python 3.6+)
two = attrs.field() # type: int # Type comment
three = attrs.field(type=int) # type= argument
Typeshed has a couple of "white lie" annotations to make type checking
easier. :py:func:`attrs.field` and :py:class:`attrs.Factory` actually return objects, but the
annotation says these return the types that they expect to be assigned to.
That enables this to work:
.. code-block:: python
import attrs
@attrs.define
class A:
one: int = attrs.field(8)
two: dict[str, str] = attrs.Factory(dict)
bad: str = attrs.field(16) # Error: can't assign int to str
Caveats/Known Issues
====================
* The detection of attr classes and attributes works by function name only.
This means that if you have your own helper functions that, for example,
``return attrs.field()`` mypy will not see them.
* All boolean arguments that mypy cares about must be literal ``True`` or ``False``.
e.g the following will not work:
.. code-block:: python
import attrs
YES = True
@attrs.define(init=YES)
class A:
...
* Currently, ``converter`` only supports named functions. If mypy finds something else it
will complain about not understanding the argument and the type annotation in
:py:meth:`__init__ ` will be replaced by ``Any``.
* :ref:`Validator decorators `
and `default decorators `_
are not type-checked against the attribute they are setting/validating.
* Method definitions added by mypy currently overwrite any existing method
definitions.
.. _remote-cache:
Using a remote cache to speed up mypy runs
******************************************
Mypy performs type checking *incrementally*, reusing results from
previous runs to speed up successive runs. If you are type checking a
large codebase, mypy can still be sometimes slower than desirable. For
example, if you create a new branch based on a much more recent commit
than the target of the previous mypy run, mypy may have to
process almost every file, as a large fraction of source files may
have changed. This can also happen after you've rebased a local
branch.
Mypy supports using a *remote cache* to improve performance in cases
such as the above. In a large codebase, remote caching can sometimes
speed up mypy runs by a factor of 10, or more.
Mypy doesn't include all components needed to set
this up -- generally you will have to perform some simple integration
with your Continuous Integration (CI) or build system to configure
mypy to use a remote cache. This discussion assumes you have a CI
system set up for the mypy build you want to speed up, and that you
are using a central git repository. Generalizing to different
environments should not be difficult.
Here are the main components needed:
* A shared repository for storing mypy cache files for all landed commits.
* CI build that uploads mypy incremental cache files to the shared repository for
each commit for which the CI build runs.
* A wrapper script around mypy that developers use to run mypy with remote
caching enabled.
Below we discuss each of these components in some detail.
Shared repository for cache files
=================================
You need a repository that allows you to upload mypy cache files from
your CI build and make the cache files available for download based on
a commit id. A simple approach would be to produce an archive of the
``.mypy_cache`` directory (which contains the mypy cache data) as a
downloadable *build artifact* from your CI build (depending on the
capabilities of your CI system). Alternatively, you could upload the
data to a web server or to S3, for example.
Continuous Integration build
============================
The CI build would run a regular mypy build and create an archive containing
the ``.mypy_cache`` directory produced by the build. Finally, it will produce
the cache as a build artifact or upload it to a repository where it is
accessible by the mypy wrapper script.
Your CI script might work like this:
* Run mypy normally. This will generate cache data under the
``.mypy_cache`` directory.
* Create a tarball from the ``.mypy_cache`` directory.
* Determine the current git master branch commit id (say, using
``git rev-parse HEAD``).
* Upload the tarball to the shared repository with a name derived from the
commit id.
Mypy wrapper script
===================
The wrapper script is used by developers to run mypy locally during
development instead of invoking mypy directly. The wrapper first
populates the local ``.mypy_cache`` directory from the shared
repository and then runs a normal incremental build.
The wrapper script needs some logic to determine the most recent
central repository commit (by convention, the ``origin/master`` branch
for git) the local development branch is based on. In a typical git
setup you can do it like this:
.. code::
git merge-base HEAD origin/master
The next step is to download the cache data (contents of the
``.mypy_cache`` directory) from the shared repository based on the
commit id of the merge base produced by the git command above. The
script will decompress the data so that mypy will start with a fresh
``.mypy_cache``. Finally, the script runs mypy normally. And that's all!
Caching with mypy daemon
========================
You can also use remote caching with the :ref:`mypy daemon `.
The remote cache will significantly speed up the first ``dmypy check``
run after starting or restarting the daemon.
The mypy daemon requires extra fine-grained dependency data in
the cache files which aren't included by default. To use caching with
the mypy daemon, use the :option:`--cache-fine-grained ` option in your CI
build::
$ mypy --cache-fine-grained
This flag adds extra information for the daemon to the cache. In
order to use this extra information, you will also need to use the
``--use-fine-grained-cache`` option with ``dmypy start`` or
``dmypy restart``. Example::
$ dmypy start -- --use-fine-grained-cache
Now your first ``dmypy check`` run should be much faster, as it can use
cache information to avoid processing the whole program.
Refinements
===========
There are several optional refinements that may improve things further,
at least if your codebase is hundreds of thousands of lines or more:
* If the wrapper script determines that the merge base hasn't changed
from a previous run, there's no need to download the cache data and
it's better to instead reuse the existing local cache data.
* If you use the mypy daemon, you may want to restart the daemon each time
after the merge base or local branch has changed to avoid processing a
potentially large number of changes in an incremental build, as this can
be much slower than downloading cache data and restarting the daemon.
* If the current local branch is based on a very recent master commit,
the remote cache data may not yet be available for that commit, as
there will necessarily be some latency to build the cache files. It
may be a good idea to look for cache data for, say, the 5 latest
master commits and use the most recent data that is available.
* If the remote cache is not accessible for some reason (say, from a public
network), the script can still fall back to a normal incremental build.
* You can have multiple local cache directories for different local branches
using the :option:`--cache-dir ` option. If the user switches to an existing
branch where downloaded cache data is already available, you can continue
to use the existing cache data instead of redownloading the data.
* You can set up your CI build to use a remote cache to speed up the
CI build. This would be particularly useful if each CI build starts
from a fresh state without access to cache files from previous
builds. It's still recommended to run a full, non-incremental
mypy build to create the cache data, as repeatedly updating cache
data incrementally could result in drift over a long time period (due
to a mypy caching issue, perhaps).
.. _extended_callable:
Extended Callable types
***********************
.. note::
This feature is deprecated. You can use
:ref:`callback protocols ` as a replacement.
As an experimental mypy extension, you can specify :py:class:`~collections.abc.Callable` types
that support keyword arguments, optional arguments, and more. When
you specify the arguments of a :py:class:`~collections.abc.Callable`, you can choose to supply just
the type of a nameless positional argument, or an "argument specifier"
representing a more complicated form of argument. This allows one to
more closely emulate the full range of possibilities given by the
``def`` statement in Python.
As an example, here's a complicated function definition and the
corresponding :py:class:`~collections.abc.Callable`:
.. code-block:: python
from collections.abc import Callable
from mypy_extensions import (Arg, DefaultArg, NamedArg,
DefaultNamedArg, VarArg, KwArg)
def func(__a: int, # This convention is for nameless arguments
b: int,
c: int = 0,
*args: int,
d: int,
e: int = 0,
**kwargs: int) -> int:
...
F = Callable[[int, # Or Arg(int)
Arg(int, 'b'),
DefaultArg(int, 'c'),
VarArg(int),
NamedArg(int, 'd'),
DefaultNamedArg(int, 'e'),
KwArg(int)],
int]
f: F = func
Argument specifiers are special function calls that can specify the
following aspects of an argument:
- its type (the only thing that the basic format supports)
- its name (if it has one)
- whether it may be omitted
- whether it may or must be passed using a keyword
- whether it is a ``*args`` argument (representing the remaining
positional arguments)
- whether it is a ``**kwargs`` argument (representing the remaining
keyword arguments)
The following functions are available in ``mypy_extensions`` for this
purpose:
.. code-block:: python
def Arg(type=Any, name=None):
# A normal, mandatory, positional argument.
# If the name is specified it may be passed as a keyword.
def DefaultArg(type=Any, name=None):
# An optional positional argument (i.e. with a default value).
# If the name is specified it may be passed as a keyword.
def NamedArg(type=Any, name=None):
# A mandatory keyword-only argument.
def DefaultNamedArg(type=Any, name=None):
# An optional keyword-only argument (i.e. with a default value).
def VarArg(type=Any):
# A *args-style variadic positional argument.
# A single VarArg() specifier represents all remaining
# positional arguments.
def KwArg(type=Any):
# A **kwargs-style variadic keyword argument.
# A single KwArg() specifier represents all remaining
# keyword arguments.
In all cases, the ``type`` argument defaults to ``Any``, and if the
``name`` argument is omitted the argument has no name (the name is
required for ``NamedArg`` and ``DefaultNamedArg``). A basic
:py:class:`~collections.abc.Callable` such as
.. code-block:: python
MyFunc = Callable[[int, str, int], float]
is equivalent to the following:
.. code-block:: python
MyFunc = Callable[[Arg(int), Arg(str), Arg(int)], float]
A :py:class:`~collections.abc.Callable` with unspecified argument types, such as
.. code-block:: python
MyOtherFunc = Callable[..., int]
is (roughly) equivalent to
.. code-block:: python
MyOtherFunc = Callable[[VarArg(), KwArg()], int]
.. note::
Each of the functions above currently just returns its ``type``
argument at runtime, so the information contained in the argument
specifiers is not available at runtime. This limitation is
necessary for backwards compatibility with the existing
``typing.py`` module as present in the Python 3.5+ standard library
and distributed via PyPI.
================================================
FILE: docs/source/based_features.rst
================================================
.. _based_features:
Based Features
==============
Intersection Types
------------------
Using the ``&`` operator or ``basedtyping.Intersection`` you can denote intersection types:
.. code-block:: python
class Growable(ABC, Generic[T]):
@abstractmethod
def add(self, item: T): ...
class Resettable(ABC):
@abstractmethod
def reset(self): ...
def f(x: Resettable & Growable[str]):
x.reset()
x.add("first")
Type Joins
----------
Mypy joins types to their common base type:
.. code-block:: python
a: int
b: str
reveal_type(a if bool() else b) # Revealed type is "builtins.object"
Basedmypy joins types into unions instead:
.. code-block:: python
a: int
b: str
reveal_type(a if bool() else b) # Revealed type is "int | str"
Based Callable
--------------
Basedmypy supports callable and function syntax types:
.. code-block:: python
a: "(int) -> str" = lambda x: str(x) # Callable
b: "def (int) -> str" = lambda x: str(x) # FunctionType
In mypy, all ``Callable``\s are assumed to be functions (``FunctionType``/``builtins.function``), but this is not the case for instances that have a `__call__` method.
Basedmypy corrects this by separating `Callable` and `FunctionType`:
.. code-block:: python
class A:
def __call__(self, i: int) -> str: ...
a: "(int) -> str" = A()
a.__name__ # error: "() -> int" has no attribute "__name__" [attr-defined]
b: "def (int) -> str" = lambda i: ""
b.__name__ # okay: `FunctionType` has a `__name__` attribute
Basedmypy warns against unsafe and ambiguous assignments of callables on classes:
.. code-block:: python
class A:
a: "() -> int" = lambda: 10 # error: Don't assign a "FunctionType" via the class, it will become a "MethodType"
Additionally, a ``Protocol`` ``_NamedCallable`` is introduced to represent the union of all 'named' callable implementations:
.. code-block:: python
class A:
def f(self): ...
reveal_type(A.f) # "def (self: A) -> None"
reveal_type(A().f) # "_NamedCallable & () -> None"
Bare Literals
-------------
``Literal`` is so cumbersome! Just use a bare literal instead:
.. code-block:: python
class Color(Enum):
RED = auto()
a: 1 | 2
b: True | Color.RED
Default Return Type
-------------------
The default return type of functions is ``None`` instead of ``Any``:
(configurable with the :confval:`default_return` option.)
.. code-block:: python
def f(name: str):
print(f"Hello, {name}!")
reveal_type(f) # (str) -> None
Generic ``TypeVar`` Bounds
--------------------------
Basedmpy allows the bounds of ``TypeVar``\s to be generic.
So you are able to have functions with polymorphic generic parameters:
.. code-block:: python
E = TypeVar("E")
I = TypeVar("I", bound=Iterable[E])
def foo(i: I, e: E) -> I:
assert e not in i
return i
reveal_type(foo(["based"], "mypy")) # N: Revealed type is "list[str]"
reveal_type(foo({1, 2}, 3)) # N: Revealed type is "set[int]"
``TypeVar`` usages work properly
--------------------------------
mypy allows various invalid usages of ``TypeVar``, which are corrected in basedmypy.
it's invalid to provide variance to a constrained ``TypeVar`` because they aren't generic, they
represent a set of choices that the ``TypeVar`` can be replaced with:
.. code-block:: python
E = TypeVar("E", int, str, covariant=True) # mypy doesn't report the error here
G = TypeVar("G", int, str)
class P(Protocol[G]): # mypy reports an invalid error here
def f() -> E: ...
class A[T: (object, str)]: ...
a = A[int]() # mypy doesn't report the error here
class B[T: int]: ...
type C = B[object] # mypy doesn't report the error here
Reinvented type guards
----------------------
``TypeGuard`` acts similar to ``cast``, which is often sub-optimal and dangerous:
.. code-block:: python
def is_str_list(val: list[object]) -> TypeGuard[list[str]]:
return all(isinstance(x, str) for x in val)
l1: list[object] = []
l2 = l1
if is_str_list(l1):
l2.append(100)
reveal_type(l1[0]) # Revealed type is "str", at runtime it is 100
class A: ...
class B(A): ...
def is_a(val: object) -> TypeGuard[A]: ...
b = B()
if is_a(b):
reveal_type(b) # A, not B
Basedmypy introduces a simpler and more powerful denotation for type-guards, and changes their behavior
to be safer.
.. code-block:: python
def is_int(value: object) -> value is int: ...
Type-guards don't widen:
.. code-block:: python
a: bool
if is_int(a):
reveal_type(a) # Revealed type is "bool"
Type-guards narrow in the negative case:
.. code-block:: python
a: int | str
if is_int(a):
reveal_type(a) # Revealed type is "int"
else:
reveal_type(a) # Revealed type is "str"
Type-guards work on the implicit ``self`` and ``cls`` parameters:
.. code-block:: python
class A:
def guard(self) -> self is B: ...
class B(A): ...
a = A()
if a.guard():
reveal_type(a) # Revealed type is "B"
Invalid type-guards show an error:
.. code-block:: python
def guard(x: str) -> x is int: # error: A type-guard's type must be assignable to its parameter's type.
Type-guards that only narrow when returning true are denoted as:
.. code-block:: python
def is_positive_int(x: object) -> x is int if True else False:
return isinstance(x, int) and x > 0
i: int | None
if is_positive_int(i):
reveal_type(i) # Revealed type is "int"
else:
reveal_type(i) # Revealed type is "int | None"
If you want to achieve something similar to the old ``TypeGuard``:
.. code-block:: python
def as_str_list(val: list[object]) -> list[str] | None:
return (
cast(list[str], val)
if all(isinstance(x, str) for x in val)
else None
)
a: list[object]
if (str_a := as_str_list(a)) is not None:
...
# or
def is_str_list(val: list[object]) -> bool:
return all(isinstance(x, str) for x in val)
a: list[object]
if is_str_list(a):
str_a = cast(list[str], a)
...
Covariant Mapping key type
--------------------------
The key type of ``Mapping`` is fixed to be covariant:
.. code-block:: python
a: Mapping[str, str]
b: Mapping[object, object] = a # no error
Tuple Literal Types
-------------------
Basedmypy allows denotation of tuple types with tuple literals:
.. code-block:: python
a: (int, str) = (1, "a")
Types in Messages
-----------------
Basedmypy makes significant changes to error and info messages, consider:
.. code-block:: python
T = TypeVar("T", bound=int)
def f(a: T, b: list[str | 1 | 2]):
reveal_type((a, b))
reveal_type(f)
Mypy shows::
Revealed type is "tuple[T`-1, builtins.list[Union[builtins.str, Literal[1], Literal[2]]]]"
Revealed type is "def [T <: builtins.int] (a: T`-1, b: builtins.list[Union[builtins.str, Literal[1], Literal[2]]]) -> Any"
Basedmypy shows::
Revealed type is "(T@f, list[str | 1 | 2])"
Revealed type is "def [T: int] (a: T, b: list[str | 1 | 2]) -> None"
Reveal Type Narrowed
--------------------
The defined type of a variable will be shown in the message for `reveal_type`:
.. code-block:: python
a: object
a = 1
reveal_type(a) # Revealed type is "int" (narrowed from "object")
Typed ``functools.Cache``
-------------------------
In mypy, ``functools.cache`` is unsafe:
.. code-block:: python
@cache
def f(): ...
f(1, 2, 3) # no error
This is resolved:
.. code-block:: python
@cache
def f(): ...
f(1, 2, 3) # error: expected no args
Checked f-strings
-----------------
.. code-block:: python
f"{None:0>2}" # error: The type "None" doesn't support format-specifiers
f"{date(1,1,1):%}" # error: Invalid trailing '%', escape with '%%'
f"{'s':.2f}" # error: Incompatible types in string interpolation (expression has type "str", placeholder has type "int | float | complex")
Support for `typing.type_check_only`
------------------------------------
`typing.type_check_only` is a decorator that specifies that a value is not available at runtime:
.. code-block:: python
ellipsis # error: Symbol "ellipsis" is not accessible at runtime [type-check-only]
function # error: Symbol "function" is not accessible at runtime [type-check-only]
Annotations in Functions
------------------------
Basedmypy handles type annotations in function bodies as unevaluated:
`PEP 526 `_
.. code-block:: python
def f():
a: int | str # no error in python 3.9, this annotation isn't evaluated
Checked Argument Names
----------------------
Basedmypy will warn when subtypes have different keyword arguments:
.. code-block:: python
class A:
def f(self, a: int): ...
class B(A):
@override
def f(self, b: int): ... # error: Signature of "f" incompatible with supertype "A"
Regex Checks
------------
Basedmypy will report invalid regex patterns, and also analyze regex values
to infer the group composition of a resulting ``Match`` object:
.. code-block:: python
re.compile("as(df") # error: missing ), unterminated subpattern at position 0 [regex]
if m := re.search("(a)?(b)", s):
reveal_type(m.groups()) # Revealed type is "(str | None, str)"
if m := re.search("(?Pa)", s):
reveal_type(m.group("foo"))
reveal_type(m.group("bar")) # error: no such group: 'bar' [regex]
Helpful String Check
--------------------
`