summaryrefslogtreecommitdiff
path: root/src/flake8/exceptions.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2021-04-18 10:32:45 -0700
committerGitHub <noreply@github.com>2021-04-18 10:32:45 -0700
commitd1a4043c592c7a61bb65d76dfe98be4a356414ae (patch)
tree2a2b60b425910a94366088a31187a371047c55b6 /src/flake8/exceptions.py
parent645cd71f571da1cdc42683cf4228b537ddc2685f (diff)
parent456e98486ecb912aba01f31859c5f74a5a4d3f81 (diff)
downloadflake8-d1a4043c592c7a61bb65d76dfe98be4a356414ae.tar.gz
Merge pull request #1320 from asottile/ast_syntax_error_earlier
short circuit on ast error before tokenization error
Diffstat (limited to 'src/flake8/exceptions.py')
-rw-r--r--src/flake8/exceptions.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/flake8/exceptions.py b/src/flake8/exceptions.py
index 4b0ddd1..45db94d 100644
--- a/src/flake8/exceptions.py
+++ b/src/flake8/exceptions.py
@@ -33,23 +33,6 @@ class FailedToLoadPlugin(Flake8Exception):
}
-class InvalidSyntax(Flake8Exception):
- """Exception raised when tokenizing a file fails."""
-
- def __init__(self, exception: Exception) -> None:
- """Initialize our InvalidSyntax exception."""
- self.original_exception = exception
- self.error_message = f"{type(exception).__name__}: {exception.args[0]}"
- self.error_code = "E902"
- self.line_number = 1
- self.column_number = 0
- super().__init__(exception)
-
- def __str__(self) -> str:
- """Format our exception message."""
- return self.error_message
-
-
class PluginRequestedUnknownParameters(Flake8Exception):
"""The plugin requested unknown parameters."""