[Django] #27463: ambiguous variable name 'l'

已查看 345 次
跳至第一个未读帖子

Django

未读,
2016年11月9日 02:05:512016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
------------------------------------------------+------------------------
Reporter: Ramin Farajpour Cami | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Hi,

In some fonts, character 'l' are indistinguishable from the numeral one.
So better use other name instead.

https://github.com/django/django/blob/master/tests/queries/tests.py#L567&L574

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

Django

未读,
2016年11月9日 02:07:082016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Utilities | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ramin Farajpour Cami):

* owner: nobody => Ramin Farajpour Cami
* status: new => assigned


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

Django

未读,
2016年11月9日 02:15:322016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Utilities | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ramin Farajpour Cami):

https://pep8.readthedocs.io/en/latest/_modules/pycodestyle.html

{{{
Okay: L = 0
Okay: o = 123
Okay: i = 42
E741: l = 0
E741: O = 123
E741: I = 42
}}}

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

Django

未读,
2016年11月9日 04:57:452016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:

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

* component: Utilities => Core (Other)


Comment:

I'm not sure about this, particularly if our style tool (`flake8`) doesn't
provide automated enforcement. A font that doesn't distinguish between one
character or another doesn't seem so useful for programmers.

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

Django

未读,
2016年11月9日 05:09:412016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ramin Farajpour Cami):

really!

Flake8 uses ranges for mccabe, pyflakes, and pycodestyle because each of
those projects tend to add new checks in minor releases.

http://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-
its-dependencies

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

Django

未读,
2016年11月9日 07:36:032016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ramin Farajpour Cami):

pycodestyle member tell me :
https://github.com/PyCQA/pycodestyle/issues/598

Allow me for PR ?

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

Django

未读,
2016年11月9日 07:36:282016/11/9
收件人 django-...@googlegroups.com
#27463: ambiguous variable name 'l'
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Aymeric Augustin):

I have yet to come across a monospace font where `l` and `I` are
identical, but it takes less effort to accept a PR making that change than
to discuss.

--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:6>

Django

未读,
2016年11月9日 12:48:182016/11/9
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings

-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:7>

Django

未读,
2016年11月10日 00:57:062016/11/10
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ramin Farajpour Cami):

Hi,

i should check `ALL` files `.py` django for check this warnings?

--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:8>

Django

未读,
2016年11月10日 05:43:422016/11/10
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Ideally you could get flake8 working with the latest version of
pycodestyle so you can see and fix all the warnings. If it's difficult,
then we'll just wait until flake8 is updated.

--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:9>

Django

未读,
2016年11月10日 06:31:132016/11/10
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ramin Farajpour Cami):

Ok, let's go , i need just `pycodesyle` latest version,


{{{
root@raminfp:~# python pycodestyle.py usr/django/django/apps

/usr/django/django/apps/registry.py:425:1: E305 expected 2 blank lines
after class or function definition, found 1
}}}

i going to fix `E305 expected 2 blank lines after class or function
definition, found 1`, because i see pycodestyle in new version,

Thanks Again,

--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:10>

Django

未读,
2016年11月12日 00:51:212016/11/12
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ramin Farajpour Cami):

[https://github.com/django/django/pull/7545 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:11>

Django

未读,
2016年11月12日 00:58:522016/11/12
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ramin Farajpour Cami):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:12>

Django

未读,
2016年11月12日 06:34:262016/11/12
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
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 Ramin Farajpour Cami):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:13>

Django

未读,
2016年11月12日 19:05:262016/11/12
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ramin Farajpour Cami):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:14>

Django

未读,
2016年11月14日 15:48:332016/11/14
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: 1.10
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):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:13>

Django

未读,
2016年11月14日 17:40:482016/11/14
收件人 django-...@googlegroups.com
#27463: Fix ambiguous variable flake8 warnings
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: Ramin
Cami | Farajpour Cami
Type: | Status: closed

Cleanup/optimization |
Component: Core (Other) | Version: 1.10
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:"0a63ef3f61f42c5fd22f2d0b626e386fd426ebed" 0a63ef3f]:
{{{
#!CommitTicketReference repository=""
revision="0a63ef3f61f42c5fd22f2d0b626e386fd426ebed"
Fixed #27463 -- Fixed E741 flake8 warnings.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27463#comment:14>

回复全部
回复作者
转发
0 个新帖子