You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ValueError(f"{patterns=!r} cannot be empty.") when using black #100
Traceback (most recent call last):
File "venv/bin/black", line 7, in <module>
sys.exit(patched_main())
File "src/black/__init__.py", line 1650, in patched_main
File "venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "venv/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "src/black/__init__.py", line 676, in main
File "src/black/__init__.py", line 805, in get_sources
File "venv/lib/python3.10/site-packages/black/files.py", line 249, in get_gitignore
return PathSpec.from_lines("gitwildmatch", lines)
File "venv/lib/python3.10/site-packages/pathspec/pathspec.py", line 259, in from_lines
return cls(patterns, backend=backend, _test_backend_factory=_test_backend_factory)
File "venv/lib/python3.10/site-packages/pathspec/pathspec.py", line 80, in __init__
use_backend = self._make_backend(backend, patterns)
File "venv/lib/python3.10/site-packages/pathspec/pathspec.py", line 279, in _make_backend
return make_pathspec_backend(name, patterns)
File "venv/lib/python3.10/site-packages/pathspec/_backends/agg.py", line 100, in make_pathspec_backend
return Re2PsBackend(cast(Sequence[RegexPattern], patterns))
File "venv/lib/python3.10/site-packages/pathspec/_backends/re2/pathspec.py", line 61, in __init__
raise ValueError(f"{patterns=!r} cannot be empty.")
ValueError: patterns=[] cannot be empty.
Versions:
pathspec 1.0.0
black 25.12.0
This is a new error that appears after the latest pathspec upgrade to 1.0.0.
Activity
cpburnz commentedon Jan 6, 2026
Thanks for the bug report. I'll release a fix for this today.
cpburnz commentedon Jan 6, 2026
This is now fixed in v1.0.1.
chore(deps): update dependency pathspec to v1 (#219)
feat: add 10 ground-truth validated real-repo pressure test projects