idiombench / Python /train /3.8 /protocol /modern_21.py
SwashBuckler001's picture
IdiomBench (part 10)
c6ed2d8 verified
Raw History Blame Contribute Delete
298 Bytes
# file default_config.py
timeout = 100
one_flag = True
other_flag = False
# file main.py
import default_config
from typing import Protocol
class Options(Protocol):
timeout: int
one_flag: bool
other_flag: bool
def setup(options: Options) -> None:
...
setup(default_config) # OK