diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 00ed1b00..0368ba7b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,6 +23,7 @@ jobs: sudo apt remove python3-pip python -m pip install --upgrade pip python -m pip install . black isort mypy pytest readme_renderer + python -m pip install . types-dataclasses # Needed for Python 3.6 pip list - name: Type Checker run: | diff --git a/ptpython/repl.py b/ptpython/repl.py index b158b93c..455e5f38 100644 --- a/ptpython/repl.py +++ b/ptpython/repl.py @@ -98,7 +98,7 @@ def run_and_show_expression(self, expression): except KeyboardInterrupt: # KeyboardInterrupt doesn't inherit from Exception. raise except SystemExit: - return + raise except BaseException as e: self._handle_exception(e) else: @@ -330,9 +330,7 @@ def _format_result_output(self, result: object) -> StyleAndTextTuples: else: result_repr = black.format_str( result_repr, - mode=black.FileMode( - line_length=self.app.output.get_size().columns - ), + mode=black.Mode(line_length=self.app.output.get_size().columns), ) formatted_result_repr = to_formatted_text(