nmfspalette icon indicating copy to clipboard operation
nmfspalette copied to clipboard

Minimize global objects

Open sbreitbart-NOAA opened this issue 7 months ago • 0 comments

Hmm, yes, I think it is a global, then - perhaps a cleaner thing to do more in line with a functional coding style is to make a function, perhaps get_nmfs_palettes(), that returns the list object that can then be called when wanting to use nmfs_palette. I also noticed nmfs_colors appears to be a global object as well.

This seems like it's not really in scope for this PR, so feel free to leave as is and perhaps open an issue to work in the future - or don't, because the package is really small, so the risk of globals is probably not a big issue right now.

Originally posted by @k-doering-NOAA in https://github.com/nmfs-ost/nmfspalette/pull/67#discussion_r2178358164

sbreitbart-NOAA avatar Jul 01 '25 19:07 sbreitbart-NOAA