From 6904a0588038005029bac593511264857f3f144d Mon Sep 17 00:00:00 2001 From: Tab Atkins-Bittner Date: Thu, 26 Oct 2023 11:27:09 -0700 Subject: [PATCH] lint --- bikeshed/constants.py | 2 +- bikeshed/h/parser.py | 6 ++---- bikeshed/markdown/markdown.py | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bikeshed/constants.py b/bikeshed/constants.py index a939bd4d16..08e5a37f73 100644 --- a/bikeshed/constants.py +++ b/bikeshed/constants.py @@ -11,4 +11,4 @@ macroStartChar = "\uebbb" macroEndChar = "\uebbc" incrementLineCountChar = "\uebbd" -bsComment = "" \ No newline at end of file +bsComment = "" diff --git a/bikeshed/h/parser.py b/bikeshed/h/parser.py index 1ead3192db..7eac37a53d 100644 --- a/bikeshed/h/parser.py +++ b/bikeshed/h/parser.py @@ -78,9 +78,7 @@ def parseNode( if s[start] == "&": ch, i = parseCharRef(s, start) if ch is not Failure: - node = Text(text=f"&#{ord(ch)};", - line=s.line(start), - endLine=s.line(i-1)) + node = Text(text=f"&#{ord(ch)};", line=s.line(start), endLine=s.line(i - 1)) return Result(node, i) if s[start] == "<": @@ -274,7 +272,7 @@ def initialDocumentParse(text: str, config: ParseConfig, startLine: int = 1) -> return list(nodesFromHtml(text, config, startLine=startLine)) -def strFromNodes(nodes: t.Iterable[ParserNode], withIlcc=False) -> str: +def strFromNodes(nodes: t.Iterable[ParserNode], withIlcc: bool = False) -> str: strs = [] ilcc = constants.incrementLineCountChar for node in nodes: diff --git a/bikeshed/markdown/markdown.py b/bikeshed/markdown/markdown.py index e57d966828..7bf3511309 100644 --- a/bikeshed/markdown/markdown.py +++ b/bikeshed/markdown/markdown.py @@ -158,7 +158,6 @@ def inlineElementStart(line: str) -> bool: rawElements = "|".join(re.escape(x) for x in opaqueElements) for i, line in enumerate(lines): - # Skip lines that are entirely a censored comment. if line.text.strip() == constants.bsComment: continue