Skip to content

Commit b04dc1f

Browse files
committed
update docs
1 parent 50e9427 commit b04dc1f

File tree

4 files changed

+87
-97
lines changed

4 files changed

+87
-97
lines changed

docs/reST/ref/rect.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
.. include:: common.txt
22

3-
:mod:`pygame.rect`
3+
:mod:`pygame.Rect`
44
==================
55

6-
.. module:: pygame.rect
7-
:synopsis: pygame module for rect classes
8-
9-
| :sl:`pygame module for rect classes`
10-
11-
since version 2.2 there is another class called FRect that serves the same
12-
purpose as as `Rect` but it can hold floats instead of integers.
6+
.. currentmodule:: pygame
137

148
.. class:: Rect
159

1610
| :sl:`pygame object for storing rectangular coordinates`
1711
| :sg:`Rect(left, top, width, height) -> Rect`
1812
| :sg:`Rect((left, top), (width, height)) -> Rect`
1913
| :sg:`Rect(object) -> Rect`
14+
| :sg:`FRect(left, top, width, height) -> FRect`
15+
| :sg:`FRect((left, top), (width, height)) -> FRect`
16+
| :sg:`FRect(object) -> FRect`
17+
18+
.. versionchanged:: 2.2 Since version 2.2 there is another class called FRect that serves the same purpose as as `Rect` but it can hold floats instead of integers.
2019

2120
Pygame uses Rect objects to store and manipulate rectangular areas. A Rect
2221
can be created from a combination of left, top, width, and height values.
@@ -563,4 +562,4 @@ purpose as as `Rect` but it can hold floats instead of integers.
563562
564563
.. ## Rect.collidedictall ##
565564
566-
.. ## pygame.Rect ##
565+
.. ## pygame.Rect ##

docs/reST/themes/classic/elements.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h5>pygame documentation</h5>
3232
We render three sets of items based on how useful to most apps.
3333

3434
#}
35-
{%- set basic = ['Color', 'display', 'draw', 'event', 'font', 'image', 'key', 'locals', 'mixer', 'mouse', 'music', 'pygame', 'rect', 'Surface', 'time'] %}
35+
{%- set basic = ['Color', 'display', 'draw', 'event', 'font', 'image', 'key', 'locals', 'mixer', 'mouse', 'music', 'pygame', 'Rect', 'Surface', 'time'] %}
3636
{%- set advanced = ['BufferProxy', 'freetype', 'gfxdraw', 'midi', 'PixelArray', 'pixelcopy', 'sndarray', 'surfarray', 'cursors', 'joystick', 'mask', 'math', 'sprite', 'transform'] %}
3737
{%- set hidden = ['Overlay', 'cdrom', 'sdl2_video', 'sdl2_controller'] %}
3838
{%- if pyg_sections %}

