Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce imports processed by python stubs. #15572

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ import sys
del sys.path[0]

import os
import re
import shutil
import subprocess
import tempfile
import zipfile

def IsRunningFromZip():
return %is_zipfile%

if IsRunningFromZip():
import shutil
import tempfile
import zipfile
else:
import re

# Return True if running on Windows
def IsWindows():
Expand Down Expand Up @@ -71,9 +77,6 @@ def SearchPath(name):
return path
return None

def IsRunningFromZip():
return %is_zipfile%

def FindPythonBinary(module_space):
"""Finds the real Python binary if it's not a normal absolute path."""
if PYTHON_BINARY.startswith('//'):
Expand Down