mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	tools: Create more consistent checks for venv.
This helps make the Zulip development environment somewhat more robust to new contributors, since it will give them a nice warning if they try running any of our development tools outside the Zulip virtualenv. Fixes #3468.
This commit is contained in:
		@@ -6,14 +6,9 @@ import os
 | 
			
		||||
import sys
 | 
			
		||||
import glob
 | 
			
		||||
 | 
			
		||||
try:
 | 
			
		||||
    import lister
 | 
			
		||||
    from typing import cast, Callable, Dict, Iterable, List
 | 
			
		||||
except ImportError as e:
 | 
			
		||||
    print("ImportError: {}".format(e))
 | 
			
		||||
    print("You need to run the Zulip linters inside a Zulip dev environment.")
 | 
			
		||||
    print("If you are using Vagrant, you can `vagrant ssh` to enter the Vagrant guest.")
 | 
			
		||||
    sys.exit(1)
 | 
			
		||||
# check for the venv
 | 
			
		||||
from lib import sanity_check
 | 
			
		||||
sanity_check.check_venv(__file__)
 | 
			
		||||
 | 
			
		||||
def validate(fn):
 | 
			
		||||
    # type: (str) -> None
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user