Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect list comprehension #2015

Open
lindhe opened this issue Aug 11, 2024 · 2 comments · May be fixed by #2017
Open

Incorrect list comprehension #2015

lindhe opened this issue Aug 11, 2024 · 2 comments · May be fixed by #2017

Comments

@lindhe
Copy link

lindhe commented Aug 11, 2024

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!

@ThiefMaster
Copy link
Member

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.

@lindhe
Copy link
Author

lindhe commented Aug 12, 2024

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

@lindhe lindhe linked a pull request Aug 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants