mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-04 14:52:11 -08:00
Fixed lint problems
Lint run against python and javascript
This commit is contained in:
parent
efa87a6abe
commit
54fc0980d5
3 changed files with 8 additions and 11 deletions
|
|
@ -37,7 +37,7 @@ def run_pnginfo(image):
|
|||
if parser.settings is None:
|
||||
info += f"{plaintext_to_html(str(parser.parameters))}"
|
||||
else:
|
||||
info += f"<p>"
|
||||
info += "<p>"
|
||||
first = True
|
||||
for setting in parser.settings:
|
||||
if first:
|
||||
|
|
@ -45,14 +45,12 @@ def run_pnginfo(image):
|
|||
else:
|
||||
info += ", "
|
||||
info += pnginfo_format_setting(str(setting[0]), str(setting[1])+str(setting[2]))
|
||||
info += f"</p>"
|
||||
|
||||
info += "</p>"
|
||||
|
||||
if parser.extra is not None:
|
||||
info += f"{plaintext_to_html(str(parser.extra))}"
|
||||
|
||||
info += f"""
|
||||
</div>\n
|
||||
"""
|
||||
info += "</div>\n"
|
||||
else:
|
||||
items = {**{'parameters': geninfo}, **items}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,10 @@ class PngParser:
|
|||
def parse_pnginfo(self, pnginfo_string):
|
||||
try:
|
||||
# separate positive, negative, and parameters
|
||||
tlen = len(pnginfo_string)
|
||||
m = PngParser.re_top_level.search(pnginfo_string)
|
||||
if m is None:
|
||||
return False
|
||||
|
||||
|
||||
self.positive = m.group(1)
|
||||
self.negative = m.group(2)
|
||||
self.parameters = m.group(3)
|
||||
|
|
@ -35,9 +34,9 @@ class PngParser:
|
|||
self.settings = PngParser.re_parameters.findall(self.parameters)
|
||||
if self.settings is None:
|
||||
return False
|
||||
except:
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ function uiElementInSight(el) {
|
|||
}
|
||||
|
||||
function uiCopyElementText(el) {
|
||||
text = el.innerText
|
||||
var text = el.innerText
|
||||
if (text.startsWith('"')) {
|
||||
text = text.substring(1, text.length-1).replace('\\n', '\n')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue