From f2ba258ca2c92e9930892efd8f919a8b5f18bad8 Mon Sep 17 00:00:00 2001 From: Somasree Majumder Date: Fri, 18 Feb 2022 09:52:14 +0530 Subject: [PATCH] Correcting the pyinfo.py file --- mypy/pyinfo.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mypy/pyinfo.py b/mypy/pyinfo.py index 3834c04e218e9..0cbe9ab9be7ba 100644 --- a/mypy/pyinfo.py +++ b/mypy/pyinfo.py @@ -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 @@ -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():