pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

A fast type checker and IDE for Python

Results 276 pyrefly issues
Sort by recently updated
recently updated
newest added

### Describe the Bug Consider: ```python options: dict[str, str] = {} if 'contains' in options: ingredients = [x.strip() for x in options.get('contains').split(',')] ``` `options` is known to have the key...

User

### Describe the Bug [PEP 604](https://peps.python.org/pep-0604/) union types are not recognised as the second argument to `isinstance()` or `issubclass()`. ```py assert not isinstance('spam', list | tuple) ``` A ### Sandbox...

User

### Describe the Bug pyrefly reports an internal error on the following. The error only occurs with the `raise SystemExit` line. ```py import sys if __name__ == '__main__': action =...

User

### Describe the Bug pyrefly appears to wrongly infer a list (`Sequence`) as `Iterable`. A ### Sandbox Link https://pyrefly.org/sandbox/?code=DYSwdgpgzgBAvDA2gcgIbIDQ2QI09gY32QgBcCA6ZAXQCgAzAewCcYQtRI2wYIwBXALYRmqUhAAUnaAEoAXLRhKY0qIhDV42KAAdUg5LVRQoI0ivDR4CFLv00YAKhgAWWkA ### (Only applicable for extension issues) IDE Information _No response_

User

### Describe the Bug pyrefly doesn't seem to recognise the module `__doc__` variable. A ### Sandbox Link https://pyrefly.org/sandbox/?code=EQgmHsGMGcBcCcCWA7A5iYAoTB9ABALx444SQmZA ### (Only applicable for extension issues) IDE Information _No response_

User

### Describe the Bug See the sandbox, pyrefly is inferring a type as a literal when the if statement checks the exact opposite of that. Note that removing the `not`...

### Describe the Bug See sandbox link, calling `issubclass()` on a `TypeVar` bound to a `type[object]` does not correctly specialize to that subclass inside an `if` statement ### Sandbox Link...

### Describe the Bug See sandbox link. An error is reported, but only when the result of calling the function is stored in an un-type-annotated variable ### Sandbox Link https://pyrefly.org/sandbox/?code=CYUwZgBA5iAuD6BjANgQwM7oBQEoIFoA+CWATwAcQBtAewCMArERWAXQC4AoCHiAJzgBXPgDsI9Ji07SAxBBE0IIPnxp9+IcmtghgAGgiI1AllxgIUGbDllKVajVr479EAJYijK5rC5gaigC80HBIaJi4tgp2quoCTi4GXia+nHSofOwkFNQSPqwQweZhVrhAA...

### Describe the Bug Forgive my terminology, I'm sure I'm not using the right words, but see sandbox link. Pyrefly does not allow `dict[str, A | B]` in a variable...

I found a minor typo issue in the README.md file. Nothing too fancy, but in the part of the inspiration, I've found that it's currently written as **_We are take...

cla signed