3 ms·
> My stack is pycharm, mypy, pydantic, sqlalchemy stub, several mypy plugins, black, isort, tabNine completion, and a bunch of custom scripts/Make to automate t
by tonyg 5y ago
> My stack is pycharm, mypy, pydantic, sqlalchemy stub, several mypy plugins, black, isort, tabNine completion, and a bunch of custom scripts/Make to automate the common tasks.
Christ. What a mess. With a stack like that, it's a stretch to say you're "writing in Python" anymore.
- serial_dev 5y ago> Most of their main arguments (...) evaporate as soon as you start using the correct tooling. You silly! Just use these carefully curated list of 28 different tools (that I got to after years of trial and error) and you'll have a somewhat acceptable tooling and type support in Python.
- danmur 5y agoAnything that can use an LSP server will give you most/all of those benefits. Your favourite editor + LSP, that's the tooling. It's very much worth it.
- Spivak 5y agoThat list is an editor, a type checker, a package to enforce type checks at runtime, 3rd party type annotations for a popular SQL ORM, some plugins for the type checker (probably the pydantic one), a code formatter, an import sorter, and (optionally) a Github co-pilot alternative.
- avianlyric 5y agoTo be fair, I don’t think you need that entire stack. Just using VSCode + pyright (which is a one button install in VSCode) + type stubs for libraries your using without native hints, gets you 99% of the benefits. If you really want, you can even throw in a little pre-commit hit hook that runs pyright and prevents you from commuting code with type errors.
- ramraj07 5y agoWow gatekeeping types out of python are we? Of course the language looks different when typing is enforced, let it evolve.
- nerdponx 5y agoThat's such a disingenuous argument. First of all, Black and Isort are literally code formatters that have nothing to do with type hints. Second, the whole point is that you can actually develop powerful dev tooling for Python now, whereas in the past it was difficult or impossible.
- john-radio 5y agoI think the person you're responding to is just trying to be thorough in case it is helpful to someone else setting up python tooling; the only parts of what they wrote that are relevant to type checking are mypy and pydantic.
- rstuart4133 5y agoAnd pydantic isn't really about type checking either. In fact it says that in the first few lines of the it's docs https://pydantic-docs.helpmanual.io/usage/models/ https://pydantic-docs.helpmanual.io/usage/models/ : > pydantic is primarily a parsing library, not a validation library. Validation is a means to an end: building a model which conforms to the types and constraints provided. Anyone whose used Typescript or even strong typed languages knew what to expect from Python + mypy. No surprises there. But pydantic's use of type hinting to create a remarkably dense serialisation library, and then fastapi's leveraging that to create REST interfaces along with automagic documentation generation - well that wasn't when I was thinking would happen when I saw the type hinting proposal.
- kortex 5y agoIt's more so "this is my toolchain I use for my own ergonomics, and what you can achieve with the right kit". Who cares if I'm "writing in python" at all? I'm solving problems. Honestly a good IDE (pycharm or vscode) will give you 80% of the ergonomics.