Skip to content

Correcting the pyinfo.py file #12207

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

Closed
wants to merge 1 commit into from
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
10 changes: 6 additions & 4 deletions mypy/pyinfo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import print_function
"""Utilities to find the site and prefix information of a Python executable, which may be Python 2.
"""Utilities to find the site and prefix information of a Python executable, which may be Python 3.

This file MUST remain compatible with Python 2. Since we cannot make any assumptions about the
This file MUST remain compatible with Python 3. Since we cannot make any assumptions about the
Python being executed, this module should not use *any* dependencies outside of the standard
library found in Python 2. This file is run each mypy run, so it should be kept as fast as
library found in Python 3. This file is run each mypy run, so it should be kept as fast as
possible.
"""
import site
Expand All @@ -17,9 +17,11 @@
from typing import List, Tuple



def getprefixes():
# type: () -> Tuple[str, str]
return sys.base_prefix, sys.prefix
if(!sys.base_prefix) """if base_prefix does not exists then return prefix"""
return sys.prefix


def getsitepackages():
Expand Down