|
1 | | -from __future__ import absolute_import, division, unicode_literals |
2 | 1 |
|
3 | 2 | from six import text_type |
4 | 3 | from six.moves import http_client, urllib |
|
48 | 47 | charsUntilRegEx = {} |
49 | 48 |
|
50 | 49 |
|
51 | | -class BufferedStream(object): |
| 50 | +class BufferedStream: |
52 | 51 | """Buffering for streams that do not have buffering of their own |
53 | 52 |
|
54 | 53 | The buffer is implemented as a list of chunks on the assumption that |
@@ -145,7 +144,7 @@ def HTMLInputStream(source, **kwargs): |
145 | 144 | return HTMLBinaryInputStream(source, **kwargs) |
146 | 145 |
|
147 | 146 |
|
148 | | -class HTMLUnicodeInputStream(object): |
| 147 | +class HTMLUnicodeInputStream: |
149 | 148 | """Provides a unicode stream of characters to the HTMLTokenizer. |
150 | 149 |
|
151 | 150 | This class takes care of character encoding and removing or replacing |
@@ -673,7 +672,7 @@ def jumpTo(self, bytes): |
673 | 672 | return True |
674 | 673 |
|
675 | 674 |
|
676 | | -class EncodingParser(object): |
| 675 | +class EncodingParser: |
677 | 676 | """Mini parser for detecting character encoding from meta elements""" |
678 | 677 |
|
679 | 678 | def __init__(self, data): |
@@ -861,7 +860,7 @@ def getAttribute(self): |
861 | 860 | attrValue.append(c) |
862 | 861 |
|
863 | 862 |
|
864 | | -class ContentAttrParser(object): |
| 863 | +class ContentAttrParser: |
865 | 864 | def __init__(self, data): |
866 | 865 | assert isinstance(data, bytes) |
867 | 866 | self.data = data |
|
0 commit comments