From 9f1ea9c4126c24d002561a8029d4ea45405b8cc5 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Sun, 28 Feb 2016 05:45:35 +0900 Subject: [PATCH] Specify attribute types of SyntaxError --- stdlib/2.7/__builtin__.pyi | 6 +++++- stdlib/3/builtins.pyi | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index 9dc5ca948..69a37feb9 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -814,7 +814,11 @@ class OSError(EnvironmentError): ... class WindowsError(OSError): ... class OverflowError(ArithmeticError): ... class ReferenceError(StandardError): ... -class SyntaxError(StandardError): ... +class SyntaxError(StandardError): + msg = ... # type: str + lineno = ... # type: int + offset = ... # type: int + text = ... # type: str class IndentationError(SyntaxError): ... class TabError(IndentationError): ... class SystemError(StandardError): ... diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 1e4eea8ef..459ae4aaf 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -775,7 +775,11 @@ class WindowsError(OSError): ... class OverflowError(ArithmeticError): ... class ReferenceError(Exception): ... class StopIteration(Exception): ... -class SyntaxError(Exception): ... +class SyntaxError(Exception): + msg = ... # type: str + lineno = ... # type: int + offset = ... # type: int + text = ... # type: str class IndentationError(SyntaxError): ... class TabError(IndentationError): ... class SystemError(Exception): ...