diff --git a/.gitignore b/.gitignore index b81a9eb..b2a5dae 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,12 @@ .pytest_cache /.coverage /htmlcov +/build +/dist *.egg-info/ *.pyc .venv __pycache__ .devcontainer .vscode -.codex \ No newline at end of file +.codex diff --git a/.pylintrc b/.pylintrc index f26487b..51b45f9 100644 --- a/.pylintrc +++ b/.pylintrc @@ -30,10 +30,6 @@ persistent=yes # Specify a configuration file. #rcfile= -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages -suggestion-mode=yes - # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no diff --git a/stw_potsdam/config.py b/stw_potsdam/config.py index 95e39f6..a4c12c3 100644 --- a/stw_potsdam/config.py +++ b/stw_potsdam/config.py @@ -4,11 +4,20 @@ import configparser import io import os -from collections import namedtuple +from dataclasses import dataclass from functools import partial -Canteen = namedtuple('Canteen', - ('key', 'name', 'street', 'city', 'id', 'chash')) + +@dataclass(frozen=True) +class Canteen: + """Configured OpenMensa canteen mapping.""" + + key: str + name: str + street: str + city: str + id: str + chash: str def _get_config(filename):