src_c/doc/rect_doc.h

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */
2-
#define DOC_RECT "pygame module for rect classes"
3-
#define DOC_RECT_RECT "Rect(left, top, width, height) -> Rect\nRect((left, top), (width, height)) -> Rect\nRect(object) -> Rect\npygame object for storing rectangular coordinates"
4-
#define DOC_RECT_RECT_COPY "copy() -> Rect\ncopy the rectangle"
5-
#define DOC_RECT_RECT_MOVE "move(x, y) -> Rect\nmoves the rectangle"
6-
#define DOC_RECT_RECT_MOVEIP "move_ip(x, y) -> None\nmoves the rectangle, in place"
7-
#define DOC_RECT_RECT_INFLATE "inflate(x, y) -> Rect\ngrow or shrink the rectangle size"
8-
#define DOC_RECT_RECT_INFLATEIP "inflate_ip(x, y) -> None\ngrow or shrink the rectangle size, in place"
9-
#define DOC_RECT_RECT_UPDATE "update(left, top, width, height) -> None\nupdate((left, top), (width, height)) -> None\nupdate(object) -> None\nsets the position and size of the rectangle"
10-
#define DOC_RECT_RECT_CLAMP "clamp(Rect) -> Rect\nmoves the rectangle inside another"
11-
#define DOC_RECT_RECT_CLAMPIP "clamp_ip(Rect) -> None\nmoves the rectangle inside another, in place"
12-
#define DOC_RECT_RECT_CLIP "clip(Rect) -> Rect\ncrops a rectangle inside another"
13-
#define DOC_RECT_RECT_CLIPLINE "clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))\nclipline(x1, y1, x2, y2) -> ()\nclipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))\nclipline((x1, y1), (x2, y2)) -> ()\nclipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))\nclipline((x1, y1, x2, y2)) -> ()\nclipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))\nclipline(((x1, y1), (x2, y2))) -> ()\ncrops a line inside a rectangle"
14-
#define DOC_RECT_RECT_UNION "union(Rect) -> Rect\njoins two rectangles into one"
15-
#define DOC_RECT_RECT_UNIONIP "union_ip(Rect) -> None\njoins two rectangles into one, in place"
16-
#define DOC_RECT_RECT_UNIONALL "unionall(Rect_sequence) -> Rect\nthe union of many rectangles"
17-
#define DOC_RECT_RECT_UNIONALLIP "unionall_ip(Rect_sequence) -> None\nthe union of many rectangles, in place"
18-
#define DOC_RECT_RECT_FIT "fit(Rect) -> Rect\nresize and move a rectangle with aspect ratio"
19-
#define DOC_RECT_RECT_NORMALIZE "normalize() -> None\ncorrect negative sizes"
20-
#define DOC_RECT_RECT_CONTAINS "contains(Rect) -> bool\ntest if one rectangle is inside another"
21-
#define DOC_RECT_RECT_COLLIDEPOINT "collidepoint(x, y) -> bool\ncollidepoint((x,y)) -> bool\ntest if a point is inside a rectangle"
22-
#define DOC_RECT_RECT_COLLIDERECT "colliderect(Rect) -> bool\ntest if two rectangles overlap"
23-
#define DOC_RECT_RECT_COLLIDELIST "collidelist(list) -> index\ntest if one rectangle in a list intersects"
24-
#define DOC_RECT_RECT_COLLIDELISTALL "collidelistall(list) -> indices\ntest if all rectangles in a list intersect"
25-
#define DOC_RECT_RECT_COLLIDEOBJECTS "collideobjects(rect_list) -> object\ncollideobjects(obj_list, key=func) -> object\ntest if any object in a list intersects"
26-
#define DOC_RECT_RECT_COLLIDEOBJECTSALL "collideobjectsall(rect_list) -> objects\ncollideobjectsall(obj_list, key=func) -> objects\ntest if all objects in a list intersect"
27-
#define DOC_RECT_RECT_COLLIDEDICT "collidedict(dict) -> (key, value)\ncollidedict(dict) -> None\ncollidedict(dict, use_values=0) -> (key, value)\ncollidedict(dict, use_values=0) -> None\ntest if one rectangle in a dictionary intersects"
28-
#define DOC_RECT_RECT_COLLIDEDICTALL "collidedictall(dict) -> [(key, value), ...]\ncollidedictall(dict, use_values=0) -> [(key, value), ...]\ntest if all rectangles in a dictionary intersect"
2+
#define DOC_RECT "Rect(left, top, width, height) -> Rect\nRect((left, top), (width, height)) -> Rect\nRect(object) -> Rect\nFRect(left, top, width, height) -> FRect\nFRect((left, top), (width, height)) -> FRect\nFRect(object) -> FRect\npygame object for storing rectangular coordinates"
3+
#define DOC_RECT_COPY "copy() -> Rect\ncopy the rectangle"
4+
#define DOC_RECT_MOVE "move(x, y) -> Rect\nmoves the rectangle"
5+
#define DOC_RECT_MOVEIP "move_ip(x, y) -> None\nmoves the rectangle, in place"
6+
#define DOC_RECT_INFLATE "inflate(x, y) -> Rect\ngrow or shrink the rectangle size"
7+
#define DOC_RECT_INFLATEIP "inflate_ip(x, y) -> None\ngrow or shrink the rectangle size, in place"
8+
#define DOC_RECT_UPDATE "update(left, top, width, height) -> None\nupdate((left, top), (width, height)) -> None\nupdate(object) -> None\nsets the position and size of the rectangle"
9+
#define DOC_RECT_CLAMP "clamp(Rect) -> Rect\nmoves the rectangle inside another"
10+
#define DOC_RECT_CLAMPIP "clamp_ip(Rect) -> None\nmoves the rectangle inside another, in place"
11+
#define DOC_RECT_CLIP "clip(Rect) -> Rect\ncrops a rectangle inside another"
12+
#define DOC_RECT_CLIPLINE "clipline(x1, y1, x2, y2) -> ((cx1, cy1), (cx2, cy2))\nclipline(x1, y1, x2, y2) -> ()\nclipline((x1, y1), (x2, y2)) -> ((cx1, cy1), (cx2, cy2))\nclipline((x1, y1), (x2, y2)) -> ()\nclipline((x1, y1, x2, y2)) -> ((cx1, cy1), (cx2, cy2))\nclipline((x1, y1, x2, y2)) -> ()\nclipline(((x1, y1), (x2, y2))) -> ((cx1, cy1), (cx2, cy2))\nclipline(((x1, y1), (x2, y2))) -> ()\ncrops a line inside a rectangle"
13+
#define DOC_RECT_UNION "union(Rect) -> Rect\njoins two rectangles into one"
14+
#define DOC_RECT_UNIONIP "union_ip(Rect) -> None\njoins two rectangles into one, in place"
15+
#define DOC_RECT_UNIONALL "unionall(Rect_sequence) -> Rect\nthe union of many rectangles"
16+
#define DOC_RECT_UNIONALLIP "unionall_ip(Rect_sequence) -> None\nthe union of many rectangles, in place"
17+
#define DOC_RECT_FIT "fit(Rect) -> Rect\nresize and move a rectangle with aspect ratio"
18+
#define DOC_RECT_NORMALIZE "normalize() -> None\ncorrect negative sizes"
19+
#define DOC_RECT_CONTAINS "contains(Rect) -> bool\ntest if one rectangle is inside another"
20+
#define DOC_RECT_COLLIDEPOINT "collidepoint(x, y) -> bool\ncollidepoint((x,y)) -> bool\ntest if a point is inside a rectangle"
21+
#define DOC_RECT_COLLIDERECT "colliderect(Rect) -> bool\ntest if two rectangles overlap"
22+
#define DOC_RECT_COLLIDELIST "collidelist(list) -> index\ntest if one rectangle in a list intersects"
23+
#define DOC_RECT_COLLIDELISTALL "collidelistall(list) -> indices\ntest if all rectangles in a list intersect"
24+
#define DOC_RECT_COLLIDEOBJECTS "collideobjects(rect_list) -> object\ncollideobjects(obj_list, key=func) -> object\ntest if any object in a list intersects"
25+
#define DOC_RECT_COLLIDEOBJECTSALL "collideobjectsall(rect_list) -> objects\ncollideobjectsall(obj_list, key=func) -> objects\ntest if all objects in a list intersect"
26+
#define DOC_RECT_COLLIDEDICT "collidedict(dict) -> (key, value)\ncollidedict(dict) -> None\ncollidedict(dict, use_values=0) -> (key, value)\ncollidedict(dict, use_values=0) -> None\ntest if one rectangle in a dictionary intersects"
27+
#define DOC_RECT_COLLIDEDICTALL "collidedictall(dict) -> [(key, value), ...]\ncollidedictall(dict, use_values=0) -> [(key, value), ...]\ntest if all rectangles in a dictionary intersect"

