basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

don't `reportAny` if the assigned type is `object`

Open DetachHead opened this issue 10 months ago • 2 comments

Description

Code sample in basedpyright playground

import json


foo: object = json.loads('asdf')

this is completely safe so there's no point reporting an error here

DetachHead avatar Apr 17 '25 01:04 DetachHead

@DetachHead 👋 I too came across this the other day. I made a quick fix. PTAL when you get a chance. Thank you!

sahansera avatar Apr 27 '25 03:04 sahansera

thanks for the contribution! i'm a bit busy with other work for the next week or so but i will have a look when i can

DetachHead avatar Apr 27 '25 04:04 DetachHead