Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 29, 2023
1 parent 365b6fe commit 71bf924
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/latexplotlib/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@


class Config:

def _open(self, path: Path) -> Dict[str, ConfigData]:
with path.open(encoding="utf-8") as fh:
config: Dict[str, ConfigData] = json.load(fh)
return config
def __init__(self, path: Path) -> None:
self.path = path

Expand All @@ -27,11 +32,6 @@ def __init__(self, path: Path) -> None:

self._config = self._open(path)

def _open(self, path: Path) -> Dict[str, ConfigData]:
with path.open(encoding="utf-8") as fh:
config: Dict[str, ConfigData] = json.load(fh)
return config

def _write(self, cfg: Mapping[str, ConfigData]) -> None:
with self.path.open("w", encoding="utf-8") as fh:
json.dump(cfg, fh, indent=4)
Expand Down

0 comments on commit 71bf924

Please sign in to comment.