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
shineslove
shineslove•2y ago
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
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
cje
cje•2y ago
In addition to what has already been said, using PyCharm instead of VSCode helps also For autoformatting id recommend Black
gsemyong
gsemyong•2y ago
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 😦
nexxel
nexxel•2y ago
why so? i actually switched from pycharm to vscode when i was learning python i think they're both very capable
cje
cje•2y ago
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
nexxel
nexxel•2y ago
hmm i don't know
cje
cje•2y ago
but vscode never felt like a "complete" tool for me when using python, the way it does with typescript
nexxel
nexxel•2y ago
from what i know it just runs the lsp lol
cje
cje•2y ago
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
nexxel
nexxel•2y ago
yeah thats a really nice feature all jetbrains ides have
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ott
ott•2y ago
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
Leonidas
Leonidas•2y ago
Really makes you greatful for how many libraries support typescript in the js-ecosystem
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server