emerge python code

Andre Heinecke aheinecke at intevation.de
Mon Jan 10 18:24:11 CET 2011


Hi,

I find your efforts commendable, i've also got pretty shocked when running
pychecker the first time on an emerge file.

Better code quality would help the maintainability stability and beginner 
friendlyness (find the right code undstand the code correctly) quite a lot in 
my opinion. I've wasted quite some time (especially when getting started with 
emerge) working on obsolete code that was never called or struggling with 
problems that i did not understand because they came from something like the 
use of a "reserved" name. Most warnings are there for a reason. So i don't 
agree with Patrick that there is little interest.

Am Sonntag, 9. Januar 2011 13:12:57 schrieb Wolfgang Rohdewald:
> and I have a question: Some functions use argument names
> like dir or type. Those a predefined built-ins. It is of
> course allowed to redefine them locally but there should
> be a good reason for doing this.
>
> but I cannot rename arguments unless I can also rename
> them in all callers of this function. So: Is the code
> in emerge/bin only referenced here and in portage or
> is there any other external use outside of kdesupport?
There is no usage of emerge code outside of emerge that I know of.

> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 05:33:38 2011 +0100
>
>     replace obsolescent <> by !=
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 05:47:52 2011 +0100
>
>     Indentation should always be 4 spaces. This was mostly so but
> not
>     always. This is only a formatting change.
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 05:51:58 2011 +0100
>
>     Never mix tabs and spaces for indenting within the same file
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 05:55:08 2011 +0100
>
>     portage_versions.py used tabs for indentation, change to 4
> spaces
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 06:06:03 2011 +0100
>
>     remove unneeded semicolon after last statement in line
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 06:33:10 2011 +0100
>
>     comma: no space before, always one space after
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 06:38:52 2011 +0100
>
>     operators should always be followed by a space
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 10:49:45 2011 +0100
>
>     we do not want more than one statement per line for clarity.
>     This patch contains only whitespace changes.
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 10:56:07 2011 +0100
>
>     fix more places with more than one statement per line.
>     Those fixes actually change the code.
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 11:19:52 2011 +0100
>
>     fix pylint warnings about usage of possibly undefined loop
> variables.
>     In emerge.py, the argument scanner is simplified as a side
> result
>
> Author: Wolfgang Rohdewald <wolfgang at rohdewald.de>
> Date:   Sun Jan 9 12:17:32 2011 +0100
>
>     since we now require python2.7, remove optparse code. Always
> use
>     argparse code.

I would rather have you make small commits that can be reviewed in a timely 
manner then to push one huge changeset. The policy in emerge there is mainly 
just commit and a post commit review will be done. Even more of an argument in 
my opinion to do some cleanup now and then.

Regards,
Andre

-- 
Andre Heinecke |  ++49-541-335083-262 |  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-windows/attachments/20110110/2156937f/attachment.sig 


More information about the Kde-windows mailing list