main: fix code style
All checks were successful
All checks were successful
This commit is contained in:
@@ -921,7 +921,7 @@ class BindingImplementation:
|
|||||||
binding_data['VkDebugReportObjectTypeEXT'] = self[debug_object_name]
|
binding_data['VkDebugReportObjectTypeEXT'] = self[debug_object_name]
|
||||||
break
|
break
|
||||||
return binding_data
|
return binding_data
|
||||||
|
|
||||||
def create_signature(self, name: str):
|
def create_signature(self, name: str):
|
||||||
binding_data = self[name]
|
binding_data = self[name]
|
||||||
binding_data: VulkanFunctionBindingData
|
binding_data: VulkanFunctionBindingData
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ python_ctype_float_map = {}
|
|||||||
python_ctype_struct_map = {}
|
python_ctype_struct_map = {}
|
||||||
python_ctype_signature_map = {}
|
python_ctype_signature_map = {}
|
||||||
|
|
||||||
|
|
||||||
def __init__():
|
def __init__():
|
||||||
for name in dir(ctypes):
|
for name in dir(ctypes):
|
||||||
if not name.startswith('c_'):
|
if not name.startswith('c_'):
|
||||||
@@ -109,7 +110,7 @@ def __init__():
|
|||||||
elif ctype._type_ in 'FDG':
|
elif ctype._type_ in 'FDG':
|
||||||
python_ctype_signature_map[ctype] = complex
|
python_ctype_signature_map[ctype] = complex
|
||||||
python_ctype_struct_map[ctype._type_] = ctype
|
python_ctype_struct_map[ctype._type_] = ctype
|
||||||
|
|
||||||
python_ctype_signature_map['P'] = int | None
|
python_ctype_signature_map['P'] = int | None
|
||||||
python_ctype_signature_map['c'] = bytes
|
python_ctype_signature_map['c'] = bytes
|
||||||
python_ctype_signature_map['z'] = bytes | None
|
python_ctype_signature_map['z'] = bytes | None
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
def create_lazy_module(module, BaseClass):
|
def create_lazy_module(module, BaseClass):
|
||||||
ignore_names = set().union(*list(set(dir(Class)) for Class in module.__class__.__mro__))
|
ignore_names = set().union(*list(set(dir(Class)) for Class in module.__class__.__mro__))
|
||||||
transfer_names = {name for name in set(dir(module)) - ignore_names if name.startswith('__') and name.endswith('__')}
|
transfer_names = {name for name in set(dir(module)) - ignore_names if name.startswith('__') and name.endswith('__')}
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<module %r from %r>' % (self.__name__, self.__file__)
|
return '<module %r from %r>' % (self.__name__, self.__file__)
|
||||||
|
|
||||||
return type(module.__name__, (BaseClass,), {
|
return type(module.__name__, (BaseClass,), {
|
||||||
'__repr__': __repr__,
|
'__repr__': __repr__,
|
||||||
**{name: getattr(module, name) for name in transfer_names},
|
**{name: getattr(module, name) for name in transfer_names},
|
||||||
|
|||||||
Reference in New Issue
Block a user