Opened 13 years ago

Closed 13 years ago

#2479 closed task (fixed)

Make write pep8 complaint

Reported by: godiard Owned by: godiard
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Write Version: 0.90.x
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


Attachments (3)

0004-make-AbiWordActivity-pep8-complaint.patch (13.5 KB) - added by godiard 13 years ago. (2.7 KB) - added by godiard 13 years ago. (3.3 KB) - added by godiard 13 years ago.

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by godiard

Changed 13 years ago by godiard

comment:1 Changed 13 years ago by erikos

Thanks Gonzalo for this effort! These changes should go only into the master branch, as they are cleanups. Extra points for running pylint as well. There are some of the warnings that can be fixes as well. Let me know if you are stuck by some, I probably know already if it can be easily fixed or not. You should probably assign the ticket to you as you are working on it.

I will do a comment per patch.


249	            self._shared_activity.connect('buddy-joined', 
250	                self._buddy_joined_cb)

In emacs I just use tab for that, the next line then gets aligned under the buddy joined. Same below:

290	        logger.debug('Tube address: %s', \ 
291	         self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].GetDBusTubeAddress(id))

I would probably put it in two lines: address = self.tubes_chan[te... and then logger.debug('Tube address: %s', address)

There are some others where it is good to use tab in this patch (e.g. 448, 449).

466: that should be under the logger (the '#'), like in _buddy_left_cb.

510: Wow, that one sounds mystic, wonder what the magic number 3000 is :/ Extra points if you know how to make that more readable.

comment:2 Changed 13 years ago by erikos

211: When I align a line after a '\' I use 8 spaces in the next line. It gets more readable for example in cases like this:

logging.debug("Error %s", \
    value = 10

(same might be true in 0004-make-AbiWordActivity-pep8-complaint.patch) All the rest looks fine.

comment:3 Changed 13 years ago by erikos

Same here, use tab to align the second line. When using a '\' use eight spaces.

comment:4 Changed 13 years ago by godiard

  • Owner changed from uwog to godiard
  • Status changed from new to assigned

comment:6 Changed 13 years ago by godiard

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.