Skip to content

Commit d2ca0b5

Browse files
committed
Update docs, update error message, pin astroid version to a non-broken version
1 parent 4021ee0 commit d2ca0b5

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

buildconfig/stubs/pygame/transform.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def hsl(
463463
def pixelate(
464464
surface: Surface,
465465
pixel_size: int,
466-
dest_surface: Optional[Surface] = None
466+
dest_surface: Optional[Surface] = None,
467467
) -> Surface:
468468
"""Returns a pixelated version of the original surface.
469469

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ requires = [
6060
"sphinx<=8.1.3",
6161
"sphinx-autoapi<=3.3.2",
6262
"pyproject-metadata!=0.9.1",
63+
"astroid<=3.3.8",
6364
]
6465
build-backend = 'mesonpy'
6566

src_c/doc/transform_doc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
#define DOC_TRANSFORM_SOLIDOVERLAY "solid_overlay(surface, color, dest_surface=None, keep_alpha=False) -> Surface\nReplaces non transparent pixels with the provided color."
2222
#define DOC_TRANSFORM_THRESHOLD "threshold(dest_surface, surface, search_color, threshold=(0, 0, 0, 0), set_color=(0, 0, 0, 0), set_behavior=1, search_surf=None, inverse_set=False) -> int\nFinds which, and how many pixels in a surface are within a threshold of a 'search_color' or a 'search_surf'."
2323
#define DOC_TRANSFORM_HSL "hsl(surface, hue=0, saturation=0, lightness=0, dest_surface=None) -> Surface\nChange the hue, saturation, and lightness of a surface."
24+
#define DOC_TRANSFORM_PIXELATE "pixelate(surface, pixel_size, dest_surface=None) -> Surface\nReturns a pixelated version of the original surface."

src_c/transform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4248,13 +4248,13 @@ surf_pixelate(PyObject *self, PyObject *args, PyObject *kwargs)
42484248

42494249
if (testWidth > INT_MAX || testWidth <= 0) {
42504250
PyErr_SetString(PyExc_OverflowError,
4251-
"Cannot scale width outside the range [0, INT_MAX]");
4251+
"Cannot scale width outside the range (0, INT_MAX]");
42524252
return NULL;
42534253
}
42544254

42554255
if (testHeight > INT_MAX || testHeight <= 0) {
42564256
PyErr_SetString(PyExc_OverflowError,
4257-
"Cannot scale height outside the range [0, INT_MAX]");
4257+
"Cannot scale height outside the range (0, INT_MAX]");
42584258
return NULL;
42594259
}
42604260

0 commit comments

Comments
 (0)