From 78522f6604cc007a70a1708e3d227f71d286ae6f Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 27 Nov 2017 11:54:44 -0500 Subject: [PATCH 1/2] Document exceptions in constants module --- html5lib/constants.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html5lib/constants.py b/html5lib/constants.py index 4f967cb6..082219eb 100644 --- a/html5lib/constants.py +++ b/html5lib/constants.py @@ -2939,8 +2939,14 @@ class DataLossWarning(UserWarning): + """Raised whenever html5lib changes something in such a way that some input data is lost""" pass class ReparseException(Exception): + """Raised when the parser should restart parsing + + This is used when the parsing discovers a new encoding that should be used. + + """ pass From ef7c7634c1195926173ea783923922d14ec8cede Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Tue, 28 Nov 2017 15:30:16 -0500 Subject: [PATCH 2/2] Adjust docstrings based on comments --- html5lib/constants.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/html5lib/constants.py b/html5lib/constants.py index 082219eb..c0db14f1 100644 --- a/html5lib/constants.py +++ b/html5lib/constants.py @@ -2939,14 +2939,9 @@ class DataLossWarning(UserWarning): - """Raised whenever html5lib changes something in such a way that some input data is lost""" + """Raised when the current tree is unable to represent the input data""" pass class ReparseException(Exception): - """Raised when the parser should restart parsing - - This is used when the parsing discovers a new encoding that should be used. - - """ pass