From 951036f4fc0129a89f3e2b66ce997ca1bdec52b5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Jun 2024 08:03:15 -0500 Subject: [PATCH] lint --- tests/base.py | 2 +- tests/test_sign.py | 2 +- tests/v3/formattest.py | 2 +- tests/v3/test_nbpy.py | 2 +- tests/v4/formattest.py | 2 +- tests/v4/test_json.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/base.py b/tests/base.py index 8eed353..4a9a60b 100644 --- a/tests/base.py +++ b/tests/base.py @@ -15,7 +15,7 @@ class TestsBase(unittest.TestCase): @classmethod def fopen(cls, f, mode="r", encoding="utf-8"): - return open(os.path.join(cls._get_files_path(), f), mode, encoding=encoding) + return open(os.path.join(cls._get_files_path(), f), mode, encoding=encoding) # noqa: SIM115 @classmethod def _get_files_path(cls): diff --git a/tests/test_sign.py b/tests/test_sign.py index 1b24949..4b87927 100644 --- a/tests/test_sign.py +++ b/tests/test_sign.py @@ -220,7 +220,7 @@ def sign_stdin(nb): env = os.environ.copy() env["JUPYTER_DATA_DIR"] = self.data_dir p = Popen( - [sys.executable, "-m", "nbformat.sign", "--log-level=0"], + [sys.executable, "-m", "nbformat.sign", "--log-level=0"], # noqa: S603 stdin=PIPE, stdout=PIPE, env=env, diff --git a/tests/v3/formattest.py b/tests/v3/formattest.py index 026cb8d..c3ead38 100644 --- a/tests/v3/formattest.py +++ b/tests/v3/formattest.py @@ -11,7 +11,7 @@ def open_utf8(fname, mode): - return open(fname, mode=mode, encoding="utf-8") + return open(fname, mode=mode, encoding="utf-8") # noqa: SIM115 class NBFormatTest: diff --git a/tests/v3/test_nbpy.py b/tests/v3/test_nbpy.py index 7907370..4ffd28c 100644 --- a/tests/v3/test_nbpy.py +++ b/tests/v3/test_nbpy.py @@ -12,7 +12,7 @@ class TestPy(formattest.NBFormatTest, TestCase): nb0_ref = nb0_py ext = "py" mod = nbpy - ignored_keys = ["collapsed", "outputs", "prompt_number", "metadata"] + ignored_keys = ["collapsed", "outputs", "prompt_number", "metadata"] # noqa: RUF012 def assertSubset(self, da, db): """assert that da is a subset of db, ignoring self.ignored_keys. diff --git a/tests/v4/formattest.py b/tests/v4/formattest.py index 026cb8d..c3ead38 100644 --- a/tests/v4/formattest.py +++ b/tests/v4/formattest.py @@ -11,7 +11,7 @@ def open_utf8(fname, mode): - return open(fname, mode=mode, encoding="utf-8") + return open(fname, mode=mode, encoding="utf-8") # noqa: SIM115 class NBFormatTest: diff --git a/tests/v4/test_json.py b/tests/v4/test_json.py index 0fd54d0..912961c 100644 --- a/tests/v4/test_json.py +++ b/tests/v4/test_json.py @@ -120,7 +120,7 @@ def test_base_version_matches_latest(self): f"nbformat.v{nbformat}.{nbformat_minor}.schema.json", ), encoding="utf-8", - ) as schema_file: + ) as schema_file: # noqa: PLW2901 ver_schema = json.load(schema_file) assert latest_schema == ver_schema