ruff/crates/ruff_python_ast/src
Charlie Marsh adc8bb7821
Rename Arguments to Parameters in the AST (#6253)
## Summary

This PR renames a few AST nodes for clarity:

- `Arguments` is now `Parameters`
- `Arg` is now `Parameter`
- `ArgWithDefault` is now `ParameterWithDefault`

For now, the attribute names that reference `Parameters` directly are
changed (e.g., on `StmtFunctionDef`), but the attributes on `Parameters`
itself are not (e.g., `vararg`). We may revisit that decision in the
future.

For context, the AST node formerly known as `Arguments` is used in
function definitions. Formally (outside of the Python context),
"arguments" typically refers to "the values passed to a function", while
"parameters" typically refers to "the variables used in a function
definition". E.g., if you Google "arguments vs parameters", you'll get
some explanation like:

> A parameter is a variable in a function definition. It is a
placeholder and hence does not have a concrete value. An argument is a
value passed during function invocation.

We're thus deviating from Python's nomenclature in favor of a scheme
that we find to be more precise.
2023-08-01 13:53:28 -04:00
..
visitor Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
all.rs Allow generic tuple and list calls in __all__ (#6247) 2023-08-01 12:01:48 -04:00
call_path.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
cast.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
comparable.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
docstrings.rs Move Python whitespace utilities into new ruff_python_whitespace crate (#4993) 2023-06-10 00:59:57 +00:00
function.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
hashable.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
helpers.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
identifier.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
imports.rs Include alias when formatting import-from structs (#5786) 2023-07-15 15:53:21 -04:00
lib.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
node.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
nodes.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
relocate.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
statement_visitor.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
stmt_if.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
str.rs Basic string formatting 2023-06-23 09:46:05 +02:00
traversal.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
types.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
visitor.rs Rename Arguments to Parameters in the AST (#6253) 2023-08-01 13:53:28 -04:00
whitespace.rs Ignore end-of-line file exemption comments (#6160) 2023-07-29 00:40:32 +00:00