Skip to content

Commit 7df8039

Browse files
committed
Font outline code formatting.
1 parent bb83234 commit 7df8039

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
@@ -689,7 +689,8 @@ def test_point_size_method(self):
689689
self.assertRaises(TypeError, f.set_point_size, "15")
690690

691691
@unittest.skipIf(
692-
pygame.font.get_sdl_ttf_version() < (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
692+
pygame.font.get_sdl_ttf_version() < (2, 0, 12),
693+
"outlines were added in SDL_TTF 2.0.12",
693694
)
694695
def test_outline_property(self):
695696
if pygame_font.__name__ == "pygame.ftfont":
@@ -723,7 +724,8 @@ def test_incorrect_type():
723724
self.assertRaises(TypeError, test_incorrect_type)
724725

725726
@unittest.skipIf(
726-
pygame.font.get_sdl_ttf_version() >= (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
727+
pygame.font.get_sdl_ttf_version() >= (2, 0, 12),
728+
"outlines were added in SDL_TTF 2.0.12",
727729
)
728730
def test_outline_property_stub(self):
729731
if pygame_font.__name__ == "pygame.ftfont":
@@ -740,9 +742,9 @@ def test_outline_property_stub(self):
740742
with self.assertRaises(pygame.error):
741743
_ = f.outline
742744

743-
744745
@unittest.skipIf(
745-
pygame.font.get_sdl_ttf_version() < (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
746+
pygame.font.get_sdl_ttf_version() < (2, 0, 12),
747+
"outlines were added in SDL_TTF 2.0.12",
746748
)
747749
def test_outline_method(self):
748750
if pygame_font.__name__ == "pygame.ftfont":
@@ -764,7 +766,8 @@ def test_outline_method(self):
764766
self.assertRaises(TypeError, f.set_outline, "2")
765767

766768
@unittest.skipIf(
767-
pygame.font.get_sdl_ttf_version() >= (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
769+
pygame.font.get_sdl_ttf_version() >= (2, 0, 12),
770+
"outlines were added in SDL_TTF 2.0.12",
768771
)
769772
def test_outline_method_stub(self):
770773
if pygame_font.__name__ == "pygame.ftfont":
@@ -1288,7 +1291,8 @@ def test_bold_strikethrough(self):
12881291
self.assertTrue(self.query(bold=True, strikethrough=True))
12891292

12901293
@unittest.skipIf(
1291-
pygame.font.get_sdl_ttf_version() < (2, 0, 12), "outlines were added in SDL_TTF 2.0.12"
1294+
pygame.font.get_sdl_ttf_version() < (2, 0, 12),
1295+
"outlines were added in SDL_TTF 2.0.12",
12921296
)
12931297
def test_outline(self):
12941298
self.assertTrue(self.query(outline=1))

0 commit comments

Comments
 (0)