basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server

Results 467 basedpyright issues
Sort by recently updated
recently updated
newest added

### Description `py.typed` is the stupidest thing ever. by default, for some insane reason, the spec says that type checkers should ignore type annotations in 3rd party packages unless the...

documentation
type checking / linting

### Description Code sample in [basedpyright playground](https://basedpyright.com/?typeCheckingMode=all&code=CYUwZgBGD20NoBUC6AKAhgLgtARgKxAGMAXAGghywQEoIBaAPggQwFgAoCLiNAZ15AAnYjwgBLXhQ7cIgkMQCuggHaiAxBCGDogqgE8ADiAgAiXARInxk5dBF9eYgObK0OADbHi0CMUPGTBAABGGgTIA) ```python def foo[T](a: object, b: T) -> T: assert a is b return a # error: Type "object" is not assignable to type...

type checking / linting

### Description in my experience, most generics that have both a default and a bound use the same type for both: ```py def foo[T: int = int](): ... ``` maybe...

based

### Description ```python from __future__ import annotations from functools import wraps from typing import Any, Callable, Generic, Literal, TypeVar, overload if __name__ == "__main__": class Test(): @overload def sendcmd(self, cmd:...

language server
upstream bug
LSP: completions

![image_2024-10-14_05-32-23](https://github.com/user-attachments/assets/2082750b-336b-4feb-90cd-f05a2dc7aa12) This screenshot is from [scipy-stubs](https://github.com/jorenham/scipy-stubs), specifically in `scipy-stubs/sparse/csgraph/_validation.pyi` (the relevant code isn't pushed yet, but will be soon). So here the `basedpyright` suggested to import `sparray` from `scipy.sparse._base`, which...

language server
pylance parity
LSP: import suggestions

### Description ```py def f() -> object: return lambda: 1 class E(Enum): a = f() # expect error: `object` can potentially be `FunctionType`, wrap this value with `enum.member` to enforce...

type checking / linting
upstream bug

`basedpyright`'s type checking is helpful, but sometime I'd just want to ignore the error for the 3rd library without manually typing ` # pyright: ignore[reportUnknownVariableType,reportUnknownMemberType]`...

language server
pylance parity
LSP: code actions

### Description I noticed that adding non hashable elements to est via `set.add(elem)` was not generating any warning like it is the case for keys with dictionaries. Example: ```python from...

type checking / linting
upstream bug
typeshed

original issue: https://github.com/microsoft/pyright/issues/1997 > **Is your feature request related to a problem? Please describe.** > > I work on a large project (Apache Airflow) and using the "workspace" symbols is...

rejected upstream
language server
pylance parity
performance

### Description I have a custom decorator that uses the docstring of a function as a template ```python @prompt def prompt_args_test(name: str, age: int): """Hello, I am {{ name }}...

based