python/mypy
View on GitHub ↗ ★ 20,715 Python
Optional static typing for Python
96 mentions on Hacker News by 81 people: 8 stories, 88 comments · first 2013-07-08 · latest 2026-03-17
20082026
-
black (the python auto formatter) uses mypyc https://github.com/python/mypy/tree/master/mypyc
comment by Recursing · 2020-10-12 · in I Tried to Reduce Pylint Memory Usage -
…by using Cython to selectively optimize code There is also mypyc [0] coming up on the horizon. https://github.com/python/mypy/tree/master/mypyc
comment by Rotareti · 2020-10-11 · in CSV Reader Benchmarks: Julia Reads CSVs 10-20x Faster than Python and R -
…is not an easy read. [1]: https://coconut.readthedocs.io/en/master/FAQ.html#does-cocon... [2]: https://github.com/python/mypy/blob/master/mypy/typeanal.py
comment by ben509 · 2020-09-22 · in Haskell language features and standard libraries in pure Python -
Have you look at mypyc? https://github.com/python/mypy Its a compiler that support subset of python and mypy's team including Guido work on it. It would be great if this kind of efforts have been done on more realistic project.
comment by h8hawk · 2020-08-24 · in Show HN: Mys – an attempt to create a statically typed Python-like language -
And at mypyc https://github.com/python/mypy/tree/master/mypyc
comment by viraptor · 2020-08-24 · in Show HN: Mys – an attempt to create a statically typed Python-like language -
you don't have to https://github.com/python/mypy/pull/5677
comment by ghostwriter · 2020-08-16 · in Nim – Python-like statically-typed compiled language -
…with [1], and then contribute it to [2]. Automatic stub generation may also be helpful [3] [1] https://github.com/python/mypy/wiki/Creating-Stubs-For-Pytho... [2] https://github.com/python/typeshed [3]…
comment by ghostwriter · 2020-06-19 · in Practical Python Programming -
…checks at the very least. They do work on enums and discriminated unions. They should document it: https://github.com/python/mypy/issues/6366 https://github.com/python/mypy/issues/5818
comment by silviogutierrez · 2020-06-06 · in Using Enumerated Types in Python -
eventually there may be... https://github.com/python/mypy/tree/master/mypyc
comment by anentropic · 2020-02-12 · in Applying Mypy to real-world projects -
…found 4 errors that I didn't notice before. The first result in Google for this error points here https://github.com/python/mypy/issues/3905 which explains the issue. I'm ashamed to say I probably just read the first reply, added it to my…
comment by jesseryoung · 2020-02-11 · in Applying Mypy to real-world projects -
You should check out mypyc https://github.com/python/mypy/tree/master/mypyc and this new recent issue that mentions targeting LLVM or other targets https://github.com/python/mypy/issues/8373 https://github.com/mypyc/mypyc/issues/709
comment by m_ke · 2020-02-09 · in Wrestling Python into LLVM Intermediate Representation (2019) [video] -
…of python that is jitted or compiled at some point in the next few years. Edit: Oh also mypyc https://github.com/python/mypy/tree/master/mypyc
comment by m_ke · 2019-12-28 · in Python Type Hints -
…a work in progress though[1] and people in the ticket provided some workarounds[2][3] for now. [1] https://github.com/python/mypy/issues/731 [2] https://github.com/python/mypy/issues/731#issuecomment-53990... [3]…
comment by takeda · 2019-12-27 · in I love coding in C -
…in the future. might be possible to emulate some use cases with Literal Types. tracking issue: https://github.com/python/mypy/issues/5206
comment by uryga · 2019-12-08 · in Statically-typed error handling in Python using Mypy -
I was surprised to find out that MyPy will throw an error if you use a variable to access a key ( https://github.com/python/mypy/issues/7178 ). Optional keys are also a nuisance.
comment by avremel · 2019-12-08 · in Statically-typed error handling in Python using Mypy -
…via mypy [3], which from my experience works similar well as TypeScript works for JavaScript. [3]: https://github.com/python/mypy
comment by Rotareti · 2019-11-29 · in My 2019 programming language hierarchy -
https://github.com/python/mypy/tree/master/mypyc This may interest you. This is probably going to be the 'official' way to get what you're talking about.
comment by staticassertion · 2019-10-20 · in Python at Scale: Strict Modules -
There is https://github.com/python/mypy/tree/master/mypyc that I think is a great idea and approach
comment by bratao · 2019-10-20 · in Python at Scale: Strict Modules -
…like an option to "compile" python to check for typing inconsistencies You can use mypy for that: https://github.com/python/mypy
comment by Rotareti · 2019-10-15 · in What’s New in Python 3.8 -
…mypy [0] (statically typing with editor support for VSCode) - pylint [5] or flake8 [6] (linter) [0] https://github.com/python/mypy [1] https://docs.python.org/3/library/dataclasses.html#module-da... [2]…
comment by Rotareti · 2019-09-19 · in Python Is Eating the World -
…typing - there are sometimes false positives and false negatives - but I find it helpful. [1] https://github.com/python/mypy [2] https://github.com/facebook/pyre-check [3] https://github.com/microsoft/pyright [4]…
comment by meowface · 2019-09-16 · in The boring technology behind a one-person Internet company (2018) -
…front, if not for type safety alone. Luckily, you don't have to choose between those two outcomes: https://github.com/python/mypy
comment by timothycrosley · 2019-09-03 · in Go 1.13 Release Notes -
…in Python: you can't properly annotate a function to accept anything iterable except string. https://github.com/python/mypy/issues/4334 is a FR to at least check it with mypy.
comment by yegle · 2019-08-12 · in Python Is Eating the World -
…= Union[str, List['Foo']]`. [0] https://github.com/python/cpython/blob/3.8/Lib/typing.py#L15... [1] https://github.com/python/mypy/issues/731 [2] https://github.com/python/mypy/issues/6204
comment by neuland · 2019-06-12 · in A Failed Experiment with Python Type Annotations -
…more recognition. The same guys working on mypyc [1], which I think is very interesting too. [0]: https://github.com/python/mypy/graphs/contributors [1]: https://github.com/mypyc/mypyc
comment by Rotareti · 2019-03-24 · in On Learning Rust and Go: Migrating Away from Python -
Don't forget the one from Dropbox: * https://github.com/python/mypy
comment by Rotareti · 2019-03-24 · in Pyright: Static type checker for Python -
…far the most important feature of Python3. It's a godsend for larger/complicated code bases. [1]: https://github.com/python/mypy
comment by Rotareti · 2018-12-22 · in Python 3: Ten years later -
And also that the second highest contributor is Guido van Rossum ( https://github.com/python/mypy/graphs/contributors ).
comment by milliams · 2018-03-19 · in Exercises in Programming Style -
…type system with features such as type inference, gradual typing, generics and union types. https://github.com/python/mypy/blob/272d0c4c50918a36b57e7c0c... The section on gradual typing in PEP 483 seems consistent with this as well.…
comment by tedmiston · 2017-10-29 · in The Ergonomics of Type Checking (2016) -
…for some reason it's mentioned as PEP 512 but links to the same page you mentioned. [1] https://github.com/python/mypy/pull/2761
comment by alphast0rm · 2017-09-28 · in Setup.cfg – a solution to python config file soup? -
…it's nice to see such a civilised, courteous dialog between the submitter and maintainers ( https://github.com/python/mypy/pull/2761 ). I can imagine (and have previously seen) many similar dialogs break down and resort to less errm...…
comment by JosephRedfern · 2017-09-28 · in Setup.cfg – a solution to python config file soup? -
…creator of Python is working at Dropbox and currently on a project to add static typing to it… ( https://github.com/python/mypy/commits/master because I know the pain of linkless comments)
comment by minitech · 2017-06-30 · in Why We Chose Typescript -
…SQL ORM. There's a pull request for mypy protocols which moves further toward structural subtyping: https://github.com/python/mypy/pull/3132
comment by jcrben · 2017-06-20 · in Why Python Is Not My Favorite Language (2016) -
…work on that is discussed here. I would love a dropbox google colab (though also targeting 3.x :) ) https://github.com/python/mypy/issues/1862
comment by statsmatscats · 2017-01-04 · in Grumpy: Go running Python -
…(to check for __add__ and __radd__) may not take a whole lot of work, see `SupportsInt`: https://github.com/python/mypy/blob/d7f6ea617317103534d86686... http://mypy.readthedocs.io/en/latest/class_basics.html?highl...
comment by prawks · 2016-10-14 · in Static types in Python -
For python what does this do? https://github.com/python/mypy/blob/master/mypy/stubgen.py
comment by brianwawok · 2016-06-14 · in Measuring Polymorphism in Python Programs [pdf] -
…system. What are you talking about? MyPy has supported generics since before the 0.1 release: https://github.com/python/mypy/blob/v0.1.0/docs/source/gener...
comment by masklinn · 2016-05-06 · in Typed Python: new Mypy release -
https://github.com/JukkaL/mypy is the/one implementation of a static checker that conforms to PEP 484. (Naturally, as far as I know, JukkaL with mypy almost singlehandedly inspired the PEP.)
comment by pas · 2015-05-23 · in PEP 0484 – Type Hints is accepted