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

Bump Flake8 to fix CI for Python 3.7#554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 2 commits intohtml5lib:masterfromhugovk:fix-ci
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionhtml5lib/_inputstream.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -324,7 +324,7 @@ def charsUntil(self, characters, opposite=False):
except KeyError:
if __debug__:
for c in characters:
assert(ord(c) < 128)
assertord(c) < 128
regex = "".join(["\\x%02x" % ord(c) for c in characters])
if not opposite:
regex = "^%s" % regex
Expand Down
4 changes: 2 additions & 2 deletionshtml5lib/serializer.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -222,14 +222,14 @@ def __init__(self, **kwargs):
self.strict = False

def encode(self, string):
assert(isinstance(string, text_type))
assertisinstance(string, text_type)
if self.encoding:
return string.encode(self.encoding, "htmlentityreplace")
else:
return string

def encodeStrict(self, string):
assert(isinstance(string, text_type))
assertisinstance(string, text_type)
if self.encoding:
return string.encode(self.encoding, "strict")
else:
Expand Down
2 changes: 1 addition & 1 deletionhtml5lib/tests/test_serializer.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,7 +74,7 @@ def _convertAttrib(self, attribs):
attrs = {}
for attrib in attribs:
name = (attrib["namespace"], attrib["name"])
assert(name not in attrs)
assertname not in attrs
attrs[name] = attrib["value"]
return attrs

Expand Down
4 changes: 2 additions & 2 deletionshtml5lib/treebuilders/etree.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -108,7 +108,7 @@ def removeChild(self, node):
node.parent = None

def insertText(self, data, insertBefore=None):
if not(len(self._element)):
if notlen(self._element):
if not self._element.text:
self._element.text = ""
self._element.text += data
Expand DownExpand Up@@ -201,7 +201,7 @@ def testSerializer(element):
rv = []

def serializeElement(element, indent=0):
if not(hasattr(element, "tag")):
if nothasattr(element, "tag"):
element = element.getroot()
if element.tag == "<!DOCTYPE>":
if element.get("publicId") or element.get("systemId"):
Expand Down
2 changes: 1 addition & 1 deletionhtml5lib/treewalkers/etree.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,7 @@ def getNodeDetails(self, node):
else:
node = elt

if not(hasattr(node, "tag")):
if nothasattr(node, "tag"):
node = node.getroot()

if node.tag in ("DOCUMENT_ROOT", "DOCUMENT_FRAGMENT"):
Expand Down
2 changes: 1 addition & 1 deletionrequirements-test.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
-r requirements.txt

tox>=3.15.1,<4
flake8>=3.8.1,<3.9
flake8>=3.8.1,<6
pytest>=4.6.10,<5 ; python_version < '3'
pytest>=5.4.2,<7 ; python_version >= '3'
coverage>=5.1,<6
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp