← Back to team overview

gtg team mailing list archive

[Merge] lp:~nimit-svnit/gtg/tools-cleanup into lp:gtg

 

Nimit Shah has proposed merging lp:~nimit-svnit/gtg/tools-cleanup into lp:gtg.

Requested reviews:
  Gtg developers (gtg)

For more details, see:
https://code.launchpad.net/~nimit-svnit/gtg/tools-cleanup/+merge/140611

Pep8ification of GTG/tools/, GTG/setup.py and GTG/info.py
The only folder remaining is backends. Keeping a separate request for it as I felt that it would be intimidating to review the entire thing together (1153 errors!)
-- 
https://code.launchpad.net/~nimit-svnit/gtg/tools-cleanup/+merge/140611
Your team Gtg developers is requested to review the proposed merge of lp:~nimit-svnit/gtg/tools-cleanup into lp:gtg.
=== modified file 'GTG/gtg.py'
--- GTG/gtg.py	2012-11-25 19:19:44 +0000
+++ GTG/gtg.py	2012-12-19 09:45:26 +0000
@@ -100,6 +100,7 @@
     with open(pidfile, "w") as f:
         f.write(`os.getpid()`)
 
+
 def remove_pidfile(directory):
     """ Remove the pid file """
     pidfile = os.path.join(directory, "gtg.pid")
@@ -129,6 +130,7 @@
         manager.main(once_thru=options.boot_test, uri_list = args)
     core_main_quit(req, ds)
 
+
 def core_main_init(options = None, args = None):
     '''
     Part of the main function prior to the UI initialization.
@@ -155,6 +157,7 @@
     req = ds.get_requester()
     return ds, req
 
+
 def core_main_quit(req, ds):
     '''
     Last bits of code executed in GTG, after the UI has been shut off.

=== modified file 'GTG/info.py'
--- GTG/info.py	2012-11-25 19:19:44 +0000
+++ GTG/info.py	2012-12-19 09:45:26 +0000
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License along with
 # this program.  If not, see <http://www.gnu.org/licenses/>.
 # -----------------------------------------------------------------------------
-"""Various information about GTG. Should be updated for every release. 
+"""Various information about GTG. Should be updated for every release.
 
 Contains the information displayed in GTG's Credits."""
 
@@ -34,122 +34,212 @@
  _('GTG is a personal tasks and TODO-list items organizer for the GNOME.')
 
 # CREDITS
