Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b2306d

Browse filesBrowse files
committed
Modernize syntax
1 parent f9861ec commit 4b2306d
Copy full SHA for 4b2306d

File tree

3 files changed

+22
-20
lines changed
Filter options

3 files changed

+22
-20
lines changed

‎lib/matplotlib/backends/backend_agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_agg.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
import numpy as np
2929

3030
from matplotlib import verbose, rcParams
31-
from matplotlib.backend_bases import RendererBase,\
32-
FigureManagerBase, FigureCanvasBase
31+
from matplotlib.backend_bases import (RendererBase, FigureManagerBase,
32+
FigureCanvasBase)
3333
from matplotlib.cbook import is_string_like, maxdict, restrict_dict
3434
from matplotlib.figure import Figure
3535
from matplotlib.font_manager import findfont, get_font
36-
from matplotlib.ft2font import LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING, \
37-
LOAD_DEFAULT, LOAD_NO_AUTOHINT
36+
from matplotlib.ft2font import (LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING,
37+
LOAD_DEFAULT, LOAD_NO_AUTOHINT)
3838
from matplotlib.mathtext import MathTextParser
3939
from matplotlib.path import Path
4040
from matplotlib.transforms import Bbox, BboxBase

‎lib/matplotlib/backends/backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@
2929
import matplotlib
3030
from matplotlib import __version__, rcParams
3131
from matplotlib._pylab_helpers import Gcf
32-
from matplotlib.backend_bases import RendererBase, GraphicsContextBase,\
33-
FigureManagerBase, FigureCanvasBase
32+
from matplotlib.backend_bases import (RendererBase, GraphicsContextBase,
33+
FigureManagerBase, FigureCanvasBase)
3434
from matplotlib.backends.backend_mixed import MixedModeRenderer
35-
from matplotlib.cbook import Bunch, is_string_like, \
36-
get_realpath_and_stat, is_writable_file_like, maxdict
35+
from matplotlib.cbook import (Bunch, is_string_like, get_realpath_and_stat,
36+
is_writable_file_like, maxdict)
3737
from matplotlib.figure import Figure
3838
from matplotlib.font_manager import findfont, is_opentype_cff_font, get_font
3939
from matplotlib.afm import AFM
4040
import matplotlib.type1font as type1font
4141
import matplotlib.dviread as dviread
42-
from matplotlib.ft2font import FIXED_WIDTH, ITALIC, LOAD_NO_SCALE, \
43-
LOAD_NO_HINTING, KERNING_UNFITTED
42+
from matplotlib.ft2font import (FIXED_WIDTH, ITALIC, LOAD_NO_SCALE,
43+
LOAD_NO_HINTING, KERNING_UNFITTED)
4444
from matplotlib.mathtext import MathTextParser
4545
from matplotlib.transforms import Affine2D, BboxBase
4646
from matplotlib.path import Path
4747
from matplotlib import _path
48-
from matplotlib import _png
48+
from matplotlib import _pngp
4949
from matplotlib import ttconv
5050

5151
# Overview

‎lib/matplotlib/mathtext.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mathtext.py
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
import numpy as np
3434

3535
import pyparsing
36-
from pyparsing import Combine, Group, Optional, Forward, \
37-
Literal, OneOrMore, ZeroOrMore, ParseException, Empty, \
38-
ParseResults, Suppress, oneOf, StringEnd, ParseFatalException, \
39-
FollowedBy, Regex, ParserElement, QuotedString, ParseBaseException
36+
from pyparsing import (Combine, Group, Optional, Forward,
37+
Literal, OneOrMore, ZeroOrMore, ParseException, Empty,
38+
ParseResults, Suppress, oneOf, StringEnd, ParseFatalException,
39+
FollowedBy, Regex, ParserElement, QuotedString, ParseBaseException)
4040

4141
# Enable packrat parsing
4242
if (six.PY3 and
@@ -48,12 +48,14 @@
4848
ParserElement.enablePackrat()
4949

5050
from matplotlib.afm import AFM
51-
from matplotlib.cbook import Bunch, get_realpath_and_stat, \
52-
is_string_like, maxdict
53-
from matplotlib.ft2font import FT2Image, KERNING_DEFAULT, LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING
51+
from matplotlib.cbook import (Bunch, get_realpath_and_stat, is_string_like,
52+
maxdict)
53+
from matplotlib.ft2font import (FT2Image, KERNING_DEFAULT, LOAD_FORCE_AUTOHINT,
54+
LOAD_NO_HINTING)
5455
from matplotlib.font_manager import findfont, FontProperties, get_font
55-
from matplotlib._mathtext_data import latex_to_bakoma, \
56-
latex_to_standard, tex2uni, latex_to_cmex, stix_virtual_fonts
56+
from matplotlib._mathtext_data import (latex_to_bakoma, latex_to_standard,
57+
tex2uni, latex_to_cmex,
58+
stix_virtual_fonts)
5759
from matplotlib import get_data_path, rcParams
5860

5961
import matplotlib.colors as mcolors

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.