diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-09-04 18:52:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-04 18:52:55 +0200 |
commit | 25000863761220c1aa5db129e3cd41f5fe51b167 (patch) | |
tree | d211e4464a8aef25f969adffe7ba7cb6df8b8981 /pylint/lint | |
parent | 6c818310fd0e2396b6333ad623da577bf84e361e (diff) | |
download | pylint-git-25000863761220c1aa5db129e3cd41f5fe51b167.tar.gz |
Add typing with `PyAnnotate` to `./tests` (#4950)
* Add mypy_extensions to requirement for ``NoReturn``
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/lint')
-rw-r--r-- | pylint/lint/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/lint/utils.py b/pylint/lint/utils.py index b1f8edfff..280b144b7 100644 --- a/pylint/lint/utils.py +++ b/pylint/lint/utils.py @@ -5,7 +5,7 @@ import contextlib import sys import traceback from datetime import datetime -from pathlib import Path +from pathlib import Path, PosixPath from typing import Union from pylint.config import PYLINT_HOME @@ -17,7 +17,7 @@ class ArgumentPreprocessingError(Exception): def prepare_crash_report( - ex: Exception, filepath: str, crash_file_path: Union[Path, str] + ex: Exception, filepath: PosixPath, crash_file_path: Union[Path, str] ) -> Path: issue_template_path = ( Path(PYLINT_HOME) / datetime.now().strftime(str(crash_file_path)) @@ -63,7 +63,7 @@ pylint crashed with a ``{ex.__class__.__name__}`` and with the following stacktr return issue_template_path -def get_fatal_error_message(filepath: str, issue_template_path: Path) -> str: +def get_fatal_error_message(filepath: str, issue_template_path: str) -> str: return ( f"Fatal error while checking '{filepath}'. " f"Please open an issue in our bug tracker so we address this. " |