When upgrading from version 0.12.1 to 1.0.0, the gitwildmatch pattern type has been replaced by gitignore. You should update your calls to PathSpec.from_lines to use the gitignore argument instead of gitwildmatch.
Note that gitignore patterns have different matching behaviors than gitwildmatch:
- Patterns like
foo/* will no longer match files in subdirectories (e.g., foo/bar/hello.c will not match). - The exact pattern
/ now matches every file (equivalent to **).
If you require the legacy gitwildmatch behavior, you can use GitIgnoreSpecPattern, though this is discouraged.
# Old way (deprecated)
spec = PathSpec.from_lines('gitwildmatch', patterns)
# New way
spec = PathSpec.from_lines('gitignore', patterns)