You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							18 lines
						
					
					
						
							436 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							18 lines
						
					
					
						
							436 B
						
					
					
				
								from __future__ import annotations
							 | 
						|
								
							 | 
						|
								import asyncio
							 | 
						|
								
							 | 
						|
								SHOW_TASK_ENDPOINT = "https://todoist.com/showTask"
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								def get_url_for_task(task_id: int, sync_id: int | None) -> str:
							 | 
						|
								    return (
							 | 
						|
								        f"{SHOW_TASK_ENDPOINT}?id={task_id}&sync_id={sync_id}"
							 | 
						|
								        if sync_id
							 | 
						|
								        else f"{SHOW_TASK_ENDPOINT}?id={task_id}"
							 | 
						|
								    )
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								async def run_async(func):
							 | 
						|
								    loop = asyncio.get_event_loop()
							 | 
						|
								    return await loop.run_in_executor(None, func)
							 | 
						|
								
							 |