mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-09-29 15:31:08 -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 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'):
|
||||
return True
|
||||
if t(file, 'recipes', '.recipe'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user