Created
April 10, 2022 08:39
-
-
Save peterjpxie/4a7ff6835031d052f22b4d3d68369148 to your computer and use it in GitHub Desktop.
parse_ignore_file.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_ignore_file(file): | |
"""Parse ignore file and return a list of ignored keys""" | |
from os import path | |
ignore_keys = [] | |
if path.isfile(file): | |
with open(file) as f: | |
for line in f: | |
if line.strip != "": | |
ignore_keys.append(line.strip()) | |
return ignore_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment