mirror of https://github.com/pyodide/pyodide.git
Update pre-commit and fix new issues (#4975)
This commit is contained in:
parent
1441f554d9
commit
135d83e50a
|
@ -17,14 +17,14 @@ repos:
|
|||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: "v0.3.5"
|
||||
rev: "v0.5.0"
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: "v18.1.3"
|
||||
rev: "v18.1.8"
|
||||
hooks:
|
||||
- id: clang-format
|
||||
types_or: [c++, c, cuda]
|
||||
|
@ -45,9 +45,15 @@ repos:
|
|||
exclude: ^src/templates/python$
|
||||
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: "v2.2.6"
|
||||
rev: "v2.3.0"
|
||||
hooks:
|
||||
- id: codespell
|
||||
args:
|
||||
[
|
||||
"--ignore-words-list",
|
||||
"ags,aray,asend,ba,crate,falsy,feld,inflight,lits,nd,slowy,te,oint,conveniant,atmost",
|
||||
]
|
||||
exclude: ^(benchmark/benchmarks/pystone_benchmarks/pystone\.py|src/js/package-lock\.json)$
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: "v1.11.0"
|
||||
|
|
|
@ -97,7 +97,7 @@ def test_import(
|
|||
|
||||
def _import_pkg():
|
||||
for import_name in import_names:
|
||||
selenium_standalone.run_async("import %s" % import_name)
|
||||
selenium_standalone.run_async(f"import {import_name}")
|
||||
|
||||
benchmark(_import_pkg)
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@ from pytest_pyodide import run_in_pyodide
|
|||
def test_lzma(selenium):
|
||||
# TODO: libregrtest.main(["test_lzma"]) doesn't collect any tests for some unknown reason.
|
||||
|
||||
import test.test_lzma
|
||||
import unittest
|
||||
|
||||
import test.test_lzma
|
||||
|
||||
suite = unittest.TestSuite(
|
||||
[unittest.TestLoader().loadTestsFromModule(test.test_lzma)]
|
||||
)
|
||||
|
|
|
@ -3,9 +3,10 @@ from pytest_pyodide import run_in_pyodide
|
|||
|
||||
@run_in_pyodide(packages=["test", "sqlite3"], pytest_assert_rewrites=False)
|
||||
def test_sqlite3(selenium):
|
||||
import test.test_sqlite3
|
||||
import unittest
|
||||
|
||||
import test.test_sqlite3
|
||||
|
||||
suite = unittest.TestSuite(
|
||||
[unittest.TestLoader().loadTestsFromModule(test.test_sqlite3)]
|
||||
)
|
||||
|
|
|
@ -6,6 +6,7 @@ def test_ssl(selenium):
|
|||
import platform
|
||||
import unittest
|
||||
import unittest.mock
|
||||
|
||||
from test.libregrtest.main import main
|
||||
|
||||
platform.platform(aliased=True)
|
||||
|
|
|
@ -62,7 +62,7 @@ lint.select = [
|
|||
"PLE", # pylint errors
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
lint.ignore = ["E402", "E501", "E731", "E741", "UP038"]
|
||||
lint.ignore = ["E402", "E501", "E731", "E741", "UP031", "UP038"]
|
||||
# line-length = 219 # E501: Recommended goal is 88 to match black
|
||||
target-version = "py311"
|
||||
|
||||
|
|
|
@ -18,10 +18,7 @@ typedef struct Js_Identifier
|
|||
JsRef object;
|
||||
} Js_Identifier;
|
||||
|
||||
#define Js_static_string_init(value) \
|
||||
{ \
|
||||
.string = value, .object = NULL \
|
||||
}
|
||||
#define Js_static_string_init(value) { .string = value, .object = NULL }
|
||||
#define Js_static_string(varname, value) \
|
||||
static Js_Identifier varname = Js_static_string_init(value)
|
||||
#define Js_IDENTIFIER(varname) Js_static_string(JsId_##varname, #varname)
|
||||
|
|
Loading…
Reference in New Issue