mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	tools: Use root-based absolute import for tools.lib, etc.
Mypy can’t follow absolute imports based on directories other than the root. This was hiding some type errors due to ignore_missing_imports. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							7d71a1a31a
						
					
				
				
					commit
					684dad8145
				
			@@ -1,16 +1,17 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
# check for the venv
 | 
			
		||||
from lib import sanity_check
 | 
			
		||||
 | 
			
		||||
sanity_check.check_venv(__file__)
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 | 
			
		||||
sys.path.append(ZULIP_PATH)
 | 
			
		||||
 | 
			
		||||
# check for the venv
 | 
			
		||||
from tools.lib import sanity_check
 | 
			
		||||
 | 
			
		||||
sanity_check.check_venv(__file__)
 | 
			
		||||
 | 
			
		||||
from scripts.lib.zulip_tools import ENDC, WARNING, run
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user