Skip to content

SWR matplotlib__matplotlib-2720 - #22

Open
richeshgupta wants to merge 1 commit into
swr-base-ac9bf14from
swr-head-ac9bf14
Open

richeshgupta wants to merge 1 commit into
swr-base-ac9bf14from
swr-head-ac9bf14

Conversation

@richeshgupta

Copy link
Copy Markdown

SWRBench case matplotlib__matplotlib-2720: pinned base 2b9fced to head ac9bf14 of matplotlib#2720. Benchmark replay, not for merge.

@razorpay-slash razorpay-slash Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated code review

Reviewed up to ac9bf14.
All 5 reviewers completed.

# Users may want multiple library paths, so store a list of paths.
USER_LIBRARY_PATHS = [os.path.join('~', '.matplotlib', 'stylelib')]
USER_LIBRARY_PATHS = [os.path.join('~', '.matplotlib', 'stylelib'),
os.path.join('~', '.config', 'matplotlib', 'stylelib')]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] No test loads a style from the newly added ~/.config/matplotlib/stylelib library path

Issue

The added entry makes style discovery scan ~/.config/matplotlib/stylelib as well as ~/.matplotlib/stylelib, but no test places a style there and asserts it is discovered and applied. The PR's entire behaviour change, including precedence when the same style name exists in both user directories, can silently regress.

Evidence

SUSPECTED: in lib/matplotlib/style/tests/test_style.py, write customteststyle.mplstyle into os.path.expanduser(USER_LIBRARY_PATHS[1]), call matplotlib.style.reload_library(), and assert it appears in style.available and that style.use() applies it — this settles the claim and permanently pins the new path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants