chore: clean packaging validation and config model
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
.pytest_cache
|
||||
/.coverage
|
||||
/htmlcov
|
||||
/build
|
||||
/dist
|
||||
*.egg-info/
|
||||
*.pyc
|
||||
.venv
|
||||
|
||||
@@ -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
|
||||
|
||||
+12
-3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user