src_c/rect.c

Lines changed: 52 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -440,98 +440,92 @@ four_floats_from_obj(PyObject *obj, float *val1, float *val2, float *val3,
440440

441441
static struct PyMethodDef pg_rect_methods[] = {
442442
{"normalize", (PyCFunction)pg_rect_normalize, METH_NOARGS,
443-
DOC_RECT_RECT_NORMALIZE},
444-
{"clip", (PyCFunction)pg_rect_clip, METH_VARARGS, DOC_RECT_RECT_CLIP},
443+
DOC_RECT_NORMALIZE},
444+
{"clip", (PyCFunction)pg_rect_clip, METH_VARARGS, DOC_RECT_CLIP},
445445
{"clipline", (PyCFunction)pg_rect_clipline, METH_VARARGS,
446-
DOC_RECT_RECT_CLIPLINE},
447-
{"clamp", (PyCFunction)pg_rect_clamp, METH_VARARGS, DOC_RECT_RECT_CLAMP},
446+
DOC_RECT_CLIPLINE},
447+
{"clamp", (PyCFunction)pg_rect_clamp, METH_VARARGS, DOC_RECT_CLAMP},
448448
{"clamp_ip", (PyCFunction)pg_rect_clamp_ip, METH_VARARGS,
449-
DOC_RECT_RECT_CLAMPIP},
450-
{"copy", (PyCFunction)pg_rect_copy, METH_NOARGS, DOC_RECT_RECT_COPY},
451-
{"fit", (PyCFunction)pg_rect_fit, METH_VARARGS, DOC_RECT_RECT_FIT},
452-
{"move", (PyCFunction)pg_rect_move, METH_VARARGS, DOC_RECT_RECT_MOVE},
453-
{"update", (PyCFunction)pg_rect_update, METH_VARARGS,
454-
DOC_RECT_RECT_UPDATE},
455-
{"inflate", (PyCFunction)pg_rect_inflate, METH_VARARGS,
456-
DOC_RECT_RECT_INFLATE},
457-
{"union", (PyCFunction)pg_rect_union, METH_VARARGS, DOC_RECT_RECT_UNION},
449+
DOC_RECT_CLAMPIP},
450+
{"copy", (PyCFunction)pg_rect_copy, METH_NOARGS, DOC_RECT_COPY},
451+
{"fit", (PyCFunction)pg_rect_fit, METH_VARARGS, DOC_RECT_FIT},
452+
{"move", (PyCFunction)pg_rect_move, METH_VARARGS, DOC_RECT_MOVE},
453+
{"update", (PyCFunction)pg_rect_update, METH_VARARGS, DOC_RECT_UPDATE},
454+
{"inflate", (PyCFunction)pg_rect_inflate, METH_VARARGS, DOC_RECT_INFLATE},
455+
{"union", (PyCFunction)pg_rect_union, METH_VARARGS, DOC_RECT_UNION},
458456
{"unionall", (PyCFunction)pg_rect_unionall, METH_VARARGS,
459-
DOC_RECT_RECT_UNIONALL},
460-
{"move_ip", (PyCFunction)pg_rect_move_ip, METH_VARARGS,
461-
DOC_RECT_RECT_MOVEIP},
457+
DOC_RECT_UNIONALL},
458+
{"move_ip", (PyCFunction)pg_rect_move_ip, METH_VARARGS, DOC_RECT_MOVEIP},
462459
{"inflate_ip", (PyCFunction)pg_rect_inflate_ip, METH_VARARGS,
463-
DOC_RECT_RECT_INFLATEIP},
460+
DOC_RECT_INFLATEIP},
464461
{"union_ip", (PyCFunction)pg_rect_union_ip, METH_VARARGS,
465-
DOC_RECT_RECT_UNIONIP},
462+
DOC_RECT_UNIONIP},
466463
{"unionall_ip", (PyCFunction)pg_rect_unionall_ip, METH_VARARGS,
467-
DOC_RECT_RECT_UNIONALLIP},
464+
DOC_RECT_UNIONALLIP},
468465
{"collidepoint", (PyCFunction)pg_rect_collidepoint, METH_FASTCALL,
469-
DOC_RECT_RECT_COLLIDEPOINT},
466+
DOC_RECT_COLLIDEPOINT},
470467
{"colliderect", (PyCFunction)pg_rect_colliderect, METH_FASTCALL,
471-
DOC_RECT_RECT_COLLIDERECT},
468+
DOC_RECT_COLLIDERECT},
472469
{"collidelist", (PyCFunction)pg_rect_collidelist, METH_O,
473-
DOC_RECT_RECT_COLLIDELIST},
470+
DOC_RECT_COLLIDELIST},
474471
{"collidelistall", (PyCFunction)pg_rect_collidelistall, METH_O,
475-
DOC_RECT_RECT_COLLIDELISTALL},
472+
DOC_RECT_COLLIDELISTALL},
476473
{"collidedict", (PyCFunction)pg_rect_collidedict, METH_VARARGS,
477-
DOC_RECT_RECT_COLLIDEDICT},
474+
DOC_RECT_COLLIDEDICT},
478475
{"collidedictall", (PyCFunction)pg_rect_collidedictall, METH_VARARGS,
479-
DOC_RECT_RECT_COLLIDEDICTALL},
476+
DOC_RECT_COLLIDEDICTALL},
480477
{"collideobjectsall", (PyCFunction)pg_rect_collideobjectsall,
481-
METH_VARARGS | METH_KEYWORDS, DOC_RECT_RECT_COLLIDEOBJECTSALL},
478+
METH_VARARGS | METH_KEYWORDS, DOC_RECT_COLLIDEOBJECTSALL},
482479
{"collideobjects", (PyCFunction)pg_rect_collideobjects,
483-
METH_VARARGS | METH_KEYWORDS, DOC_RECT_RECT_COLLIDEOBJECTS},
480+
METH_VARARGS | METH_KEYWORDS, DOC_RECT_COLLIDEOBJECTS},
484481
{"contains", (PyCFunction)pg_rect_contains, METH_VARARGS,
485-
DOC_RECT_RECT_CONTAINS},
482+
DOC_RECT_CONTAINS},
486483
{"__reduce__", (PyCFunction)pg_rect_reduce, METH_NOARGS, NULL},
487484
{"__copy__", (PyCFunction)pg_rect_copy, METH_NOARGS, NULL},
488485
{NULL, NULL, 0, NULL}};
489486

