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

Incorrectly stripping python path names #1094

Open
Will-20 opened this issue Jan 7, 2025 · 0 comments
Open

Incorrectly stripping python path names #1094

Will-20 opened this issue Jan 7, 2025 · 0 comments

Comments

@Will-20
Copy link

Will-20 commented Jan 7, 2025

There is a bug on line 61 here, if a path ends in y, for example proxy.py, then this gets incorrectly stripped to prox instead of proxy.

def path_to_import(path):
"""Convert a path to import."""
if path.name == '__init__.py':
import_path = str(path.parent)
else:
import_path = str(path).rstrip(PY_EXTENSION)
return import_path.replace('/', '.')

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

1 participant