[Sugar-devel] [PATCH 06/21 sugar-toolkit] PEP8 cleanup: fix inline comment spacing

Simon Schampijer simon at schampijer.de
Fri Oct 29 06:50:30 EDT 2010


On 10/15/2010 11:01 PM, Sascha Silbe wrote:
> pep8 wants inline comments to be prefixed by at least two spaces. Let's just
> move them to a separate line as that's easier to read anyway.
>

In the second case in this patch I think having them in the same line is 
easier to read. Might be taste. A lot of those comments are not that 
helpful anyway - we should revise them in another go.

> Signed-off-by: Sascha Silbe<sascha-pgp at silbe.org>
>
> diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
> index 100f05a..ea3a9c0 100644
> --- a/src/sugar/graphics/icon.py
> +++ b/src/sugar/graphics/icon.py
> @@ -61,7 +61,8 @@ class _SVGLoader(object):
>                   logging.error(
>                       'Icon %s, entity %s is invalid.', file_name, entity)
>
> -        import rsvg # XXX this is very slow!  why?
> +        # XXX this is very slow!  why?
> +        import rsvg
>           return rsvg.Handle(data=icon)
>
>
> diff --git a/src/sugar/presence/activity.py b/src/sugar/presence/activity.py
> index 47de8aa..a057e5a 100644
> --- a/src/sugar/presence/activity.py
> +++ b/src/sugar/presence/activity.py
> @@ -683,11 +683,16 @@ class _JoinCommand(_BaseCommand):
>           # since only the owner can change invite-only, that would break
>           # activity scope changes.
>           props = {
> -            'anonymous': False,   # otherwise buddy resolution breaks
> -            'invite-only': False, # anyone who knows about the channel can join
> -            'invite-restricted': False,     # so non-owners can invite others
> -            'persistent': False,  # vanish when there are no members
> -            'private': True,      # don't appear in server room lists
> +            # otherwise buddy resolution breaks
> +            'anonymous': False,
> +            # anyone who knows about the channel can join
> +            'invite-only': False,
> +            # so non-owners can invite others
> +            'invite-restricted': False,
> +            # vanish when there are no members
> +            'persistent': False,
> +            # don't appear in server room lists
> +            'private': True,
>           }
>           props_to_set = []
>           for ident, name, sig_, flags in prop_specs:
> --
> 1.7.1
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



More information about the Sugar-devel mailing list