Skip to content

Commit c19bfe8

Browse files
committed
comment
1 parent 048929b commit c19bfe8

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

lib/matplotlib/tests/test_collections.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ def test_set_wrong_linestyle():
706706

707707
@pytest.mark.parametrize('ls', ['', ' ', 'none'])
708708
def test_scatter_empty_linestyle_pdf(ls):
709+
# Regression test: '', ' ', and 'none' are documented "draw nothing"
710+
# linestyle aliases but were not recognized by _get_dash_pattern, causing
711+
# savefig to PDF to crash with "zero-size array to reduction operation maximum".
709712
plt.switch_backend('pdf')
710713
fig, ax = plt.subplots()
711714
ax.scatter([0, 1], [0, 1], ls=ls)

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ extend-exclude = [
184184
"doc/tutorials",
185185
"tools/gh_api.py",
186186
]
187+
target-version = "py311"
187188
line-length = 88
188189

189190
[tool.ruff.lint]
@@ -295,6 +296,7 @@ convention = "numpy"
295296
"galleries/users_explain/text/text_props.py" = ["E501"]
296297

297298
[tool.mypy]
299+
python_version = "3.11"
298300
ignore_missing_imports = true
299301
enable_error_code = [
300302
"ignore-without-code",

0 commit comments

Comments
 (0)