Danny Yang

Results 47 issues of Danny Yang

https://typing.python.org/en/latest/spec/historical.html#positional-only-parameters

good first issue
typechecking

This is just a functional way to create the same aliases as the `type` keyword, but it uses the old style type parameters.

typechecking

Right now, we fall back to the implementation of get/set from `Mapping[str, object]` (get returns object, set isn't allowed) We should give a more precise type if the key is...

typechecking

https://typing.python.org/en/latest/spec/literal.html#inferring-literalstring

typechecking
User

I think this is something along the lines of, protocols with runtime_checkable are allowed in isinstance/issubclass calls, but otherwise they should not be. Check the spec

typechecking

https://pyrefly.org/sandbox/?code=MQAg6gpgNgxg9gWwiALnVALZAFAngJwgDMpcQBlAQwDsATAIzgA8AaTASwGcQuRKQADpQDmEAFCgA7lkIhccAK4gYNEJPzsUENpwyVZNWiCgR91PowUpUuAe2rCe5vCgxxqAOgkSQACQgGBsqKAiYgRKYoCoTccEQc3JyGjEwAXD4AtCAA4hDWhJRQGSjsSDYCyDBYMADW9o4REAyUtZkgAKqcyIQAbqZQAPoothAAFACUqOj2nBUw1vYR+IRGwxWcbRBMFRpI1NaSmhiYyACSACIAouGR0RDcrpQHyJwKAgJw+NajEB7CHnwrHB4AhQnltCBhHBitDaMR7Jp2O42G4+vg2HkYOM2mANFo+HQQPgFM5cK53ME4SBaOxCPNSE45Ip8CB6Pg4JIuvgxGIiOyEOV6jxQZ9rJR6JwUPgWigkOTaDyYFBKJxuABBCVSmUAIRVEHSIENIAAAuLJdL5nK3AqjdTiCAmKMulAiJMMgA+EDmg22o1CVWK5WqkAAYXcMEIWlGGvNOr14x9hrh8UdztdIA9Xqlid9kei5gARAWeUwQABeUPhyNjSYgUAAeQA0mIyBWY1r5rquhM6yAAHJwaxNsRAA If the class defines an abstract method or inherits an abstract method & doesn't override it, then it cannot be instantiated.

typechecking

Since Pyright is implemented in JS, would it make sense to load the latest/default version of Pyright with the web page and run it directly in the browser? Anecdotally when...

### Describe the Bug Followup from https://github.com/facebook/pyrefly/issues/390 We should make sure that the dataclass doesn't actually have any InitVars as members, and it's only used for generating the init/post_init signature...

good first issue
typechecking

### Describe the Bug Something like this should not be allowed: ``` class TD(TypedDict): x: Required[NotRequired[int]] y: NotRequired[Required[int]] ``` The check should probably go here: https://github.com/facebook/pyrefly/blob/c6a5b667065373cdad63e3fbadaba1baa0675998/pyrefly/lib/alt/solve.rs#L469 Once this is done,...

good first issue
typechecking

### Describe the Bug To check whether a class is a frozen dataclass based on metadata, do something like: ``` metadata.dataclass_metadata().is_some_and(|dataclass| dataclass.kws.is_set(&DataclassKeywords::FROZEN)) ``` The check should probably go somewhere in...

good first issue
typechecking