Skip to content

Commit 15db41c

Browse files
committed
Run lint
1 parent dfeada8 commit 15db41c

File tree

7 files changed

+26
-11
lines changed

7 files changed

+26
-11
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
coverage report
5959
coverage html
6060
coverage xml
61-
- uses: codecov/codecov-action@v1
61+
- uses: codecov/codecov-action@v3
6262
with:
6363
file: ./.coverage/coverage.xml
6464
- uses: actions/upload-artifact@v3

manimpango/cmanimpango.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from glib cimport *
21
from cairo cimport *
2+
from glib cimport *
33
from pango cimport *

manimpango/cmanimpango.pyx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import typing
2+
import warnings
13
from xml.sax.saxutils import escape
2-
from .utils import *
4+
35
from .enums import Alignment
4-
import warnings
5-
import typing
6+
from .utils import *
7+
68

79
class TextSetting:
810
"""Formatting for slices of a :class:`manim.mobject.svg.text_mobject.Text` object."""

manimpango/enums.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from enum import Enum
2+
23
from pango cimport *
4+
5+
36
class Style(Enum):
47
"""
58
An enumeration specifying the various slant styles possible for a font.

manimpango/pango.pxd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
from glib cimport *
21
from cairo cimport *
2+
from glib cimport *
3+
4+
35
cdef extern from "pango/pangocairo.h":
46
int PANGO_SCALE
57
int pango_units_from_double(double d)

manimpango/register_font.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from pathlib import Path
2+
23
from pango cimport *
4+
35
import os
46

7+
58
cpdef bint fc_register_font(str font_path):
69
"""This function registers the font file using ``fontconfig`` so that
710
it is available for use by Pango. On Linux it is aliased to

tests/svg_tester.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,18 @@ def func(name, attrs):
116116
if name == "g":
117117
if "style" in attrs:
118118
styles.append(self.parse_style(attrs["style"]))
119-
if "fill" in attrs or "fill-opacity" in attrs or "stroke" in attrs or "stroke-opacity" in attrs:
119+
if (
120+
"fill" in attrs
121+
or "fill-opacity" in attrs
122+
or "stroke" in attrs
123+
or "stroke-opacity" in attrs
124+
):
120125
styles.append(
121126
self.parse_style(
122-
f"fill:{attrs.get('fill', self.SVG_DEFAULT_ATTRIBUTES['fill'])};"
123-
f"fill-opacity:{attrs.get('fill-opacity', self.SVG_DEFAULT_ATTRIBUTES['fill-opacity'])};"
124-
f"stroke:{attrs.get('stroke', self.SVG_DEFAULT_ATTRIBUTES['stroke'])};"
125-
f"stroke-opacity:{attrs.get('stroke-opacity', self.SVG_DEFAULT_ATTRIBUTES['stroke-opacity'])};"
127+
f"fill:{attrs.get('fill', self.SVG_DEFAULT_ATTRIBUTES['fill'])};" # noqa: E501
128+
f"fill-opacity:{attrs.get('fill-opacity', self.SVG_DEFAULT_ATTRIBUTES['fill-opacity'])};" # noqa: E501
129+
f"stroke:{attrs.get('stroke', self.SVG_DEFAULT_ATTRIBUTES['stroke'])};" # noqa: E501
130+
f"stroke-opacity:{attrs.get('stroke-opacity', self.SVG_DEFAULT_ATTRIBUTES['stroke-opacity'])};" # noqa: E501
126131
)
127132
)
128133
if styles:

0 commit comments

Comments
 (0)