Run our application. This method will also handle KeyboardInterrupt exceptions for the entirety of the flake8 application. If it sees a KeyboardInterrupt it will forcibly clean up the :class:`~flake8.checker.Manager`.
(self, argv: Sequence[str])
| 188 | self.report() |
| 189 | |
| 190 | def run(self, argv: Sequence[str]) -> None: |
| 191 | """Run our application. |
| 192 | |
| 193 | This method will also handle KeyboardInterrupt exceptions for the |
| 194 | entirety of the flake8 application. If it sees a KeyboardInterrupt it |
| 195 | will forcibly clean up the :class:`~flake8.checker.Manager`. |
| 196 | """ |
| 197 | try: |
| 198 | self._run(argv) |
| 199 | except KeyboardInterrupt as exc: |
| 200 | print("... stopped") |
| 201 | LOG.critical("Caught keyboard interrupt from user") |
| 202 | LOG.exception(exc) |
| 203 | self.catastrophic_failure = True |
| 204 | except exceptions.ExecutionError as exc: |
| 205 | print("There was a critical error during execution of Flake8:") |
| 206 | print(exc) |
| 207 | LOG.exception(exc) |
| 208 | self.catastrophic_failure = True |
| 209 | except exceptions.EarlyQuit: |
| 210 | self.catastrophic_failure = True |
| 211 | print("... stopped while processing files") |
| 212 | else: |
| 213 | assert self.options is not None |
| 214 | if self.options.count: |
| 215 | print(self.result_count) |
no test coverage detected