pre-commit: Add codespell and other checks (#263)

This commit is contained in:
Christian Clauss
2022-05-06 23:23:14 +02:00
committed by GitHub
parent 990b0b2797
commit fadb4a67e7
9 changed files with 69 additions and 28 deletions

View File

@@ -4,8 +4,8 @@ import io
import sys
import time
import micropip
from js import console, document, setInterval, setTimeout
import micropip # noqa: F401
from js import console, document
loop = asyncio.get_event_loop()
@@ -72,10 +72,9 @@ def format_mime(obj):
mimebundle = eval_formatter(obj, "_repr_mimebundle_")
if isinstance(mimebundle, tuple):
format_dict, md_dict = mimebundle
format_dict, _ = mimebundle
else:
format_dict = mimebundle
md_dict = {}
output, not_available = None, []
for method, mime_type in reversed(MIME_METHODS.items()):
@@ -130,7 +129,7 @@ class PyScript:
@staticmethod
def run_until_complete(f):
p = loop.run_until_complete(f)
_ = loop.run_until_complete(f)
class Element:
@@ -311,7 +310,6 @@ class PyListTemplate:
return [c.data for c in self._children]
def render_children(self):
out = []
binds = {}
for i, c in enumerate(self._children):
txt = c.element.innerHTML
@@ -328,7 +326,7 @@ class PyListTemplate:
srcEl.element.onclick()
evtEl.classList = srcEl.element.classList
for new_id, old_id in binds.items():
for new_id in binds:
Element(new_id).element.onclick = foo
def connect(self):