From 69f97586ae360de3194bfe4b4448cf47fe65c1e5 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Fri, 1 Aug 2025 00:42:19 +0200 Subject: [PATCH] Resolve RSE102 --- pyproject.toml | 1 + pytest_pyodide/hypothesis.py | 2 +- pytest_pyodide/runner.py | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ac63c361..929e7d9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,7 @@ lint.select = [ "PLR1716", "RET505", "RET506", + "RSE102", ] lint.ignore = ["E402", "E501", "E731", "E741"] # line-length = 219 # E501: Recommended goal is 88 to match black diff --git a/pytest_pyodide/hypothesis.py b/pytest_pyodide/hypothesis.py index 61bf8c56..3ce8a114 100644 --- a/pytest_pyodide/hypothesis.py +++ b/pytest_pyodide/hypothesis.py @@ -32,7 +32,7 @@ class NoHypothesisUnpickler(pickle.Unpickler): def find_class(self, module, name): # Only allow safe classes from builtins. if module == "hypothesis": - raise pickle.UnpicklingError() + raise pickle.UnpicklingError return super().find_class(module, name) diff --git a/pytest_pyodide/runner.py b/pytest_pyodide/runner.py index ee7687f9..7c5d5726 100644 --- a/pytest_pyodide/runner.py +++ b/pytest_pyodide/runner.py @@ -144,22 +144,22 @@ def __init__( self.restore_state() def get_driver(self, jspi=False): - raise NotImplementedError() + raise NotImplementedError def goto(self, page): - raise NotImplementedError() + raise NotImplementedError def set_script_timeout(self, timeout): - raise NotImplementedError() + raise NotImplementedError def quit(self): - raise NotImplementedError() + raise NotImplementedError def refresh(self): - raise NotImplementedError() + raise NotImplementedError def run_js_inner(self, code, check_code): - raise NotImplementedError() + raise NotImplementedError def prepare_driver(self): if self.script_type == "classic": @@ -569,7 +569,7 @@ def get_driver(self, jspi=False): class NodeDriver: def __getattr__(self, x): - raise NotImplementedError() + raise NotImplementedError return NodeDriver()