Skip to content

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

Open
@kobarity

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions