From dc9f2a664db093a5502debbe24a66a3f9f7c290f Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Fri, 28 Jun 2024 17:18:34 -0700 Subject: [PATCH] normalize results --- linters/ruff/test_data/ruff_nbqa_v0.0.250_basic_nb.check.shot | 4 +--- linters/ruff/test_data/ruff_nbqa_v0.1.0_basic_nb.check.shot | 4 +--- linters/ruff/test_data/ruff_nbqa_v0.5.0_basic_nb.check.shot | 2 +- tests/utils/landing_state.ts | 1 + 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/linters/ruff/test_data/ruff_nbqa_v0.0.250_basic_nb.check.shot b/linters/ruff/test_data/ruff_nbqa_v0.0.250_basic_nb.check.shot index a777a1de5..dbbfc7fac 100644 --- a/linters/ruff/test_data/ruff_nbqa_v0.0.250_basic_nb.check.shot +++ b/linters/ruff/test_data/ruff_nbqa_v0.0.250_basic_nb.check.shot @@ -9,9 +9,7 @@ exports[`Testing linter ruff-nbqa test basic_nb 1`] = ` "issueClass": "ISSUE_CLASS_EXISTING", "level": "LEVEL_HIGH", "linter": "ruff-nbqa", - "message": "/tmp/plugins_/test_data/basic_nb.in.ipynb:cell_1:1:8: F401 [*] \`os\` imported but unused -Found 1 error. -[*] 1 potentially fixable with the --fix option.", + "message": "/tmp/plugins_/test_data/basic_nb.in.ipynb:cell_1:1:8: F401 [*] \`os\` imported but unused", "targetType": "jupyter", }, ], diff --git a/linters/ruff/test_data/ruff_nbqa_v0.1.0_basic_nb.check.shot b/linters/ruff/test_data/ruff_nbqa_v0.1.0_basic_nb.check.shot index 699819205..dbbfc7fac 100644 --- a/linters/ruff/test_data/ruff_nbqa_v0.1.0_basic_nb.check.shot +++ b/linters/ruff/test_data/ruff_nbqa_v0.1.0_basic_nb.check.shot @@ -9,9 +9,7 @@ exports[`Testing linter ruff-nbqa test basic_nb 1`] = ` "issueClass": "ISSUE_CLASS_EXISTING", "level": "LEVEL_HIGH", "linter": "ruff-nbqa", - "message": "/tmp/plugins_/test_data/basic_nb.in.ipynb:cell_1:1:8: F401 [*] \`os\` imported but unused -Found 1 error. -[*] 1 fixable with the \`--fix\` option.", + "message": "/tmp/plugins_/test_data/basic_nb.in.ipynb:cell_1:1:8: F401 [*] \`os\` imported but unused", "targetType": "jupyter", }, ], diff --git a/linters/ruff/test_data/ruff_nbqa_v0.5.0_basic_nb.check.shot b/linters/ruff/test_data/ruff_nbqa_v0.5.0_basic_nb.check.shot index e6ac11128..a7a64099f 100644 --- a/linters/ruff/test_data/ruff_nbqa_v0.5.0_basic_nb.check.shot +++ b/linters/ruff/test_data/ruff_nbqa_v0.5.0_basic_nb.check.shot @@ -11,7 +11,7 @@ exports[`Testing linter ruff-nbqa test basic_nb 1`] = ` "linter": "ruff-nbqa", "message": "/tmp/plugins_/test_data/basic_nb.in.ipynb:cell_1:1:8: F401 [*] \`os\` imported but unused | -1 | # %%NBQA-CELL-SEP22268f +1 | # %%NBQA-CELL-SEP 2 | import os | ^^ F401 3 | diff --git a/tests/utils/landing_state.ts b/tests/utils/landing_state.ts index 4a325fd2d..bae5606ae 100644 --- a/tests/utils/landing_state.ts +++ b/tests/utils/landing_state.ts @@ -76,6 +76,7 @@ const normalizeMessage = (message?: string) => .replaceAll("\\", "/") .replace(/\/plugins_.{6}/gm, "/plugins_") .replace(".dup.", ".") + .replace(/NBQA-CELL-SEP.{6}/gm, "NBQA-CELL-SEP") .trim(); // trunk-ignore(eslint/@typescript-eslint/no-non-null-assertion)