`WPS617` false positive with keyword args
bughelp wantedlevel:startergood first issue
```python
self._media_by_precedence = sorted(
(
media_type
for parser in self._parsers.values()
if (media_type := MediaType(parser.content_type)).quality != 0
),
key=lambda media: (media.specificity, media.quality), # noqa: WPS617
reverse=True,
)
```
It says:
```
django_modern_rest/negotiation.py
52:17 WPS617 Found lambda assigned as an attribute
key=lambda media: (media.specificity, media.quality),
^
```
Which is clearly a bug, it is a named param, not an attribute.
PRs are welcome, this is easy to fix.
1 条评论