Skip to content

Commit 35c9af5

Browse files
committed
Use a proper docstring at intro of module, ensure copyright notice is present and proper.
1 parent 09bc2ff commit 35c9af5

File tree

11 files changed

+84
-36
lines changed

11 files changed

+84
-36
lines changed

AdvancedHTMLParser/Formatter.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Copyright (c) 2015, 2017, 2018 Tim Savannah under LGPLv3.
2-
# See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
3-
# HTML formatting (HTML->XHTML conversion as well)
1+
'''
2+
Copyright (c) 2015, 2017, 2018 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
HTML formatting (HTML->XHTML conversion as well)
7+
'''
8+
49

510
import sys
611

AdvancedHTMLParser/Parser.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
#!/usr/bin/env python
2-
# Copyright (c) 2015, 2016, 2017, 2018 Tim Savannah under LGPLv3. See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
3-
#
4-
# Parser implementation
1+
'''
2+
Copyright (c) 2015, 2016, 2017, 2018 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
7+
Parser Implementation
8+
'''
59

610
# In general below, all "tag names" (body, div, etc) should be lowercase. The parser will lowercase internally. All attribute names (like `id` in id="123") provided to search functions should be lowercase. Values are not lowercase. This is because doing tons of searches, lowercasing every search can quickly build up. Lowercase it once in your code, not every time you call a function.
711

AdvancedHTMLParser/SpecialAttributes.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# Copyright (c) 2015, 2017 Tim Savannah under LGPLv3.
2-
# See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
3-
#
4-
# These are various helpers for "special" attributes
1+
'''
2+
Copyright (c) 2015, 2017, 2018, 2019 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
7+
These are various helpers for "special" attributes
8+
'''
59

610
import copy
711
import weakref

AdvancedHTMLParser/Tags.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Copyright (c) 2015, 2016, 2017, 2018, 2019 Tim Savannah under LGPLv3.
2-
# See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
3-
# AdvancedTag and TagCollection which represent tags and their data.
1+
'''
2+
Copyright (c) 2015, 2016, 2017, 2018, 2019 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
7+
AdvancedTag and TagCollection, which represent tags and their data, and other related functions.
8+
'''
49

510
from collections import OrderedDict
611

AdvancedHTMLParser/Validator.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
#!/usr/bin/env python
2-
# Copyright (c) 2015, 2019 Tim Savannah All Rights Rserved under LGPLv3. See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
1+
'''
2+
Copyright (c) 2015, 2019 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
5+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
6+
7+
8+
Validator - A validating version of the HTML parser (vs the normal 'best effort' parser)
9+
'''
310

411
from .Parser import AdvancedHTMLParser
512
from .Tags import isValidAttributeName

AdvancedHTMLParser/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
#!/usr/bin/env python
21
'''
3-
Copyright (c) 2015, 2016, 2017, 2018, 2019 Tim Savannah All Rights Rserved under LGPLv3. See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
2+
Copyright (c) 2015, 2016, 2017, 2018, 2019 Tim Savannah All Rights Rserved under LGPLv3. All Rights Reserved.
3+
4+
5+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
46
57
See: https://github.com/kata198/AdvancedHTMLParser for full information
68
'''

AdvancedHTMLParser/constants.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Copyright (c) 2015, 2017 Tim Savannah under LGPLv3.
2-
# See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
3-
# Constants in AdvancedHTMLParser
1+
'''
2+
Copyright (c) 2015, 2017 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
7+
Constants in AdvancedHTMLParser
8+
'''
49

510
from .conversions import ( convertToIntOrNegativeOneIfUnset, convertToPositiveInt,
611
convertPossibleValues, convertToIntRange, convertToIntRangeCapped, EMPTY_IS_INVALID

AdvancedHTMLParser/conversions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
'''
2-
Copyright (c) 2017 Tim Savannah under LGPLv3.
3-
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
2+
Copyright (c) 2017 Tim Savannah under LGPLv3. All Rights Reserved.
43
5-
Value-conversion methods
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
Value-conversion methods
67
'''
78

89
__all__ = ('convertToIntOrNegativeOneIfUnset', 'convertToBooleanString', 'convertBooleanStringToBoolean',

AdvancedHTMLParser/exceptions.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Copyright (c) 2015, 2017 Tim Savannah under LGPLv3.
2-
# See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
3-
# Exceptions used
1+
'''
2+
Copyright (c) 2015, 2017, 2019 Tim Savannah under LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
Exceptions used by AdvancedHTMLParser
7+
'''
48

59
__all__ = ('MultipleRootNodeException', 'HTMLValidationException', 'InvalidCloseException', 'MissedCloseException', 'IndexSizeErrorException')
610

AdvancedHTMLParser/utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
# Copyright (c) 2015, 2017 Tim Savannah under terms of LGPLv3
2-
# Some misc utils and regular expressions
1+
'''
2+
Copyright (c) 2015, 2017, 2019 Tim Savannah under terms of LGPLv3. All Rights Reserved.
3+
4+
See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.
5+
6+
7+
Some misc utils and regular expressions
8+
'''
39

410
import sys
511
import re

0 commit comments

Comments
 (0)