Skip to content

fix matplotlib 3.11 breaking change - #44

Merged
JosephBARBIERDARNAL merged 1 commit into
mainfrom
mpl-311
Jun 24, 2026
Merged

JosephBARBIERDARNAL merged 1 commit into
mainfrom
mpl-311

Conversation

@JosephBARBIERDARNAL

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3e06483d-eea0-4c09-a1b5-ead70e4b93c7

📥 Commits

Reviewing files that changed from the base of the PR and between 5be1469 and 66815ae.

📒 Files selected for processing (3)
  • pyfonts/main.py
  • pyfonts/utils.py
  • tests/test_set_default.py

📝 Walkthrough

Walkthrough

Font provider metadata is now stored as a typed dataclass, consumed through attributes in font-loading paths, and covered by a regression test for Matplotlib 3.11 hashing behavior.

Changes

Font provider metadata typing

Layer / File(s) Summary
Dataclass metadata storage
pyfonts/utils.py
FontProperties metadata is stored as a frozen dataclass, and the getter returns that typed object instead of a dict.
Attribute-based consumers and regression test
pyfonts/main.py, tests/test_set_default.py
Default-family lookup and variant loading read provider metadata through attributes, and a regression test patches FontProperties.__hash__ before checking the Urbanist default family.

Estimated review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • y-sunflower/pyfonts#39: Refactors font-provider metadata storage and retrieval in the same code path, including attribute-based access in main.py.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided, so the change intent can't be assessed from the PR text. Add a brief description of the compatibility fix and the affected code paths.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: a Matplotlib 3.11 compatibility fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mpl-311

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JosephBARBIERDARNAL
JosephBARBIERDARNAL merged commit 0875dce into main Jun 24, 2026
8 of 9 checks passed
@JosephBARBIERDARNAL
JosephBARBIERDARNAL deleted the mpl-311 branch June 24, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant