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 c59edad

Browse filesBrowse files
authored
Merge pull request #8281 from anntzer/fix-deprecated-syntax-py36
Fix testing with tests.py on Py3.6.
2 parents bab0fa3 + 01d56a6 commit c59edad
Copy full SHA for c59edad

File tree

Expand file treeCollapse file tree

5 files changed

+7
-12
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+7
-12
lines changed

‎lib/matplotlib/quiver.py

Copy file name to clipboardExpand all lines: lib/matplotlib/quiver.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
8888
'dots' or 'inches': pixels or inches, based on the figure dpi
8989
90-
'x', 'y', or 'xy': respectively *X*, *Y*, or :math:`\sqrt{X^2 + Y^2}`
90+
'x', 'y', or 'xy': respectively *X*, *Y*, or :math:`\\sqrt{X^2 + Y^2}`
9191
in data units
9292
9393
The arrows scale differently depending on the units. For

‎lib/matplotlib/style/core.py

Copy file name to clipboardExpand all lines: lib/matplotlib/style/core.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# Users may want multiple library paths, so store a list of paths.
3333
USER_LIBRARY_PATHS = [os.path.join(mpl._get_configdir(), 'stylelib')]
3434
STYLE_EXTENSION = 'mplstyle'
35-
STYLE_FILE_PATTERN = re.compile('([\S]+).%s$' % STYLE_EXTENSION)
35+
STYLE_FILE_PATTERN = re.compile(r'([\S]+).%s$' % STYLE_EXTENSION)
3636

3737

3838
# A list of rcParams that should not be applied from styles

‎lib/matplotlib/tests/test_dates.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_dates.py
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ def test_too_many_date_ticks():
9494
# setting equal datetimes triggers and expander call in
9595
# transforms.nonsingular which results in too many ticks in the
9696
# DayLocator. This should trigger a Locator.MAXTICKS RuntimeError
97-
warnings.filterwarnings(
98-
'ignore',
99-
'Attempting to set identical left==right results\\nin singular '
100-
'transformations; automatically expanding.\\nleft=\d*\.\d*, '
101-
'right=\d*\.\d*',
102-
UserWarning, module='matplotlib.axes')
10397
t0 = datetime.datetime(2000, 1, 20)
10498
tf = datetime.datetime(2000, 1, 20)
10599
fig = plt.figure()

‎lib/matplotlib/tests/test_text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_text.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def find_matplotlib_font(**kw):
3030
from matplotlib.font_manager import FontProperties, findfont
3131
warnings.filterwarnings(
3232
'ignore',
33-
"findfont: Font family \[u?'Foo'\] not found. Falling back to .",
33+
r"findfont: Font family \[u?'Foo'\] not found. Falling back to .",
3434
UserWarning,
3535
module='matplotlib.font_manager')
3636

‎tests.py

Copy file name to clipboardExpand all lines: tests.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414

1515
if __name__ == '__main__':
1616

17+
import dateutil.parser
1718
try:
1819
import setuptools
1920
except ImportError:
2021
pass
2122

2223
# The warnings need to be before any of matplotlib imports, but after
23-
# setuptools (if present) which has syntax error with the warnings enabled.
24-
# Filtering by module does not work as this will be raised by Python itself
25-
# so `module=matplotlib.*` is out of questions.
24+
# dateutil.parser and setuptools (if present) which has syntax error with
25+
# the warnings enabled. Filtering by module does not work as this will be
26+
# raised by Python itself so `module=matplotlib.*` is out of question.
2627

2728
import warnings
2829

0 commit comments

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