From d9c1de568657afc4372fc7a53f174ea4bcf5c7cf Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Mon, 25 Nov 2024 10:38:51 +0100 Subject: [PATCH] New ruff --- wgpu/_classes.py | 56 +++++++++++++------------- wgpu/enums.py | 52 ++++++++++++------------ wgpu/flags.py | 4 +- wgpu/gui/__init__.py | 4 +- wgpu/gui/auto.py | 2 +- wgpu/structs.py | 96 ++++++++++++++++++++++---------------------- 6 files changed, 107 insertions(+), 107 deletions(-) diff --git a/wgpu/_classes.py b/wgpu/_classes.py index 688670e8..e9b380bc 100644 --- a/wgpu/_classes.py +++ b/wgpu/_classes.py @@ -21,43 +21,43 @@ __all__ = [ - "GPUObjectBase", - "GPUAdapterInfo", "GPU", "GPUAdapter", - "GPUDevice", - "GPUBuffer", - "GPUTexture", - "GPUTextureView", - "GPUSampler", - "GPUBindGroupLayout", + "GPUAdapterInfo", "GPUBindGroup", - "GPUPipelineLayout", - "GPUShaderModule", - "GPUCompilationMessage", - "GPUCompilationInfo", - "GPUPipelineError", - "GPUPipelineBase", - "GPUComputePipeline", - "GPURenderPipeline", + "GPUBindGroupLayout", + "GPUBindingCommandsMixin", + "GPUBuffer", + "GPUCanvasContext", "GPUCommandBuffer", - "GPUCommandsMixin", "GPUCommandEncoder", - "GPUBindingCommandsMixin", - "GPUDebugCommandsMixin", + "GPUCommandsMixin", + "GPUCompilationInfo", + "GPUCompilationMessage", "GPUComputePassEncoder", - "GPURenderPassEncoder", - "GPURenderCommandsMixin", - "GPURenderBundle", - "GPURenderBundleEncoder", - "GPUQueue", - "GPUQuerySet", - "GPUCanvasContext", + "GPUComputePipeline", + "GPUDebugCommandsMixin", + "GPUDevice", "GPUDeviceLostInfo", "GPUError", - "GPUValidationError", - "GPUOutOfMemoryError", "GPUInternalError", + "GPUObjectBase", + "GPUOutOfMemoryError", + "GPUPipelineBase", + "GPUPipelineError", + "GPUPipelineLayout", + "GPUQuerySet", + "GPUQueue", + "GPURenderBundle", + "GPURenderBundleEncoder", + "GPURenderCommandsMixin", + "GPURenderPassEncoder", + "GPURenderPipeline", + "GPUSampler", + "GPUShaderModule", + "GPUTexture", + "GPUTextureView", + "GPUValidationError", ] logger = logging.getLogger("wgpu") diff --git a/wgpu/enums.py b/wgpu/enums.py index 75ea9ad2..ecfe47f0 100644 --- a/wgpu/enums.py +++ b/wgpu/enums.py @@ -21,40 +21,40 @@ class Enum(_BaseEnum): # There are 34 enums __all__ = [ - "PowerPreference", - "FeatureName", - "BufferMapState", - "TextureDimension", - "TextureViewDimension", - "TextureAspect", - "TextureFormat", "AddressMode", - "FilterMode", - "MipmapFilterMode", - "CompareFunction", - "BufferBindingType", - "SamplerBindingType", - "TextureSampleType", - "StorageTextureAccess", - "CompilationMessageType", - "PipelineErrorReason", "AutoLayoutMode", - "PrimitiveTopology", - "FrontFace", - "CullMode", "BlendFactor", "BlendOperation", - "StencilOperation", - "IndexFormat", - "VertexFormat", - "VertexStepMode", - "LoadOp", - "StoreOp", - "QueryType", + "BufferBindingType", + "BufferMapState", "CanvasAlphaMode", "CanvasToneMappingMode", + "CompareFunction", + "CompilationMessageType", + "CullMode", "DeviceLostReason", "ErrorFilter", + "FeatureName", + "FilterMode", + "FrontFace", + "IndexFormat", + "LoadOp", + "MipmapFilterMode", + "PipelineErrorReason", + "PowerPreference", + "PrimitiveTopology", + "QueryType", + "SamplerBindingType", + "StencilOperation", + "StorageTextureAccess", + "StoreOp", + "TextureAspect", + "TextureDimension", + "TextureFormat", + "TextureSampleType", + "TextureViewDimension", + "VertexFormat", + "VertexStepMode", ] diff --git a/wgpu/flags.py b/wgpu/flags.py index 5bd06793..7fa73a18 100644 --- a/wgpu/flags.py +++ b/wgpu/flags.py @@ -23,10 +23,10 @@ class Flags(_BaseEnum): __all__ = [ "BufferUsage", + "ColorWrite", "MapMode", - "TextureUsage", "ShaderStage", - "ColorWrite", + "TextureUsage", ] diff --git a/wgpu/gui/__init__.py b/wgpu/gui/__init__.py index cb74d27e..c35d54cd 100644 --- a/wgpu/gui/__init__.py +++ b/wgpu/gui/__init__.py @@ -6,7 +6,7 @@ from .base import WgpuCanvasInterface, WgpuCanvasBase, WgpuAutoGui __all__ = [ - "WgpuCanvasInterface", - "WgpuCanvasBase", "WgpuAutoGui", + "WgpuCanvasBase", + "WgpuCanvasInterface", ] diff --git a/wgpu/gui/auto.py b/wgpu/gui/auto.py index 65536ec1..a3a11178 100644 --- a/wgpu/gui/auto.py +++ b/wgpu/gui/auto.py @@ -5,7 +5,7 @@ for e.g. wx later. Or we might decide to stick with these three. """ -__all__ = ["WgpuCanvas", "run", "call_later"] +__all__ = ["WgpuCanvas", "call_later", "run"] import os import sys diff --git a/wgpu/structs.py b/wgpu/structs.py index cd2d3707..857a34c7 100644 --- a/wgpu/structs.py +++ b/wgpu/structs.py @@ -30,65 +30,65 @@ def __repr__(self): # There are 60 structs __all__ = [ - "RequestAdapterOptions", - "DeviceDescriptor", - "BufferDescriptor", - "TextureDescriptor", - "TextureViewDescriptor", - "ExternalTextureDescriptor", - "SamplerDescriptor", - "BindGroupLayoutDescriptor", - "BindGroupLayoutEntry", - "BufferBindingLayout", - "SamplerBindingLayout", - "TextureBindingLayout", - "StorageTextureBindingLayout", - "ExternalTextureBindingLayout", "BindGroupDescriptor", "BindGroupEntry", + "BindGroupLayoutDescriptor", + "BindGroupLayoutEntry", + "BlendComponent", + "BlendState", "BufferBinding", - "PipelineLayoutDescriptor", - "ShaderModuleDescriptor", - "ShaderModuleCompilationHint", - "PipelineErrorInit", - "ProgrammableStage", - "ComputePipelineDescriptor", - "RenderPipelineDescriptor", - "PrimitiveState", - "MultisampleState", - "FragmentState", + "BufferBindingLayout", + "BufferDescriptor", + "CanvasConfiguration", + "CanvasToneMapping", + "Color", "ColorTargetState", - "BlendState", - "BlendComponent", - "DepthStencilState", - "StencilFaceState", - "VertexState", - "VertexBufferLayout", - "VertexAttribute", - "ImageDataLayout", - "ImageCopyBuffer", - "ImageCopyTexture", - "ImageCopyExternalImage", "CommandBufferDescriptor", "CommandEncoderDescriptor", - "ComputePassTimestampWrites", "ComputePassDescriptor", - "RenderPassTimestampWrites", - "RenderPassDescriptor", + "ComputePassTimestampWrites", + "ComputePipelineDescriptor", + "DepthStencilState", + "DeviceDescriptor", + "Extent3D", + "ExternalTextureBindingLayout", + "ExternalTextureDescriptor", + "FragmentState", + "ImageCopyBuffer", + "ImageCopyExternalImage", + "ImageCopyTexture", + "ImageDataLayout", + "MultisampleState", + "Origin2D", + "Origin3D", + "PipelineErrorInit", + "PipelineLayoutDescriptor", + "PrimitiveState", + "ProgrammableStage", + "QuerySetDescriptor", + "QueueDescriptor", + "RenderBundleDescriptor", + "RenderBundleEncoderDescriptor", "RenderPassColorAttachment", "RenderPassDepthStencilAttachment", + "RenderPassDescriptor", "RenderPassLayout", - "RenderBundleDescriptor", - "RenderBundleEncoderDescriptor", - "QueueDescriptor", - "QuerySetDescriptor", - "CanvasToneMapping", - "CanvasConfiguration", + "RenderPassTimestampWrites", + "RenderPipelineDescriptor", + "RequestAdapterOptions", + "SamplerBindingLayout", + "SamplerDescriptor", + "ShaderModuleCompilationHint", + "ShaderModuleDescriptor", + "StencilFaceState", + "StorageTextureBindingLayout", + "TextureBindingLayout", + "TextureDescriptor", + "TextureViewDescriptor", "UncapturedErrorEventInit", - "Color", - "Origin2D", - "Origin3D", - "Extent3D", + "VertexAttribute", + "VertexBufferLayout", + "VertexState", ]