Skip to content

Commit

Permalink
refactor: Adds tools.codemod.Ruff
Browse files Browse the repository at this point in the history
#3630 (comment)

**Introduces no new behavior**.
  • Loading branch information
dangotbanned committed Oct 16, 2024
1 parent 7cf627d commit 0615228
Show file tree
Hide file tree
Showing 6 changed files with 287 additions and 153 deletions.
8 changes: 4 additions & 4 deletions sphinxext/code_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from sphinx.util.parsing import nested_parse_to_nodes

from altair.vegalite.v5.schema._typing import VegaThemes
from tools.codemod import embed_extract_func_def, extract_func_def
from tools.codemod import extract_func_def, extract_func_def_embed

if TYPE_CHECKING:
import sys
Expand Down Expand Up @@ -222,11 +222,11 @@ def run(self) -> Sequence[nodes.Node]:
optgroup("Carbon", (option(nm) for nm in carbon_names)),
)
)
py_code = embed_extract_func_def(
py_code = extract_func_def_embed(
module_name,
func_name,
before_code=_before_code(REFRESH_NAME, SELECT_ID, TARGET_DIV_ID),
after_code=f"{REFRESH_NAME}()",
before=_before_code(REFRESH_NAME, SELECT_ID, TARGET_DIV_ID),
after=f"{REFRESH_NAME}()",
assign_to="chart",
indent=4,
)
Expand Down
Loading

0 comments on commit 0615228

Please sign in to comment.