← Back to team overview

gtg team mailing list archive

[Bug 618439] Re: Little cleanup on core.task.py (1 unused function and 1 function call + many pep8 changes.)

 

** Summary changed:

- Little cleanup on core.task.py [Pep8 and one useless call of str()]
+ Little cleanup on core.task.py (1 unused function and 1 function call + many pep8 changes.)

** Description changed:

  [Running latest code.]
  
-  So, what I've done is basically change some things in task.py.
+  So, what I've done is basically change some things in task.py.
  
-  I've done this :
+  I've done this :
  
  Removed :
-  #the id of this task in the project should be set
-  #tid is a string ! (we have to choose a type and stick to it)
-  self.tid = str(ze_id)
+  #the id of this task in the project should be set
+  #tid is a string ! (we have to choose a type and stick to it)
+  self.tid = str(ze_id)
  
  Added :
-  self.tid = ze_id #If regression, str(ze_id)
+  self.tid = ze_id #If regression, str(ze_id)
  
  This avoids useless calls of str(), removes the 2 comment lines that arn't needed anymore and also allows ta tracks futures bad uses of ze_id.
-  So far it worked very well, no problem with test suite, no problem with adding tasks, if there's some regression the comment is there to help.
+  So far it worked very well, no problem with test suite, no problem with adding tasks, if there's some regression the comment is there to help.
  
-  Made a big cleanup concerning pep8, had about 75 warnings, reducted to
- 15. (And some of those 15 are here because it helps code
- readability...). This is also nice because by removing many trailing
- whitespaces, it removes about 250 char in the file.
+ Removed get_self_and_all_subtasks, was never used.
  
-  I can't do a patch like bazaar ones, because it would remove all space changes and it's these changes that removes pep8 warnings. So i attach my own task.py file, which is ok in my computer. 
-  If you want I could provide a diff generated with bazaar, but that's a bit stupid, would remove 50% of my work.
+ Added a long comment about removing one function, I tried to remove it,
+ but had a little problem doing it, so I left a comment, for someone that
+ works pretty often with GTG!, iw will probably easy to do the change.
  
-  This patch is not very important, but from what I see, doesn't have any
+ 
+ Pep8 cleanup, removed 43 of 51 warnings.
+ 
+ Reorganized sometimes comments to be clearer about some little things.
+ 
+ 
+ I can't do a patch like bazaar ones, because it would remove all space
+ changes and it's these changes that removes pep8 warnings. So i attach
+ my own task.py file, which is ok in my computer. If you want I could
+ provide a diff generated with bazaar, but that's a bit stupid, would
+ remove 50% of my work.
+ 
+ This patch isn't very important, but from what I see, doesn't have any
  kind of negative effects.
  
-  [Oh, and btw, my email for the authors file, is
+  [Oh, and btw, my email for the authors file, is
  ThibaultFevry[at]gmail[dot]com ].

** Patch removed: "My own task.py which heavily reduces pep8 warnings and removes one useless function call per task created."
   https://bugs.launchpad.net/gtg/+bug/618439/+attachment/1492602/+files/task.py

** Description changed:

  [Running latest code.]
  
   So, what I've done is basically change some things in task.py.
  
   I've done this :
  
  Removed :
   #the id of this task in the project should be set
   #tid is a string ! (we have to choose a type and stick to it)
   self.tid = str(ze_id)
  
  Added :
   self.tid = ze_id #If regression, str(ze_id)
  
  This avoids useless calls of str(), removes the 2 comment lines that arn't needed anymore and also allows ta tracks futures bad uses of ze_id.
   So far it worked very well, no problem with test suite, no problem with adding tasks, if there's some regression the comment is there to help.
  
  Removed get_self_and_all_subtasks, was never used.
  
  Added a long comment about removing one function, I tried to remove it,
  but had a little problem doing it, so I left a comment, for someone that
  works pretty often with GTG!, iw will probably easy to do the change.
  
- 
  Pep8 cleanup, removed 43 of 51 warnings.
  
  Reorganized sometimes comments to be clearer about some little things.
- 
  
  I can't do a patch like bazaar ones, because it would remove all space
  changes and it's these changes that removes pep8 warnings. So i attach
  my own task.py file, which is ok in my computer. If you want I could
  provide a diff generated with bazaar, but that's a bit stupid, would
  remove 50% of my work.
  
  This patch isn't very important, but from what I see, doesn't have any
  kind of negative effects.
  
   [Oh, and btw, my email for the authors file, is
  ThibaultFevry[at]gmail[dot]com ].

-- 
Little cleanup on core.task.py (1 unused function and 1 function call + many pep8 changes.)
https://bugs.launchpad.net/bugs/618439
You received this bug notification because you are a member of Gtg
contributors, which is subscribed to Getting Things GNOME!.

Status in Getting Things GNOME!: New

Bug description:
[Running latest code.]

 So, what I've done is basically change some things in task.py.

 I've done this :

Removed :
 #the id of this task in the project should be set
 #tid is a string ! (we have to choose a type and stick to it)
 self.tid = str(ze_id)

Added :
 self.tid = ze_id #If regression, str(ze_id)

This avoids useless calls of str(), removes the 2 comment lines that arn't needed anymore and also allows ta tracks futures bad uses of ze_id.
 So far it worked very well, no problem with test suite, no problem with adding tasks, if there's some regression the comment is there to help.

Removed get_self_and_all_subtasks, was never used.

Added a long comment about removing one function, I tried to remove it, but had a little problem doing it, so I left a comment, for someone that works pretty often with GTG!, iw will probably easy to do the change.

Pep8 cleanup, removed 43 of 51 warnings.

Reorganized sometimes comments to be clearer about some little things.

I can't do a patch like bazaar ones, because it would remove all space changes and it's these changes that removes pep8 warnings. So i attach my own task.py file, which is ok in my computer. If you want I could provide a diff generated with bazaar, but that's a bit stupid, would remove 50% of my work.

This patch isn't very important, but from what I see, doesn't have any kind of negative effects.

 [Oh, and btw, my email for the authors file, is ThibaultFevry[at]gmail[dot]com ].







References