-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Removed unused detection of site-packages directory #5874
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -50,8 +50,6 @@ | |||||
import collections | ||||||
import copy | ||||||
import os | ||||||
import sys | ||||||
from distutils import sysconfig | ||||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, Union | ||||||
|
||||||
import astroid | ||||||
|
@@ -448,25 +446,7 @@ def _compute_site_packages(): | |||||
def _normalized_path(path): | ||||||
return os.path.normcase(os.path.abspath(path)) | ||||||
|
||||||
paths = set() | ||||||
real_prefix = getattr(sys, "real_prefix", None) | ||||||
for prefix in filter(None, (real_prefix, sys.prefix)): | ||||||
path = sysconfig.get_python_lib(prefix=prefix) | ||||||
path = _normalized_path(path) | ||||||
paths.add(path) | ||||||
|
||||||
# Handle Debian's derivatives /usr/local. | ||||||
if os.path.isfile("/etc/debian_version"): | ||||||
for prefix in filter(None, (real_prefix, sys.prefix)): | ||||||
libpython = os.path.join( | ||||||
prefix, | ||||||
"local", | ||||||
"lib", | ||||||
"python" + sysconfig.get_python_version(), | ||||||
"dist-packages", | ||||||
) | ||||||
paths.add(libpython) | ||||||
return paths | ||||||
return {_normalized_path(path) for path in astroid.modutils.STD_LIB_DIRS} | ||||||
jacobtylerwalls marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If these should be the paths to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, bad mistake. That was the PR I was looking at yesterday when I started down this path, and then I mistook the recent astroid changes for being relevant. 🤕 |
||||||
|
||||||
def open(self): | ||||||
"""Called before visiting project (i.e set of modules).""" | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.