Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Jun 10, 2024
1 parent 93aee34 commit 951036f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/v3/formattest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/v3/test_nbpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/v4/formattest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/v4/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 951036f

Please sign in to comment.