HPI/my/simple.py
Dima Gerasimov 5ac5636e7f core: better support for ad-hoc configs
properly reload/unload the relevant modules so hopefully no more weird hacks should be required

relevant
- https://github.com/karlicoss/promnesia/issues/340
- https://github.com/karlicoss/HPI/issues/46
2023-02-09 02:35:09 +00:00

21 lines
359 B
Python

'''
Just a demo module for testing and documentation purposes
'''
from dataclasses import dataclass
from typing import Iterator
from my.core import make_config
from my.config import simple as user_config
@dataclass
class simple(user_config):
count: int
config = make_config(simple)
def items() -> Iterator[int]:
yield from range(config.count)