(
self, node: nodes.Call, frame: Frame, forward_caller: bool = False
)
| 1839 | |
| 1840 | @optimizeconst |
| 1841 | def visit_Call( |
| 1842 | self, node: nodes.Call, frame: Frame, forward_caller: bool = False |
| 1843 | ) -> None: |
| 1844 | if self.environment.is_async: |
| 1845 | self.write("(await auto_await(") |
| 1846 | if self.environment.sandboxed: |
| 1847 | self.write("environment.call(context, ") |
| 1848 | else: |
| 1849 | self.write("context.call(") |
| 1850 | self.visit(node.node, frame) |
| 1851 | extra_kwargs = {"caller": "caller"} if forward_caller else None |
| 1852 | loop_kwargs = {"_loop_vars": "_loop_vars"} if frame.loop_frame else {} |
| 1853 | block_kwargs = {"_block_vars": "_block_vars"} if frame.block_frame else {} |
| 1854 | if extra_kwargs: |
| 1855 | extra_kwargs.update(loop_kwargs, **block_kwargs) |
| 1856 | elif loop_kwargs or block_kwargs: |
| 1857 | extra_kwargs = dict(loop_kwargs, **block_kwargs) |
| 1858 | self.signature(node, frame, extra_kwargs) |
| 1859 | self.write(")") |
| 1860 | if self.environment.is_async: |
| 1861 | self.write("))") |
| 1862 | |
| 1863 | def visit_Keyword(self, node: nodes.Keyword, frame: Frame) -> None: |
| 1864 | self.write(node.key + "=") |
no test coverage detected