mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	Merged revisions 77855-77856,77870 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r77855 | benjamin.peterson | 2010-01-30 17:32:05 +0100 (Sa, 30 Jan 2010) | 1 line don't return node if it is not changed ........ r77856 | benjamin.peterson | 2010-01-30 17:35:29 +0100 (Sa, 30 Jan 2010) | 1 line return None to indicate no change ........ r77870 | benjamin.peterson | 2010-01-31 02:21:26 +0100 (So, 31 Jan 2010) | 1 line never return the original node given to transform() ........
This commit is contained in:
		
							parent
							
								
									b4b0a2935d
								
							
						
					
					
						commit
						1595f9fe9b
					
				
					 5 changed files with 3 additions and 5 deletions
				
			
		|  | @ -56,7 +56,6 @@ def transform(self, node, results): | |||
|             if self.probably_a_local_import(imp.value): | ||||
|                 imp.value = u"." + imp.value | ||||
|                 imp.changed() | ||||
|                 return node | ||||
|         else: | ||||
|             have_local = False | ||||
|             have_absolute = False | ||||
|  |  | |||
|  | @ -49,4 +49,4 @@ def transform(self, node, results): | |||
|             p = node.prefix | ||||
|             node = BlankLine() | ||||
|             node.prefix = p | ||||
|         return node | ||||
|             return node | ||||
|  |  | |||
|  | @ -150,7 +150,7 @@ class FixMetaclass(fixer_base.BaseFix): | |||
| 
 | ||||
|     def transform(self, node, results): | ||||
|         if not has_metaclass(node): | ||||
|             return node | ||||
|             return | ||||
| 
 | ||||
|         fixup_parse_tree(node) | ||||
| 
 | ||||
|  |  | |||
|  | @ -81,7 +81,7 @@ def handle_tuple(tuple_arg, add_prefix=False): | |||
|                     handle_tuple(arg, add_prefix=(i > 0)) | ||||
| 
 | ||||
|         if not new_lines: | ||||
|             return node | ||||
|             return | ||||
| 
 | ||||
|         # This isn't strictly necessary, but it plays nicely with other fixers. | ||||
|         # TODO(cwinter) get rid of this when children becomes a smart list | ||||
|  |  | |||
|  | @ -40,7 +40,6 @@ def transform_range(self, node, results): | |||
|             for n in results["rest"]: | ||||
|                 list_call.append_child(n) | ||||
|             return list_call | ||||
|         return node | ||||
| 
 | ||||
|     P1 = "power< func=NAME trailer< '(' node=any ')' > any* >" | ||||
|     p1 = patcomp.compile_pattern(P1) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martin v. Löwis
						Martin v. Löwis