Does it support go to definition and other lsp features?
Ty: A fast Python type checker and language server
51–60 of 296 posts
Re: Ty: A fast Python type checker and language server
#52:wave: Looks like you found the not-so-secret repository we're using to prepare for a broader announcement :) Please be aware this is pre-alpha software. The current version is 0.0.0a6 and the releases so far are all in service of validating our release process. We're excited to get this in people's hands, but want to set the expectation that we still have a lot of work left to do before this is production ready. Sta…
Cool! Out of curiosity, what's the bedrock that's used to determine what the fundamental python AST objects are? I'm wondering what the "single source of truth" is, if you will. Is this all based off a spec that python provides? If so, what does that look like? Or do you "recode" the python language in rust, then use rust features to parse the python files? Regardless of how it's done - This is a really fascinating p…
CPython uses a generated parser. The grammar is defined in https://github.com/python/cpython/blob/main/Grammar/python.g... which is used to generate the specification at https://docs.python.org/3/reference/grammar.html#full-gramma...
We use a hand-written parser, in Rust, based on the specification. We've written that previously at https://astral.sh/blog/ruff-v0.4.0#a-hand-written-parser
Re: Ty: A fast Python type checker and language server
#53Re: Ty: A fast Python type checker and language server
#54Earlier quoted context omitted.
Cool! Out of curiosity, what's the bedrock that's used to determine what the fundamental python AST objects are? I'm wondering what the "single source of truth" is, if you will. Is this all based off a spec that python provides? If so, what does that look like? Or do you "recode" the python language in rust, then use rust features to parse the python files? Regardless of how it's done - This is a really fascinating p…
There is a formal grammar defined in the CPython repo, implemented in a language called ASDL: https://github.com/python/cpython/blob/main/Parser/Python.as... ty uses the same AST and parser as ruff. We don't use the ASDL grammar directly, because we store a few syntax nodes differently internally than how they're represented upstream. Our parser is hand-written in Rust. At first, our AST was also entirely hand-writte…
Re: Ty: A fast Python type checker and language server
#55:wave: Looks like you found the not-so-secret repository we're using to prepare for a broader announcement :) Please be aware this is pre-alpha software. The current version is 0.0.0a6 and the releases so far are all in service of validating our release process. We're excited to get this in people's hands, but want to set the expectation that we still have a lot of work left to do before this is production ready. Sta…
Re: Ty: A fast Python type checker and language server
#56Re: Ty: A fast Python type checker and language server
#57Re: Ty: A fast Python type checker and language server
#58Pylance is borked on these forked distributions, so having a new solid alternative here that doesn't involve adopting yet another forked Pyright implementation (BasedPyright, Cursor Pyright, Windsurf Pyright, ...) sounds great to me.
Re: Ty: A fast Python type checker and language server
#59:wave: Looks like you found the not-so-secret repository we're using to prepare for a broader announcement :) Please be aware this is pre-alpha software. The current version is 0.0.0a6 and the releases so far are all in service of validating our release process. We're excited to get this in people's hands, but want to set the expectation that we still have a lot of work left to do before this is production ready. Sta…
For pre-alpha software it's working fantastic for my project. I thought I type annotated it well, but Ty had quite a lot of feedback for me. Great job and I can't wait until this is released.
Re: Ty: A fast Python type checker and language server
#60Earlier quoted context omitted.
We're going to set up a lemonade stand in the main hall at PyCon next week
Fingers crossed this isn't a joke.