Copy disabled (too large)
Download .txt
Showing preview only (16,832K chars total). Download the full file to get everything.
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"
---
<!-- Please explain why this feature is based -->
<!-- Please explain why this feature should be implemented and how it would be used. Please include a full usage example. -->
================================================
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 = '<details><summary></summary>\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 ? '```</details>' : '')
} 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"
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
Showing preview only (2,712K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (31050 symbols across 1112 files)
FILE: conftest.py
function pytest_configure (line 8) | def pytest_configure(config):
function pytest_addoption (line 16) | def pytest_addoption(parser) -> None:
FILE: docs/source/conf.py
function setup (line 287) | def setup(app: Sphinx) -> None:
FILE: docs/source/html_builder.py
class MypyHTMLBuilder (line 15) | class MypyHTMLBuilder(StandaloneHTMLBuilder):
method __init__ (line 16) | def __init__(self, app: Sphinx, env: BuildEnvironment) -> None:
method write_doc (line 20) | def write_doc(self, docname: str, doctree: document) -> None:
method _verify_error_codes (line 24) | def _verify_error_codes(self) -> None:
method _write_ref_redirector (line 33) | def _write_ref_redirector(self) -> None:
method finish (line 55) | def finish(self) -> None:
function setup (line 60) | def setup(app: Sphinx) -> dict[str, Any]:
FILE: misc/analyze_cache.py
class CacheData (line 18) | class CacheData:
method __init__ (line 19) | def __init__(
method total_size (line 34) | def total_size(self) -> int:
function extract_classes (line 38) | def extract_classes(chunks: Iterable[CacheData]) -> Iterable[JsonDict]:
function load_json (line 50) | def load_json(data_path: str, meta_path: str) -> CacheData:
function get_files (line 65) | def get_files(root: str) -> Iterable[CacheData]:
function pluck (line 75) | def pluck(name: str, chunks: Iterable[JsonDict]) -> Iterable[JsonDict]:
function report_counter (line 79) | def report_counter(counter: Counter[str], amount: int | None = None) -> ...
function report_most_common (line 85) | def report_most_common(chunks: list[JsonDict], amount: int | None = None...
function compress (line 89) | def compress(chunk: JsonDict) -> JsonDict:
function decompress (line 122) | def decompress(chunk: JsonDict) -> JsonDict:
function main (line 151) | def main() -> None:
FILE: misc/apply-cache-diff.py
function make_cache (line 20) | def make_cache(input_dir: str, sqlite: bool) -> MetadataStore:
function apply_diff (line 27) | def apply_diff(cache_dir: str, diff_file: str, sqlite: bool = False) -> ...
function main (line 48) | def main() -> None:
FILE: misc/cherry-pick-typeshed.py
function parse_commit_title (line 18) | def parse_commit_title(diff: str) -> str:
function main (line 24) | def main() -> None:
FILE: misc/convert-cache.py
function main (line 21) | def main() -> None:
FILE: misc/diff-cache.py
function make_cache (line 22) | def make_cache(input_dir: str, sqlite: bool) -> MetadataStore:
function merge_deps (line 29) | def merge_deps(all: dict[str, set[str]], new: dict[str, set[str]]) -> None:
function load (line 34) | def load(cache: MetadataStore, s: str) -> Any:
function main (line 61) | def main() -> None:
FILE: misc/docker/build.py
function main (line 22) | def main() -> None:
FILE: misc/dump-ast.py
function dump (line 17) | def dump(fname: str, python_version: tuple[int, int], quiet: bool = Fals...
function main (line 27) | def main() -> None:
FILE: misc/find_type.py
function update_line (line 38) | def update_line(line: str, s: str, pos: int) -> str:
function run_mypy (line 42) | def run_mypy(mypy_and_args: list[str], filename: str, tmp_name: str) -> ...
function get_revealed_type (line 52) | def get_revealed_type(line: str, relevant_file: str, relevant_line: int)...
function process_output (line 60) | def process_output(output: str, filename: str, start_line: int) -> tuple...
function main (line 71) | def main() -> None:
FILE: misc/gen_blog_post_html.py
function format_lists (line 22) | def format_lists(h: str) -> str:
function format_code (line 40) | def format_code(h: str) -> str:
function convert (line 77) | def convert(src: str) -> str:
function extract_version (line 157) | def extract_version(src: str, version: str) -> str:
function main (line 173) | def main() -> None:
FILE: misc/generate_changelog.py
function find_all_release_branches (line 12) | def find_all_release_branches() -> list[tuple[int, int]]:
function git_merge_base (line 24) | def git_merge_base(rev1: str, rev2: str) -> str:
class CommitInfo (line 32) | class CommitInfo:
function normalize_author (line 39) | def normalize_author(author: str) -> str:
function git_commit_log (line 48) | def git_commit_log(rev1: str, rev2: str) -> list[CommitInfo]:
function filter_omitted_commits (line 69) | def filter_omitted_commits(commits: list[CommitInfo]) -> list[CommitInfo]:
function normalize_title (line 99) | def normalize_title(title: str) -> str:
function filter_out_commits_from_old_release_branch (line 108) | def filter_out_commits_from_old_release_branch(
function find_changes_between_releases (line 126) | def find_changes_between_releases(old_branch: str, new_branch: str) -> l...
function format_changelog_entry (line 141) | def format_changelog_entry(c: CommitInfo) -> str:
function main (line 156) | def main() -> None:
FILE: misc/incremental_checker.py
function print_offset (line 58) | def print_offset(text: str, indent_length: int = 4) -> None:
function delete_folder (line 64) | def delete_folder(folder_path: str) -> None:
function execute (line 69) | def execute(command: list[str], fail_on_error: bool = True) -> tuple[str...
function ensure_environment_is_ready (line 87) | def ensure_environment_is_ready(mypy_path: str, temp_repo_path: str, myp...
function initialize_repo (line 93) | def initialize_repo(repo_url: str, temp_repo_path: str, branch: str) -> ...
function get_commits (line 101) | def get_commits(repo_folder_path: str, commit_range: str) -> list[tuple[...
function get_commits_starting_at (line 112) | def get_commits_starting_at(repo_folder_path: str, start_commit: str) ->...
function get_nth_commit (line 117) | def get_nth_commit(repo_folder_path: str, n: int) -> tuple[str, str]:
function run_mypy (line 122) | def run_mypy(
function filter_daemon_stats (line 165) | def filter_daemon_stats(output: str) -> tuple[str, dict[str, Any]]:
function start_daemon (line 181) | def start_daemon(mypy_cache_path: str) -> None:
function stop_daemon (line 193) | def stop_daemon() -> None:
function load_cache (line 197) | def load_cache(incremental_cache_path: str = CACHE_PATH) -> JsonDict:
function save_cache (line 207) | def save_cache(cache: JsonDict, incremental_cache_path: str = CACHE_PATH...
function set_expected (line 212) | def set_expected(
function test_incremental (line 245) | def test_incremental(
function combine_stats (line 291) | def combine_stats(overall_stats: dict[str, float], new_stats: dict[str, ...
function cleanup (line 303) | def cleanup(temp_repo_path: str, mypy_cache_path: str) -> None:
function test_repo (line 308) | def test_repo(
function main (line 395) | def main() -> None:
FILE: misc/install.py
function main (line 5) | def main(args: argparse.Namespace):
FILE: misc/perf_checker.py
class Command (line 14) | class Command:
method __init__ (line 15) | def __init__(self, setup: Callable[[], None], command: Callable[[], No...
function print_offset (line 20) | def print_offset(text: str, indent_length: int = 4) -> None:
function delete_folder (line 26) | def delete_folder(folder_path: str) -> None:
function execute (line 31) | def execute(command: list[str]) -> None:
function trial (line 48) | def trial(num_trials: int, command: Command) -> list[float]:
function report (line 59) | def report(name: str, times: list[float]) -> None:
function main (line 67) | def main() -> None:
FILE: misc/perf_compare.py
function heading (line 32) | def heading(s: str) -> None:
function build_mypy (line 38) | def build_mypy(target_dir: str) -> None:
function clone (line 47) | def clone(target_dir: str, commit: str | None) -> None:
function edit_python_file (line 58) | def edit_python_file(fnam: str) -> None:
function run_benchmark (line 66) | def run_benchmark(
function main (line 93) | def main() -> None:
FILE: misc/sync-typeshed.py
function check_state (line 27) | def check_state() -> None:
function update_typeshed (line 36) | def update_typeshed(typeshed_dir: str, commit: str | None) -> str:
function git_head_commit (line 61) | def git_head_commit(repo: str) -> str:
function get_github_api_headers (line 67) | def get_github_api_headers() -> Mapping[str, str]:
function get_origin_owner (line 78) | def get_origin_owner() -> str:
function create_or_update_pull_request (line 90) | def create_or_update_pull_request(*, title: str, body: str, branch_name:...
function main (line 129) | def main() -> None:
FILE: misc/update-stubinfo.py
function main (line 7) | def main() -> None:
FILE: misc/upload-pypi.py
function is_whl_or_tar (line 30) | def is_whl_or_tar(name: str) -> bool:
function item_ok_for_pypi (line 34) | def item_ok_for_pypi(name: str) -> bool:
function get_release_for_tag (line 49) | def get_release_for_tag(tag: str) -> dict[str, Any]:
function download_asset (line 57) | def download_asset(asset: dict[str, Any], dst: Path) -> Path:
function download_all_release_assets (line 68) | def download_all_release_assets(release: dict[str, Any], dst: Path) -> N...
function check_sdist (line 75) | def check_sdist(dist: Path, version: str) -> None:
function spot_check_dist (line 107) | def spot_check_dist(dist: Path, version: str) -> None:
function tmp_twine (line 115) | def tmp_twine() -> Iterator[Path]:
function upload_dist (line 124) | def upload_dist(dist: Path, dry_run: bool = True) -> None:
function upload_to_pypi (line 136) | def upload_to_pypi(version: str, dry_run: bool = True, save_dist=False) ...
function main (line 163) | def main() -> None:
FILE: mypy/__main__.py
function console_entry (line 13) | def console_entry() -> None:
FILE: mypy/api.py
function _run (line 53) | def _run(main_wrapper: Callable[[TextIO, TextIO], None]) -> tuple[str, s...
function run (line 67) | def run(args: list[str]) -> tuple[str, str, int]:
function run_dmypy (line 76) | def run_dmypy(args: list[str]) -> tuple[str, str, int]:
FILE: mypy/applytype.py
class ReportIncompatibleTypevarValue (line 35) | class ReportIncompatibleTypevarValue(Protocol):
method __call__ (line 36) | def __call__(
function get_target_type (line 41) | def get_target_type(
function apply_generic_arguments (line 95) | def apply_generic_arguments(
function apply_poly (line 194) | def apply_poly(tp: CallableType, poly_tvars: Sequence[TypeVarLikeType]) ...
class PolyTranslationError (line 214) | class PolyTranslationError(Exception):
class PolyTranslator (line 218) | class PolyTranslator(TypeTranslator):
method __init__ (line 224) | def __init__(
method collect_vars (line 236) | def collect_vars(self, t: CallableType | Parameters) -> list[TypeVarLi...
method visit_callable_type (line 250) | def visit_callable_type(self, t: CallableType) -> Type:
method visit_type_var (line 260) | def visit_type_var(self, t: TypeVarType) -> Type:
method visit_param_spec (line 265) | def visit_param_spec(self, t: ParamSpecType) -> Type:
method visit_type_var_tuple (line 270) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> Type:
method visit_type_alias_type (line 275) | def visit_type_alias_type(self, t: TypeAliasType) -> Type:
method visit_instance (line 284) | def visit_instance(self, t: Instance) -> Type:
FILE: mypy/argmap.py
function map_actuals_to_formals (line 27) | def map_actuals_to_formals(
function map_formals_to_actuals (line 125) | def map_formals_to_actuals(
class ArgTypeExpander (line 144) | class ArgTypeExpander:
method __init__ (line 166) | def __init__(self, context: ArgumentInferContext) -> None:
method expand_actual_type (line 174) | def expand_actual_type(
FILE: mypy/binder.py
class CurrentType (line 34) | class CurrentType(NamedTuple):
class Frame (line 39) | class Frame:
method __init__ (line 51) | def __init__(self, id: int, conditional_frame: bool = False) -> None:
method __repr__ (line 67) | def __repr__(self) -> str:
class ConditionalTypeBinder (line 74) | class ConditionalTypeBinder:
method __init__ (line 99) | def __init__(self) -> None:
method collect_artificial_keys (line 134) | def collect_artificial_keys(self) -> Generator[None, None, None]:
method _get_id (line 143) | def _get_id(self) -> int:
method _add_dependencies (line 147) | def _add_dependencies(self, key: Key, value: Key | None = None) -> None:
method push_frame (line 155) | def push_frame(self, conditional_frame: bool = False) -> Frame:
method _put (line 162) | def _put(self, key: Key, type: Type, from_assignment: bool, index: int...
method _get (line 167) | def _get(self, key: Key, index: int = -1) -> CurrentType | None:
method put (line 175) | def put(self, expr: Expression, typ: Type, *, from_assignment: bool = ...
method unreachable (line 187) | def unreachable(self, artificial=False) -> None:
method suppress_unreachable_warnings (line 190) | def suppress_unreachable_warnings(self) -> None:
method get (line 193) | def get(self, expr: Expression) -> Type | None:
method is_unreachable (line 201) | def is_unreachable(self) -> bool:
method is_unreachable_warning_suppressed (line 206) | def is_unreachable_warning_suppressed(self) -> bool:
method cleanse (line 209) | def cleanse(self, expr: Expression) -> None:
method _cleanse_key (line 215) | def _cleanse_key(self, key: Key) -> None:
method update_from_options (line 221) | def update_from_options(self, frames: list[Frame]) -> bool:
method pop_frame (line 296) | def pop_frame(self, can_skip: bool, fall_through: int) -> Frame:
method accumulate_type_assignments (line 316) | def accumulate_type_assignments(self) -> Iterator[Assigns]:
method assign_type (line 330) | def assign_type(
method invalidate_dependencies (line 406) | def invalidate_dependencies(self, expr: BindableExpression) -> None:
method most_recent_enclosing_type (line 419) | def most_recent_enclosing_type(self, expr: BindableExpression, type: T...
method allow_jump (line 432) | def allow_jump(self, index: int) -> None:
method handle_break (line 444) | def handle_break(self) -> None:
method handle_continue (line 448) | def handle_continue(self) -> None:
method frame_context (line 453) | def frame_context(
method top_frame_context (line 511) | def top_frame_context(self) -> Iterator[Frame]:
function get_declaration (line 521) | def get_declaration(expr: BindableExpression) -> Type | None:
function collapse_variadic_union (line 532) | def collapse_variadic_union(typ: UnionType) -> Type:
FILE: mypy/build.py
class BuildResult (line 129) | class BuildResult:
method __init__ (line 140) | def __init__(self, manager: BuildManager, graph: Graph) -> None:
function build (line 149) | def build(
function _build (line 214) | def _build(
function default_data_dir (line 306) | def default_data_dir() -> str:
function normpath (line 311) | def normpath(path: str, options: Options) -> str:
class CacheMeta (line 326) | class CacheMeta(NamedTuple):
class FgDepMeta (line 353) | class FgDepMeta(TypedDict):
function cache_meta_from_dict (line 358) | def cache_meta_from_dict(meta: dict[str, Any], data_json: str) -> CacheM...
function import_priority (line 398) | def import_priority(imp: ImportBase, toplevel_priority: int) -> int:
function load_plugins_from_config (line 410) | def load_plugins_from_config(
function load_plugins (line 502) | def load_plugins(
function take_module_snapshot (line 524) | def take_module_snapshot(module: types.ModuleType) -> str:
function find_config_file_line_number (line 540) | def find_config_file_line_number(path: str, section: str, setting_name: ...
class BuildManager (line 563) | class BuildManager:
method __init__ (line 605) | def __init__(
method dump_stats (line 721) | def dump_stats(self) -> None:
method use_fine_grained_cache (line 727) | def use_fine_grained_cache(self) -> bool:
method maybe_swap_for_shadow_path (line 730) | def maybe_swap_for_shadow_path(self, path: str) -> str:
method get_stat (line 748) | def get_stat(self, path: str) -> os.stat_result | None:
method getmtime (line 751) | def getmtime(self, path: str) -> int:
method all_imported_modules_in_file (line 762) | def all_imported_modules_in_file(self, file: MypyFile) -> list[tuple[i...
method is_module (line 836) | def is_module(self, id: str) -> bool:
method parse_file (line 840) | def parse_file(
method load_fine_grained_deps (line 866) | def load_fine_grained_deps(self, id: str) -> dict[str, set[str]]:
method report_file (line 877) | def report_file(
method verbosity (line 883) | def verbosity(self) -> int:
method log (line 886) | def log(self, *message: str) -> None:
method log_fine_grained (line 894) | def log_fine_grained(self, *message: str) -> None:
method trace (line 907) | def trace(self, *message: str) -> None:
method add_stats (line 912) | def add_stats(self, **kwds: Any) -> None:
method stats_summary (line 919) | def stats_summary(self) -> Mapping[str, object]:
function deps_to_json (line 923) | def deps_to_json(x: dict[str, set[str]]) -> bytes:
function write_deps_cache (line 937) | def write_deps_cache(
function invert_deps (line 1003) | def invert_deps(deps: dict[str, set[str]], graph: Graph) -> dict[str, di...
function generate_deps_for_cache (line 1029) | def generate_deps_for_cache(manager: BuildManager, graph: Graph) -> dict...
class BaselineType (line 1061) | class BaselineType(TypedDict):
function save_baseline (line 1067) | def save_baseline(manager: BuildManager):
function load_baseline (line 1109) | def load_baseline(options: Options, errors: Errors, stdout: TextIO):
function write_plugins_snapshot (line 1189) | def write_plugins_snapshot(manager: BuildManager) -> None:
function read_plugins_snapshot (line 1200) | def read_plugins_snapshot(manager: BuildManager) -> dict[str, str] | None:
function read_quickstart_file (line 1216) | def read_quickstart_file(
function read_deps_cache (line 1233) | def read_deps_cache(manager: BuildManager, graph: Graph) -> dict[str, Fg...
function _load_json_file (line 1278) | def _load_json_file(
function _cache_dir_prefix (line 1313) | def _cache_dir_prefix(options: Options) -> str:
function add_catch_all_gitignore (line 1324) | def add_catch_all_gitignore(target_dir: str) -> None:
function exclude_from_backups (line 1338) | def exclude_from_backups(target_dir: str) -> None:
function create_metastore (line 1356) | def create_metastore(options: Options) -> MetadataStore:
function get_cache_names (line 1365) | def get_cache_names(id: str, path: str, options: Options) -> tuple[str, ...
function find_cache_meta (line 1401) | def find_cache_meta(id: str, path: str, manager: BuildManager) -> CacheM...
function validate_meta (line 1512) | def validate_meta(
function compute_hash (line 1653) | def compute_hash(text: str) -> str:
function write_cache (line 1662) | def write_cache(
function delete_cache (line 1812) | def delete_cache(id: str, path: str, manager: BuildManager) -> None:
class ModuleNotFound (line 1971) | class ModuleNotFound(Exception):
class State (line 1975) | class State:
method __init__ (line 2052) | def __init__(
method xmeta (line 2163) | def xmeta(self) -> CacheMeta:
method add_ancestors (line 2167) | def add_ancestors(self) -> None:
method is_fresh (line 2183) | def is_fresh(self) -> bool:
method is_interface_fresh (line 2195) | def is_interface_fresh(self) -> bool:
method mark_as_rechecked (line 2198) | def mark_as_rechecked(self) -> None:
method mark_interface_stale (line 2202) | def mark_interface_stale(self, *, on_errors: bool = False) -> None:
method check_blockers (line 2208) | def check_blockers(self) -> None:
method wrap_context (line 2215) | def wrap_context(self, check_blockers: bool = True) -> Iterator[None]:
method load_fine_grained_deps (line 2246) | def load_fine_grained_deps(self) -> dict[str, set[str]]:
method load_tree (line 2249) | def load_tree(self, temporary: bool = False) -> None:
method fix_cross_refs (line 2275) | def fix_cross_refs(self) -> None:
method parse_file (line 2283) | def parse_file(self, *, temporary: bool = False) -> None:
method parse_inline_configuration (line 2381) | def parse_inline_configuration(self, source: str) -> None:
method semantic_analysis_pass1 (line 2391) | def semantic_analysis_pass1(self) -> None:
method add_dependency (line 2422) | def add_dependency(self, dep: str) -> None:
method suppress_dependency (line 2430) | def suppress_dependency(self, dep: str) -> None:
method compute_dependencies (line 2438) | def compute_dependencies(self) -> None:
method type_check_first_pass (line 2476) | def type_check_first_pass(self) -> None:
method type_checker (line 2484) | def type_checker(self) -> TypeChecker:
method type_map (line 2499) | def type_map(self) -> dict[Expression, Type]:
method type_check_second_pass (line 2505) | def type_check_second_pass(self) -> bool:
method detect_possibly_undefined_vars (line 2514) | def detect_possibly_undefined_vars(self) -> None:
method finish_passes (line 2533) | def finish_passes(self) -> None:
method free_state (line 2585) | def free_state(self) -> None:
method _patch_indirect_dependencies (line 2590) | def _patch_indirect_dependencies(self, module_refs: set[str], types: l...
method compute_fine_grained_deps (line 2606) | def compute_fine_grained_deps(self) -> dict[str, set[str]]:
method update_fine_grained_deps (line 2626) | def update_fine_grained_deps(self, deps: dict[str, set[str]]) -> None:
method valid_references (line 2634) | def valid_references(self) -> set[str]:
method write_cache (line 2644) | def write_cache(self, *, baseline_errors: list[ErrorInfo] | None) -> N...
method verify_dependencies (line 2692) | def verify_dependencies(self, suppressed_only: bool = False) -> None:
method dependency_priorities (line 2737) | def dependency_priorities(self) -> list[int]:
method dependency_lines (line 2740) | def dependency_lines(self) -> list[int]:
method generate_unused_ignore_notes (line 2743) | def generate_unused_ignore_notes(self) -> None:
method generate_ignore_without_code_notes (line 2755) | def generate_ignore_without_code_notes(self) -> None:
function find_module_and_diagnose (line 2765) | def find_module_and_diagnose(
function exist_added_packages (line 2864) | def exist_added_packages(suppressed: list[str], manager: BuildManager, o...
function find_module_simple (line 2888) | def find_module_simple(id: str, manager: BuildManager) -> str | None:
function find_module_with_reason (line 2898) | def find_module_with_reason(id: str, manager: BuildManager) -> ModuleSea...
function in_partial_package (line 2906) | def in_partial_package(id: str, manager: BuildManager) -> bool:
function module_not_found (line 2933) | def module_not_found(
function skipping_module (line 2975) | def skipping_module(
function skipping_ancestor (line 2994) | def skipping_ancestor(manager: BuildManager, id: str, path: str, ancesto...
function log_configuration (line 3014) | def log_configuration(manager: BuildManager, sources: list[BuildSource])...
function dispatch (line 3054) | def dispatch(sources: list[BuildSource], manager: BuildManager, stdout: ...
class NodeInfo (line 3138) | class NodeInfo:
method __init__ (line 3141) | def __init__(self, index: int, scc: list[str]) -> None:
method dumps (line 3147) | def dumps(self) -> str:
function dump_timing_stats (line 3159) | def dump_timing_stats(path: str, graph: Graph) -> None:
function dump_line_checking_stats (line 3166) | def dump_line_checking_stats(path: str, graph: Graph) -> None:
function dump_graph (line 3178) | def dump_graph(graph: Graph, stdout: TextIO | None = None) -> None:
function load_graph (line 3217) | def load_graph(
function process_graph (line 3379) | def process_graph(graph: Graph, manager: BuildManager) -> None:
function order_ascc (line 3527) | def order_ascc(graph: Graph, ascc: AbstractSet[str], pri_max: int = PRI_...
function process_fresh_modules (line 3574) | def process_fresh_modules(graph: Graph, modules: list[str], manager: Bui...
function process_stale_scc (line 3590) | def process_stale_scc(graph: Graph, scc: list[str], manager: BuildManage...
function sorted_components (line 3649) | def sorted_components(
function deps_filtered (line 3680) | def deps_filtered(graph: Graph, vertices: AbstractSet[str], id: str, pri...
function missing_stubs_file (line 3692) | def missing_stubs_file(cache_dir: str) -> str:
function record_missing_stub_packages (line 3696) | def record_missing_stub_packages(cache_dir: str, missing_stub_packages: ...
function is_silent_import_module (line 3712) | def is_silent_import_module(manager: BuildManager, path: str) -> bool:
function write_undocumented_ref_info (line 3721) | def write_undocumented_ref_info(
FILE: mypy/checker.py
class DeferredNode (line 244) | class DeferredNode(NamedTuple):
class FineGrainedDeferredNode (line 252) | class FineGrainedDeferredNode(NamedTuple):
class TypeRange (line 275) | class TypeRange(NamedTuple):
class PartialTypeScope (line 283) | class PartialTypeScope(NamedTuple):
class InvalidTypeType (line 289) | class InvalidTypeType(Exception):
class TypeChecker (line 293) | class TypeChecker(NodeVisitor[None], CheckerPluginInterface):
method __init__ (line 372) | def __init__(
method type_context (line 440) | def type_context(self) -> list[Type | None]:
method reset (line 443) | def reset(self) -> None:
method check_first_pass (line 464) | def check_first_pass(self) -> None:
method check_second_pass (line 508) | def check_second_pass(
method check_partial (line 544) | def check_partial(self, node: DeferredNodeType | FineGrainedDeferredNo...
method check_top_level (line 555) | def check_top_level(self, node: MypyFile) -> None:
method defer_node (line 566) | def defer_node(self, node: DeferredNodeType, enclosing_class: TypeInfo...
method handle_cannot_determine_type (line 579) | def handle_cannot_determine_type(self, name: str, context: Context) ->...
method accept (line 595) | def accept(self, stmt: Statement) -> None:
method accept_loop (line 602) | def accept_loop(
method visit_overloaded_func_def (line 657) | def visit_overloaded_func_def(self, defn: OverloadedFuncDef, do_items=...
method _visit_overloaded_func_def (line 663) | def _visit_overloaded_func_def(self, defn: OverloadedFuncDef, do_items...
method extract_callable_type (line 714) | def extract_callable_type(self, inner_type: Type | None, ctx: Context)...
method check_overlapping_overloads (line 763) | def check_overlapping_overloads(self, defn: OverloadedFuncDef) -> None:
method is_generator_return_type (line 937) | def is_generator_return_type(self, typ: Type, is_coroutine: bool) -> b...
method is_async_generator_return_type (line 956) | def is_async_generator_return_type(self, typ: Type) -> bool:
method get_generator_yield_type (line 969) | def get_generator_yield_type(self, return_type: Type, is_coroutine: bo...
method get_generator_receive_type (line 1003) | def get_generator_receive_type(self, return_type: Type, is_coroutine: ...
method get_coroutine_return_type (line 1038) | def get_coroutine_return_type(self, return_type: Type) -> Type:
method get_generator_return_type (line 1046) | def get_generator_return_type(self, return_type: Type, is_coroutine: b...
method visit_func_def (line 1077) | def visit_func_def(self, defn: FuncDef) -> None:
method _visit_func_def (line 1182) | def _visit_func_def(self, defn: FuncDef) -> None:
method check_func_item (line 1199) | def check_func_item(
method check_func_def_override (line 1233) | def check_func_def_override(self, defn: FuncDef, new_type: FunctionLik...
method enter_attribute_inference_context (line 1277) | def enter_attribute_inference_context(self) -> Iterator[None]:
method check_func_def (line 1283) | def check_func_def(
method is_var_redefined_in_outer_context (line 1703) | def is_var_redefined_in_outer_context(self, v: Var, after_line: int) -...
method check_unbound_return_typevar (line 1720) | def check_unbound_return_typevar(self, typ: CallableType) -> None:
method check_default_args (line 1740) | def check_default_args(self, item: FuncItem, body_is_trivial: bool) ->...
method is_forward_op_method (line 1775) | def is_forward_op_method(self, method_name: str) -> bool:
method is_reverse_op_method (line 1778) | def is_reverse_op_method(self, method_name: str) -> bool:
method check_for_missing_annotations (line 1781) | def check_for_missing_annotations(self, fdef: FuncItem) -> None:
method check___new___signature (line 1820) | def check___new___signature(self, fdef: FuncDef, typ: CallableType) ->...
method check_reverse_op_method (line 1855) | def check_reverse_op_method(
method check_overlapping_op_methods (line 1943) | def check_overlapping_op_methods(
method is_unsafe_overlapping_op (line 2007) | def is_unsafe_overlapping_op(
method check_inplace_operator_method (line 2060) | def check_inplace_operator_method(self, defn: FuncBase) -> None:
method check_getattr_method (line 2087) | def check_getattr_method(self, typ: Type, context: Context, name: str)...
method check_setattr_method (line 2116) | def check_setattr_method(self, typ: Type, context: Context) -> None:
method check_slots_definition (line 2133) | def check_slots_definition(self, typ: Type, context: Context) -> None:
method check_match_args (line 2149) | def check_match_args(self, var: Var, typ: Type, context: Context) -> N...
method expand_typevars (line 2164) | def expand_typevars(
method check_explicit_override_decorator (line 2188) | def check_explicit_override_decorator(
method check_method_override (line 2211) | def check_method_override(
method check_method_or_accessor_override_for_base (line 2243) | def check_method_or_accessor_override_for_base(
method check_method_override_for_base_with_name (line 2284) | def check_method_override_for_base_with_name(
method bind_and_map_method (line 2457) | def bind_and_map_method(
method get_op_other_domain (line 2502) | def get_op_other_domain(self, tp: FunctionLike) -> Type | None:
method check_override (line 2518) | def check_override(
method check__exit__return_type (line 2684) | def check__exit__return_type(self, defn: FuncItem) -> None:
method visit_class_def (line 2709) | def visit_class_def(self, defn: ClassDef) -> None:
method check_final_deletable (line 2783) | def check_final_deletable(self, typ: TypeInfo) -> None:
method check_init_subclass (line 2791) | def check_init_subclass(self, defn: ClassDef) -> None:
method check_typevar_defaults (line 2839) | def check_typevar_defaults(self, tvars: Sequence[TypeVarLikeType]) -> ...
method check_enum (line 2848) | def check_enum(self, defn: ClassDef) -> None:
method check_final_enum (line 2877) | def check_final_enum(self, defn: ClassDef, base: TypeInfo) -> None:
method is_final_enum_value (line 2883) | def is_final_enum_value(self, sym: SymbolTableNode) -> bool:
method check_enum_bases (line 2907) | def check_enum_bases(self, defn: ClassDef) -> None:
method check_enum_new (line 2935) | def check_enum_new(self, defn: ClassDef) -> None:
method check_protocol_variance (line 2963) | def check_protocol_variance(self, defn: ClassDef) -> None:
method check_multiple_inheritance (line 3002) | def check_multiple_inheritance(self, typ: TypeInfo) -> None:
method determine_type_of_member (line 3024) | def determine_type_of_member(self, sym: SymbolTableNode) -> Type | None:
method check_compatibility (line 3047) | def check_compatibility(
method check_metaclass_compatibility (line 3137) | def check_metaclass_compatibility(self, typ: TypeInfo) -> None:
method visit_import_from (line 3166) | def visit_import_from(self, node: ImportFrom) -> None:
method visit_import_all (line 3172) | def visit_import_all(self, node: ImportAll) -> None:
method visit_import (line 3175) | def visit_import(self, node: Import) -> None:
method check_import (line 3178) | def check_import(self, node: ImportBase) -> None:
method visit_block (line 3200) | def visit_block(self, b: Block) -> None:
method should_report_unreachable_issues (line 3217) | def should_report_unreachable_issues(self) -> bool:
method is_noop_for_reachability (line 3225) | def is_noop_for_reachability(self, s: Statement) -> bool:
method check_assignment_for_untyped (line 3253) | def check_assignment_for_untyped(self, lvalues: list[Lvalue]):
method visit_assignment_stmt (line 3268) | def visit_assignment_stmt(self, s: AssignmentStmt) -> None:
method check_type_alias_rvalue (line 3332) | def check_type_alias_rvalue(self, s: AssignmentStmt) -> None:
method check_function_on_class (line 3337) | def check_function_on_class(
method check_assignment (line 3411) | def check_assignment(
method get_variable_type_context (line 3633) | def get_variable_type_context(self, inferred: Var) -> Type | None:
method try_infer_partial_generic_type_from_assignment (line 3656) | def try_infer_partial_generic_type_from_assignment(
method check_compatibility_all_supers (line 3702) | def check_compatibility_all_supers(
method check_compatibility_super (line 3756) | def check_compatibility_super(
method lvalue_type_from_base (line 3835) | def lvalue_type_from_base(
method check_compatibility_classvar_super (line 3880) | def check_compatibility_classvar_super(
method check_compatibility_final_super (line 3893) | def check_compatibility_final_super(
method check_if_final_var_override_writable (line 3922) | def check_if_final_var_override_writable(
method get_final_context (line 3942) | def get_final_context(self) -> bool:
method enter_final_context (line 3947) | def enter_final_context(self, is_final_def: bool) -> Iterator[None]:
method check_final (line 3956) | def check_final(self, s: AssignmentStmt | OperatorAssignmentStmt | Ass...
method check_assignment_to_slots (line 4010) | def check_assignment_to_slots(self, lvalue: Lvalue) -> None:
method is_assignable_slot (line 4041) | def is_assignable_slot(self, lvalue: Lvalue, typ: Type | None) -> bool:
method flatten_rvalues (line 4060) | def flatten_rvalues(self, rvalues: list[Expression]) -> list[Expression]:
method check_assignment_to_multiple_lvalues (line 4091) | def check_assignment_to_multiple_lvalues(
method check_rvalue_count_in_assignment (line 4176) | def check_rvalue_count_in_assignment(
method check_multi_assignment (line 4212) | def check_multi_assignment(
method check_multi_assignment_from_union (line 4266) | def check_multi_assignment_from_union(
method flatten_lvalues (line 4334) | def flatten_lvalues(self, lvalues: list[Expression]) -> list[Expression]:
method check_multi_assignment_from_tuple (line 4345) | def check_multi_assignment_from_tuple(
method lvalue_type_for_inference (line 4438) | def lvalue_type_for_inference(self, lvalues: list[Lvalue], rvalue_type...
method split_around_star (line 4476) | def split_around_star(
method type_is_iterable (line 4492) | def type_is_iterable(self, type: Type) -> bool:
method check_multi_assignment_from_iterable (line 4500) | def check_multi_assignment_from_iterable(
method check_lvalue (line 4525) | def check_lvalue(self, lvalue: Lvalue) -> tuple[Type | None, IndexExpr...
method is_definition (line 4564) | def is_definition(self, s: Lvalue) -> bool:
method infer_variable_type (line 4580) | def infer_variable_type(
method infer_partial_type (line 4615) | def infer_partial_type(self, name: Var, lvalue: Lvalue, init_type: Typ...
method is_valid_defaultdict_partial_value_type (line 4655) | def is_valid_defaultdict_partial_value_type(self, t: ProperType) -> bool:
method set_inferred_type (line 4680) | def set_inferred_type(self, var: Var, lvalue: Lvalue, type: Type) -> N...
method set_inference_error_fallback_type (line 4698) | def set_inference_error_fallback_type(self, var: Var, lvalue: Lvalue, ...
method inference_error_fallback_type (line 4712) | def inference_error_fallback_type(self, type: Type) -> Type:
method simple_rvalue (line 4718) | def simple_rvalue(self, rvalue: Expression) -> bool:
method check_simple_assignment (line 4735) | def check_simple_assignment(
method check_member_assignment (line 4814) | def check_member_assignment(
method check_indexed_assignment (line 4940) | def check_indexed_assignment(
method try_infer_partial_type_from_indexed_assignment (line 4966) | def try_infer_partial_type_from_indexed_assignment(
method type_requires_usage (line 5005) | def type_requires_usage(self, typ: Type) -> tuple[str, ErrorCode] | None:
method visit_expression_stmt (line 5022) | def visit_expression_stmt(self, s: ExpressionStmt) -> None:
method visit_return_stmt (line 5034) | def visit_return_stmt(self, s: ReturnStmt) -> None:
method check_return_stmt (line 5039) | def check_return_stmt(self, s: ReturnStmt) -> None:
method visit_if_stmt (line 5145) | def visit_if_stmt(self, s: IfStmt) -> None:
method visit_while_stmt (line 5188) | def visit_while_stmt(self, s: WhileStmt) -> None:
method visit_operator_assignment_stmt (line 5199) | def visit_operator_assignment_stmt(self, s: OperatorAssignmentStmt) ->...
method visit_assert_stmt (line 5233) | def visit_assert_stmt(self, s: AssertStmt) -> None:
method visit_raise_stmt (line 5247) | def visit_raise_stmt(self, s: RaiseStmt) -> None:
method type_check_raise (line 5255) | def type_check_raise(self, e: Expression, s: RaiseStmt, optional: bool...
method visit_try_stmt (line 5284) | def visit_try_stmt(self, s: TryStmt) -> None:
method visit_try_without_finally (line 5317) | def visit_try_without_finally(self, s: TryStmt, try_frame: bool) -> None:
method check_except_handler_test (line 5358) | def check_except_handler_test(self, n: Expression, is_star: bool) -> T...
method default_exception_type (line 5399) | def default_exception_type(self, is_star: bool) -> Type:
method wrap_exception_group (line 5406) | def wrap_exception_group(self, types: Sequence[Type]) -> Type:
method get_types_from_except_handler (line 5415) | def get_types_from_except_handler(self, typ: Type, n: Expression) -> l...
method visit_for_stmt (line 5432) | def visit_for_stmt(self, s: ForStmt) -> None:
method analyze_async_iterable_item_type (line 5443) | def analyze_async_iterable_item_type(self, expr: Expression) -> tuple[...
method analyze_iterable_item_type (line 5454) | def analyze_iterable_item_type(self, expr: Expression) -> tuple[Type, ...
method analyze_iterable_item_type_without_expression (line 5464) | def analyze_iterable_item_type_without_expression(
method analyze_range_native_int_type (line 5483) | def analyze_range_native_int_type(self, expr: Expression) -> Type | None:
method analyze_container_item_type (line 5510) | def analyze_container_item_type(self, typ: Type) -> Type | None:
method analyze_index_variables (line 5532) | def analyze_index_variables(
method visit_del_stmt (line 5538) | def visit_del_stmt(self, s: DelStmt) -> None:
method visit_decorator (line 5559) | def visit_decorator(self, e: Decorator) -> None:
method visit_decorator_inner (line 5568) | def visit_decorator_inner(self, e: Decorator, allow_empty: bool = Fals...
method check_for_untyped_decorator (line 5656) | def check_for_untyped_decorator(
method check_incompatible_property_override (line 5666) | def check_incompatible_property_override(self, e: Decorator) -> None:
method visit_with_stmt (line 5680) | def visit_with_stmt(self, s: WithStmt) -> None:
method check_untyped_after_decorator (line 5717) | def check_untyped_after_decorator(self, typ: Type, func: FuncDef) -> N...
method check_async_with_item (line 5724) | def check_async_with_item(
method check_with_item (line 5743) | def check_with_item(
method visit_break_stmt (line 5757) | def visit_break_stmt(self, s: BreakStmt) -> None:
method visit_continue_stmt (line 5760) | def visit_continue_stmt(self, s: ContinueStmt) -> None:
method visit_match_stmt (line 5764) | def visit_match_stmt(self, s: MatchStmt) -> None:
method _get_recursive_sub_patterns_map (line 5854) | def _get_recursive_sub_patterns_map(
method infer_variable_types_from_type_maps (line 5868) | def infer_variable_types_from_type_maps(
method remove_capture_conflicts (line 5912) | def remove_capture_conflicts(
method visit_type_alias_stmt (line 5922) | def visit_type_alias_stmt(self, o: TypeAliasStmt) -> None:
method make_fake_typeinfo (line 5929) | def make_fake_typeinfo(
method intersect_instances (line 5951) | def intersect_instances(
method intersect_instance_callable (line 6052) | def intersect_instance_callable(self, typ: Instance, callable_type: Ca...
method make_fake_callable (line 6080) | def make_fake_callable(self, typ: Instance) -> Instance:
method partition_by_callable (line 6095) | def partition_by_callable(
method conditional_callable_type_map (line 6181) | def conditional_callable_type_map(
method conditional_types_for_iterable (line 6209) | def conditional_types_for_iterable(
method _is_truthy_type (line 6248) | def _is_truthy_type(self, t: ProperType) -> bool:
method check_for_truthy_type (line 6264) | def check_for_truthy_type(self, t: Type, expr: Expression) -> None:
method find_type_equals_check (line 6318) | def find_type_equals_check(
method find_isinstance_check (line 6396) | def find_isinstance_check(
method upstream_typeis (line 6424) | def upstream_typeis(self, node: CallExpr, expr: Expression) -> tuple[T...
method find_isinstance_check_helper (line 6472) | def find_isinstance_check_helper(
method comparison_type_narrowing_helper (line 6696) | def comparison_type_narrowing_helper(self, node: ComparisonExpr) -> tu...
method equality_type_narrowing_helper (line 6811) | def equality_type_narrowing_helper(
method propagate_up_typemap_info (line 6882) | def propagate_up_typemap_info(self, new_types: TypeMap) -> TypeMap:
method refine_parent_types (line 6925) | def refine_parent_types(self, expr: Expression, expr_type: Type) -> Ma...
method refine_identity_comparison_expression (line 7045) | def refine_identity_comparison_expression(
method refine_away_none_in_comparison (line 7183) | def refine_away_none_in_comparison(
method is_len_of_tuple (line 7226) | def is_len_of_tuple(self, expr: Expression) -> bool:
method can_be_narrowed_with_len (line 7241) | def can_be_narrowed_with_len(self, typ: Type) -> bool:
method literal_int_expr (line 7263) | def literal_int_expr(self, expr: Expression) -> int | None:
method find_tuple_len_narrowing (line 7279) | def find_tuple_len_narrowing(self, node: ComparisonExpr) -> list[tuple...
method narrow_with_len (line 7372) | def narrow_with_len(self, typ: Type, op: str, size: int) -> tuple[Type...
method refine_tuple_type_with_len (line 7406) | def refine_tuple_type_with_len(
method refine_instance_type_with_len (line 7474) | def refine_instance_type_with_len(
method check_subtype (line 7511) | def check_subtype(
method check_subtype (line 7526) | def check_subtype(
method check_subtype (line 7539) | def check_subtype(
method get_precise_awaitable_type (line 7617) | def get_precise_awaitable_type(self, typ: Type, local_errors: ErrorWat...
method checking_await_set (line 7640) | def checking_await_set(self) -> Iterator[None]:
method check_possible_missing_await (line 7647) | def check_possible_missing_await(
method named_type (line 7664) | def named_type(self, name: str) -> Instance:
method named_generic_type (line 7679) | def named_generic_type(self, name: str, args: list[Type]) -> Instance:
method lookup_typeinfo (line 7690) | def lookup_typeinfo(self, fullname: str) -> TypeInfo:
method type_type (line 7697) | def type_type(self) -> Instance:
method str_type (line 7701) | def str_type(self) -> Instance:
method store_type (line 7705) | def store_type(self, node: Expression, typ: Type) -> None:
method has_type (line 7709) | def has_type(self, node: Expression) -> bool:
method lookup_type_or_none (line 7712) | def lookup_type_or_none(self, node: Expression) -> Type | None:
method lookup_type (line 7718) | def lookup_type(self, node: Expression) -> Type:
method store_types (line 7725) | def store_types(self, d: dict[Expression, Type]) -> None:
method local_type_map (line 7729) | def local_type_map(self) -> Iterator[dict[Expression, Type]]:
method in_checked_function (line 7740) | def in_checked_function(self) -> bool:
method lookup (line 7752) | def lookup(self, name: str) -> SymbolTableNode:
method lookup_qualified (line 7765) | def lookup_qualified(self, name: str) -> SymbolTableNode:
method enter_partial_types (line 7797) | def enter_partial_types(
method handle_partial_var_type (line 7853) | def handle_partial_var_type(
method is_defined_in_base_class (line 7882) | def is_defined_in_base_class(self, var: Var) -> bool:
method find_partial_types (line 7889) | def find_partial_types(self, var: Var) -> dict[Var, Context] | None:
method find_partial_types_in_all_scopes (line 7901) | def find_partial_types_in_all_scopes(
method temp_node (line 7926) | def temp_node(self, t: Type, context: Context | None = None) -> TempNode:
method fail (line 7930) | def fail(
method note (line 7939) | def note(
method iterable_item_type (line 7953) | def iterable_item_type(
method function_type (line 7966) | def function_type(self, func: FuncBase) -> FunctionLike:
method push_type_map (line 7969) | def push_type_map(self, type_map: TypeMap, *, from_assignment: bool = ...
method infer_issubclass_maps (line 7977) | def infer_issubclass_maps(self, node: CallExpr, expr: Expression) -> t...
method conditional_types_with_intersection (line 8029) | def conditional_types_with_intersection(
method conditional_types_with_intersection (line 8040) | def conditional_types_with_intersection(
method conditional_types_with_intersection (line 8050) | def conditional_types_with_intersection(
method is_writable_attribute (line 8123) | def is_writable_attribute(self, node: Node) -> bool:
method get_isinstance_type (line 8135) | def get_isinstance_type(self, expr: Expression) -> list[TypeRange] | N...
method is_literal_enum (line 8178) | def is_literal_enum(self, n: Expression) -> bool:
method add_any_attribute_to_type (line 8216) | def add_any_attribute_to_type(self, typ: Type, name: str) -> Type:
method hasattr_type_maps (line 8249) | def hasattr_type_maps(
method partition_union_by_attr (line 8274) | def partition_union_by_attr(
method has_valid_attribute (line 8286) | def has_valid_attribute(self, typ: Type, name: str) -> bool:
method get_expression_type (line 8312) | def get_expression_type(self, node: Expression, type_context: Type | N...
method check_deprecated (line 8315) | def check_deprecated(self, node: Node | None, context: Context) -> None:
method warn_deprecated (line 8328) | def warn_deprecated(self, node: Node | None, context: Context) -> None:
method warn_deprecated_overload_item (line 8340) | def warn_deprecated_overload_item(
class CollectArgTypeVarTypes (line 8356) | class CollectArgTypeVarTypes(TypeTraverserVisitor):
method __init__ (line 8359) | def __init__(self) -> None:
method visit_type_var (line 8362) | def visit_type_var(self, t: TypeVarType) -> None:
function conditional_types (line 8368) | def conditional_types(
function conditional_types (line 8378) | def conditional_types(
function conditional_types (line 8383) | def conditional_types(
function conditional_types_to_typemaps (line 8441) | def conditional_types_to_typemaps(
function gen_unique_name (line 8459) | def gen_unique_name(base: str, table: SymbolTable) -> str:
function is_true_literal (line 8469) | def is_true_literal(n: Expression) -> bool:
function is_false_literal (line 8474) | def is_false_literal(n: Expression) -> bool:
function is_literal_none (line 8479) | def is_literal_none(n: Expression) -> bool:
function is_literal_not_implemented (line 8484) | def is_literal_not_implemented(n: Expression) -> bool:
function _is_empty_generator_function (line 8488) | def _is_empty_generator_function(func: FuncItem) -> bool:
function builtin_item_type (line 8504) | def builtin_item_type(tp: Type) -> Type | None:
function and_conditional_maps (line 8561) | def and_conditional_maps(m1: TypeMap, m2: TypeMap, use_meet: bool = Fals...
function or_conditional_maps (line 8591) | def or_conditional_maps(m1: TypeMap, m2: TypeMap, coalesce_any: bool = F...
function reduce_conditional_maps (line 8617) | def reduce_conditional_maps(
function convert_to_typetype (line 8656) | def convert_to_typetype(type_map: TypeMap) -> TypeMap:
function flatten (line 8672) | def flatten(t: Expression) -> list[Expression]:
function flatten_types (line 8682) | def flatten_types(t: Type) -> list[Type]:
function expand_func (line 8693) | def expand_func(defn: FuncItem, map: dict[TypeVarId, Type]) -> FuncItem:
class TypeTransformVisitor (line 8700) | class TypeTransformVisitor(TransformVisitor):
method __init__ (line 8701) | def __init__(self, map: dict[TypeVarId, Type]) -> None:
method type (line 8705) | def type(self, type: Type) -> Type:
function are_argument_counts_overlapping (line 8709) | def are_argument_counts_overlapping(t: CallableType, s: CallableType) ->...
function expand_callable_variants (line 8716) | def expand_callable_variants(c: CallableType) -> list[CallableType]:
function is_unsafe_overlapping_overload_signatures (line 8745) | def is_unsafe_overlapping_overload_signatures(
function detach_callable (line 8824) | def detach_callable(typ: CallableType, class_type_vars: list[TypeVarLike...
function overload_can_never_match (line 8837) | def overload_can_never_match(signature: CallableType, other: CallableTyp...
function is_more_general_arg_prefix (line 8860) | def is_more_general_arg_prefix(t: FunctionLike, s: FunctionLike) -> bool:
function is_same_arg_prefix (line 8878) | def is_same_arg_prefix(t: CallableType, s: CallableType) -> bool:
function infer_operator_assignment_method (line 8889) | def infer_operator_assignment_method(typ: Type, operator: str) -> tuple[...
function _find_inplace_method (line 8908) | def _find_inplace_method(inst: Instance, method: str, operator: str) -> ...
function is_valid_inferred_type (line 8916) | def is_valid_inferred_type(typ: Type, is_lvalue_final: bool = False) -> ...
class InvalidInferredTypes (line 8941) | class InvalidInferredTypes(BoolTypeQuery):
method __init__ (line 8948) | def __init__(self) -> None:
method visit_uninhabited_type (line 8951) | def visit_uninhabited_type(self, t: UninhabitedType) -> bool:
method visit_erased_type (line 8954) | def visit_erased_type(self, t: ErasedType) -> bool:
method visit_type_var (line 8958) | def visit_type_var(self, t: TypeVarType) -> bool:
class SetNothingToAny (line 8964) | class SetNothingToAny(TypeTranslator):
method visit_uninhabited_type (line 8967) | def visit_uninhabited_type(self, t: UninhabitedType) -> Type:
method visit_type_alias_type (line 8972) | def visit_type_alias_type(self, t: TypeAliasType) -> Type:
function is_node_static (line 8978) | def is_node_static(node: Node | None) -> bool | None:
class CheckerScope (line 8990) | class CheckerScope:
method __init__ (line 8994) | def __init__(self, module: MypyFile) -> None:
method top_function (line 8997) | def top_function(self) -> FuncItem | None:
method top_non_lambda_function (line 9003) | def top_non_lambda_function(self) -> FuncItem | None:
method active_class (line 9009) | def active_class(self) -> TypeInfo | None:
method enclosing_class (line 9014) | def enclosing_class(self) -> TypeInfo | None:
method active_self_type (line 9025) | def active_self_type(self) -> Instance | TupleType | None:
method push_function (line 9039) | def push_function(self, item: FuncItem) -> Iterator[None]:
method push_class (line 9045) | def push_class(self, info: TypeInfo) -> Iterator[None]:
class DisjointDict (line 9055) | class DisjointDict(Generic[TKey, TValue]):
method __init__ (line 9082) | def __init__(self) -> None:
method add_mapping (line 9094) | def add_mapping(self, keys: set[TKey], values: set[TValue]) -> None:
method items (line 9114) | def items(self) -> list[tuple[set[TKey], set[TValue]]]:
method _lookup_or_make_root_id (line 9129) | def _lookup_or_make_root_id(self, key: TKey) -> int:
method _lookup_root_id (line 9139) | def _lookup_root_id(self, key: TKey) -> int:
function group_comparison_operands (line 9150) | def group_comparison_operands(
function is_typed_callable (line 9250) | def is_typed_callable(c: Type | None) -> bool:
function is_untyped_decorator (line 9260) | def is_untyped_decorator(typ: Type | None) -> bool:
function is_static (line 9285) | def is_static(func: FuncBase | Decorator) -> bool:
function is_property (line 9293) | def is_property(defn: SymbolNode) -> bool:
function get_property_type (line 9302) | def get_property_type(t: ProperType) -> ProperType:
function is_subset_no_promote (line 9310) | def is_subset_no_promote(left: Type, right: Type) -> bool:
function is_overlapping_types_for_overload (line 9314) | def is_overlapping_types_for_overload(left: Type, right: Type) -> bool:
function is_private (line 9331) | def is_private(node_name: str) -> bool:
function is_string_literal (line 9336) | def is_string_literal(typ: Type) -> bool:
function has_bool_item (line 9341) | def has_bool_item(typ: ProperType) -> bool:
function collapse_walrus (line 9350) | def collapse_walrus(e: Expression) -> Expression:
function find_last_var_assignment_line (line 9361) | def find_last_var_assignment_line(n: Node, v: Var) -> int:
class VarAssignVisitor (line 9373) | class VarAssignVisitor(TraverserVisitor):
method __init__ (line 9374) | def __init__(self, v: Var) -> None:
method visit_assignment_stmt (line 9379) | def visit_assignment_stmt(self, s: AssignmentStmt) -> None:
method visit_name_expr (line 9385) | def visit_name_expr(self, e: NameExpr) -> None:
method visit_member_expr (line 9389) | def visit_member_expr(self, e: MemberExpr) -> None:
method visit_index_expr (line 9395) | def visit_index_expr(self, e: IndexExpr) -> None:
method visit_with_stmt (line 9401) | def visit_with_stmt(self, s: WithStmt) -> None:
method visit_for_stmt (line 9409) | def visit_for_stmt(self, s: ForStmt) -> None:
method visit_assignment_expr (line 9417) | def visit_assignment_expr(self, e: AssignmentExpr) -> None:
method visit_as_pattern (line 9423) | def visit_as_pattern(self, p: AsPattern) -> None:
method visit_starred_pattern (line 9431) | def visit_starred_pattern(self, p: StarredPattern) -> None:
function is_ambiguous_mix_of_enums (line 9438) | def is_ambiguous_mix_of_enums(types: list[Type]) -> bool:
function _ambiguous_enum_variants (line 9456) | def _ambiguous_enum_variants(types: list[Type]) -> set[str]:
FILE: mypy/checkexpr.py
class TooManyUnions (line 243) | class TooManyUnions(Exception):
function allow_fast_container_literal (line 249) | def allow_fast_container_literal(t: Type) -> bool:
function extract_refexpr_names (line 258) | def extract_refexpr_names(expr: RefExpr) -> set[str]:
class Finished (line 290) | class Finished(Exception):
class UseReverse (line 295) | class UseReverse(enum.Enum):
class ExpressionChecker (line 308) | class ExpressionChecker(ExpressionVisitor[Type]):
method __init__ (line 327) | def __init__(
method reset (line 361) | def reset(self) -> None:
method visit_name_expr (line 364) | def visit_name_expr(self, e: NameExpr) -> Type:
method analyze_ref_expr (line 375) | def analyze_ref_expr(self, e: RefExpr, lvalue: bool = False) -> Type:
method analyze_var_ref (line 450) | def analyze_var_ref(self, var: Var, context: Context) -> Type:
method module_type (line 468) | def module_type(self, node: MypyFile) -> Instance:
method visit_call_expr (line 493) | def visit_call_expr(self, e: CallExpr, allow_none_return: bool = False...
method refers_to_typeddict (line 504) | def refers_to_typeddict(self, base: Expression) -> bool:
method visit_call_expr_inner (line 514) | def visit_call_expr_inner(self, e: CallExpr, allow_none_return: bool =...
method check_str_format_call (line 741) | def check_str_format_call(self, e: CallExpr) -> None:
method method_fullname (line 764) | def method_fullname(self, object_type: Type, method_name: str) -> str ...
method always_returns_none (line 792) | def always_returns_none(self, node: Expression) -> bool:
method defn_returns_none (line 814) | def defn_returns_none(self, defn: SymbolNode | None) -> bool:
method check_runtime_protocol_test (line 838) | def check_runtime_protocol_test(self, e: CallExpr) -> None:
method check_protocol_issubclass (line 849) | def check_protocol_issubclass(self, e: CallExpr) -> None:
method check_typeddict_call (line 857) | def check_typeddict_call(
method validate_typeddict_kwargs (line 899) | def validate_typeddict_kwargs(
method validate_star_typeddict_item (line 949) | def validate_star_typeddict_item(
method valid_unpack_fallback_item (line 1005) | def valid_unpack_fallback_item(self, typ: ProperType) -> bool:
method match_typeddict_call_with_dict (line 1013) | def match_typeddict_call_with_dict(
method check_typeddict_call_with_dict (line 1026) | def check_typeddict_call_with_dict(
method typeddict_callable (line 1046) | def typeddict_callable(self, info: TypeInfo) -> CallableType:
method typeddict_callable_from_context (line 1070) | def typeddict_callable_from_context(self, callee: TypedDictType) -> Ca...
method check_typeddict_call_with_kwargs (line 1082) | def check_typeddict_call_with_kwargs(
method get_partial_self_var (line 1177) | def get_partial_self_var(self, expr: MemberExpr) -> Var | None:
method try_infer_partial_type (line 1211) | def try_infer_partial_type(self, e: CallExpr) -> None:
method get_partial_var (line 1251) | def get_partial_var(self, ref: RefExpr) -> tuple[Var, dict[Var, Contex...
method try_infer_partial_value_type_from_call (line 1262) | def try_infer_partial_value_type_from_call(
method apply_function_plugin (line 1305) | def apply_function_plugin(
method apply_signature_hook (line 1378) | def apply_signature_hook(
method apply_function_signature_hook (line 1410) | def apply_function_signature_hook(
method apply_method_signature_hook (line 1428) | def apply_method_signature_hook(
method transform_callee_type (line 1452) | def transform_callee_type(
method is_generic_decorator_overload_call (line 1493) | def is_generic_decorator_overload_call(
method handle_decorator_overload_call (line 1512) | def handle_decorator_overload_call(
method check_call_expr_with_callee_type (line 1542) | def check_call_expr_with_callee_type(
method check_union_call_expr (line 1597) | def check_union_call_expr(self, e: CallExpr, object_type: UnionType, m...
method check_call (line 1626) | def check_call(
method check_callable_call (line 1754) | def check_callable_call(
method can_return_none (line 1941) | def can_return_none(self, type: TypeInfo, attr_name: str) -> bool:
method analyze_type_type_callee (line 1965) | def analyze_type_type_callee(self, item: ProperType, context: Context)...
method infer_arg_types_in_empty_context (line 2011) | def infer_arg_types_in_empty_context(self, args: list[Expression]) -> ...
method infer_more_unions_for_recursive_type (line 2027) | def infer_more_unions_for_recursive_type(self, type_context: Type) -> ...
method infer_arg_types_in_context (line 2043) | def infer_arg_types_in_context(
method infer_function_type_arguments_using_context (line 2080) | def infer_function_type_arguments_using_context(
method infer_function_type_arguments (line 2160) | def infer_function_type_arguments(
method infer_function_type_arguments_pass2 (line 2299) | def infer_function_type_arguments_pass2(
method argument_infer_context (line 2355) | def argument_infer_context(self) -> ArgumentInferContext:
method get_arg_infer_passes (line 2360) | def get_arg_infer_passes(
method apply_inferred_arguments (line 2407) | def apply_inferred_arguments(
method check_argument_count (line 2427) | def check_argument_count(
method check_for_extra_actual_arguments (line 2498) | def check_for_extra_actual_arguments(
method missing_classvar_callable_note (line 2559) | def missing_classvar_callable_note(
method check_argument_types (line 2573) | def check_argument_types(
method check_arg (line 2716) | def check_arg(
method check_overload_call (line 2756) | def check_overload_call(
method plausible_overload_call_targets (line 2902) | def plausible_overload_call_targets(
method infer_overload_return_type (line 2961) | def infer_overload_return_type(
method overload_erased_call_targets (line 3056) | def overload_erased_call_targets(
method possible_none_type_var_overlap (line 3077) | def possible_none_type_var_overlap(
method union_overload_result (line 3115) | def union_overload_result(
method real_union (line 3217) | def real_union(self, typ: Type) -> bool:
method type_overrides_set (line 3222) | def type_overrides_set(
method combine_function_signatures (line 3235) | def combine_function_signatures(self, types: list[ProperType]) -> AnyT...
method erased_signature_similarity (line 3317) | def erased_signature_similarity(
method apply_generic_arguments (line 3370) | def apply_generic_arguments(
method check_any_type_call (line 3386) | def check_any_type_call(self, args: list[Expression], callee: Type) ->...
method check_union_call (line 3399) | def check_union_call(
method check_intersection_call (line 3415) | def check_intersection_call(
method visit_member_expr (line 3466) | def visit_member_expr(self, e: MemberExpr, is_lvalue: bool = False) ->...
method analyze_ordinary_member_access (line 3474) | def analyze_ordinary_member_access(self, e: MemberExpr, is_lvalue: boo...
method analyze_external_member_access (line 3511) | def analyze_external_member_access(
method is_literal_context (line 3531) | def is_literal_context(self) -> bool:
method infer_literal_expr_type (line 3534) | def infer_literal_expr_type(self, value: LiteralValue, fallback_name: ...
method concat_tuples (line 3561) | def concat_tuples(self, left: TupleType, right: TupleType) -> TupleType:
method visit_int_expr (line 3568) | def visit_int_expr(self, e: IntExpr) -> Type:
method visit_str_expr (line 3572) | def visit_str_expr(self, e: StrExpr) -> Type:
method visit_bytes_expr (line 3576) | def visit_bytes_expr(self, e: BytesExpr) -> Type:
method visit_float_expr (line 3580) | def visit_float_expr(self, e: FloatExpr) -> Type:
method visit_complex_expr (line 3584) | def visit_complex_expr(self, e: ComplexExpr) -> Type:
method visit_ellipsis (line 3588) | def visit_ellipsis(self, e: EllipsisExpr) -> Type:
method visit_op_expr (line 3592) | def visit_op_expr(self, e: OpExpr) -> Type:
method visit_comparison_expr (line 3701) | def visit_comparison_expr(self, e: ComparisonExpr) -> Type:
method find_partial_type_ref_fast_path (line 3850) | def find_partial_type_ref_fast_path(self, expr: Expression) -> Type | ...
method dangerous_comparison (line 3866) | def dangerous_comparison(
method check_method_call_by_name (line 3991) | def check_method_call_by_name(
method check_union_method_call_by_name (line 4028) | def check_union_method_call_by_name(
method check_method_call (line 4056) | def check_method_call(
method check_op_reversible (line 4086) | def check_op_reversible(
method check_op (line 4282) | def check_op(
method check_boolean_op (line 4393) | def check_boolean_op(self, e: OpExpr, context: Context) -> Type:
method check_list_multiply (line 4468) | def check_list_multiply(self, e: OpExpr) -> Type:
method visit_assignment_expr (line 4484) | def visit_assignment_expr(self, e: AssignmentExpr) -> Type:
method visit_unary_expr (line 4495) | def visit_unary_expr(self, e: UnaryExpr) -> Type:
method visit_index_expr (line 4508) | def visit_index_expr(self, e: IndexExpr) -> Type:
method visit_index_expr_helper (line 4524) | def visit_index_expr_helper(self, e: IndexExpr) -> Type:
method visit_index_with_type (line 4531) | def visit_index_with_type(
method min_tuple_length (line 4607) | def min_tuple_length(self, left: TupleType) -> int:
method visit_tuple_index_helper (line 4617) | def visit_tuple_index_helper(self, left: TupleType, n: int) -> Type | ...
method visit_tuple_slice_helper (line 4665) | def visit_tuple_slice_helper(self, left_type: TupleType, slic: SliceEx...
method try_getting_int_literals (line 4697) | def try_getting_int_literals(self, index: Expression) -> list[int] | N...
method nonliteral_tuple_index_helper (line 4735) | def nonliteral_tuple_index_helper(self, left_type: TupleType, index: E...
method union_tuple_fallback_item (line 4743) | def union_tuple_fallback_item(self, left_type: TupleType) -> Type:
method visit_typeddict_index_expr (line 4762) | def visit_typeddict_index_expr(
method visit_enum_index_expr (line 4799) | def visit_enum_index_expr(
method visit_cast_expr (line 4812) | def visit_cast_expr(self, expr: CastExpr) -> Type:
method visit_assert_type_expr (line 4841) | def visit_assert_type_expr(self, expr: AssertTypeExpr) -> Type:
method visit_reveal_expr (line 4867) | def visit_reveal_expr(self, expr: RevealExpr) -> Type:
method check_reveal_imported (line 4916) | def check_reveal_imported(self, expr: RevealExpr) -> None:
method visit_type_application (line 4939) | def visit_type_application(self, tapp: TypeApplication) -> Type:
method visit_type_alias_expr (line 4986) | def visit_type_alias_expr(self, alias: TypeAliasExpr) -> Type:
method alias_type_in_runtime_context (line 5000) | def alias_type_in_runtime_context(
method split_for_callable (line 5073) | def split_for_callable(
method apply_type_arguments_to_callable (line 5129) | def apply_type_arguments_to_callable(
method visit_list_expr (line 5219) | def visit_list_expr(self, e: ListExpr) -> Type:
method visit_set_expr (line 5223) | def visit_set_expr(self, e: SetExpr) -> Type:
method fast_container_type (line 5226) | def fast_container_type(
method check_lst_expr (line 5260) | def check_lst_expr(self, e: ListExpr | SetExpr | TupleExpr, fullname: ...
method tuple_context_matches (line 5295) | def tuple_context_matches(self, expr: TupleExpr, ctx: TupleType) -> bool:
method visit_tuple_expr (line 5308) | def visit_tuple_expr(self, e: TupleExpr) -> Type:
method fast_dict_type (line 5413) | def fast_dict_type(self, e: DictExpr) -> Type | None:
method check_typeddict_literal_in_context (line 5460) | def check_typeddict_literal_in_context(
method visit_dict_expr (line 5471) | def visit_dict_expr(self, e: DictExpr) -> Type:
method find_typeddict_context (line 5553) | def find_typeddict_context(
method visit_lambda_expr (line 5572) | def visit_lambda_expr(self, e: LambdaExpr) -> Type:
method infer_lambda_type_using_context (line 5656) | def infer_lambda_type_using_context(
method visit_super_expr (line 5733) | def visit_super_expr(self, e: SuperExpr) -> Type:
method _super_arg_types (line 5817) | def _super_arg_types(self, e: SuperExpr) -> Type | tuple[Type, Type]:
method visit_slice_expr (line 5899) | def visit_slice_expr(self, e: SliceExpr) -> Type:
method visit_list_comprehension (line 5915) | def visit_list_comprehension(self, e: ListComprehension) -> Type:
method visit_set_comprehension (line 5920) | def visit_set_comprehension(self, e: SetComprehension) -> Type:
method visit_generator_expr (line 5925) | def visit_generator_expr(self, e: GeneratorExpr) -> Type:
method check_generator_or_comprehension (line 5945) | def check_generator_or_comprehension(
method visit_dictionary_comprehension (line 5979) | def visit_dictionary_comprehension(self, e: DictionaryComprehension) -...
method check_for_comp (line 6015) | def check_for_comp(self, e: GeneratorExpr | DictionaryComprehension) -...
method visit_conditional_expr (line 6044) | def visit_conditional_expr(self, e: ConditionalExpr, allow_none_return...
method analyze_cond_branch (line 6125) | def analyze_cond_branch(
method accept (line 6148) | def accept(
method named_type (line 6216) | def named_type(self, name: str) -> Instance:
method type_alias_type_type (line 6222) | def type_alias_type_type(self) -> Instance:
method is_valid_var_arg (line 6228) | def is_valid_var_arg(self, typ: Type) -> bool:
method is_valid_keyword_var_arg (line 6235) | def is_valid_keyword_var_arg(self, typ: Type) -> bool:
method has_member (line 6254) | def has_member(self, typ: Type, member: str) -> bool:
method not_ready_callback (line 6293) | def not_ready_callback(self, name: str, context: Context) -> None:
method visit_yield_expr (line 6301) | def visit_yield_expr(self, e: YieldExpr) -> Type:
method visit_await_expr (line 6322) | def visit_await_expr(self, e: AwaitExpr, allow_none_return: bool = Fal...
method check_awaitable_expr (line 6336) | def check_awaitable_expr(
method visit_yield_from_expr (line 6359) | def visit_yield_from_expr(self, e: YieldFromExpr, allow_none_return: b...
method visit_temp_node (line 6418) | def visit_temp_node(self, e: TempNode) -> Type:
method visit_type_var_expr (line 6421) | def visit_type_var_expr(self, e: TypeVarExpr) -> Type:
method visit_paramspec_expr (line 6433) | def visit_paramspec_expr(self, e: ParamSpecExpr) -> Type:
method visit_type_var_tuple_expr (line 6436) | def visit_type_var_tuple_expr(self, e: TypeVarTupleExpr) -> Type:
method visit_newtype_expr (line 6439) | def visit_newtype_expr(self, e: NewTypeExpr) -> Type:
method visit_namedtuple_expr (line 6442) | def visit_namedtuple_expr(self, e: NamedTupleExpr) -> Type:
method visit_enum_call_expr (line 6454) | def visit_enum_call_expr(self, e: EnumCallExpr) -> Type:
method visit_typeddict_expr (line 6469) | def visit_typeddict_expr(self, e: TypedDictExpr) -> Type:
method visit__promote_expr (line 6472) | def visit__promote_expr(self, e: PromoteExpr) -> Type:
method visit_star_expr (line 6475) | def visit_star_expr(self, e: StarExpr) -> Type:
method object_type (line 6479) | def object_type(self) -> Instance:
method bool_type (line 6483) | def bool_type(self) -> Instance:
method narrow_type_from_binder (line 6488) | def narrow_type_from_binder(self, expr: Expression, known_type: Type) ...
method narrow_type_from_binder (line 6491) | def narrow_type_from_binder(
method narrow_type_from_binder (line 6495) | def narrow_type_from_binder(
method has_abstract_type_part (line 6519) | def has_abstract_type_part(self, caller_type: ProperType, callee_type:...
method has_abstract_type (line 6528) | def has_abstract_type(self, caller_type: ProperType, callee_type: Prop...
function has_any_type (line 6540) | def has_any_type(
function has_untyped_type (line 6547) | def has_untyped_type(t: Type, ignore_in_type_obj: bool = False) -> bool:
class HasAnyType (line 6552) | class HasAnyType(types.BoolTypeQuery):
method __init__ (line 6553) | def __init__(self, ignore_in_type_obj: bool, ignore_any_from_error: bo...
method visit_any (line 6558) | def visit_any(self, t: AnyType) -> bool:
method visit_callable_type (line 6570) | def visit_callable_type(self, t: CallableType) -> bool:
method visit_type_var (line 6575) | def visit_type_var(self, t: TypeVarType) -> bool:
method visit_param_spec (line 6579) | def visit_param_spec(self, t: ParamSpecType) -> bool:
method visit_type_var_tuple (line 6583) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> bool:
class HasUntypedType (line 6588) | class HasUntypedType(HasAnyType):
method __init__ (line 6589) | def __init__(self) -> None:
method visit_any (line 6592) | def visit_any(self, t: AnyType) -> bool:
function has_coroutine_decorator (line 6599) | def has_coroutine_decorator(t: Type) -> bool:
function is_async_def (line 6605) | def is_async_def(t: Type) -> bool:
function is_non_empty_tuple (line 6629) | def is_non_empty_tuple(t: Type) -> bool:
function is_duplicate_mapping (line 6634) | def is_duplicate_mapping(
function replace_callable_return_type (line 6659) | def replace_callable_return_type(c: CallableType, new_ret_type: Type) ->...
class ArgInferSecondPassQuery (line 6664) | class ArgInferSecondPassQuery(types.BoolTypeQuery):
method __init__ (line 6672) | def __init__(self) -> None:
method visit_callable_type (line 6675) | def visit_callable_type(self, t: CallableType) -> bool:
function has_erased_component (line 6680) | def has_erased_component(t: Type | None) -> bool:
class HasErasedComponentsQuery (line 6684) | class HasErasedComponentsQuery(types.BoolTypeQuery):
method __init__ (line 6687) | def __init__(self) -> None:
method visit_erased_type (line 6690) | def visit_erased_type(self, t: ErasedType) -> bool:
function has_uninhabited_component (line 6694) | def has_uninhabited_component(t: Type | None) -> bool:
class HasUninhabitedComponentsQuery (line 6698) | class HasUninhabitedComponentsQuery(types.BoolTypeQuery):
method __init__ (line 6701) | def __init__(self) -> None:
method visit_uninhabited_type (line 6704) | def visit_uninhabited_type(self, t: UninhabitedType) -> bool:
function arg_approximate_similarity (line 6708) | def arg_approximate_similarity(actual: Type, formal: Type) -> bool:
function any_causes_overload_ambiguity (line 6771) | def any_causes_overload_ambiguity(
function all_same_types (line 6829) | def all_same_types(types: list[Type]) -> bool:
function merge_typevars_in_callables_by_name (line 6835) | def merge_typevars_in_callables_by_name(
function try_getting_literal (line 6880) | def try_getting_literal(typ: Type) -> ProperType:
function is_expr_literal_type (line 6888) | def is_expr_literal_type(node: Expression) -> bool:
function has_bytes_component (line 6901) | def has_bytes_component(typ: Type) -> bool:
function type_info_from_type (line 6912) | def type_info_from_type(typ: Type) -> TypeInfo | None:
function is_operator_method (line 6931) | def is_operator_method(fullname: str | None) -> bool:
function get_partial_instance_type (line 6942) | def get_partial_instance_type(t: Type | None) -> PartialType | None:
function is_type_type_context (line 6948) | def is_type_type_context(context: Type | None) -> bool:
FILE: mypy/checkmember.py
class MemberContext (line 86) | class MemberContext:
method __init__ (line 92) | def __init__(
method named_type (line 119) | def named_type(self, name: str) -> Instance:
method not_ready_callback (line 122) | def not_ready_callback(self, name: str, context: Context) -> None:
method copy_modified (line 125) | def copy_modified(
function analyze_member_access (line 156) | def analyze_member_access(
function _analyze_member_access (line 222) | def _analyze_member_access(
function may_be_awaitable_attribute (line 266) | def may_be_awaitable_attribute(
function report_missing_attribute (line 281) | def report_missing_attribute(
function analyze_instance_member_access (line 299) | def analyze_instance_member_access(
function validate_super_call (line 373) | def validate_super_call(node: FuncBase, mx: MemberContext) -> None:
function analyze_type_callable_member_access (line 386) | def analyze_type_callable_member_access(name: str, typ: FunctionLike, mx...
function analyze_type_type_member_access (line 422) | def analyze_type_type_member_access(
function analyze_union_member_access (line 478) | def analyze_union_member_access(name: str, typ: UnionType, mx: MemberCon...
function analyze_intersection_member_access (line 488) | def analyze_intersection_member_access(
function analyze_none_member_access (line 505) | def analyze_none_member_access(name: str, typ: NoneType, mx: MemberConte...
function analyze_member_var_access (line 519) | def analyze_member_var_access(
function check_final_member (line 667) | def check_final_member(name: str, info: TypeInfo, msg: MessageBuilder, c...
function analyze_descriptor_access (line 675) | def analyze_descriptor_access(
function is_instance_var (line 781) | def is_instance_var(var: Var) -> bool:
function analyze_var (line 793) | def analyze_var(
function expand_self_type_if_needed (line 901) | def expand_self_type_if_needed(
function freeze_all_type_vars (line 945) | def freeze_all_type_vars(member_type: Type) -> None:
class FreezeTypeVarsVisitor (line 949) | class FreezeTypeVarsVisitor(TypeTraverserVisitor):
method visit_callable_type (line 950) | def visit_callable_type(self, t: CallableType) -> None:
function lookup_member_var_or_accessor (line 956) | def lookup_member_var_or_accessor(info: TypeInfo, name: str, is_lvalue: ...
function check_self_arg (line 966) | def check_self_arg(
function analyze_class_attribute_access (line 1023) | def analyze_class_attribute_access(
function apply_class_attr_hook (line 1216) | def apply_class_attr_hook(
function analyze_enum_class_attribute_access (line 1228) | def analyze_enum_class_attribute_access(
function analyze_typeddict_access (line 1253) | def analyze_typeddict_access(
function add_class_tvars (line 1292) | def add_class_tvars(
function type_object_type (line 1368) | def type_object_type(info: TypeInfo, named_type: Callable[[str], Instanc...
function analyze_decorator_or_funcbase_access (line 1439) | def analyze_decorator_or_funcbase_access(
function is_valid_constructor (line 1459) | def is_valid_constructor(n: SymbolNode | None) -> bool:
FILE: mypy/checkpattern.py
class PatternType (line 80) | class PatternType(NamedTuple):
class PatternChecker (line 86) | class PatternChecker(PatternVisitor[PatternType]):
method __init__ (line 114) | def __init__(
method accept (line 128) | def accept(self, o: Pattern, type_context: Type) -> PatternType:
method visit_as_pattern (line 135) | def visit_as_pattern(self, o: AsPattern) -> PatternType:
method visit_or_pattern (line 152) | def visit_or_pattern(self, o: OrPattern) -> PatternType:
method visit_value_pattern (line 202) | def visit_value_pattern(self, o: ValuePattern) -> PatternType:
method visit_singleton_pattern (line 213) | def visit_singleton_pattern(self, o: SingletonPattern) -> PatternType:
method visit_sequence_pattern (line 228) | def visit_sequence_pattern(self, o: SequencePattern) -> PatternType:
method get_sequence_type (line 354) | def get_sequence_type(self, t: Type, context: Context) -> Type | None:
method contract_starred_pattern_types (line 373) | def contract_starred_pattern_types(
method expand_starred_pattern_types (line 422) | def expand_starred_pattern_types(
method narrow_sequence_child (line 450) | def narrow_sequence_child(self, outer_type: Type, inner_type: Type, ct...
method visit_starred_pattern (line 460) | def visit_starred_pattern(self, o: StarredPattern) -> PatternType:
method visit_mapping_pattern (line 467) | def visit_mapping_pattern(self, o: MappingPattern) -> PatternType:
method get_mapping_item_type (line 503) | def get_mapping_item_type(
method get_simple_mapping_item_type (line 526) | def get_simple_mapping_item_type(
method visit_class_pattern (line 534) | def visit_class_pattern(self, o: ClassPattern) -> PatternType:
method should_self_match (line 704) | def should_self_match(self, typ: Type) -> bool:
method can_match_sequence (line 715) | def can_match_sequence(self, typ: ProperType) -> bool:
method generate_types_from_names (line 729) | def generate_types_from_names(self, type_names: list[str]) -> list[Type]:
method update_type_map (line 740) | def update_type_map(
method construct_sequence_child (line 755) | def construct_sequence_child(self, outer_type: Type, inner_type: Type)...
method early_non_match (line 788) | def early_non_match(self) -> PatternType:
function get_match_arg_names (line 792) | def get_match_arg_names(typ: TupleType) -> list[str | None]:
function get_var (line 803) | def get_var(expr: Expression) -> Var:
function get_type_range (line 814) | def get_type_range(typ: Type) -> mypy.checker.TypeRange:
function is_uninhabited (line 825) | def is_uninhabited(typ: Type) -> bool:
FILE: mypy/checkstrformat.py
function compile_format_re (line 81) | def compile_format_re() -> Pattern[str]:
function compile_new_format_re (line 97) | def compile_new_format_re(custom_spec: bool) -> Pattern[str]:
class ConversionSpecifier (line 146) | class ConversionSpecifier:
method __init__ (line 147) | def __init__(
method has_key (line 171) | def has_key(self) -> bool:
method has_star (line 174) | def has_star(self) -> bool:
function parse_conversion_specifiers (line 178) | def parse_conversion_specifiers(format_str: str) -> list[ConversionSpeci...
function parse_format_value (line 186) | def parse_format_value(
function find_non_escaped_targets (line 242) | def find_non_escaped_targets(
class StringFormatterChecker (line 299) | class StringFormatterChecker:
method __init__ (line 312) | def __init__(
method check_str_format_call (line 323) | def check_str_format_call(self, call: CallExpr, format_value: str) -> ...
method check_specs_in_format_call (line 360) | def check_specs_in_format_call(
method helpful_check (line 445) | def helpful_check(self, actual_type: ProperType, context: Context) -> ...
method perform_special_format_checks (line 490) | def perform_special_format_checks(
method find_replacements_in_call (line 545) | def find_replacements_in_call(self, call: CallExpr, keys: list[str]) -...
method get_expr_by_position (line 581) | def get_expr_by_position(self, pos: int, call: CallExpr) -> Expression...
method get_expr_by_name (line 607) | def get_expr_by_name(self, key: str, call: CallExpr) -> Expression | N...
method auto_generate_keys (line 634) | def auto_generate_keys(self, all_specs: list[ConversionSpecifier], ctx...
method apply_field_accessors (line 663) | def apply_field_accessors(
method validate_and_transform_accessors (line 703) | def validate_and_transform_accessors(
method check_str_interpolation (line 763) | def check_str_interpolation(self, expr: FormatStringExpr, replacements...
method analyze_conversion_specifiers (line 784) | def analyze_conversion_specifiers(
method check_simple_str_interpolation (line 801) | def check_simple_str_interpolation(
method check_mapping_str_interpolation (line 874) | def check_mapping_str_interpolation(
method build_dict_type (line 934) | def build_dict_type(self, expr: FormatStringExpr) -> Type:
method build_replacement_checkers (line 950) | def build_replacement_checkers(
method replacement_checkers (line 961) | def replacement_checkers(
method checkers_for_star (line 987) | def checkers_for_star(self, context: Context) -> Checkers:
method check_placeholder_type (line 1005) | def check_placeholder_type(self, typ: Type, expected_type: Type, conte...
method check_builtins_type (line 1016) | def check_builtins_type(self, typ: Type, context: Context) -> bool:
method check_datetime (line 1036) | def check_datetime(self, typ: Type, spec: str, ctx: Context):
method checkers_for_regular_type (line 1085) | def checkers_for_regular_type(
method check_s_special_cases (line 1108) | def check_s_special_cases(self, expr: FormatStringExpr, typ: Type, con...
method checkers_for_c_type (line 1131) | def checkers_for_c_type(
method conversion_type (line 1174) | def conversion_type(
method named_type (line 1233) | def named_type(self, name: str) -> Instance:
method accept (line 1239) | def accept(self, expr: Expression, context: Type | None = None) -> Type:
function has_type_component (line 1244) | def has_type_component(typ: Type, fullname: str) -> bool:
FILE: mypy/config_parser.py
function parse_version (line 31) | def parse_version(v: str | float) -> tuple[int, int]:
function try_split (line 55) | def try_split(v: str | Sequence[str], split_regex: str = "[,]") -> list[...
function validate_codes (line 63) | def validate_codes(codes: list[str]) -> list[str]:
function validate_package_allow_list (line 72) | def validate_package_allow_list(allow_list: list[str]) -> list[str]:
function expand_path (line 86) | def expand_path(path: str) -> str:
function str_or_array_as_list (line 94) | def str_or_array_as_list(v: str | Sequence[str]) -> list[str]:
function split_and_match_files_list (line 100) | def split_and_match_files_list(paths: Sequence[str]) -> list[str]:
function split_and_match_files (line 120) | def split_and_match_files(paths: str) -> list[str]:
function check_follow_imports (line 132) | def check_follow_imports(choice: str) -> str:
function check_junit_format (line 143) | def check_junit_format(choice: str) -> str:
function split_commas (line 154) | def split_commas(value: str) -> list[str]:
function parse_config_file (line 220) | def parse_config_file(
function get_prefix (line 332) | def get_prefix(file_read: str, name: str) -> str:
function is_toml (line 341) | def is_toml(filename: str) -> bool:
function destructure_overrides (line 345) | def destructure_overrides(toml_data: dict[str, Any]) -> dict[str, Any]:
function parse_section (line 428) | def parse_section(
function convert_to_boolean (line 534) | def convert_to_boolean(value: Any | None) -> bool:
function split_directive (line 545) | def split_directive(s: str) -> tuple[list[str], list[str]]:
function mypy_comments_to_config_map (line 574) | def mypy_comments_to_config_map(line: str, template: Options) -> tuple[d...
function parse_mypy_comments (line 593) | def parse_mypy_comments(
function get_config_module_names (line 642) | def get_config_module_names(filename: str | None, modules: list[str]) ->...
class ConfigTOMLValueError (line 652) | class ConfigTOMLValueError(ValueError):
FILE: mypy/constant_fold.py
function constant_fold_expr (line 27) | def constant_fold_expr(expr: Expression, cur_mod_id: str) -> ConstantVal...
function constant_fold_binary_op (line 79) | def constant_fold_binary_op(
function constant_fold_binary_int_op (line 114) | def constant_fold_binary_int_op(op: str, left: int, right: int) -> int |...
function constant_fold_binary_float_op (line 150) | def constant_fold_binary_float_op(op: str, left: int | float, right: int...
function constant_fold_unary_op (line 180) | def constant_fold_unary_op(op: str, value: ConstantValue) -> int | float...
FILE: mypy/constraints.py
class Constraint (line 73) | class Constraint:
method __init__ (line 83) | def __init__(self, type_var: TypeVarLikeType, op: int, target: Type) -...
method __repr__ (line 95) | def __repr__(self) -> str:
method __hash__ (line 101) | def __hash__(self) -> int:
method __eq__ (line 104) | def __eq__(self, other: object) -> bool:
function infer_constraints_for_callable (line 110) | def infer_constraints_for_callable(
function infer_constraints (line 279) | def infer_constraints(
function _infer_constraints (line 323) | def _infer_constraints(
function _is_type_type (line 474) | def _is_type_type(tp: ProperType) -> TypeGuard[TypeType | UnionType]:
function _unwrap_type_type (line 487) | def _unwrap_type_type(tp: TypeType | UnionType) -> ProperType:
function infer_constraints_if_possible (line 494) | def infer_constraints_if_possible(
function select_trivial (line 520) | def select_trivial(options: Sequence[list[Constraint] | None]) -> list[l...
function merge_with_any (line 531) | def merge_with_any(constraint: Constraint) -> Constraint:
function handle_recursive_union (line 546) | def handle_recursive_union(template: UnionType, actual: Type, direction:...
function any_constraints (line 559) | def any_constraints(options: list[list[Constraint] | None], eager: bool)...
function filter_satisfiable (line 611) | def filter_satisfiable(option: list[Constraint] | None) -> list[Constrai...
function is_same_constraints (line 634) | def is_same_constraints(x: list[Constraint], y: list[Constraint]) -> bool:
function is_same_constraint (line 644) | def is_same_constraint(c1: Constraint, c2: Constraint) -> bool:
function is_similar_constraints (line 656) | def is_similar_constraints(x: list[Constraint], y: list[Constraint]) -> ...
function _is_similar_constraints (line 666) | def _is_similar_constraints(x: list[Constraint], y: list[Constraint]) ->...
function simplify_away_incomplete_types (line 686) | def simplify_away_incomplete_types(types: Iterable[Type]) -> list[Type]:
function is_complete_type (line 694) | def is_complete_type(typ: Type) -> bool:
class CompleteTypeVisitor (line 703) | class CompleteTypeVisitor(TypeQuery[bool]):
method __init__ (line 704) | def __init__(self) -> None:
method visit_uninhabited_type (line 707) | def visit_uninhabited_type(self, t: UninhabitedType) -> bool:
class ConstraintBuilderVisitor (line 711) | class ConstraintBuilderVisitor(TypeVisitor[list[Constraint]]):
method __init__ (line 718) | def __init__(self, actual: ProperType, direction: int, skip_neg_op: bo...
method visit_unbound_type (line 729) | def visit_unbound_type(self, template: UnboundType) -> list[Constraint]:
method visit_any (line 732) | def visit_any(self, template: AnyType) -> list[Constraint]:
method visit_none_type (line 735) | def visit_none_type(self, template: NoneType) -> list[Constraint]:
method visit_uninhabited_type (line 738) | def visit_uninhabited_type(self, template: UninhabitedType) -> list[Co...
method visit_erased_type (line 741) | def visit_erased_type(self, template: ErasedType) -> list[Constraint]:
method visit_deleted_type (line 744) | def visit_deleted_type(self, template: DeletedType) -> list[Constraint]:
method visit_literal_type (line 747) | def visit_literal_type(self, template: LiteralType) -> list[Constraint]:
method visit_partial_type (line 752) | def visit_partial_type(self, template: PartialType) -> list[Constraint]:
method visit_type_var (line 758) | def visit_type_var(self, template: TypeVarType) -> list[Constraint]:
method visit_param_spec (line 764) | def visit_param_spec(self, template: ParamSpecType) -> list[Constraint]:
method visit_type_var_tuple (line 768) | def visit_type_var_tuple(self, template: TypeVarTupleType) -> list[Con...
method visit_unpack_type (line 771) | def visit_unpack_type(self, template: UnpackType) -> list[Constraint]:
method visit_parameters (line 774) | def visit_parameters(self, template: Parameters) -> list[Constraint]:
method visit_instance (line 792) | def visit_instance(self, template: Instance) -> list[Constraint]:
method infer_constraints_from_protocol_members (line 1066) | def infer_constraints_from_protocol_members(
method visit_callable_type (line 1096) | def visit_callable_type(self, template: CallableType) -> list[Constrai...
method infer_against_overloaded (line 1254) | def infer_against_overloaded(
method visit_tuple_type (line 1265) | def visit_tuple_type(self, template: TupleType) -> list[Constraint]:
method visit_typeddict_type (line 1362) | def visit_typeddict_type(self, template: TypedDictType) -> list[Constr...
method visit_union_type (line 1376) | def visit_union_type(self, template: UnionType) -> list[Constraint]:
method visit_intersection_type (line 1382) | def visit_intersection_type(self, template: IntersectionType) -> list[...
method visit_type_alias_type (line 1385) | def visit_type_alias_type(self, template: TypeAliasType) -> list[Const...
method infer_against_any (line 1388) | def infer_against_any(self, types: Iterable[Type], any_type: AnyType) ...
method visit_overloaded (line 1405) | def visit_overloaded(self, template: Overloaded) -> list[Constraint]:
method visit_type_type (line 1415) | def visit_type_type(self, template: TypeType) -> list[Constraint]:
function neg_op (line 1428) | def neg_op(op: int) -> int:
function find_matching_overload_item (line 1439) | def find_matching_overload_item(overloaded: Overloaded, template: Callab...
function find_matching_overload_items (line 1458) | def find_matching_overload_items(
function get_tuple_fallback_from_unpack (line 1482) | def get_tuple_fallback_from_unpack(unpack: UnpackType) -> TypeInfo:
function repack_callable_args (line 1496) | def repack_callable_args(callable: CallableType, tuple_type: TypeInfo) -...
function build_constraints_for_simple_unpack (line 1522) | def build_constraints_for_simple_unpack(
function infer_directed_arg_constraints (line 1618) | def infer_directed_arg_constraints(left: Type, right: Type, direction: i...
function infer_callable_arguments_constraints (line 1633) | def infer_callable_arguments_constraints(
function filter_imprecise_kinds (line 1706) | def filter_imprecise_kinds(cs: list[Constraint]) -> list[Constraint]:
FILE: mypy/copytype.py
function copy_type (line 35) | def copy_type(t: ProperType) -> ProperType:
class TypeShallowCopier (line 46) | class TypeShallowCopier(TypeVisitor[ProperType]):
method visit_unbound_type (line 47) | def visit_unbound_type(self, t: UnboundType) -> ProperType:
method visit_any (line 50) | def visit_any(self, t: AnyType) -> ProperType:
method visit_none_type (line 53) | def visit_none_type(self, t: NoneType) -> ProperType:
method visit_uninhabited_type (line 56) | def visit_uninhabited_type(self, t: UninhabitedType) -> ProperType:
method visit_erased_type (line 61) | def visit_erased_type(self, t: ErasedType) -> ProperType:
method visit_deleted_type (line 64) | def visit_deleted_type(self, t: DeletedType) -> ProperType:
method visit_instance (line 67) | def visit_instance(self, t: Instance) -> ProperType:
method visit_type_var (line 73) | def visit_type_var(self, t: TypeVarType) -> ProperType:
method visit_param_spec (line 76) | def visit_param_spec(self, t: ParamSpecType) -> ProperType:
method visit_parameters (line 82) | def visit_parameters(self, t: Parameters) -> ProperType:
method visit_type_var_tuple (line 92) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> ProperType:
method visit_unpack_type (line 98) | def visit_unpack_type(self, t: UnpackType) -> ProperType:
method visit_partial_type (line 102) | def visit_partial_type(self, t: PartialType) -> ProperType:
method visit_callable_type (line 105) | def visit_callable_type(self, t: CallableType) -> ProperType:
method visit_tuple_type (line 108) | def visit_tuple_type(self, t: TupleType) -> ProperType:
method visit_typeddict_type (line 111) | def visit_typeddict_type(self, t: TypedDictType) -> ProperType:
method visit_literal_type (line 116) | def visit_literal_type(self, t: LiteralType) -> ProperType:
method visit_union_type (line 119) | def visit_union_type(self, t: UnionType) -> ProperType:
method visit_intersection_type (line 122) | def visit_intersection_type(self, t: IntersectionType) -> ProperType:
method visit_overloaded (line 125) | def visit_overloaded(self, t: Overloaded) -> ProperType:
method visit_type_type (line 128) | def visit_type_type(self, t: TypeType) -> ProperType:
method visit_type_alias_type (line 132) | def visit_type_alias_type(self, t: TypeAliasType) -> ProperType:
method copy_common (line 135) | def copy_common(self, t: ProperType, t2: ProperType) -> ProperType:
FILE: mypy/defaults.py
function find_pyproject (line 16) | def find_pyproject() -> str:
FILE: mypy/dmypy/client.py
class AugmentedHelpFormatter (line 31) | class AugmentedHelpFormatter(argparse.RawDescriptionHelpFormatter):
method __init__ (line 32) | def __init__(self, prog: str) -> None:
class BadStatus (line 260) | class BadStatus(Exception):
function main (line 270) | def main(argv: list[str]) -> None:
function fail (line 295) | def fail(msg: str) -> NoReturn:
function action (line 303) | def action(subparser: argparse.ArgumentParser) -> Callable[[ActionFuncti...
function do_start (line 317) | def do_start(args: argparse.Namespace) -> None:
function do_restart (line 339) | def do_restart(args: argparse.Namespace) -> None:
function restart_server (line 348) | def restart_server(args: argparse.Namespace, allow_sources: bool = False...
function start_server (line 358) | def start_server(args: argparse.Namespace, allow_sources: bool = False) ...
function wait_for_server (line 369) | def wait_for_server(status_file: str, timeout: float = 5.0) -> None:
function do_run (line 390) | def do_run(args: argparse.Namespace) -> None:
function do_status (line 432) | def do_status(args: argparse.Namespace) -> None:
function do_stop (line 454) | def do_stop(args: argparse.Namespace) -> None:
function do_kill (line 466) | def do_kill(args: argparse.Namespace) -> None:
function do_check (line 478) | def do_check(args: argparse.Namespace) -> None:
function do_recheck (line 488) | def do_recheck(args: argparse.Namespace) -> None:
function do_suggest (line 519) | def do_suggest(args: argparse.Namespace) -> None:
function do_inspect (line 541) | def do_inspect(args: argparse.Namespace) -> None:
function check_output (line 559) | def check_output(
function show_stats (line 600) | def show_stats(response: Mapping[str, object]) -> None:
function do_hang (line 613) | def do_hang(args: argparse.Namespace) -> None:
function do_daemon (line 619) | def do_daemon(args: argparse.Namespace) -> None:
function do_help (line 650) | def do_help(args: argparse.Namespace) -> None:
function request (line 658) | def request(
function get_status (line 704) | def get_status(status_file: str) -> tuple[int, str]:
function check_status (line 715) | def check_status(data: dict[str, Any]) -> tuple[int, str]:
function read_status (line 737) | def read_status(status_file: str) -> dict[str, object]:
function is_running (line 755) | def is_running(status_file: str) -> bool:
function console_entry (line 765) | def console_entry() -> None:
FILE: mypy/dmypy_os.py
function alive (line 22) | def alive(pid: int) -> bool:
function kill (line 38) | def kill(pid: int) -> None:
FILE: mypy/dmypy_server.py
function daemonize (line 46) | def daemonize(
function _daemonize_cb (line 79) | def _daemonize_cb(func: Callable[[], None], log_file: str | None = None)...
function daemonize (line 124) | def daemonize(
function process_start_options (line 140) | def process_start_options(flags: list[str], allow_sources: bool) -> Opti...
function ignore_suppressed_imports (line 159) | def ignore_suppressed_imports(module: str) -> bool:
class Server (line 172) | class Server:
method __init__ (line 176) | def __init__(self, options: Options, status_file: str, timeout: int | ...
method _response_metadata (line 208) | def _response_metadata(self) -> dict[str, str]:
method serve (line 212) | def serve(self) -> None:
method run_command (line 279) | def run_command(self, command: str, data: dict[str, object]) -> dict[s...
method cmd_status (line 296) | def cmd_status(self, fswatcher_dump_file: str | None = None) -> dict[s...
method cmd_stop (line 308) | def cmd_stop(self) -> dict[str, object]:
method cmd_run (line 317) | def cmd_run(
method cmd_check (line 360) | def cmd_check(
method cmd_recheck (line 370) | def cmd_recheck(
method check (line 421) | def check(
method flush_caches (line 446) | def flush_caches(self) -> None:
method update_stats (line 451) | def update_stats(self, res: dict[str, Any]) -> None:
method following_imports (line 458) | def following_imports(self) -> bool:
method initialize_fine_grained (line 463) | def initialize_fine_grained(
method fine_grained_increment (line 551) | def fine_grained_increment(
method fine_grained_increment_follow_imports (line 605) | def fine_grained_increment_follow_imports(
method find_reachable_changed_modules (line 728) | def find_reachable_changed_modules(
method direct_imports (line 769) | def direct_imports(
method find_added_suppressed (line 776) | def find_added_suppressed(
method increment_output (line 826) | def increment_output(
method pretty_messages (line 833) | def pretty_messages(
method update_sources (line 862) | def update_sources(self, sources: list[BuildSource]) -> None:
method update_changed (line 869) | def update_changed(
method find_changed (line 875) | def find_changed(self, sources: list[BuildSource]) -> ChangesAndRemovals:
method _find_changed (line 879) | def _find_changed(
method add_explicitly_new (line 911) | def add_explicitly_new(
method cmd_inspect (line 929) | def cmd_inspect(
method cmd_suggest (line 975) | def cmd_suggest(self, function: str, callsites: bool, **kwargs: Any) -...
method cmd_hang (line 999) | def cmd_hang(self) -> dict[str, object]:
function get_meminfo (line 1011) | def get_meminfo() -> dict[str, Any]:
function find_all_sources_in_build (line 1040) | def find_all_sources_in_build(
function add_all_sources_to_changed (line 1051) | def add_all_sources_to_changed(sources: list[BuildSource], changed: list...
function fix_module_deps (line 1067) | def fix_module_deps(graph: mypy.build.Graph) -> None:
function filter_out_missing_top_level_packages (line 1087) | def filter_out_missing_top_level_packages(
FILE: mypy/dmypy_util.py
function receive (line 19) | def receive(connection: IPCBase) -> Any:
function send (line 37) | def send(connection: IPCBase, data: Any) -> None:
class WriteToConn (line 46) | class WriteToConn(TextIO):
method __init__ (line 49) | def __init__(self, server: IPCBase, output_key: str, isatty: bool) -> ...
method __enter__ (line 54) | def __enter__(self) -> TextIO:
method __exit__ (line 57) | def __exit__(
method __iter__ (line 65) | def __iter__(self) -> Iterator[str]:
method __next__ (line 68) | def __next__(self) -> str:
method close (line 71) | def close(self) -> None:
method fileno (line 74) | def fileno(self) -> int:
method flush (line 77) | def flush(self) -> None:
method isatty (line 80) | def isatty(self) -> bool:
method read (line 83) | def read(self, n: int = 0) -> str:
method readable (line 86) | def readable(self) -> bool:
method readline (line 89) | def readline(self, limit: int = 0) -> str:
method readlines (line 92) | def readlines(self, hint: int = 0) -> list[str]:
method seek (line 95) | def seek(self, offset: int, whence: int = 0) -> int:
method seekable (line 98) | def seekable(self) -> bool:
method tell (line 101) | def tell(self) -> int:
method truncate (line 104) | def truncate(self, size: int | None = 0) -> int:
method write (line 107) | def write(self, output: str) -> int:
method writable (line 112) | def writable(self) -> bool:
method writelines (line 115) | def writelines(self, lines: Iterable[str]) -> None:
FILE: mypy/erasetype.py
function erase_type (line 42) | def erase_type(typ: Type) -> ProperType:
class EraseTypeVisitor (line 58) | class EraseTypeVisitor(TypeVisitor[ProperType]):
method visit_unbound_type (line 59) | def visit_unbound_type(self, t: UnboundType) -> ProperType:
method visit_any (line 63) | def visit_any(self, t: AnyType) -> ProperType:
method visit_none_type (line 66) | def visit_none_type(self, t: NoneType) -> ProperType:
method visit_uninhabited_type (line 69) | def visit_uninhabited_type(self, t: UninhabitedType) -> ProperType:
method visit_erased_type (line 72) | def visit_erased_type(self, t: ErasedType) -> ProperType:
method visit_partial_type (line 75) | def visit_partial_type(self, t: PartialType) -> ProperType:
method visit_deleted_type (line 79) | def visit_deleted_type(self, t: DeletedType) -> ProperType:
method visit_instance (line 82) | def visit_instance(self, t: Instance) -> ProperType:
method visit_type_var (line 86) | def visit_type_var(self, t: TypeVarType) -> ProperType:
method visit_param_spec (line 89) | def visit_param_spec(self, t: ParamSpecType) -> ProperType:
method visit_parameters (line 92) | def visit_parameters(self, t: Parameters) -> ProperType:
method visit_type_var_tuple (line 95) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> ProperType:
method visit_unpack_type (line 100) | def visit_unpack_type(self, t: UnpackType) -> ProperType:
method visit_callable_type (line 103) | def visit_callable_type(self, t: CallableType) -> ProperType:
method visit_overloaded (line 116) | def visit_overloaded(self, t: Overloaded) -> ProperType:
method visit_tuple_type (line 119) | def visit_tuple_type(self, t: TupleType) -> ProperType:
method visit_typeddict_type (line 122) | def visit_typeddict_type(self, t: TypedDictType) -> ProperType:
method visit_literal_type (line 125) | def visit_literal_type(self, t: LiteralType) -> ProperType:
method visit_union_type (line 131) | def visit_union_type(self, t: UnionType) -> ProperType:
method visit_intersection_type (line 137) | def visit_intersection_type(self, t: IntersectionType) -> ProperType:
method visit_type_type (line 143) | def visit_type_type(self, t: TypeType) -> ProperType:
method visit_type_alias_type (line 146) | def visit_type_alias_type(self, t: TypeAliasType) -> ProperType:
function erase_typevars (line 150) | def erase_typevars(t: Type, ids_to_erase: Container[TypeVarId] | None = ...
function replace_meta_vars (line 163) | def replace_meta_vars(t: Type, target_type: Type) -> Type:
class TypeVarEraser (line 168) | class TypeVarEraser(TypeTranslator):
method __init__ (line 171) | def __init__(self, erase_id: Callable[[TypeVarId], bool], replacement:...
method visit_type_var (line 176) | def visit_type_var(self, t: TypeVarType) -> Type:
method visit_instance (line 183) | def visit_instance(self, t: Instance) -> Type:
method visit_tuple_type (line 196) | def visit_tuple_type(self, t: TupleType) -> Type:
method visit_type_var_tuple (line 213) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> Type:
method visit_param_spec (line 218) | def visit_param_spec(self, t: ParamSpecType) -> Type:
method visit_type_alias_type (line 223) | def visit_type_alias_type(self, t: TypeAliasType) -> Type:
function remove_instance_last_known_values (line 229) | def remove_instance_last_known_values(t: Type) -> Type:
class LastKnownValueEraser (line 233) | class LastKnownValueEraser(TypeTranslator):
method visit_instance (line 237) | def visit_instance(self, t: Instance) -> Type:
method visit_type_alias_type (line 242) | def visit_type_alias_type(self, t: TypeAliasType) -> Type:
method visit_union_type (line 247) | def visit_union_type(self, t: UnionType) -> Type:
FILE: mypy/error_formatter.py
class ErrorFormatter (line 11) | class ErrorFormatter(ABC):
method report_error (line 15) | def report_error(self, error: "MypyError") -> str:
class JSONFormatter (line 19) | class JSONFormatter(ErrorFormatter):
method report_error (line 22) | def report_error(self, error: "MypyError") -> str:
FILE: mypy/errorcodes.py
class ErrorCode (line 18) | class ErrorCode:
method __init__ (line 19) | def __init__(
method __str__ (line 37) | def __str__(self) -> str:
method __eq__ (line 40) | def __eq__(self, other: object) -> bool:
method __hash__ (line 45) | def __hash__(self) -> int:
FILE: mypy/errors.py
class ErrorInfo (line 72) | class ErrorInfo:
method __repr__ (line 75) | def __repr__(self) -> str:
method __init__ (line 138) | def __init__(
class ErrorWatcher (line 188) | class ErrorWatcher:
method __init__ (line 197) | def __init__(
method __enter__ (line 209) | def __enter__(self) -> ErrorWatcher:
method __exit__ (line 213) | def __exit__(self, exc_type: object, exc_val: object, exc_tb: object) ...
method on_error (line 218) | def on_error(self, file: str, info: ErrorInfo) -> bool:
method has_new_errors (line 241) | def has_new_errors(self) -> bool:
method filtered_errors (line 244) | def filtered_errors(self) -> list[ErrorInfo]:
class StoredBaselineError (line 249) | class StoredBaselineError(TypedDict):
class BaselineError (line 260) | class BaselineError(TypedDict):
class Errors (line 269) | class Errors:
method __init__ (line 348) | def __init__(
method initialize (line 363) | def initialize(self) -> None:
method reset (line 382) | def reset(self) -> None:
method set_ignore_prefix (line 385) | def set_ignore_prefix(self, prefix: str) -> None:
method simplify_path (line 393) | def simplify_path(self, file: str) -> str:
method common_path (line 400) | def common_path(self, file: str) -> str:
method set_file (line 405) | def set_file(
method set_file_ignored_lines (line 420) | def set_file_ignored_lines(
method set_skipped_lines (line 427) | def set_skipped_lines(self, file: str, skipped_lines: set[int]) -> None:
method current_target (line 430) | def current_target(self) -> str | None:
method current_module (line 438) | def current_module(self) -> str | None:
method import_context (line 441) | def import_context(self) -> list[tuple[str, int]]:
method set_import_context (line 445) | def set_import_context(self, ctx: list[tuple[str, int]]) -> None:
method report (line 449) | def report(
method _add_error_info (line 556) | def _add_error_info(self, file: str, info: ErrorInfo) -> None:
method _filter_error (line 570) | def _filter_error(self, file: str, info: ErrorInfo) -> bool:
method add_error_info (line 583) | def add_error_info(self, info: ErrorInfo) -> None:
method has_many_errors (line 687) | def has_many_errors(self) -> bool:
method report_hidden_errors (line 699) | def report_hidden_errors(self, info: ErrorInfo) -> None:
method is_ignored_error (line 728) | def is_ignored_error(self, line: int, info: ErrorInfo, ignores: dict[i...
method is_error_code_enabled (line 747) | def is_error_code_enabled(self, error_code: ErrorCode) -> bool:
method clear_errors_in_targets (line 764) | def clear_errors_in_targets(self, path: str, targets: set[str]) -> None:
method generate_unused_ignore_errors (line 779) | def generate_unused_ignore_errors(self, file: str) -> None:
method generate_ignore_without_code_errors (line 830) | def generate_ignore_without_code_errors(
method num_messages (line 882) | def num_messages(self) -> int:
method is_errors (line 886) | def is_errors(self) -> bool:
method is_blockers (line 890) | def is_blockers(self) -> bool:
method blocker_module (line 894) | def blocker_module(self) -> str | None:
method is_errors_for_file (line 902) | def is_errors_for_file(self, file: str) -> bool:
method prefer_simple_messages (line 906) | def prefer_simple_messages(self) -> bool:
method raise_error (line 924) | def raise_error(self, use_stdout: bool = True) -> NoReturn:
method format_messages (line 935) | def format_messages(
method filter_baseline_pre (line 1002) | def filter_baseline_pre(self, path: str):
method file_messages (line 1017) | def file_messages(
method find_shadow_file_mapping (line 1051) | def find_shadow_file_mapping(self, path: str) -> str | None:
method new_messages (line 1061) | def new_messages(self) -> list[str]:
method targets (line 1074) | def targets(self) -> set[str]:
method render_messages (line 1082) | def render_messages(
method sort_messages (line 1296) | def sort_messages(self, errors: list[ErrorInfo]) -> list[ErrorInfo]:
method sort_within_context (line 1322) | def sort_within_context(self, errors: list[ErrorInfo]) -> list[ErrorIn...
method remove_duplicates (line 1349) | def remove_duplicates(self, errors: list[ErrorTuple]) -> list[ErrorTup...
method initialize_baseline (line 1389) | def initialize_baseline(
method prepare_baseline_errors (line 1405) | def prepare_baseline_errors(self) -> dict[str, list[StoredBaselineErro...
method filter_baseline (line 1465) | def filter_baseline(
function clean_baseline_message (line 1554) | def clean_baseline_message(message: str) -> str:
class CompileError (line 1558) | class CompileError(Exception):
method __init__ (line 1576) | def __init__(
function remove_path_prefix (line 1585) | def remove_path_prefix(path: str, prefix: str | None) -> str:
function report_internal_error (line 1595) | def report_internal_error(
class MypyError (line 1678) | class MypyError:
method __init__ (line 1679) | def __init__(
function create_errors (line 1701) | def create_errors(error_tuples: list[ErrorTuple]) -> list[MypyError]:
FILE: mypy/evalexpr.py
class _NodeEvaluator (line 19) | class _NodeEvaluator(ExpressionVisitor[object]):
method visit_int_expr (line 20) | def visit_int_expr(self, o: mypy.nodes.IntExpr) -> int:
method visit_str_expr (line 23) | def visit_str_expr(self, o: mypy.nodes.StrExpr) -> str:
method visit_bytes_expr (line 26) | def visit_bytes_expr(self, o: mypy.nodes.BytesExpr) -> object:
method visit_float_expr (line 34) | def visit_float_expr(self, o: mypy.nodes.FloatExpr) -> float:
method visit_complex_expr (line 37) | def visit_complex_expr(self, o: mypy.nodes.ComplexExpr) -> object:
method visit_ellipsis (line 40) | def visit_ellipsis(self, o: mypy.nodes.EllipsisExpr) -> object:
method visit_star_expr (line 43) | def visit_star_expr(self, o: mypy.nodes.StarExpr) -> object:
method visit_name_expr (line 46) | def visit_name_expr(self, o: mypy.nodes.NameExpr) -> object:
method visit_member_expr (line 57) | def visit_member_expr(self, o: mypy.nodes.MemberExpr) -> object:
method visit_yield_from_expr (line 60) | def visit_yield_from_expr(self, o: mypy.nodes.YieldFromExpr) -> object:
method visit_yield_expr (line 63) | def visit_yield_expr(self, o: mypy.nodes.YieldExpr) -> object:
method visit_call_expr (line 66) | def visit_call_expr(self, o: mypy.nodes.CallExpr) -> object:
method visit_op_expr (line 69) | def visit_op_expr(self, o: mypy.nodes.OpExpr) -> object:
method visit_comparison_expr (line 72) | def visit_comparison_expr(self, o: mypy.nodes.ComparisonExpr) -> object:
method visit_cast_expr (line 75) | def visit_cast_expr(self, o: mypy.nodes.CastExpr) -> object:
method visit_assert_type_expr (line 78) | def visit_assert_type_expr(self, o: mypy.nodes.AssertTypeExpr) -> object:
method visit_reveal_expr (line 81) | def visit_reveal_expr(self, o: mypy.nodes.RevealExpr) -> object:
method visit_super_expr (line 84) | def visit_super_expr(self, o: mypy.nodes.SuperExpr) -> object:
method visit_unary_expr (line 87) | def visit_unary_expr(self, o: mypy.nodes.UnaryExpr) -> object:
method visit_assignment_expr (line 105) | def visit_assignment_expr(self, o: mypy.nodes.AssignmentExpr) -> object:
method visit_list_expr (line 108) | def visit_list_expr(self, o: mypy.nodes.ListExpr) -> object:
method visit_dict_expr (line 114) | def visit_dict_expr(self, o: mypy.nodes.DictExpr) -> object:
method visit_tuple_expr (line 123) | def visit_tuple_expr(self, o: mypy.nodes.TupleExpr) -> object:
method visit_set_expr (line 129) | def visit_set_expr(self, o: mypy.nodes.SetExpr) -> object:
method visit_index_expr (line 135) | def visit_index_expr(self, o: mypy.nodes.IndexExpr) -> object:
method visit_type_application (line 138) | def visit_type_application(self, o: mypy.nodes.TypeApplication) -> obj...
method visit_lambda_expr (line 141) | def visit_lambda_expr(self, o: mypy.nodes.LambdaExpr) -> object:
method visit_list_comprehension (line 144) | def visit_list_comprehension(self, o: mypy.nodes.ListComprehension) ->...
method visit_set_comprehension (line 147) | def visit_set_comprehension(self, o: mypy.nodes.SetComprehension) -> o...
method visit_dictionary_comprehension (line 150) | def visit_dictionary_comprehension(self, o: mypy.nodes.DictionaryCompr...
method visit_generator_expr (line 153) | def visit_generator_expr(self, o: mypy.nodes.GeneratorExpr) -> object:
method visit_slice_expr (line 156) | def visit_slice_expr(self, o: mypy.nodes.SliceExpr) -> object:
method visit_conditional_expr (line 159) | def visit_conditional_expr(self, o: mypy.nodes.ConditionalExpr) -> obj...
method visit_type_var_expr (line 162) | def visit_type_var_expr(self, o: mypy.nodes.TypeVarExpr) -> object:
method visit_paramspec_expr (line 165) | def visit_paramspec_expr(self, o: mypy.nodes.ParamSpecExpr) -> object:
method visit_type_var_tuple_expr (line 168) | def visit_type_var_tuple_expr(self, o: mypy.nodes.TypeVarTupleExpr) ->...
method visit_type_alias_expr (line 171) | def visit_type_alias_expr(self, o: mypy.nodes.TypeAliasExpr) -> object:
method visit_namedtuple_expr (line 174) | def visit_namedtuple_expr(self, o: mypy.nodes.NamedTupleExpr) -> object:
method visit_enum_call_expr (line 177) | def visit_enum_call_expr(self, o: mypy.nodes.EnumCallExpr) -> object:
method visit_typeddict_expr (line 180) | def visit_typeddict_expr(self, o: mypy.nodes.TypedDictExpr) -> object:
method visit_newtype_expr (line 183) | def visit_newtype_expr(self, o: mypy.nodes.NewTypeExpr) -> object:
method visit__promote_expr (line 186) | def visit__promote_expr(self, o: mypy.nodes.PromoteExpr) -> object:
method visit_await_expr (line 189) | def visit_await_expr(self, o: mypy.nodes.AwaitExpr) -> object:
method visit_temp_node (line 192) | def visit_temp_node(self, o: mypy.nodes.TempNode) -> object:
function evaluate_expression (line 199) | def evaluate_expression(expr: mypy.nodes.Expression) -> object:
FILE: mypy/expandtype.py
function expand_type (line 57) | def expand_type(typ: CallableType, env: Mapping[TypeVarId, Type]) -> Cal...
function expand_type (line 61) | def expand_type(typ: ProperType, env: Mapping[TypeVarId, Type]) -> Prope...
function expand_type (line 65) | def expand_type(typ: Type, env: Mapping[TypeVarId, Type]) -> Type: ...
function expand_type (line 68) | def expand_type(typ: Type, env: Mapping[TypeVarId, Type]) -> Type:
function expand_type_by_instance (line 76) | def expand_type_by_instance(typ: CallableType, instance: Instance) -> Ca...
function expand_type_by_instance (line 80) | def expand_type_by_instance(typ: ProperType, instance: Instance) -> Prop...
function expand_type_by_instance (line 84) | def expand_type_by_instance(typ: Type, instance: Instance) -> Type: ...
function expand_type_by_instance (line 87) | def expand_type_by_instance(typ: Type, instance: Instance) -> Type:
function freshen_function_type_vars (line 123) | def freshen_function_type_vars(callee: F) -> F:
class HasGenericCallable (line 143) | class HasGenericCallable(BoolTypeQuery):
method __init__ (line 144) | def __init__(self) -> None:
method visit_callable_type (line 147) | def visit_callable_type(self, t: CallableType) -> bool:
function freshen_all_functions_type_vars (line 158) | def freshen_all_functions_type_vars(t: T) -> T:
class FreshenCallableVisitor (line 169) | class FreshenCallableVisitor(mypy.type_visitor.TypeTranslator):
method visit_callable_type (line 170) | def visit_callable_type(self, t: CallableType) -> Type:
method visit_type_alias_type (line 175) | def visit_type_alias_type(self, t: TypeAliasType) -> Type:
class ExpandTypeVisitor (line 180) | class ExpandTypeVisitor(TrivialSyntheticTypeTranslator):
method __init__ (line 185) | def __init__(self, variables: Mapping[TypeVarId, Type]) -> None:
method visit_unbound_type (line 190) | def visit_unbound_type(self, t: UnboundType) -> Type:
method visit_any (line 193) | def visit_any(self, t: AnyType) -> Type:
method visit_none_type (line 196) | def visit_none_type(self, t: NoneType) -> Type:
method visit_uninhabited_type (line 199) | def visit_uninhabited_type(self, t: UninhabitedType) -> Type:
method visit_deleted_type (line 202) | def visit_deleted_type(self, t: DeletedType) -> Type:
method visit_erased_type (line 205) | def visit_erased_type(self, t: ErasedType) -> Type:
method visit_instance (line 214) | def visit_instance(self, t: Instance) -> Type:
method visit_type_var (line 236) | def visit_type_var(self, t: TypeVarType) -> Type:
method visit_param_spec (line 256) | def visit_param_spec(self, t: ParamSpecType) -> Type:
method visit_type_var_tuple (line 282) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> Type:
method visit_unpack_type (line 297) | def visit_unpack_type(self, t: UnpackType) -> Type:
method expand_unpack (line 309) | def expand_unpack(self, t: UnpackType) -> list[Type]:
method visit_parameters (line 334) | def visit_parameters(self, t: Parameters) -> Type:
method interpolate_args_for_unpack (line 337) | def interpolate_args_for_unpack(self, t: CallableType, var_arg: Unpack...
method visit_callable_type (line 365) | def visit_callable_type(self, t: CallableType) -> CallableType:
method visit_overloaded (line 429) | def visit_overloaded(self, t: Overloaded) -> Type:
method expand_types_with_unpack (line 438) | def expand_types_with_unpack(self, typs: Sequence[Type]) -> list[Type]:
method visit_tuple_type (line 448) | def visit_tuple_type(self, t: TupleType) -> Type:
method visit_typeddict_type (line 466) | def visit_typeddict_type(self, t: TypedDictType) -> Type:
method visit_literal_type (line 475) | def visit_literal_type(self, t: LiteralType) -> Type:
method visit_union_type (line 479) | def visit_union_type(self, t: UnionType) -> Type:
method visit_intersection_type (line 504) | def visit_intersection_type(self, t: IntersectionType) -> Type:
method visit_partial_type (line 519) | def visit_partial_type(self, t: PartialType) -> Type:
method visit_type_type (line 522) | def visit_type_type(self, t: TypeType) -> Type:
method visit_type_alias_type (line 529) | def visit_type_alias_type(self, t: TypeAliasType) -> Type:
method visit_typeguard_type (line 536) | def visit_typeguard_type(self, t: TypeGuardType) -> Type:
method expand_types (line 539) | def expand_types(self, types: Iterable[Type]) -> list[Type]:
function expand_self_type (line 547) | def expand_self_type(var: Var, typ: ProperType, replacement: ProperType)...
function expand_self_type (line 551) | def expand_self_type(var: Var, typ: Type, replacement: Type) -> Type: ...
function expand_self_type (line 554) | def expand_self_type(var: Var, typ: Type, replacement: Type) -> Type:
function remove_trivial (line 561) | def remove_trivial(types: Iterable[Type]) -> list[Type]:
FILE: mypy/exprtotype.py
class TypeTranslationError (line 51) | class TypeTranslationError(Exception):
function _extract_argument_name (line 55) | def _extract_argument_name(expr: Expression) -> str | None:
function expr_to_unanalyzed_type (line 64) | def expr_to_unanalyzed_type(
FILE: mypy/fastparse.py
function ast3_parse (line 141) | def ast3_parse(
function parse (line 205) | def parse(
function parse_type_ignore_tag (line 265) | def parse_type_ignore_tag(tag: str | None) -> list[str] | None:
function parse_type_comment (line 283) | def parse_type_comment(
function parse_type_string (line 344) | def parse_type_string(
function is_no_type_check_decorator (line 373) | def is_no_type_check_decorator(expr: ast3.expr) -> bool:
function find_disallowed_expression_in_annotation_scope (line 382) | def find_disallowed_expression_in_annotation_scope(expr: ast3.expr | Non...
class ASTConverter (line 391) | class ASTConverter:
method __init__ (line 392) | def __init__(
method note (line 416) | def note(self, msg: str, line: int, column: int) -> None:
method fail (line 419) | def fail(self, msg: ErrorMessage, line: int, column: int, blocker: boo...
method fail_merge_overload (line 427) | def fail_merge_overload(self, node: IfStmt) -> None:
method visit (line 435) | def visit(self, node: AST | None) -> Any:
method set_line (line 446) | def set_line(self, node: N, n: AstNode) -> N:
method translate_opt_expr_list (line 454) | def translate_opt_expr_list(self, l: Sequence[AST | None]) -> list[Exp...
method translate_expr_list (line 461) | def translate_expr_list(self, l: Sequence[AST]) -> list[Expression]:
method get_lineno (line 464) | def get_lineno(self, node: ast3.expr | ast3.stmt) -> int:
method translate_stmt_list (line 472) | def translate_stmt_list(
method translate_type_comment (line 550) | def translate_type_comment(
method from_operator (line 578) | def from_operator(self, op: ast3.operator) -> str:
method from_comp_operator (line 598) | def from_comp_operator(self, op: ast3.cmpop) -> str:
method set_block_lines (line 605) | def set_block_lines(self, b: Block, stmts: Sequence[ast3.stmt]) -> None:
method as_block (line 620) | def as_block(self, stmts: list[ast3.stmt]) -> Block | None:
method as_required_block (line 627) | def as_required_block(
method fix_function_overloads (line 639) | def fix_function_overloads(self, stmts: list[Statement]) -> list[State...
method _check_ifstmt_for_overloads (line 780) | def _check_ifstmt_for_overloads(
method _get_executable_if_block_with_overloads (line 823) | def _get_executable_if_block_with_overloads(
method _strip_contents_from_if_stmt (line 855) | def _strip_contents_from_if_stmt(self, stmt: IfStmt) -> None:
method _is_stripped_if_stmt (line 869) | def _is_stripped_if_stmt(self, stmt: Statement) -> bool:
method translate_module_id (line 888) | def translate_module_id(self, id: str) -> str:
method visit_Module (line 894) | def visit_Module(self, mod: ast3.Module) -> MypyFile:
method visit_FunctionDef (line 915) | def visit_FunctionDef(self, n: ast3.FunctionDef) -> FuncDef | Decorator:
method visit_AsyncFunctionDef (line 920) | def visit_AsyncFunctionDef(self, n: ast3.AsyncFunctionDef) -> FuncDef ...
method do_func_def (line 923) | def do_func_def(
method set_type_optional (line 1065) | def set_type_optional(self, type: Type | None, initializer: Expression...
method transform_args (line 1073) | def transform_args(
method make_argument (line 1117) | def make_argument(
method fail_arg (line 1149) | def fail_arg(self, msg: str, arg: ast3.arg) -> None:
method visit_ClassDef (line 1157) | def visit_ClassDef(self, n: ast3.ClassDef) -> ClassDef:
method validate_type_param (line 1187) | def validate_type_param(self, type_param: ast_TypeVar) -> None:
method translate_type_params (line 1210) | def translate_type_params(self, type_params: list[Any]) -> list[TypePa...
method visit_Return (line 1245) | def visit_Return(self, n: ast3.Return) -> ReturnStmt:
method visit_Delete (line 1250) | def visit_Delete(self, n: ast3.Delete) -> DelStmt:
method visit_Assign (line 1260) | def visit_Assign(self, n: ast3.Assign) -> AssignmentStmt:
method visit_AnnAssign (line 1268) | def visit_AnnAssign(self, n: ast3.AnnAssign) -> AssignmentStmt:
method visit_AugAssign (line 1282) | def visit_AugAssign(self, n: ast3.AugAssign) -> OperatorAssignmentStmt:
method visit_For (line 1289) | def visit_For(self, n: ast3.For) -> ForStmt:
method visit_AsyncFor (line 1301) | def visit_AsyncFor(self, n: ast3.AsyncFor) -> ForStmt:
method visit_While (line 1314) | def visit_While(self, n: ast3.While) -> WhileStmt:
method visit_If (line 1321) | def visit_If(self, n: ast3.If) -> IfStmt:
method visit_With (line 1328) | def visit_With(self, n: ast3.With) -> WithStmt:
method visit_AsyncWith (line 1339) | def visit_AsyncWith(self, n: ast3.AsyncWith) -> WithStmt:
method visit_Raise (line 1351) | def visit_Raise(self, n: ast3.Raise) -> RaiseStmt:
method visit_Try (line 1356) | def visit_Try(self, n: ast3.Try) -> TryStmt:
method visit_TryStar (line 1373) | def visit_TryStar(self, n: TryStar) -> TryStmt:
method visit_Assert (line 1392) | def visit_Assert(self, n: ast3.Assert) -> AssertStmt:
method visit_Import (line 1397) | def visit_Import(self, n: ast3.Import) -> Import:
method visit_ImportFrom (line 1413) | def visit_ImportFrom(self, n: ast3.ImportFrom) -> ImportBase:
method visit_Global (line 1428) | def visit_Global(self, n: ast3.Global) -> GlobalDecl:
method visit_Nonlocal (line 1433) | def visit_Nonlocal(self, n: ast3.Nonlocal) -> NonlocalDecl:
method visit_Expr (line 1438) | def visit_Expr(self, n: ast3.Expr) -> ExpressionStmt:
method visit_Pass (line 1444) | def visit_Pass(self, n: ast3.Pass) -> PassStmt:
method visit_Break (line 1449) | def visit_Break(self, n: ast3.Break) -> BreakStmt:
method visit_Continue (line 1454) | def visit_Continue(self, n: ast3.Continue) -> ContinueStmt:
method visit_NamedExpr (line 1460) | def visit_NamedExpr(self, n: NamedExpr) -> AssignmentExpr:
method visit_BoolOp (line 1465) | def visit_BoolOp(self, n: ast3.BoolOp) -> OpExpr:
method group (line 1479) | def group(self, op: str, vals: list[Expression], n: ast3.expr) -> OpExpr:
method visit_BinOp (line 1487) | def visit_BinOp(self, n: ast3.BinOp) -> OpExpr:
method visit_UnaryOp (line 1497) | def visit_UnaryOp(self, n: ast3.UnaryOp) -> UnaryExpr:
method visit_Lambda (line 1515) | def visit_Lambda(self, n: ast3.Lambda) -> LambdaExpr:
method visit_IfExp (line 1527) | def visit_IfExp(self, n: ast3.IfExp) -> ConditionalExpr:
method visit_Dict (line 1532) | def visit_Dict(self, n: ast3.Dict) -> DictExpr:
method visit_Set (line 1539) | def visit_Set(self, n: ast3.Set) -> SetExpr:
method visit_ListComp (line 1544) | def visit_ListComp(self, n: ast3.ListComp) -> ListComprehension:
method visit_SetComp (line 1549) | def visit_SetComp(self, n: ast3.SetComp) -> SetComprehension:
method visit_DictComp (line 1554) | def visit_DictComp(self, n: ast3.DictComp) -> DictionaryComprehension:
method visit_GeneratorExp (line 1565) | def visit_GeneratorExp(self, n: ast3.GeneratorExp) -> GeneratorExpr:
method visit_Await (line 1574) | def visit_Await(self, n: ast3.Await) -> AwaitExpr:
method visit_Yield (line 1580) | def visit_Yield(self, n: ast3.Yield) -> YieldExpr:
method visit_YieldFrom (line 1585) | def visit_YieldFrom(self, n: ast3.YieldFrom) -> YieldFromExpr:
method visit_Compare (line 1590) | def visit_Compare(self, n: ast3.Compare) -> ComparisonExpr:
method visit_Call (line 1598) | def visit_Call(self, n: Call) -> CallExpr:
method visit_Constant (line 1617) | def visit_Constant(self, n: Constant) -> Any:
method visit_JoinedStr (line 1641) | def visit_JoinedStr(self, n: ast3.JoinedStr) -> Expression:
method visit_FormattedValue (line 1665) | def visit_FormattedValue(self, n: ast3.FormattedValue) -> Expression:
method visit_Attribute (line 1684) | def visit_Attribute(self, n: Attribute) -> MemberExpr | SuperExpr:
method visit_Subscript (line 1699) | def visit_Subscript(self, n: ast3.Subscript) -> IndexExpr:
method visit_Starred (line 1704) | def visit_Starred(self, n: Starred) -> StarExpr:
method visit_Name (line 1709) | def visit_Name(self, n: Name) -> NameExpr:
method visit_List (line 1714) | def visit_List(self, n: ast3.List) -> ListExpr | TupleExpr:
method visit_Tuple (line 1724) | def visit_Tuple(self, n: ast3.Tuple) -> TupleExpr:
method visit_Slice (line 1731) | def visit_Slice(self, n: ast3.Slice) -> SliceExpr:
method visit_ExtSlice (line 1736) | def visit_ExtSlice(self, n: ast3.ExtSlice) -> TupleExpr:
method visit_Index (line 1741) | def visit_Index(self, n: Index) -> Node:
method visit_Match (line 1748) | def visit_Match(self, n: Match) -> MatchStmt:
method visit_MatchValue (line 1757) | def visit_MatchValue(self, n: MatchValue) -> ValuePattern:
method visit_MatchSingleton (line 1761) | def visit_MatchSingleton(self, n: MatchSingleton) -> SingletonPattern:
method visit_MatchSequence (line 1765) | def visit_MatchSequence(self, n: MatchSequence) -> SequencePattern:
method visit_MatchStar (line 1773) | def visit_MatchStar(self, n: MatchStar) -> StarredPattern:
method visit_MatchMapping (line 1782) | def visit_MatchMapping(self, n: MatchMapping) -> MappingPattern:
method visit_MatchClass (line 1794) | def visit_MatchClass(self, n: MatchClass) -> ClassPattern:
method visit_MatchAs (line 1805) | def visit_MatchAs(self, n: MatchAs) -> AsPattern:
method visit_MatchOr (line 1815) | def visit_MatchOr(self, n: MatchOr) -> OrPattern:
method validate_type_alias (line 1819) | def validate_type_alias(self, n: ast_TypeAlias) -> None:
method visit_TypeAlias (line 1831) | def visit_TypeAlias(self, n: ast_TypeAlias) -> TypeAliasStmt | Assignm...
class TypeConverter (line 1846) | class TypeConverter:
method __init__ (line 1847) | def __init__(
method convert_column (line 1860) | def convert_column(self, column: int) -> int:
method invalid_type (line 1871) | def invalid_type(self, node: AST, note: str | None = None) -> RawExpre...
method visit (line 1886) | def visit(self, node: ast3.expr) -> ProperType: ...
method visit (line 1889) | def visit(self, node: AST | None) -> ProperType | None: ...
method visit (line 1891) | def visit(self, node: AST | None) -> ProperType | None:
method parent (line 1908) | def parent(self) -> AST | None:
method fail (line 1914) | def fail(self, msg: ErrorMessage, line: int, column: int) -> None:
method note (line 1918) | def note(self, msg: str, line: int, column: int) -> None:
method translate_expr_list (line 1922) | def translate_expr_list(self, l: Sequence[ast3.expr]) -> list[Type]:
method visit_Call (line 1925) | def visit_Call(self, e: Call) -> Type:
method translate_argument_list (line 1978) | def translate_argument_list(self, l: Sequence[ast3.expr]) -> TypeList:
method _extract_argument_name (line 1981) | def _extract_argument_name(self, n: ast3.expr) -> str | None:
method visit_Name (line 1993) | def visit_Name(self, n: Name) -> Type:
method visit_BinOp (line 1996) | def visit_BinOp(self, n: ast3.BinOp) -> Type:
method visit_Compare (line 2018) | def visit_Compare(self, n: Compare) -> Type:
method visit_IfExp (line 2027) | def visit_IfExp(self, n: ast3.IfExp) -> Type:
method visit_Constant (line 2052) | def visit_Constant(self, n: Constant) -> Type:
method visit_UnaryOp (line 2075) | def visit_UnaryOp(self, n: UnaryOp) -> Type:
method numeric_type (line 2091) | def numeric_type(self, value: object, n: AST) -> Type:
method visit_Index (line 2109) | def visit_Index(self, n: ast3.Index) -> Type:
method visit_Slice (line 2115) | def visit_Slice(self, n: ast3.Slice) -> Type:
method visit_Subscript (line 2119) | def visit_Subscript(self, n: ast3.Subscript) -> Type:
method visit_Tuple (line 2140) | def visit_Tuple(self, n: ast3.Tuple) -> Type:
method visit_Dict (line 2149) | def visit_Dict(self, n: ast3.Dict) -> Type:
method visit_Attribute (line 2166) | def visit_Attribute(self, n: Attribute) -> Type:
method visit_Starred (line 2175) | def visit_Starred(self, n: ast3.Starred) -> Type:
method visit_List (line 2179) | def visit_List(self, n: ast3.List) -> Type:
function stringify_name (line 2185) | def stringify_name(n: AST) -> str | None:
class FindAttributeAssign (line 2195) | class FindAttributeAssign(TraverserVisitor):
method __init__ (line 2198) | def __init__(self) -> None:
method visit_assignment_stmt (line 2202) | def visit_assignment_stmt(self, s: AssignmentStmt) -> None:
method visit_with_stmt (line 2208) | def visit_with_stmt(self, s: WithStmt) -> None:
method visit_for_stmt (line 2216) | def visit_for_stmt(self, s: ForStmt) -> None:
method visit_expression_stmt (line 2224) | def visit_expression_stmt(self, s: ExpressionStmt) -> None:
method visit_call_expr (line 2228) | def visit_call_expr(self, e: CallExpr) -> None:
method visit_index_expr (line 2232) | def visit_index_expr(self, e: IndexExpr) -> None:
method visit_member_expr (line 2236) | def visit_member_expr(self, e: MemberExpr) -> None:
class FindYield (line 2241) | class FindYield(TraverserVisitor):
method __init__ (line 2244) | def __init__(self) -> None:
method visit_yield_expr (line 2247) | def visit_yield_expr(self, e: YieldExpr) -> None:
method visit_yield_from_expr (line 2250) | def visit_yield_from_expr(self, e: YieldFromExpr) -> None:
function is_possible_trivial_body (line 2254) | def is_possible_trivial_body(s: list[Statement]) -> bool:
FILE: mypy/find_sources.py
class InvalidSourceList (line 17) | class InvalidSourceList(Exception):
function create_source_list (line 21) | def create_source_list(
function keyfunc (line 52) | def keyfunc(name: str) -> tuple[bool, int, str]:
function normalise_package_base (line 66) | def normalise_package_base(root: str) -> str:
function get_explicit_package_bases (line 75) | def get_explicit_package_bases(options: Options) -> list[str] | None:
class SourceFinder (line 91) | class SourceFinder:
method __init__ (line 92) | def __init__(self, fscache: FileSystemCache, options: Options) -> None:
method is_explicit_package_base (line 99) | def is_explicit_package_base(self, path: str) -> bool:
method find_sources_in_dir (line 103) | def find_sources_in_dir(self, path: str) -> list[BuildSource]:
method crawl_up (line 131) | def crawl_up(self, path: str) -> tuple[str, str]:
method crawl_up_dir (line 160) | def crawl_up_dir(self, dir: str) -> tuple[str, str]:
method _crawl_up_helper (line 164) | def _crawl_up_helper(self, dir: str) -> tuple[str, str] | None:
method get_init_file (line 213) | def get_init_file(self, dir: str) -> str | None:
function module_join (line 229) | def module_join(parent: str, child: str) -> str:
function strip_py (line 236) | def strip_py(arg: str) -> str | None:
FILE: mypy/fixup.py
function fixup_module (line 51) | def fixup_module(tree: MypyFile, modules: dict[str, MypyFile], allow_mis...
class NodeFixer (line 57) | class NodeFixer(NodeVisitor[None]):
method __init__ (line 60) | def __init__(self, modules: dict[str, MypyFile], allow_missing: bool) ...
method visit_type_info (line 66) | def visit_type_info(self, info: TypeInfo) -> None:
method visit_symbol_table (line 119) | def visit_symbol_table(self, symtab: SymbolTable, table_fullname: str)...
method visit_func_def (line 164) | def visit_func_def(self, func: FuncDef) -> None:
method visit_overloaded_func_def (line 170) | def visit_overloaded_func_def(self, o: OverloadedFuncDef) -> None:
method visit_decorator (line 180) | def visit_decorator(self, d: Decorator) -> None:
method visit_class_def (line 190) | def visit_class_def(self, c: ClassDef) -> None:
method visit_type_var_expr (line 194) | def visit_type_var_expr(self, tv: TypeVarExpr) -> None:
method visit_paramspec_expr (line 200) | def visit_paramspec_expr(self, p: ParamSpecExpr) -> None:
method visit_type_var_tuple_expr (line 204) | def visit_type_var_tuple_expr(self, tv: TypeVarTupleExpr) -> None:
method visit_var (line 209) | def visit_var(self, v: Var) -> None:
method visit_type_alias (line 215) | def visit_type_alias(self, a: TypeAlias) -> None:
class TypeFixer (line 221) | class TypeFixer(TypeVisitor[None]):
method __init__ (line 222) | def __init__(self, modules: dict[str, MypyFile], allow_missing: bool) ...
method visit_instance (line 226) | def visit_instance(self, inst: Instance) -> None:
method visit_type_alias_type (line 248) | def visit_type_alias_type(self, t: TypeAliasType) -> None:
method visit_any (line 259) | def visit_any(self, o: Any) -> None:
method visit_callable_type (line 262) | def visit_callable_type(self, ct: CallableType) -> None:
method visit_overloaded (line 281) | def visit_overloaded(self, t: Overloaded) -> None:
method visit_erased_type (line 285) | def visit_erased_type(self, o: Any) -> None:
method visit_deleted_type (line 289) | def visit_deleted_type(self, o: Any) -> None:
method visit_none_type (line 292) | def visit_none_type(self, o: Any) -> None:
method visit_uninhabited_type (line 295) | def visit_uninhabited_type(self, o: Any) -> None:
method visit_partial_type (line 298) | def visit_partial_type(self, o: Any) -> None:
method visit_tuple_type (line 301) | def visit_tuple_type(self, tt: TupleType) -> None:
method visit_typeddict_type (line 308) | def visit_typeddict_type(self, tdt: TypedDictType) -> None:
method visit_literal_type (line 327) | def visit_literal_type(self, lt: LiteralType) -> None:
method visit_type_var (line 330) | def visit_type_var(self, tvt: TypeVarType) -> None:
method visit_param_spec (line 337) | def visit_param_spec(self, p: ParamSpecType) -> None:
method visit_type_var_tuple (line 341) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> None:
method visit_unpack_type (line 346) | def visit_unpack_type(self, u: UnpackType) -> None:
method visit_parameters (line 349) | def visit_parameters(self, p: Parameters) -> None:
method visit_unbound_type (line 356) | def visit_unbound_type(self, o: UnboundType) -> None:
method visit_union_type (line 360) | def visit_union_type(self, ut: UnionType) -> None:
method visit_intersection_type (line 365) | def visit_intersection_type(self, it: IntersectionType):
method visit_type_type (line 369) | def visit_type_type(self, t: TypeType) -> None:
function lookup_fully_qualified_typeinfo (line 373) | def lookup_fully_qualified_typeinfo(
function lookup_fully_qualified_alias (line 390) | def lookup_fully_qualified_alias(
function missing_info (line 423) | def missing_info(modules: dict[str, MypyFile]) -> TypeInfo:
function missing_alias (line 435) | def missing_alias() -> TypeAlias:
FILE: mypy/freetree.py
class TreeFreer (line 9) | class TreeFreer(TraverserVisitor):
method visit_block (line 10) | def visit_block(self, block: Block) -> None:
function free_tree (line 15) | def free_tree(tree: MypyFile) -> None:
FILE: mypy/fscache.py
class FileSystemCache (line 42) | class FileSystemCache:
method __init__ (line 43) | def __init__(self) -> None:
method set_package_root (line 49) | def set_package_root(self, package_root: list[str]) -> None:
method flush (line 52) | def flush(self) -> None:
method stat_or_none (line 65) | def stat_or_none(self, path: str) -> os.stat_result | None:
method init_under_package_root (line 82) | def init_under_package_root(self, path: str) -> bool:
method _fake_init (line 134) | def _fake_init(self, path: str) -> os.stat_result:
method listdir (line 157) | def listdir(self, path: str) -> list[str]:
method isfile (line 179) | def isfile(self, path: str) -> bool:
method isfile_case (line 185) | def isfile_case(self, path: str, prefix: str) -> bool:
method exists_case (line 221) | def exists_case(self, path: str, prefix: str) -> bool:
method isdir (line 245) | def isdir(self, path: str) -> bool:
method exists (line 251) | def exists(self, path: str) -> bool:
method read (line 255) | def read(self, path: str) -> bytes:
method hash_digest (line 282) | def hash_digest(self, path: str) -> str:
method samefile (line 287) | def samefile(self, f1: str, f2: str) -> bool:
function copy_os_error (line 295) | def copy_os_error(e: OSError) -> OSError:
FILE: mypy/fswatcher.py
class FileData (line 12) | class FileData(NamedTuple):
class FileSystemWatcher (line 18) | class FileSystemWatcher:
method __init__ (line 36) | def __init__(self, fs: FileSystemCache) -> None:
method dump_file_data (line 41) | def dump_file_data(self) -> dict[str, tuple[float, int, str]]:
method set_file_data (line 44) | def set_file_data(self, path: str, data: FileData) -> None:
method add_watched_paths (line 47) | def add_watched_paths(self, paths: Iterable[str]) -> None:
method remove_watched_paths (line 55) | def remove_watched_paths(self, paths: Iterable[str]) -> None:
method _update (line 61) | def _update(self, path: str, st: os.stat_result) -> None:
method _find_changed (line 65) | def _find_changed(self, paths: Iterable[str]) -> AbstractSet[str]:
method find_changed (line 91) | def find_changed(self) -> AbstractSet[str]:
method update_changed (line 95) | def update_changed(self, remove: list[str], update: list[str]) -> Abst...
FILE: mypy/gclogger.py
class GcLogger (line 8) | class GcLogger:
method __enter__ (line 11) | def __enter__(self) -> GcLogger:
method gc_callback (line 21) | def gc_callback(self, phase: str, info: Mapping[str, int]) -> None:
method __exit__ (line 35) | def __exit__(self, *args: object) -> None:
method get_stats (line 39) | def get_stats(self) -> Mapping[str, float]:
FILE: mypy/git.py
function is_git_repo (line 10) | def is_git_repo(dir: str) -> bool:
function have_git (line 15) | def have_git() -> bool:
function git_revision (line 26) | def git_revision(dir: str) -> bytes:
function is_dirty (line 31) | def is_dirty(dir: str) -> bool:
FILE: mypy/graph_utils.py
function strongly_connected_components (line 11) | def strongly_connected_components(
function prepare_sccs (line 57) | def prepare_sccs(
function topsort (line 75) | def topsort(data: dict[T, set[T]]) -> Iterable[set[T]]:
FILE: mypy/indirection.py
function extract_module_names (line 10) | def extract_module_names(type_name: str | None) -> list[str]:
class TypeIndirectionVisitor (line 20) | class TypeIndirectionVisitor(TypeVisitor[None]):
method __init__ (line 23) | def __init__(self) -> None:
method find_modules (line 31) | def find_modules(self, typs: Iterable[types.Type]) -> set[str]:
method _visit (line 38) | def _visit(self, typ_or_typs: types.Type | Iterable[types.Type]) -> None:
method _visit_module_name (line 48) | def _visit_module_name(self, module_name: str) -> None:
method visit_unbound_type (line 52) | def visit_unbound_type(self, t: types.UnboundType) -> None:
method visit_any (line 55) | def visit_any(self, t: types.AnyType) -> None:
method visit_none_type (line 58) | def visit_none_type(self, t: types.NoneType) -> None:
method visit_uninhabited_type (line 61) | def visit_uninhabited_type(self, t: types.UninhabitedType) -> None:
method visit_erased_type (line 64) | def visit_erased_type(self, t: types.ErasedType) -> None:
method visit_deleted_type (line 67) | def visit_deleted_type(self, t: types.DeletedType) -> None:
method visit_type_var (line 70) | def visit_type_var(self, t: types.TypeVarType) -> None:
method visit_param_spec (line 75) | def visit_param_spec(self, t: types.ParamSpecType) -> None:
method visit_type_var_tuple (line 79) | def visit_type_var_tuple(self, t: types.TypeVarTupleType) -> None:
method visit_unpack_type (line 83) | def visit_unpack_type(self, t: types.UnpackType) -> None:
method visit_parameters (line 86) | def visit_parameters(self, t: types.Parameters) -> None:
method visit_instance (line 89) | def visit_instance(self, t: types.Instance) -> None:
method visit_callable_type (line 100) | def visit_callable_type(self, t: types.CallableType) -> None:
method visit_overloaded (line 109) | def visit_overloaded(self, t: types.Overloaded) -> None:
method visit_tuple_type (line 113) | def visit_tuple_type(self, t: types.TupleType) -> None:
method visit_typeddict_type (line 117) | def visit_typeddict_type(self, t: types.TypedDictType) -> None:
method visit_literal_type (line 121) | def visit_literal_type(self, t: types.LiteralType) -> None:
method visit_union_type (line 124) | def visit_union_type(self, t: types.UnionType) -> None:
method visit_intersection_type (line 127) | def visit_intersection_type(self, t: types.IntersectionType):
method visit_partial_type (line 130) | def visit_partial_type(self, t: types.PartialType) -> None:
method visit_type_type (line 133) | def visit_type_type(self, t: types.TypeType) -> None:
method visit_type_alias_type (line 136) | def visit_type_alias_type(self, t: types.TypeAliasType) -> None:
FILE: mypy/infer.py
class ArgumentInferContext (line 19) | class ArgumentInferContext(NamedTuple):
function infer_function_type_arguments (line 33) | def infer_function_type_arguments(
function infer_type_arguments (line 66) | def infer_type_arguments(
FILE: mypy/inspections.py
function node_starts_after (line 42) | def node_starts_after(o: Node, line: int, column: int) -> bool:
function node_ends_before (line 46) | def node_ends_before(o: Node, line: int, column: int) -> bool:
function expr_span (line 55) | def expr_span(expr: Expression) -> str:
function get_instance_fallback (line 60) | def get_instance_fallback(typ: ProperType) -> list[Instance]:
function find_node (line 87) | def find_node(name: str, info: TypeInfo) -> Var | FuncBase | None:
function find_module_by_fullname (line 109) | def find_module_by_fullname(fullname: str, modules: dict[str, State]) ->...
class SearchVisitor (line 128) | class SearchVisitor(ExtendedTraverserVisitor):
method __init__ (line 131) | def __init__(self, line: int, column: int, end_line: int, end_column: ...
method visit (line 138) | def visit(self, o: Node) -> bool:
function find_by_location (line 154) | def find_by_location(
class SearchAllVisitor (line 167) | class SearchAllVisitor(ExtendedTraverserVisitor):
method __init__ (line 170) | def __init__(self, line: int, column: int) -> None:
method visit (line 175) | def visit(self, o: Node) -> bool:
function find_all_by_location (line 185) | def find_all_by_location(tree: MypyFile, line: int, column: int) -> list...
class InspectionEngine (line 192) | class InspectionEngine:
method __init__ (line 195) | def __init__(
method reload_module (line 218) | def reload_module(self, state: State) -> None:
method expr_type (line 229) | def expr_type(self, expression: Expression) -> tuple[str, bool]:
method object_type (line 244) | def object_type(self) -> Instance:
method collect_attrs (line 251) | def collect_attrs(self, instances: list[Instance]) -> dict[TypeInfo, l...
method _fill_from_dict (line 305) | def _fill_from_dict(
method expr_attrs (line 313) | def expr_attrs(self, expression: Expression) -> tuple[str, bool]:
method format_node (line 361) | def format_node(self, module: State, node: FuncBase | SymbolNode) -> str:
method collect_nodes (line 364) | def collect_nodes(self, expression: RefExpr) -> list[FuncBase | Symbol...
method modules_for_nodes (line 406) | def modules_for_nodes(
method expression_def (line 429) | def expression_def(self, expression: Expression) -> tuple[str, bool]:
method missing_type (line 461) | def missing_type(self, expression: Expression) -> str:
method missing_node (line 470) | def missing_node(self, expression: Expression) -> str:
method add_prefixes (line 475) | def add_prefixes(self, result: str, expression: Expression) -> str:
method run_inspection_by_exact_location (line 487) | def run_inspection_by_exact_location(
method run_inspection_by_position (line 512) | def run_inspection_by_position(
method find_module (line 544) | def find_module(self, file: str) -> tuple[State | None, dict[str, obje...
method run_inspection (line 562) | def run_inspection(
method get_type (line 595) | def get_type(self, location: str) -> dict[str, object]:
method get_attrs (line 599) | def get_attrs(self, location: str) -> dict[str, object]:
method get_definition (line 603) | def get_definition(self, location: str) -> dict[str, object]:
function parse_location (line 614) | def parse_location(location: str) -> tuple[str, list[int]]:
FILE: mypy/ipc.py
class IPCException (line 34) | class IPCException(Exception):
class IPCBase (line 38) | class IPCBase:
method __init__ (line 51) | def __init__(self, name: str, timeout: float | None) -> None:
method frame_from_buffer (line 56) | def frame_from_buffer(self) -> bytearray | None:
method read (line 66) | def read(self, size: int = 100000) -> str:
method write (line 124) | def write(self, data: str) -> None:
method close (line 152) | def close(self) -> None:
class IPCClient (line 160) | class IPCClient(IPCBase):
method __init__ (line 163) | def __init__(self, name: str, timeout: float | None) -> None:
method __enter__ (line 199) | def __enter__(self) -> IPCClient:
method __exit__ (line 202) | def __exit__(
class IPCServer (line 211) | class IPCServer(IPCBase):
method __init__ (line 214) | def __init__(self, name: str, timeout: float | None = None) -> None:
method __enter__ (line 250) | def __enter__(self) -> IPCServer:
method __exit__ (line 278) | def __exit__(
method cleanup (line 296) | def cleanup(self) -> None:
method connection_name (line 303) | def connection_name(self) -> str:
FILE: mypy/join.py
class InstanceJoiner (line 60) | class InstanceJoiner:
method __init__ (line 61) | def __init__(self) -> None:
method join_instances (line 64) | def join_instances(self, t: Instance, s: Instance) -> ProperType:
method join_instances_via_supertype (line 161) | def join_instances_via_supertype(self, t: Instance, s: Instance) -> Pr...
function join_simple (line 189) | def join_simple(declaration: Type | None, s: Type, t: Type) -> ProperType:
function trivial_join (line 239) | def trivial_join(s: Type, t: Type) -> Type:
function _union_join (line 249) | def _union_join(l: ProperType, r: ProperType) -> ProperType | None:
function join_types (line 268) | def join_types(
function join_types (line 274) | def join_types(s: Type, t: Type, instance_joiner: InstanceJoiner | None ...
function join_types (line 277) | def join_types(s: Type, t: Type, instance_joiner: InstanceJoiner | None ...
class TypeJoinVisitor (line 322) | class TypeJoinVisitor(TypeVisitor[ProperType]):
method __init__ (line 329) | def __init__(self, s: ProperType, instance_joiner: InstanceJoiner | No...
method visit_unbound_type (line 333) | def visit_unbound_type(self, t: UnboundType) -> ProperType:
method visit_union_type (line 336) | def visit_union_type(self, t: UnionType) -> ProperType:
method visit_intersection_type (line 342) | def visit_intersection_type(self, t: IntersectionType) -> ProperType:
method visit_any (line 348) | def visit_any(self, t: AnyType) -> ProperType:
method visit_none_type (line 351) | def visit_none_type(self, t: NoneType) -> ProperType:
method visit_uninhabited_type (line 362) | def visit_uninhabited_type(self, t: UninhabitedType) -> ProperType:
method visit_deleted_type (line 365) | def visit_deleted_type(self, t: DeletedType) -> ProperType:
method visit_erased_type (line 368) | def visit_erased_type(self, t: ErasedType) -> ProperType:
method visit_type_var (line 371) | def visit_type_var(self, t: TypeVarType) -> ProperType:
method visit_param_spec (line 377) | def visit_param_spec(self, t: ParamSpecType) -> ProperType:
method visit_type_var_tuple (line 382) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> ProperType:
method visit_unpack_type (line 387) | def visit_unpack_type(self, t: UnpackType) -> UnpackType:
method visit_parameters (line 390) | def visit_parameters(self, t: Parameters) -> ProperType:
method visit_instance (line 405) | def visit_instance(self, t: Instance) -> ProperType:
method visit_callable_type (line 438) | def visit_callable_type(self, t: CallableType) -> ProperType:
method visit_overloaded (line 466) | def visit_overloaded(self, t: Overloaded) -> ProperType:
method join_tuples (line 519) | def join_tuples(self, s: TupleType, t: TupleType) -> list[Type] | None:
method visit_tuple_type (line 626) | def visit_tuple_type(self, t: TupleType) -> ProperType:
method visit_typeddict_type (line 658) | def visit_typeddict_type(self, t: TypedDictType) -> ProperType:
method visit_literal_type (line 681) | def visit_literal_type(self, t: LiteralType) -> ProperType:
method visit_partial_type (line 691) | def visit_partial_type(self, t: PartialType) -> ProperType:
method visit_type_type (line 696) | def visit_type_type(self, t: TypeType) -> ProperType:
method visit_type_alias_type (line 704) | def visit_type_alias_type(self, t: TypeAliasType) -> ProperType:
method default (line 707) | def default(self, typ: Type) -> ProperType:
function is_better (line 727) | def is_better(t: Type, s: Type) -> bool:
function normalize_callables (line 742) | def normalize_callables(s: ProperType, t: ProperType) -> tuple[ProperTyp...
function is_similar_callables (line 750) | def is_similar_callables(t: CallableType, s: CallableType) -> bool:
function update_callable_ids (line 761) | def update_callable_ids(c: CallableType, ids: list[TypeVarId]) -> Callab...
function match_generic_callables (line 771) | def match_generic_callables(t: CallableType, s: CallableType) -> tuple[C...
function join_similar_callables (line 788) | def join_similar_callables(t: CallableType, s: CallableType) -> Callable...
function safe_join (line 823) | def safe_join(t: Type, s: Type) -> Type:
function safe_meet (line 833) | def safe_meet(t: Type, s: Type) -> Type:
function combine_similar_callables (line 855) | def combine_similar_callables(t: CallableType, s: CallableType) -> Calla...
function combine_arg_names (line 877) | def combine_arg_names(
function object_from_instance (line 908) | def object_from_instance(instance: Instance) -> Instance:
function object_or_any_from_type (line 915) | def object_or_any_from_type(typ: ProperType) -> ProperType:
function join_type_list (line 939) | def join_type_list(types: Sequence[Type]) -> Type:
function unpack_callback_protocol (line 950) | def unpack_callback_protocol(t: Instance) -> ProperType | None:
FILE: mypy/literals.py
function literal (line 99) | def literal(e: Expression) -> int:
function subkeys (line 135) | def subkeys(key: Key) -> Iterable[Key]:
function literal_hash (line 139) | def literal_hash(e: Expression) -> Key | None:
function extract_var_from_literal_hash (line 143) | def extract_var_from_literal_hash(key: Key) -> Var | None:
class _Hasher (line 153) | class _Hasher(ExpressionVisitor[Optional[Key]]):
method visit_int_expr (line 154) | def visit_int_expr(self, e: IntExpr) -> Key:
method visit_str_expr (line 157) | def visit_str_expr(self, e: StrExpr) -> Key:
method visit_bytes_expr (line 160) | def visit_bytes_expr(self, e: BytesExpr) -> Key:
method visit_float_expr (line 163) | def visit_float_expr(self, e: FloatExpr) -> Key:
method visit_complex_expr (line 166) | def visit_complex_expr(self, e: ComplexExpr) -> Key:
method visit_star_expr (line 169) | def visit_star_expr(self, e: StarExpr) -> Key:
method visit_name_expr (line 172) | def visit_name_expr(self, e: NameExpr) -> Key:
method visit_member_expr (line 180) | def visit_member_expr(self, e: MemberExpr) -> Key:
method visit_op_expr (line 183) | def visit_op_expr(self, e: OpExpr) -> Key:
method visit_comparison_expr (line 186) | def visit_comparison_expr(self, e: ComparisonExpr) -> Key:
method visit_unary_expr (line 191) | def visit_unary_expr(self, e: UnaryExpr) -> Key:
method seq_expr (line 194) | def seq_expr(self, e: ListExpr | TupleExpr | SetExpr, name: str) -> Ke...
method visit_list_expr (line 200) | def visit_list_expr(self, e: ListExpr) -> Key | None:
method visit_dict_expr (line 203) | def visit_dict_expr(self, e: DictExpr) -> Key | None:
method visit_tuple_expr (line 211) | def visit_tuple_expr(self, e: TupleExpr) -> Key | None:
method visit_set_expr (line 214) | def visit_set_expr(self, e: SetExpr) -> Key | None:
method visit_index_expr (line 217) | def visit_index_expr(self, e: IndexExpr) -> Key | None:
method visit_assignment_expr (line 222) | def visit_assignment_expr(self, e: AssignmentExpr) -> Key | None:
method visit_call_expr (line 225) | def visit_call_expr(self, e: CallExpr) -> None:
method visit_slice_expr (line 228) | def visit_slice_expr(self, e: SliceExpr) -> None:
method visit_cast_expr (line 231) | def visit_cast_expr(self, e: CastExpr) -> None:
method visit_assert_type_expr (line 234) | def visit_assert_type_expr(self, e: AssertTypeExpr) -> None:
method visit_conditional_expr (line 237) | def visit_conditional_expr(self, e: ConditionalExpr) -> None:
method visit_ellipsis (line 240) | def visit_ellipsis(self, e: EllipsisExpr) -> None:
method visit_yield_from_expr (line 243) | def visit_yield_from_expr(self, e: YieldFromExpr) -> None:
method visit_yield_expr (line 246) | def visit_yield_expr(self, e: YieldExpr) -> None:
method visit_reveal_expr (line 249) | def visit_reveal_expr(self, e: RevealExpr) -> None:
method visit_super_expr (line 252) | def visit_super_expr(self, e: SuperExpr) -> None:
method visit_type_application (line 255) | def visit_type_application(self, e: TypeApplication) -> None:
method visit_lambda_expr (line 258) | def visit_lambda_expr(self, e: LambdaExpr) -> None:
method visit_list_comprehension (line 261) | def visit_list_comprehension(self, e: ListComprehension) -> None:
method visit_set_comprehension (line 264) | def visit_set_comprehension(self, e: SetComprehension) -> None:
method visit_dictionary_comprehension (line 267) | def visit_dictionary_comprehension(self, e: DictionaryComprehension) -...
method visit_generator_expr (line 270) | def visit_generator_expr(self, e: GeneratorExpr) -> None:
method visit_type_var_expr (line 273) | def visit_type_var_expr(self, e: TypeVarExpr) -> None:
method visit_paramspec_expr (line 276) | def visit_paramspec_expr(self, e: ParamSpecExpr) -> None:
method visit_type_var_tuple_expr (line 279) | def visit_type_var_tuple_expr(self, e: TypeVarTupleExpr) -> None:
method visit_type_alias_expr (line 282) | def visit_type_alias_expr(self, e: TypeAliasExpr) -> None:
method visit_namedtuple_expr (line 285) | def visit_namedtuple_expr(self, e: NamedTupleExpr) -> None:
method visit_enum_call_expr (line 288) | def visit_enum_call_expr(self, e: EnumCallExpr) -> None:
method visit_typeddict_expr (line 291) | def visit_typeddict_expr(self, e: TypedDictExpr) -> None:
method visit_newtype_expr (line 294) | def visit_newtype_expr(self, e: NewTypeExpr) -> None:
method visit__promote_expr (line 297) | def visit__promote_expr(self, e: PromoteExpr) -> None:
method visit_await_expr (line 300) | def visit_await_expr(self, e: AwaitExpr) -> None:
method visit_temp_node (line 303) | def visit_temp_node(self, e: TempNode) -> None:
FILE: mypy/lookup.py
function lookup_fully_qualified (line 13) | def lookup_fully_qualified(
FILE: mypy/main.py
function stat_proxy (line 48) | def stat_proxy(path: str) -> os.stat_result:
function main (line 62) | def main(
function run_build (line 204) | def run_build(
function show_messages (line 266) | def show_messages(
class AugmentedHelpFormatter (line 277) | class AugmentedHelpFormatter(argparse.RawDescriptionHelpFormatter):
method __init__ (line 278) | def __init__(self, prog: str) -> None:
method _fill_text (line 281) | def _fill_text(self, text: str, width: int, indent: str) -> str:
function invert_flag_name (line 299) | def invert_flag_name(flag: str) -> str:
class PythonExecutableInferenceError (line 311) | class PythonExecutableInferenceError(Exception):
function python_executable_prefix (line 315) | def python_executable_prefix(v: str) -> list[str]:
function _python_executable_from_version (line 326) | def _python_executable_from_version(python_version: tuple[int, int]) -> ...
function infer_python_executable (line 347) | def infer_python_executable(options: Options, special_opts: argparse.Nam...
class CapturableArgumentParser (line 403) | class CapturableArgumentParser(argparse.ArgumentParser):
method __init__ (line 410) | def __init__(self, *args: Any, **kwargs: Any) -> None:
method print_usage (line 418) | def print_usage(self, file: SupportsWrite[str] | None = None) -> None:
method print_help (line 423) | def print_help(self, file: SupportsWrite[str] | None = None) -> None:
method _print_message (line 428) | def _print_message(self, message: str, file: SupportsWrite[str] | None...
method exit (line 437) | def exit(self, status: int = 0, message: str | None = None) -> NoReturn:
method error (line 442) | def error(self, message: str) -> NoReturn:
class CapturableVersionAction (line 456) | class CapturableVersionAction(argparse.Action):
method __init__ (line 467) | def __init__(
method __call__ (line 482) | def __call__(
function process_options (line 495) | def process_options(
function process_package_roots (line 1633) | def process_package_roots(
function process_cache_map (line 1668) | def process_cache_map(
function maybe_write_junit_xml (line 1692) | def maybe_write_junit_xml(
function fail (line 1717) | def fail(msg: str, stderr: TextIO, options: Options) -> NoReturn:
function read_types_packages_to_install (line 1726) | def read_types_packages_to_install(cache_dir: str, after_run: bool) -> l...
function install_types (line 1745) | def install_types(
FILE: mypy/maptype.py
function map_instance_to_supertype (line 8) | def map_instance_to_supertype(instance: Instance, superclass: TypeInfo) ...
function map_instance_to_supertypes (line 45) | def map_instance_to_supertypes(instance: Instance, supertype: TypeInfo) ...
function class_derivation_paths (line 65) | def class_derivation_paths(typ: TypeInfo, supertype: TypeInfo) -> list[l...
function map_instance_to_direct_supertypes (line 89) | def map_instance_to_direct_supertypes(instance: Instance, supertype: Typ...
FILE: mypy/meet.py
function trivial_meet (line 66) | def trivial_meet(s: Type, t: Type) -> ProperType:
function meet_types (line 79) | def meet_types(s: Type, t: Type, intersect=False) -> ProperType:
function narrow_declared_type (line 125) | def narrow_declared_type(declared: Type, narrowed: Type) -> Type:
function get_possible_variants (line 213) | def get_possible_variants(typ: Type) -> list[Type]:
function is_enum_overlapping_union (line 263) | def is_enum_overlapping_union(x: ProperType, y: ProperType) -> bool:
function is_literal_in_union (line 276) | def is_literal_in_union(x: ProperType, y: ProperType) -> bool:
function is_object (line 285) | def is_object(t: ProperType) -> bool:
function is_overlapping_types (line 289) | def is_overlapping_types(
function is_overlapping_erased_types (line 627) | def is_overlapping_erased_types(
function are_typed_dicts_overlapping (line 639) | def are_typed_dicts_overlapping(
function are_tuples_overlapping (line 663) | def are_tuples_overlapping(
function expand_tuple_if_possible (line 690) | def expand_tuple_if_possible(tup: TupleType, target: int) -> TupleType:
function adjust_tuple (line 711) | def adjust_tuple(left: ProperType, r: ProperType) -> TupleType | None:
function is_tuple (line 719) | def is_tuple(typ: Type) -> bool:
class TypeMeetVisitor (line 726) | class TypeMeetVisitor(TypeVisitor[ProperType]):
method __init__ (line 727) | def __init__(self, s: ProperType) -> None:
method visit_unbound_type (line 730) | def visit_unbound_type(self, t: UnboundType) -> ProperType:
method visit_any (line 741) | def visit_any(self, t: AnyType) -> ProperType:
method visit_union_type (line 744) | def visit_union_type(self, t: UnionType) -> ProperType:
method visit_intersection_type (line 754) | def visit_intersection_type(self, t: IntersectionType) -> ProperType:
method visit_none_type (line 759) | def visit_none_type(self, t: NoneType) -> ProperType:
method visit_uninhabited_type (line 770) | def visit_uninhabited_type(self, t: UninhabitedType) -> ProperType:
method visit_deleted_type (line 773) | def visit_deleted_type(self, t: DeletedType) -> ProperType:
method visit_erased_type (line 784) | def visit_erased_type(self, t: ErasedType) -> ProperType:
method visit_type_var (line 787) | def visit_type_var(self, t: TypeVarType) -> ProperType:
method visit_param_spec (line 793) | def visit_param_spec(self, t: ParamSpecType) -> ProperType:
method visit_type_var_tuple (line 799) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> ProperType:
method visit_unpack_type (line 805) | def visit_unpack_type(self, t: UnpackType) -> ProperType:
method visit_parameters (line 808) | def visit_parameters(self, t: Parameters) -> ProperType:
method visit_instance (line 820) | def visit_instance(self, t: Instance) -> ProperType:
method visit_callable_type (line 905) | def visit_callable_type(self, t: CallableType) -> ProperType:
method visit_overloaded (line 933) | def visit_overloaded(self, t: Overloaded) -> ProperType:
method meet_tuples (line 952) | def meet_tuples(self, s: TupleType, t: TupleType) -> list[Type] | None:
method visit_tuple_type (line 1030) | def visit_tuple_type(self, t: TupleType) -> ProperType:
method visit_typeddict_type (line 1050) | def visit_typeddict_type(self, t: TypedDictType) -> ProperType:
method visit_literal_type (line 1075) | def visit_literal_type(self, t: LiteralType) -> ProperType:
method visit_partial_type (line 1083) | def visit_partial_type(self, t: PartialType) -> ProperType:
method visit_type_type (line 1087) | def visit_type_type(self, t: TypeType) -> ProperType:
method visit_type_alias_type (line 1100) | def visit_type_alias_type(self, t: TypeAliasType) -> ProperType:
method meet (line 1103) | def meet(self, s: Type, t: Type) -> ProperType:
method default (line 1106) | def default(self, typ: Type) -> ProperType:
function meet_similar_callables (line 1116) | def meet_similar_callables(t: CallableType, s: CallableType) -> Callable...
function meet_type_list (line 1138) | def meet_type_list(types: list[Type]) -> Type:
function typed_dict_mapping_pair (line 1149) | def typed_dict_mapping_pair(left: Type, right: Type) -> bool:
function typed_dict_mapping_overlap (line 1169) | def typed_dict_mapping_overlap(
FILE: mypy/memprofile.py
function collect_memory_stats (line 20) | def collect_memory_stats() -> tuple[dict[str, int], dict[str, int]]:
function print_memory_profile (line 69) | def print_memory_profile(run_gc: bool = True) -> None:
function find_recursive_objects (line 94) | def find_recursive_objects(objs: list[object]) -> None:
FILE: mypy/message_registry.py
class ErrorMessage (line 16) | class ErrorMessage(NamedTuple):
method format (line 20) | def format(self, *args: object, **kwargs: object) -> ErrorMessage:
method with_additional_msg (line 23) | def with_additional_msg(self, info: str) -> ErrorMessage:
FILE: mypy/messages.py
class MessageBuilder (line 160) | class MessageBuilder:
method __init__ (line 180) | def __init__(self, errors: Errors, modules: dict[str, MypyFile]) -> None:
method filter_errors (line 190) | def filter_errors(
method add_errors (line 200) | def add_errors(self, errors: list[ErrorInfo]) -> None:
method disable_type_names (line 206) | def disable_type_names(self) -> Iterator[None]:
method are_type_names_disabled (line 213) | def are_type_names_disabled(self) -> bool:
method prefer_simple_messages (line 216) | def prefer_simple_messages(self) -> bool:
method report (line 224) | def report(
method fail (line 287) | def fail(
method note (line 310) | def note(
method note_multiline (line 335) | def note_multiline(
method has_no_attr (line 367) | def has_no_attr(
method unsupported_operand_types (line 575) | def unsupported_operand_types(
method unsupported_left_operand (line 606) | def unsupported_left_operand(self, op: str, typ: Type, context: Contex...
method not_callable (line 613) | def not_callable(self, typ: Type, context: Context) -> Type:
method untyped_function_call (line 617) | def untyped_function_call(self, callee: CallableType, context: Context...
method partially_typed_function_call (line 626) | def partially_typed_function_call(self, callee: CallableType, context:...
method untyped_indexed_assignment (line 639) | def untyped_indexed_assignment(self, context: IndexExpr):
method untyped_name_usage (line 645) | def untyped_name_usage(self, name: str | Expression, context: Context):
method incompatible_argument (line 659) | def incompatible_argument(
method incompatible_argument_note (line 889) | def incompatible_argument_note(
method maybe_note_concatenate_pos_args (line 924) | def maybe_note_concatenate_pos_args(
method invalid_index_type (line 956) | def invalid_index_type(
method readonly_keys_mutated (line 976) | def readonly_keys_mutated(self, keys: set[str], context: Context) -> N...
method too_few_arguments (line 987) | def too_few_arguments(
method missing_named_argument (line 1011) | def missing_named_argument(self, callee: CallableType, context: Contex...
method too_many_arguments (line 1015) | def too_many_arguments(self, callee: CallableType, context: Context) -...
method too_many_arguments_from_typed_dict (line 1023) | def too_many_arguments_from_typed_dict(
method too_many_positional_arguments (line 1036) | def too_many_positional_arguments(self, callee: CallableType, context:...
method maybe_note_about_special_args (line 1044) | def maybe_note_about_special_args(self, callee: CallableType, context:...
method unexpected_keyword_argument_for_function (line 1057) | def unexpected_keyword_argument_for_function(
method unexpected_keyword_argument (line 1065) | def unexpected_keyword_argument(
method duplicate_argument_value (line 1098) | def duplicate_argument_value(self, callee: CallableType, index: int, c...
method does_not_return_value (line 1106) | def does_not_return_value(self, callee_type: Type | None, context: Con...
method deleted_as_rvalue (line 1114) | def deleted_as_rvalue(self, typ: DeletedType, context: Context) -> None:
method deleted_as_lvalue (line 1122) | def deleted_as_lvalue(self, typ: DeletedType, context: Context) -> None:
method no_variant_matches_arguments (line 1134) | def no_variant_matches_arguments(
method wrong_number_values_to_unpack (line 1173) | def wrong_number_values_to_unpack(
method unpacking_strings_disallowed (line 1188) | def unpacking_strings_disallowed(self, context: Context) -> None:
method type_not_iterable (line 1191) | def type_not_iterable(self, type: Type, context: Context) -> None:
method possible_missing_await (line 1194) | def possible_missing_await(self, context: Context, code: ErrorCode | N...
method incompatible_operator_assignment (line 1197) | def incompatible_operator_assignment(self, op: str, context: Context) ...
method overload_signature_incompatible_with_supertype (line 1200) | def overload_signature_incompatible_with_supertype(
method signature_incompatible_with_supertype (line 1211) | def signature_incompatible_with_supertype(
method pretty_callable_or_overload (line 1280) | def pretty_callable_or_overload(
method argument_incompatible_with_supertype (line 1312) | def argument_incompatible_with_supertype(
method comparison_method_example_msg (line 1356) | def comparison_method_example_msg(self, class_name: str) -> str:
method return_type_incompatible_with_supertype (line 1369) | def return_type_incompatible_with_supertype(
method override_target (line 1406) | def override_target(self, name: str, name_in_super: str, supertype: st...
method incompatible_type_application (line 1412) | def incompatible_type_application(
method could_not_infer_type_arguments (line 1429) | def could_not_infer_type_arguments(
method invalid_var_arg (line 1444) | def invalid_var_arg(self, typ: Type, context: Context) -> None:
method invalid_keyword_var_arg (line 1447) | def invalid_keyword_var_arg(self, typ: Type, is_mapping: bool, context...
method undefined_in_superclass (line 1458) | def undefined_in_superclass(self, member: str, context: Context) -> None:
method variable_may_be_undefined (line 1461) | def variable_may_be_undefined(self, name: str, context: Context) -> None:
method var_used_before_def (line 1464) | def var_used_before_def(self, name: str, context: Context) -> None:
method first_argument_for_super_must_be_type (line 1467) | def first_argument_for_super_must_be_type(self, actual: Type, context:...
method unsafe_super (line 1481) | def unsafe_super(self, method: str, cls: str, ctx: Context) -> None:
method too_few_string_formatting_arguments (line 1488) | def too_few_string_formatting_arguments(self, context: Context) -> None:
method too_many_string_formatting_arguments (line 1491) | def too_many_string_formatting_arguments(self, context: Context) -> None:
method unsupported_placeholder (line 1498) | def unsupported_placeholder(self, placeholder: str, context: Context) ...
method string_interpolation_with_star_and_key (line 1503) | def string_interpolation_with_star_and_key(self, context: Context) -> ...
method requires_int_or_single_byte (line 1510) | def requires_int_or_single_byte(self, context: Context, format_call: b...
method requires_int_or_char (line 1519) | def requires_int_or_char(self, context: Context, format_call: bool = F...
method key_not_in_mapping (line 1526) | def key_not_in_mapping(self, key: str, context: Context) -> None:
method string_interpolation_mixing_key_and_non_keys (line 1529) | def string_interpolation_mixing_key_and_non_keys(self, context: Contex...
method cannot_determine_type (line 1536) | def cannot_determine_type(self, name: str, context: Context) -> None:
method cannot_determine_type_in_base (line 1539) | def cannot_determine_type_in_base(self, name: str, base: str, context:...
method no_formal_self (line 1542) | def no_formal_self(self, name: str, item: CallableType, context: Conte...
method incompatible_self_argument (line 1548) | def incompatible_self_argument(
method incompatible_conditional_function_def (line 1558) | def incompatible_conditional_function_def(
method cannot_instantiate_abstract_class (line 1570) | def cannot_instantiate_abstract_class(
method base_class_definitions_incompatible (line 1600) | def base_class_definitions_incompatible(
method cant_assign_to_method (line 1609) | def cant_assign_to_method(self, context: Context) -> None:
method cant_assign_to_classvar (line 1612) | def cant_assign_to_classvar(self, name: str, context: Context) -> None:
method no_overridable_method (line 1615) | def no_overridable_method(self, name: str, context: Context) -> None:
method explicit_override_decorator_missing (line 1622) | def explicit_override_decorator_missing(
method final_cant_override_writable (line 1632) | def final_cant_override_writable(self, name: str, ctx: Context) -> None:
method cant_override_final (line 1635) | def cant_override_final(self, name: str, base_name: str, ctx: Context)...
method cant_assign_to_final (line 1644) | def cant_assign_to_final(self, name: str, attr_assign: bool, ctx: Cont...
method protocol_members_cant_be_final (line 1652) | def protocol_members_cant_be_final(self, ctx: Context) -> None:
method final_without_value (line 1655) | def final_without_value(self, ctx: Context) -> None:
method read_only_property (line 1658) | def read_only_property(self, name: str, type: TypeInfo, context: Conte...
method incompatible_typevar_value (line 1661) | def incompatible_typevar_value(
method dangerous_comparison (line 1686) | def dangerous_comparison(self, left: Type, right: Type, kind: str, ctx...
method overload_inconsistently_applies_decorator (line 1697) | def overload_inconsistently_applies_decorator(self, decorator: str, co...
method overloaded_signatures_overlap (line 1704) | def overloaded_signatures_overlap(
method overloaded_signature_will_never_match (line 1720) | def overloaded_signature_will_never_match(
method overloaded_signatures_typevar_specific (line 1732) | def overloaded_signatures_typevar_specific(self, index: int, context: ...
method overloaded_signatures_arg_specific (line 1739) | def overloaded_signatures_arg_specific(self, index: int, context: Cont...
method overloaded_signatures_ret_specific (line 1748) | def overloaded_signatures_ret_specific(self, index: int, context: Cont...
method warn_both_operands_are_from_unions (line 1754) | def warn_both_operands_are_from_unions(self, context: Context) -> None:
method warn_operand_was_from_union (line 1757) | def warn_operand_was_from_union(self, side: str, original: Type, conte...
method operator_method_signatures_overlap (line 1764) | def operator_method_signatures_overlap(
method forward_operator_not_callable (line 1782) | def forward_operator_not_callable(self, forward_method: str, context: ...
method signatures_incompatible (line 1785) | def signatures_incompatible(self, method: str, other_method: str, cont...
method yield_from_invalid_operand_type (line 1788) | def yield_from_invalid_operand_type(self, expr: Type, context: Context...
method invalid_signature (line 1797) | def invalid_signature(self, func_type: Type, context: Context) -> None:
method invalid_signature_for_special_method (line 1800) | def invalid_signature_for_special_method(
method reveal_type (line 1808) | def reveal_type(self, typ: Type, context: Context, defined: Type | Non...
method reveal_locals (line 1824) | def reveal_locals(self, type_map: dict[str, Type | None], context: Con...
method unsupported_type_type (line 1836) | def unsupported_type_type(self, item: Type, context: Context) -> None:
method redundant_cast (line 1841) | def redundant_cast(self, typ: Type, context: Context) -> None:
method assert_type_fail (line 1848) | def assert_type_fail(self, source_type: Type, target_type: Type, conte...
method unimported_type_becomes_any (line 1852) | def unimported_type_becomes_any(self, prefix: str, typ: Type, ctx: Con...
method need_annotation_for_var (line 1859) | def need_annotation_for_var(
method explicit_any (line 1896) | def explicit_any(self, ctx: Context) -> None:
method unsupported_target_for_star_typeddict (line 1899) | def unsupported_target_for_star_typeddict(self, typ: Type, ctx: Contex...
method non_required_keys_absent_with_star (line 1908) | def non_required_keys_absent_with_star(self, keys: list[str], ctx: Con...
method unexpected_typeddict_keys (line 1917) | def unexpected_typeddict_keys(
method typeddict_key_must_be_string_literal (line 1959) | def typeddict_key_must_be_string_literal(self, typ: TypedDictType, con...
method typeddict_key_not_found (line 1968) | def typeddict_key_not_found(
method typeddict_context_ambiguous (line 1998) | def typeddict_context_ambiguous(self, types: list[TypedDictType], cont...
method typeddict_key_cannot_be_deleted (line 2004) | def typeddict_key_cannot_be_deleted(
method typeddict_setdefault_arguments_inconsistent (line 2015) | def typeddict_setdefault_arguments_inconsistent(
method type_arguments_not_allowed (line 2025) | def type_arguments_not_allowed(self, context: Context) -> None:
method disallowed_any_type (line 2028) | def disallowed_any_type(self, typ: Type, context: Context) -> None:
method incorrectly_returning_any (line 2036) | def incorrectly_returning_any(self, typ: Type, context: Context) -> None:
method incorrect__exit__return (line 2042) | def incorrect__exit__return(self, context: Context) -> None:
method untyped_decorated_function (line 2060) | def untyped_decorated_function(self, typ: Type, context: Context) -> N...
method typed_function_untyped_decorator (line 2075) | def typed_function_untyped_decorator(self, func_name: str, context: Co...
method bad_proto_variance (line 2078) | def bad_proto_variance(
method concrete_only_assign (line 2088) | def concrete_only_assign(self, typ: Type, context: Context) -> None:
method concrete_only_call (line 2095) | def concrete_only_call(self, typ: Type, context: Context) -> None:
method cannot_use_function_with_type (line 2102) | def cannot_use_function_with_type(
method report_non_method_protocol (line 2107) | def report_non_method_protocol(
method note_call (line 2118) | def note_call(
method unreachable_statement (line 2130) | def unreachable_statement(self, context: Context) -> None:
method redundant_left_operand (line 2133) | def redundant_left_operand(self, op_name: str, context: Context) -> None:
method unreachable_right_operand (line 2140) | def unreachable_right_operand(self, op_name: str, context: Context) ->...
method redundant_condition_in_comprehension (line 2149) | def redundant_condition_in_comprehension(self, truthiness: bool, conte...
method redundant_condition_in_if (line 2152) | def redundant_condition_in_if(self, truthiness: bool, context: Context...
method redundant_expr (line 2155) | def redundant_expr(self, description: str, truthiness: bool, context: ...
method impossible_intersection (line 2162) | def impossible_intersection(
method tvar_without_default_type (line 2173) | def tvar_without_default_type(
method report_protocol_problems (line 2182) | def report_protocol_problems(
method pretty_overload (line 2383) | def pretty_overload(
method print_more (line 2410) | def print_more(
method try_report_long_tuple_assignment_error (line 2427) | def try_report_long_tuple_assignment_error(
method format_long_tuple_type (line 2472) | def format_long_tuple_type(self, typ: TupleType) -> str:
method generate_incompatible_tuple_error (line 2485) | def generate_incompatible_tuple_error(
method add_fixture_note (line 2517) | def add_fixture_note(self, fullname: str, ctx: Context) -> None:
method annotation_in_unchecked_function (line 2527) | def annotation_in_unchecked_function(self, context: Context) -> None:
method type_parameters_should_be_declared (line 2535) | def type_parameters_should_be_declared(self, undeclared: list[str], co...
function quote_type_string (line 2544) | def quote_type_string(type_string: str) -> str:
function format_callable_args (line 2559) | def format_callable_args(
function format_type_inner (line 2620) | def format_type_inner(
function collect_all_named_types (line 2904) | def collect_all_named_types(t: Type) -> list[Type]:
class CollectAllNamedTypesQuery (line 2915) | class CollectAllNamedTypesQuery(TypeTraverserVisitor):
method __init__ (line 2916) | def __init__(self) -> None:
method visit_instance (line 2919) | def visit_instance(self, t: Instance) -> None:
method visit_type_alias_type (line 2923) | def visit_type_alias_type(self, t: TypeAliasType) -> None:
method visit_type_var (line 2930) | def visit_type_var(self, t: TypeVarType) -> None:
method visit_type_var_tuple (line 2934) | def visit_type_var_tuple(self, t: TypeVarTupleType) -> None:
method visit_param_spec (line 2938) | def visit_param_spec(self, t: ParamSpecType) -> None:
function scoped_type_var_name (line 2943) | def scoped_type_var_name(t: TypeVarLikeType) -> str:
function find_type_overlaps (line 2951) | def find_type_overlaps(*types: Type) -> set[str]:
function format_type (line 2978) | def format_type(
function format_type_bare (line 2994) | def format_type_bare(
function format_type_distinctly (line 3011) | def format_type_distinctly(*types: Type, options: Options, bare: bool = ...
function pretty_class_or_static_decorator (line 3037) | def pretty_class_or_static_decorator(tp: CallableType) -> str | None:
function pretty_callable (line 3047) | def pretty_callable(tp: CallableType, options: Options, skip_self: bool ...
function variance_string (line 3154) | def variance_string(variance: int) -> str:
function get_missing_protocol_members (line 3163) | def get_missing_protocol_members(left: Instance, right: Instance, skip: ...
function get_conflict_protocol_types (line 3177) | def get_conflict_protocol_types(
function get_bad_protocol_flags (line 3201) | def get_bad_protocol_flags(
function capitalize (line 3235) | def capitalize(s: str) -> str:
function extract_type (line 3243) | def extract_type(name: str) -> str:
function strip_quotes (line 3252) | def strip_quotes(s: str) -> str:
function format_string_list (line 3259) | def format_string_list(lst: list[str]) -> str:
function format_item_name_list (line 3273) | def format_item_name_list(s: Iterable[str]) -> str:
function callable_name (line 3281) | def callable_name(type: FunctionLike) -> str | None:
function for_function (line 3288) | def for_function(callee: CallableType) -> str:
function wrong_type_arg_count (line 3295) | def wrong_type_arg_count(low: int, high: int, act: str, name: str) -> str:
function find_defining_module (line 3309) | def find_defining_module(modules: dict[str, MypyFile], typ: CallableType...
function _real_quick_ratio (line 3328) | def _real_quick_ratio(a: str, b: str) -> float:
function best_matches (line 3336) | def best_matches(current: str, options: Collection[str], n: int) -> list...
function pretty_seq (line 3349) | def pretty_seq(args: Sequence[str], conjunction: str) -> str:
function append_invariance_notes (line 3359) | def append_invariance_notes(
function append_union_note (line 3391) | def append_union_note(
function append_numbers_notes (line 3408) | def append_numbers_notes(
function make_inferred_type_note (line 3419) | def make_inferred_type_note(
function format_key_list (line 3452) | def format_key_list(keys: list[str], *, short: bool = False) -> str:
function ignore_last_known_values (line 3463) | def ignore_last_known_values(t: UnionType) -> Type:
FILE: mypy/metastore.py
class MetadataStore (line 26) | class MetadataStore:
method getmtime (line 30) | def getmtime(self, name: str) -> float:
method read (line 37) | def read(self, name: str) -> bytes:
method write (line 44) | def write(self, name: str, data: bytes, mtime: float | None = None) ->...
method remove (line 54) | def remove(self, name: str) -> None:
method commit (line 58) | def commit(self) -> None:
method list_all (line 67) | def list_all(self) -> Iterable[str]: ...
function random_string (line 70) | def random_string() -> str:
class FilesystemMetadataStore (line 74) | class FilesystemMetadataStore(MetadataStore):
method __init__ (line 75) | def __init__(self, cache_dir_prefix: str) -> None:
method getmtime (line 84) | def getmtime(self, name: str) -> float:
method read (line 90) | def read(self, name: str) -> bytes:
method write (line 99) | def write(self, name: str, data: bytes, mtime: float | None = None) ->...
method remove (line 119) | def remove(self, name: str) -> None:
method commit (line 125) | def commit(self) -> None:
method list_all (line 128) | def list_all(self) -> Iterable[str]:
function connect_db (line 148) | def connect_db(db_file: str) -> sqlite3.Connection:
class SqliteMetadataStore (line 156) | class SqliteMetadataStore(MetadataStore):
method __init__ (line 157) | def __init__(self, cache_dir_prefix: str) -> None:
method _query (line 168) | def _query(self, name: str, field: str) -> Any:
method getmtime (line 180) | def getmtime(self, name: str) -> float:
method read (line 185) | def read(self, name: str) -> bytes:
method write (line 190) | def write(self, name: str, data: bytes, mtime: float | None = None) ->...
method remove (line 206) | def remove(self, name: str) -> None:
method commit (line 212) | def commit(self) -> None:
method list_all (line 216) | def list_all(self) -> Iterable[str]:
FILE: mypy/mixedtraverser.py
class MixedTraverserVisitor (line 27) | class MixedTraverserVisitor(TraverserVisitor, TypeTraverserVisitor):
method __init__ (line 30) | def __init__(self) -> None:
method visit_var (line 35) | def visit_var(self, var: Var, /) -> None:
method visit_func (line 38) | def visit_func(self, o: FuncItem, /) -> None:
method visit_class_def (line 42) | def visit_class_def(self, o: ClassDef, /) -> None:
method visit_type_alias_expr (line 51) | def visit_type_alias_expr(self, o: TypeAliasExpr, /) -> None:
method visit_type_var_expr (line 55) | def visit_type_var_expr(self, o: TypeVarExpr, /) -> None:
method visit_typeddict_expr (line 61) | def visit_typeddict_expr(self, o: TypedDictExpr, /) -> None:
method visit_namedtuple_expr (line 65) | def visit_namedtuple_expr(self, o: NamedTupleExpr, /) -> None:
method visit__promote_expr (line 70) | def visit__promote_expr(self, o: PromoteExpr, /) -> None:
method visit_newtype_expr (line 74) | def visit_newtype_expr(self, o: NewTypeExpr, /) -> None:
method visit_assignment_stmt (line 80) | def visit_assignment_stmt(self, o: AssignmentStmt, /) -> None:
method visit_type_alias_stmt (line 84) | def visit_type_alias_stmt(self, o: TypeAliasStmt, /) -> None:
method visit_type_alias (line 89) | def visit_type_alias(self, o: TypeAlias, /) -> None:
method visit_for_stmt (line 95) | def visit_for_stmt(self, o: ForStmt, /) -> None:
method visit_with_stmt (line 99) | def visit_with_stmt(self, o: WithStmt, /) -> None:
method visit_cast_expr (line 106) | def visit_cast_expr(self, o: CastExpr, /) -> None:
method visit_assert_type_expr (line 110) | def visit_assert_type_expr(self, o: AssertTypeExpr, /) -> None:
method visit_type_application (line 114) | def visit_type_application(self, o: TypeApplication, /) -> None:
method visit_optional_type (line 121) | def visit_optional_type(self, t: Type | None, /) -> None:
FILE: mypy/modulefinder.py
class SearchPaths (line 29) | class SearchPaths:
method __init__ (line 30) | def __init__(
method asdict (line 46) | def asdict(self) -> dict[str, tuple[str, ...]]:
class ModuleNotFoundReason (line 69) | class ModuleNotFoundReason(Enum):
method error_message_templates (line 87) | def error_message_templates(self, daemon: bool) -> tuple[str, list[str]]:
class BuildSource (line 121) | class BuildSource:
method __init__ (line 124) | def __init__(
method __repr__ (line 138) | def __repr__(self) -> str:
class BuildSourceSet (line 146) | class BuildSourceSet:
method __init__ (line 149) | def __init__(self, sources: list[BuildSource]) -> None:
method is_source (line 162) | def is_source(self, file: MypyFile) -> bool:
class FindModuleCache (line 170) | class FindModuleCache:
method __init__ (line 181) | def __init__(
method clear (line 206) | def clear(self) -> None:
method find_module_via_source_set (line 211) | def find_module_via_source_set(self, id: str) -> ModuleSearchResult | ...
method find_lib_path_dirs (line 260) | def find_lib_path_dirs(self, id: str, lib_path: tuple[str, ...]) -> Pa...
method get_toplevel_possibilities (line 276) | def get_toplevel_possibilities(self, lib_path: tuple[str, ...], id: st...
method find_module (line 307) | def find_module(self, id: str, *, fast_path: bool = False) -> ModuleSe...
method _typeshed_has_version (line 329) | def _typeshed_has_version(self, module: str) -> bool:
method _find_module_non_stub_helper (line 336) | def _find_module_non_stub_helper(
method _update_ns_ancestors (line 366) | def _update_ns_ancestors(self, components: list[str], match: tuple[str...
method _can_find_module_in_parent_dir (line 374) | def _can_find_module_in_parent_dir(self, id: str) -> bool:
method _find_module (line 392) | def _find_module(self, id: str, use_typeshed: bool) -> ModuleSearchRes...
method find_modules_recursive (line 607) | def find_modules_recursive(self, module: str) -> list[BuildSource]:
function matches_exclude (line 659) | def matches_exclude(
function is_init_file (line 677) | def is_init_file(path: str) -> bool:
function verify_module (line 681) | def verify_module(fscache: FileSystemCache, id: str, path: str, prefix: ...
function highest_init_level (line 695) | def highest_init_level(fscache: FileSystemCache, id: str, path: str, pre...
function mypy_path (line 710) | def mypy_path() -> list[str]:
function default_lib_path (line 717) | def default_lib_path(
function get_search_dirs (line 765) | def get_search_dirs(python_executable: str | None) -> tuple[list[str], l...
function compute_search_paths (line 803) | def compute_search_paths(
function load_stdlib_py_versions (line 891) | def load_stdlib_py_versions(custom_typeshed_dir: str | None) -> StdlibVe...
function parse_version (line 920) | def parse_version(version: str) -> tuple[int, int]:
function typeshed_py_version (line 925) | def typeshed_py_version(options: Options) -> tuple[int, int]:
FILE: mypy/moduleinspect.py
class ModuleProperties (line 17) | class ModuleProperties:
method __init__ (line 19) | def __init__(
function is_c_module (line 36) | def is_c_module(module: ModuleType) -> bool:
function is_pyc_only (line 44) | def is_pyc_only(file: str | None) -> bool:
class InspectError (line 48) | class InspectError(Exception):
function get_package_properties (line 52) | def get_package_properties(package_id: str) -> ModuleProperties:
function worker (line 95) | def worker(tasks: Queue[str], results: Queue[str | ModuleProperties], sy...
class ModuleInspect (line 108) | class ModuleInspect:
method __init__ (line 124) | def __init__(self) -> None:
method _start (line 127) | def _start(self) -> None:
method close (line 138) | def close(self) -> None:
method get_package_properties (line 142) | def get_package_properties(self, package_id: str) -> ModuleProperties:
method _get_from_queue (line 165) | def _get_from_queue(self) -> ModuleProperties | str | None:
method __enter__ (line 182) | def __enter__(self) -> ModuleInspect:
method __exit__ (line 185) | def __exit__(self, *args: object) -> None:
FILE: mypy/mro.py
function calculate_mro (line 10) | def calculate_mro(info: TypeInfo, obj_type: Callable[[], Instance] | Non...
class MroError (line 23) | class MroError(Exception):
function linearize_hierarchy (line 27) | def linearize_hierarchy(
function merge (line 46) | def merge(seqs: list[list[TypeInfo]]) -> list[TypeInfo]:
FILE: mypy/nodes.py
class Context (line 24) | class Context:
method __init__ (line 29) | def
Copy disabled (too large)
Download .json
Condensed preview — 1670 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (17,387K chars).
[
{
"path": ".editorconfig",
"chars": 217,
"preview": "root = true\n\n[*.{py,pyi,c,cpp,h,rst,md,yml,yaml,json,test}]\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n"
},
{
"path": ".git-blame-ignore-revs",
"chars": 482,
"preview": "# Adopt black and isort\n97c5ee99bc98dc475512e549b252b23a6e7e0997\n# Use builtin generics and PEP 604 for type annotations"
},
{
"path": ".gitattributes",
"chars": 96,
"preview": "# We vendor typeshed from https://github.com/python/typeshed\nmypy/typeshed/** linguist-vendored\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug.md",
"chars": 0,
"preview": ""
},
{
"path": ".github/ISSUE_TEMPLATE/bug.yml",
"chars": 955,
"preview": "name: Bug Report\ndescription: Something isn't working as it should\nlabels: \"bug\"\n\nbody:\n - type: textarea\n attribute"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 173,
"preview": "contact_links:\n - about: \"Please ask and answer usage questions in our official Discord.\"\n name: Questions, help and"
},
{
"path": ".github/ISSUE_TEMPLATE/documentation.md",
"chars": 148,
"preview": "---\nname: Documentation\nabout: Report a problem with the documentation\nlabels: \"documentation\"\n---\n\n(A clear and concise"
},
{
"path": ".github/ISSUE_TEMPLATE/feature.md",
"chars": 272,
"preview": "---\nname: Feature\nabout: Submit a proposal for a based new mypy feature\nlabels: \"feature\"\n---\n\n<!-- Please explain why t"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 98,
"preview": "\n"
},
{
"path": ".github/workflows/build_wheels.yml",
"chars": 559,
"preview": "name: Trigger wheel build\n\non:\n push:\n branches: [main, master, 'release*']\n tags: ['*']\n\npermissions:\n contents"
},
{
"path": ".github/workflows/docs.yml",
"chars": 1237,
"preview": "name: Check documentation build\n\non:\n workflow_dispatch:\n push:\n branches: [main, master, 'release*']\n tags: ['*"
},
{
"path": ".github/workflows/mypy_primer.yml",
"chars": 3214,
"preview": "name: Run mypy_primer\n\non:\n # Only run on PR, since we diff against master\n pull_request:\n paths-ignore:\n - 'doc"
},
{
"path": ".github/workflows/mypy_primer_comment.yml",
"chars": 4125,
"preview": "name: Comment with mypy_primer diff\n\non: # zizmor: ignore[dangerous-triggers]\n workflow_run:\n workflows:\n - Ru"
},
{
"path": ".github/workflows/publish.yml",
"chars": 1913,
"preview": "name: Publish\n\non:\n release:\n types: [published]\n\njobs:\n pypi:\n runs-on: ubuntu-latest\n steps:\n - uses: "
},
{
"path": ".github/workflows/sync_typeshed.yml",
"chars": 984,
"preview": "name: Sync typeshed\n\non:\n workflow_dispatch:\n schedule:\n - cron: \"0 0 1,15 * *\"\n\npermissions: {}\n\njobs:\n sync_type"
},
{
"path": ".github/workflows/test.yml",
"chars": 8122,
"preview": "name: Tests\n\non:\n workflow_dispatch:\n push:\n branches: [main, master, 'release*', 'merge-mypy-*', 'merge-upstream']"
},
{
"path": ".github/workflows/test_stubgenc.yml",
"chars": 864,
"preview": "name: Test stubgenc on pybind11_fixtures\n\non:\n workflow_dispatch:\n push:\n branches: [main, master, 'release*']\n "
},
{
"path": ".gitignore",
"chars": 612,
"preview": "build/\n__pycache__\n*.py[cod]\n*~\n/build\n/env*/\ndocs/build/\ndocs/source/_build\nmypyc/doc/_build\n*.iml\n/out/\n.venv*\nvenv/\n."
},
{
"path": ".mypy/baseline.json",
"chars": 835963,
"preview": "{\n \"files\": {\n \"mypy/__main__.py\": [\n {\n \"code\": \"any\",\n \"column\": 25,\n \"message\": \"Expres"
},
{
"path": ".pre-commit-config.yaml",
"chars": 1683,
"preview": "exclude: '^(mypyc/external/)|(mypy/typeshed/)|misc/typeshed_patches' # Exclude all vendored code from lints\nrepos:\n - "
},
{
"path": ".readthedocs.yaml",
"chars": 323,
"preview": "# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\nversion:"
},
{
"path": "CHANGELOG.md",
"chars": 7191,
"preview": "# Basedmypy Changelog\n\n## [Unreleased]\n### Changes\n- don't error on missing arguments on `types.FunctionType` and `types"
},
{
"path": "CONTRIBUTING.md",
"chars": 6049,
"preview": "# Contributing to Mypy\n\nwelcome! basedmypy is a community project that aims to work for a wide\nrange of Python users and"
},
{
"path": "CREDITS",
"chars": 1336,
"preview": "Credits\n-------\n\nWe would like to thank the core basedmypy team:\n\n KotlinIsland\n DetachHead\n PixieRa\n Jorenham\n\nMypy"
},
{
"path": "LICENSE",
"chars": 11328,
"preview": "Mypy (and mypyc) are licensed under the terms of the MIT license, reproduced below.\n\n= = = = =\n\nThe MIT License\n\nCopyrig"
},
{
"path": "MANIFEST.in",
"chars": 1468,
"preview": "# some of the prunes here are so that check-manifest doesn't complain about their exclusion\n# as such, be judicious in y"
},
{
"path": "README.md",
"chars": 3932,
"preview": "> [!IMPORTANT]\n> **deprecated**: basedmypy is no longer maintained\n>\n> as of July 2025, this project is deprecated. base"
},
{
"path": "action.yml",
"chars": 2648,
"preview": "name: \"Mypy\"\ndescription: \"Optional Static Typing for Python.\"\nauthor: \"Jukka Lehtosalo and contributors\"\ninputs:\n opti"
},
{
"path": "build-requirements.txt",
"chars": 136,
"preview": "# NOTE: this needs to be kept in sync with the \"requires\" list in pyproject.toml\n-r mypy-requirements.txt\ntypes-psutil\nt"
},
{
"path": "conftest.py",
"chars": 585,
"preview": "from __future__ import annotations\n\nimport os.path\n\npytest_plugins = [\"mypy.test.data\"]\n\n\ndef pytest_configure(config):\n"
},
{
"path": "docs/Makefile",
"chars": 6768,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "docs/README.md",
"chars": 1064,
"preview": "Mypy Documentation\n==================\n\nWhat's this?\n------------\n\nThis directory contains the source code for Mypy docum"
},
{
"path": "docs/make.bat",
"chars": 6711,
"preview": "@ECHO OFF\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\n"
},
{
"path": "docs/requirements-docs.txt",
"chars": 79,
"preview": "sphinx>=8.1.0\nfuro>=2022.3.4\nmyst-parser>=4.0.0\nsphinx_inline_tabs>=2023.04.21\n"
},
{
"path": "docs/source/additional_features.rst",
"chars": 16564,
"preview": "Additional features\n-------------------\n\nThis section discusses various features that did not fit in naturally in one\nof"
},
{
"path": "docs/source/based_features.rst",
"chars": 10209,
"preview": ".. _based_features:\n\nBased Features\n==============\n\n\nIntersection Types\n------------------\n\nUsing the ``&`` operator or "
},
{
"path": "docs/source/based_inference.rst",
"chars": 1360,
"preview": ".. _based_inference:\n\nBased Inference\n===============\n\n\nOverload Implementation Inference\n------------------------------"
},
{
"path": "docs/source/baseline.rst",
"chars": 2705,
"preview": ".. _baseline:\n\nBaseline\n========\n\nBasedmypy supports a feature know as 'baselining' where a snapshot of a codebase is\nta"
},
{
"path": "docs/source/builtin_types.rst",
"chars": 4133,
"preview": "Built-in types\n==============\n\nThis chapter introduces some commonly used built-in types. We will\ncover many other kinds"
},
{
"path": "docs/source/changelog.md",
"chars": 106,
"preview": "<!-- This file includes mypy/CHANGELOG.md into mypy documentation -->\n```{include} ../../CHANGELOG.md\n```\n"
},
{
"path": "docs/source/cheat_sheet_py3.rst",
"chars": 13325,
"preview": ".. _cheat-sheet-py3:\n\nType hints cheat sheet\n======================\n\nThis document is a quick cheat sheet showing how to"
},
{
"path": "docs/source/class_basics.rst",
"chars": 12606,
"preview": ".. _class-basics:\n\nClass basics\n============\n\nThis section will help get you started annotating your\nclasses. Built-in c"
},
{
"path": "docs/source/command_line.rst",
"chars": 43526,
"preview": ".. _command-line:\n\n.. program:: mypy\n\nThe mypy command line\n=====================\n\nThis section documents mypy's command"
},
{
"path": "docs/source/common_issues.rst",
"chars": 27611,
"preview": ".. _common_issues:\n\nCommon issues and solutions\n===========================\n\nThis section has examples of cases when you"
},
{
"path": "docs/source/conf.py",
"chars": 9554,
"preview": "# -*- coding: utf-8 -*-\n#\n# Mypy documentation build configuration file, created by\n# sphinx-quickstart on Sun Sep 14 19"
},
{
"path": "docs/source/config_file.rst",
"chars": 38852,
"preview": ".. _config-file:\n\nThe mypy configuration file\n===========================\n\nMypy is very configurable. This is most usefu"
},
{
"path": "docs/source/duck_type_compatibility.rst",
"chars": 1256,
"preview": "Duck type compatibility\n-----------------------\n\nIn Python, certain types are compatible even though they aren't subclas"
},
{
"path": "docs/source/dynamic_typing.rst",
"chars": 4578,
"preview": ".. _dynamic-typing:\n\n\nDynamically typed code\n======================\n\nIn :ref:`getting-started-dynamic-vs-static`, we dis"
},
{
"path": "docs/source/error_code_list.rst",
"chars": 38613,
"preview": ".. _error-code-list:\n\nError codes part 1\n==================\n\nThis section documents various errors codes that basedmypy "
},
{
"path": "docs/source/error_code_list2.rst",
"chars": 19752,
"preview": ".. _error-codes-strict:\n\nError codes for strict checks\n=============================\n\nThis section documents various err"
},
{
"path": "docs/source/error_code_list3.rst",
"chars": 5020,
"preview": ".. _error-codes-based:\n\nError codes unique to basedmypy\n===============================\n\n.. _code-decorated-any:\n\nCheck "
},
{
"path": "docs/source/error_codes.rst",
"chars": 4192,
"preview": ".. _error-codes:\n\nError codes\n===========\n\nMypy can optionally display an error code such as ``[attr-defined]``\nafter ea"
},
{
"path": "docs/source/existing_code.rst",
"chars": 10045,
"preview": ".. _existing-code:\n\nUsing mypy with an existing codebase\n====================================\n\nThis section explains how"
},
{
"path": "docs/source/extending_mypy.rst",
"chars": 9632,
"preview": ".. _extending-mypy:\n\nExtending and integrating mypy\n==============================\n\n.. _integrating-mypy:\n\nIntegrating m"
},
{
"path": "docs/source/faq.rst",
"chars": 9222,
"preview": "Frequently Asked Questions\n==========================\n\nWhy have both dynamic and static typing?\n************************"
},
{
"path": "docs/source/final_attrs.rst",
"chars": 7120,
"preview": ".. _final_attrs:\n\nFinal names, methods and classes\n================================\n\nThis section introduces these relat"
},
{
"path": "docs/source/generics.rst",
"chars": 46019,
"preview": "Generics\n========\n\nThis section explains how you can define your own generic classes that take\none or more type argument"
},
{
"path": "docs/source/getting_started.rst",
"chars": 14007,
"preview": ".. _getting-started:\n\nGetting started\n===============\n\nThis chapter introduces some core concepts of mypy, including fun"
},
{
"path": "docs/source/html_builder.py",
"chars": 1989,
"preview": "from __future__ import annotations\n\nimport json\nimport os\nimport textwrap\nfrom pathlib import Path\nfrom typing import An"
},
{
"path": "docs/source/index.rst",
"chars": 3278,
"preview": ".. Mypy documentation master file, created by\n sphinx-quickstart on Sun Sep 14 19:50:35 2014.\n You can adapt this fi"
},
{
"path": "docs/source/inline_config.rst",
"chars": 1164,
"preview": ".. _inline-config:\n\nInline configuration\n====================\n\nMypy supports setting per-file configuration options insi"
},
{
"path": "docs/source/installed_packages.rst",
"chars": 6559,
"preview": ".. _installed-packages:\n\nUsing installed packages\n========================\n\nPackages installed with pip can declare that"
},
{
"path": "docs/source/kinds_of_types.rst",
"chars": 25069,
"preview": "Kinds of types\n==============\n\nWe've mostly restricted ourselves to built-in types until now. This\nsection introduces se"
},
{
"path": "docs/source/literal_types.rst",
"chars": 16916,
"preview": "Literal types and Enums\n=======================\n\n.. _literal_types:\n\nLiteral types\n-------------\n\nLiteral types let you "
},
{
"path": "docs/source/metaclasses.rst",
"chars": 2583,
"preview": ".. _metaclasses:\n\nMetaclasses\n===========\n\nA :ref:`metaclass <python:metaclasses>` is a class that describes\nthe constru"
},
{
"path": "docs/source/more_types.rst",
"chars": 33993,
"preview": "More types\n==========\n\nThis section introduces a few additional kinds of types, including :py:data:`~typing.NoReturn`,\n:"
},
{
"path": "docs/source/mypy_daemon.rst",
"chars": 14914,
"preview": ".. _mypy_daemon:\n\n.. program:: dmypy\n\nMypy daemon (mypy server)\n=========================\n\nInstead of running mypy as a "
},
{
"path": "docs/source/protocols.rst",
"chars": 16711,
"preview": ".. _protocol-types:\n\nProtocols and structural subtyping\n==================================\n\nThe Python type system suppo"
},
{
"path": "docs/source/running_mypy.rst",
"chars": 25248,
"preview": ".. _running-mypy:\n\nRunning mypy and managing imports\n=================================\n\nThe :ref:`getting-started` page "
},
{
"path": "docs/source/runtime_troubles.rst",
"chars": 12229,
"preview": ".. _runtime_troubles:\n\nAnnotation issues at runtime\n============================\n\nIdiomatic use of type annotations can "
},
{
"path": "docs/source/stubgen.rst",
"chars": 6640,
"preview": ".. _stubgen:\n\n.. program:: stubgen\n\nAutomatic stub generation (stubgen)\n===================================\n\nA stub file"
},
{
"path": "docs/source/stubs.rst",
"chars": 5009,
"preview": ".. _stub-files:\n\nStub files\n==========\n\nA *stub file* is a file containing a skeleton of the public interface\nof that Py"
},
{
"path": "docs/source/stubtest.rst",
"chars": 5574,
"preview": ".. _stubtest:\n\n.. program:: stubtest\n\nAutomatic stub testing (stubtest)\n=================================\n\nStub files ar"
},
{
"path": "docs/source/supported_python_features.rst",
"chars": 937,
"preview": "Supported Python features\n=========================\n\nA list of unsupported Python features is maintained in the mypy wik"
},
{
"path": "docs/source/type_inference_and_annotations.rst",
"chars": 9370,
"preview": ".. _type-inference-and-annotations:\n\nType inference and type annotations\n===================================\n\nType infer"
},
{
"path": "docs/source/type_narrowing.rst",
"chars": 17552,
"preview": ".. _type-narrowing:\n\nType narrowing\n==============\n\nThis section is dedicated to several type narrowing\ntechniques which"
},
{
"path": "docs/source/typed_dict.rst",
"chars": 11471,
"preview": ".. _typeddict:\n\nTypedDict\n*********\n\nPython programs often use dictionaries with string keys to represent objects.\n``Typ"
},
{
"path": "misc/analyze_cache.py",
"chars": 5959,
"preview": "#!/usr/bin/env python\n\nfrom __future__ import annotations\n\nimport json\nimport os\nimport os.path\nfrom collections import "
},
{
"path": "misc/apply-cache-diff.py",
"chars": 1729,
"preview": "#!/usr/bin/env python3\n\"\"\"Script for applying a cache diff.\n\nWith some infrastructure, this can allow for distributing s"
},
{
"path": "misc/build-debug-python.sh",
"chars": 1215,
"preview": "#!/bin/bash -eux\n\n# Build a debug build of python, install it, and create a venv for it\n# This is mainly intended for us"
},
{
"path": "misc/build_wheel.py",
"chars": 517,
"preview": "\"\"\"\nThe main GitHub workflow where wheels are built:\nhttps://github.com/mypyc/mypy_mypyc-wheels/blob/master/.github/work"
},
{
"path": "misc/cherry-pick-typeshed.py",
"chars": 1977,
"preview": "\"\"\"Cherry-pick a commit from typeshed.\n\nUsage:\n\n python3 misc/cherry-pick-typeshed.py --typeshed-dir dir hash\n\"\"\"\n\nfrom"
},
{
"path": "misc/clean-mypyc.sh",
"chars": 131,
"preview": "#!/bin/bash\necho \"Cleaning C/C++ build artifacts...\"\n(cd mypyc/lib-rt; make clean)\n(cd mypyc/external/googletest/make; m"
},
{
"path": "misc/convert-cache.py",
"chars": 1895,
"preview": "#!/usr/bin/env python3\n\"\"\"Script for converting between cache formats.\n\nWe support a filesystem tree based cache and a s"
},
{
"path": "misc/diff-cache.py",
"chars": 4726,
"preview": "#!/usr/bin/env python3\n\"\"\"Produce a diff between mypy caches.\n\nWith some infrastructure, this can allow for distributing"
},
{
"path": "misc/docker/Dockerfile",
"chars": 235,
"preview": "FROM ubuntu:latest\n\nWORKDIR /mypy\n\nRUN apt-get update\nRUN apt-get install -y python3 python3-pip clang\n\nCOPY mypy-requir"
},
{
"path": "misc/docker/README.md",
"chars": 2627,
"preview": "Running mypy and mypyc tests in a Docker container\n==================================================\n\nThis directory co"
},
{
"path": "misc/docker/build.py",
"chars": 1498,
"preview": "\"\"\"Build a \"mypy-test\" Linux Docker container for running mypy/mypyc tests.\n\nThis allows running Linux tests under a non"
},
{
"path": "misc/docker/run-wrapper.sh",
"chars": 490,
"preview": "#!/bin/bash\n# Internal wrapper script used to run commands in a container\n\n# Copy all the files we need from the mypy re"
},
{
"path": "misc/docker/run.sh",
"chars": 489,
"preview": "#!/bin/bash\n# Run mypy or mypyc tests in a Docker container that was built using misc/docker/build.py.\n#\n# Usage: misc/d"
},
{
"path": "misc/dump-ast.py",
"chars": 1320,
"preview": "#!/usr/bin/env python3\n\"\"\"\nParse source files and print the abstract syntax trees.\n\"\"\"\n\nfrom __future__ import annotatio"
},
{
"path": "misc/find_type.py",
"chars": 3518,
"preview": "#!/usr/bin/env python3\n# Usage: find_type.py FILENAME START_LINE START_COL END_LINE END_COL MYPY_AND_ARGS\n# Prints out t"
},
{
"path": "misc/gen_blog_post_html.py",
"chars": 5701,
"preview": "\"\"\"Converter from CHANGELOG.md (Markdown) to HTML suitable for a mypy blog post.\n\nHow to use:\n\n1. Write release notes in"
},
{
"path": "misc/generate_changelog.py",
"chars": 6520,
"preview": "\"\"\"Generate the changelog for a mypy release.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport re\nimport s"
},
{
"path": "misc/incremental_checker.py",
"chars": 17520,
"preview": "#!/usr/bin/env python3\n\"\"\"\nThis file compares the output and runtime of running normal vs incremental mode\non the histor"
},
{
"path": "misc/install.py",
"chars": 571,
"preview": "import argparse\nfrom subprocess import check_call\n\n\ndef main(args: argparse.Namespace):\n venv_args = [\"uv\", \"venv\", \""
},
{
"path": "misc/macs.el",
"chars": 771,
"preview": "; Example Emacs integration; shows type of expression in region.\n\n(defun mypy-show-region ()\n \"Show type of variable at"
},
{
"path": "misc/perf_checker.py",
"chars": 2470,
"preview": "#!/usr/bin/env python3\n\nfrom __future__ import annotations\n\nimport os\nimport shutil\nimport statistics\nimport subprocess\n"
},
{
"path": "misc/perf_compare.py",
"chars": 5745,
"preview": "\"\"\"Compare performance of mypyc-compiled mypy between one or more commits/branches.\n\nSimple usage:\n\n python misc/perf_c"
},
{
"path": "misc/sync-typeshed.py",
"chars": 8145,
"preview": "\"\"\"Sync stdlib stubs (and a few other files) from typeshed.\n\nUsage:\n\n python3 misc/sync-typeshed.py [--commit hash] [--"
},
{
"path": "misc/test-stubgenc.sh",
"chars": 1254,
"preview": "#!/bin/bash\n\nset -e\nset -x\n\ncd \"$(dirname \"$0\")/..\"\n\n# Install dependencies, demo project and mypy\npython -m pip install"
},
{
"path": "misc/trigger_wheel_build.sh",
"chars": 744,
"preview": "#!/bin/bash -eux\n\n# Trigger a build of mypyc compiled mypy wheels by updating the mypy\n# submodule in the git repo that "
},
{
"path": "misc/typeshed_patches/0001-Remove-use-of-LiteralString-in-builtins-13743.patch",
"chars": 9665,
"preview": "From b4259edd94188f9e4cc77a22e768eea183a32053 Mon Sep 17 00:00:00 2001\nFrom: Shantanu <12621235+hauntsaninja@users.norep"
},
{
"path": "misc/typeshed_patches/0001-Revert-Remove-redundant-inheritances-from-Iterator.patch",
"chars": 12447,
"preview": "From abc5225e3c69d7ae8f3388c87260fe496efaecac Mon Sep 17 00:00:00 2001\nFrom: Marc Mueller <30130371+cdce8p@users.noreply"
},
{
"path": "misc/typeshed_patches/0001-Revert-sum-literal-integer-change-13961.patch",
"chars": 1581,
"preview": "From 58c6a6ab863c1c38e95ccafaf13792ed9c00e499 Mon Sep 17 00:00:00 2001\nFrom: Shantanu <12621235+hauntsaninja@users.norep"
},
{
"path": "misc/typeshed_patches/0001-Revert-typeshed-ctypes-change.patch",
"chars": 1322,
"preview": "From 61a490091d7c941780919660dc4fdfa88ae6474a Mon Sep 17 00:00:00 2001\nFrom: AlexWaygood <alex.waygood@gmail.com>\nDate: "
},
{
"path": "misc/update-stubinfo.py",
"chars": 2118,
"preview": "import argparse\nfrom pathlib import Path\n\nimport tomli as tomllib\n\n\ndef main() -> None:\n parser = argparse.ArgumentPa"
},
{
"path": "misc/upload-pypi.py",
"chars": 5735,
"preview": "#!/usr/bin/env python3\n\"\"\"Upload mypy packages to PyPI.\n\nYou must first tag the release, use `git push --tags` and wait "
},
{
"path": "mypy/__init__.py",
"chars": 37,
"preview": "# This page intentionally left blank\n"
},
{
"path": "mypy/__main__.py",
"chars": 1061,
"preview": "\"\"\"Mypy type checker command line tool.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nimport sys\nimport traceback\n\nf"
},
{
"path": "mypy/api.py",
"chars": 2922,
"preview": "\"\"\"This module makes it possible to use mypy as part of a Python application.\n\nSince mypy still changes, the API was kep"
},
{
"path": "mypy/applytype.py",
"chars": 12401,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Iterable, Sequence\nfrom typing import Protocol, cast\n\nim"
},
{
"path": "mypy/argmap.py",
"chars": 11327,
"preview": "\"\"\"Utilities for mapping between actual and formal arguments (and their types).\"\"\"\n\nfrom __future__ import annotations\n\n"
},
{
"path": "mypy/binder.py",
"chars": 23304,
"preview": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom collections.abc import Generator, Iterator\n"
},
{
"path": "mypy/bogus_type.py",
"chars": 816,
"preview": "\"\"\"A Bogus[T] type alias for marking when we subvert the type system\n\nWe need this for compiling with mypyc, which inser"
},
{
"path": "mypy/build.py",
"chars": 151514,
"preview": "\"\"\"Facilities to analyze entire programs, including imported modules.\n\nParse and analyze the source files of a program i"
},
{
"path": "mypy/checker.py",
"chars": 429335,
"preview": "\"\"\"Mypy type checker.\"\"\"\n\nfrom __future__ import annotations\n\nimport itertools\nfrom collections import defaultdict\nfrom "
},
{
"path": "mypy/checkexpr.py",
"chars": 306578,
"preview": "\"\"\"Expression type checker. This file is conceptually part of TypeChecker.\"\"\"\n\nfrom __future__ import annotations\n\nimpor"
},
{
"path": "mypy/checkmember.py",
"chars": 58092,
"preview": "\"\"\"Type checking of attribute access\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Sequence\nfrom t"
},
{
"path": "mypy/checkpattern.py",
"chars": 34233,
"preview": "\"\"\"Pattern checker. This file is conceptually part of TypeChecker.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collecti"
},
{
"path": "mypy/checkstrformat.py",
"chars": 52078,
"preview": "\"\"\"\nFormat expression type checker.\n\nThis file is conceptually part of ExpressionChecker and TypeChecker. Main functiona"
},
{
"path": "mypy/config_parser.py",
"chars": 23103,
"preview": "from __future__ import annotations\n\nimport argparse\nimport configparser\nimport glob as fileglob\nimport os\nimport re\nimpo"
},
{
"path": "mypy/constant_fold.py",
"chars": 6071,
"preview": "\"\"\"Constant folding of expressions.\n\nFor example, 3 + 5 can be constant folded into 8.\n\"\"\"\n\nfrom __future__ import annot"
},
{
"path": "mypy/constraints.py",
"chars": 80188,
"preview": "\"\"\"Type inference constraints.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Iterable, Sequence\nfr"
},
{
"path": "mypy/copytype.py",
"chars": 4651,
"preview": "from __future__ import annotations\n\nfrom typing import Any, cast\n\nfrom mypy.types import (\n AnyType,\n CallableType"
},
{
"path": "mypy/defaults.py",
"chars": 2736,
"preview": "from __future__ import annotations\n\nimport os\nfrom typing import Final\n\n# Earliest fully supported Python 3.x version. U"
},
{
"path": "mypy/dmypy/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mypy/dmypy/__main__.py",
"chars": 128,
"preview": "from __future__ import annotations\n\nfrom mypy.dmypy.client import console_entry\n\nif __name__ == \"__main__\":\n console_"
},
{
"path": "mypy/dmypy/client.py",
"chars": 25363,
"preview": "\"\"\"Client for mypy daemon mode.\n\nThis manages a daemon process which keeps useful state in memory\nrather than having to "
},
{
"path": "mypy/dmypy_os.py",
"chars": 1200,
"preview": "from __future__ import annotations\n\nimport sys\nfrom typing import Any, Callable\n\nif sys.platform == \"win32\":\n import "
},
{
"path": "mypy/dmypy_server.py",
"chars": 45422,
"preview": "\"\"\"Server for mypy daemon mode.\n\nThis implements a daemon process which keeps useful state in memory\nto enable fine-grai"
},
{
"path": "mypy/dmypy_util.py",
"chars": 3006,
"preview": "\"\"\"Shared code between dmypy.py and dmypy_server.py.\n\nThis should be pretty lightweight and not depend on other mypy cod"
},
{
"path": "mypy/erasetype.py",
"chars": 10366,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Container\nfrom typing import Callable, cast\n\nfrom mypy.n"
},
{
"path": "mypy/error_formatter.py",
"chars": 1115,
"preview": "\"\"\"Defines the different custom formats in which mypy can output.\"\"\"\n\nimport json\nfrom abc import ABC, abstractmethod\nfr"
},
{
"path": "mypy/errorcodes.py",
"chars": 13676,
"preview": "\"\"\"Classification of possible errors mypy can detect.\n\nThese can be used for filtering specific errors.\n\"\"\"\n\nfrom __futu"
},
{
"path": "mypy/errors.py",
"chars": 64169,
"preview": "from __future__ import annotations\n\nimport os.path\nimport re\nimport sys\nimport traceback\nfrom collections import default"
},
{
"path": "mypy/evalexpr.py",
"chars": 6562,
"preview": "\"\"\"\n\nEvaluate an expression.\n\nUsed by stubtest; in a separate file because things break if we don't\nput it in a mypyc-co"
},
{
"path": "mypy/expandtype.py",
"chars": 25284,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Iterable, Mapping, Sequence\nfrom typing import Final, Ty"
},
{
"path": "mypy/exprtotype.py",
"chars": 10243,
"preview": "\"\"\"Translate an Expression to a Type value.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Callable\n\nfrom my"
},
{
"path": "mypy/fastparse.py",
"chars": 87859,
"preview": "from __future__ import annotations\n\nimport re\nimport sys\nimport warnings\nfrom collections.abc import Sequence\nfrom typin"
},
{
"path": "mypy/fastparse2.py",
"chars": 0,
"preview": ""
},
{
"path": "mypy/find_sources.py",
"chars": 9389,
"preview": "\"\"\"Routines for finding the sources that mypy will check\"\"\"\n\nfrom __future__ import annotations\n\nimport functools\nimport"
},
{
"path": "mypy/fixup.py",
"chars": 16160,
"preview": "\"\"\"Fix up various things after deserialization.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Any, Final\n\nf"
},
{
"path": "mypy/freetree.py",
"chars": 617,
"preview": "\"\"\"Generic node traverser visitor\"\"\"\n\nfrom __future__ import annotations\n\nfrom mypy.nodes import Block, MypyFile\nfrom my"
},
{
"path": "mypy/fscache.py",
"chars": 10975,
"preview": "\"\"\"Interface for accessing the file system with automatic caching.\n\nThe idea is to cache the results of any file system "
},
{
"path": "mypy/fswatcher.py",
"chars": 3985,
"preview": "\"\"\"Watch parts of the file system for changes.\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nfrom collections.abc im"
},
{
"path": "mypy/gclogger.py",
"chars": 1639,
"preview": "from __future__ import annotations\n\nimport gc\nimport time\nfrom collections.abc import Mapping\n\n\nclass GcLogger:\n \"\"\"C"
},
{
"path": "mypy/git.py",
"chars": 980,
"preview": "\"\"\"Git utilities.\"\"\"\n\n# Used also from setup.py, so don't pull in anything additional here (like mypy or typing):\nfrom _"
},
{
"path": "mypy/graph_utils.py",
"chars": 3446,
"preview": "\"\"\"Helpers for manipulations with graphs.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Iterable, "
},
{
"path": "mypy/indirection.py",
"chars": 4809,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Iterable\n\nimport mypy.types as types\nfrom mypy.types imp"
},
{
"path": "mypy/infer.py",
"chars": 2538,
"preview": "\"\"\"Utilities for type argument inference.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Sequence\nf"
},
{
"path": "mypy/inspections.py",
"chars": 23805,
"preview": "from __future__ import annotations\n\nimport os\nfrom collections import defaultdict\nfrom functools import cmp_to_key\nfrom "
},
{
"path": "mypy/ipc.py",
"chars": 11701,
"preview": "\"\"\"Cross platform abstractions for inter-process communication\n\nOn Unix, this uses AF_UNIX sockets.\nOn Windows, this use"
},
{
"path": "mypy/join.py",
"chars": 40020,
"preview": "\"\"\"Calculation of the least upper bound types (joins).\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc impo"
},
{
"path": "mypy/literals.py",
"chars": 8769,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Iterable\nfrom typing import Any, Final, Optional\nfrom ty"
},
{
"path": "mypy/lookup.py",
"chars": 2054,
"preview": "\"\"\"\nThis is a module for various lookup functions:\nfunctions that will find a semantic node by its name.\n\"\"\"\n\nfrom __fut"
},
{
"path": "mypy/main.py",
"chars": 64541,
"preview": "\"\"\"Mypy type checker command line tool.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport os\nimport subproc"
},
{
"path": "mypy/maptype.py",
"chars": 4327,
"preview": "from __future__ import annotations\n\nfrom mypy.expandtype import expand_type_by_instance\nfrom mypy.nodes import TypeInfo\n"
},
{
"path": "mypy/meet.py",
"chars": 52457,
"preview": "from __future__ import annotations\n\nfrom typing import Callable\n\nimport mypy.options\nfrom mypy import join\nfrom mypy.era"
},
{
"path": "mypy/memprofile.py",
"chars": 4183,
"preview": "\"\"\"Utility for dumping memory usage stats.\n\nThis is tailored to mypy and knows (a little) about which list objects are\no"
},
{
"path": "mypy/message_registry.py",
"chars": 17781,
"preview": "\"\"\"Message constants for generating error messages during type checking.\n\nLiteral messages should be defined as constant"
},
{
"path": "mypy/messages.py",
"chars": 137315,
"preview": "\"\"\"Facilities for generating error messages during type checking.\n\nDon't add any non-trivial message construction logic "
},
{
"path": "mypy/metastore.py",
"chars": 6598,
"preview": "\"\"\"Interfaces for accessing metadata.\n\nWe provide two implementations.\n * The \"classic\" file system implementation, whic"
},
{
"path": "mypy/mixedtraverser.py",
"chars": 3587,
"preview": "from __future__ import annotations\n\nfrom mypy.nodes import (\n AssertTypeExpr,\n AssignmentStmt,\n CastExpr,\n C"
},
{
"path": "mypy/modulefinder.py",
"chars": 40251,
"preview": "\"\"\"Low-level infrastructure to find modules.\n\nThis builds on fscache.py; find_sources.py builds on top of this.\n\"\"\"\n\nfro"
},
{
"path": "mypy/moduleinspect.py",
"chars": 6357,
"preview": "\"\"\"Basic introspection of modules.\"\"\"\n\nfrom __future__ import annotations\n\nimport importlib\nimport inspect\nimport os\nimp"
},
{
"path": "mypy/mro.py",
"chars": 1993,
"preview": "from __future__ import annotations\n\nfrom typing import Callable\n\nfrom mypy.nodes import TypeInfo\nfrom mypy.types import "
},
{
"path": "mypy/nodes.py",
"chars": 139490,
"preview": "\"\"\"Abstract syntax tree node classes (i.e. parse tree).\"\"\"\n\nfrom __future__ import annotations\n\nimport os\nfrom abc impor"
},
{
"path": "mypy/operators.py",
"chars": 2866,
"preview": "\"\"\"Information about Python operators\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import Final\n\n# Map from binar"
},
{
"path": "mypy/options.py",
"chars": 27201,
"preview": "from __future__ import annotations\n\nimport pprint\nimport re\nimport sys\nimport sysconfig\nfrom collections.abc import Mapp"
},
{
"path": "mypy/parse.py",
"chars": 913,
"preview": "from __future__ import annotations\n\nfrom mypy.errors import Errors\nfrom mypy.nodes import MypyFile\nfrom mypy.options imp"
},
{
"path": "mypy/partially_defined.py",
"chars": 25562,
"preview": "from __future__ import annotations\n\nfrom enum import Enum\n\nfrom mypy import checker, errorcodes\nfrom mypy.messages impor"
},
{
"path": "mypy/patterns.py",
"chars": 4048,
"preview": "\"\"\"Classes for representing match statement patterns.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TypeVar"
},
{
"path": "mypy/plugin.py",
"chars": 35373,
"preview": "\"\"\"Plugin system for extending mypy.\n\nAt large scale the plugin system works as following:\n\n* Plugins are collected from"
},
{
"path": "mypy/plugins/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "mypy/plugins/attrs.py",
"chars": 46555,
"preview": "\"\"\"Plugin for supporting the attrs library (http://www.attrs.org)\"\"\"\n\nfrom __future__ import annotations\n\nfrom collectio"
},
{
"path": "mypy/plugins/common.py",
"chars": 14110,
"preview": "from __future__ import annotations\n\nfrom typing import NamedTuple\n\nfrom mypy.argmap import map_actuals_to_formals\nfrom m"
},
{
"path": "mypy/plugins/ctypes.py",
"chars": 10675,
"preview": "\"\"\"Plugin to provide accurate types for some parts of the ctypes module.\"\"\"\n\nfrom __future__ import annotations\n\n# Fully"
},
{
"path": "mypy/plugins/dataclasses.py",
"chars": 46920,
"preview": "\"\"\"Plugin that provides support for dataclasses.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Ite"
},
{
"path": "mypy/plugins/default.py",
"chars": 23855,
"preview": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import Callable, Final\n\nimport mypy.errorc"
},
{
"path": "mypy/plugins/enums.py",
"chars": 11366,
"preview": "\"\"\"\nThis file contains a variety of plugins for refining how mypy infers types of\nexpressions involving Enums.\n\nCurrentl"
},
{
"path": "mypy/plugins/functools.py",
"chars": 14897,
"preview": "\"\"\"Plugin for supporting the functools standard library module.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing impo"
},
{
"path": "mypy/plugins/proper_plugin.py",
"chars": 6481,
"preview": "\"\"\"\nThis plugin is helpful for mypy development itself.\nBy default, it is not enabled for mypy users.\n\nIt also can be us"
},
{
"path": "mypy/plugins/re.py",
"chars": 14820,
"preview": "\"\"\"Plugin to provide accurate types for regex patterns.\"\"\"\n\nfrom __future__ import annotations\n\nimport re\nfrom functools"
},
{
"path": "mypy/plugins/singledispatch.py",
"chars": 8473,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Sequence\nfrom typing import Final, NamedTuple, TypeVar, "
},
{
"path": "mypy/py.typed",
"chars": 64,
"preview": "# Marker file for PEP 561. The mypy package uses inline types.\n"
},
{
"path": "mypy/pyinfo.py",
"chars": 3049,
"preview": "from __future__ import annotations\n\n\"\"\"Utilities to find the site and prefix information of a Python executable.\n\nThis f"
},
{
"path": "mypy/reachability.py",
"chars": 12941,
"preview": "\"\"\"Utilities related to determining the reachability of code (in semantic analysis).\"\"\"\n\nfrom __future__ import annotati"
},
{
"path": "mypy/refinfo.py",
"chars": 2784,
"preview": "\"\"\"Find line-level reference information from a mypy AST (undocumented feature)\"\"\"\n\nfrom __future__ import annotations\n\n"
},
{
"path": "mypy/renaming.py",
"chars": 19937,
"preview": "from __future__ import annotations\n\nfrom collections.abc import Iterator\nfrom contextlib import contextmanager\nfrom typi"
},
{
"path": "mypy/report.py",
"chars": 34495,
"preview": "\"\"\"Classes for producing HTML reports about imprecision.\"\"\"\n\nfrom __future__ import annotations\n\nimport collections\nimpo"
},
{
"path": "mypy/scope.py",
"chars": 4278,
"preview": "\"\"\"Track current scope to easily calculate the corresponding fine-grained target.\n\nTODO: Use everywhere where we track t"
},
{
"path": "mypy/semanal.py",
"chars": 349966,
"preview": "\"\"\"The semantic analyzer.\n\nBind names to definitions and do various other simple consistency\nchecks. Populate symbol ta"
},
{
"path": "mypy/semanal_classprop.py",
"chars": 7697,
"preview": "\"\"\"Calculate some properties of classes.\n\nThese happen after semantic analysis and before type checking.\n\"\"\"\n\nfrom __fut"
},
{
"path": "mypy/semanal_enum.py",
"chars": 10242,
"preview": "\"\"\"Semantic analysis of call-based Enum definitions.\n\nThis is conceptually part of mypy.semanal (semantic analyzer pass "
},
{
"path": "mypy/semanal_infer.py",
"chars": 5178,
"preview": "\"\"\"Simple type inference for decorated functions during semantic analysis.\"\"\"\n\nfrom __future__ import annotations\n\nfrom "
},
{
"path": "mypy/semanal_main.py",
"chars": 20508,
"preview": "\"\"\"Top-level logic for the semantic analyzer.\n\nThe semantic analyzer binds names, resolves imports, detects various\nspec"
},
{
"path": "mypy/semanal_namedtuple.py",
"chars": 31093,
"preview": "\"\"\"Semantic analysis of named tuple definitions.\n\nThis is conceptually part of mypy.semanal.\n\"\"\"\n\nfrom __future__ import"
},
{
"path": "mypy/semanal_newtype.py",
"chars": 10881,
"preview": "\"\"\"Semantic analysis of NewType definitions.\n\nThis is conceptually part of mypy.semanal (semantic analyzer pass 2).\n\"\"\"\n"
},
{
"path": "mypy/semanal_pass1.py",
"chars": 5439,
"preview": "\"\"\"Block/import reachability analysis.\"\"\"\n\nfrom __future__ import annotations\n\nfrom mypy.nodes import (\n AssertStmt,\n"
}
]
// ... and 1470 more files (download for full content)
About this extraction
This page contains the full source code of the KotlinIsland/basedmypy GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1670 files (15.8 MB), approximately 4.2M tokens, and a symbol index with 31050 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.