pybricks-api icon indicating copy to clipboard operation
pybricks-api copied to clipboard

Fix decode and encode in json module jedi test

Open laurensvalk opened this issue 3 years ago • 3 comments

Not sure where these are coming from.

https://github.com/pybricks/pybricks-api/blob/6640fba104ffe9a60f6534d4d6ec75650ebcf7d3/jedi/tests/test_complete_import.py#L195-L198

laurensvalk avatar Dec 02 '22 14:12 laurensvalk

It is picking up the ujson module from here: https://github.com/davidhalter/typeshed/blob/ae9d4f4b21bb5e1239816c301da7b1ea904b44c3/third_party/2and3/ujson.pyi

Hopefully there is a way we can tell jedi to not use that.

dlech avatar Dec 02 '22 17:12 dlech

I think we would basically need to fork jedi to fix this (as per discussion in https://github.com/davidhalter/jedi/issues/1809).

dlech avatar Dec 02 '22 17:12 dlech

Maybe we can get some inspiration from Thonny. It looks like they are monkey-patching instead of forking.

https://github.com/thonny/thonny/blob/master/thonny/jedi_utils.py

dlech avatar Dec 02 '22 18:12 dlech