MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / run_program

Method run_program

lib/sqlalchemy/util/tool_support.py:188–202  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

186
187 @contextlib.contextmanager
188 def run_program(self) -> Iterator[None]:
189 self.args = self.parser.parse_args()
190 if self.args.check:
191 self.diffs_detected = False
192 self.suppress_output = True
193 elif self.args.stdout:
194 self.suppress_output = True
195 else:
196 self.suppress_output = False
197 yield
198
199 if self.args.check and self.diffs_detected:
200 sys.exit(1)
201 else:
202 sys.exit(0)

Calls

no outgoing calls

Tested by

no test coverage detected