Skip to content

Commit 1711776

Browse files
deprecate Physac, see #165
1 parent 5593f2e commit 1711776

File tree

7 files changed

+9180
-8586
lines changed

7 files changed

+9180
-8586
lines changed

create_stub_pyray.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def ctype_to_python_type(t):
7979

8080

8181
print("""from typing import Any
82-
82+
from warnings import deprecated
8383
import _cffi_backend # type: ignore
8484
8585
ffi: _cffi_backend.FFI
@@ -119,8 +119,11 @@ def ctype_to_python_type(t):
119119
if 'description' in json_object:
120120
description = json_object['description']
121121

122-
print(
123-
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
122+
if 'physics' in uname:
123+
print('@deprecated("Raylib no longer recommends the use of Physac library")')
124+
print(f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:')
125+
print(f' """{description}."""')
126+
print(f' ...')
124127

125128
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
126129
return_type = ffi.typeof(attr).result.cname

create_stub_static.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def ctype_to_python_type(t):
6969

7070

7171
print("""from typing import Any
72-
72+
from warnings import deprecated
7373
import _cffi_backend # type: ignore
7474
7575
ffi: _cffi_backend.FFI
@@ -114,8 +114,12 @@ class struct: ...
114114
if 'description' in json_object:
115115
description = json_object['description']
116116

117-
print(
118-
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
117+
if 'Physics' in uname:
118+
print('@deprecated("Raylib no longer recommends the use of Physac library")')
119+
print(f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:')
120+
print(f' """{description}."""')
121+
print(f' ...')
122+
119123

120124
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
121125
return_type = ffi.typeof(attr).result.cname

docs/pyray.html

Lines changed: 1338 additions & 1073 deletions
Large diffs are not rendered by default.

docs/raylib.html

Lines changed: 1337 additions & 1072 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)