mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	PEP 8 nits in json package
This commit is contained in:
		
							parent
							
								
									24237ea8a1
								
							
						
					
					
						commit
						0b7f77847a
					
				
					 3 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -31,7 +31,5 @@ def main():
 | 
				
			||||||
    runner.run(suite)
 | 
					    runner.run(suite)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    import os
 | 
					 | 
				
			||||||
    import sys
 | 
					 | 
				
			||||||
    sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
 | 
					    sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
 | 
				
			||||||
    main()
 | 
					    main()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,6 +5,7 @@
 | 
				
			||||||
class JSONTestObject:
 | 
					class JSONTestObject:
 | 
				
			||||||
    pass
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RecursiveJSONEncoder(json.JSONEncoder):
 | 
					class RecursiveJSONEncoder(json.JSONEncoder):
 | 
				
			||||||
    recurse = False
 | 
					    recurse = False
 | 
				
			||||||
    def default(self, o):
 | 
					    def default(self, o):
 | 
				
			||||||
| 
						 | 
					@ -15,6 +16,7 @@ def default(self, o):
 | 
				
			||||||
                return 'JSONTestObject'
 | 
					                return 'JSONTestObject'
 | 
				
			||||||
        return json.JSONEncoder.default(o)
 | 
					        return json.JSONEncoder.default(o)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TestRecursion(TestCase):
 | 
					class TestRecursion(TestCase):
 | 
				
			||||||
    def test_listrecursion(self):
 | 
					    def test_listrecursion(self):
 | 
				
			||||||
        x = []
 | 
					        x = []
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,6 +8,7 @@
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    $ echo '{ 1.2:3.4}' | python -mjson.tool
 | 
					    $ echo '{ 1.2:3.4}' | python -mjson.tool
 | 
				
			||||||
    Expecting property name: line 1 column 2 (char 2)
 | 
					    Expecting property name: line 1 column 2 (char 2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue