MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _closing_quotes

Method _closing_quotes

tools/terminal.py:272–281  ·  view source on GitHub ↗
(command: str)

Source from the content-addressed store, hash-verified

270
271 @staticmethod
272 def _closing_quotes(command: str) -> str:
273 stack: list[str] = []
274 for char in command:
275 if char not in {"'", '"'}:
276 continue
277 if stack and stack[-1] == char:
278 stack.pop()
279 else:
280 stack.append(char)
281 return "".join(reversed(stack))
282
283 def _rewrite_scanner_command(self, command: str) -> str:
284 provider = self.scanner_provider

Callers 1

_normalize_commandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected