python/typeshed
View on GitHub ↗ ★ 5,147 Python
Collection of library stubs for Python, with static types
22 mentions on Hacker News by 21 people: 1 story, 21 comments · first 2016-08-11 · latest 2025-10-14
20082026
-
> You can take a look yourself if you think some of them are wrong: https://github.com/python/typeshed/tree/main/stdlib/asyncio Hmm. Presumably mypy and pyrefly use the same ones, but then I don't understand why pyrefly is complaining and…
comment by eqvinox · 2025-10-14 · in Pyrefly: Python type checker and language server in Rust -
The standard library does not directly include type hints, they are stored in typeshed: https://github.com/python/typeshed You can take a look yourself if you think some of them are wrong: https://github.com/python/typeshed/tree/main/stdlib…
comment by notatallshaw · 2025-10-14 · in Pyrefly: Python type checker and language server in Rust -
…$(pip install typeshed) -- I learned that you were even more incorrect - it accepts bytes, too https://github.com/python/typeshed/blob/9430260770b627c04313... Anyway, they also go out of their way to say "don't install typeshed" and I…
comment by mdaniel · 2025-05-17 · in Pyrefly: A new type checker and IDE experience for Python -
…(= Erg's type system) has its own type declarations for the Python standard APIs I wonder why https://github.com/python/typeshed could not be used
comment by kodablah · 2024-04-13 · in Pylyzer – A fast static code analyzer and language server for Python -
https://github.com/python/typeshed is Python's equivalent of DefinitelyTyped. I'm not 100% sure why it's not more of a popular thing the way DefinitelyTyped is; I think there might, to some extent, be different attitudes around the…
comment by ameliaquining · 2023-02-26 · in Ask HN: Will we see a TypeScript for Python? -
…this, which is certainly an improvement over nothing, but still feels like technical debt. [1]: https://github.com/python/typeshed/blob/main/stdlib/typing.p...
comment by Slippery_John · 2023-01-17 · in Ruby 3.2’s YJIT is Production-Ready -
…time spelunking through the code and history to discover that it was an outdated option, sent a PR. https://github.com/python/typeshed/pull/8617 - I converted one of the scripts I use in my DE from shell to Python, saw that VSCode has this…
comment by Arnavion · 2022-11-10 · in GitHub stars won't pay your rent (2020) -
…typing and completions impossible: faker, FactoryBoy. [1] https://peps.python.org/pep-0692/ [2] https://github.com/python/typeshed/issues/8580 [3] https://github.com/pydantic/pydantic [4] https://peps.python.org/pep-0681/ [5]…
comment by tony · 2022-08-23 · in Using Mypy in Production -
https://github.com/python/typeshed also provides community maintained stub packages for packages that are lacking upstream type hints
comment by zhfliz · 2022-04-22 · in Python’s “type hints” are a bit of a disappointment to me -
…doesn't use type annotations, people will often create type stubs for it that mypy can consume. https://github.com/python/typeshed/tree/master/stubs TBH, Python generics are rather clunky, although I think they're probably still going to…
comment by EdwardDiego · 2021-11-05 · in On autoloading -
…on the line explaining why we needed a `type: ignore`, like so: * # type: ignore[type-var] # https://github.com/python/typeshed/issues/4234 * # type: ignore[attr-defined] # private member missing from stubs * # type: ignore[assignment] #…
comment by tabbott · 2021-10-18 · in Tests aren’t enough: Case study after adding type hints to urllib3 -
…are bugged, since type shed versions also get shipped (used to?) with new type checker versions. https://github.com/python/typeshed
comment by emptysea · 2021-04-15 · in Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] -
…noting though, that mypy supports stub files, so you can annotate a third party api yourself ( https://github.com/python/typeshed , https://github.com/google/pytype/tree/master/pytype/pytd/std... ), so even this claim is ultimately untrue.
comment by joshuamorton · 2020-10-06 · in Python 3.9 -
…you can't modify the underlying library (for example: it's written in C). There are tons of them: https://github.com/python/typeshed , but you can still add types to new code inline.
comment by joshuamorton · 2020-07-29 · in RBS, Ruby’s new type signature language -
…may also be helpful [3] [1] https://github.com/python/mypy/wiki/Creating-Stubs-For-Pytho... [2] https://github.com/python/typeshed [3] https://mypy.readthedocs.io/en/stable/stubgen.html
comment by ghostwriter · 2020-06-19 · in Practical Python Programming -
…types. Python has always been slow to add new syntax. I think that's a good thing overall. [1] https://github.com/python/typeshed/
comment by pseudalopex · 2019-01-16 · in Porting 30K lines of code from Flow to TypeScript -
Typeshed[1] identifies the types of all builtins for all current (2.7+) versions of python. [1] https://github.com/python/typeshed/
comment by ben509 · 2018-05-11 · in Pyre: Fast Type Checking for Python -
…the typing module, and relies on typeshed[1] to infer types for standard library functions. [1]: https://github.com/python/typeshed
comment by sinancepel · 2018-05-11 · in Pyre: Fast Type Checking for Python -
…the standard library and various popular third party libraries[1] to solve this very problem. [1] https://github.com/python/typeshed
comment by mcypher · 2017-12-14 · in Excel team considering Python as scripting language: asking for feedback -
…quickly increasing number of common dependencies, and is plugged into pycharm and mypy by default: https://github.com/python/typeshed
comment by gipp · 2017-10-02 · in Diminishing returns of static typing -
…syntax between PyContracts and the newer python type annotations which MyPy checks at compile-type. https://github.com/python/typeshed What does it mean for types to be "a first class member of" a programming language?
comment by westurner · 2017-05-02 · in Esoteric programming paradigms -
▲ 2
Typeshed: static types for the Python standard librarystory by danblick · 2016-08-11 · 1 comment