[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:
Dmitry Shachnev 2024-12-09 03:51:59 +03:00 committed by GitHub
parent ed6de39725
commit d53e5cd25a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;