Skip to content

Commit

Permalink
Merge pull request #97 from h2020charisma/fix-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
kerberizer authored Oct 30, 2023
2 parents 2f19464 + 8d9aca7 commit 91e7794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/ramanchada2/io/experimental/rc1_parser/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ def parse(source_path, file_type=None):

def cleanMeta(meta):
# This cleans complex-strcutures metadata, and returns a dict
if type(meta) == dict:
if isinstance(meta, dict):
meta = {i: meta[i] for i in meta if i != ""}
for key, value in meta.items():
meta[key] = cleanMeta(value)
if type(meta) == list:
if isinstance(meta, list):
for ii, value in enumerate(meta):
meta[ii] = cleanMeta(value)
if type(meta) == str:
if isinstance(meta, str):
meta = meta.replace('\\x00', '')
meta = meta.replace('\x00', '')
if type(meta) == bytes:
if isinstance(meta, bytes):
try:
meta = meta.decode('utf-8')
meta = cleanMeta(meta)
Expand Down
3 changes: 2 additions & 1 deletion src/ramanchada2/misc/plottable.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from __future__ import annotations
from abc import ABC, abstractmethod
from matplotlib.axes import Axes
import matplotlib.pyplot as plt


class Plottable(ABC):
def plot(self, ax=None, label=' ', **kwargs) -> plt.axes:
def plot(self, ax=None, label=' ', **kwargs) -> Axes:
if ax is None:
fig, ax = plt.subplots(1)
self._plot(ax, label=label, **kwargs)
Expand Down

0 comments on commit 91e7794

Please sign in to comment.