def say_hello() -> None: config = load_config() greeter = Greeter(languages=list(config.languages), greetings=list(config.greetings)) sentence = greeter.greet("world") print(green(sentence))
def test_greeter() -> None: greeter = Greeter(translations={"hello": {"es": "hola"}}) assert greeter.greet("test") == "Hola, test!"
def handler(event, context): config = load_config() greeter = Greeter(languages=config.languages, greetings=config.greetings) print(greeter.greet("world"))
def say_hello() -> None: greeting = Greeter().greet("Pantsbuild") print(green(greeting))
def test_greeter() -> None: greeter = Greeter(languages=["es"], greetings=["good morning"]) assert greeter.greet("world") == "Buenos días, world!"
def say_hello() -> None: config = load_config() greeter = Greeter(languages=list(config.languages), greetings=list(config.greetings)) sentence = greeter.greet("world") print(green(string_concat(sentence, ', nice to meet you')))