Skip to content

Commit 7fb6de6

Browse files
committed
line length linting
1 parent ef788f8 commit 7fb6de6

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

arcade/gl/backends/gl/context.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def __init__(
3636
if gl_api not in self._valid_apis:
3737
if gl_api == "webgl":
3838
raise ValueError(
39-
f"Tried to create a GLContext with webgl api selected. Valid options for this backend are: {self._valid_apis}"
39+
"Tried to create a GLContext with webgl api selected. " +
40+
f"Valid options for this backend are: {self._valid_apis}"
4041
)
4142
raise ValueError(f"Invalid gl_api. Options are: {self._valid_apis}")
4243
self.gl_api = gl_api

arcade/gl/enums.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@
5252
MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B
5353
MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122
5454
MAX_TEXTURE_IMAGE_UNITS = 0x8872
55-
MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF # Technically comes from EXT_texture_filter_anisotropic in WebGL, but it's widely available
55+
56+
# Technically comes from EXT_texture_filter_anisotropic in WebGL, but it's widely available
57+
MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF
58+
5659
MAX_VIEWPORT_DIMS = 0x0D3A
5760
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B
5861

arcade/gl/program.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def delete(self):
147147
@abstractmethod
148148
def __getitem__(
149149
self, item
150-
): # TODO: typing, this should return Uniform | UniformBlock, but need generic options for those:
150+
): # TODO: typing, this should return Uniform | UniformBlock
151151
"""Get a uniform or uniform block"""
152152
raise NotImplementedError("The enabled graphics backend does not support this method.")
153153

arcade/gl/sampler.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ def __init__(
2626
):
2727
self._ctx = ctx
2828

29-
# These three ultimately need to be set by the implementing backend, but we're creating them here first
30-
# to trick some of the methods on the base class to being able to see them.
31-
# So that we don't have to implement a getter on every backend
29+
# These three ultimately need to be set by the implementing backend.
30+
# We're creating them here first to trick some of the methods on the
31+
# base class to being able to see them. So that we don't have to
32+
# implement a getter on every backend
3233
self._filter = None
3334
self._wrap_x = None
3435
self._wrap_y = None

arcade/gl/vertex_array.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
self,
4848
ctx: Context,
4949
program: Program,
50-
content: Sequence, # TODO: typing, this should be Sequence[BufferDescription] need generic BufferDescription though
50+
content: Sequence, # TODO: typing, this should be Sequence[BufferDescription]
5151
index_buffer: Buffer | None = None,
5252
index_element_size: int = 4,
5353
) -> None:
@@ -96,7 +96,7 @@ def render(
9696
mode: int,
9797
first: int = 0,
9898
vertices: int = 0,
99-
instances: int = 1, # TODO: typing, technically mode can also be a ctypes uint in GL backend
99+
instances: int = 1, # TODO: typing, mode can also be a ctypes uint in GL backend
100100
) -> None:
101101
"""
102102
Render the VertexArray to the currently active framebuffer.
@@ -116,7 +116,7 @@ def render(
116116
@abstractmethod
117117
def render_indirect(
118118
self, buffer: Buffer, mode: int, count, first, stride
119-
) -> None: # TODO: typing, technically mode can also be a ctypes uint in GL backend
119+
) -> None: # TODO: typing, mode can also be a ctypes uint in GL backend
120120
"""
121121
Render the VertexArray to the framebuffer using indirect rendering.
122122
@@ -141,8 +141,8 @@ def render_indirect(
141141
def transform_interleaved(
142142
self,
143143
buffer: Buffer,
144-
mode, # TODO, typing. This should be GLenumLike type but idk how to handle that generically yet
145-
output_mode, # TODO, typing. This should be GLenumLike type but idk how to handle that generically yet
144+
mode, # TODO, typing. This should be GLenumLike type
145+
output_mode, # TODO, typing. This should be GLenumLike type
146146
first: int = 0,
147147
vertices: int = 0,
148148
instances: int = 1,
@@ -172,8 +172,8 @@ def transform_interleaved(
172172
def transform_separate(
173173
self,
174174
buffers: list[Buffer],
175-
mode, # TODO, typing. This should be GLenumLike type but idk how to handle that generically yet
176-
output_mode, # TODO, typing. This should be GLenumLike type but idk how to handle that generically yet
175+
mode, # TODO, typing. This should be GLenumLike type
176+
output_mode, # TODO, typing. This should be GLenumLike type
177177
first: int = 0,
178178
vertices: int = 0,
179179
instances: int = 1,

0 commit comments

Comments
 (0)