Kyle Gottfried

Results 99 comments of Kyle Gottfried
trafficstars

I tried out stubgen on this project but it could not infer literal int contants, only that they were some int.

@GoodWasHere , how are you running stubtest BTW? ``` python-rapid-json @ stubtest rapidjson error: not checking stubs due to failed mypy compile: rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py:235: error: Missing parentheses in call to 'print'....

@GoodWasHere Please apply the following patch so that the "magic" `rapidjson-stubs` directory is created. PyLance and MyPy look for directories with this suffix to look for typing information. (I don't...

Found the documentation reference for `*-stubs` directories - https://peps.python.org/pep-0561/#stub-only-packages

I've also tested pyright's stub generator, it wasn't any better than stubgen.

@GoodWasHere , apply the following to ensure typing stubs remain up-to-date: ```diff 0001-add-typing-stub-tests.patch From 0014e3123126e2fa6c0f29b75b515bcbf5c7b769 Mon Sep 17 00:00:00 2001 From: Kyle Gottfried Date: Fri, 14 Jun 2024 16:15:06 -0400...

@GoodWasHere , I may be incorrect but that is because genuinely no bindings exist for those methods. ```python >>> import rapidjson >>> dir(rapidjson) ['BM_NONE', 'BM_UTF8', 'DM_IGNORE_TZ', 'DM_ISO8601', 'DM_NAIVE_IS_UTC', 'DM_NONE', 'DM_ONLY_SECONDS',...

>I get it, these methods can be defined in inheritors. The signatures are taken from the [documentation](https://python-rapidjson.readthedocs.io/en/latest/decoder.html#rapidjson.Decoder.end_array). I added exceptions for them, stubtest takes them into account when running My...

It's not an empty method if it does not exist. Linters and language servers do not assume the existence of `__div__` on functions unless the class implements it. Also none...

It should not include their signature. This suggests to the end user that the base implementation contains these methods. They only exist if a sub-type of Encoder/Decoder implements them and...