question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prompt self-templating

See original GitHub issue

We need to go from:

# copier.yml
smtp_host: example.com
smtp_user: postmaster@example.com

To:

# copier.yml
smtp_host: example.com
smtp_user: postmaster@[[smtp_host]]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yajocommented, Apr 22, 2020

And catch the exception to abort and print a readable warning?

Just reraise it as copier.config.objects.UserMessageError and it should be enough.

0reactions
pawamoycommented, Apr 22, 2020

Otherwise, an exception would be acceptable for what you said before.

Oh silly me. In strict mode, if the string cannot be rendered (due to variables not being defined or else), it will trigger an exception. That’s how we’ll know. For some reason when writing this I was thinking that, if the string couldn’t be rendered, it would be returned as-is, but it’s not true. Instead it would be returned empty (or partially empty), and that would be hard to detect.

Strict mode it is! And catch the exception to abort and print a readable warning?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-discovery/self-awareness Journal Prompts PDF Templates
Self -discovery journal prompts to increase self -awareness and introspection! Details: >Templates will be sent in PDF format upon purchase, customer then has ......
Read more >
50 Insightful Self Love Journal Prompts
In this post, let's look at 50 self-love and self-improvement journal prompts to learn about ourselves and develop our life and personality the...
Read more >
Wondering What to Write? There's a Prompt For That. |
Our Templates library includes Day Summary, 5 Minute PM, Meals, Ideas and more. ... How would you describe yourself to a stranger in...
Read more >
Self Reflection Printable and Digital Journal / Self Discovery
Motivational self reflection journal to find your true self | Etsy Daily Writing Prompts, Journal. honeynourish · Digital planners and journals.
Read more >
Manual Template - OpenPrompt v1.0.0 documentation
Templates . Overview . The template is one of the most important module in prompt-learning, which wraps the original input with textual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found