It serves my need, which is to ensure I haven't done mistakes in specifying parameters to functions.
I have no desire making Python to be statically-typed.
51–60 of 83 posts
It serves my need, which is to ensure I haven't done mistakes in specifying parameters to functions.
I have no desire making Python to be statically-typed.
Earlier quoted context omitted.
Better than Pycharm?
Kind of hard to say. With pylance the type checking will be definitively better in vscode. But pycharm had a lot going on to make up for it. Just as a reference I use pycharm mainly but before sending a PR I will rely on vscode to fix typing issues. Just use what you likes best.
Playing around with Ruff nowadays.
mypy was proposed early during aiosmtpd development but we decided it's not worth the headache.
My experience is pretty negative with all of them, I would be almost more tempted to ignore type checking in Python until it has drastically improved. In particular, if you're experienced with Typescript, you're probably going to be very disappointed when trying to do similar things in Python. The most recent one I've tried was Pyright. Pyright is faster than Mypy, and can also be configured to be quite strict, both…
i've often thought a more interesting approach for python's duck typing would be if the interpreter looked for anomalous types on assignment. so build a compact distribution of type "shape" for every assignment and then either throw exceptions or log warnings when apparent outliers are encountered.
The recent takeover of rye by the guys doing ruff[1] has some likelihood of rendering the python typing and packaging scene into something more coherent. Having the tool get started with Ronacher, of Flask fame, gives it some mindshare among those paying attention. It would be better still if the PSF were endorsing, but that gets too political, I suppose. [1] https://astral.sh/blog/uv
Ruff is great, though. I now stop using flake8+black+isort and have gone all-in with Ruff.
My experience is pretty negative with all of them, I would be almost more tempted to ignore type checking in Python until it has drastically improved. In particular, if you're experienced with Typescript, you're probably going to be very disappointed when trying to do similar things in Python. The most recent one I've tried was Pyright. Pyright is faster than Mypy, and can also be configured to be quite strict, both…
Very good points. Did you also tried ignoring some rules that are overly strict? Or reduce them to warnings?
Would also be interested in what is friendly with Django. Using VSCode + the Python extension, the default checker (Pylance?) just pukes on the ORM magic.
My experience is pretty negative with all of them, I would be almost more tempted to ignore type checking in Python until it has drastically improved. In particular, if you're experienced with Typescript, you're probably going to be very disappointed when trying to do similar things in Python. The most recent one I've tried was Pyright. Pyright is faster than Mypy, and can also be configured to be quite strict, both…
i've often thought a more interesting approach for python's duck typing would be if the interpreter looked for anomalous types on assignment. so build a compact distribution of type "shape" for every assignment and then either throw exceptions or log warnings when apparent outliers are encountered.
(eclipse+pydev - for the IDE part) + mypy (better dmypy for performance) + ruff (both as linter and as formatter) is the way I go. an in my pyproject I set the strict mode for mypy, and almost all rules for rust with extend-select
Why eclipse and pydev? It is a lot slower than vs code
My experience is pretty negative with all of them, I would be almost more tempted to ignore type checking in Python until it has drastically improved. In particular, if you're experienced with Typescript, you're probably going to be very disappointed when trying to do similar things in Python. The most recent one I've tried was Pyright. Pyright is faster than Mypy, and can also be configured to be quite strict, both…
So mypy for me.