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
|
print("""from typing import Any
|
||||||
|
from warnings import deprecated
|
||||||
import _cffi_backend # type: ignore
|
import _cffi_backend # type: ignore
|
||||||
|
|
||||||
ffi: _cffi_backend.FFI
|
ffi: _cffi_backend.FFI
|
||||||
|
@ -119,8 +119,11 @@ for name, attr in getmembers(rl):
|
||||||
if 'description' in json_object:
|
if 'description' in json_object:
|
||||||
description = json_object['description']
|
description = json_object['description']
|
||||||
|
|
||||||
print(
|
if 'physics' in uname:
|
||||||
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
|
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'>":
|
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
||||||
return_type = ffi.typeof(attr).result.cname
|
return_type = ffi.typeof(attr).result.cname
|
||||||
|
|
|
@ -69,7 +69,7 @@ def ctype_to_python_type(t):
|
||||||
|
|
||||||
|
|
||||||
print("""from typing import Any
|
print("""from typing import Any
|
||||||
|
from warnings import deprecated
|
||||||
import _cffi_backend # type: ignore
|
import _cffi_backend # type: ignore
|
||||||
|
|
||||||
ffi: _cffi_backend.FFI
|
ffi: _cffi_backend.FFI
|
||||||
|
@ -114,8 +114,12 @@ for name, attr in getmembers(rl):
|
||||||
if 'description' in json_object:
|
if 'description' in json_object:
|
||||||
description = json_object['description']
|
description = json_object['description']
|
||||||
|
|
||||||
print(
|
if 'Physics' in uname:
|
||||||
f'def {uname}({sig}) -> {ctype_to_python_type(return_type)}:\n """{description}"""\n ...')
|
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'>":
|
elif str(type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
||||||
return_type = ffi.typeof(attr).result.cname
|
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
2165
pyray/__init__.pyi
2165
pyray/__init__.pyi
File diff suppressed because it is too large
Load diff
2165
raylib/__init__.pyi
2165
raylib/__init__.pyi
File diff suppressed because it is too large
Load diff
Reference in a new issue