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

Falsely catching standard libraries (pdb) #3

Open
gerdm opened this issue Sep 16, 2021 · 1 comment
Open

Falsely catching standard libraries (pdb) #3

gerdm opened this issue Sep 16, 2021 · 1 comment

Comments

@gerdm
Copy link

gerdm commented Sep 16, 2021

When running the following script

import superimport

import pdb; pdb.set_trace

I get the following message from superimport

ERROR: superimport : missing python module: pdb; pdb 
Trying try to install automatcially
WARNING:root:Package was not found in the reverse index, trying pypi.
WARNING:root:Failed to install pdb; pdb automatically

However, pbd is part of the Python standard library. Is this expected?

@mjsML
Copy link
Member

mjsML commented Sep 16, 2021

When running the following script

import pdb; pdb.set_trace

This usage patten is not supported at the moment.
If you use :

import pdb
pdb.set_trace

it should work.

one needs to implement this here:

def preprocess_imports(name):
if name.find(".")!=-1:
split = name.split(".")
if split[0]:
name = split[0]
if name.endswith(" "):
name = name[:-1]
if name.find(" as ")!=-1:
name = name.split(" as ")[0]
return name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants