Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0bd1295

Browse files
committed
refactor: flake8 fix
1 parent f78ea06 commit 0bd1295

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/font_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,10 @@ def _expand_aliases(family):
11481148
family = 'sans-serif'
11491149
return rcParams['font.' + family]
11501150

1151+
def get_font_names(self):
1152+
"""Return the list of available fonts."""
1153+
return list(set([font.name for font in self.ttflist]))
1154+
11511155
# Each of the scoring functions below should return a value between
11521156
# 0.0 (perfect match) and 1.0 (terrible match)
11531157
def score_family(self, families, family2):
@@ -1331,10 +1335,6 @@ def findfont(self, prop, fontext='ttf', directory=None,
13311335
prop, fontext, directory, fallback_to_default, rebuild_if_missing,
13321336
rc_params)
13331337

1334-
def get_font_names(self):
1335-
"""Return the list of available fonts."""
1336-
return list(set([font.name for font in self.ttflist]))
1337-
13381338
def find_fonts_by_props(self, prop, fontext='ttf', directory=None,
13391339
fallback_to_default=True, rebuild_if_missing=True):
13401340
"""

0 commit comments

Comments
 (0)