main: fix code style
All checks were successful
CI / Code Style (autopep8) (push) Successful in 14s
CI / Tests (Python 3.12) (push) Successful in 18s
CI / Tests (Python 3.13) (push) Successful in 19s
CI / Tests (Python 3.14) (push) Successful in 19s
CI / Coverage (Python 3.12) (push) Successful in 37s

This commit is contained in:
2026-05-10 01:09:15 +03:00
parent a8740d88dd
commit 68d0afea04
3 changed files with 5 additions and 4 deletions

View File

@@ -921,7 +921,7 @@ class BindingImplementation:
binding_data['VkDebugReportObjectTypeEXT'] = self[debug_object_name]
break
return binding_data
def create_signature(self, name: str):
binding_data = self[name]
binding_data: VulkanFunctionBindingData

View File

@@ -85,6 +85,7 @@ python_ctype_float_map = {}
python_ctype_struct_map = {}
python_ctype_signature_map = {}
def __init__():
for name in dir(ctypes):
if not name.startswith('c_'):
@@ -109,7 +110,7 @@ def __init__():
elif ctype._type_ in 'FDG':
python_ctype_signature_map[ctype] = complex
python_ctype_struct_map[ctype._type_] = ctype
python_ctype_signature_map['P'] = int | None
python_ctype_signature_map['c'] = bytes
python_ctype_signature_map['z'] = bytes | None

View File

@@ -1,10 +1,10 @@
def create_lazy_module(module, BaseClass):
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('__')}
def __repr__(self):
return '<module %r from %r>' % (self.__name__, self.__file__)
return type(module.__name__, (BaseClass,), {
'__repr__': __repr__,
**{name: getattr(module, name) for name in transfer_names},