mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-31 03:55:09 +00:00 
			
		
		
		
	 cf59cee928
			
		
	
	
		cf59cee928
		
			
		
	
	
	
	
		
			
			## Summary Part of #17412 Add a new compile-time syntax error for detecting `nonlocal` declarations at a module level. ## Test Plan - Added new inline tests for the syntax error - Updated existing tests for `nonlocal` statement parsing to be inside a function scope Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
		
			
				
	
	
		
			3 lines
		
	
	
	
		
			45 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			3 lines
		
	
	
	
		
			45 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| def _():
 | |
|     nonlocal x
 | |
|     nonlocal x, y, z
 |