Skip to content

avoid mutable default arg in radar_plot#781

Open
RavSinghChandan wants to merge 1 commit into
huggingface:mainfrom
RavSinghChandan:fix-radar-plot-mutable-default
Open

avoid mutable default arg in radar_plot#781
RavSinghChandan wants to merge 1 commit into
huggingface:mainfrom
RavSinghChandan:fix-radar-plot-mutable-default

Conversation

@RavSinghChandan

Copy link
Copy Markdown

radar_plot uses invert_range=[] as a default arg. it's only read right now so it doesn't cause a bug today, but a shared mutable default is a footgun waiting to happen if anything ever mutates it. switched it to None with the usual if invert_range is None: invert_range = [] guard at the top.

behaviour is identical (empty invert_range → no metrics inverted). black/isort/flake8 clean.

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