From 4b8b3a1ced2351e5973e45259b88220a1b33d528 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 4 Jan 2024 15:38:42 -0600 Subject: [PATCH] Add jupyter notebooks to ecosystem checks (#9293) Implements https://github.com/astral-sh/ruff/pull/8873 via https://github.com/astral-sh/ruff/pull/9286 --- .../ruff-ecosystem/ruff_ecosystem/defaults.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/python/ruff-ecosystem/ruff_ecosystem/defaults.py b/python/ruff-ecosystem/ruff_ecosystem/defaults.py index 7c3aaa0214a63..285f2eb76d581 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/defaults.py +++ b/python/ruff-ecosystem/ruff_ecosystem/defaults.py @@ -9,6 +9,8 @@ Repository, ) +JUPYTER_NOTEBOOK_SELECT = "A,E703,F704,B015,B018,D100" + # TODO(zanieb): Consider exporting this as JSON and loading from there instead DEFAULT_TARGETS = [ Project(repo=Repository(owner="DisnakeDev", name="disnake", ref="master")), @@ -93,4 +95,20 @@ repo=Repository(owner="zulip", name="zulip", ref="main"), check_options=CheckOptions(select="ALL"), ), + # Jupyter Notebooks + Project( + # fork of `huggingface` without syntax errors in notebooks + repo=Repository( + owner="zanieb", + name="huggingface-notebooks", + ref="zb/fix-syntax", + ), + check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), + config_overrides={"include": ["*.ipynb"]}, + ), + Project( + repo=Repository(owner="openai", name="openai-cookbook", ref="main"), + check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), + config_overrides={"include": ["*.ipynb"]}, + ), ]