490487
static struct PyMethodDef pg_frect_methods[] = {
491488
{"normalize", (PyCFunction)pg_frect_normalize, METH_NOARGS,
492-
DOC_RECT_RECT_NORMALIZE},
493-
{"clip", (PyCFunction)pg_frect_clip, METH_VARARGS, DOC_RECT_RECT_CLIP},
489+
DOC_RECT_NORMALIZE},
490+
{"clip", (PyCFunction)pg_frect_clip, METH_VARARGS, DOC_RECT_CLIP},
494491
{"clipline", (PyCFunction)pg_frect_clipline, METH_VARARGS,
495-
DOC_RECT_RECT_CLIPLINE},
496-
{"clamp", (PyCFunction)pg_frect_clamp, METH_VARARGS, DOC_RECT_RECT_CLAMP},
492+
DOC_RECT_CLIPLINE},
493+
{"clamp", (PyCFunction)pg_frect_clamp, METH_VARARGS, DOC_RECT_CLAMP},
497494
{"clamp_ip", (PyCFunction)pg_frect_clamp_ip, METH_VARARGS,
498-
DOC_RECT_RECT_CLAMPIP},
499-
{"copy", (PyCFunction)pg_frect_copy, METH_NOARGS, DOC_RECT_RECT_COPY},
500-
{"fit", (PyCFunction)pg_frect_fit, METH_VARARGS, DOC_RECT_RECT_FIT},
501-
{"move", (PyCFunction)pg_frect_move, METH_VARARGS, DOC_RECT_RECT_MOVE},
502-
{"update", (PyCFunction)pg_frect_update, METH_VARARGS,
503-
DOC_RECT_RECT_UPDATE},
504-
{"inflate", (PyCFunction)pg_frect_inflate, METH_VARARGS,
505-
DOC_RECT_RECT_INFLATE},
506-
{"union", (PyCFunction)pg_frect_union, METH_VARARGS, DOC_RECT_RECT_UNION},
495+
DOC_RECT_CLAMPIP},
496+
{"copy", (PyCFunction)pg_frect_copy, METH_NOARGS, DOC_RECT_COPY},
497+
{"fit", (PyCFunction)pg_frect_fit, METH_VARARGS, DOC_RECT_FIT},
498+
{"move", (PyCFunction)pg_frect_move, METH_VARARGS, DOC_RECT_MOVE},
499+
{"update", (PyCFunction)pg_frect_update, METH_VARARGS, DOC_RECT_UPDATE},
500+
{"inflate", (PyCFunction)pg_frect_inflate, METH_VARARGS, DOC_RECT_INFLATE},
501+
{"union", (PyCFunction)pg_frect_union, METH_VARARGS, DOC_RECT_UNION},
507502
{"unionall", (PyCFunction)pg_frect_unionall, METH_VARARGS,
508-
DOC_RECT_RECT_UNIONALL},
509-
{"move_ip", (PyCFunction)pg_frect_move_ip, METH_VARARGS,
510-
DOC_RECT_RECT_MOVEIP},
503+
DOC_RECT_UNIONALL},
504+
{"move_ip", (PyCFunction)pg_frect_move_ip, METH_VARARGS, DOC_RECT_MOVEIP},
511505
{"inflate_ip", (PyCFunction)pg_frect_inflate_ip, METH_VARARGS,
512-
DOC_RECT_RECT_INFLATEIP},
506+
DOC_RECT_INFLATEIP},
513507
{"union_ip", (PyCFunction)pg_frect_union_ip, METH_VARARGS,
514-
DOC_RECT_RECT_UNIONIP},
508+
DOC_RECT_UNIONIP},
515509
{"unionall_ip", (PyCFunction)pg_frect_unionall_ip, METH_VARARGS,
516-
DOC_RECT_RECT_UNIONALLIP},
510+
DOC_RECT_UNIONALLIP},
517511
{"collidepoint", (PyCFunction)pg_frect_collidepoint, METH_FASTCALL,
518-
DOC_RECT_RECT_COLLIDEPOINT},
512+
DOC_RECT_COLLIDEPOINT},
519513
{"colliderect", (PyCFunction)pg_frect_colliderect, METH_FASTCALL,
520-
DOC_RECT_RECT_COLLIDERECT},
514+
DOC_RECT_COLLIDERECT},
521515
{"collidelist", (PyCFunction)pg_frect_collidelist, METH_O,
522-
DOC_RECT_RECT_COLLIDELIST},
516+
DOC_RECT_COLLIDELIST},
523517
{"collidelistall", (PyCFunction)pg_frect_collidelistall, METH_O,
524-
DOC_RECT_RECT_COLLIDELISTALL},
518+
DOC_RECT_COLLIDELISTALL},
525519
{"collidedict", (PyCFunction)pg_frect_collidedict, METH_VARARGS,
526-
DOC_RECT_RECT_COLLIDEDICT},
520+
DOC_RECT_COLLIDEDICT},
527521
{"collidedictall", (PyCFunction)pg_frect_collidedictall, METH_VARARGS,
528-
DOC_RECT_RECT_COLLIDEDICTALL},
522+
DOC_RECT_COLLIDEDICTALL},
529523
{"collideobjectsall", (PyCFunction)pg_frect_collideobjectsall,
530-
METH_VARARGS | METH_KEYWORDS, DOC_RECT_RECT_COLLIDEOBJECTSALL},
524+
METH_VARARGS | METH_KEYWORDS, DOC_RECT_COLLIDEOBJECTSALL},
531525
{"collideobjects", (PyCFunction)pg_frect_collideobjects,
532-
METH_VARARGS | METH_KEYWORDS, DOC_RECT_RECT_COLLIDEOBJECTS},
526+
METH_VARARGS | METH_KEYWORDS, DOC_RECT_COLLIDEOBJECTS},
533527
{"contains", (PyCFunction)pg_frect_contains, METH_VARARGS,
534-
DOC_RECT_RECT_CONTAINS},
528+
DOC_RECT_CONTAINS},
535529
{"__reduce__", (PyCFunction)pg_frect_reduce, METH_NOARGS, NULL},
536530
{"__copy__", (PyCFunction)pg_frect_copy, METH_NOARGS, NULL},
537531
{NULL, NULL, 0, NULL}};
@@ -716,8 +710,7 @@ static PyTypeObject pgRect_Type = {
716710
.tp_as_sequence = &pg_rect_as_sequence,
717711
.tp_as_mapping = &pg_rect_as_mapping, .tp_str = (reprfunc)pg_rect_str,
718712
/* Space for future expansion */
719-
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
720-
.tp_doc = DOC_RECT_RECT,
713+
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_RECT,
721714
.tp_richcompare = (richcmpfunc)pg_rect_richcompare,
722715
.tp_weaklistoffset = offsetof(pgRectObject, weakreflist),
723716
.tp_iter = (getiterfunc)pg_rect_iterator, .tp_methods = pg_rect_methods,
@@ -734,8 +727,7 @@ static PyTypeObject pgFRect_Type = {
734727
.tp_as_sequence = &pg_frect_as_sequence,
735728
.tp_as_mapping = &pg_frect_as_mapping, .tp_str = (reprfunc)pg_frect_str,
736729
/* Space for future expansion */
737-
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
738-
.tp_doc = DOC_RECT_RECT,
730+
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = DOC_RECT,
739731
.tp_richcompare = (richcmpfunc)pg_frect_richcompare,
740732
.tp_weaklistoffset = offsetof(pgFRectObject, weakreflist),
741733
.tp_iter = (getiterfunc)pg_frect_iterator, .tp_methods = pg_frect_methods,

0 commit comments

Comments
 (0)