Strictly populate the template with the given keyword arguments. Args: **kwargs: The keyword arguments to populate the template. Each keyword corresponds to a placeholder in the template. Returns: The populated template.
(self, safe=True, **kwargs)
| 73 | ) |
| 74 | |
| 75 | def populate(self, safe=True, **kwargs) -> str: |
| 76 | """ |
| 77 | Strictly populate the template with the given keyword arguments. |
| 78 | |
| 79 | Args: |
| 80 | **kwargs: The keyword arguments to populate the template. |
| 81 | Each keyword corresponds to a placeholder in the template. |
| 82 | |
| 83 | Returns: |
| 84 | The populated template. |
| 85 | |
| 86 | Raises: |
| 87 | ValueError: If an unknown placeholder is provided. |
| 88 | """ |
| 89 | if safe: |
| 90 | self.check_missing_kwargs(**kwargs) |
| 91 | |
| 92 | return self.partial_populate(**kwargs) |
| 93 | |
| 94 | def partial_populate(self, **kwargs): |
| 95 | """ |