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

isort-identify-imports fails if there are unreadable files in the directory #2330

Open
kobarity opened this issue Jan 12, 2025 · 0 comments · May be fixed by #2331
Open

isort-identify-imports fails if there are unreadable files in the directory #2330

kobarity opened this issue Jan 12, 2025 · 0 comments · May be fixed by #2331

Comments

@kobarity
Copy link

Steps to reproduce:

  1. mkdir new_directory
  2. cd new_directory
  3. ln -s not_exist bad_link.py
  4. isort-identify-imports .

isort-identify-imports fails with FileNotFoundError. The same problem occurs when the files is unreadable due to permission issues.

In the case of isort, it is not an error but UserWarning. So I believe isort-identify-imports should do the same.

Emacs creates a lock file with a name like .#some_file.py as a symbolic link to a nonexistent target when there are unsaved changes in the buffer. As a result, running isort-identify-imports with an unsaved buffer in Emacs will result in an error.

@kobarity kobarity linked a pull request Jan 12, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant