[Django] #28996: Play with booleans and remove some trivial 'conitnue's

5 views
Skip to first unread message

Django

unread,
Jan 8, 2018, 8:56:08 AM1/8/18
to django-...@googlegroups.com
#28996: Play with booleans and remove some trivial 'conitnue's
------------------------------------------------+------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------


--
Ticket URL: <https://code.djangoproject.com/ticket/28996>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 8, 2018, 8:56:38 AM1/8/18
to django-...@googlegroups.com
#28996: Play with booleans and remove some trivial 'conitnue's
-------------------------------------+-------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Дилян Палаузов):

* Attachment "bool_continue.patch" added.

Django

unread,
Jan 8, 2018, 9:52:30 AM1/8/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
--------------------------------------+------------------------------------

Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* component: Uncategorized => Core (Other)


Comment:

The patch has a number of syntax errors and flake8 warnings. Can you
please check that and ideally, also run the tests? (If you can submit the
patch as a pull request, those checks would be automated.)

--
Ticket URL: <https://code.djangoproject.com/ticket/28996#comment:1>

Django

unread,
Jan 8, 2018, 11:32:23 AM1/8/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
--------------------------------------+------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Дилян Палаузов):

* Attachment "bool_continue.patch" added.


Django

unread,
Jan 8, 2018, 12:36:08 PM1/8/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
--------------------------------------+------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham):

Test failure:
{{{
======================================================================
FAIL: test_render_int
(forms_tests.widget_tests.test_checkboxinput.CheckboxInputTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/python3.6.4/lib/python3.6/unittest/case.py", line 59, in
testPartExecutor
yield
File "/opt/python3.6.4/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File
"/home/tim/code/django/tests/forms_tests/widget_tests/test_checkboxinput.py",
line 40, in test_render_int
html='<input checked type="checkbox" name="is_cool" value="0" />',
File "/home/tim/code/django/tests/forms_tests/widget_tests/base.py",
line 25, in check_html
assertEqual(output.replace('&#34;', '&quot;'), html)
File "/home/tim/code/django/django/test/testcases.py", line 680, in
assertHTMLEqual
self.fail(self._formatMessage(msg, standardMsg))
File "/opt/python3.6.4/lib/python3.6/unittest/case.py", line 670, in
fail
raise self.failureException(msg)
AssertionError: <input name="is_cool" type="checkbox" /> != <input checked
name="is_cool" type="checkbox" value="0" />
- <input name="is_cool" type="checkbox" />
+ <input checked name="is_cool" type="checkbox" value="0" />
? ++++++++ ++++++++++
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28996#comment:2>

Django

unread,
Jan 9, 2018, 9:48:02 AM1/9/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
--------------------------------------+------------------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Дилян Палаузов):

* Attachment "bool_continue.patch" added.


Django

unread,
Jan 11, 2018, 11:54:05 PM1/11/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: Priyansh
Type: | Saxena
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Priyansh Saxena):

* owner: nobody => Priyansh Saxena
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/28996#comment:3>

Django

unread,
Jan 12, 2018, 10:08:02 AM1/12/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: Priyansh
Type: | Saxena
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/9578 PR] from the patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/28996#comment:4>

Django

unread,
Jan 12, 2018, 1:40:25 PM1/12/18
to django-...@googlegroups.com
#28996: Simplify some boolean constructs and remove some trivial 'continue'
statements
-------------------------------------+-------------------------------------
Reporter: Дилян Палаузов | Owner: Priyansh
Type: | Saxena
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"a38ae914d89809aed6d79337b74a8b31b6d3849a" a38ae91]:
{{{
#!CommitTicketReference repository=""
revision="a38ae914d89809aed6d79337b74a8b31b6d3849a"
Fixed #28996 -- Simplified some boolean constructs and removed trivial
continue statements.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28996#comment:5>

Reply all
Reply to author
Forward
0 new messages