If you use #mypy, make sure you're on latest. In the last year, mypy has gotten >1.8x faster and has learnt many new tricks
@itamarst At least release announcements on https://mypy-lang.blogspot.com/ used to be useful for packaging, now I have to run it through AI to make it at least a bit comprehensible.
#MyPy #Python
I just … just … who in the world reads these #Mypy Release Notes https://mypy.readthedocs.io/en/stable/changelog.html ? It has 775 lines! Without any deep study it is on average 10 minutes of just reading. Apparently this monster is so big that even Mypy developers are not able to distil it into […]
Vercel Just Proposed a TypeScript-Inspired Upgrade to Python's Type System
techlife.blog/posts/vercel...
#Python #TypeScript #PEP827 #Vercel #Typing #FastAPI #Pydantic #Mypy
Is there any way linter/type checker for #Python that can find expressions that never will evaluate to anything other than False based on the type information? E.g. checking if a variable of the type `int` exists within a list of the type `liststr]`? I do use [#mypy but it doesn't seem to catch […]
With high-performance #Python type checkers like #Pyright, #Pyrefly, and #ty now available, what's the value proposition of #Mypy? Is it the reference implementation? Or does Mypy still have the most features? I'm not trying to knock Mypy, I'm genuinely asking because I don't know.
The results of the 2025 Python Typing Survey are in!
📈 86% of developers rely on type hints regularly
🛠️ #Mypy, #Pyright / #Pylance, and #Pydantic are the most used type-checking tools
✨ Top benefits: better IDE support, bug prevention, and documentation
Find more stats in this thread ⬇️
I've leveraged Antigravity and the Claude and Gemini models to create a #mypy plugin to signal a function as free of side-effects. The development has been much faster! Check it out!
github.com/diegojromero...
Mixed feelings about typing everything and using mypy. It finds alot of possible bugs and problems, but it takes the lightness out of my programming.
#python #pythondev #mypy
Automatically generated documentation
have you ever annotated a TypedDict onto the **kwargs fuction and want Sphinx to automatically add it to the function's docstring?
class GreetingKwargs(TypedDict):
name: Annotated[str, Doc("the name of the person to greet")]
def greet(**kwargs […]
[Original post on scholar.social]
Most of us already got used to annotate our #python code with typehints. If I had to guess, I would say that most people are using #mypy for checking the types.
Did you know that other checkers have emerged these days?
I’m busy re-applying this “gradual import” technique on a client project today. Will slowly get them up to a full django-stubs installation.
#Python #MyPy
adamj.eu/tech/2022/08...
Been playing with Wagtail CMS, tutorials are super nice to follow. But I got to the point where I decided to add #mypy to the project and had to go through and figure out the #TypeAnnotaions for the functions. Anyone else wish #Python projects had type annotations in their docs?
#MyPy + #Pydantic is fucking awesome. It's like TypeScript but nicer. Cannot wait for my dependencies to let me upgrade from 3.10 so I can enjoy even more tomfoolery
If you're using #Python without it, esp. for science, you're missing out!
Hey all! Excited to re-introduce myself. I'm Emma. I like to talk about:
- #python 🐍
- #rust 🦀
- #types 🌯
- #packaging 📦
- #webassembly 🌐
- #quantum computing ⚛️
I'm an emeritus core developer on the #mypy project (still happy to answer questions!), and I contribute to CPython from time to time.
When you add #mypy typing to a #python function, you lose the monkey from the signature, so use the emoji one.
`def do_it():`
becomes
`def do_it()->None: # 🐵`
Sim, tou usando #mypy ... valews pelos improvements ai mano!
If you want to disable multiple error codes in single line comment for entire file, using mypy, here's how:
```
# mypy: disable-error-code="override,misc"
```
#python #mypy
Uncompiled development version
Compiled mypy
TIL: mypy is compiled by default with mypyc, for incredible (almost 3x) speed boost.
#python #mypy
Types at the edges in #Python with #mypy and #pydantic blog.meadsteve.dev/programming/2020/02/10/t...
I don't know why, but adding #mypy type hints to an existing mid-side project was some of the most fun I've had while doing #Python refactoring. There's a magical point on the coverage curve where suddenly everything clicks into place and "just works". 1/3
How Mypy could simplify compiling Python http://lnk.al/3m5F via @infoworld #Mypy #Python
Basically, #mypy was nicked from http://www.squarepie.co.uk/Pies right? pie in a box? been done before.