[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2456":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},2456,"mypy","python\u002Fmypy","python","Optional static typing for Python","https:\u002F\u002Fwww.mypy-lang.org\u002F",null,"Python",20472,3205,233,2681,0,1,12,63,6,45,"Other",false,"master",true,[27,7,28,29,30],"linter","typechecker","types","typing","2026-06-12 02:00:41","\u003Cimg src=\"docs\u002Fsource\u002Fmypy_light.svg\" alt=\"mypy logo\" width=\"300px\"\u002F>\n\nMypy: Static Typing for Python\n=======================================\n\n[![Stable Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmypy?color=blue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmypy\u002F)\n[![Downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fmypy)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fmypy)\n[![Build Status](https:\u002F\u002Fgithub.com\u002Fpython\u002Fmypy\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fpython\u002Fmypy\u002Factions)\n[![Documentation Status](https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fmypy\u002Fbadge\u002F?version=latest)](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n[![Chat at https:\u002F\u002Fgitter.im\u002Fpython\u002Ftyping](https:\u002F\u002Fbadges.gitter.im\u002Fpython\u002Ftyping.svg)](https:\u002F\u002Fgitter.im\u002Fpython\u002Ftyping?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Checked with mypy](https:\u002F\u002Fwww.mypy-lang.org\u002Fstatic\u002Fmypy_badge.svg)](https:\u002F\u002Fmypy-lang.org\u002F)\n[![Code style: black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\n[![Linting: Ruff](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https:\u002F\u002Fraw.githubusercontent.com\u002Fcharliermarsh\u002Fruff\u002Fmain\u002Fassets\u002Fbadge\u002Fv2.json)](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fruff)\n\nGot a question?\n---------------\n\nWe are always happy to answer questions! Here are some good places to ask them:\n\n- for general questions about Python typing, try [typing discussions](https:\u002F\u002Fgithub.com\u002Fpython\u002Ftyping\u002Fdiscussions)\n- for anything you're curious about, try [gitter chat](https:\u002F\u002Fgitter.im\u002Fpython\u002Ftyping)\n\nIf you're just getting started,\n[the documentation](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Findex.html)\nand [type hints cheat sheet](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Fcheat_sheet_py3.html)\ncan also help answer questions.\n\nIf you think you've found a bug:\n\n- check our [common issues page](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Fcommon_issues.html)\n- search our [issue tracker](https:\u002F\u002Fgithub.com\u002Fpython\u002Fmypy\u002Fissues) to see if\n  it's already been reported\n\nTo report a bug or request an enhancement:\n\n- report at [our issue tracker](https:\u002F\u002Fgithub.com\u002Fpython\u002Fmypy\u002Fissues)\n- if the issue is with a specific library or function, consider reporting it at\n  [typeshed tracker](https:\u002F\u002Fgithub.com\u002Fpython\u002Ftypeshed\u002Fissues) or the issue\n  tracker for that library\n\nTo discuss a new type system feature:\n\n- discuss at [discuss.python.org](https:\u002F\u002Fdiscuss.python.org\u002Fc\u002Ftyping\u002F32)\n- there is also some historical discussion at the [typing-sig mailing list](https:\u002F\u002Fmail.python.org\u002Farchives\u002Flist\u002Ftyping-sig@python.org\u002F) and the [python\u002Ftyping repo](https:\u002F\u002Fgithub.com\u002Fpython\u002Ftyping\u002Fissues)\n\nWhat is mypy?\n-------------\n\nMypy is a static type checker for Python.\n\nType checkers help ensure that you're using variables and functions in your code\ncorrectly. With mypy, add type hints ([PEP 484](https:\u002F\u002Fwww.python.org\u002Fdev\u002Fpeps\u002Fpep-0484\u002F))\nto your Python programs, and mypy will warn you when you use those types\nincorrectly.\n\nPython is a dynamic language, so usually you'll only see errors in your code\nwhen you attempt to run it. Mypy is a *static* checker, so it finds bugs\nin your programs without even running them!\n\nHere is a small example to whet your appetite:\n\n```python\nnumber = input(\"What is your favourite number?\")\nprint(\"It is\", number + 1)  # error: Unsupported operand types for + (\"str\" and \"int\")\n```\n\nAdding type hints for mypy does not interfere with the way your program would\notherwise run. Think of type hints as similar to comments! You can always use\nthe Python interpreter to run your code, even if mypy reports errors.\n\nMypy is designed with gradual typing in mind. This means you can add type\nhints to your code base slowly and that you can always fall back to dynamic\ntyping when static typing is not convenient.\n\nMypy has a powerful and easy-to-use type system, supporting features such as\ntype inference, generics, callable types, tuple types, union types,\nstructural subtyping and more. Using mypy will make your programs easier to\nunderstand, debug, and maintain.\n\nSee [the documentation](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Findex.html) for\nmore examples and information.\n\nIn particular, see:\n\n- [type hints cheat sheet](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Fcheat_sheet_py3.html)\n- [getting started](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Fgetting_started.html)\n- [list of error codes](https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Ferror_code_list.html)\n\nQuick start\n-----------\n\nMypy can be installed using pip:\n\n```bash\npython3 -m pip install -U mypy\n```\n\nIf you want to run the latest version of the code, you can install from the\nrepo directly:\n\n```bash\npython3 -m pip install -U git+https:\u002F\u002Fgithub.com\u002Fpython\u002Fmypy.git\n```\n\nNow you can type-check the [statically typed parts] of a program like this:\n\n```bash\nmypy PROGRAM\n```\n\nYou can always use the Python interpreter to run your statically typed\nprograms, even if mypy reports type errors:\n\n```bash\npython3 PROGRAM\n```\n\nIf you are working with large code bases, you can run mypy in\n[daemon mode], that will give much faster (often sub-second) incremental updates:\n\n```bash\ndmypy run -- PROGRAM\n```\n\nYou can also try mypy in an [online playground](https:\u002F\u002Fmypy-play.net\u002F) (developed by\nYusuke Miyazaki).\n\n[statically typed parts]: https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Flatest\u002Fgetting_started.html#function-signatures-and-dynamic-vs-static-typing\n[daemon mode]: https:\u002F\u002Fmypy.readthedocs.io\u002Fen\u002Fstable\u002Fmypy_daemon.html\n\nIntegrations\n------------\n\nMypy can be integrated into popular IDEs:\n\n- VS Code: provides [basic integration](https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Fpython\u002Flinting#_mypy) with mypy.\n- Vim:\n  - Using [Syntastic](https:\u002F\u002Fgithub.com\u002Fvim-syntastic\u002Fsyntastic): in `~\u002F.vimrc` add\n    `let g:syntastic_python_checkers=['mypy']`\n  - Using [ALE](https:\u002F\u002Fgithub.com\u002Fdense-analysis\u002Fale): should be enabled by default when `mypy` is installed,\n    or can be explicitly enabled by adding `let b:ale_linters = ['mypy']` in `~\u002Fvim\u002Fftplugin\u002Fpython.vim`\n- Emacs: using [Flycheck](https:\u002F\u002Fgithub.com\u002Fflycheck\u002F)\n- Sublime Text: [SublimeLinter-contrib-mypy](https:\u002F\u002Fgithub.com\u002Ffredcallaway\u002FSublimeLinter-contrib-mypy)\n- PyCharm: [mypy plugin](https:\u002F\u002Fgithub.com\u002Fdropbox\u002Fmypy-PyCharm-plugin)\n- IDLE: [idlemypyextension](https:\u002F\u002Fgithub.com\u002FCoolCat467\u002Fidlemypyextension)\n- pre-commit: use [pre-commit mirrors-mypy](https:\u002F\u002Fgithub.com\u002Fpre-commit\u002Fmirrors-mypy), although\n  note by default this will limit mypy's ability to analyse your third party dependencies.\n\nWeb site and documentation\n--------------------------\n\nAdditional information is available at the web site:\n\n  \u003Chttps:\u002F\u002Fwww.mypy-lang.org\u002F>\n\nJump straight to the documentation:\n\n  \u003Chttps:\u002F\u002Fmypy.readthedocs.io\u002F>\n\nFollow along our changelog at:\n\n  \u003Chttps:\u002F\u002Fmypy-lang.blogspot.com\u002F>\n\nContributing\n------------\n\nHelp in testing, development, documentation and other tasks is\nhighly appreciated and useful to the project. There are tasks for\ncontributors of all experience levels.\n\nTo get started with developing mypy, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\nMypyc and compiled version of mypy\n----------------------------------\n\n[Mypyc](https:\u002F\u002Fgithub.com\u002Fmypyc\u002Fmypyc) uses Python type hints to compile Python\nmodules to faster C extensions. Mypy is itself compiled using mypyc: this makes\nmypy approximately 4 times faster than if interpreted!\n\nTo install an interpreted mypy instead, use:\n\n```bash\npython3 -m pip install --no-binary mypy -U mypy\n```\n\nTo use a compiled version of a development\nversion of mypy, directly install a binary from\n\u003Chttps:\u002F\u002Fgithub.com\u002Fmypyc\u002Fmypy_mypyc-wheels\u002Freleases\u002Flatest>.\n\nTo contribute to the mypyc project, check out the issue tracker at \u003Chttps:\u002F\u002Fgithub.com\u002Fmypyc\u002Fmypyc>\n","mypy 是一个为 Python 代码提供可选静态类型检查的工具。它支持 PEP 484 标准下的类型注解，通过在代码中添加类型提示，mypy 能够在编译阶段发现潜在的类型错误，从而提高代码质量和可维护性。mypy 的核心功能包括类型推断、类型检查以及与现有 Python 项目的良好集成。适用于需要增强代码健壮性和减少运行时错误的各种开发场景，特别是在大型项目或团队协作中尤为有用。",2,"2026-06-11 02:50:00","top_language"]