mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	ruff: Fix UP032 Use f-string instead of format call.
				
					
				
			Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							e5d671bf2b
						
					
				
				
					commit
					d3164016f5
				
			@@ -676,7 +676,7 @@ class RealmTest(ZulipTestCase):
 | 
			
		||||
        req = {"video_chat_provider": orjson.dumps(invalid_video_chat_provider_value).decode()}
 | 
			
		||||
        result = self.client_patch("/json/realm", req)
 | 
			
		||||
        self.assert_json_error(
 | 
			
		||||
            result, ("Invalid video_chat_provider {}").format(invalid_video_chat_provider_value)
 | 
			
		||||
            result, f"Invalid video_chat_provider {invalid_video_chat_provider_value}"
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        req = {
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ def patch_disposition_header(response: HttpResponse, url: str, is_attachment: bo
 | 
			
		||||
    except UnicodeEncodeError:
 | 
			
		||||
        # If it contains non-ASCII characters, we URI-escape it and
 | 
			
		||||
        # provide a filename*=encoding'language'value
 | 
			
		||||
        file_expr = "filename*=utf-8''{}".format(quote(filename))
 | 
			
		||||
        file_expr = f"filename*=utf-8''{quote(filename)}"
 | 
			
		||||
 | 
			
		||||
    response.headers["Content-Disposition"] = f"{disposition}; {file_expr}"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -70,9 +70,9 @@ def ticket_assigned_body(payload: WildValue) -> Optional[str]:
 | 
			
		||||
                assignee=assignee, assigned_group=assigned_group
 | 
			
		||||
            )
 | 
			
		||||
        elif assignee:
 | 
			
		||||
            kwargs["assignee_info"] = "{assignee}".format(assignee=assignee)
 | 
			
		||||
            kwargs["assignee_info"] = f"{assignee}"
 | 
			
		||||
        elif assigned_group:
 | 
			
		||||
            kwargs["assignee_info"] = "{assigned_group}".format(assigned_group=assigned_group)
 | 
			
		||||
            kwargs["assignee_info"] = f"{assigned_group}"
 | 
			
		||||
 | 
			
		||||
        return TICKET_ASSIGNED_TEMPLATE.format(**kwargs)
 | 
			
		||||
    else:
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ def handle_scanning_completed_event(
 | 
			
		||||
    ]["summary"]
 | 
			
		||||
    if len(scan_summaries) > 0:
 | 
			
		||||
        for severity, count in scan_summaries.items():
 | 
			
		||||
            scan_results += "* {}: **{}**\n".format(severity, count.tame(check_int))
 | 
			
		||||
            scan_results += f"* {severity}: **{count.tame(check_int)}**\n"
 | 
			
		||||
    else:
 | 
			
		||||
        scan_results += "None\n"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user