Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ecbda6

Browse files
authored
Bump Flake8 to fix CI for Python 3.7 (#554)
1 parentf7cab6f commit3ecbda6

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

‎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
exceptKeyError:
325325
if__debug__:
326326
forcincharacters:
327-
assert(ord(c)<128)
327+
assertord(c)<128
328328
regex="".join(["\\x%02x"%ord(c)forcincharacters])
329329
ifnotopposite:
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
defencode(self,string):
225-
assert(isinstance(string,text_type))
225+
assertisinstance(string,text_type)
226226
ifself.encoding:
227227
returnstring.encode(self.encoding,"htmlentityreplace")
228228
else:
229229
returnstring
230230

231231
defencodeStrict(self,string):
232-
assert(isinstance(string,text_type))
232+
assertisinstance(string,text_type)
233233
ifself.encoding:
234234
returnstring.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
forattribinattribs:
7676
name= (attrib["namespace"],attrib["name"])
77-
assert(namenotinattrs)
77+
assertnamenotinattrs
7878
attrs[name]=attrib["value"]
7979
returnattrs
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
definsertText(self,data,insertBefore=None):
111-
ifnot(len(self._element)):
111+
ifnotlen(self._element):
112112
ifnotself._element.text:
113113
self._element.text=""
114114
self._element.text+=data
@@ -201,7 +201,7 @@ def testSerializer(element):
201201
rv= []
202202

203203
defserializeElement(element,indent=0):
204-
ifnot(hasattr(element,"tag")):
204+
ifnothasattr(element,"tag"):
205205
element=element.getroot()
206206
ifelement.tag=="<!DOCTYPE>":
207207
ifelement.get("publicId")orelement.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-
ifnot(hasattr(node,"tag")):
40+
ifnothasattr(node,"tag"):
4141
node=node.getroot()
4242

4343
ifnode.tagin ("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)

[8]ページ先頭

©2009-2025 Movatter.jp