Opened 7 years ago
Closed 7 years ago
#28996 closed Cleanup/optimization (fixed)
Simplify some boolean constructs and remove some trivial 'continue' statements
Reported by: | Дилян Палаузов | Owned by: | Priyansh Saxena |
---|---|---|---|
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
Attachments (1)
Change History (6)
comment:1 by , 7 years ago
Component: | Uncategorized → Core (Other) |
---|---|
Patch needs improvement: | set |
Summary: | Play with booleans and remove some trivial 'conitnue's → Simplify some boolean constructs and remove some trivial 'continue' statements |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 7 years ago
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('"', '"'), 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" /> ? ++++++++ ++++++++++
by , 7 years ago
Attachment: | bool_continue.patch added |
---|
comment:3 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 7 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
PR from the patch.
Note:
See TracTickets
for help on using tickets.
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.)