Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accommodates find_pyproject_toml returning None
Prior to this, the return value of `black.files.find_pyproject_toml` was passed directly to `os.path.exists`. This was fine where `black` could find a `pyproject.toml` file. However, when one cannot be located, `find_pyproject_toml` returns `None`, which results in an uncaught exception from `os.path.exists`. This adds an additional check for when `find_project_toml` returns `None`. Fixes #1955 (introduced by #1950).
- Loading branch information