mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
pre-commit: Upgrade the Python linter ruff (#2370)
This commit is contained in:
@@ -40,7 +40,7 @@ repos:
|
|||||||
- tomli
|
- tomli
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.11.8
|
rev: v0.12.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
exclude: core/tests
|
exclude: core/tests
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from pyscript import document, window, PyWorker
|
|||||||
from libthree import THREE, clear, SoundPlayer
|
from libthree import THREE, clear, SoundPlayer
|
||||||
from libthree import get_renderer, get_ortho_camera
|
from libthree import get_renderer, get_ortho_camera
|
||||||
from libthree import get_loading_manager, get_stats_gl
|
from libthree import get_loading_manager, get_stats_gl
|
||||||
from libthree import lsgeo, line2, linemat, lsgeo
|
from libthree import line2, linemat, lsgeo
|
||||||
from libfft import BeatSync
|
from libfft import BeatSync
|
||||||
|
|
||||||
from multipyjs import MICROPYTHON, new, call, to_js, create_proxy
|
from multipyjs import MICROPYTHON, new, call, to_js, create_proxy
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ def test_js_module_is_available_on_worker():
|
|||||||
|
|
||||||
|
|
||||||
@upytest.skip("Worker only.", skip_when=not RUNNING_IN_WORKER)
|
@upytest.skip("Worker only.", skip_when=not RUNNING_IN_WORKER)
|
||||||
def test_js_module_is_available_on_worker():
|
def test_js_module_is_available_on_greeting_worker():
|
||||||
"""
|
"""
|
||||||
The "hello" function in the example_js_worker_module.js file is available
|
The "hello" function in the example_js_worker_module.js file is available
|
||||||
via the js_modules object while running in a worker.
|
via the js_modules object while running in a worker.
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
Tests for the PyScript media module.
|
Tests for the PyScript media module.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pyscript import media
|
|
||||||
import upytest
|
import upytest
|
||||||
|
|
||||||
from pyscript import media
|
from pyscript import media
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ skip = "*.js,*.json"
|
|||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 114
|
line-length = 114
|
||||||
lint.select = ["C4", "C90", "E", "EM", "F", "PIE", "PYI", "PLC", "Q", "RET", "W"]
|
lint.select = ["C4", "C90", "E", "EM", "F", "PIE", "PYI", "PLC", "Q", "RET", "W"]
|
||||||
lint.ignore = ["E402", "E722", "E731", "E741", "F401", "F704", "F811", "F821"]
|
lint.ignore = ["E402", "E722", "E731", "E741", "F401", "F704", "F821", "PLC0415"]
|
||||||
lint.mccabe.max-complexity = 27
|
lint.mccabe.max-complexity = 27
|
||||||
|
|||||||
Reference in New Issue
Block a user