Opened 7 years ago

Closed 7 years ago

#28930 closed Cleanup/optimization (fixed)

Simplify code with all() and any()

Reported by: Дилян Палаузов Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Srinivas Reddy Thatiparthy)


Attachments (1)

any_all.patch (17.4 KB ) - added by Дилян Палаузов 7 years ago.

Download all attachments as: .zip

Change History (12)

by Дилян Палаузов, 7 years ago

Attachment: any_all.patch added

comment:1 by Claude Paroz, 7 years ago

Triage Stage: UnreviewedAccepted

Thanks, please provide a pull request.

comment:2 by Srinivas Reddy Thatiparthy, 7 years ago

Description: modified (diff)

comment:3 by Srinivas Reddy Thatiparthy, 7 years ago

Description: modified (diff)

What is the policy for taking this patch and raising a PR? Ofcourse, I acknowledge the author.

I like this patch very much, i couldn't resist to raise a PR. If i break the unspoken rules, please close the PR.

https://github.com/django/django/pull/9493

comment:4 by Tim Graham, 7 years ago

Component: UncategorizedCore (Other)
Has patch: set
Summary: Utilize all()/any()Simplify code iwth all() and any()
Triage Stage: AcceptedReady for checkin

That's fine. For future reference, the way to credit the patch author is using git commit --amend --author="Дилян Палаузов <Dilyan.Palauzov@db.com>". It would have been nice if you fixed up the flake8 issues and the failing lists, but I've done that. I also reverted changes to vendored code like six.py and an incorrect change in admin/utils.py which changed behavior and broke a test.

comment:5 by Tim Graham, 7 years ago

Summary: Simplify code iwth all() and any()Simplify code with all() and any()

comment:6 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: newclosed

In 4c599ece:

Fixed #28930 -- Simplified code with any() and all().

comment:7 by Дилян Палаузов, 7 years ago

Resolution: fixed
Status: closednew

What happened to the changes in django/utils/translation/trans_real.py and tests/schema/tests.py ?

comment:8 by Tim Graham <timograham@…>, 7 years ago

In 5f45640:

Refs #28930 -- Simplified schemas test with any().

comment:9 by Tim Graham, 7 years ago

Resolution: fixed
Status: newclosed

Changes were made to django/utils/translation/trans_real.py in the original patch.

comment:10 by Дилян Палаузов, 7 years ago

Resolution: fixed
Status: closednew

I wrote django/utils/translation/trans_real.py but I meant django/utils/http.py .

comment:11 by Tim Graham, 7 years ago

Resolution: fixed
Status: newclosed

As the docstring indicates, that code is copied from cpython so I didn't want to make substantial changes to it.

Note: See TracTickets for help on using tickets.
Back to Top