Partially expand the template with the given parameters. If all of the parameters for the template are not given, return a partially expanded template. :param dict var_dict: Optional dictionary with variables and values :param kwargs: Alternative way to pass arguments :returns:
(
uri: str,
var_dict: t.Optional[variable.VariableValueDict] = None,
**kwargs: variable.VariableValue,
)
| 45 | |
| 46 | |
| 47 | def partial( |
| 48 | uri: str, |
| 49 | var_dict: t.Optional[variable.VariableValueDict] = None, |
| 50 | **kwargs: variable.VariableValue, |
| 51 | ) -> URITemplate: |
| 52 | """Partially expand the template with the given parameters. |
| 53 | |
| 54 | If all of the parameters for the template are not given, return a |
| 55 | partially expanded template. |
| 56 | |
| 57 | :param dict var_dict: Optional dictionary with variables and values |
| 58 | :param kwargs: Alternative way to pass arguments |
| 59 | :returns: :class:`URITemplate` |
| 60 | |
| 61 | Example:: |
| 62 | |
| 63 | t = URITemplate('https://api.github.com{/end}') |
| 64 | t.partial() # => URITemplate('https://api.github.com{/end}') |
| 65 | |
| 66 | """ |
| 67 | return URITemplate(uri).partial(var_dict, **kwargs) |
| 68 | |
| 69 | |
| 70 | def variables(uri: str) -> OrderedSet: |
searching dependent graphs…