Skip to content

Commit 7717e3f

Browse files
committed
Merge branch 'cdeil-fix-docstrings' into development
2 parents 64546b7 + 8b846c5 commit 7717e3f

File tree

21 files changed

+47
-64
lines changed

21 files changed

+47
-64
lines changed

arcade/application.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,9 +1388,9 @@ def on_mouse_drag(
13881388
Change in x since the last time this method was called
13891389
dy:
13901390
Change in y since the last time this method was called
1391-
buttons:
1391+
_buttons:
13921392
Which button is pressed
1393-
modifiers:
1393+
_modifiers:
13941394
Bitwise 'and' of all modifiers (shift, ctrl, num lock)
13951395
active during this event. See :ref:`keyboard_modifiers`.
13961396
"""
@@ -1493,9 +1493,9 @@ def on_key_release(self, _symbol: int, _modifiers: int) -> bool | None:
14931493
* Showing which keys are currently pressed down
14941494
14951495
Args:
1496-
symbol:
1496+
_symbol:
14971497
Key that was released
1498-
modifiers:
1498+
_modifiers:
14991499
Bitwise 'and' of all modifiers (shift, ctrl, num lock) active
15001500
during this event. See :ref:`keyboard_modifiers`.
15011501
"""

arcade/cache/hit_box.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ def get(self, name_or_texture: str | Texture) -> Point2List | None:
5959
points = cache.get("hash|(0, 1, 2, 3)|simple|")
6060
6161
Args:
62-
keys:
62+
name_or_texture:
6363
The texture or cache name to get the hit box for
64-
hit_box_algorithm:
65-
The hit box algorithm used
6664
"""
6765
from arcade import Texture
6866

@@ -85,7 +83,7 @@ def put(self, name_or_texture: str | Texture, points: Point2List) -> None:
8583
cache.put("my_custom_points", points)
8684
8785
Args:
88-
keys:
86+
name_or_texture:
8987
The texture or cache name to store the hit box for
9088
points:
9189
The hit box points

arcade/camera/camera_2d.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,14 @@ def match_window(
343343
Should be called when the window is resized.
344344
345345
Args:
346-
and_projection: Flag whether to also equalize the projection to the viewport.
346+
viewport: Flag whether to equalise the viewport to the value.
347+
projection: Flag whether to also equalize the projection to the viewport.
347348
On by default
348-
and_scissor: Flag whether to also equalize the scissor box to the viewport.
349+
scissor: Flag whether to also equalize the scissor box to the viewport.
349350
On by default
350-
and_position: Flag whether to also center the camera to the viewport.
351+
position: Flag whether to also center the camera to the viewport.
351352
Off by default
352-
aspect_ratio: The ratio between width and height that the viewport should
353+
aspect: The ratio between width and height that the viewport should
353354
be constrained to. If unset then the viewport just matches the window
354355
size. The aspect ratio describes how much larger the width should be
355356
compared to the height. i.e. for an aspect ratio of ``4:3`` you should
@@ -383,7 +384,7 @@ def match_target(
383384
scissor: Flag whether to update the scissor value.
384385
position: Flag whether to also center the camera to the value.
385386
Off by default
386-
aspect_ratio: The ratio between width and height that the value should
387+
aspect: The ratio between width and height that the value should
387388
be constrained to. i.e. for an aspect ratio of ``4:3`` you should
388389
input ``4.0/3.0`` or ``1.33333...``. Cannot be equal to zero.
389390
If unset then the value will not be updated.
@@ -425,7 +426,7 @@ def update_values(
425426
scissor: Flag whether to update the scissor value.
426427
position: Flag whether to also center the camera to the value.
427428
Off by default
428-
aspect_ratio: The ratio between width and height that the value should
429+
aspect: The ratio between width and height that the value should
429430
be constrained to. i.e. for an aspect ratio of ``4:3`` you should
430431
input ``4.0/3.0`` or ``1.33333...``. Cannot be equal to zero.
431432
If unset then the value will not be updated.

arcade/camera/data_types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,6 @@ def unproject(self, screen_coordinate: Point) -> Vec3:
450450
Args:
451451
screen_coordinate: A 2D position in pixels should generally be inside
452452
the range of the active viewport.
453-
depth: The depth of the query. This can be though of how far along the forward vector
454-
the final coord will be.
455453
Returns:
456454
A 3D vector in world space.
457455
"""

arcade/camera/default.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ViewportProjector:
2424
2525
Args:
2626
viewport: The viewport to project to.
27-
window: The window to bind the camera to. Defaults to the currently active window.
27+
context: The window context to bind the camera to. Defaults to the currently active window.
2828
"""
2929

3030
def __init__(
@@ -108,7 +108,7 @@ class DefaultProjector(ViewportProjector):
108108
no instance where a developer would want to use this class.
109109
110110
Args:
111-
window: The window to bind the camera to. Defaults to the currently active window.
111+
context: The window context to bind the camera to. Defaults to the currently active window.
112112
"""
113113

114114
def __init__(self, *, context: ArcadeContext | None = None):

arcade/camera/orthographic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,9 @@ def unproject(self, screen_coordinate: Point) -> Vec3:
181181
Args:
182182
screen_coordinate: A 2D position in pixels from the bottom left of the screen.
183183
This should ALWAYS be in the range of 0.0 - screen size.
184-
depth: The depth of the query
185184
Returns:
186185
A 3D vector in world space.
187186
"""
188-
189187
_projection = generate_orthographic_matrix(self._projection, self._view.zoom)
190188
_view = generate_view_matrix(self._view)
191189
return unproject_orthographic(screen_coordinate, self.viewport.lbwh_int, _view, _projection)

arcade/draw/rect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ def draw_lbwh_rectangle_outline(
207207
Draw a rectangle extending from bottom left to top right
208208
209209
Args:
210-
bottom_left_x:
210+
left:
211211
The x coordinate of the left edge of the rectangle.
212-
bottom_left_y:
212+
bottom:
213213
The y coordinate of the bottom of the rectangle.
214214
width:
215215
The width of the rectangle.

arcade/future/light/lights.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class LightLayer(RenderTargetTexture):
8787
The size of a layer should ideally be of the same size and the screen.
8888
8989
Args:
90-
size: Width and height of light layer
90+
width: Width of light layer
91+
height: Height of light layer
9192
"""
9293

9394
def __init__(self, width: int, height: int):

arcade/future/video/video_player.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ def __init__(self, path: str | Path, loop: bool = False):
3737

3838
def draw(self, left: int = 0, bottom: int = 0, size: tuple[int, int] | None = None) -> None:
3939
"""
40-
Call this in `on_draw`.
40+
Draw the current video frame.
4141
4242
Args:
43-
size: Pass None as one of the elements if you want to use the
44-
dimension(width, height) attribute.
43+
left:
44+
Window position from the left.
45+
bottom:
46+
Window position from the bottom.
47+
size:
48+
The size of the video rectangle.
49+
If `None`, the video will be drawn in its original size.
4550
"""
4651
if size and len(size) == 2:
4752
self._width = size[0] or self.width

arcade/gl/framebuffer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@ def clear(
347347
A 3 or 4 component tuple containing the color in normalized form
348348
depth:
349349
Value to clear the depth buffer (unused)
350-
normalized:
351-
If the color values are normalized or not
352350
viewport:
353351
The viewport range to clear
354352
"""

0 commit comments

Comments
 (0)