Skip to content

Commit d3360ca

Browse files
authored
Be nicer with backward compat on config files (#102)
1 parent 4eddbbe commit d3360ca

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

empack/file_patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def match(self, path):
2121

2222

2323
class FileFilter:
24-
def __init__(self, exclude_patterns=None):
24+
def __init__(self, include_patterns=None, exclude_patterns=None):
2525
def patter_from_dict(**d):
2626
if "pattern" in d:
2727
return UnixPattern(**d)

tests/empack_test_config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
default:
2+
include_patterns:
3+
- pattern: '**/*.py'
24
exclude_patterns:
35
- pattern: '**/*.pyc'
46
- pattern: '**/tests/**/*.py'

0 commit comments

Comments
 (0)