Loading black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2494,7 +2494,7 @@ def gen_python_files_in_dir(path: Path) -> Iterator[Path]: yield from gen_python_files_in_dir(child) elif child.suffix in PYTHON_EXTENSIONS: elif child.is_file() and child.suffix in PYTHON_EXTENSIONS: yield child Loading tests/test_black.py +7 −0 Changes for tests/test_black.py: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -695,6 +695,13 @@ def test_no_files(self) -> None: result = CliRunner().invoke(black.main, []) self.assertEqual(result.exit_code, 0) def test_broken_symlink(self) -> None: with cache_dir() as workspace: symlink = workspace / "broken_link.py" symlink.symlink_to("nonexistent.py") result = CliRunner().invoke(black.main, [str(workspace.resolve())]) self.assertEqual(result.exit_code, 0) def test_read_cache_line_lengths(self) -> None: with cache_dir() as workspace: path = (workspace / "file.py").resolve() Loading Loading
black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2494,7 +2494,7 @@ def gen_python_files_in_dir(path: Path) -> Iterator[Path]: yield from gen_python_files_in_dir(child) elif child.suffix in PYTHON_EXTENSIONS: elif child.is_file() and child.suffix in PYTHON_EXTENSIONS: yield child Loading
tests/test_black.py +7 −0 Changes for tests/test_black.py: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -695,6 +695,13 @@ def test_no_files(self) -> None: result = CliRunner().invoke(black.main, []) self.assertEqual(result.exit_code, 0) def test_broken_symlink(self) -> None: with cache_dir() as workspace: symlink = workspace / "broken_link.py" symlink.symlink_to("nonexistent.py") result = CliRunner().invoke(black.main, [str(workspace.resolve())]) self.assertEqual(result.exit_code, 0) def test_read_cache_line_lengths(self) -> None: with cache_dir() as workspace: path = (workspace / "file.py").resolve() Loading