Hacker GitHub

← All repos

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

Mentions per year 96 mentions · busiest year 2020 (17)
20082026
  1. The list should probably also include mypyc: https://github.com/python/mypy/tree/master/mypyc
    comment by willseth · 2020-10-21 · in Attempts to make Python fast
  2. You're basically talking about mypyc: https://github.com/python/mypy/tree/master/mypyc
  3. 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
  4. …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
  5. …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
  6. 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.
  7. And at mypyc https://github.com/python/mypy/tree/master/mypyc
  8. you don't have to https://github.com/python/mypy/pull/5677
  9. …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
  10. …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
  11. 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
  12. …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
  13. 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
  14. ▲ 1
    Mypyc: Mypy to Python C Extension Compiler
    story by duckerude · 2020-01-06 · 0 comments
  15. …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
  16. …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
  17. …in the future. might be possible to emulate some use cases with Literal Types. tracking issue: https://github.com/python/mypy/issues/5206
  18. 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.
  19. …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
  20. 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
  21. 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
  22. …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
  23. …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
  24. …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]…
  25. …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
  26. …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
  27. …= 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
  28. …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
  29. 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
  30. …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
  31. 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
  32. …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)
  33. …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
  34. …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...…
  35. …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
  36. …SQL ORM. There's a pull request for mypy protocols which moves further toward structural subtyping: https://github.com/python/mypy/pull/3132
  37. …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
  38. ▲ 3
    Dropbox mypy team considering static compilation for typed python
    story by statsmatscats · 2016-12-07 · 0 comments
  39. …(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
  40. For python what does this do? https://github.com/python/mypy/blob/master/mypy/stubgen.py
  41. …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
  42. ▲ 4
    Mypy: Optional static typing for Python
    story by ryannevius · 2016-03-02 · 1 comment
  43. 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
  44. ▲ 70
    Mypy – static type checking for Python 3
    story by HerrMonnezza · 2014-08-18 · 29 comments
  45. ▲ 1
    A Python variant with seamless dynamic and static typing
    story by hershel · 2014-05-18 · 0 comments
  46. ▲ 2
    Static type checking in Python
    story by reinhardt1053 · 2013-07-08 · 0 comments