(
self, node: nodes.Call, frame: Frame, forward_caller: bool = False
)
| 1880 | |
| 1881 | @optimizeconst |
| 1882 | def visit_Call( |
| 1883 | self, node: nodes.Call, frame: Frame, forward_caller: bool = False |
| 1884 | ) -> None: |
| 1885 | if self.environment.is_async: |
| 1886 | self.write("(await auto_await(") |
| 1887 | if self.environment.sandboxed: |
| 1888 | self.write("environment.call(context, ") |
| 1889 | else: |
| 1890 | self.write("context.call(") |
| 1891 | self.visit(node.node, frame) |
| 1892 | extra_kwargs = {"caller": "caller"} if forward_caller else None |
| 1893 | loop_kwargs = {"_loop_vars": "_loop_vars"} if frame.loop_frame else {} |
| 1894 | block_kwargs = {"_block_vars": "_block_vars"} if frame.block_frame else {} |
| 1895 | if extra_kwargs: |
| 1896 | extra_kwargs.update(loop_kwargs, **block_kwargs) |
| 1897 | elif loop_kwargs or block_kwargs: |
| 1898 | extra_kwargs = dict(loop_kwargs, **block_kwargs) |
| 1899 | self.signature(node, frame, extra_kwargs) |
| 1900 | self.write(")") |
| 1901 | if self.environment.is_async: |
| 1902 | self.write("))") |
| 1903 | |
| 1904 | def visit_Keyword(self, node: nodes.Keyword, frame: Frame) -> None: |
| 1905 | self.write(node.key + "=") |
no test coverage detected