Skip to content

Commit df3f9e5

Browse files
committed
Font outline code formatting.
1 parent df1c36d commit df3f9e5

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src_c/font.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,8 @@ font_setter_outline(PyObject *self, PyObject *value, void *closure)
954954
static PyObject *
955955
font_get_outline(PyObject *self, PyObject *_null)
956956
{
957-
/* logic is identical to the getter, aside from the closure in the signature */
957+
/* logic is identical to the getter, aside from the closure in the
958+
* signature */
958959
return font_getter_outline(self, NULL);
959960
}
960961

@@ -963,8 +964,7 @@ font_set_outline(PyObject *self, PyObject *arg)
963964
{
964965
/* logic is identical to the setter, but we need to massage the return type
965966
from int to PyObject*) */
966-
if(font_setter_outline(self, arg, NULL) < 0)
967-
{
967+
if (font_setter_outline(self, arg, NULL) < 0) {
968968
return NULL;
969969
}
970970
return Py_None;

test/font_test.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@ def test_point_size_method(self):
686686
self.assertRaises(TypeError, f.set_point_size, "15")
687687

688688
@unittest.skipIf(
689-
pygame.font.get_sdl_ttf_version() < (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
689+
pygame.font.get_sdl_ttf_version() < (2, 0, 12),
690+
"outlines were added in SDL_TTF 2.0.12",
690691
)
691692
def test_outline_property(self):
692693
if pygame_font.__name__ == "pygame.ftfont":
@@ -720,7 +721,8 @@ def test_incorrect_type():
720721
self.assertRaises(TypeError, test_incorrect_type)
721722

722723
@unittest.skipIf(
723-
pygame.font.get_sdl_ttf_version() >= (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
724+
pygame.font.get_sdl_ttf_version() >= (2, 0, 12),
725+
"outlines were added in SDL_TTF 2.0.12",
724726
)
725727
def test_outline_property_stub(self):
726728
if pygame_font.__name__ == "pygame.ftfont":
@@ -737,9 +739,9 @@ def test_outline_property_stub(self):
737739
with self.assertRaises(pygame.error):
738740
_ = f.outline
739741

740-
741742
@unittest.skipIf(
742-
pygame.font.get_sdl_ttf_version() < (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
743+
pygame.font.get_sdl_ttf_version() < (2, 0, 12),
744+
"outlines were added in SDL_TTF 2.0.12",
743745
)
744746
def test_outline_method(self):
745747
if pygame_font.__name__ == "pygame.ftfont":
@@ -761,7 +763,8 @@ def test_outline_method(self):
761763
self.assertRaises(TypeError, f.set_outline, "2")
762764

763765
@unittest.skipIf(
764-
pygame.font.get_sdl_ttf_version() >= (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
766+
pygame.font.get_sdl_ttf_version() >= (2, 0, 12),
767+
"outlines were added in SDL_TTF 2.0.12",
765768
)
766769
def test_outline_method_stub(self):
767770
if pygame_font.__name__ == "pygame.ftfont":
@@ -1285,7 +1288,8 @@ def test_bold_strikethrough(self):
12851288
self.assertTrue(self.query(bold=True, strikethrough=True))
12861289

12871290
@unittest.skipIf(
1288-
pygame.font.get_sdl_ttf_version() < (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
1291+
pygame.font.get_sdl_ttf_version() < (2, 0, 12),
1292+
"outlines were added in SDL_TTF 2.0.12",
12891293
)
12901294
def test_outline(self):
12911295
self.assertTrue(self.query(outline=1))

0 commit comments

Comments
 (0)