-AUTHORS     = ["Main developers:", \
-               "\tLionel Dricot <ploum@xxxxxxxxx>", \
-               "\tBertrand Rousseau <bertrand.rousseau@xxxxxxxxx>", \
-               "\tPaulo Cabido <paulo.cabido@xxxxxxxxx>", \
-               "\tLuca Invernizzi <invernizzi.l@xxxxxxxxx>", \
-               "\tKevin Mehall <km@xxxxxxxxxxxxxxx>", \
-               "\tLuca Falavigna <dktrkranz@xxxxxxxxxx>", \
-               "\tIzidor Matušov <izidor.matusov@xxxxxxxxx>", \
-               "Contributors:", \
-               "\tAbdul Rauf <abdulraufhaseeb@xxxxxxxxx>", \
-               "\tAbhiram <abhiram.ampabathina@xxxxxxxxx>", \
-               "\tAlayn Gortazar <zutoin@xxxxxxxxx>", \
-               "\tAlan Gomes <alangalvino@xxxxxxxxx>", \
-               "\tAnant Gupta <anant718@xxxxxxxxxxx>", \
-               "\tAndrew Starr-Bochicchio <andrewsomething@xxxxxxxxxx>", \
-               "\tAntonio Roquentin <https://launchpad.net/~antonio-roquentin>", \
-               "\tAntons Rebguns <arebgun@xxxxxxxxx>", \
-               "\tBen Dowling <ben.m.dowling@xxxxxxxxx>", \
-               "\tBrian Kennedy <ekspiulo@xxxxxxxxx>", \
-               "\tBryce Harrington <bryce@xxxxxxxxxxxxxxxxxxx>", \
-               "\tCarl Chenet <chaica@xxxxxxxxxxx>", \
-               "\tChris Johnston <chrisjohnston@xxxxxxxxxx>", \
-               "\tDaniel Neel <dneelyep@xxxxxxxxx>", \
-               "\tdAnjou <>", \
-               "\tDavid Planella <david.planella@xxxxxxxxxx>", \
-               "\tErin McLaughlin <emclaughlin1215@xxxxxxxxx>", \
-               "\tFabio Prina <fabio@xxxxxxxxx>", \
-               "\tFrançois <>", \
-               "\tGérôme Fournier <>", \
-               "\thuxuan <i@xxxxxxxxxx>", \
-               "\tIvan Evtukhovich <evtuhovich@xxxxxxxxx>", \
-               "\tJean-François Fortin Tam <nekohayo@xxxxxxxxx>", \
-               "\tJeff Oliver <kaiserfro@xxxxxxxxx>", \
-               "\tJérôme Guelfucci <jerome.guelfucci@xxxxxxxxx>",      \
-               "\tJoão Ascenso <joaoricardoascenso@xxxxxxxxx>", \
-               "\tJonathan Barnoud <jonathan@xxxxxxxxxxx>", \
-               "\tJonathan Lange <jml@xxxxxxxxx>", \
-               "\tKalle Persson <kalle@xxxxxxxxxxxxxxx>", \
-               "\tKees Cook <kees@xxxxxxxxxx>", \
-               "\tMadhumitha Viswanathan <madhuvishy@xxxxxxxxx>", \
-               "\tMarcos Lenharo <>", \
-               "\tMarko Kevac <marko@xxxxxxxxx>", \
-               "\tMarta Maria Casetti <mmcasetti@xxxxxxxxx>", \
-               "\tMatthew Rasmus <tareth.ml@xxxxxxxxx>", \
-               "\tMichael Vogt <michael.vogt@xxxxxxxxxx>", \
-               "\tNicolas Maître <nimai@xxxxxxxxx>", \
-               "\tNimit Shah <nimit.svnit@xxxxxxxxx>", \
-               "\tPaul Kishimoto <mail@xxxxxxxxxxxxxxxxxxx>", \
-               "\tRichard Klein <kleinric@xxxxxxxxx>", \
-               "\tSaurabh Anand <saurabhanandiit@xxxxxxxxx>", \
-               "\tStefan Handschuh <https://launchpad.net/~handschuh>", \
-               "\tSteve Scheel <nmu.sscheel@xxxxxxxxx>", \
-               "\tSong Yangyu <flyfy1@xxxxxxxxx>", \
-               "\tThibault Fevry <ThibaultFevry@xxxxxxxxx>", \
-               "\tViktor Nagy <viktor.nagy@xxxxxxxxxxx>", \
-               "\tVolodymyr Floreskul <exufer@xxxxxxxxx>", \
-               "\tWolter Hellmund <wolterh6@xxxxxxxxx>", \
-               "\tZach Shepherd <eightball1989@xxxxxxxxx>", \
-               "\tZimin Huang <ienjoycoding@xxxxxxxxx>", \
+AUTHORS = ["Main developers:",
+               "\tLionel Dricot <ploum@xxxxxxxxx>",
+               "\tBertrand Rousseau <bertrand.rousseau@xxxxxxxxx>",
+               "\tPaulo Cabido <paulo.cabido@xxxxxxxxx>",
+               "\tLuca Invernizzi <invernizzi.l@xxxxxxxxx>",
+               "\tKevin Mehall <km@xxxxxxxxxxxxxxx>",
+               "\tLuca Falavigna <dktrkranz@xxxxxxxxxx>",
+               "\tIzidor Matušov <izidor.matusov@xxxxxxxxx>",
+               "Contributors:",
+               "\tAbdul Rauf <abdulraufhaseeb@xxxxxxxxx>",
+               "\tAbhiram <abhiram.ampabathina@xxxxxxxxx>",
+               "\tAlayn Gortazar <zutoin@xxxxxxxxx>",
+               "\tAlan Gomes <alangalvino@xxxxxxxxx>",
+               "\tAnant Gupta <anant718@xxxxxxxxxxx>",
+               "\tAndrew Starr-Bochicchio <andrewsomething@xxxxxxxxxx>",
+               "\tAntonio Roquentin <https://launchpad.net/~antonio-roquentin\
+                                                                        >",
+               "\tAntons Rebguns <arebgun@xxxxxxxxx>",
+               "\tBen Dowling <ben.m.dowling@xxxxxxxxx>",
+               "\tBrian Kennedy <ekspiulo@xxxxxxxxx>",
+               "\tBryce Harrington <bryce@xxxxxxxxxxxxxxxxxxx>",
+               "\tCarl Chenet <chaica@xxxxxxxxxxx>",
+               "\tChris Johnston <chrisjohnston@xxxxxxxxxx>",
+               "\tDaniel Neel <dneelyep@xxxxxxxxx>",
+               "\tdAnjou <>",
+               "\tDavid Planella <david.planella@xxxxxxxxxx>",
+               "\tErin McLaughlin <emclaughlin1215@xxxxxxxxx>",
+               "\tFabio Prina <fabio@xxxxxxxxx>",
+               "\tFrançois <>",
+               "\tGérôme Fournier <>",
+               "\thuxuan <i@xxxxxxxxxx>",
+               "\tIvan Evtukhovich <evtuhovich@xxxxxxxxx>",
+               "\tJean-François Fortin Tam <nekohayo@xxxxxxxxx>",
+               "\tJeff Oliver <kaiserfro@xxxxxxxxx>",
+               "\tJérôme Guelfucci <jerome.guelfucci@xxxxxxxxx>",
+               "\tJoão Ascenso <joaoricardoascenso@xxxxxxxxx>",
+               "\tJonathan Barnoud <jonathan@xxxxxxxxxxx>",
+               "\tJonathan Lange <jml@xxxxxxxxx>",
+               "\tKalle Persson <kalle@xxxxxxxxxxxxxxx>",
+               "\tKees Cook <kees@xxxxxxxxxx>",
+               "\tMadhumitha Viswanathan <madhuvishy@xxxxxxxxx>",
+               "\tMarcos Lenharo <>",
+               "\tMarko Kevac <marko@xxxxxxxxx>",
+               "\tMarta Maria Casetti <mmcasetti@xxxxxxxxx>",
+               "\tMatthew Rasmus <tareth.ml@xxxxxxxxx>",
+               "\tMichael Vogt <michael.vogt@xxxxxxxxxx>",
+               "\tNicolas Maître <nimai@xxxxxxxxx>",
+               "\tNimit Shah <nimit.svnit@xxxxxxxxx>",
+               "\tPaul Kishimoto <mail@xxxxxxxxxxxxxxxxxxx>",
+               "\tRichard Klein <kleinric@xxxxxxxxx>",
+               "\tSaurabh Anand <saurabhanandiit@xxxxxxxxx>",
+               "\tStefan Handschuh <https://launchpad.net/~handschuh>",
+               "\tSteve Scheel <nmu.sscheel@xxxxxxxxx>",
+               "\tSong Yangyu <flyfy1@xxxxxxxxx>",
+               "\tThibault Fevry <ThibaultFevry@xxxxxxxxx>",
+               "\tViktor Nagy <viktor.nagy@xxxxxxxxxxx>",
+               "\tVolodymyr Floreskul <exufer@xxxxxxxxx>",
+               "\tWolter Hellmund <wolterh6@xxxxxxxxx>",
+               "\tZach Shepherd <eightball1989@xxxxxxxxx>",
+               "\tZimin Huang <ienjoycoding@xxxxxxxxx>",
 ]
-ARTISTS     = ["Kalle Persson <kalle@xxxxxxxxxxxxxxx>", \
+ARTISTS = ["Kalle Persson <kalle@xxxxxxxxxxxxxxx>",
                 "Bertrand Rousseau <bertrand.rousseau@xxxxxxxxx>"]
 ARTISTS.sort()
 TRANSLATORS = \
 """Afrikaans:Arthur Rilke, Walter Leibbrandt, Wesley Channon
+
 Albanian: Vilson Gjeci
-Arabic: Ahmed Kotb, Ali AlNoaimi, Anas Almzoghy, Basher Aobasher, Islam Alshaikh, Kaïs Bejaoui
+
+Arabic: Ahmed Kotb, Ali AlNoaimi, Anas Almzoghy, Basher Aobasher,
+Islam Alshaikh, Kaïs Bejaoui
+
 Asturian: Xuacu Saturio, ivarela
+
 Basque: Asier Iturralde Sarasola, Oier Mees
-Belarusian: Egor Kuryanovich, Iryna Nikanchuk 
+
+Belarusian: Egor Kuryanovich, Iryna Nikanchuk
+
 Bengali: XFACT, nasir khan saikat
-Brazilian: AdirKuhn, André Gondim, Belenos Govannnon, Daniel Tiecher, Djavan Fagundes, Douglas Santos, João Cruz Jr, João Santana, NeLaS, Nilton, Rafael Neri, Teylo Laundos Aguiar, Waldir Leoncio, andre felix
+
+Brazilian: AdirKuhn, André Gondim, Belenos Govannnon, Daniel Tiecher,
+Djavan Fagundes, Douglas Santos, João Cruz Jr, João Santana, NeLaS, Nilton,
+Rafael Neri, Teylo Laundos Aguiar, Waldir Leoncio, andre felix
+
 Bulgarian: Damyan Ivanov, Svetoslav Stefanov, i.raynov
-Catalan: Carles Sala, David Planella, Juanma Hernández, Marc Recasens, Radina Matic, Siegfried Gevatter, anna marti
-Chinese (simplified): Ang Gao, Anthony Fok, Eleanor Chen, Harold.luo, Heling Yao, Kyle WANG, Wylmer Wang, Xuan Hu, chars, 百草谷居士
+
+Catalan: Carles Sala, David Planella, Juanma Hernández, Marc Recasens,
+Radina Matic, Siegfried Gevatter, anna marti
+
+Chinese (simplified): Ang Gao, Anthony Fok, Eleanor Chen, Harold.luo,
+Heling Yao, Kyle WANG, Wylmer Wang, Xuan Hu, chars, 百草谷居士
+
 Chinese (traditional): Andrew Liu, Anthony Fok, Po-Jen Hsu, Rex Tsai, Toomore
+
 Croatian: Saša Teković
-Czech: David Kovář, Jakub Kozisek, Jan Hrdina, Konki, Kuvaly [LCT], Ladislav Prskavec, Mailo, Martin Rotter, Martin Volf, Marv-CZ, Milos-kroulik-3, Roman Horník, Viktor
-Danish: Aputsiaq Niels Janussen, Ask Hjorth Larsen, Mogens Isager, Peter Skov, mkjeldsen
-Dutch: Emilien Klein, Foppe Benedictus, Hanssen, Heureka, Lionel Dricot, Lucas Vieites, Nathan, Rachid, Reinout van Schouwen, Tino Meinen, klap-in, puccha, rob
+
+Czech: David Kovář, Jakub Kozisek, Jan Hrdina, Konki, Kuvaly [LCT],
+Ladislav Prskavec, Mailo, Martin Rotter, Martin Volf, Marv-CZ, Milos-kroulik-3,
+Roman Horník, Viktor
+
+Danish: Aputsiaq Niels Janussen, Ask Hjorth Larsen, Mogens Isager, Peter Skov,
+mkjeldsen
+
+Dutch: Emilien Klein, Foppe Benedictus, Hanssen, Heureka, Lionel Dricot,
+Lucas Vieites, Nathan, Rachid, Reinout van Schouwen, Tino Meinen, klap-in,
+puccha, rob
+
 English (Canada): Itai Molenaar, Ken Sharp, Paul Kishimoto
-English (United Kingdom): Alexandre COLLIGNON, Alfredo Hernández, Anthony Harrington, Bruce Cowan, Cyril, Jonathon Hodges, Lionel Dricot, Luca Invernizzi, Michael Keppler, Olly Betts, Philipp Kleinhenz, Robert Readman, Sid Roberts, ascenseur
+
+English (United Kingdom): Alexandre COLLIGNON, Alfredo Hernández,
+Anthony Harrington, Bruce Cowan, Cyril, Jonathon Hodges, Lionel Dricot,
+Luca Invernizzi, Michael Keppler, Olly Betts, Philipp Kleinhenz,
+Robert Readman, Sid Roberts, ascenseur
+
 Finnish: Heikki Mattila, Mika Tapojärvi
-French: AkaiKen, Alexandre COLLIGNON, Bertrand Rousseau, Bruno Veilleux, Cyril, David Coeurjolly, Dominick Rivard, Emilien Klein, FrancoisSchoubben, François, Greizgh, Jibec, Lionel Dricot, Maxime Veroone, Nicolas Delvaux, Perniflosse, Philippe Le Toquin, Pititjo, Ptitphysik, Quentin Pagès, Rafik Ouerchefani, Raphaël, Sid Roberts, Simon Leblanc, Stanislas Michalak, Thibault Févry, Timothee Bernard, Yves Masson, bsaleil, gaetanpralong, sebz
+
+French: AkaiKen, Alexandre COLLIGNON, Bertrand Rousseau, Bruno Veilleux, Cyril,
+David Coeurjolly, Dominick Rivard, Emilien Klein, FrancoisSchoubben, François,
+Greizgh, Jibec, Lionel Dricot, Maxime Veroone, Nicolas Delvaux, Perniflosse,
+Philippe Le Toquin, Pititjo, Ptitphysik, Quentin Pagès, Rafik Ouerchefani,
+Raphaël, Sid Roberts, Simon Leblanc, Stanislas Michalak, Thibault Févry,
+Timothee Bernard, Yves Masson, bsaleil, gaetanpralong, sebz
+
 Galician: Dario, Fran Diéguez, Jorge Álvarez, Miguel Anxo Bouzada, keko
+
 Georgian: Giorgi Jvaridze
-German: Abb, Alexandre COLLIGNON, Christoph-M. Lehmann, Daniel Dietrich, Daniel Winzen, Fabian Affolter, Gerfried Fuchs, Henry78, Izidor Matušov, Jan, Jens Maucher, Jonas Endersch, Marcel Stimberg, Michael Keppler, Philip Stewart, Raphael J. Schmid, Scott, Seraphyn, Thomas Pitlik, Tim Bordemann, gerber, schulz3000
-Greek: Fotis Tsamis, George Chronis, Stathis Iosifidis 
+
+German: Abb, Alexandre COLLIGNON, Christoph-M. Lehmann, Daniel Dietrich,
+Daniel Winzen, Fabian Affolter, Gerfried Fuchs, Henry78, Izidor Matušov, Jan,
+Jens Maucher, Jonas Endersch, Marcel Stimberg, Michael Keppler,
+Philip Stewart, Raphael J. Schmid, Scott, Seraphyn, Thomas Pitlik,
+Tim Bordemann, gerber, schulz3000
+
+Greek: Fotis Tsamis, George Chronis, Stathis Iosifidis
+
 Hebrew: Erik, Yaron
-Hungarian: András Kárász, Crcsz Tibcr, Gabor Kelemen, Gergely Szarka, Krasznecz Zoltán, Muszela Balázs
+
+Hungarian: András Kárász, Crcsz Tibcr, Gabor Kelemen, Gergely Szarka,
+Krasznecz Zoltán, Muszela Balázs
+
 Icelandic: Baldur, Palmar Thorsteinsson, Samúel Jón Gunnarsson
+
 Indonesian: Andika Triwidada, Wayan Sudiarnata
-Interlingua: Emilio Sepulveda 
-Italian: Antonio Roquentin, Claudio Arseni, Dario Bertini, Davide Alberelli, Dennis Anfossi, Fabio Marconi, Francesco de Virgilio, Gianfranco, Luca Falavigna, Luca Invernizzi, Milo Casagrande, Radina Matic, jollyr0ger
+
+Interlingua: Emilio Sepulveda
+
+Italian: Antonio Roquentin, Claudio Arseni, Dario Bertini, Davide Alberelli,
+Dennis Anfossi, Fabio Marconi, Francesco de Virgilio, Gianfranco,
+Luca Falavigna, Luca Invernizzi, Milo Casagrande, Radina Matic, jollyr0ger
+
 Japanese: 9APPAT3CH, Chris Harrington, Hideki Yamane, Hiroshi Tagawa
+
 Korean: khmirage
-Lithuanian: Algimantas Margevičius, Mantas Kriaučiūnas, Rytis Ūsalis, aurisc4, jaro
-Lojabn: David Futcher 
-Malagasy: Thierry Andriamirado 
+
+Lithuanian: Algimantas Margevičius, Mantas Kriaučiūnas, Rytis Ūsalis,
+aurisc4, jaro
+
+Lojabn: David Futcher
+
+Malagasy: Thierry Andriamirado
+
 Malay: Ibrahim Elias, abuyop, itiknila, melayubuntu
+
 Norwegian Bokmal: Gamlerik, Runar Ingebrigtsen, Terje Andre Arnøy, Øystein
+
 Occitan (post 1500): Cédric VALMARY (Tot en òc)
-Persian: Sepehr Lajevardi 
-Polish: Jakub Kołakowski, Konrad, Piotr Hałas, Piotr Strębski, Radek Puła, Tomasz 'Zen' Napierala, Tomasz Maciejewski, btomasz, szczym, tomlee
+
+Persian: Sepehr Lajevardi
+
+Polish: Jakub Kołakowski, Konrad, Piotr Hałas, Piotr Strębski, Radek Puła,
+Tomasz 'Zen' Napierala, Tomasz Maciejewski, btomasz, szczym, tomlee
+
 Portuguese: Joel Patrão, Paulo Cabido, raul_pereira
+
 Romanian: Adi Roiban, Lucian Adrian Grijincu
-Russian: A. S. Popov, Alexander Semyonov, Alexey Ivanov, Alexey Kostyuk, Alexey Nedilko, Andrej Surkov, DmDr, Dmitry "Divius" Tantsur, Nergal, Nikita Putko, Oleg Koptev, Peter Romov, Serfer, Yevgeny Sysmanov, Yuriy Vidineev, a220, dueMiR, maxzda, mrk, wiz, Олег Малахов
+
+Russian: A. S. Popov, Alexander Semyonov, Alexey Ivanov, Alexey Kostyuk,
+Alexey Nedilko, Andrej Surkov, DmDr, Dmitry "Divius" Tantsur, Nergal,
+Nikita Putko, Oleg Koptev, Peter Romov, Serfer, Yevgeny Sysmanov,
+Yuriy Vidineev, a220, dueMiR, maxzda, mrk, wiz, Олег Малахов
+
 Serbian: Miloš Mandarić, Мирослав Николић
-Sinhalese: ජීවන්ත ලේකම්වසම් 
+
+Sinhalese: ජීවන්ත ලේකම්වසම්
+
 Slovak: Izidor Matušov, Milan Slovák, Slavko
+
 Slovenian: Andrej Znidarsic, Igor2x, grofaty
-Spanish: Adolfo Jayme Barrientos, Alberto Caso, Carlos Alberto Ospina, Denis Fuenzalida, DiegoJ, Grillo, Javier García Díaz, Javier Jardón, Javier Suárez, Jorge González, Jose R. Megia, Lionel Dricot, Nicolás M. Zahlut, Nukeador, Radina Matic, Rafael Soler - Domatix, Xuacu Saturio, ixzus, n_alex, perriman
-Swedish: Christian Widell, Daniel Nylander, David Bengtsson, Erik Piehl Sylvén, Kalle Persson, Maxim Andersson, Nikke, Petri Rosenström, jens persson
+
+Spanish: Adolfo Jayme Barrientos, Alberto Caso, Carlos Alberto Ospina,
+Denis Fuenzalida, DiegoJ, Grillo, Javier García Díaz, Javier Jardón,
+Javier Suárez, Jorge González, Jose R. Megia, Lionel Dricot,
+Nicolás M. Zahlut, Nukeador, Radina Matic, Rafael Soler - Domatix,
+Xuacu Saturio, ixzus, n_alex, perriman
+
+Swedish: Christian Widell, Daniel Nylander, David Bengtsson,
+Erik Piehl Sylvén, Kalle Persson, Maxim Andersson, Nikke, Petri Rosenström,
+jens persson
+
 Telugu: Arjuna Rao Chavala,     వీవెన్ (Veeven)
+
 Thai: NullZer0, SiraNokyoongtong
-Turkish: Aean, Ali KIBICI, Emre Ayca, Murat Gunes, Onur ALTINTAŞI, Yiğit Ateş
+
+Turkish: Aean, Ali KIBICI, Emre Ayca, Murat Gunes, Onur ALTINTAŞI,
+Yiğit Ateş
+
 Ukrainian: Alex Chmyr, Gontsa, Pavel Druzyak, dueMiR, yvadim
 """
 

=== modified file 'GTG/tools/borg.py'
--- GTG/tools/borg.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/borg.py	2012-12-19 09:45:26 +0000
@@ -17,7 +17,6 @@
 # this program.  If not, see <http://www.gnu.org/licenses/>.
 # -----------------------------------------------------------------------------
 
-
 class Borg(object):
     """
     This pattern ensures that all instances of a particular class share
@@ -25,6 +24,6 @@
     """
 
     _borg_state = {}
-    
+
     def __init__(self):
         self.__dict__ = self._borg_state

=== modified file 'GTG/tools/cleanxml.py'
--- GTG/tools/cleanxml.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/cleanxml.py	2012-12-19 09:45:26 +0000
@@ -17,7 +17,8 @@
 # this program.  If not, see <http://www.gnu.org/licenses/>.
 # -----------------------------------------------------------------------------
 
-import os, xml.dom.minidom
+import os
+import xml.dom.minidom
 import shutil
 import sys
 import time
@@ -32,17 +33,19 @@
 BACKUP_NBR = 7
 
 #Those two functions are there only to be able to read prettyXML
-#Source : http://yumenokaze.free.fr/?/Informatique/Snipplet/Python/cleandom       
-def cleanDoc(document,indent="",newl=""):
+#Source: http://yumenokaze.free.fr/?/Informatique/Snipplet/Python/cleandom
+
+def cleanDoc(document, indent="", newl=""):
     node = document.documentElement
-    cleanNode(node,indent,newl)
-
-def cleanNode(currentNode,indent,newl):
+    cleanNode(node, indent, newl)
+
+
+def cleanNode(currentNode, indent, newl):
     myfilter = indent+newl
     if currentNode.hasChildNodes:
         toremove = []
         for node in currentNode.childNodes:
-            if node.nodeType == 3 :
+            if node.nodeType == 3:
                 val = node.nodeValue.lstrip(myfilter).strip(myfilter)
                 if val == "":
                     toremove.append(node)
@@ -52,36 +55,39 @@
         for n in toremove:
             currentNode.removeChild(n)
         for node in currentNode.childNodes:
-            cleanNode(node,indent,newl)
-
-def cleanString(string,indent="",newl=""):
+            cleanNode(node, indent, newl)
+
+
+def cleanString(string, indent="", newl=""):
     #we will remove the pretty XML stuffs.
     #Firt, we remove the \n and tab in elements
     e = re.compile('>\n\t*')
-    toreturn = e.sub('>',string)
+    toreturn = e.sub('>', string)
     #then we remove the \n tab before closing elements
     f = re.compile('\n\t*</')
-    toreturn = f.sub('</',toreturn)
+    toreturn = f.sub('</', toreturn)
     return toreturn
 
 #This add a text node to the node parent. We don't return anything
 #Because the doc object itself is modified.
-def addTextNode(doc,parent,title,content) :
-    if content :
+
+def addTextNode(doc, parent, title, content):
+    if content:
         element = doc.createElement(title)
         parent.appendChild(element)
         element.appendChild(doc.createTextNode(content))
-        
+
 #This is a method to read the textnode of the XML
-def readTextNode(node,title) :
+
+def readTextNode(node, title):
     n = node.getElementsByTagName(title)
-    if n and n[0].hasChildNodes() :
+    if n and n[0].hasChildNodes():
         content = n[0].childNodes[0].nodeValue
-        if content :
+        if content:
             return content
     return None
 
-            
+
 def _try_openxmlfile(zefile, root):
     """ Open an XML file and clean whitespaces in it """
     f = open(zefile, "r")
@@ -131,7 +137,7 @@
     except IOError, msg:
         print msg
         sys.exit(1)
-        
+
     except xml.parsers.expat.ExpatError, msg:
         errormsg = "Error parsing XML file %s: %s" % (zefile, msg)
         Log.error(errormsg)
@@ -160,14 +166,16 @@
 
 
 #Return a doc element with only one root element of the name "root"
-def emptydoc(root) :
+
+def emptydoc(root):
     doc = xml.dom.minidom.Document()
     rootproject = doc.createElement(root)
     doc.appendChild(rootproject)
     return doc, rootproject
 
 #write a XML doc to a file
-def savexml(zefile,doc,backup=False):
+
+def savexml(zefile, doc, backup=False):
 #    print "writing %s file" %(zefile)
     tmpfile = zefile+'__'
     backup_name = _get_backup_name(zefile)
@@ -193,25 +201,25 @@
                 f.close()
                 return False
             f.close()
-            
+
             if os.path.exists(tmpfile):
                 os.unlink(tmpfile)
-                
-            if backup :
+
+            if backup:
                 #We will now backup the file
                 backup_nbr = BACKUP_NBR
                 #We keep BACKUP_NBR versions of the file
                 #The 0 is the youngest one
-                while backup_nbr > 0 :
+                while backup_nbr > 0:
                     older = "%s.bak.%s" % (backup_name, backup_nbr)
                     backup_nbr -= 1
                     newer = "%s.bak.%s" % (backup_name, backup_nbr)
-                    if os.path.exists(newer) :
-                        shutil.move(newer,older)
+                    if os.path.exists(newer):
+                        shutil.move(newer, older)
                 #The bak.0 is always a fresh copy of the closed file
                 #So that it's not touched in case of bad opening next time
                 current = "%s.bak.0" % backup_name
-                shutil.copy(zefile,current)
+                shutil.copy(zefile, current)
 
                 daily_backup = "%s.%s.bak" % (backup_name,
                         datetime.date.today().strftime("%Y-%m-%d"))

=== modified file 'GTG/tools/clipboard.py'
--- GTG/tools/clipboard.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/clipboard.py	2012-12-19 09:45:26 +0000
@@ -21,15 +21,19 @@
 TaskClipboard allows to cut/copy the content of a TaskView accross multiples
 taskeditors, preserving subtasks
 """
+
+
 class TaskClipboard():
-    def __init__(self,req):
+
+    def __init__(self, req):
         self.description = None
         self.content = []
         self.req = req
-        
+
     """"take two gtk.TextIter as parameter and copy the
     """
-    def copy(self,start,stop,bullet=None):
+
+    def copy(self, start, stop, bullet=None):
         self.clear()
         #Now, we take care of the normal, cross application clipboard
         text = start.get_text(stop)
@@ -39,7 +43,7 @@
             self.description = newtext
         elif text:
             self.description = text
-        
+
         end_line = start.copy()
         #we take line after line in the selection
         nextline = True
@@ -49,7 +53,7 @@
             #we want to detect subtasks in the selection
             tags = end_line.get_tags()+end_line.get_toggled_tags(False)
             is_subtask = False
-            for ta in tags :
+            for ta in tags:
                 if (ta.get_data('is_subtask')):
                     is_subtask = True
                     tid = ta.get_data('child')
@@ -59,7 +63,8 @@
                     self.content.append(['subtask', tid])
             if not is_subtask:
                 if end_line.get_line() < stop.get_line():
-                    self.content.append(['text', "%s\n" %start.get_text(end_line)])
+                    self.content.append(['text', "%s\n" %\
+                                              start.get_text(end_line)])
                 else:
                     self.content.append(['text', start.get_text(stop)])
             end_line.forward_char()
@@ -67,10 +72,10 @@
 
     def paste_text(self):
         return self.description
-        
+
     def paste(self):
         return self.content
-    
+
     def clear(self):
         self.descriptiion = None
         self.content = []

=== modified file 'GTG/tools/dates.py'
--- GTG/tools/dates.py	2012-11-27 16:53:42 +0000
+++ GTG/tools/dates.py	2012-12-19 09:45:26 +0000
@@ -120,7 +120,8 @@
                         value = str(value.lower())
                         self._parse_init_value(LOOKUP[value])
                     except KeyError:
-                        raise ValueError("Unknown value for date: '%s'" % value)
+                        raise ValueError("Unknown value for date: '%s'" \
+                                                                     % value)
         elif isinstance(value, int):
             self._fuzzy = value
         else:

=== modified file 'GTG/tools/import_liblarch.py'
--- GTG/tools/import_liblarch.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/import_liblarch.py	2012-12-19 09:45:26 +0000
@@ -25,6 +25,7 @@
 REQUIRED_LIBLARCH_API = "2.1"
 GIT_CMD = "git clone https://github.com/liblarch/liblarch ../liblarch"
 
+
 def import_liblarch(use_local=False):
     """ Check if liblarch is installed and is compatible
 

=== modified file 'GTG/tools/keyring.py'
--- GTG/tools/keyring.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/keyring.py	2012-12-19 09:45:26 +0000
@@ -17,7 +17,6 @@
 # this program.  If not, see <http://www.gnu.org/licenses/>.
 # -----------------------------------------------------------------------------
 
-
 try:
     import gnomekeyring
 except ImportError:
@@ -26,7 +25,9 @@
 from GTG.tools.borg import Borg
 from GTG.tools.logger import Log
 
+
 class GNOMEKeyring(Borg):
+
     def __init__(self):
         super(Keyring, self).__init__()
         if not hasattr(self, "keyring"):
@@ -48,7 +49,9 @@
         except (gnomekeyring.DeniedError, gnomekeyring.NoMatchError):
             return ""
 
+
 class FallbackKeyring(Borg):
+
     def __init__(self):
         super(Keyring, self).__init__()
         if not hasattr(self, "keyring"):
@@ -70,7 +73,8 @@
         return self.keyring.get(key, "")
 
 if gnomekeyring is not None:
-    Keyring = GNOMEKeyring 
+    Keyring = GNOMEKeyring
 else:
-    Log.info("GNOME keyring was not found, passwords will be not stored after restart of GTG")
+    Log.info("GNOME keyring was not found, passwords will be not stored after\
+                                                              restart of GTG")
     Keyring = FallbackKeyring

=== modified file 'GTG/tools/logger.py'
--- GTG/tools/logger.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/logger.py	2012-12-19 09:45:26 +0000
@@ -33,7 +33,7 @@
 class Debug(object):
     """Singleton class that acts as interface for GTG's logger"""
 
-    def __init__ (self):
+    def __init__(self):
         """ Configure the GTG logger """
         #If we already have a logger, we keep that
         if not hasattr(Debug, "__logger"):
@@ -63,6 +63,7 @@
 
     def set_debugging_mode(self, value):
         self.debugging_mode = value
+
     def is_debugging_mode(self):
         return self.debugging_mode
 

=== modified file 'GTG/tools/networkmanager.py'
--- GTG/tools/networkmanager.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/networkmanager.py	2012-12-19 09:45:26 +0000
@@ -25,13 +25,14 @@
 
 import dbus
 
-# A network device is connected, with global network connectivity. 
+# A network device is connected, with global network connectivity.
 NM_STATE_CONNECTED_GLOBAL = 70
 
+
 def is_connection_up():
     """ Returns True if GTG can access the Internet """
     bus = dbus.SystemBus()
-    proxy = bus.get_object('org.freedesktop.NetworkManager', 
+    proxy = bus.get_object('org.freedesktop.NetworkManager',
                             '/org/freedesktop/NetworkManager')
     network_manager = dbus.Interface(proxy, 'org.freedesktop.NetworkManager')
 

=== modified file 'GTG/tools/taskxml.py'
--- GTG/tools/taskxml.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/taskxml.py	2012-12-19 09:45:26 +0000
@@ -32,6 +32,7 @@
     else:
         return ""
 
+
 def read_node(xmlnode, name):
     node_list =xmlnode.getElementsByTagName(name)
     if len(node_list) > 0:
@@ -41,7 +42,8 @@
 
 
 #Take an empty task, an XML node and return a Task.
-def task_from_xml(task, xmlnode) :
+
+def task_from_xml(task, xmlnode):
     #print "********************************"
     #print xmlnode.toprettyxml()
 
@@ -55,7 +57,7 @@
     duedate = Date(read_node(xmlnode, "duedate"))
     task.set_due_date(duedate)
 
-    startdate = Date(read_node(xmlnode,"startdate"))
+    startdate = Date(read_node(xmlnode, "startdate"))
     task.set_start_date(startdate)
 
     modified = read_node(xmlnode, "modified")
@@ -63,7 +65,7 @@
         modified = datetime.strptime(modified, "%Y-%m-%dT%H:%M:%S")
         task.set_modified(modified)
 
-    tags = xmlnode.getAttribute("tags").replace(' ','')
+    tags = xmlnode.getAttribute("tags").replace(' ', '')
     tags = (tag for tag in tags.split(',') if tag.strip() != "")
     for tag in tags:
         #FIXME why unescape????
@@ -89,7 +91,8 @@
         task.set_attribute(key, value, namespace=namespace)
 
     # FIXME do we need remote task ids? I don't think so
-    # FIXME if so => rework them into a more usable structure!!! (like attributes)
+    # FIXME if so => rework them into a more usable structure!!!
+    #                (like attributes)
     #REMOTE TASK IDS
     '''
     remote_ids_list = xmlnode.getElementsByTagName("task-remote-ids")
@@ -105,40 +108,44 @@
 
 #FIXME maybe pretty XML should be enough for this...
 #Task as parameter the doc where to put the XML node
-def task_to_xml(doc,task) :
+
+def task_to_xml(doc, task):
     t_xml = doc.createElement("task")
-    t_xml.setAttribute("id",task.get_id())
-    t_xml.setAttribute("status" , task.get_status())
-    t_xml.setAttribute("uuid" , task.get_uuid())
+    t_xml.setAttribute("id", task.get_id())
+    t_xml.setAttribute("status", task.get_status())
+    t_xml.setAttribute("uuid", task.get_uuid())
     tags_str = ""
-    for tag in task.get_tags_name(): 
+    for tag in task.get_tags_name():
         tags_str = tags_str + saxutils.escape(str(tag)) + ","
     t_xml.setAttribute("tags", tags_str[:-1])
-    cleanxml.addTextNode(doc,t_xml,"title",task.get_title())
-    cleanxml.addTextNode(doc,t_xml,"duedate", task.get_due_date().xml_str())
-    cleanxml.addTextNode(doc,t_xml,"modified",task.get_modified_string())
-    cleanxml.addTextNode(doc,t_xml,"startdate", task.get_start_date().xml_str())
-    cleanxml.addTextNode(doc,t_xml,"donedate", task.get_closed_date().xml_str())
+    cleanxml.addTextNode(doc, t_xml, "title", task.get_title())
+    cleanxml.addTextNode(doc, t_xml, "duedate", task.get_due_date().xml_str())
+    cleanxml.addTextNode(doc, t_xml, "modified", task.get_modified_string())
+    cleanxml.addTextNode(doc, t_xml, "startdate",
+                                              task.get_start_date().xml_str())
+    cleanxml.addTextNode(doc, t_xml, "donedate",
+                                             task.get_closed_date().xml_str())
     childs = task.get_children()
-    for c in childs :
-        cleanxml.addTextNode(doc,t_xml,"subtask",c)
+    for c in childs:
+        cleanxml.addTextNode(doc, t_xml, "subtask", c)
     for a in task.attributes:
-        namespace,key=a
-        content=task.attributes[a]
+        namespace, key=a
+        content = task.attributes[a]
         element = doc.createElement('attribute')
         element.setAttribute("namespace", namespace)
         element.setAttribute("key", key)
         element.appendChild(doc.createTextNode(content))
         t_xml.appendChild(element)
     tex = task.get_text()
-    if tex :
+    if tex:
         #We take the xml text and convert it to a string
-        #but without the "<content />" 
+        #but without the "<content />"
         element = minidom.parseString(tex)
-        temp = element.firstChild.toxml().partition("<content>")[2] #pylint: disable-msg=E1103
+        temp = element.firstChild.toxml().partition("<content>")[2]
+        #pylint: disable-msg=E1103
         desc = temp.partition("</content>")[0]
         #t_xml.appendChild(element.firstChild)
-        cleanxml.addTextNode(doc,t_xml,"content",desc)
+        cleanxml.addTextNode(doc, t_xml, "content", desc)
     #self.__write_textnode(doc,t_xml,"content",t.get_text())
 
     #REMOTE TASK IDS

=== modified file 'GTG/tools/twokeydict.py'
--- GTG/tools/twokeydict.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/twokeydict.py	2012-12-19 09:45:26 +0000
@@ -24,7 +24,6 @@
 from GTG.tools.bidict import BiDict
 
 
-
 class TwoKeyDict(object):
     '''
     It's a standard Dictionary with a secondary key.
@@ -34,11 +33,10 @@
         twokey['2'] ==> 'two'
         twokey['II'] ==> 'two'
     You can also request the other key, given one.
-    Function calls start with _ because you'll probably want to rename them when
-    you use this dictionary, for the sake of clarity.
+    Function calls start with _ because you'll probably want to rename them
+     when you use this dictionary, for the sake of clarity.
     '''
 
-
     def __init__(self, *triplets):
         '''
         Creates the TwoKeyDict and optionally populates it with some data
@@ -120,7 +118,7 @@
     def _get_all_primary_keys(self):
         '''
         Returns all primary keys
-        
+
         @returns list: list of all primary keys
         '''
         return self._key_to_key_bidict._get_all_first()
@@ -128,8 +126,7 @@
     def _get_all_secondary_keys(self):
         '''
         Returns all secondary keys
-        
+
         @returns list: list of all secondary keys
         '''
         return self._key_to_key_bidict._get_all_second()
-

=== modified file 'GTG/tools/watchdog.py'
--- GTG/tools/watchdog.py	2012-11-25 19:19:44 +0000
+++ GTG/tools/watchdog.py	2012-12-19 09:45:26 +0000
@@ -19,6 +19,7 @@
 
 import threading
 
+
 class Watchdog(object):
     '''
     a simple thread-safe watchdog.

=== modified file 'setup.py'
--- setup.py	2012-11-25 19:19:44 +0000
+++ setup.py	2012-12-19 09:45:26 +0000
@@ -2,11 +2,11 @@
 # -*- coding: utf-8 -*-
 # -----------------------------------------------------------------------------
 # Getting Things GNOME! - a personal organizer for the GNOME desktop
-# Copyright (c) 2008-2012 - Lionel Dricot & Bertrand Rousseau
+# Copyright(c) 2008-2012 - Lionel Dricot & Bertrand Rousseau
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU General Public License as published by the Free Software
-# Foundation, either version 3 of the License, or (at your option) any later
+# Foundation, either version 3 of the License, or(at your option) any later
 # version.
 #
 # This program is distributed in the hope that it will be useful, but WITHOUT
@@ -29,15 +29,15 @@
 
 ### CONSTANTS ################################################################
 
-DATA_DIR        = "share/gtg"
-HELP_DIR        = "share/help"
+DATA_DIR = "share/gtg"
+HELP_DIR = "share/help"
 GLOBAL_ICON_DIR = "share/icons/hicolor"
 
 ### TOOLS ####################################################################
 
 def create_icon_list():
     fileList = []
-    rootdir  = "data/icons"
+    rootdir = "data/icons"
     for root, subFolders, files in os.walk(rootdir):
         dirList = []
         for file in files:
@@ -48,9 +48,10 @@
             fileList.append((os.path.join(DATA_DIR, newroot), dirList))
     return fileList
 
+
 def create_userdoc_list():
     fileList = []
-    rootdir  = "doc/userdoc"
+    rootdir = "doc/userdoc"
     for root, subFolders, files in os.walk(rootdir):
         dirList = []
         for file in files:
@@ -62,25 +63,26 @@
                 newroot = root.replace(prefix, "")
             else:
                 newroot = ""
-            newroot = os.path.join( HELP_DIR, comps[2], "gtg", newroot)
+            newroot = os.path.join(HELP_DIR, comps[2], "gtg", newroot)
             fileList.append((newroot, dirList))
     return fileList
 
+
 def create_data_files():
     data_files = []
     # icons
     icons = create_icon_list()
     data_files.extend(icons)
     # gtg .desktop icon
-    data_files.append(('share/icons/hicolor/16x16/apps', \
+    data_files.append(('share/icons/hicolor/16x16/apps',
                        ['data/icons/hicolor/16x16/apps/gtg.png']))
-    data_files.append(('share/icons/hicolor/22x22/apps', \
+    data_files.append(('share/icons/hicolor/22x22/apps',
                        ['data/icons/hicolor/22x22/apps/gtg.png']))
-    data_files.append(('share/icons/hicolor/24x24/apps', \
+    data_files.append(('share/icons/hicolor/24x24/apps',
                        ['data/icons/hicolor/24x24/apps/gtg.png']))
-    data_files.append(('share/icons/hicolor/32x32/apps', \
+    data_files.append(('share/icons/hicolor/32x32/apps',
                        ['data/icons/hicolor/32x32/apps/gtg.png']))
-    data_files.append(('share/icons/hicolor/scalable/apps', \
+    data_files.append(('share/icons/hicolor/scalable/apps',
                        ['data/icons/hicolor/scalable/apps/gtg.svg']))
     # documentation
     helpfiles = create_userdoc_list()
@@ -88,14 +90,15 @@
     # misc
     data_files.append(('share/applications', ['gtg.desktop']))
     data_files.append(('share/dbus-1/services', ['org.gnome.GTG.service']))
-    data_files.append(('share/man/man1', ['doc/gtg.1', 'doc/gtcli.1', 'doc/gtg_new_task.1']))
+    data_files.append(('share/man/man1',
+                       ['doc/gtg.1', 'doc/gtcli.1', 'doc/gtg_new_task.1']))
 
     # bash completion
     data_files.append(('share/gtg/', ['gtcli_bash_completion']))
     return data_files
 
 
-#### TRANSLATIONS (from pyroom setup.py) ######################################
+#### TRANSLATIONS(from pyroom setup.py) ######################################
 
 PO_DIR = 'po'
 MO_DIR = os.path.join('build', 'po')
@@ -134,13 +137,13 @@
 author = 'The GTG Team'
 
 setup(
-  name         = 'gtg',
-  version      = info.VERSION,
-  url          = info.URL,
-  author       = author,
+  name = 'gtg',
+  version = info.VERSION,
+  url = info.URL,
+  author = author,
   author_email = info.EMAIL,
-  description  = info.SHORT_DESCRIPTION,
-  packages     = [
+  description = info.SHORT_DESCRIPTION,
+  packages = [
     'GTG',
     'GTG.backends',
     'GTG.backends.rtm',
@@ -213,9 +216,12 @@
     'GTG.plugins.hamster': ['prefs.ui'],
     'GTG.plugins.task_reaper': ['reaper.ui'],
     'GTG.plugins.notification_area': ['notification_area.ui',
-                            './data/icons/hicolor/22x22/apps/gtg_need_attention.png',
-                            './data/icons/ubuntu-mono-dark/22x22/apps/gtg_need_attention.svg',
-                            './data/icons/ubuntu-mono-light/22x22/apps/gtg_need_attention.svg',
+                            './data/icons/hicolor/22x22/apps/gtg_need_attenti\
+                                                                      on.png',
+                            './data/icons/ubuntu-mono-dark/22x22/apps/\
+                                                      gtg_need_attention.svg',
+                            './data/icons/ubuntu-mono-light/22x22/apps/\
+                                                      gtg_need_attention.svg',
                             ],
     'GTG.plugins.urgency_color': ['preferences.ui'],
    },