mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	scripts: Help mypy resolve the psycopg2.connect overload.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							4fb97576e9
						
					
				
				
					commit
					5d77d50423
				
			@@ -44,7 +44,8 @@ pg_args["dbname"] = settings.DATABASES["default"]["NAME"]
 | 
			
		||||
pg_args["sslmode"] = settings.DATABASES["default"]["OPTIONS"].get("sslmode")
 | 
			
		||||
pg_args["connect_timeout"] = "600"
 | 
			
		||||
 | 
			
		||||
conn = psycopg2.connect(**pg_args)
 | 
			
		||||
# connection_factory=None lets mypy understand the return type
 | 
			
		||||
conn = psycopg2.connect(connection_factory=None, **pg_args)
 | 
			
		||||
conn.autocommit = True
 | 
			
		||||
 | 
			
		||||
pg_server_version = conn.server_version
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user