mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
Remove customizable reference enum names (#15647)
The AST generator creates a reference enum for each syntax group — an enum where each variant contains a reference to the relevant syntax node. Previously you could customize the name of the reference enum for a group — primarily because there was an existing `ExpressionRef` type that wouldn't have lined up with the auto-derived name `ExprRef`. This follow-up PR is a simple search/replace to switch over to the auto-derived name, so that we can remove this customization point.
This commit is contained in:
parent
fa546b20a6
commit
ef85c682bd
11 changed files with 223 additions and 231 deletions
|
@ -26,10 +26,6 @@
|
|||
# Controls the name of the AnyNodeRef::is_foo_bar method. The default is the
|
||||
# group name in snake_case.
|
||||
#
|
||||
# ref_enum_ty:
|
||||
# The name of the reference enum that we create for this group. The default
|
||||
# is the group name with `Ref` added to the end.
|
||||
#
|
||||
# rustdoc:
|
||||
# A rustdoc comment that is added to the group's enums.
|
||||
#
|
||||
|
@ -51,7 +47,6 @@ ModExpression = {}
|
|||
add_suffix_to_is_methods = true
|
||||
anynode_is_label = "statement"
|
||||
rustdoc = "/// See also [stmt](https://docs.python.org/3/library/ast.html#ast.stmt)"
|
||||
ref_enum_ty = "StatementRef"
|
||||
|
||||
[Stmt.nodes]
|
||||
StmtFunctionDef = {}
|
||||
|
@ -84,7 +79,6 @@ StmtIpyEscapeCommand = {}
|
|||
add_suffix_to_is_methods = true
|
||||
anynode_is_label = "expression"
|
||||
rustdoc = "/// See also [expr](https://docs.python.org/3/library/ast.html#ast.expr)"
|
||||
ref_enum_ty = "ExpressionRef"
|
||||
|
||||
[Expr.nodes]
|
||||
ExprBoolOp = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue