mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
pre-commit: Add ruff to replace bandit, flake8, isort, and pyupgrade (#1210)
* pre-commit: Add ruff to replace bandit, flake8, isort, and pyupgrade * Upgrade ruff * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml
This commit is contained in:
@@ -219,7 +219,10 @@ class PyScriptTest:
|
||||
If check_js_errors is True (the default), it also checks that no JS
|
||||
errors were raised during the waiting.
|
||||
"""
|
||||
pred = lambda msg: msg.text == text
|
||||
|
||||
def pred(msg):
|
||||
return msg.text == text
|
||||
|
||||
try:
|
||||
with self.page.expect_console_message(pred, timeout=timeout):
|
||||
pass
|
||||
|
||||
@@ -233,7 +233,10 @@ class TestOutput(PyScriptTest):
|
||||
class Circle:
|
||||
r = 0
|
||||
def _repr_svg_(self):
|
||||
return f'<svg height="{self.r*2}" width="{self.r*2}"><circle cx="{self.r}" cy="{self.r}" r="{self.r}" fill="red" /></svg>' # noqa: E501
|
||||
return (
|
||||
f'<svg height="{self.r*2}" width="{self.r*2}">'
|
||||
f'<circle cx="{self.r}" cy="{self.r}" r="{self.r}" fill="red" /></svg>'
|
||||
)
|
||||
|
||||
circle = Circle()
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class TestExamples(PyScriptTest):
|
||||
else:
|
||||
time.sleep(1)
|
||||
else:
|
||||
assert False, "Espresso time not found :("
|
||||
raise AssertionError("Espresso time not found :(")
|
||||
self.assert_no_banners()
|
||||
self.check_tutor_generated_code()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user