deprecate Physac, see #165
This commit is contained in:
parent
5593f2e392
commit
171177618b
7 changed files with 9179 additions and 8585 deletions
|
@ -79,7 +79,7 @@ def ctype_to_python_type(t):
|
|||
|
||||
|
||||
print("""from typing import Any
|
||||
|
||||
from warnings import deprecated
|
||||
import _cffi_backend # type: ignore
|
||||
|
||||
ffi: _cffi_backend.FFI
|
||||
|
@ -119,8 +119,11 @@ for name, attr in getmembers(rl):
|
|||
if 'description' in json_object:
|
||||
description = json_object['description']
|
||||
|
||||
print(
|
||||
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
|
||||
if 'physics' in uname:
|
||||
print('@deprecated("Raylib no longer recommends the use of Physac library")')
|
||||
print(f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:')
|
||||
print(f' """{description}."""')
|
||||
print(f' ...')
|
||||
|
||||
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
||||
return_type = ffi.typeof(attr).result.cname
|
||||
|
|
|
@ -69,7 +69,7 @@ def ctype_to_python_type(t):
|
|||
|
||||
|
||||
print("""from typing import Any
|
||||
|
||||
from warnings import deprecated
|
||||
import _cffi_backend # type: ignore
|
||||
|
||||
ffi: _cffi_backend.FFI
|
||||
|
@ -114,8 +114,12 @@ for name, attr in getmembers(rl):
|
|||
if 'description' in json_object:
|
||||
description = json_object['description']
|
||||
|
||||
print(
|
||||
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
|
||||
if 'Physics' in uname:
|
||||
print('@deprecated("Raylib no longer recommends the use of Physac library")')
|
||||
print(f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:')
|
||||
print(f' """{description}."""')
|
||||
print(f' ...')
|
||||
|
||||
|
||||
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
||||
return_type = ffi.typeof(attr).result.cname
|
||||
|
|
2409
docs/pyray.html
2409
docs/pyray.html
File diff suppressed because one or more lines are too long
2409
docs/raylib.html
2409
docs/raylib.html
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
4309
pyray/__init__.pyi
4309
pyray/__init__.pyi
File diff suppressed because it is too large
Load diff
4309
raylib/__init__.pyi
4309
raylib/__init__.pyi
File diff suppressed because it is too large
Load diff
Reference in a new issue