mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	There are several changes: 1. We now don't explicitly check for any base / sub types, because new name check covers it 2. I've also checked that `no_type_check` do not modify foreign functions. It was the same as with `type`s 3. I've also covered `except TypeError` in `no_type_check` with a simple test case, it was not covered at all 4. I also felt like adding `lambda` test is a good idea: because `lambda` is a bit of both in class bodies: a function and an assignment <!-- issue-number: [bpo-46571](https://bugs.python.org/issue46571) --> https://bugs.python.org/issue46571 <!-- /issue-number -->
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			177 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			177 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# Test `@no_type_check`,
 | 
						|
# see https://bugs.python.org/issue46571
 | 
						|
 | 
						|
class NoTypeCheck_Outer:
 | 
						|
    class Inner:
 | 
						|
        x: int
 | 
						|
 | 
						|
 | 
						|
def NoTypeCheck_function(arg: int) -> int:
 | 
						|
    ...
 |