Python DX
Hey guys! I recently had to code python service and noticed that DX is extremely poor compared to something like Typescript. The question is, what are the best tools to improve python DX (transpilers, type hints, etc.)?
15 Replies
I've found if you're using static types in python and vscode/neovim, pyright is pretty nice in getting some good type validation. If you need something that can run python and check the types, mypy works too.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
In addition to what has already been said, using PyCharm instead of VSCode helps also
For autoformatting id recommend Black
Thanks! The biggest problem still is with 3rd party libraries. Most of them are not typed, and I assume there is nothing to do about that 😦
why so?
i actually switched from pycharm to vscode when i was learning python
i think they're both very capable
imo for a large codebase its not even close
pycharm does a lot of 'code intelligence' stuff that helps mitigate the lack of a real type system
maybe i didnt find the right vscode addon setup
hmm i don't know
but vscode never felt like a "complete" tool for me when using python, the way it does with typescript
from what i know it just runs the lsp lol
its been a while since i had to touch python at work so i dont remember most of the specifics
one thing that comes to mind is you can connect pycharm to a database, it will read the schema and then when you have a query it knows the types
the double-shift search is better for some stuff than vscode's cmd+shift+f
the "show me everywhere this is used" is better
imo for large (low quality) codebases in non typesafe languages jetbrains is the only way to not lose your sanity
but also maybe python has gotten better in vscode, i havent tried it in like 2 years
so i might be wrong about all of this lol
yeah thats a really nice feature all jetbrains ides have
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
there are type stubs that exist that you can point your typechecker (or LSP) at to verify them
or you can even write them yourself
Really makes you greatful for how many libraries support typescript in the js-ecosystem
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View