from pathlib import Path from .match import Match class Matches: def __init__(self, logdir): self.data = [] self.names = [] for file in Path(logdir).iterdir(): if Path(file).suffix == '.json': self.data.append(Match.read_from_json(str(file))) self.names.append(Path(file).stem)