From 699f176697f14318f240a7479637fa9a4fd8890d Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Mon, 19 Feb 2024 14:12:00 -0300 Subject: [PATCH] fix skip --- ruff.toml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ruff.toml b/ruff.toml index a44fcdc8..2d267b09 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,12 +1,6 @@ target-version = "py312" line-length = 120 -# Skipping b/c These notebooks mix R and Python and -# will return false positive for "F821 Undefined name."" -exclude = [ - "2017-11-30-rerddap.ipynb", - "2018-02-20-obis.ipynb" -] -select = [ +lint.select = [ "F", # flakes "I", # import sorting "U", # upgrade @@ -15,3 +9,14 @@ select = [ lint.ignore = [ "E402", # Module level import not at top of file ] + +# Skipping b/c These notebooks mix R and Python +# NB: nbqa-ruff acts on converted .py so we cannot glob .ipynb :-/ +# https://github.com/nbQA-dev/nbQA/issues/823 +[lint.extend-per-file-ignores] +"jupyterbook/content/code_gallery/data_access_notebooks/2017-11-30-rerddap*" = [ + "F821", # Undefined name +] +"jupyterbook/content/code_gallery/data_access_notebooks/2018-02-20-obis*" = [ + "F821", # Undefined name +]