Skip to content

Commit

Permalink
flake
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 26, 2024
1 parent 39e33de commit 8c5210c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/includemocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def shouldExclude(root, path):
return False # No excludes provided

assert root.startswith(args.root)
root = stripInitialSlash(root[len(args.root) :])
root = stripInitialSlash(root[len(args.root):])

if args.headerPrefix:
assert root.startswith(args.headerPrefix)
root = stripInitialSlash(root[len(args.headerPrefix) :])
root = stripInitialSlash(root[len(args.headerPrefix):])

return (path in args.excludes) or (root + "/" + path in args.excludes)

Expand All @@ -64,11 +64,11 @@ def hasMacro(fileName):

def matchingCPPFile(root, fileName):
assert root.startswith(args.root)
root = stripInitialSlash(root[len(args.root) :])
root = stripInitialSlash(root[len(args.root):])

if args.headerPrefix:
assert root.startswith(args.headerPrefix)
root = stripInitialSlash(root[len(args.headerPrefix) :])
root = stripInitialSlash(root[len(args.headerPrefix):])

if args.sourcePrefix:
root = args.sourcePrefix + "/" + root
Expand Down Expand Up @@ -112,7 +112,7 @@ def trimExistingMocInclude(content, cppFileName):
)
match = mocStrRegex.search(content)
if match:
return content[: match.start()] + content[match.end() :]
return content[: match.start()] + content[match.end():]
return content


Expand Down Expand Up @@ -178,7 +178,7 @@ def logVerbose(content):
print(content)


################################ MAIN #################################
# MAIN
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="""Script to add inclusion of mocs to files recursively.
Expand Down

0 comments on commit 8c5210c

Please sign in to comment.