diff --git a/core/tests/javascript/terminal.py b/core/tests/javascript/terminal.py index 731afad113f..597f2a57512 100644 --- a/core/tests/javascript/terminal.py +++ b/core/tests/javascript/terminal.py @@ -2,7 +2,7 @@ classList = document.documentElement.classList -if not __terminal__: +if not __terminal__: # noqa: F821 __terminal__ is defined in core/src/plugins/donkey.js classList.add("error") else: classList.add("ok") diff --git a/core/tests/manual/game/aliens.py b/core/tests/manual/game/aliens.py index 78ebf656766..38c1773d5c8 100644 --- a/core/tests/manual/game/aliens.py +++ b/core/tests/manual/game/aliens.py @@ -318,16 +318,12 @@ async def main(winstyle=0): if not fullscreen: print("Changing to FULLSCREEN") screen_backup = screen.copy() - screen = pygame.display.set_mode( - SCREENRECT.size, winstyle | pygame.FULLSCREEN, bestdepth - ) + screen = pygame.display.set_mode(SCREENRECT.size, winstyle | pygame.FULLSCREEN) screen.blit(screen_backup, (0, 0)) else: print("Changing to windowed mode") screen_backup = screen.copy() - screen = pygame.display.set_mode( - SCREENRECT.size, winstyle, bestdepth - ) + screen = pygame.display.set_mode(SCREENRECT.size, winstyle) screen.blit(screen_backup, (0, 0)) pygame.display.flip() fullscreen = not fullscreen diff --git a/core/tests/manual/issue-2302/libthree.py b/core/tests/manual/issue-2302/libthree.py index 2c0c675d528..d84da821b3f 100644 --- a/core/tests/manual/issue-2302/libthree.py +++ b/core/tests/manual/issue-2302/libthree.py @@ -140,7 +140,7 @@ def get_stats_gl(renderer): def bg_from_v(*vertices): geometry = new(THREE.BufferGeometry) - vertices_f32a = new(Float32Array, vertices) + vertices_f32a = new(Float32Array, vertices) # noqa: F821 Float32Array is defined in js attr = new(THREE.Float32BufferAttribute, vertices_f32a, 3) return geometry.setAttribute('position', attr) diff --git a/core/tests/python/tests/test_util.py b/core/tests/python/tests/test_util.py index ebf15c6b6de..4c98a41ae01 100644 --- a/core/tests/python/tests/test_util.py +++ b/core/tests/python/tests/test_util.py @@ -11,7 +11,7 @@ def test_as_bytearray(): msg = b"Hello, world!" buffer = js.ArrayBuffer.new(len(msg)) ui8a = js.Uint8Array.new(buffer) - for b in msg: + for i, b in enumerate(msg): ui8a[i] = b ba = util.as_bytearray(buffer) assert isinstance(ba, bytearray) diff --git a/pyproject.toml b/pyproject.toml index f1650d59e51..be1d3069fa1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,5 +5,5 @@ skip = "*.js,*.json" [tool.ruff] line-length = 114 lint.select = ["C4", "C90", "E", "EM", "F", "PIE", "PYI", "PLC", "Q", "RET", "W"] -lint.ignore = ["E402", "E722", "E731", "E741", "F401", "F704", "F821", "PLC0415"] +lint.ignore = ["E402", "E722", "E731", "E741", "F401", "F704", "PLC0415"] lint.mccabe.max-complexity = 27