mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:24 +00:00
[flake8-commas]: Fix example replacement in docs (#14843)
## Summary Minor change for the documentation of COM818 rule. This was a block called “In the event that a tuple is intended”, but the suggested change did not produce a tuple. ## Test Plan ```python >>> import json >>> (json.dumps({"bar": 1}),) # this is a tuple ('{"bar": 1}',) >>> (json.dumps({"bar": 1})) # not a tuple '{"bar": 1}' ```
This commit is contained in:
parent
ed6de39725
commit
d53e5cd25a
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ impl AlwaysFixableViolation for MissingTrailingComma {
|
|||
/// import json
|
||||
///
|
||||
///
|
||||
/// foo = (json.dumps({"bar": 1}))
|
||||
/// foo = (json.dumps({"bar": 1}),)
|
||||
/// ```
|
||||
#[derive(ViolationMetadata)]
|
||||
pub(crate) struct TrailingCommaOnBareTuple;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue