nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.37k stars 97 forks source link

int in [-32766, 32766], (optional) fails to be typed as int #261

Closed Road-hog123 closed 3 months ago

Road-hog123 commented 3 months ago

As identified as part of #254 IDMaterials.pop's index parameter is being typed as typing.Any | None even though the documentation has it as int in [-32766, 32766], (optional). While this matches REGEX_MATCH_DATA_TYPE_NUMBER_IN, what arrives to be matched is int in [-32766, 32766], which doesn't match because a lone , does not match (, .+).

This issue is not unique to this parameter. While checking I found that dtype_str frequently ends with a comma; is this useful for refining the type, or would it be better to trim them off to simplify regex matching?

JonathanPlasse commented 3 months ago
nutti commented 3 months ago

This issue is now fixed.