mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Re-enable pyflakes in linter and remove python 3 pyflakes errors.
This commit is contained in:
@@ -122,7 +122,7 @@ def setup_virtualenv(target_venv_path, requirements_file, virtualenv_args=[]):
|
||||
print("Using cached Python venv from %s" % (cached_venv_path,))
|
||||
run(["sudo", "ln", "-nsf", cached_venv_path, target_venv_path])
|
||||
activate_this = os.path.join(target_venv_path, "bin", "activate_this.py")
|
||||
execfile(activate_this, dict(__file__=activate_this))
|
||||
exec(open(activate_this).read(), {}, dict(__file__=activate_this)) # type: ignore # https://github.com/python/mypy/issues/1577
|
||||
|
||||
def do_setup_virtualenv(venv_path, requirements_file, virtualenv_args):
|
||||
# Setup Python virtualenv
|
||||
@@ -133,7 +133,7 @@ def do_setup_virtualenv(venv_path, requirements_file, virtualenv_args):
|
||||
|
||||
# Switch current Python context to the virtualenv.
|
||||
activate_this = os.path.join(venv_path, "bin", "activate_this.py")
|
||||
execfile(activate_this, dict(__file__=activate_this))
|
||||
exec(open(activate_this).read(), {}, dict(__file__=activate_this)) # type: ignore # https://github.com/python/mypy/issues/1577
|
||||
|
||||
run(["pip", "install", "--upgrade", "pip"])
|
||||
run(["pip", "install", "--no-deps", "--requirement", requirements_file])
|
||||
|
||||
@@ -5,6 +5,7 @@ import shutil
|
||||
import subprocess
|
||||
import json
|
||||
import sys
|
||||
from six import unichr
|
||||
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ else:
|
||||
logger.setLevel(logging.WARNING)
|
||||
|
||||
def check_pyflakes():
|
||||
return False
|
||||
if not by_lang['py']:
|
||||
return False
|
||||
failed = False
|
||||
|
||||
@@ -34,6 +34,7 @@ import six
|
||||
from six.moves import filter
|
||||
from six.moves import map
|
||||
from six.moves import range
|
||||
from six import unichr
|
||||
|
||||
session_engine = import_module(settings.SESSION_ENGINE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user