[packagekit] pylint madness

Tim Lauridsen tim.lauridsen at googlemail.com
Sat Sep 27 23:55:06 PDT 2008


Tim Lauridsen wrote:
> Maybe we should have an discussion about the use of pylint:
>
> - (name, idver, a, repo) = self.get_package_from_id(package_id)
>
> + (name, _, _, repo) = self.get_package_from_id(package_id)
>
>
> A change like this, to silence pylint is bad IMHO. it is better to 
> disable the pylint check for unused vars.
> then to make this weird stuff, it really make the code harder to read 
> IMHO.
>
> pyint is make made to check the code for the coding standards done by 
> the firm who has made pylint, not
> for the upstream python coding standard, so a lot of checks has to be 
> disabled because they are totally insane.
>
> pylint is good to find error in then code, but a lot of the coding 
> standard stuff need to be turned off.
>
>
> Tim
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>   

Another case of pylint madness if to move methods to function outside 
because self is not used.
- self.error(ERROR_DEP_RESOLUTION_FAILED, self._format_msgs(msgs))

+ self.error(ERROR_DEP_RESOLUTION_FAILED, _format_msgs(msgs))


stuff like this really real make the code look bad and harder to reader. 
private worker methods should not be moved out the class they
are used in.

Tim



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20080928/a7761554/attachment-0004.htm>


More information about the PackageKit mailing list