Skip to content

Commit 4654a5a

Browse files
committed
Merge branch 'master' into rm-travis
2 parents 0140d98 + 10b7eb8 commit 4654a5a

File tree

12 files changed

+26
-16
lines changed

12 files changed

+26
-16
lines changed

.appveyor.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# To activate, change the Appveyor settings to use `.appveyor.yml`.
1+
image: Visual Studio 2019
22
environment:
33
global:
44
PATH: "C:\\Python27\\Scripts\\;%PATH%"
@@ -13,6 +13,10 @@ environment:
1313
- TOXENV: py37-optional
1414
- TOXENV: py38-base
1515
- TOXENV: py38-optional
16+
- TOXENV: py39-base
17+
- TOXENV: py39-optional
18+
- TOXENV: py310-base
19+
- TOXENV: py310-optional
1620

1721
install:
1822
- git submodule update --init --recursive

.github/workflows/python-tox.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ jobs:
66
if: github.event.push || github.event.pull_request.head.repo.full_name != github.repository
77
runs-on: ubuntu-latest
88
strategy:
9+
fail-fast: false
910
matrix:
10-
python: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy3]
11+
python: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-2.7", "pypy-3.8"]
1112
steps:
12-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1314
with:
1415
submodules: true
15-
- uses: actions/setup-python@v2
16+
- uses: actions/setup-python@v4
1617
with:
1718
python-version: ${{ matrix.python }}
19+
cache: pip
20+
cache-dependency-path: "requirements*.txt"
1821
- run: pip install tox
1922
- run: tox -e py
2023
- if: ${{ always() }}

CHANGES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Released on July 14, 2016
9595
tested, doesn't entirely work, and as far as I can tell is
9696
completely unused by anyone.**
9797

98-
* Move testsuite to ``py.test``.
98+
* Move testsuite to ``pytest``.
9999

100100
* **Fix #124: move to webencodings for decoding the input byte stream;
101101
this makes html5lib compliant with the Encoding Standard, and

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Tests
127127
-----
128128

129129
Unit tests require the ``pytest`` and ``mock`` libraries and can be
130-
run using the ``py.test`` command in the root directory.
130+
run using the ``pytest`` command in the root directory.
131131

132132
Test data are contained in a separate `html5lib-tests
133133
<https://github.com/html5lib/html5lib-tests>`_ repository and included

html5lib/_inputstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def charsUntil(self, characters, opposite=False):
324324
except KeyError:
325325
if __debug__:
326326
for c in characters:
327-
assert(ord(c) < 128)
327+
assert ord(c) < 128
328328
regex = "".join(["\\x%02x" % ord(c) for c in characters])
329329
if not opposite:
330330
regex = "^%s" % regex

html5lib/serializer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ def __init__(self, **kwargs):
222222
self.strict = False
223223

224224
def encode(self, string):
225-
assert(isinstance(string, text_type))
225+
assert isinstance(string, text_type)
226226
if self.encoding:
227227
return string.encode(self.encoding, "htmlentityreplace")
228228
else:
229229
return string
230230

231231
def encodeStrict(self, string):
232-
assert(isinstance(string, text_type))
232+
assert isinstance(string, text_type)
233233
if self.encoding:
234234
return string.encode(self.encoding, "strict")
235235
else:

html5lib/tests/test_serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _convertAttrib(self, attribs):
7474
attrs = {}
7575
for attrib in attribs:
7676
name = (attrib["namespace"], attrib["name"])
77-
assert(name not in attrs)
77+
assert name not in attrs
7878
attrs[name] = attrib["value"]
7979
return attrs
8080

html5lib/treebuilders/etree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def removeChild(self, node):
108108
node.parent = None
109109

110110
def insertText(self, data, insertBefore=None):
111-
if not(len(self._element)):
111+
if not len(self._element):
112112
if not self._element.text:
113113
self._element.text = ""
114114
self._element.text += data
@@ -201,7 +201,7 @@ def testSerializer(element):
201201
rv = []
202202

203203
def serializeElement(element, indent=0):
204-
if not(hasattr(element, "tag")):
204+
if not hasattr(element, "tag"):
205205
element = element.getroot()
206206
if element.tag == "<!DOCTYPE>":
207207
if element.get("publicId") or element.get("systemId"):

html5lib/treewalkers/etree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def getNodeDetails(self, node):
3737
else:
3838
node = elt
3939

40-
if not(hasattr(node, "tag")):
40+
if not hasattr(node, "tag"):
4141
node = node.getroot()
4242

4343
if node.tag in ("DOCUMENT_ROOT", "DOCUMENT_FRAGMENT"):

requirements-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-r requirements.txt
22

33
tox>=3.15.1,<4
4-
flake8>=3.8.1,<3.9
4+
flake8>=3.8.1,<6
55
pytest>=4.6.10,<5 ; python_version < '3'
66
pytest>=5.4.2,<7 ; python_version >= '3'
77
coverage>=5.1,<6

0 commit comments

Comments
 (0)