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

Failed to create fix for UnconventionalImportAlias: Unable to rename any references to matplotlib.pyplot #6719

Closed
qarmin opened this issue Aug 21, 2023 · 0 comments · Fixed by #6745
Assignees
Labels
bug Something isn't working fuzzer Surfaced via fuzzing.

Comments

@qarmin
Copy link

qarmin commented Aug 21, 2023

Ruff 0.0.285

ruff  *.py --select ALL

file content:

import matplotlib.pyplot  # unconventional

error:

Failed to create fix for UnconventionalImportAlias: Unable to rename any references to `matplotlib.pyplot`

PY_FILE_TEST_9184702685.py.zip

@charliermarsh charliermarsh added bug Something isn't working fuzzer Surfaced via fuzzing. labels Aug 21, 2023
@charliermarsh charliermarsh self-assigned this Aug 21, 2023
charliermarsh added a commit that referenced this issue Aug 21, 2023
## Summary

Avoid attempting to rewrite `import matplotlib.pyplot` as `import
matplotlib.pyplot as plt`. We can't support these right now, since we
don't track references at the attribute level (like
`matplotlib.pyplot`).

Closes #6719.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer Surfaced via fuzzing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants