DetachHead

Results 929 comments of DetachHead

there's already `reportUnnecessaryIsInstance`, `reportUnnecessaryComparison`, `reportUnnecessaryContains` and `reportAssertAlwaysTrue` but those are for specific cases. we should introduce a new rule to catch everything else

it should treat `TYPE_CHECKING` blocks the same as stub files

upstream issues: - https://github.com/microsoft/pyright/issues/8619#issuecomment-2260735014 - https://github.com/microsoft/pyright/issues/5819

this is very likely to be caused by the same change mentioned in https://github.com/DetachHead/basedpyright/issues/1119#issuecomment-2692490282, in which case the error will disappear in the next release since i've now fully reverted...

> though the error should be reported on the field definition, not the instantiation. workaround for this is to make `field` use a generic for the default value and return...

honestly argparse is such an old and clunky library that wasn't designed with type safety in mind. i would recommend switching to something like [typer](https://typer.tiangolo.com/) instead. if switching to another...

> (This is a learning project for me, and I just switched over to using basedpyright and so far I am really enjoying it, the errors it highlights feel more...

upstream issue: https://github.com/microsoft/pyright/issues/9185

oops, i had no idea you could set the type checking mode for individual files that way. it seems to just ignore the `strict` setting if `typeCheckingMode` is set to...