From bf6d5d421c15bfcd222dd2cd3462bd4226a09cd3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 19 Nov 2024 12:24:58 +0000 Subject: [PATCH] fix how regex inserts underscore in function names with '2d' and '3d' (#149) --- create_stub_pyray.py | 3 +- docs/genindex.html | 36 ++++++++-------- docs/objects.inv | Bin 25866 -> 25867 bytes docs/pyray.html | 96 ++++++++++++++++++++--------------------- docs/searchindex.js | 2 +- pyray/__init__.py | 7 ++- pyray/__init__.pyi | 16 +++---- raylib/rlgl.h.modified | 2 +- 8 files changed, 81 insertions(+), 81 deletions(-) diff --git a/create_stub_pyray.py b/create_stub_pyray.py index 3b126c7..3db8fc6 100644 --- a/create_stub_pyray.py +++ b/create_stub_pyray.py @@ -14,6 +14,7 @@ from pathlib import Path from raylib import rl, ffi +from pyray import _underscore from inspect import ismethod, getmembers, isbuiltin import inflection, sys, json @@ -87,7 +88,7 @@ ffi: _cffi_backend.FFI reserved_words = ("in", "list", "tuple", "set", "dict", "from", "range", "min", "max", "any", "all", "len") for name, attr in getmembers(rl): - uname = inflection.underscore(name).replace('3_d', '_3d').replace('2_d', '_2d') + uname = _underscore(name) if isbuiltin(attr) or str(type(attr)) == "": json_object = known_functions.get(name, None) if json_object is None: diff --git a/docs/genindex.html b/docs/genindex.html index 1f5d889..1accfe3 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -10666,6 +10666,14 @@
  • vector2_clamp() (in module pyray)
  • vector2_clamp_value() (in module pyray) +
  • +
  • vector2_distance() (in module pyray) +
  • +
  • vector2_distance_sqr() (in module pyray) +
  • +
  • vector2_divide() (in module pyray) +
  • +
  • vector2_dot_product() (in module pyray)
  • vector2_equals() (in module pyray)
  • @@ -10790,6 +10798,14 @@
  • vector3_cross_product() (in module pyray)
  • vector3_cubic_hermite() (in module pyray) +
  • +
  • vector3_distance() (in module pyray) +
  • +
  • vector3_distance_sqr() (in module pyray) +
  • +
  • vector3_divide() (in module pyray) +
  • +
  • vector3_dot_product() (in module pyray)
  • vector3_equals() (in module pyray)
  • @@ -10839,6 +10855,8 @@
  • vector3_to_float_v() (in module pyray)
  • + + -