Skip to content

Commit

Permalink
remove redundant function
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed May 21, 2024
1 parent bb6d107 commit cfe05a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage",
"commit": "d7c3bf0291f0d7eb2051e0228702580ea5a14da4",
"commit": "5642574eb8ecd68019da5dfaeaa51c305a798825",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
1 change: 0 additions & 1 deletion src/figanos/matplotlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Figanos plotting module."""

from ._style import get_mpl_styles
from .plot import (
gdfmap,
gridmap,
Expand Down
8 changes: 0 additions & 8 deletions src/figanos/matplotlib/_style.py

This file was deleted.

11 changes: 4 additions & 7 deletions src/figanos/matplotlib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,13 +1084,10 @@ def categorical_colors() -> dict[str, str]:
return cat


def get_mpl_styles() -> dict[str, str]:
"""Get the available matplotlib styles and their paths, as a dictionary."""
folder = pathlib.Path(__file__).parent / "style/"
paths = sorted(folder.glob("*.mplstyle"))
names = [str(p).split("/")[-1].removesuffix(".mplstyle") for p in paths]
styles = {str(name): path for name, path in zip(names, paths)}

def get_mpl_styles() -> dict[str, pathlib.Path]:
"""Get the available matplotlib styles and their paths as a dictionary."""
files = sorted(pathlib.Path(__file__).parent.joinpath("style").glob("*.mplstyle"))
styles = {style.stem: style for style in files}
return styles


Expand Down

0 comments on commit cfe05a3

Please sign in to comment.