chore: clean packaging validation and config model
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
.pytest_cache
|
.pytest_cache
|
||||||
/.coverage
|
/.coverage
|
||||||
/htmlcov
|
/htmlcov
|
||||||
|
/build
|
||||||
|
/dist
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
*.pyc
|
*.pyc
|
||||||
.venv
|
.venv
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ persistent=yes
|
|||||||
# Specify a configuration file.
|
# Specify a configuration file.
|
||||||
#rcfile=
|
#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
|
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||||
# active Python interpreter and may run arbitrary code.
|
# active Python interpreter and may run arbitrary code.
|
||||||
unsafe-load-any-extension=no
|
unsafe-load-any-extension=no
|
||||||
|
|||||||
+12
-3
@@ -4,11 +4,20 @@ import configparser
|
|||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from collections import namedtuple
|
from dataclasses import dataclass
|
||||||
from functools import partial
|
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):
|
def _get_config(filename):
|
||||||
|
|||||||
Reference in New Issue
Block a user