mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	ruff: Fix RUF021 Parenthesize when chaining and and or together.
				
					
				
			This is a preview rule, not yet enabled by default. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							f618971668
						
					
				
				
					commit
					865febb307
				
			@@ -674,7 +674,7 @@ def get_html_tag(text: str, i: int) -> str:
 | 
			
		||||
    quote_count = 0
 | 
			
		||||
    end = i + 1
 | 
			
		||||
    unclosed_end = 0
 | 
			
		||||
    while end < len(text) and (text[end] != ">" or quote_count % 2 != 0 and text[end] != "<"):
 | 
			
		||||
    while end < len(text) and (text[end] != ">" or (quote_count % 2 != 0 and text[end] != "<")):
 | 
			
		||||
        if text[end] == '"':
 | 
			
		||||
            quote_count += 1
 | 
			
		||||
        if not unclosed_end and text[end] == "<":
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user