mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-10-19 21:10:30 -04:00
Fix pre-commit hook filter
This commit is contained in:
parent
cf725bee8c
commit
89652f81f0
@ -11,7 +11,7 @@ setup_py = os.path.realpath('./setup.py')
|
|||||||
|
|
||||||
def testfile(file):
|
def testfile(file):
|
||||||
def t(f, start, end, exclude_end=None):
|
def t(f, start, end, exclude_end=None):
|
||||||
return f.startswith(start) and f.endswith(end) and not f.endswith(exclude_end) if exclude_end else True
|
return f.startswith(start) and f.endswith(end) and not (f.endswith(exclude_end) if exclude_end else False)
|
||||||
if t(file, ('src/odf', 'src/calibre'), '.py', exclude_end='_ui.py'):
|
if t(file, ('src/odf', 'src/calibre'), '.py', exclude_end='_ui.py'):
|
||||||
return True
|
return True
|
||||||
if t(file, 'recipes', '.recipe'):
|
if t(file, 'recipes', '.recipe'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user