📝 `WPS617` false positive with keyword args (#3596)
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.
#bug #help_wanted #levelstarter #good_first_issue #wemake_python_styleguide #wps
sent via relator