adsharma

Results 211 comments of adsharma

I get that the current code doesn't compile. Given that Go doesn't have tuples (https://github.com/golang/go/issues/32941), what do you want the generated code to do? ``` a, b, c, d, e,...

Right now it uses the standard python parser (`ast.parse`), but we're looking into other parsers for the purpose of preserving comments: #354 In the future, we may look into enhancing...

It's possibly to statically type JSON like structures. The definition ends up being recursive: https://docs.serde.rs/serde_json/#operating-on-untyped-json-values We recently added support for sealed classes. Perhaps such an enum can be represented as...

### Disallowed features * Metaclasses * eval * dunder magic * anything that calls into the python runtime (like querying the type of an object at runtime) * is operator...

Came across starlark-go specification. This is a subset of python that's used for configuration files. Java and Go implementations exist. Although this spec is for dynamically typed python, we could...

It's syntactically correct, but semantically invalid python. We could detect and print a reasonable error message out. mypy: ``` /tmp/bad.py:1: error: Invalid type comment or annotation ``` pyright: ``` /tmp/bad.py:1:18...

Similar library for rust: https://github.com/adsharma/pylib-rs

Using the sealed decorator implemented on top of the `adt` library: https://github.com/adsharma/adt/blob/sealed/examples/sealed.py The benchmark is 4-5x slower than the Java derived version. My expectation is that transpiling to rust will...

https://github.com/JelleZijlstra/typeshed_client provides a way to access the typeshed pyi files that contain this information. mypy and pyright bundle it right now. mypy is looking to unbundle it. We can use...

Sure we can do special casing in inference.py for a small number of these. But will have to get to typeshed eventually for a general solution.