get the spec dict of output functions :param str type: output type :param str scope: target scope :param int position: :param other_spec: Additional output parameters, the None value will not be included in the return value :return dict: ``spec`` field of ``output`` comman
(type, scope, position, **other_spec)
| 354 | |
| 355 | |
| 356 | def _get_output_spec(type, scope, position, **other_spec): |
| 357 | """ |
| 358 | get the spec dict of output functions |
| 359 | |
| 360 | :param str type: output type |
| 361 | :param str scope: target scope |
| 362 | :param int position: |
| 363 | :param other_spec: Additional output parameters, the None value will not be included in the return value |
| 364 | |
| 365 | :return dict: ``spec`` field of ``output`` command |
| 366 | """ |
| 367 | spec = dict(type=type) |
| 368 | |
| 369 | # add non-None arguments to spec |
| 370 | spec.update({k: v for k, v in other_spec.items() if v is not None}) |
| 371 | |
| 372 | if not scope: |
| 373 | scope_name = get_scope() |
| 374 | else: |
| 375 | scope_name = scope |
| 376 | |
| 377 | spec['scope'] = scope2dom(scope_name) |
| 378 | spec['position'] = position |
| 379 | |
| 380 | return spec |
| 381 | |
| 382 | |
| 383 | def put_text(*texts: Any, sep: str = ' ', inline: bool = False, scope: str = None, |
no test coverage detected
searching dependent graphs…