{"id":16959632,"url":"https://github.com/pixelb/mypy-mypyc","last_synced_at":"2025-03-21T15:16:38.719Z","repository":{"id":148807312,"uuid":"241904314","full_name":"pixelb/mypy-mypyc","owner":"pixelb","description":"upstream with adjusted dependencies","archived":false,"fork":false,"pushed_at":"2020-02-24T14:43:56.000Z","size":1879,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T00:21:21.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixelb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-20T14:25:16.000Z","updated_at":"2021-03-25T07:02:04.000Z","dependencies_parsed_at":"2023-05-29T01:00:26.214Z","dependency_job_id":null,"html_url":"https://github.com/pixelb/mypy-mypyc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fmypy-mypyc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fmypy-mypyc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fmypy-mypyc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelb%2Fmypy-mypyc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelb","download_url":"https://codeload.github.com/pixelb/mypy-mypyc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244819800,"owners_count":20515646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T22:45:35.885Z","updated_at":"2025-03-21T15:16:38.673Z","avatar_url":"https://github.com/pixelb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"http://mypy-lang.org/static/mypy_light.svg\" alt=\"mypy logo\" width=\"300px\"/\u003e\n\nMypy: Optional Static Typing for Python\n=======================================\n\n[![Build Status](https://api.travis-ci.org/python/mypy.svg?branch=master)](https://travis-ci.org/python/mypy)\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n\n\nGot a question? Join us on Gitter!\n----------------------------------\n\nWe don't have a mailing list; but we are always happy to answer\nquestions on [gitter chat](https://gitter.im/python/typing).  If you are\nsure you've found a bug please search our issue trackers for a\nduplicate before filing a new issue:\n\n- [mypy tracker](https://github.com/python/mypy/issues)\n  for mypy issues\n- [typeshed tracker](https://github.com/python/typeshed/issues)\n  for issues with specific modules\n- [typing tracker](https://github.com/python/typing/issues)\n  for discussion of new type system features (PEP 484 changes) and\n  runtime bugs in the typing module\n\nWhat is mypy?\n-------------\n\nMypy is an optional static type checker for Python.  You can add type\nhints ([PEP 484](https://www.python.org/dev/peps/pep-0484/)) to your\nPython programs, and use mypy to type check them statically.\nFind bugs in your programs without even running them!\n\nYou can mix dynamic and static typing in your programs. You can always\nfall back to dynamic typing when static typing is not convenient, such\nas for legacy code.\n\nHere is a small example to whet your appetite (Python 3):\n\n```python\nfrom typing import Iterator\n\ndef fib(n: int) -\u003e Iterator[int]:\n    a, b = 0, 1\n    while a \u003c n:\n        yield a\n        a, b = b, a + b\n```\nSee [the documentation](http://mypy.readthedocs.io/en/stable/introduction.html) for more examples.\n\nFor Python 2.7, the standard annotations are written as comments:\n```python\ndef is_palindrome(s):\n    # type: (str) -\u003e bool\n    return s == s[::-1]\n```\n\nSee [the documentation for Python 2 support](http://mypy.readthedocs.io/en/latest/python2.html).\n\nMypy is in development; some features are missing and there are bugs.\nSee 'Development status' below.\n\nRequirements\n------------\n\nYou need Python 3.4 or later to run mypy.  You can have multiple Python\nversions (2.x and 3.x) installed on the same system without problems.\n\nIn Ubuntu, Mint and Debian you can install Python 3 like this:\n\n    $ sudo apt-get install python3 python3-pip\n\nFor other Linux flavors, OS X and Windows, packages are available at\n\n  http://www.python.org/getit/\n\n\nQuick start\n-----------\n\nMypy can be installed using pip:\n\n    $ python3 -m pip install -U mypy\n\nIf you want to run the latest version of the code, you can install from git:\n\n    $ python3 -m pip install -U git+git://github.com/python/mypy.git\n\n\nNow, if Python on your system is configured properly (else see\n\"Troubleshooting\" below), you can type-check the [statically typed parts] of a\nprogram like this:\n\n    $ mypy PROGRAM\n\nYou can always use a Python interpreter to run your statically typed\nprograms, even if they have type errors:\n\n    $ python3 PROGRAM\n\n[statically typed parts]: http://mypy.readthedocs.io/en/latest/basics.html#function-signatures\n\n\nIDE \u0026 Linter Integrations\n-------------------------\n\nMypy can be integrated into popular IDEs:\n\n* Vim: [vim-mypy](https://github.com/Integralist/vim-mypy)\n* Emacs: using [Flycheck](https://github.com/flycheck/) and [Flycheck-mypy](https://github.com/lbolla/emacs-flycheck-mypy)\n* Sublime Text: [SublimeLinter-contrib-mypy](https://github.com/fredcallaway/SublimeLinter-contrib-mypy)\n* Atom: [linter-mypy](https://atom.io/packages/linter-mypy)\n* PyCharm: [mypy plugin](https://github.com/dropbox/mypy-PyCharm-plugin) (PyCharm integrates [its own implementation of PEP 484](https://www.jetbrains.com/help/pycharm/type-hinting-in-product.html))\n* VS Code: provides [basic integration](https://code.visualstudio.com/docs/python/linting#_mypy) with mypy.\n\nMypy can also be integrated into [Flake8] using [flake8-mypy].\n\n[Flake8]: http://flake8.pycqa.org/\n[flake8-mypy]: https://github.com/ambv/flake8-mypy\n\n\nWeb site and documentation\n--------------------------\n\nDocumentation and additional information is available at the web site:\n\n  http://www.mypy-lang.org/\n\nOr you can jump straight to the documentation:\n\n  http://mypy.readthedocs.io/\n\n\nTroubleshooting\n---------------\n\nDepending on your configuration, you may have to run `pip` like\nthis:\n\n    $ python3 -m pip install -U mypy\n\nThis should automatically install the appropriate version of\nmypy's parser, typed-ast.  If for some reason it does not, you\ncan install it manually:\n\n    $ python3 -m pip install -U typed-ast\n\nIf the `mypy` command isn't found after installation: After\n`python3 -m pip install`, the `mypy` script and\ndependencies, including the `typing` module, will be installed to\nsystem-dependent locations.  Sometimes the script directory will not\nbe in `PATH`, and you have to add the target directory to `PATH`\nmanually or create a symbolic link to the script.  In particular, on\nMac OS X, the script may be installed under `/Library/Frameworks`:\n\n    /Library/Frameworks/Python.framework/Versions/\u003cversion\u003e/bin\n\nIn Windows, the script is generally installed in\n`\\PythonNN\\Scripts`. So, type check a program like this (replace\n`\\Python34` with your Python installation path):\n\n    C:\\\u003e\\Python34\\python \\Python34\\Scripts\\mypy PROGRAM\n\n### Working with `virtualenv`\n\nIf you are using [`virtualenv`](https://virtualenv.pypa.io/en/stable/),\nmake sure you are running a python3 environment. Installing via `pip3`\nin a v2 environment will not configure the environment to run installed\nmodules from the command line.\n\n    $ python3 -m pip install -U virtualenv\n    $ python3 -m virtualenv env\n\n\nQuick start for contributing to mypy\n------------------------------------\n\nIf you want to contribute, first clone the mypy git repository:\n\n    $ git clone --recurse-submodules https://github.com/python/mypy.git\n\nIf you've already cloned the repo without `--recurse-submodules`,\nyou need to pull in the typeshed repo as follows:\n\n    $ git submodule init\n    $ git submodule update\n\nEither way you should now have a subdirectory `typeshed` containing a\nclone of the typeshed repo (`https://github.com/python/typeshed`).\n\nFrom the mypy directory, use pip to install mypy:\n\n    $ cd mypy\n    $ python3 -m pip install -U .\n\nReplace `python3` with your Python 3 interpreter.  You may have to do\nthe above as root. For example, in Ubuntu:\n\n    $ sudo python3 -m pip install -U .\n\nNow you can use the `mypy` program just as above.  In case of trouble\nsee \"Troubleshooting\" above.\n\n\nWorking with the git version of mypy\n------------------------------------\n\nmypy contains a submodule, \"typeshed\". See http://github.com/python/typeshed.\nThis submodule contains types for the Python standard library.\n\nDue to the way git submodules work, you'll have to do\n```\n  git submodule update typeshed\n```\nwhenever you change branches, merge, rebase, or pull.\n\n(It's possible to automate this: Search Google for \"git hook update submodule\")\n\n\nTests\n-----\n\nThe basic way to run tests:\n\n    $ pip3 install -r test-requirements.txt\n    $ ./runtests.py\n\nFor more on the tests, see [Test README.md](test-data/unit/README.md)\n\n\nDevelopment status\n------------------\n\nMypy is alpha software, but it has already been used in production\nfor well over a year at Dropbox, and it has an extensive test suite.\n\nSee [the roadmap](ROADMAP.md) if you are interested in plans for the\nfuture.\n\n\nIssue tracker\n-------------\n\nPlease report any bugs and enhancement ideas using the mypy issue\ntracker:\n\n  https://github.com/python/mypy/issues\n\nFeel free to also ask questions on the tracker.\n\n\nmypy_mypyc\n----------\n\nWe have built an experimental compiled version of mypy using the\n[mypyc compiler](https://github.com/mypyc/mypyc) for mypy-annotated\nPython code. It is approximately 4 times faster than interpreted mypy.\n\nIf you wish to test out the compiled version of mypy, and are running\nOS X or Linux, you can directly install a binary from\nhttps://github.com/mypyc/mypy_mypyc-wheels/releases/latest.\n\nCompiled mypy packages on PyPI are Coming Soon.\n\n\nHelp wanted\n-----------\n\nAny help in testing, development, documentation and other tasks is\nhighly appreciated and useful to the project. There are tasks for\ncontributors of all experience levels. If you're just getting started,\nask on the [gitter chat](https://gitter.im/python/typing) for ideas of good\nbeginner issues.\n\nFor more details, see the file [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\nLicense\n-------\n\nMypy is licensed under the terms of the MIT License (see the file\nLICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelb%2Fmypy-mypyc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelb%2Fmypy-mypyc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelb%2Fmypy-mypyc/lists"}