jinja icon indicating copy to clipboard operation
jinja copied to clipboard

Incorrect list comprehension

Open lindhe opened this issue 1 year ago • 2 comments

This list comprehension is incorrect:

image

https://jinja.palletsprojects.com/en/latest/templates/#jinja-filters.selectattr

It says u for user in users when it should be user for user in users (I'm pretty sure). Tried to find it here in this repo, but was unable to. Didn't find a link to GitHub on the docs page, so hope this is the right place to post.

Cheers!

lindhe avatar Aug 11 '24 11:08 lindhe

https://github.com/pallets/jinja/blob/3.1.x/src/jinja2/filters.py#L1632-L1633

PR welcome :) (against the 3.1.x branch) Note that the rejectattr docstring has the same issue.

ThiefMaster avatar Aug 11 '24 11:08 ThiefMaster

Ah, there it is! Thank you. PR coming soon!

lindhe avatar Aug 12 '24 08:08 lindhe