.gitignore file parser
Project description
nr.gitignore
A simple .gitignore
pattern parser and matcher.
Example Usage
import os
import nr.gitignore
patterns = nr.gitignore.parse()
for root, dirs, files in nr.gitignore.walk(patterns, '.'):
# ...
import nr.gitignore
ignore = nr.gitignore.IgnoreList()
ignore.parse(['__pycache__', 'dist'])
assert ignore.match('./dist/module-1.0.0.tar.gz') == nr.gitignore.MATCH_IGNORE
Copyright © 2018 Niklas Rosenstein
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.gitignore-1.0.0.tar.gz
(5.3 kB
view details)
File details
Details for the file nr.gitignore-1.0.0.tar.gz
.
File metadata
- Download URL: nr.gitignore-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0deee7c819d8ce1ae4371fdece278908427402570fd114a2e7007a7a3989886 |
|
MD5 | 5896bc742581cde5af6dc1be22299585 |
|
BLAKE2b-256 | d828777081d92e25f69b8d49683897917304aa89f06e719c7a13746f7e365ad9 |