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