.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 hashes)