c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #32878
[Bug 856192] Re: [trunk] Docstrings Byte Literal contains non-ascii characters
Note that all our Python source files are UTF-8 encoded, as shown in the coding hint at the top of each file:
# -*- coding: utf-8 -*-
So all unicode characters are just fine in any string, including docstrings: they're gonna be utf8-encoded.
And that's fine because no-one should ever assume that strings are ascii, even docstrings.
Now I do agree that there's no need for the funky apostrophe here, or
for documenting self,cr, uid or ids at all (I think it's in our
guidelines, and if not I will add it). So we should simply get rid of
that useless stuff :-)
PS: definitely a wishlist
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/856192
Title:
[trunk] Docstrings Byte Literal contains non-ascii characters
Status in OpenERP Addons (modules):
Confirmed
Bug description:
Hello,
In the docstring methods, the following line is often present :
@param uid: the current user’s ID for security checks
The char ’ is not an ascii char and the docstrings are not declared as
unicode (u"""docstring content""") [1]
With the command below, 254 lines match.
grep -hcr "the current user’s ID for security checks" * | awk '{ count += $0} END {print count}'
I think we should do some sed on all addons to correct that (and server as there is the same issue) like :
grep -hlr "the current user’s ID for security checks" * | xargs sed -i "s/the current user’s ID for security checks/the current user's ID for security checks/g"
Some others with the same problem:
grep -hcr "’" * | awk '{ count += $0} END {print count}' (result : 688)
@param ids: List of open wiki page’s IDs
@param ids: List of calendar event import’s IDs
@param data_id: Get Data’s ID or False
@param ids: List of auction lots enable’s IDs.
Thanks
Guewen
[1] http://www.python.org/dev/peps/pep-0257/
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/856192/+subscriptions
References